@matterlabs/zksync-contracts

1.0.0-beta.4 • Public • Published

ZKsync Contracts

Logo

[!WARNING] This project is provided on the best effort basis and might not accurately reflect contracts that are deployed on any particular ZK chain. Proper source of truth is still era-contracts

This package contains lightweight subset of ZKsync L1, L2 and system contracts that we consider to be publicly facing. For more details see era-contracts.

[!IMPORTANT] Current contract snapshot was made for protocol version 26 as taken from commit 6badcb8a9b6114c6dd10d3b172a96812250604b0

Installation

Hardhat

yarn add @matterlabs/zksync-contracts@beta

Foundry

forge install matter-labs/v2-testnet-contracts@beta

Add the following to the remappings.txt file of your project:

@matterlabs/zksync-contracts/=lib/v2-testnet-contracts/

Usage

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;

import {IPaymaster} from "@matterlabs/zksync-contracts/contracts/system-contracts/interfaces/IPaymaster.sol";

contract MyPaymaster is IPaymaster {
     // IMPLEMENTATION
}

You can find a lot of useful examples in the ZKsync docs.

License

ZKsync Contracts are distributed under the terms of the MIT license.

See LICENSE-MIT for details.

Official Links

Readme

Keywords

none

Package Sidebar

Install

npm i @matterlabs/zksync-contracts

Homepage

zksync.io/

Weekly Downloads

8,192

Version

1.0.0-beta.4

License

MIT

Unpacked Size

284 kB

Total Files

143

Last publish

Collaborators

  • vladbochok
  • npm-matterlabs