ZKsync Contracts
This package contains ZKsync L1, L2 and System Contracts. For more details see the source repository.
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