Closed skosito closed 3 months ago
The recent updates enhance the functionality and robustness of various smart contracts within the EVM ecosystem, focusing on token management, error handling, and event logging. Key modifications include the introduction of new functions for withdrawals, refined error messages, and improved event emissions for better tracking. These changes reflect a modular and efficient design, particularly for ERC20 token operations, ensuring a more powerful and adaptable framework.
File Path | Change Summary |
---|---|
contracts/prototypes/evm/GatewayEVM.sol |
Updated error handling for ERC20 token transfers and modified logic to transfer the remaining balance. |
contracts/prototypes/evm/IReceiverEVM.sol |
Added ReceivedRevert event for enhanced error tracking. |
contracts/prototypes/evm/ReceiverEVM.sol |
Implemented the IReceiverEVMEvents interface, added receiveERC20Partial , and onRevert functions for improved functionality. |
contracts/prototypes/evm/ZetaConnector*.sol |
Introduced withdrawAndRevert function across multiple contracts for enhanced withdrawal handling. |
contracts/prototypes/zevm/TestZContract.sol |
Added ContextDataRevert event for improved handling of cross-chain calls. |
lib/types.ts |
Updated ParamSymbol type to include new cryptocurrency symbols. |
testFoundry/* |
Introduced new test contracts for ZetaConnectorNative and ZetaConnectorNonNative , improving test coverage. |
sequenceDiagram
participant User
participant GatewayEVM
participant ZetaConnectorNative
User->>GatewayEVM: Initiate ERC20 transfer
GatewayEVM->>ZetaConnectorNative: Execute token withdrawal and revert
ZetaConnectorNative-->>GatewayEVM: Confirm withdrawal success
GatewayEVM-->>User: Notify transfer complete
🐇 In a world where tokens flow,
New paths of transfer start to glow.
With events that catch the eye,
And functions that leap and fly!
Robust and swift, our code's a delight,
In the garden of contracts, everything feels right! 🌼✨
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 96.29630%
with 1 line
in your changes missing coverage. Please review.
Project coverage is 61.08%. Comparing base (
b921999
) to head (b3485b9
).
Files | Patch % | Lines |
---|---|---|
contracts/zevm/WZETA.sol | 90.90% | 1 Missing :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
@coderabbitai can you review specifically the tests for contracts in prototypes
and suggest if some edge cases are missing for the tests?
[!TIP] For best results, initiate chat on the files or code changes.
Unable to process this comment: maximum number of iterations reached.
Summary by CodeRabbit
New Features
ReceivedRevert
event added to improve event tracking in the IReceiverEVM interface.receiveERC20Partial
function introduced, allowing partial token transfers.withdrawAndRevert
functions added to multiple contracts for better token withdrawal handling and error management.ContextDataRevert
event in the TestZContract for better cross-chain interaction management.Bug Fixes
Tests