Closed skosito closed 3 months ago
The recent updates introduce significant enhancements to the GatewayEVM and GatewayZEVM contracts, improving transaction handling and security. Key changes include the addition of new parameters in function signatures, enhanced error checks, and new functionalities like ERC20 custody management. Updates to scripts and tests ensure comprehensive validation of these features, promoting better contract interaction and usability.
Files | Change Summary |
---|---|
v2/pkg/gatewayevm.sol/gatewayevm.go , ...gatewayzevm.go |
Updated ABIs with new and modified function signatures, adding parameters to improve transaction handling. |
v2/pkg/igatewayzevm.sol/igatewayzevm.go |
Modifications to function signatures in the ABI, incorporating a new receiver parameter. |
v2/src/evm/GatewayEVM.sol , ...GatewayZEVM.sol |
Enhanced call , withdraw , and withdrawAndCall functions with checks for zero addresses and new parameters. |
v2/typechain-types/*.ts |
Updated TypeScript interfaces with new receiver parameters for withdraw and withdrawAndCall functions. |
v2/test/GatewayEVM.t.sol , ...GatewayZEVM.t.sol |
Added tests for new functionalities, ensuring correct behavior with zero addresses and amounts. |
v2/scripts/localnet/*.s.sol |
Integrated ERC20Custody in the script to manage tokens effectively, adding new variables and logic. |
v2/typechain-types/factories/*.ts |
Modifications to bytecode strings and constructor parameters reflecting changes in contract logic. |
sequenceDiagram
participant User
participant GatewayEVM
participant GatewayZEVM
participant ERC20Custody
User->>GatewayEVM: call(receiver, payload)
GatewayEVM-->>User: Check receiver not zero
GatewayEVM->>GatewayZEVM: withdraw(receiver, amount, chainId)
GatewayZEVM-->>User: Emit withdrawal event
User->>ERC20Custody: whitelist(erc20Address)
ERC20Custody-->>User: Confirm whitelisting
🐇 In a meadow lush and bright,
The contracts dance in morning light.
New functions added, oh what glee,
With checks for safety, wild and free!
Tokens flowing, like a stream,
In code we trust, in code we dream! 🌼
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?
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 83.27%. Comparing base (
f975656
) to head (3768305
).
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
closes: #300
Summary by CodeRabbit
New Features
GatewayEVM
andGatewayZEVM
contracts with new functions for improved withdrawal and custody management.EvmDepositAndCallScript
for managing ERC20 tokens with custody operations.Bug Fixes
Tests
Documentation