ZKsync Smart Contracts
npm install @matterlabs/zksync-contractsCanonical L1 & L2 contract interfaces for the ZKsync Elastic Network




> Snapshot notice
> These contracts target protocol version 29, commit 65234ab0.
> [!NOTE]
> 🛠️ This is a development repository for _interfaces only_.
> If you're looking for contract implementations, see
> 👉 matter-labs/era-contracts
---
To install with Foundry-ZKsync:
``bash`
forge install matter-labs/zksync-contracts
Add the following to the remappings.txt file of your project:
`txt`
@matterlabs/zksync-contracts/=lib/matterlabs/zksync-contracts/
To install with Hardhat:
`bash`
bun install @matterlabs/zksync-contracts
`solidity
// 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 {
// Your implementation here
}
``
* Interface & Library Docs
Solidity interfaces and helper libraries
* System Contract Specifications
Core system contract specs
* Source Repository
GitHub – matter-labs/era-contracts
* ZKsync Docs
docs.zksync.io
Bug fixes, new snapshots, and added ABIs are welcome!
Open an issue before large changes and follow the standard PR workflow.
For full guidelines, please see the Contributing Guide.
Dual-licensed under MIT / Apache-2.0.
See LICENSE-MIT and LICENSE-APACHE.
---