An open API service indexing awesome lists of open source software.

https://github.com/matter-labs/zksync-contracts

ZKsync contract interfaces and libraries
https://github.com/matter-labs/zksync-contracts

contracts elastic-network zksync

Last synced: 7 months ago
JSON representation

ZKsync contract interfaces and libraries

Awesome Lists containing this project

README

          




ZKsync

ZKsync Contracts

*Canonical L1 & L2 contract interfaces for the ZKsync Elastic Network*

[![NPM](https://img.shields.io/npm/v/@matterlabs/zksync-contracts)](https://www.npmjs.com/package/@matterlabs/zksync-contracts)
[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](LICENSE-MIT)
[![Docs](https://img.shields.io/badge/docs-reference-blue)](https://matter-labs.github.io/zksync-contracts/latest/)
[![X: @zksyncdevs](https://img.shields.io/badge/follow-@zksyncdevs-1DA1F2?logo=x)](https://x.com/zksyncdevs)

> **Snapshot notice**
> These contracts target **protocol version 29**, commit [`65234ab0`](https://github.com/matter-labs/era-contracts/commit/65234ab0617c677d8a3d266af9e95506db351280).

> [!NOTE]
> 🛠️ This is a **development repository** for _interfaces only_.
> If you're looking for **contract implementations**, see
> 👉 [matter-labs/era-contracts](https://github.com/matter-labs/era-contracts/tree/draft-v29)

---

## 📦 Installation

To install with [**Foundry-ZKsync**](https://github.com/matter-labs/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**](https://github.com/matter-labs/hardhat-zksync):

```bash
bun install @matterlabs/zksync-contracts
```

## 🚀 Quick start

```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
}
```

## 📖 Documentation

* **Interface & Library Docs**
[Solidity interfaces and helper libraries](https://matter-labs.github.io/zksync-contracts/latest/)

* **System Contract Specifications**
[Core system contract specs](https://matter-labs.github.io/zksync-era/core/latest/specs/contracts/index.html)

* **Source Repository**
[GitHub – matter-labs/era-contracts](https://github.com/matter-labs/era-contracts/tree/release-v28)

* **ZKsync Docs**
[docs.zksync.io](https://docs.zksync.io)

## 🤝 Contributing

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](./CONTRIBUTING.md).

## 📜 License

Dual-licensed under **MIT** / **Apache-2.0**.
See [LICENSE-MIT](LICENSE-MIT) and [LICENSE-APACHE](LICENSE-APACHE).

---

[Website](https://zksync.io) •
[GitHub](https://github.com/matter-labs) •
[X](https://x.com/zksync) •
[X for Devs](https://x.com/zksyncdevs) •
[Discord](https://join.zksync.dev) •
[Mirror](https://zksync.mirror.xyz)