Closed skosito closed 4 months ago
The changes enhance the functionality of various EVM-related smart contracts, focusing on the integration of Zeta token handling, improved connectors, and refined interfaces. These updates streamline token transfer processes, improve error management, and strengthen contract interactions. New tests and deployment scripts ensure robust functionality and seamless integration within the Ethereum Virtual Machine (EVM) landscape.
Files/Directories | Change Summary |
---|---|
contracts/prototypes/evm/GatewayEVM.sol |
Added Zeta token and connector handling, modified initialization and token transfer logic, added new functions for transfer and connector setup. |
contracts/prototypes/evm/GatewayEVMUpgradeTest.sol |
Enhanced with Zeta token interactions, deposit functions, and error handling. |
contracts/prototypes/evm/ERC20CustodyNew.sol |
Updated import from interfaces.sol to IGatewayEVM.sol . |
contracts/prototypes/evm/IGatewayEVM.sol |
Changed executeWithERC20 to a void function, removed event declarations. |
contracts/prototypes/evm/ZetaConnectorNew.sol |
Introduced ZetaConnectorNew for ERC20 token transfers with withdrawal and calling functionalities. |
contracts/prototypes/evm/ZetaConnectorNewBase.sol |
Introduced abstract base contract for token interactions with external gateway. |
contracts/prototypes/evm/ZetaConnectorNewEth.sol |
Added ZetaConnectorNewEth contract with token withdrawal and transfer functionalities. |
contracts/prototypes/evm/ZetaConnectorNewNonEth.sol |
Added contract for handling ERC20 tokens within the Zeta protocol. |
contracts/prototypes/zevm/IGatewayZEVM.sol |
Modified Withdrawal event and added new errors for better Zeta token handling. |
testFoundry/GatewayEVM.t.sol |
Added instances of TestERC20 and ZetaConnectorNewNonEth , modified proxy initialization to include Zeta token. |
testFoundry/GatewayEVMUpgrade.t.sol |
Enhanced GatewayEVM initialization and setup with Zeta token and connector. |
testFoundry/GatewayEVMZEVM.t.sol |
Added Zeta token and connector setup, modified initialization and event handling. |
test/prototypes/GatewayEVMUniswap.spec.ts |
Added deployment and setup scripts for Zeta token and connectors, improved contract interactions. |
sequenceDiagram
participant User
participant GatewayEVM
participant ZetaConnectorNewNonEth
participant ZetaToken
User ->> GatewayEVM: Initialize with ZetaToken and ZetaConnector
GatewayEVM ->> ZetaConnectorNewNonEth: Set connector address
User ->> GatewayEVM: Transfer tokens
GatewayEVM ->> ZetaToken: Transfer tokens to custody
GatewayEVM ->> ZetaConnectorNewNonEth: Transfer Zeta tokens
In the fields of code we play,
Tokens dance the Zeta way,
Connectors link and contracts call,
Solidity weaves a vibrant thrall.
With bytes and gas, our work is done,
EVM flows like rivers run.
🐇✨
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Attention: Patch coverage is 19.76744%
with 69 lines
in your changes missing coverage. Please review.
Project coverage is 47.52%. Comparing base (
00b18ad
) to head (1cc8ad5
).
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
@lumtis @fbac i think all comments are addressed
@lumtis i added 2 implementations for connector (lock and mint versions), will add supply cap for non eth connector with this https://github.com/zeta-chain/protocol-contracts/issues/236 and unit tests in follow up PR
implements specs for zeta handling
NOTE: unit tests and worker will be in follow up PR once unit test PR is merged and specs are approved
Qs:
zeta connector now looks like custody, i didnt add mint before transfer because according to existing interfaces zeta on evm doesnt have mint method, and this is handled by locking tokens on connector instead of minting?
on gatewayzevm, i used same logic as existing one:
Summary by CodeRabbit
New Features
ZetaConnector
andzeta
token contracts for enhanced token operations.ZetaConnector
,zeta
, andGatewayEVM
contracts.Bug Fixes
Tests
ZetaConnector
andzeta
token contracts.ZetaConnector
,zeta
, andGatewayEVM
.