Skip to content

0xPolygon/zkevm-wrapper

Repository files navigation

ZkEVM Wrapper test

This repository contains the ZkEVM wrapper contracts that allows any user (including smart contracts) to transfer ETH and ERC20 tokens to ZkEVM in a single transaction.

Features

  • Transfer ETH and ERC20 tokens to ZkEVM using traditional ERC-20 approval flow
  • Transfer ETH and ERC20 tokens to ZkEVM using EIP-2612 permit signatures
  • Transfer ETH and ERC20 tokens to ZkEVM using DAI-style permit signatures

    ⚠️ NOTE: The wrapper does not support fee-on-transfer tokens and will automatically revert if the token has a transfer fee.

Usage

  • Make an approval tx to the wrapper contract with the amount of tokens you want to transfer to ZkEVM or
  • Sign a EIP-2612 permit signature with the amount of tokens and appropriate deadline you want to transfer to ZkEVM or
  • Sign a Dai-style permit signature with the amount of tokens and appropriate expiry and nonce you want to transfer to ZkEVM

Then,

  • Call the appropriate deposit() function on the wrapper contract with the ether, amount of ERC-20 tokens (and signature, if any) that you want to transfer to ZkEVM

Deployment addresses

Network Address
Ethereum mainnet 0x047E0b64743071b897A6177F1796E98b4C3f344E
Testnet (Sepolia) 0x0f04f8434BaC2e1Db8FCa8A34D3E177B6c7CCAbA

Development

This repository makes use of Foundry for compilation and dependency management. You can find the installation instructions here.

To build the project, run:

forge build

To run the tests, run:

forge test

Licensing

All source code is released under the MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT).

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the MIT license, shall be licensed as above, without any additional terms or conditions.

About

No description, website, or topics provided.

Resources

License

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published