Skip to content

popzxc/alloy-zksync

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

83 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

alloy-zksync

Latest release docs | Main branch docs

This crate provides implementation of the ZKsync network support for the alloy ecosystem.

Warning

Work in progress.

This crate can already be used for L2 communication, and is already integrated to some projects, including foundry-zksync.

Bug reports and PRs are appreciated.

Overview

The main part of this crate is Zksync network implementation, which makes it possible to use all of the alloy functionality in L1-compatible way.

Where possible, all the technicalities (including, for example, signing EIP712 transactions) are hidden under the hood, so that interfaces remain unchanged. In some cases, it means that some magic happens under the hood (one example is that user doesn't have to manually specify the contract deployer address in deploy transactions).

Where existing interfaces cannot be used (for example, adding factory dependencies to deployment, or specifying paymaster parameters), the functionality is added in a way that is aligned with overall alloy design, either as methods on the types specific to the Zksync network, or via extension traits (in case of Provider, for example).

Similarly to anvil bindings, alloy-zksync provides bindings for anvil-zksync.

For usage, the best reference currently is examples:

Progress

  • It compiles
  • Bindings for test node
  • Zksync network definition
  • Example of sending tx to era test node via era binding
  • Eip712 tx (works partially)
  • API extensions (zks namespace)
  • L1->L2 txs (deposits)
  • L2->L1 txs (withdrawals)
  • Fillers
  • Mirrored crate structure
  • Mirrored features from upstream crates (e.g. serde)
  • Comprehensive documentation

Acknowledgements

Parts of the codebase for this repository were based on the zksync-web3-rs crate by LambdaClass, as well as alloy codebase.

License

alloy-zksync is distributed under the terms of either

at your option.

About

No description, website, or topics provided.

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Packages

No packages published

Languages