-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor: rename src to contracts #314
Conversation
Important Review skippedReview was skipped due to path filters Files ignored due to path filters (12)
You can disable this status message by setting the WalkthroughWalkthroughThe project has undergone significant structural improvements, notably relocating the source directory from Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant GatewayEVM
participant ERC20Custody
participant ZRC20
User->>GatewayEVM: Call deposit()
GatewayEVM->>ERC20Custody: Validate and process deposit
ERC20Custody->>ZRC20: Transfer tokens
ZRC20-->>ERC20Custody: Confirm transfer
ERC20Custody-->>GatewayEVM: Deposit complete
GatewayEVM-->>User: Confirm deposit
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? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configuration File (
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #314 +/- ##
=======================================
Coverage 82.35% 82.35%
=======================================
Files 7 7
Lines 306 306
Branches 99 99
=======================================
Hits 252 252
Misses 54 54 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 20
Outside diff range, codebase verification and nitpick comments (6)
v2/types/ERC20CustodyEchidnaTest.ts (1)
Line range hint
506-629
: Address void type confusion in TypedContractMethod.The use of
void
outside a return type or type parameter is confusing. Replacevoid
withundefined
to align with TypeScript best practices.- unwhitelist: TypedContractMethod<[token: AddressLike], [void], "nonpayable">; - whitelist: TypedContractMethod<[token: AddressLike], [void], "nonpayable">; - whitelisted: TypedContractMethod<[arg0: AddressLike], [boolean], "view">; - withdraw: TypedContractMethod<[to: AddressLike, token: AddressLike, amount: BigNumberish], [void], "nonpayable">; - withdrawAndCall: TypedContractMethod<[to: AddressLike, token: AddressLike, amount: BigNumberish, data: BytesLike], [void], "nonpayable">; - withdrawAndRevert: TypedContractMethod<[to: AddressLike, token: AddressLike, amount: BigNumberish, data: BytesLike, revertContext: RevertContextStruct], [void], "nonpayable">; + unwhitelist: TypedContractMethod<[token: AddressLike], [undefined], "nonpayable">; + whitelist: TypedContractMethod<[token: AddressLike], [undefined], "nonpayable">; + whitelisted: TypedContractMethod<[arg0: AddressLike], [boolean], "view">; + withdraw: TypedContractMethod<[to: AddressLike, token: AddressLike, amount: BigNumberish], [undefined], "nonpayable">; + withdrawAndCall: TypedContractMethod<[to: AddressLike, token: AddressLike, amount: BigNumberish, data: BytesLike], [undefined], "nonpayable">; + withdrawAndRevert: TypedContractMethod<[to: AddressLike, token: AddressLike, amount: BigNumberish, data: BytesLike, revertContext: RevertContextStruct], [undefined], "nonpayable">;Tools
Biome
[error] 504-504: void is confusing outside a return type or a type parameter.
Unsafe fix: Use undefined instead.
(lint/suspicious/noConfusingVoidType)
[error] 506-506: void is confusing outside a return type or a type parameter.
Unsafe fix: Use undefined instead.
(lint/suspicious/noConfusingVoidType)
[error] 508-508: void is confusing outside a return type or a type parameter.
Unsafe fix: Use undefined instead.
(lint/suspicious/noConfusingVoidType)
[error] 514-514: void is confusing outside a return type or a type parameter.
Unsafe fix: Use undefined instead.
(lint/suspicious/noConfusingVoidType)
v2/types/factories/ERC20Custody__factory.ts (1)
Old event names still present in the codebase
The events
WithdrawAndCall
andWithdrawAndRevert
have not been fully updated toWithdrawnAndCalled
andWithdrawnAndReverted
across the codebase. Please ensure all references are updated.
- Files with old references:
v2/pkg/zetaconnectornonnative.sol/zetaconnectornonnative.go
v2/pkg/zetaconnectornative.sol/zetaconnectornative.go
v2/pkg/zetaconnectorbase.sol/zetaconnectorbase.go
v2/pkg/senderzevm.sol/senderzevm.go
v2/pkg/igatewayzevm.sol/igatewayzevm.go
v2/pkg/gatewayevmzevm.t.sol/gatewayevmzevmtest.go
v2/pkg/gatewayzevm.t.sol/gatewayzevminboundtest.go
v2/pkg/erc20custodyechidnatest.sol/erc20custodyechidnatest.go
v2/pkg/erc20custody.sol/erc20custody.go
v2/pkg/gatewayzevm.sol/gatewayzevm.go
v2/pkg/erc20custody.t.sol/erc20custodytest.go
v2/pkg/ierc20custody.sol/ierc20custody.go
Analysis chain
Line range hint
549-628
: Renaming of eventsWithdrawAndCall
andWithdrawAndRevert
.The events have been renamed to
WithdrawnAndCalled
andWithdrawnAndReverted
, respectively. Ensure that all references to these events are updated in the codebase.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify all references to renamed events are updated in the codebase. # Test: Search for old event names and ensure they are replaced. Expect: No occurrences of old names. rg --type go 'WithdrawAndCall|WithdrawAndRevert'Length of output: 178980
v2/pkg/testerc20.sol/testerc20.go (1)
34-35
: Add handling for new ERC20 error types in the Go codebase.The new error types introduced in the ABI, such as
ERC20InsufficientAllowance
,ERC20InsufficientBalance
, and others, are not currently handled in the Go codebase. It is important to implement proper error handling for these to ensure meaningful feedback is provided to users when these errors occur.
- Review and update the Go codebase to include handling for these new error types.
- Ensure that error messages are informative and help in debugging issues related to ERC20 transactions.
Analysis chain
Ensure proper handling of new error types.
The ABI now includes additional error types such as
ERC20InsufficientAllowance
,ERC20InsufficientBalance
, etc. Ensure that these errors are properly handled in the codebase to provide meaningful feedback to users.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the handling of new error types in the codebase. # Test: Search for occurrences of the new error types. Expect: Proper handling in the codebase. rg --type go 'ERC20InsufficientAllowance|ERC20InsufficientBalance|ERC20InvalidApprover|ERC20InvalidReceiver|ERC20InvalidSender|ERC20InvalidSpender'Length of output: 21490
v2/pkg/receiverevm.sol/receiverevm.go (1)
42-42
: Ensure comprehensive test coverage for new ABI functionalities.While there are references to
ReceivedRevert
in the test files, there is no direct evidence of specific test functions forreceiveERC20Partial
,receiveNoParams
,AddressEmptyCode
, orAddressInsufficientBalance
. It is recommended to add tests for these new functionalities to ensure they are thoroughly validated.
- Add tests for
receiveERC20Partial
.- Add tests for
receiveNoParams
.- Add tests for the
AddressEmptyCode
error.- Add tests for the
AddressInsufficientBalance
error.Analysis chain
Enhancements in ABI string require comprehensive testing.
The updated ABI string includes new functions (
receiveERC20Partial
,receiveNoParams
), events (ReceivedRevert
), and error types (AddressEmptyCode
,AddressInsufficientBalance
). Ensure that comprehensive tests are in place to cover these new functionalities and their integration with the existing system.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the presence of tests for new ABI functions and events. # Test: Search for test functions related to newly added ABI functions and events. rg --type go -A 5 'func Test.*receiveERC20Partial|Test.*receiveNoParams|Test.*ReceivedRevert|Test.*AddressEmptyCode|Test.*AddressInsufficientBalance'Length of output: 189483
v2/pkg/mockerc721.sol/mockerc721.go (1)
35-35
: Note Deprecated Variables.The variables
MockERC721ABI
andMockERC721Bin
are marked as deprecated. Plan for their removal in future updates.v2/types/IERC20Custody.sol/IERC20CustodyEvents.ts (1)
38-43
: Inconsistent Application of Updated Event NamesThe old event names "Withdraw", "WithdrawAndCall", and "WithdrawAndRevert" are still present across multiple files in the codebase. Ensure these are updated to reflect the new event names consistently.
v2/types/ZetaConnectorNonNative.ts
v2/types/ZetaConnectorNative.ts
v2/types/ZetaConnectorBase.ts
v2/types/ERC20CustodyEchidnaTest.ts
v2/types/ERC20Custody.ts
v2/types/GatewayZEVM.ts
v2/scripts/localnet/worker.ts
v1/test/ERC20Custody.spec.ts
Analysis chain
Updated Event Names in
getEvent
.The event names have been updated to reflect their functionality better. Ensure these changes are consistently applied across the codebase.
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the usage of updated event names in the codebase. # Test: Search for the old event names to ensure they are not used. # Expect: No occurrences of old event names. rg --type typescript 'Withdraw|WithdrawAndCall|WithdrawAndRevert'Length of output: 102
Script:
#!/bin/bash # Description: Verify the usage of updated event names in the codebase. # Test: Search for the old event names to ensure they are not used. # Expect: No occurrences of old event names. rg --type ts 'Withdraw|WithdrawAndCall|WithdrawAndRevert'Length of output: 87859
Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Files selected for processing (86)
- v2/foundry.toml (1 hunks)
- v2/package.json (2 hunks)
- v2/pkg/address.sol/address.go (1 hunks)
- v2/pkg/beaconproxy.sol/beaconproxy.go (1 hunks)
- v2/pkg/console.sol/console.go (1 hunks)
- v2/pkg/core.sol/core.go (1 hunks)
- v2/pkg/defender.sol/defender.go (1 hunks)
- v2/pkg/defenderdeploy.sol/defenderdeploy.go (1 hunks)
- v2/pkg/erc1967proxy.sol/erc1967proxy.go (1 hunks)
- v2/pkg/erc1967utils.sol/erc1967utils.go (1 hunks)
- v2/pkg/erc20custody.sol/erc20custody.go (1 hunks)
- v2/pkg/gatewayevm.sol/gatewayevm.go (1 hunks)
- v2/pkg/gatewayevmupgradetest.sol/gatewayevmupgradetest.go (1 hunks)
- v2/pkg/gatewayzevm.sol/gatewayzevm.go (1 hunks)
- v2/pkg/math.sol/math.go (1 hunks)
- v2/pkg/mockerc20.sol/mockerc20.go (1 hunks)
- v2/pkg/mockerc721.sol/mockerc721.go (1 hunks)
- v2/pkg/proxyadmin.sol/proxyadmin.go (1 hunks)
- v2/pkg/receiverevm.sol/receiverevm.go (1 hunks)
- v2/pkg/safeconsole.sol/safeconsole.go (1 hunks)
- v2/pkg/safeerc20.sol/safeerc20.go (1 hunks)
- v2/pkg/senderzevm.sol/senderzevm.go (1 hunks)
- v2/pkg/signedmath.sol/signedmath.go (1 hunks)
- v2/pkg/stderror.sol/stderror.go (1 hunks)
- v2/pkg/stdjson.sol/stdjson.go (1 hunks)
- v2/pkg/stdmath.sol/stdmath.go (1 hunks)
- v2/pkg/stdstorage.sol/stdstorage.go (1 hunks)
- v2/pkg/stdstorage.sol/stdstoragesafe.go (1 hunks)
- v2/pkg/stdstyle.sol/stdstyle.go (1 hunks)
- v2/pkg/stdtoml.sol/stdtoml.go (1 hunks)
- v2/pkg/storageslot.sol/storageslot.go (1 hunks)
- v2/pkg/strings.sol/strings.go (1 hunks)
- v2/pkg/systemcontract.sol/systemcontract.go (1 hunks)
- v2/pkg/systemcontractmock.sol/systemcontractmock.go (1 hunks)
- v2/pkg/testerc20.sol/testerc20.go (1 hunks)
- v2/pkg/testuniversalcontract.sol/testuniversalcontract.go (1 hunks)
- v2/pkg/transparentupgradeableproxy.sol/transparentupgradeableproxy.go (1 hunks)
- v2/pkg/upgradeablebeacon.sol/upgradeablebeacon.go (1 hunks)
- v2/pkg/upgrades.sol/unsafeupgrades.go (1 hunks)
- v2/pkg/upgrades.sol/upgrades.go (1 hunks)
- v2/pkg/utils.sol/utils.go (1 hunks)
- v2/pkg/utils/strings.sol/strings.go (1 hunks)
- v2/pkg/versions.sol/versions.go (1 hunks)
- v2/pkg/wzeta.sol/weth9.go (1 hunks)
- v2/pkg/zeta.non-eth.sol/zetanoneth.go (1 hunks)
- v2/pkg/zetaconnectornative.sol/zetaconnectornative.go (1 hunks)
- v2/pkg/zetaconnectornonnative.sol/zetaconnectornonnative.go (1 hunks)
- v2/pkg/zrc20.sol/zrc20.go (1 hunks)
- v2/slither.config.json (1 hunks)
- v2/types/ERC20Custody.ts (19 hunks)
- v2/types/ERC20CustodyEchidnaTest.ts (19 hunks)
- v2/types/GatewayEVM.ts (18 hunks)
- v2/types/GatewayEVMEchidnaTest.ts (20 hunks)
- v2/types/GatewayEVMUpgradeTest.ts (22 hunks)
- v2/types/GatewayZEVM.ts (23 hunks)
- v2/types/IERC20Custody.sol/IERC20Custody.ts (1 hunks)
- v2/types/IERC20Custody.sol/IERC20CustodyEvents.ts (4 hunks)
- v2/types/IERC20Custody.sol/index.ts (1 hunks)
- v2/types/IGatewayEVM.sol/IGatewayEVM.ts (8 hunks)
- v2/types/IGatewayEVM.sol/IGatewayEVMEvents.ts (6 hunks)
- v2/types/IGatewayEVM.sol/index.ts (1 hunks)
- v2/types/IGatewayZEVM.sol/IGatewayZEVM.ts (13 hunks)
- v2/types/IGatewayZEVM.sol/IGatewayZEVMEvents.ts (5 hunks)
- v2/types/IReceiverEVM.sol/IReceiverEVMEvents.ts (3 hunks)
- v2/types/IZRC20.sol/IZRC20.ts (7 hunks)
- v2/types/IZRC20.sol/IZRC20Metadata.ts (7 hunks)
- v2/types/IZetaConnector.sol/IZetaConnectorEvents.ts (4 hunks)
- v2/types/ReceiverEVM.ts (6 hunks)
- v2/types/Revert.sol/Revertable.ts (1 hunks)
- v2/types/Revert.sol/index.ts (1 hunks)
- v2/types/SenderZEVM.ts (3 hunks)
- v2/types/TestUniversalContract.ts (1 hunks)
- v2/types/UniversalContract.sol/UniversalContract.ts (1 hunks)
- v2/types/UniversalContract.sol/ZContract.ts (1 hunks)
- v2/types/UniversalContract.sol/index.ts (1 hunks)
- v2/types/ZRC20.sol/ZRC20.ts (5 hunks)
- v2/types/ZetaConnectorBase.ts (14 hunks)
- v2/types/ZetaConnectorNative.ts (14 hunks)
- v2/types/ZetaConnectorNonNative.ts (14 hunks)
- v2/types/factories/Address__factory.ts (1 hunks)
- v2/types/factories/BeaconProxy__factory.ts (1 hunks)
- v2/types/factories/ERC1967Proxy__factory.ts (1 hunks)
- v2/types/factories/ERC1967Utils__factory.ts (1 hunks)
- v2/types/factories/ERC20Custody__factory.ts (11 hunks)
- v2/types/factories/GatewayEVMUpgradeTest__factory.ts (17 hunks)
- v2/types/factories/GatewayEVM__factory.ts (14 hunks)
Files skipped from review due to trivial changes (4)
- v2/types/IERC20Custody.sol/index.ts
- v2/types/IGatewayEVM.sol/index.ts
- v2/types/Revert.sol/index.ts
- v2/types/UniversalContract.sol/index.ts
Additional context used
Biome
v2/types/Revert.sol/Revertable.ts
[error] 92-92: void is confusing outside a return type or a type parameter.
Unsafe fix: Use undefined instead.
(lint/suspicious/noConfusingVoidType)
[error] 104-104: void is confusing outside a return type or a type parameter.
Unsafe fix: Use undefined instead.
(lint/suspicious/noConfusingVoidType)
[error] 108-108: Don't use '{}' as a type.
Prefer explicitly define the object shape. '{}' means "any non-nullable value".
(lint/complexity/noBannedTypes)
v2/types/UniversalContract.sol/ZContract.ts
[error] 100-100: void is confusing outside a return type or a type parameter.
Unsafe fix: Use undefined instead.
(lint/suspicious/noConfusingVoidType)
[error] 117-117: void is confusing outside a return type or a type parameter.
Unsafe fix: Use undefined instead.
(lint/suspicious/noConfusingVoidType)
[error] 121-121: Don't use '{}' as a type.
Prefer explicitly define the object shape. '{}' means "any non-nullable value".
(lint/complexity/noBannedTypes)
v2/types/UniversalContract.sol/UniversalContract.ts
[error] 119-119: void is confusing outside a return type or a type parameter.
Unsafe fix: Use undefined instead.
(lint/suspicious/noConfusingVoidType)
[error] 125-125: void is confusing outside a return type or a type parameter.
Unsafe fix: Use undefined instead.
(lint/suspicious/noConfusingVoidType)
[error] 142-142: void is confusing outside a return type or a type parameter.
Unsafe fix: Use undefined instead.
(lint/suspicious/noConfusingVoidType)
[error] 149-149: void is confusing outside a return type or a type parameter.
Unsafe fix: Use undefined instead.
(lint/suspicious/noConfusingVoidType)
[error] 153-153: Don't use '{}' as a type.
Prefer explicitly define the object shape. '{}' means "any non-nullable value".
(lint/complexity/noBannedTypes)
v2/types/TestUniversalContract.ts
[error] 165-165: void is confusing outside a return type or a type parameter.
Unsafe fix: Use undefined instead.
(lint/suspicious/noConfusingVoidType)
[error] 171-171: void is confusing outside a return type or a type parameter.
Unsafe fix: Use undefined instead.
(lint/suspicious/noConfusingVoidType)
[error] 188-188: void is confusing outside a return type or a type parameter.
Unsafe fix: Use undefined instead.
(lint/suspicious/noConfusingVoidType)
[error] 195-195: void is confusing outside a return type or a type parameter.
Unsafe fix: Use undefined instead.
(lint/suspicious/noConfusingVoidType)
v2/types/ReceiverEVM.ts
[error] 260-260: void is confusing outside a return type or a type parameter.
Unsafe fix: Use undefined instead.
(lint/suspicious/noConfusingVoidType)
[error] 298-298: void is confusing outside a return type or a type parameter.
Unsafe fix: Use undefined instead.
(lint/suspicious/noConfusingVoidType)
v2/types/IERC20Custody.sol/IERC20Custody.ts
[error] 236-236: void is confusing outside a return type or a type parameter.
Unsafe fix: Use undefined instead.
(lint/suspicious/noConfusingVoidType)
[error] 247-247: void is confusing outside a return type or a type parameter.
Unsafe fix: Use undefined instead.
(lint/suspicious/noConfusingVoidType)
[error] 259-259: void is confusing outside a return type or a type parameter.
Unsafe fix: Use undefined instead.
(lint/suspicious/noConfusingVoidType)
[error] 274-274: void is confusing outside a return type or a type parameter.
Unsafe fix: Use undefined instead.
(lint/suspicious/noConfusingVoidType)
[error] 286-286: void is confusing outside a return type or a type parameter.
Unsafe fix: Use undefined instead.
(lint/suspicious/noConfusingVoidType)
[error] 299-299: void is confusing outside a return type or a type parameter.
Unsafe fix: Use undefined instead.
(lint/suspicious/noConfusingVoidType)
v2/types/IGatewayZEVM.sol/IGatewayZEVM.ts
[error] 388-388: void is confusing outside a return type or a type parameter.
Unsafe fix: Use undefined instead.
(lint/suspicious/noConfusingVoidType)
[error] 399-399: void is confusing outside a return type or a type parameter.
Unsafe fix: Use undefined instead.
(lint/suspicious/noConfusingVoidType)
[error] 410-410: void is confusing outside a return type or a type parameter.
Unsafe fix: Use undefined instead.
(lint/suspicious/noConfusingVoidType)
[error] 422-422: void is confusing outside a return type or a type parameter.
Unsafe fix: Use undefined instead.
(lint/suspicious/noConfusingVoidType)
[error] 526-526: void is confusing outside a return type or a type parameter.
Unsafe fix: Use undefined instead.
(lint/suspicious/noConfusingVoidType)
[error] 538-538: void is confusing outside a return type or a type parameter.
Unsafe fix: Use undefined instead.
(lint/suspicious/noConfusingVoidType)
[error] 550-550: void is confusing outside a return type or a type parameter.
Unsafe fix: Use undefined instead.
(lint/suspicious/noConfusingVoidType)
v2/types/IGatewayEVM.sol/IGatewayEVM.ts
[error] 337-337: void is confusing outside a return type or a type parameter.
Unsafe fix: Use undefined instead.
(lint/suspicious/noConfusingVoidType)
[error] 348-348: void is confusing outside a return type or a type parameter.
Unsafe fix: Use undefined instead.
(lint/suspicious/noConfusingVoidType)
[error] 354-354: void is confusing outside a return type or a type parameter.
Unsafe fix: Use undefined instead.
(lint/suspicious/noConfusingVoidType)
[error] 366-366: void is confusing outside a return type or a type parameter.
Unsafe fix: Use undefined instead.
(lint/suspicious/noConfusingVoidType)
[error] 376-376: void is confusing outside a return type or a type parameter.
Unsafe fix: Use undefined instead.
(lint/suspicious/noConfusingVoidType)
[error] 431-431: void is confusing outside a return type or a type parameter.
Unsafe fix: Use undefined instead.
(lint/suspicious/noConfusingVoidType)
[error] 443-443: void is confusing outside a return type or a type parameter.
Unsafe fix: Use undefined instead.
(lint/suspicious/noConfusingVoidType)
[error] 450-450: void is confusing outside a return type or a type parameter.
Unsafe fix: Use undefined instead.
(lint/suspicious/noConfusingVoidType)
[error] 463-463: void is confusing outside a return type or a type parameter.
Unsafe fix: Use undefined instead.
(lint/suspicious/noConfusingVoidType)
[error] 474-474: void is confusing outside a return type or a type parameter.
Unsafe fix: Use undefined instead.
(lint/suspicious/noConfusingVoidType)
[error] 517-517: void is confusing outside a return type or a type parameter.
Unsafe fix: Use undefined instead.
(lint/suspicious/noConfusingVoidType)
v2/types/ERC20Custody.ts
[error] 475-475: void is confusing outside a return type or a type parameter.
Unsafe fix: Use undefined instead.
(lint/suspicious/noConfusingVoidType)
[error] 477-477: void is confusing outside a return type or a type parameter.
Unsafe fix: Use undefined instead.
(lint/suspicious/noConfusingVoidType)
[error] 483-483: void is confusing outside a return type or a type parameter.
Unsafe fix: Use undefined instead.
(lint/suspicious/noConfusingVoidType)
[error] 574-574: void is confusing outside a return type or a type parameter.
Unsafe fix: Use undefined instead.
(lint/suspicious/noConfusingVoidType)
[error] 577-577: void is confusing outside a return type or a type parameter.
Unsafe fix: Use undefined instead.
(lint/suspicious/noConfusingVoidType)
[error] 585-585: void is confusing outside a return type or a type parameter.
Unsafe fix: Use undefined instead.
(lint/suspicious/noConfusingVoidType)
v2/types/ERC20CustodyEchidnaTest.ts
[error] 506-506: void is confusing outside a return type or a type parameter.
Unsafe fix: Use undefined instead.
(lint/suspicious/noConfusingVoidType)
[error] 508-508: void is confusing outside a return type or a type parameter.
Unsafe fix: Use undefined instead.
(lint/suspicious/noConfusingVoidType)
[error] 514-514: void is confusing outside a return type or a type parameter.
Unsafe fix: Use undefined instead.
(lint/suspicious/noConfusingVoidType)
[error] 618-618: void is confusing outside a return type or a type parameter.
Unsafe fix: Use undefined instead.
(lint/suspicious/noConfusingVoidType)
[error] 621-621: void is confusing outside a return type or a type parameter.
Unsafe fix: Use undefined instead.
(lint/suspicious/noConfusingVoidType)
[error] 629-629: void is confusing outside a return type or a type parameter.
Unsafe fix: Use undefined instead.
(lint/suspicious/noConfusingVoidType)
v2/types/GatewayZEVM.ts
[error] 693-693: void is confusing outside a return type or a type parameter.
Unsafe fix: Use undefined instead.
(lint/suspicious/noConfusingVoidType)
[error] 704-704: void is confusing outside a return type or a type parameter.
Unsafe fix: Use undefined instead.
(lint/suspicious/noConfusingVoidType)
[error] 716-716: void is confusing outside a return type or a type parameter.
Unsafe fix: Use undefined instead.
(lint/suspicious/noConfusingVoidType)
v2/types/GatewayEVM.ts
[error] 613-613: void is confusing outside a return type or a type parameter.
Unsafe fix: Use undefined instead.
(lint/suspicious/noConfusingVoidType)
[error] 626-626: void is confusing outside a return type or a type parameter.
Unsafe fix: Use undefined instead.
(lint/suspicious/noConfusingVoidType)
[error] 632-632: void is confusing outside a return type or a type parameter.
Unsafe fix: Use undefined instead.
(lint/suspicious/noConfusingVoidType)
[error] 644-644: void is confusing outside a return type or a type parameter.
Unsafe fix: Use undefined instead.
(lint/suspicious/noConfusingVoidType)
[error] 654-654: void is confusing outside a return type or a type parameter.
Unsafe fix: Use undefined instead.
(lint/suspicious/noConfusingVoidType)
[error] 794-794: void is confusing outside a return type or a type parameter.
Unsafe fix: Use undefined instead.
(lint/suspicious/noConfusingVoidType)
[error] 809-809: void is confusing outside a return type or a type parameter.
Unsafe fix: Use undefined instead.
(lint/suspicious/noConfusingVoidType)
[error] 816-816: void is confusing outside a return type or a type parameter.
Unsafe fix: Use undefined instead.
(lint/suspicious/noConfusingVoidType)
v2/types/GatewayEVMUpgradeTest.ts
[error] 632-632: void is confusing outside a return type or a type parameter.
Unsafe fix: Use undefined instead.
(lint/suspicious/noConfusingVoidType)
[error] 645-645: void is confusing outside a return type or a type parameter.
Unsafe fix: Use undefined instead.
(lint/suspicious/noConfusingVoidType)
[error] 651-651: void is confusing outside a return type or a type parameter.
Unsafe fix: Use undefined instead.
(lint/suspicious/noConfusingVoidType)
[error] 663-663: void is confusing outside a return type or a type parameter.
Unsafe fix: Use undefined instead.
(lint/suspicious/noConfusingVoidType)
[error] 673-673: void is confusing outside a return type or a type parameter.
Unsafe fix: Use undefined instead.
(lint/suspicious/noConfusingVoidType)
[error] 756-756: void is confusing outside a return type or a type parameter.
Unsafe fix: Use undefined instead.
(lint/suspicious/noConfusingVoidType)
[error] 813-813: void is confusing outside a return type or a type parameter.
Unsafe fix: Use undefined instead.
(lint/suspicious/noConfusingVoidType)
[error] 828-828: void is confusing outside a return type or a type parameter.
Unsafe fix: Use undefined instead.
(lint/suspicious/noConfusingVoidType)
[error] 835-835: void is confusing outside a return type or a type parameter.
Unsafe fix: Use undefined instead.
(lint/suspicious/noConfusingVoidType)
v2/types/GatewayEVMEchidnaTest.ts
[error] 634-634: void is confusing outside a return type or a type parameter.
Unsafe fix: Use undefined instead.
(lint/suspicious/noConfusingVoidType)
[error] 647-647: void is confusing outside a return type or a type parameter.
Unsafe fix: Use undefined instead.
(lint/suspicious/noConfusingVoidType)
[error] 653-653: void is confusing outside a return type or a type parameter.
Unsafe fix: Use undefined instead.
(lint/suspicious/noConfusingVoidType)
[error] 665-665: void is confusing outside a return type or a type parameter.
Unsafe fix: Use undefined instead.
(lint/suspicious/noConfusingVoidType)
[error] 675-675: void is confusing outside a return type or a type parameter.
Unsafe fix: Use undefined instead.
(lint/suspicious/noConfusingVoidType)
[error] 825-825: void is confusing outside a return type or a type parameter.
Unsafe fix: Use undefined instead.
(lint/suspicious/noConfusingVoidType)
[error] 840-840: void is confusing outside a return type or a type parameter.
Unsafe fix: Use undefined instead.
(lint/suspicious/noConfusingVoidType)
Gitleaks
v2/types/IGatewayEVM.sol/IGatewayEVM.ts
543-543: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.
(generic-api-key)
Additional comments not posted (205)
v2/slither.config.json (1)
3-3
: Change Approved: Includecontracts
infilter_paths
.Including the
contracts
directory in thefilter_paths
for Slither analysis is a positive change, as it allows for comprehensive static analysis of the contract files.v2/foundry.toml (1)
2-2
: Change Approved: Update source directory and remappings.The updates to the source directory and remappings are necessary to reflect the new directory structure, ensuring the build system functions correctly.
Also applies to: 8-8
v2/package.json (1)
8-8
: Change Approved: Addcontracts
to package files.Adding the
contracts
directory to thefiles
array ensures that contract files are included in the package, aligning with the project's restructuring.v2/types/factories/Address__factory.ts (1)
45-45
: Verify the impact of bytecode changes.The bytecode has been updated, indicating a change in the contract's logic or deployment parameters. Ensure that this change aligns with the intended functionality and that all dependent systems are compatible with this update.
v2/types/factories/ERC1967Utils__factory.ts (1)
101-101
: Review the impact of the bytecode change.The bytecode has been updated, which could affect the contract's functionality upon deployment. Ensure that this change aligns with the intended behavior and that any dependent systems are tested accordingly.
v2/types/SenderZEVM.ts (2)
31-31
: Verify the parameter type change inencodeFunctionData
.The parameter type for
callReceiver
has changed fromBigNumberish
toAddressLike
. Ensure that all calls to this function are updated to use the new type and that the logic aligns with this change.
103-103
: Update references tocallReceiver
with new parameter type.The
callReceiver
method now expectsAddressLike
instead ofBigNumberish
for the second parameter. Verify that all usages of this method are updated accordingly.Also applies to: 136-136
v2/types/factories/ERC1967Proxy__factory.ts (1)
89-89
: Verify the impact of the bytecode change.The updated bytecode indicates a change in the contract's implementation. Ensure that any systems depending on this contract are tested and updated to reflect these changes.
Verification successful
Bytecode change appears to have no immediate impact on the codebase. The
ERC1967Proxy__factory
is defined and exported but not actively used within the repository. Ensure that any external systems or future developments relying on this factory are tested to accommodate the bytecode change.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the impact of the bytecode change in the repository. # Test: Search for the usage of ERC1967Proxy__factory to ensure all dependent systems are updated. rg --type ts 'ERC1967Proxy__factory'Length of output: 1112
Script:
#!/bin/bash # Broader search for any indirect references or documentation mentioning ERC1967Proxy__factory rg 'ERC1967Proxy__factory'Length of output: 1102
v2/types/IGatewayZEVM.sol/IGatewayZEVMEvents.ts (3)
Line range hint
75-107
:
Ensure correct usage of renamedWithdrawnEvent
.The renaming of
WithdrawalEvent
toWithdrawnEvent
should be reflected in all parts of the codebase. Verify that all references are updated accordingly.Verification successful
Renaming Verified:
WithdrawnEvent
is Consistently Used Across the CodebaseThe renaming of
WithdrawalEvent
toWithdrawnEvent
has been successfully reflected in all relevant parts of the codebase. The search results show consistent usage ofWithdrawnEvent
across multiple files, indicating that the update was applied correctly.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the usage of WithdrawnEvent in the repository. # Test: Search for the usage of WithdrawnEvent to ensure all references are updated. rg --type ts 'WithdrawnEvent'Length of output: 17296
47-67
: Ensure correct usage of renamedCalledEvent
.The renaming of
CallEvent
toCalledEvent
should be reflected in all parts of the codebase. Verify that all references are updated accordingly.Verification successful
Renaming of
CallEvent
toCalledEvent
is consistent across the codebase.The search confirmed that there are no remaining references to
CallEvent
in the TypeScript files, indicating that all necessary updates have been made.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the usage of CalledEvent in the repository. # Test: Search for the usage of CalledEvent to ensure all references are updated. rg --type ts 'CalledEvent'Length of output: 25078
Script:
#!/bin/bash # Description: Search for any remaining instances of CallEvent in the TypeScript files to ensure all references have been updated. # Test: Search for the usage of CallEvent to ensure there are no outdated references. rg --type ts 'CallEvent'Length of output: 24
24-29
: Verify the usage ofRevertOptionsStruct
.The new
RevertOptionsStruct
enhances error handling. Ensure that this structure is utilized correctly in the contract logic and tests.v2/types/IZetaConnector.sol/IZetaConnectorEvents.ts (4)
76-93
: Ensure correct usage of renamedWithdrawnAndRevertedEvent
.The renaming of
WithdrawAndRevertEvent
toWithdrawnAndRevertedEvent
should be reflected in all parts of the codebase. Verify that all references are updated accordingly.Verification successful
Renaming of
WithdrawAndRevertEvent
toWithdrawnAndRevertedEvent
is consistent across the codebase. The search results confirm that all references to the event have been updated to the new name. No further action is required.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the usage of WithdrawnAndRevertedEvent in the repository. # Test: Search for the usage of WithdrawnAndRevertedEvent to ensure all references are updated. rg --type ts 'WithdrawnAndRevertedEvent'Length of output: 13976
Line range hint
58-73
:
Ensure correct usage of renamedWithdrawnAndCalledEvent
.The renaming of
WithdrawAndCallEvent
toWithdrawnAndCalledEvent
should be reflected in all parts of the codebase. Verify that all references are updated accordingly.Verification successful
Renaming Verified:
WithdrawnAndCalledEvent
is consistently used across the codebase. The renaming fromWithdrawAndCallEvent
toWithdrawnAndCalledEvent
has been correctly reflected in all relevant files. No further action is required.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the usage of WithdrawnAndCalledEvent in the repository. # Test: Search for the usage of WithdrawnAndCalledEvent to ensure all references are updated. rg --type ts 'WithdrawnAndCalledEvent'Length of output: 13654
Line range hint
45-55
:
Ensure correct usage of renamedWithdrawnEvent
.The renaming of
WithdrawEvent
toWithdrawnEvent
should be reflected in all parts of the codebase. Verify that all references are updated accordingly.Verification successful
All references to
WithdrawEvent
have been successfully updated toWithdrawnEvent
. No instances ofWithdrawEvent
were found in the codebase, indicating that the renaming has been correctly applied throughout.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the usage of WithdrawnEvent in the repository. # Test: Search for the usage of WithdrawnEvent to ensure all references are updated. rg --type ts 'WithdrawnEvent'Length of output: 17296
Script:
#!/bin/bash # Description: Check for any remaining usage of WithdrawEvent in the repository. # Test: Search for the usage of WithdrawEvent to ensure all references are updated to WithdrawnEvent. rg --type ts 'WithdrawEvent'Length of output: 28
24-28
: Verify the usage ofRevertContextStruct
.The new
RevertContextStruct
enhances error handling. Ensure that this structure is utilized correctly in the contract logic and tests.Verification successful
RevertContextStruct Usage Verified
The
RevertContextStruct
is extensively used across various TypeScript files, including test files. It is integrated into function parameters, output tuples, and event definitions, indicating its role in contract logic and testing. The structure appears to be utilized correctly in the repository.
- Files with Usage:
v2/typechain-types/TestUniversalContract.ts
v2/types/ERC20CustodyEchidnaTest.ts
v2/types/TestUniversalContract.ts
v2/types/GatewayEVMEchidnaTest.ts
v2/types/GatewayEVMUpgradeTest.ts
v2/types/TestZContract.ts
The usage in test files suggests that it is part of the testing logic, ensuring its functionality is verified. No issues found with its integration.
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the usage of RevertContextStruct in the repository. # Test: Search for the usage of RevertContextStruct to ensure it is used correctly. rg --type ts 'RevertContextStruct'Length of output: 27205
Script:
#!/bin/bash # Description: Search for function definitions and error handling using RevertContextStruct. # Search for function definitions using RevertContextStruct rg --type ts 'function .*RevertContextStruct' -A 3 # Search for RevertContextStruct used in error handling rg --type ts 'catch.*RevertContextStruct' -A 3Length of output: 101
Script:
#!/bin/bash # Description: Search for broader usage of RevertContextStruct within function bodies. # Search for RevertContextStruct usage within function bodies rg --type ts 'RevertContextStruct' -A 5Length of output: 129086
Script:
#!/bin/bash # Description: Search for RevertContextStruct usage in test files, focusing on assertions and error handling. # Search for RevertContextStruct in test files rg --type ts 'RevertContextStruct' -g '*Test*.ts' -A 5Length of output: 29590
v2/types/factories/BeaconProxy__factory.ts (1)
100-100
: Verify the compatibility of the new bytecode.The updated bytecode may affect the deployment behavior or functionality of the
BeaconProxy
. Ensure that the new bytecode is compatible with existing systems and has been thoroughly tested.v2/types/IZRC20.sol/IZRC20.ts (1)
Line range hint
27-39
:
LGTM! The changes enhance gas management functionality.The introduction of
withdrawGasFeeWithGasLimit
andGAS_LIMIT
methods provides more control over gas fee calculations, improving the interface's functionality.Also applies to: 84-87, 113-116, 210-214, 220-222, 280-282
v2/pkg/math.sol/math.go (1)
35-35
: Verify the impact of the binary change.The
Bin
field ofMathMetaData
has been updated. Ensure that this change aligns with the intended functionality and does not introduce any unintended effects during contract deployment or interaction.v2/pkg/utils.sol/utils.go (1)
35-35
: Verify the impact of the binary change.The
Bin
field ofUtilsMetaData
has been updated. Ensure that this change aligns with the intended functionality and does not introduce any unintended effects during contract deployment or interaction.v2/pkg/console.sol/console.go (1)
35-35
: Verify the impact of the binary change.The
Bin
field ofConsoleMetaData
has been updated. Ensure that this change aligns with the intended functionality and does not introduce any unintended effects during contract deployment or interaction.v2/pkg/stdjson.sol/stdjson.go (1)
35-35
: Update toBin
field acknowledged.The
Bin
field ofStdJsonMetaData
has been updated. Ensure that this change has been tested to confirm that the contract behaves as expected after deployment.v2/pkg/stdmath.sol/stdmath.go (1)
35-35
: Update toBin
field acknowledged.The
Bin
field ofStdMathMetaData
has been updated. Ensure that this change has been tested to confirm that the contract behaves as expected after deployment.v2/pkg/stdtoml.sol/stdtoml.go (1)
35-35
: Update toBin
field acknowledged.The
Bin
field ofStdTomlMetaData
has been updated. Ensure that this change has been tested to confirm that the contract behaves as expected after deployment.v2/pkg/strings.sol/strings.go (1)
35-35
: Verify the impact of the binary change.The
Bin
field inStringsMetaData
has been updated, which may affect the contract's deployment or execution. Ensure that the updated binary is tested and verified against the expected behavior.v2/types/IZRC20.sol/IZRC20Metadata.ts (3)
122-125
: Check decoding logic forwithdrawGasFeeWithGasLimit
.The
decodeFunctionResult
method forwithdrawGasFeeWithGasLimit
is newly added. Ensure that the decoding logic is correctly implemented and tested.
Line range hint
27-42
:
Verify the integration ofGAS_LIMIT
andwithdrawGasFeeWithGasLimit
.The
GAS_LIMIT
andwithdrawGasFeeWithGasLimit
functionalities are newly introduced. Ensure that these methods are correctly integrated and tested within the codebase.
90-93
: EnsurewithdrawGasFeeWithGasLimit
is tested.The
encodeFunctionData
method forwithdrawGasFeeWithGasLimit
has been added. Verify that this functionality is covered by tests.v2/pkg/defender.sol/defender.go (1)
35-35
: Verify the impact of the binary change.The
Bin
field inDefenderMetaData
has been updated, which may affect the contract's deployment or execution. Ensure that the updated binary is tested and verified against the expected behavior.Verification successful
Binary Change Impact Verified
The updated binary in
DefenderMetaData
is only present inv2/pkg/defender.sol/defender.go
and is not referenced elsewhere in the codebase. This indicates that the change is localized and does not affect other parts of the system.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the impact of the updated binary in DefenderMetaData. # Test: Check for references to the old binary in the codebase. Expect: No occurrences of the old binary. rg --type go '0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea264697066735822122071decadba9982b71efa62e44ef373011f9c46ae76088f1bd44581a0818f88a3e64736f6c634300081a0033'Length of output: 625
Script:
#!/bin/bash # Description: Search for any references or usage of the updated binary in the codebase. # Test: Check for occurrences of the updated binary in the codebase. rg '0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea264697066735822122071decadba9982b71efa62e44ef373011f9c46ae76088f1bd44581a0818f88a3e64736f6c634300081a0033'Length of output: 615
v2/pkg/stdstyle.sol/stdstyle.go (1)
35-35
: Verify the impact of the updated binary representation.The
Bin
field inStdStyleMetaData
has been updated. Ensure that this change aligns with the intended contract functionality and specifications. This update may affect deployment or execution.v2/pkg/upgrades.sol/upgrades.go (1)
35-35
: Verify the impact of the updated binary representation.The
Bin
field inUpgradesMetaData
has been updated. Ensure that this change aligns with the intended contract functionality and specifications. This update may affect deployment or execution.Verification successful
No immediate impact from the updated binary representation. The
UpgradesMetaData.Bin
is only referenced in deprecated variables and is not used in any deployment or execution scripts. Ensure future implementations useUpgradesMetaData.Bin
directly to prevent potential issues.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the impact of the updated binary representation in UpgradesMetaData. # Test: Search for UpgradesMetaData usage to ensure compatibility with the updated binary. rg --type go 'UpgradesMetaData'Length of output: 1409
Script:
#!/bin/bash # Search for usage of UpgradesMetaData.Bin in Go files to check for deployment or execution impact. rg --type go 'UpgradesMetaData\.Bin'Length of output: 372
v2/pkg/versions.sol/versions.go (1)
35-35
: Verify the impact of the updated binary representation.The
Bin
field inVersionsMetaData
has been updated. Ensure that this change aligns with the intended contract functionality and specifications. This update may affect deployment or execution.Verification successful
The impact of the updated binary representation is localized. The
VersionsMetaData
variable, including itsBin
field, is only used withinv2/pkg/versions.sol/versions.go
. There are no external dependencies or usages in other parts of the codebase, so the impact of the change is confined to this file. Ensure that any deployment or execution logic within this file is compatible with the updated binary.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the impact of the updated binary representation in VersionsMetaData. # Test: Search for VersionsMetaData usage to ensure compatibility with the updated binary. rg --type go 'VersionsMetaData'Length of output: 663
Script:
#!/bin/bash # Search for all usages of VersionsMetaData across the codebase to verify its impact. rg 'VersionsMetaData'Length of output: 653
v2/pkg/utils/strings.sol/strings.go (2)
35-35
: LGTM! The bytecode update is approved.The changes to the
Bin
field inStringsMetaData
are approved.
35-35
: Verify the correctness of the updated bytecode.The
Bin
field inStringsMetaData
has been updated. Ensure that this new bytecode aligns with the intended functionality of the contract.v2/types/IGatewayEVM.sol/IGatewayEVMEvents.ts (12)
24-29
: Review the newRevertOptionsStruct
.The
RevertOptionsStruct
provides additional parameters for revert handling. Ensure that these fields are correctly implemented and used.
31-41
: Review the newRevertOptionsStructOutput
.This output type mirrors
RevertOptionsStruct
and ensures correct type mapping for event outputs.
43-47
: Review the newRevertContextStruct
.The
RevertContextStruct
adds context to revert events. Verify its integration into the event handling logic.
49-53
: Review the newRevertContextStructOutput
.Ensure that this output type correctly maps the fields of
RevertContextStruct
for event outputs.
66-83
: Review the updatedCalledEvent
namespace.The event now includes
revertOptions
. Ensure this change is consistent with the intended functionality.
91-114
: Review the updatedDepositedEvent
namespace.The event now includes
revertOptions
. Verify that this addition aligns with the intended contract behavior.
168-185
: Review the updatedRevertedEvent
namespace.The event now includes
revertContext
. Ensure this change is consistent with the intended functionality.
241-245
: Verify thegetEvent
method forCalled
.Ensure that the method signature and implementation are consistent with the new
CalledEvent
structure.
248-252
: Verify thegetEvent
method forDeposited
.Ensure that the method signature and implementation are consistent with the new
DepositedEvent
structure.
277-285
: Verify the event filter forCalled
.Ensure that the filter is consistent with the updated event definition.
288-296
: Verify the event filter forDeposited
.Ensure that the filter is consistent with the updated event definition.
321-321
: Verify the event filter forReverted
.Ensure that the filter is consistent with the updated event definition.
v2/pkg/signedmath.sol/signedmath.go (2)
35-35
: LGTM! The bytecode update is approved.The changes to the
Bin
field inSignedMathMetaData
are approved.
35-35
: Verify the correctness of the updated bytecode.The
Bin
field inSignedMathMetaData
has been updated. Ensure that this new bytecode aligns with the intended functionality of the contract.v2/pkg/stdstorage.sol/stdstorage.go (1)
35-35
: Verify the correctness of the updated binary data.The
Bin
field ofStdStorageMetaData
has been updated. Ensure that the new binary representation is correct and aligns with the intended functionality of theStdStorage
contract.v2/pkg/address.sol/address.go (1)
35-35
: Verify the correctness of the updated binary data.The
Bin
field ofAddressMetaData
has been updated. Ensure that the new binary representation is correct and aligns with the intended functionality of theAddress
contract.v2/pkg/safeconsole.sol/safeconsole.go (1)
35-35
: Verify the correctness of the updated binary data.The
Bin
field ofSafeconsoleMetaData
has been updated. Ensure that the new binary representation is correct and aligns with the intended functionality of theSafeconsole
contract.v2/pkg/storageslot.sol/storageslot.go (1)
35-35
: Verify the impact of the updated binary representation.The
Bin
field ofStorageSlotMetaData
has been updated. Ensure that this change is compatible with existing systems and does not introduce any unexpected behavior.Verification successful
Impact of Updated Binary Representation is Localized
The updated binary representation in
StorageSlotMetaData.Bin
is used only withinv2/pkg/storageslot.sol/storageslot.go
for deploying contracts. No other parts of the codebase rely on this binary, indicating that the impact is localized to this file. Ensure that any tests related to contract deployment are updated to reflect this change.
- File:
v2/pkg/storageslot.sol/storageslot.go
- Usage: Deployment of contracts using
bind.DeployContract
.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the impact of the updated binary representation in StorageSlotMetaData. # Test: Check for usage of StorageSlotMetaData in the codebase to ensure compatibility. rg --type go 'StorageSlotMetaData'Length of output: 747
Script:
#!/bin/bash # Search for other usages of StorageSlotBin and StorageSlotMetaData.Bin across the codebase. rg --type go 'StorageSlotBin' rg --type go 'StorageSlotMetaData.Bin'Length of output: 584
v2/pkg/safeerc20.sol/safeerc20.go (1)
35-35
: Verify the impact of the updated binary representation.The
Bin
field ofSafeERC20MetaData
has been updated. Ensure that this change is compatible with existing systems and does not introduce any unexpected behavior.v2/pkg/upgrades.sol/unsafeupgrades.go (1)
35-35
: Verify the impact of the updated binary representation.The
Bin
field ofUnsafeUpgradesMetaData
has been updated. Ensure that this change is compatible with existing systems and does not introduce any unexpected behavior.v2/pkg/defenderdeploy.sol/defenderdeploy.go (1)
35-35
: Bytecode Update: Verify Deployment Impact.The
Bin
field inDefenderDeployMetaData
has been updated, reflecting a change in the contract's bytecode. Ensure that this update is compatible with existing deployments and verify any changes in the contract's behavior.v2/types/ReceiverEVM.ts (5)
26-30
: New Type Definition:RevertContextStruct
.The introduction of
RevertContextStruct
enhances the handling of revert contexts by providing structured data. This is a positive addition for clarity and debugging.
32-36
: New Type Definition:RevertContextStructOutput
.The
RevertContextStructOutput
type complements the input struct, ensuring consistent handling of revert context data in outputs.
197-207
: UpdateReceivedRevertEvent
Namespace.The event now includes
RevertContextStruct
, which provides more detailed context during reverts. This is a beneficial change for event handling.
414-417
: Update Event Signature forReceivedRevert
.The event signature now uses
tuple
, reflecting the structured data approach. Ensure that event listeners are updated to handle this new format.
58-61
: UpdateencodeFunctionData
Method.The method now accepts
RevertContextStruct
, aligning with the new structured approach for handling revert scenarios. Ensure that all calls to this function are updated accordingly.v2/types/IERC20Custody.sol/IERC20Custody.ts (1)
1-394
: New File:IERC20Custody
Type Definitions.This file introduces detailed type definitions and methods for handling ERC20 custody operations. It provides a robust structure for interacting with the contract.
Tools
Biome
[error] 236-236: void is confusing outside a return type or a type parameter.
Unsafe fix: Use undefined instead.
(lint/suspicious/noConfusingVoidType)
[error] 247-247: void is confusing outside a return type or a type parameter.
Unsafe fix: Use undefined instead.
(lint/suspicious/noConfusingVoidType)
[error] 259-259: void is confusing outside a return type or a type parameter.
Unsafe fix: Use undefined instead.
(lint/suspicious/noConfusingVoidType)
[error] 274-274: void is confusing outside a return type or a type parameter.
Unsafe fix: Use undefined instead.
(lint/suspicious/noConfusingVoidType)
[error] 286-286: void is confusing outside a return type or a type parameter.
Unsafe fix: Use undefined instead.
(lint/suspicious/noConfusingVoidType)
[error] 299-299: void is confusing outside a return type or a type parameter.
Unsafe fix: Use undefined instead.
(lint/suspicious/noConfusingVoidType)
v2/pkg/beaconproxy.sol/beaconproxy.go (1)
35-35
: Verify the updated bytecode.The
Bin
field inBeaconProxyMetaData
has been updated. Ensure that this change is consistent with the contract's ABI and intended functionality.v2/pkg/senderzevm.sol/senderzevm.go (1)
35-35
: Verify the updated ABI and bytecode.The
ABI
andBin
fields inSenderZEVMMetaData
have been updated. Ensure that these changes are consistent with the contract's intended functionality and that the ABI matches the latest contract interface.v2/types/ZetaConnectorBase.ts (2)
43-43
: Verify event renaming and role addition.The events have been renamed and
TSS_ROLE
has been added. Ensure that these changes are reflected in all relevant parts of the codebase and that the new role is correctly integrated.Also applies to: 69-71, 129-135, 269-317, 372-373, 444-445, 463-465, 590-608
Verification successful
Event Renaming and Role Addition Verified Successfully
The events have been renamed and the
TSS_ROLE
has been added and integrated consistently across the codebase. This includes their presence in type definitions, contract factories, and tests, confirming thorough integration.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the event renaming and the addition of `TSS_ROLE`. # Test: Ensure the new event names and role are used consistently across the codebase. # Expect: The new names and role should be referenced in all relevant functions and documentation. rg --type ts 'Withdrawn|WithdrawnAndCalled|WithdrawnAndReverted|TSS_ROLE'Length of output: 75792
26-36
: Verify the newRevertContextStruct
.The
RevertContextStruct
has been added to encapsulate revert information. Ensure that this struct is used consistently across the contract's functions and events.Verification successful
Consistent Usage of
RevertContextStruct
VerifiedThe
RevertContextStruct
is consistently used across functions and events in the codebase. The struct is referenced in function signatures and events in various files, ensuring its intended encapsulation of revert information is maintained.
- Files where
RevertContextStruct
is used include:
v2/types/ZetaConnectorBase.ts
v2/types/GatewayEVM.ts
v2/types/ZetaConnectorNonNative.ts
v2/types/ReceiverEVM.ts
- And others as indicated in the search results.
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the usage of the new `RevertContextStruct`. # Test: Ensure the struct is used consistently in function signatures and events. # Expect: The struct should be referenced in relevant functions and events. rg --type ts 'RevertContextStruct' -A 5Length of output: 129086
v2/types/ZetaConnectorNative.ts (2)
26-36
: Addition ofRevertContextStruct
is well-structured.The new
RevertContextStruct
andRevertContextStructOutput
types are well-defined and enhance the clarity of the data being handled in revert scenarios.
43-43
: Interface updates are consistent and enhance functionality.The inclusion of
TSS_ROLE
and the renaming of events and function signatures improve the interface's role management and event handling capabilities.Ensure that the new role and event names are correctly used throughout the codebase.
Also applies to: 69-71, 82-82, 129-135, 147-147, 269-317, 372-372, 444-445, 463-465, 544-545, 590-608, 667-697
Verification successful
Verification of
TSS_ROLE
and event names is successful.The
TSS_ROLE
and the updated event names (Withdrawn
,WithdrawnAndCalled
,WithdrawnAndReverted
) are consistently used across multiple files in the codebase, indicating that the changes have been properly integrated.
TSS_ROLE
is found in several files, includingZetaConnectorNative.ts
,ZetaConnectorNonNative.ts
, and others.- The event names are also used in various files, reflecting their integration into the event handling logic.
These findings confirm that the changes have been correctly applied throughout the codebase.
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the usage of `TSS_ROLE` and updated event names. # Test: Search for the usage of `TSS_ROLE`. Expect: Occurrences of the new role. rg --type typescript 'TSS_ROLE' # Test: Search for the usage of updated event names. Expect: Occurrences of the new event names. rg --type typescript 'Withdrawn|WithdrawnAndCalled|WithdrawnAndReverted'Length of output: 176
Script:
#!/bin/bash # Description: Verify the usage of `TSS_ROLE` and updated event names. # Test: Search for the usage of `TSS_ROLE`. Expect: Occurrences of the new role. rg --glob '*.ts' 'TSS_ROLE' # Test: Search for the usage of updated event names. Expect: Occurrences of the new event names. rg --glob '*.ts' 'Withdrawn|WithdrawnAndCalled|WithdrawnAndReverted'Length of output: 75815
v2/pkg/stdstorage.sol/stdstoragesafe.go (1)
35-35
: Update toStdStorageSafeMetaData.Bin
requires verification.The change in the
Bin
field suggests an update in the contract's bytecode. Verify that the new bytecode aligns with the intended functionality and does not introduce any issues.v2/pkg/stderror.sol/stderror.go (1)
35-35
: Update toStdErrorMetaData.Bin
requires verification.The change in the
Bin
field suggests an update in the contract's bytecode. Verify that the new bytecode aligns with the intended functionality and does not introduce any issues.v2/types/ZRC20.sol/ZRC20.ts (4)
53-53
: Integration ofwithdrawGasFeeWithGasLimit
looks consistent.The addition of
withdrawGasFeeWithGasLimit
to thegetFunction
method maintains consistency with the existing pattern of function declarations.
143-146
: Encoding forwithdrawGasFeeWithGasLimit
is correctly integrated.The
encodeFunctionData
method forwithdrawGasFeeWithGasLimit
follows the existing pattern, ensuring proper encoding.
205-208
: Decoding forwithdrawGasFeeWithGasLimit
is correctly integrated.The
decodeFunctionResult
method forwithdrawGasFeeWithGasLimit
follows the existing pattern, ensuring proper decoding.
472-476
: Addition ofwithdrawGasFeeWithGasLimit
is consistent with existing methods.The
withdrawGasFeeWithGasLimit
method is correctly added to theZRC20
interface, maintaining consistency with other contract methods.v2/types/ZetaConnectorNonNative.ts (6)
26-30
: Definition ofRevertContextStruct
is well-structured.The
RevertContextStruct
is correctly defined to encapsulate asset, amount, and revertMessage, providing a comprehensive context for reverts.
32-36
: Definition ofRevertContextStructOutput
is well-structured.The
RevertContextStructOutput
provides a clear tuple representation of theRevertContextStruct
, ensuring consistency in data handling.
43-43
: Integration ofTSS_ROLE
ingetFunction
is consistent.The addition of
TSS_ROLE
to thegetFunction
method maintains consistency with the existing pattern of role declarations.
137-143
: Encoding forwithdrawAndRevert
withRevertContextStruct
is correctly integrated.The
encodeFunctionData
method forwithdrawAndRevert
correctly includesRevertContextStruct
, following the existing encoding pattern.
Line range hint
294-299
:
Event renaming is consistent with new functionality.The renaming of events to
WithdrawnEvent
,WithdrawnAndCalledEvent
, andWithdrawnAndRevertedEvent
aligns with the updated withdrawal logic and provides clearer semantics.Also applies to: 307-311, 325-342
397-398
: Definition ofTSS_ROLE
is well-integrated.The addition of
TSS_ROLE
as a role in the interface is consistent with the existing role definitions and integrates well with the contract's role management.v2/types/ERC20Custody.ts (8)
26-30
: Definition ofRevertContextStruct
is well-structured.The
RevertContextStruct
is correctly defined to encapsulate asset, amount, and revertMessage, providing a comprehensive context for reverts.
32-36
: Definition ofRevertContextStructOutput
is well-structured.The
RevertContextStructOutput
provides a clear tuple representation of theRevertContextStruct
, ensuring consistency in data handling.
Line range hint
43-57
:
Integration ofWHITELISTER_ROLE
and whitelisting functions is consistent.The addition of
WHITELISTER_ROLE
and functionsunwhitelist
,whitelist
, andwhitelisted
to thegetFunction
method maintains consistency with the existing pattern of function declarations.
143-149
: Encoding forwithdrawAndRevert
withRevertContextStruct
is correctly integrated.The
encodeFunctionData
method forwithdrawAndRevert
correctly includesRevertContextStruct
, following the existing encoding pattern.
289-299
: Event renaming is consistent with new functionality.The renaming of events to
UnwhitelistedEvent
,WhitelistedEvent
,WithdrawnEvent
,WithdrawnAndCalledEvent
, andWithdrawnAndRevertedEvent
aligns with the updated withdrawal logic and provides clearer semantics.Also applies to: 301-311, 313-376
431-432
: Definition ofWHITELISTER_ROLE
is well-integrated.The addition of
WHITELISTER_ROLE
as a role in the interface is consistent with the existing role definitions and integrates well with the contract's role management.
475-480
: Whitelisting functions are well-integrated.The
unwhitelist
,whitelist
, andwhitelisted
functions are correctly added, providing necessary functionality for managing the whitelist status of tokens.Tools
Biome
[error] 475-475: void is confusing outside a return type or a type parameter.
Unsafe fix: Use undefined instead.
(lint/suspicious/noConfusingVoidType)
[error] 477-477: void is confusing outside a return type or a type parameter.
Unsafe fix: Use undefined instead.
(lint/suspicious/noConfusingVoidType)
Line range hint
482-504
:
Withdrawal functions are well-integrated.The
withdraw
,withdrawAndCall
, andwithdrawAndRevert
functions are correctly updated, maintaining consistency with the existing contract method patterns.Tools
Biome
[error] 473-473: void is confusing outside a return type or a type parameter.
Unsafe fix: Use undefined instead.
(lint/suspicious/noConfusingVoidType)
[error] 475-475: void is confusing outside a return type or a type parameter.
Unsafe fix: Use undefined instead.
(lint/suspicious/noConfusingVoidType)
[error] 477-477: void is confusing outside a return type or a type parameter.
Unsafe fix: Use undefined instead.
(lint/suspicious/noConfusingVoidType)
[error] 483-483: void is confusing outside a return type or a type parameter.
Unsafe fix: Use undefined instead.
(lint/suspicious/noConfusingVoidType)
v2/types/ERC20CustodyEchidnaTest.ts (10)
26-30
: RevertContextStruct type definition is well-structured.The new type
RevertContextStruct
is correctly defined and will aid in handling revert contexts effectively.
32-36
: RevertContextStructOutput type definition is accurate.The new type
RevertContextStructOutput
is correctly defined and ensures proper mapping of output data.
133-144
: New encodeFunctionData methods are consistent.The added methods for
unwhitelist
,whitelist
, andwhitelisted
follow the existing pattern and are correctly implemented for encoding function data.
208-216
: New decodeFunctionResult methods are consistent.The added methods for
unwhitelist
,whitelist
, andwhitelisted
follow the existing pattern and are correctly implemented for decoding function results.
310-320
: UnwhitelistedEvent namespace is well-defined.The
UnwhitelistedEvent
namespace is correctly structured, providing necessary input and output definitions for the event.
322-332
: WhitelistedEvent namespace is well-defined.The
WhitelistedEvent
namespace is correctly structured, providing necessary input and output definitions for the event.
Line range hint
334-347
: WithdrawnEvent namespace is well-defined.The
WithdrawnEvent
namespace is correctly structured, providing necessary input and output definitions for the event.
Line range hint
352-366
: WithdrawnAndCalledEvent namespace is well-defined.The
WithdrawnAndCalledEvent
namespace is correctly structured, providing necessary input and output definitions for the event.
377-398
: WithdrawnAndRevertedEvent namespace is well-defined.The
WithdrawnAndRevertedEvent
namespace is correctly structured, providing necessary input and output definitions for the event, including theRevertContextStruct
.
Line range hint
37-77
: Interface updates enhance functionality and clarity.The updates to
ERC20CustodyEchidnaTestInterface
add valuable functionalities for asset management and event handling. The naming conventions are consistent and improve clarity.Ensure that all new functions and events are correctly implemented and used throughout the codebase.
Verification successful
Interface and Event Usage Verified
The new functions and events (
unwhitelist
,whitelist
,whitelisted
,Withdrawn
,WithdrawnAndCalled
,WithdrawnAndReverted
) are properly implemented and used throughout the codebase. The search results confirm their presence in multiple files, indicating they are integrated into the system as expected.
- Files with Usage:
v2/types/ERC20CustodyEchidnaTest.ts
v2/types/ERC20Custody.ts
v1/test/ERC20Custody.spec.ts
- Other related files in the
v2/types
andv1/typechain-types
directoriesThese updates enhance the interface's functionality and event handling capabilities, aligning with the intended improvements.
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the usage of new functions and events in the codebase. # Test: Search for the new functions and events. Expect: Proper implementation and usage. rg --type typescript -A 5 $'unwhitelist|whitelist|whitelisted|Withdrawn|WithdrawnAndCalled|WithdrawnAndReverted'Length of output: 148
Script:
#!/bin/bash # Description: Verify the usage of new functions and events in the codebase. # Test: Search for the new functions and events. Expect: Proper implementation and usage. rg --type ts -A 5 $'unwhitelist|whitelist|whitelisted|Withdrawn|WithdrawnAndCalled|WithdrawnAndReverted'Length of output: 213819
v2/pkg/erc1967utils.sol/erc1967utils.go (1)
35-35
: Verify the impact of the updated Bin value.The
Bin
value inERC1967UtilsMetaData
has been updated, indicating changes in the contract's bytecode. Ensure that this update aligns with the intended changes and does not introduce any unintended issues.v2/pkg/proxyadmin.sol/proxyadmin.go (1)
35-35
: Verify the impact of the updated Bin value.The
Bin
value inProxyAdminMetaData
has been updated, indicating changes in the contract's bytecode. Ensure that this update aligns with the intended changes and does not introduce any unintended issues.v2/types/factories/ERC20Custody__factory.ts (9)
67-79
: Addition ofWHITELISTER_ROLE
function.The function
WHITELISTER_ROLE
is a view function that returns abytes32
role identifier. This addition is consistent with role-based access control patterns.
262-274
: Addition ofwhitelist
function.The
whitelist
function is a non-payable function to add a token address to the whitelist. Ensure that this function is tested for various scenarios, including already whitelisted tokens.Verification successful
Test cases for
whitelist
function are present. The repository contains test functions such astestWhitelist
,testWhitelistFailsIfSenderIsNotWhitelister
, andtestWhitelistFailsIfZeroAddress
, which cover various scenarios for thewhitelist
function. These tests should ensure the function's behavior is correctly validated.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the presence of test cases for the `whitelist` function. # Test: Search for test cases related to `whitelist`. Expect: Test cases should be present. rg --type go 'whitelist'Length of output: 111010
296-307
: Modification ofwithdraw
function.The
withdraw
function now accepts both ato
address and atoken
address, indicating a shift in its operational logic. Ensure that all existing usages of this function are updated to match the new signature.Verification successful
Verification of
withdraw
function usage is successful. Thewithdraw
function has been updated to accept both ato
address and atoken
address, and the usages in the codebase reflect this change.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify all function calls to `withdraw` match the new signature. # Test: Search for the function usage. Expect: Only occurrences of the new signature. rg --type go 'withdraw'Length of output: 164500
277-293
: Addition ofwhitelisted
function.The
whitelisted
function is a view function that checks if a given address is whitelisted, returning a boolean value. This function should be tested for both true and false scenarios.
251-261
: Addition ofunwhitelist
function.The
unwhitelist
function is a non-payable function that allows removing a token address from the whitelist. Ensure that this function is adequately tested to handle edge cases such as non-existent tokens.Verification successful
The
unwhitelist
function is adequately tested. The function is covered in test files such asv2/test/ERC20Custody.t.sol
andv1/test/ERC20Custody.spec.ts
, ensuring its functionality is verified.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the presence of test cases for the `unwhitelist` function. # Test: Search for test cases related to `unwhitelist`. Expect: Test cases should be present. rg --type go 'unwhitelist'Length of output: 27190
Script:
#!/bin/bash # Search for test files that might contain tests for ERC20 custody operations. fd --type f --name '*test*' | xargs rg 'unwhitelist'Length of output: 31720
498-508
: Addition ofUnwhitelisted
event.The
Unwhitelisted
event is emitted when a token is removed from the whitelist. Ensure that this event is correctly emitted and tested in the contract logic.Verification successful
Unwhitelisted Event Emission Verified
The
Unwhitelisted
event is correctly emitted in the contract logic. Here are the locations where the event is emitted:
v2/contracts/evm/ERC20Custody.sol
:emit Unwhitelisted(token);
v2/test/ERC20Custody.t.sol
:emit Unwhitelisted(address(token));
v1/contracts/evm/ERC20Custody.sol
:emit Unwhitelisted(asset);
Ensure that these emissions are adequately tested to confirm their correct behavior in the contract logic.
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the emission of `Unwhitelisted` event in the contract logic. # Test: Search for the emission of `Unwhitelisted` event. Expect: Proper emission in relevant scenarios. rg --type go 'Unwhitelisted'Length of output: 97609
Script:
#!/bin/bash # Description: Search for the emission of the `Unwhitelisted` event in Solidity files. # Test: Search for the `emit Unwhitelisted` statement. Expect: Proper emission in relevant scenarios. rg --type solidity 'emit Unwhitelisted'Length of output: 74
Script:
#!/bin/bash # Description: Search for the emission of the `Unwhitelisted` event in Solidity files. # Test: Search for the `emit Unwhitelisted` statement in `.sol` files. Expect: Proper emission in relevant scenarios. rg 'emit Unwhitelisted' --glob '*.sol'Length of output: 249
691-694
: Addition ofNotWhitelisted
error.The
NotWhitelisted
error is introduced to signal attempts to interact with tokens that are not whitelisted. Ensure that this error is properly handled and tested in the contract logic.Verification successful
NotWhitelisted
Error Handling VerifiedThe
NotWhitelisted
error is properly handled in the Solidity contracts. The error is thrown in several places within theERC20Custody.sol
contract when a token is not whitelisted. Additionally, there are tests in place that expect this error to be reverted in scenarios where a non-whitelisted token is involved. This confirms that the error is both handled and tested appropriately in the contract logic.
Files with
NotWhitelisted
error handling:
v2/contracts/evm/ERC20Custody.sol
v1/contracts/evm/ERC20Custody.sol
Tests verifying
NotWhitelisted
error:
v2/test/ERC20Custody.t.sol
v2/test/GatewayEVM.t.sol
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the handling of `NotWhitelisted` error in the contract logic. # Test: Search for the usage of `NotWhitelisted` error. Expect: Proper handling in relevant scenarios. rg --type go 'NotWhitelisted'Length of output: 226386
Script:
#!/bin/bash # Description: Search for the handling of `NotWhitelisted` error in Solidity files. # Search for the `NotWhitelisted` error being thrown or handled in Solidity files. rg --type solidity 'NotWhitelisted'Length of output: 68
Script:
#!/bin/bash # Description: Search for the handling of `NotWhitelisted` error in Solidity files using file extension. # Correctly search for the `NotWhitelisted` error being thrown or handled in Solidity files. rg 'NotWhitelisted' --glob '*.sol'Length of output: 2152
370-389
: Introduction ofRevertContext
tuple.The
RevertContext
tuple structure adds complexity to error handling mechanisms. Ensure that this structure is correctly utilized and tested in the contract logic.
510-521
: Addition ofWhitelisted
event.The
Whitelisted
event is emitted when a token is added to the whitelist. Ensure that this event is correctly emitted and tested in the contract logic.v2/pkg/testuniversalcontract.sol/testuniversalcontract.go (1)
49-49
: Update toBin
field inTestUniversalContractMetaData
.The complete replacement of the binary data indicates substantial changes to the contract's logic or functionality. Ensure that these changes are thoroughly tested and validated.
v2/pkg/upgradeablebeacon.sol/upgradeablebeacon.go (1)
35-35
: Update toBin
field inUpgradeableBeaconMetaData
.The change in the binary data indicates updates to the contract's implementation. Ensure that these changes are thoroughly tested and validated.
v2/types/GatewayZEVM.ts (3)
26-31
: Well-definedRevertOptionsStruct
.The addition of
RevertOptionsStruct
enhances error handling by encapsulating revert parameters effectively.
58-60
: UpdatedRevertContextStruct
for asset management.The changes to
RevertContextStruct
align with the focus on asset management during revert scenarios, improving clarity and functionality.
95-98
: Enhanced error handling inGatewayZEVMInterface
.The inclusion of
RevertOptionsStruct
in method signatures improves error handling. Event renaming enhances clarity.Ensure that all usage of these methods in the codebase is updated to match the new signatures.
Also applies to: 104-112
v2/pkg/transparentupgradeableproxy.sol/transparentupgradeableproxy.go (1)
35-35
: Updated ABI and Bin fields inTransparentUpgradeableProxyMetaData
.The changes indicate significant updates to the contract's functionality. Ensure compatibility with existing integrations.
Verify that the updated ABI and bytecode are compatible with current deployments and integrations.
v2/types/GatewayEVM.ts (3)
26-31
: Well-definedRevertOptionsStruct
.The addition of
RevertOptionsStruct
enhances error handling by encapsulating revert parameters effectively.
45-49
: NewRevertContextStruct
for asset management.The addition of
RevertContextStruct
focuses on asset management during revert scenarios, improving clarity and functionality.
67-70
: Enhanced error handling inGatewayEVMInterface
.The inclusion of
RevertOptionsStruct
andRevertContextStruct
in method signatures improves error handling. Event renaming enhances clarity.Ensure that all usage of these methods in the codebase is updated to match the new signatures.
Also applies to: 96-97
v2/types/GatewayEVMUpgradeTest.ts (6)
26-31
: Addition ofRevertOptionsStruct
is well-structured.This new struct effectively encapsulates parameters for handling revert scenarios.
33-43
: Addition ofRevertOptionsStructOutput
is consistent and appropriate.The output struct mirrors the input struct, ensuring consistency in data handling.
45-49
: Addition ofRevertContextStruct
is well-structured.This new struct effectively encapsulates parameters for managing execution contexts during reverts.
51-55
: Addition ofRevertContextStructOutput
is consistent and appropriate.The output struct mirrors the input struct, ensuring consistency in data handling.
Line range hint
56-96
: Interface changes enhance functionality.The inclusion of
RevertOptionsStruct
andRevertContextStruct
in function signatures enhances the interface's capabilities. However, consider usingundefined
instead ofvoid
for parameter types, as suggested by static analysis tools.- [void] + [undefined]Also applies to: 130-161, 195-201
96-97
: Event name changes improve clarity.Renaming events from
Call
toCalled
andDeposit
toDeposited
aligns with the new structure definitions and enhances clarity.v2/types/GatewayEVMEchidnaTest.ts (6)
26-31
: Addition ofRevertOptionsStruct
is well-structured.This new struct effectively encapsulates parameters for handling revert scenarios.
33-43
: Addition ofRevertOptionsStructOutput
is consistent and appropriate.The output struct mirrors the input struct, ensuring consistency in data handling.
45-49
: Addition ofRevertContextStruct
is well-structured.This new struct effectively encapsulates parameters for managing execution contexts during reverts.
51-55
: Addition ofRevertContextStructOutput
is consistent and appropriate.The output struct mirrors the input struct, ensuring consistency in data handling.
Line range hint
56-99
: Interface changes enhance functionality.The inclusion of
RevertOptionsStruct
andRevertContextStruct
in function signatures enhances the interface's capabilities. However, consider usingundefined
instead ofvoid
for parameter types, as suggested by static analysis tools.- [void] + [undefined]Also applies to: 132-167, 201-207
99-100
: Event name changes improve clarity.Renaming events from
Call
toCalled
andDeposit
toDeposited
aligns with the new structure definitions and enhances clarity.v2/pkg/testerc20.sol/testerc20.go (1)
35-35
: Verify contract deployment and interaction.The
Bin
data has been updated. Ensure that the contract deployment and interactions are tested to confirm that the changes are consistent with the ABI updates and do not introduce unintended behavior.v2/pkg/mockerc20.sol/mockerc20.go (1)
35-35
: Verify the impact of ABI and binary updates.The ABI and binary data for
MockERC20MetaData
have been updated. Ensure that these changes are reflected in the contract's functionality and that any integration points are updated accordingly.v2/pkg/wzeta.sol/weth9.go (1)
35-35
: Verify the impact of binary updates.The binary data for
WETH9MetaData
has been updated. Ensure that the new bytecode is correctly deployed and that any applications interacting with this contract are compatible with the changes.Verification successful
Binary update for
WETH9MetaData
verified.The update to the binary data for
WETH9MetaData
does not introduce any issues, as the ABI remains unchanged and all references in the codebase are consistent. Ensure that the new bytecode is correctly deployed in your environment.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the usage of updated binary data in the codebase. # Test: Search for `WETH9MetaData` usage. Expect: Ensure all references are updated. rg --type go -A 5 $'WETH9MetaData'Length of output: 42634
v2/types/factories/GatewayEVM__factory.ts (10)
1212-1215
: AddNotWhitelistedInCustody
error.The
NotWhitelistedInCustody
error provides a specific error scenario. Verify its correct integration and usage in the contract logic.
Line range hint
792-851
: AugmentDeposited
event withrevertOptions
.The inclusion of
revertOptions
in theDeposited
event enhances the detail of revert information. Verify consistency with other contract parts.
99-125
: Enhance revert handling withrevertOptions
.The addition of
revertOptions
to thecall
function improves error handling by providing structured revert scenarios. Ensure that the implementation correctly handles all components.
257-283
: Transition torevertOptions
indepositAndCall
.The inclusion of
revertOptions
indepositAndCall
replaces thepayload
parameter, enhancing error handling. Verify that the transition is correctly implemented.
Line range hint
942-987
: IntegraterevertContext
intoReverted
event.The
revertContext
in theReverted
event provides detailed revert information, improving transparency. Verify consistency with other contract parts.
1141-1144
: IntroduceConnectorInitialized
error.The
ConnectorInitialized
error provides a specific error scenario. Verify its correct integration and usage in the contract logic.
162-188
: IntegraterevertOptions
for enhanced deposit error handling.The addition of
revertOptions
to thedeposit
function allows for more comprehensive error management. Verify that all components are correctly utilized.
371-392
: ImplementrevertContext
for detailed revert handling inexecuteRevert
.The
revertContext
structure provides detailed information for handling reverts in theexecuteRevert
function. Verify that all components are correctly implemented.
Line range hint
739-786
: EnhanceCalled
event withrevertOptions
.Including
revertOptions
in theCalled
event provides detailed information about revert scenarios, improving transparency. Verify consistency with other contract parts.
1256-1256
: Update bytecode for contract logic changes.The bytecode update reflects changes in the contract logic. Verify that the deployment process uses the updated bytecode.
#!/bin/bash # Description: Verify the deployment process uses the updated bytecode. # Test: Search for the deployment process using the updated bytecode. rg --type ts -A 5 $'const _bytecode = "0x60a06040523060805234801561001457600080fd5b5061001d610022565b6100d4565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805468010000000000000000900460ff16156100725760405163f92ee8a960e01b815260040160405180910390fd5b80546001600160401b03908116146100d15780546001600160401b0319166001600160401b0390811782556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50565b6080516136da6100fd60003960008181611f3d01528181611f6601526123f201526136da6000f3fe6080604052600436106101e35760003560e01c8063616e877a11610102578063ae7a3a6f11610095578063dda79b7511610064578063dda79b751461063b578063e63ab1e91461065b578063f7ad60db1461068f578063fc93baef146106a257600080fd5b8063ae7a3a6f146105bb578063c0c53b8b146105db578063d0b492c3146105fb578063d547741f1461061b57600080fd5b806391d14854116100d157806391d14854146104c4578063a217fddf14610529578063a783c7891461053e578063ad3cb1cc1461057257600080fd5b8063616e877a1461045c57806370f23f881461047c5780638456cb591461048f578063870de27a146104a457600080fd5b806345ac7a8d1161017a57806357bec62f1161014957806357bec62f146103b15780635b112591146103d15780635c975abb146103f15780635d62c8601461042857600080fd5b806345ac7a8d146103495780634f1ef286146103695780635131ab591461037c57806352d1902d1461039c57600080fd5b8063248a9ca3116101b6578063248a9ca3146102975780632f2ff15d146102f457806336568abe146103145780633f4ba83a1461033457600080fd5b806301ffc9a7146101e857806310188aef1461021d5780631cff79cd1461023f57806321e093b11461025f575b600080fd5b3480156101f457600080fd5b50610208610203366004612d1f565b6106b5565b60405190151581526020015b60405180910390f35b34801561022957600080fd5b5061023d610238366004612d7d565b61074e565b005b61025261024d366004612de1565b610842565b6040516102149190612ea2565b34801561026b57600080fd5b5060035461027f906001600160a01b031681565b6040516001600160a01b039091168152602001610214565b3480156102a357600080fd5b506102e66102b2366004612eb5565b60009081527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b626800602052604090206001015490565b604051908152602001610214565b34801561030057600080fd5b5061023d61030f366004612ece565b610945565b34801561032057600080fd5b5061023d61032f366004612ece565b61098f565b34801561034057600080fd5b5061023d6109e0565b34801561035557600080fd5b5061023d610364366004612f12565b610a15565b61023d610377366004612fc0565b610add565b34801561038857600080fd5b5061023d6103973660046130c7565b610afc565b3480156103a857600080fd5b506102e6610e15565b3480156103bd57600080fd5b5060025461027f906001600160a01b031681565b3480156103dd57600080fd5b5060015461027f906001600160a01b031681565b3480156103fd57600080fd5b507fcd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f033005460ff16610208565b34801561043457600080fd5b506102e67f584a0b16e9f616d90ccec14a0b852c19aceccfd3d60699398a57dce2b0de01b981565b34801561046857600080fd5b5061023d610477366004613136565b610e44565b61023d61048a366004613186565b610f20565b34801561049b57600080fd5b5061023d6110b1565b3480156104b057600080fd5b5061023d6104bf3660046131d4565b6110e3565b3480156104d057600080fd5b506102086104df366004612ece565b60009182527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b626800602090815260408084206001600160a01b0393909316845291905290205460ff1690565b34801561053557600080fd5b506102e6600081565b34801561054a57600080fd5b506102e67f0da06bffcb63442de88b7f8385468eaf51e47079d4fa96875938e2c27c451deb81565b34801561057e57600080fd5b506102526040518060400160405280600581526020017f352e302e3000000000000000000000000000000000000000000000000000000081525081565b3480156105c757600080fd5b5061023d6105d6366004612d7d565b6111f4565b3480156105e757600080fd5b5061023d6105f636600461326c565b6112e8565b34801561060757600080fd5b5061023d6106163660046132c1565b61159d565b34801561062757600080fd5b5061023d610636366004612ece565b61175f565b34801561064757600080fd5b5060005461027f906001600160a01b031681565b34801561066757600080fd5b506102e67f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a81565b61023d61069d36600461334c565b6117a3565b61023d6106b0366004612f12565b6119a4565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f7965db0b00000000000000000000000000000000000000000000000000000000148061074857507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b92915050565b600061075981611b39565b6001600160a01b038216610799576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002546001600160a01b0316156107dc576040517f0c8dc01600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6108067f584a0b16e9f616d90ccec14a0b852c19aceccfd3d60699398a57dce2b0de01b983611b43565b5050600280547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0392909216919091179055565b60607f0da06bffcb63442de88b7f8385468eaf51e47079d4fa96875938e2c27c451deb61086e81611b39565b610876611c30565b61087e611c8e565b6001600160a01b0385166108be576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006108cb868686611d0f565b9050856001600160a01b03167fcaf938de11c367272220bfd1d2baa99ca46665e7bc4d85f00adb51b90fe1fa9f34878760405161090a93929190613408565b60405180910390a2915061093d60017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b509392505050565b60008281527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b626800602052604090206001015461097f81611b39565b6109898383611b43565b50505050565b6001600160a01b03811633146109d1576040517f6697b23200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6109db8282611dde565b505050565b7f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a610a0a81611b39565b610a12611ea2565b50565b610a1d611c30565b610a25611c8e565b6001600160a01b038416610a65576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b836001600160a01b0316336001600160a01b03167f6bbdf224569c498ef04873202299f2d405bf840a265c83e83880a614ba2ae113858585604051610aac939291906134fb565b60405180910390a361098960017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b610ae5611f32565b610aee82612002565b610af8828261200d565b5050565b7f584a0b16e9f616d90ccec14a0b852c19aceccfd3d60699398a57dce2b0de01b9610b2681611b39565b610b2e611c30565b610b36611c8e565b83600003610b70576040517f951e19ed00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b038516610bb0576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610bba8686612131565b610bf0576040517f8164f84200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040517f095ea7b30000000000000000000000000000000000000000000000000000000081526001600160a01b0386811660048301526024820186905287169063095ea7b3906044016020604051808303816000875af1158015610c58573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c7c9190613521565b610cb2576040517f8164f84200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610cbd858484611d0f565b50610cc88686612131565b610cfe576040517f8164f84200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201526000906001600160a01b038816906370a0823190602401602060405180830381865afa158015610d5e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d82919061353e565b90508015610d9457610d9487826121c1565b856001600160a01b0316876001600160a01b03167f29c40793bffd84cb810179f15d1ceec72bc7f0785514c668ba36645cf99b7382878787604051610ddb93929190613408565b60405180910390a350610e0d60017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b505050505050565b6000610e1f6123e7565b507f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc90565b610e4c611c30565b610e54611c8e565b82600003610e8e576040517f951e19ed00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b038416610ece576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610ed9338385612449565b836001600160a01b0316336001600160a01b03167f752904df36dfc0b907cefa45c2d12c3f9dc7aced58ce8d1182a9a4bb33cefedd858585604051610aac93929190613557565b610f28611c30565b610f30611c8e565b34600003610f6a576040517f7671265e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b038216610faa576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001546040516000916001600160a01b03169034908381818185875af1925050503d8060008114610ff7576040519150601f19603f3d011682016040523d82523d6000602084013e610ffc565b606091505b5050905080611037576040517f79cacff100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b826001600160a01b0316336001600160a01b03167f752904df36dfc0b907cefa45c2d12c3f9dc7aced58ce8d1182a9a4bb33cefedd3460008660405161107f93929190613557565b60405180910390a350610af860017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b7f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a6110db81611b39565b610a12612686565b6110eb611c30565b6110f3611c8e565b8460000361112d576040517f951e19ed00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b03861661116d576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611178338587612449565b856001600160a01b0316336001600160a01b03167f752904df36dfc0b907cefa45c2d12c3f9dc7aced58ce8d1182a9a4bb33cefedd87878787876040516111c395949392919061358d565b60405180910390a3610e0d60017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b60006111ff81611b39565b6001600160a01b03821661123f576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000546001600160a01b031615611282576040517fb337f37800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6112ac7f584a0b16e9f616d90ccec14a0b852c19aceccfd3d60699398a57dce2b0de01b983611b43565b5050600080547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0392909216919091179055565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805468010000000000000000810460ff16159067ffffffffffffffff166000811580156113335750825b905060008267ffffffffffffffff1660011480156113505750303b155b90508115801561135e575080155b15611395576040517ff92ee8a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b84547fffffffffffffffffffffffffffffffffffffffffffffffff000000000000000016600117855583156113f65784547fffffffffffffffffffffffffffffffffffffffffffffff00ffffffffffffffff16680100000000000000001785555b6001600160a01b038816158061141357506001600160a01b038716155b1561144a576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6114526126ff565b61145a612707565b6114626126ff565b61146a612717565b611475600087611b43565b506114a07f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a87611b43565b50600180547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b038a161790556114fe7f0da06bffcb63442de88b7f8385468eaf51e47079d4fa96875938e2c27c451deb89611b43565b50600380547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b03891617905583156115935784547fffffffffffffffffffffffffffffffffffffffffffffff00ffffffffffffffff168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b5050505050505050565b7f584a0b16e9f616d90ccec14a0b852c19aceccfd3d60699398a57dce2b0de01b96115c781611b39565b6115cf611c30565b6115d7611c8e565b84600003611611576040517f951e19ed00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b038616611651576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6116656001600160a01b0388168787612727565b6040517f660b9de000000 </blockquote></details> <details> <summary>v2/types/factories/GatewayEVMUpgradeTest__factory.ts (6)</summary><blockquote> `102-127`: **Enhance error handling with `revertOptions`.** The addition of the `revertOptions` parameter in the `call` function improves error management by allowing more detailed handling of revert scenarios. Ensure that this change is consistently applied across the codebase and that any related logic is updated accordingly. --- `165-190`: **Integrate `revertOptions` for improved error handling.** The `revertOptions` parameter in the `deposit` function provides enhanced control over revert scenarios. Ensure that this parameter is used effectively in the function's logic and that related documentation is updated to reflect this change. --- `260-285`: **Adopt `revertOptions` for consistent error management.** The `revertOptions` parameter in the `depositAndCall` function aligns with the enhanced error handling approach. Verify that this change is consistently applied and that any necessary updates to related logic are made. --- Line range hint `742-788`: **Include `revertOptions` in `Called` event for enhanced tracking.** The `revertOptions` parameter in the `Called` event enables tracking of revert scenarios. Ensure that any event listeners or handlers are updated to process this additional information. --- Line range hint `795-853`: **Enhance `Deposited` event with `revertOptions`.** The `revertOptions` parameter in the `Deposited` event supports tracking of revert scenarios during deposit operations. Ensure that any systems processing this event are equipped to handle the new parameter. --- `1168-1171`: **Introduce new error types for expanded error handling.** The new error types `ConnectorInitialized` and `NotWhitelistedInCustody` enhance the contract's ability to handle specific error scenarios. Ensure that these errors are properly integrated into the contract logic and that any necessary handling mechanisms are implemented. Also applies to: 1240-1242 </blockquote></details> <details> <summary>v2/pkg/mockerc721.sol/mockerc721.go (1)</summary><blockquote> `35-35`: **Verify ABI and Binary Consistency.** The ABI and binary representation have been updated. Ensure these changes align with the intended contract functionality and are thoroughly tested. </blockquote></details> <details> <summary>v2/pkg/systemcontractmock.sol/systemcontractmock.go (1)</summary><blockquote> `35-35`: **Review the updated contract bytecode.** The `Bin` field of `SystemContractMockMetaData` has been updated, suggesting changes in the contract's logic. Ensure that these changes are thoroughly tested and reviewed for correctness and security implications. <details> <summary>Verification successful</summary> --- <!-- [monologue] [task review_file_1/1] Continue reviewing file `systemcontractmock.go`. [observations] The shell script output shows that the `SystemContractMockMetaData.Bin` field is referenced in two files, indicating that the bytecode is used consistently across different versions or locations of the contract. [analysis] The presence of the `SystemContractMockMetaData.Bin` in multiple files suggests that the bytecode update is intended to be a consistent change across different parts of the codebase. The deprecation notice indicates a transition to using `SystemContractMockMetaData.Bin` directly. This consistency reduces the risk of discrepancies in contract deployment. [actions] Since the update appears consistent and intentional, conclude the review by confirming that the bytecode change is verified and consistent across the codebase. --> **Bytecode Update Verified and Consistent Across Codebase** The `SystemContractMockMetaData.Bin` field update is consistently referenced across multiple files, ensuring that the bytecode change is uniformly applied. This consistency helps maintain reliability in contract deployment. Ensure that the updated bytecode has been thoroughly tested for correctness and security. </details> <details> <summary>Scripts executed</summary> The following scripts were executed for the analysis: Script: ```shell #!/bin/bash # Description: Verify the updated contract bytecode and ensure it aligns with expected changes. # Test: Check for the presence of the updated bytecode in the repository. rg --type go 'SystemContractMockMetaData.*Bin' -A 5Length of output: 2029
v2/pkg/systemcontract.sol/systemcontract.go (3)
Line range hint
629-633
:
Verify Event Handling forSetConnectorZEVM
.The
SetConnectorZEVM
event has been added to the ABI. Ensure that the event is correctly emitted in the Solidity contract and that the Go bindings handle it appropriately. Verify that the event parsing and subscription mechanisms are correctly implemented.Verification successful
Event Handling for
SetConnectorZEVM
VerifiedThe
SetConnectorZEVM
event is properly emitted in the Solidity contracts and is handled in the Go bindings. The Go code includes functions for filtering, watching, and parsing this event, ensuring that it is processed correctly. No issues were found with the event handling implementation.
- Event emission confirmed in:
v2/test/utils/SystemContract.sol
v1/contracts/zevm/SystemContract.sol
- Go bindings for event handling found in:
v1/pkg/contracts/zevm/systemcontract.sol/systemcontract.go
v2/pkg/systemcontract.sol/systemcontract.go
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the `SetConnectorZEVM` event handling. # Test: Search for the `SetConnectorZEVM` event emission in the Solidity contract. # Expect: The event is emitted in the appropriate contract functions. rg --type solidity -A 5 $'event SetConnectorZEVM'Length of output: 83
Script:
#!/bin/bash # Description: Verify the `SetConnectorZEVM` event handling. # Test: Search for the `SetConnectorZEVM` event emission in the Solidity contract. # Expect: The event is emitted in the appropriate contract functions. rg --type-add 'solidity:*.sol' --type solidity -A 5 'event SetConnectorZEVM'Length of output: 913
Script:
#!/bin/bash # Description: Check for the emission of the `SetConnectorZEVM` event in the Solidity contracts. # Test: Search for the `SetConnectorZEVM` event emission in the identified Solidity files. # Expect: The event is emitted in the appropriate contract functions. rg --type-add 'solidity:*.sol' --type solidity -A 5 'emit SetConnectorZEVM' v2/test/utils/SystemContract.sol v1/contracts/zevm/SystemContract.solLength of output: 490
Script:
#!/bin/bash # Description: Verify the Go bindings for handling the `SetConnectorZEVM` event. # Test: Search for the handling of the `SetConnectorZEVM` event in the Go bindings. # Expect: The event is parsed and handled correctly in the Go code. rg 'SetConnectorZEVM' --type goLength of output: 21742
42-42
: Review ABI Changes for Consistency and Completeness.The ABI string has been significantly updated with new functions, events, and error types. Ensure that these changes are consistent with the contract's intended functionality and that they are fully integrated into the system. Verify that:
- New functions like
setGasCoinZRC20
,setGasPrice
, andsetGasZetaPool
are correctly defined and implemented.- Events such as
SetConnectorZEVM
andSetGasCoin
are properly emitted and handled.- Error types like
CallerIsNotFungibleModule
are effectively used to manage contract interactions.Consider reviewing the corresponding Solidity contract to ensure these changes are accurately reflected.
Line range hint
169-173
:
Ensure Correctness of Function Implementations.The
DepositAndCall
function has been updated to reflect changes in the ABI. Verify that the function parameters and return types align with the Solidity contract. Ensure that theZContext
struct is correctly defined and used in the function call.Verification successful
The
DepositAndCall
Function Implementation is Correct.The Go implementation of the
DepositAndCall
function insystemcontract.go
correctly reflects the Solidity contract's function signature. The parameters and types are consistent, ensuring proper interaction with the contract. No issues found.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the `DepositAndCall` function implementation. # Test: Search for the `DepositAndCall` function definition in the Solidity contract. # Expect: The function signature matches the Go binding. rg --type solidity -A 5 $'function depositAndCall'Length of output: 84
Script:
#!/bin/bash # Description: Verify the `DepositAndCall` function implementation. # Correct the file type for Solidity and search for the `DepositAndCall` function definition. rg --type-add 'solidity:*.sol' --type solidity -A 5 $'function depositAndCall'Length of output: 4848
Script:
#!/bin/bash # Description: Locate and verify the `DepositAndCall` function implementation in Go. # Search for the `DepositAndCall` function definition in the Go file. ast-grep --lang go --pattern 'func DepositAndCall($_, $_, $_, $_, $_) $_ { $$$ }'Length of output: 83
Script:
#!/bin/bash # Description: Search for occurrences of `depositAndCall` in Go files to identify related functions or comments. # Use ripgrep to search for `depositAndCall` in Go files. rg 'depositAndCall' --type go -A 5Length of output: 299675
v2/pkg/zeta.non-eth.sol/zetanoneth.go (2)
34-35
: Verify ABI compatibility with existing integrations.The ABI changes might affect existing integrations. Ensure that dependent systems are compatible with the updated contract interface.
Verification successful
Check for usage of deprecated variables and update documentation.
The transition to
ZetaNonEthMetaData.ABI
andBin
suggests a move towards standardization. Ensure that all references to deprecated variablesZetaNonEthABI
andZetaNonEthBin
are updated in the codebase and documentation.
Remove deprecated variables and update documentation.
The deprecated variables
ZetaNonEthABI
andZetaNonEthBin
are still present in the codebase, although they are assigned from the newZetaNonEthMetaData
structure. Consider removing these deprecated variables if they are no longer needed for backward compatibility. Additionally, ensure that the documentation is updated to reflect the transition to usingZetaNonEthMetaData.ABI
andBin
.
- Codebase: Remove or refactor the usage of
ZetaNonEthABI
andZetaNonEthBin
inv1
andv2
directories.- Documentation: Ensure that any references to these deprecated variables are updated or removed.
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify ABI compatibility with existing integrations. # Test: Search for the ABI usage. Expect: Ensure compatibility with existing systems. rg --type go -A 5 'ZetaNonEthMetaData\.ABI'Length of output: 1210
Script:
#!/bin/bash # Search for the usage of deprecated variables `ZetaNonEthABI` and `ZetaNonEthBin` in the codebase. rg --type go 'ZetaNonEthABI|ZetaNonEthBin'Length of output: 1234
Script:
#!/bin/bash # Check for references to deprecated variables in documentation files. rg 'ZetaNonEthABI|ZetaNonEthBin' --type mdLength of output: 44
35-35
: Verify the impact of binary representation changes.The binary changes may affect the contract's behavior. Ensure that the updated logic is tested and validated.
v2/pkg/zrc20.sol/zrc20.go (9)
Line range hint
466-472
:
Verify function binding forUpdateGasLimit
.The Go binding for the
updateGasLimit
function should correctly map to the ABI. Ensure that the parameter type and transaction handling are accurate.
Line range hint
475-481
:
Verify function binding forUpdateGatewayAddress
.The Go binding for the
updateGatewayAddress
function should correctly map to the ABI. Ensure that the parameter type and transaction handling are accurate.
Line range hint
484-490
:
Verify function binding forUpdateProtocolFlatFee
.The Go binding for the
updateProtocolFlatFee
function should correctly map to the ABI. Ensure that the parameter type and transaction handling are accurate.
Line range hint
493-499
:
Verify function binding forUpdateSystemContractAddress
.The Go binding for the
updateSystemContractAddress
function should correctly map to the ABI. Ensure that the parameter type and transaction handling are accurate.
Line range hint
671-677
:
Verify event binding forUpdatedGasLimit
.The Go binding for the
UpdatedGasLimit
event should correctly map to the ABI. Ensure that the event parameters are correctly handled.
Line range hint
680-686
:
Verify event binding forUpdatedGateway
.The Go binding for the
UpdatedGateway
event should correctly map to the ABI. Ensure that the event parameters are correctly handled.
Line range hint
689-695
:
Verify event binding forUpdatedProtocolFlatFee
.The Go binding for the
UpdatedProtocolFlatFee
event should correctly map to the ABI. Ensure that the event parameters are correctly handled.
Line range hint
698-704
:
Verify event binding forUpdatedSystemContract
.The Go binding for the
UpdatedSystemContract
event should correctly map to the ABI. Ensure that the event parameters are correctly handled.
35-35
: Ensure ABI string correctness and completeness.The ABI string has been updated with new functions and events. Verify that all new entries are correctly formatted and consistent with the contract's intended functionality.
v2/pkg/zetaconnectornative.sol/zetaconnectornative.go (2)
42-42
: LGTM! The ABI and binary updates enhance functionality.The changes to the ABI and binary representation indicate improved error handling and additional functionality, which are beneficial for contract robustness and usability.
42-42
: Verify ABI changes for correctness.The ABI updates include new functions, events, and error types. Ensure these changes align with the intended contract functionality and are correctly implemented in the contract source code.
Verification successful
ABI changes verified successfully.
The ABI updates, including new functions and events, are consistent with the Solidity contract's source code. The changes align with the intended functionality enhancements. No issues found.
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify that the ABI changes align with the contract source code. # Test: Search for the function and event definitions in the Solidity contract. Expect: Definitions match the ABI. fd 'UniversalContract.sol' --exec rg 'function|event|error'Length of output: 4353
v2/pkg/zetaconnectornonnative.sol/zetaconnectornonnative.go (1)
42-42
: Verify ABI Changes for Consistency and Correctness.The ABI updates reflect changes in function signatures, events, and error types. Ensure these changes are consistent with the contract's intended functionality and do not introduce breaking changes.
v2/pkg/erc20custody.sol/erc20custody.go (3)
Line range hint
108-118
:
Verify Parameter Consistency and Error Handling.Ensure that the parameters used in
DeployERC20Custody
match the updated contract constructor and that error handling is adequate.
Line range hint
518-528
:
Verify Role Management Function Bindings.Ensure that the role management functions (
grantRole
,revokeRole
,renounceRole
) are correctly bound and used in accordance with the intended security model.Verification successful
Role Management Functions Verified
The
grantRole
,revokeRole
, andrenounceRole
functions are correctly implemented and bound in theERC20Custody
contract. The corresponding Go bindings for these functions are properly defined, ensuring that the contract's role management features are accessible through the generated Go code. This alignment is crucial for maintaining the intended security model of the contract.
- grantRole: Implemented and bound in
v2/pkg/erc20custody.sol/erc20custody.go
.- revokeRole: Implemented and bound in
v2/pkg/erc20custody.sol/erc20custody.go
.- renounceRole: Implemented and bound in
v2/pkg/erc20custody.sol/erc20custody.go
.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the correct binding and usage of role management functions. # Test: Check the role management functions in the Solidity contract. rg --type solidity 'function grantRole' -A 5 rg --type solidity 'function revokeRole' -A 5 rg --type solidity 'function renounceRole' -A 5Length of output: 243
Script:
#!/bin/bash # Description: Locate Solidity files and verify the correct binding and usage of role management functions. # Find all Solidity files and search for role management functions. fd --extension sol | xargs rg 'function grantRole' -A 5 fd --extension sol | xargs rg 'function revokeRole' -A 5 fd --extension sol | xargs rg 'function renounceRole' -A 5Length of output: 77815
42-42
: Verify ABI and Binary Consistency.The ABI and binary representation have been updated. Ensure that these changes are consistent with the intended contract functionality and that all necessary updates are reflected in the contract's logic.
v2/pkg/gatewayzevm.sol/gatewayzevm.go (3)
Line range hint
108-116
:
Ensure robust error handling in contract deployment.The
DeployGatewayZEVM
function handles ABI parsing errors. Confirm that it correctly manages all potential errors and that the deployment logic is consistent with the updated ABI.Verification successful
Robust Error Handling in
DeployGatewayZEVM
Function ConfirmedThe
DeployGatewayZEVM
function inv2/pkg/gatewayzevm.sol/gatewayzevm.go
correctly handles potential errors during ABI parsing. It returns an error if the ABI cannot be retrieved, ensuring robust error management in the contract deployment process.
v2/pkg/gatewayzevm.sol/gatewayzevm.go
: The function returns an error immediately if ABI retrieval fails, which aligns with expected error handling practices.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify error handling in `DeployGatewayZEVM`. # Test: Check for error handling in contract deployment. Expect: Proper handling of ABI parsing errors. rg --type go -A 5 'DeployGatewayZEVM'Length of output: 2225
57-57
: Verify ABI consistency with contract logic.The ABI changes include updates to function signatures and the addition of new error types. Ensure that these changes are consistent with the contract's logic and intended behavior.
Verification successful
ABI Changes Verified Successfully
The ABI updates in
GatewayZEVMMetaData
are consistent with the contract's logic and intended behavior. The deprecation ofGatewayZEVMABI
andGatewayZEVMBin
in favor ofGatewayZEVMMetaData
is correctly implemented. No inconsistencies were found in the integration of new error types and function signatures.
- The
GatewayZEVMMetaData
is used appropriately throughout the codebase.- Deprecated variables are replaced with the new metadata structure.
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify ABI consistency with the contract logic. # Test: Check for ABI usage across the codebase. Expect: Consistent usage with updated function signatures and error types. rg --type go -A 5 'GatewayZEVMMetaData'Length of output: 62532
Line range hint
120-126
:
Verify struct alignment with updated ABI.The
GatewayZEVM
struct and its methods should align with the updated ABI. Ensure that all transaction methods and event handling are correctly implemented.
v2/pkg/gatewayevm.sol/gatewayevm.go (4)
Line range hint
161-173
:
LGTM!The
DeployGatewayEVM
function is well-implemented with appropriate error handling for ABI parsing and contract deployment.
Line range hint
262-270
:
LGTM!The
NewGatewayEVM
function correctly binds to a deployed contract and handles errors appropriately.
Line range hint
338-344
:
LGTM!The
bindGatewayEVM
function effectively binds the contract with proper ABI parsing and error handling.
50-50
: Verify ABI consistency with contract code.Ensure that the ABI changes accurately reflect the current state of the
GatewayEVM
contract's Solidity code. This is crucial for maintaining correct interactions with the contract.
v2/pkg/gatewayevmupgradetest.sol/gatewayevmupgradetest.go (5)
50-50
: LGTM! Verify event consistency forExecuted
.The
Executed
event is crucial for tracking execution actions. Ensure it is defined correctly and consistent with the contract's logic.Verification successful
Consistent Definition of
Executed
Event Across CodebaseThe
Executed
event is consistently defined with the parametersaddress indexed destination
,uint256 value
, andbytes data
across multiple files. This suggests the event is correctly integrated and used throughout the codebase. No issues found.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify event consistency for the `Executed` event. # Test: Search for the `Executed` event in the ABI. Expect: The event should be defined with all expected parameters. rg --type go 'event Executed\(' -A 5Length of output: 25258
50-50
: LGTM! Verify ABI consistency fordeposit
.The addition of a payable variant for the
deposit
function enhances flexibility. Ensure the ABI accurately reflects these changes.Verification successful
ABI Consistency Verified for
deposit
FunctionThe
gatewayevmupgradetest.go
file contains both thedeposit
anddeposit0
functions, confirming the presence of both payable and non-payable variants in the ABI. No further action is needed.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify ABI consistency for the `deposit` function. # Test: Search for the `deposit` function in the ABI. Expect: Both variants (payable and non-payable) should be present. rg --type go 'function deposit\(' -A 5Length of output: 48088
50-50
: LGTM! Verify ABI consistency fordepositAndCall
.The addition of a payable variant for the
depositAndCall
function broadens its use cases. Ensure the ABI accurately reflects these changes.Verification successful
ABI Consistency Verified for
depositAndCall
FunctionThe ABI includes both the payable (
DepositAndCall0
) and non-payable (DepositAndCall
) variants of thedepositAndCall
function, confirming consistency. No further action is needed.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify ABI consistency for the `depositAndCall` function. # Test: Search for the `depositAndCall` function in the ABI. Expect: Both variants (payable and non-payable) should be present. rg --type go 'function depositAndCall\(' -A 5Length of output: 34422
50-50
: LGTM! Verify event consistency forDeposited
.The
Deposited
event is crucial for tracking state changes. Ensure it is defined correctly and consistent with the contract's logic.Verification successful
Event Consistency Verified for
Deposited
The
Deposited
event is consistently defined across the codebase with expected parameters, ensuring correct integration into the system.
- Files with
Deposited
event:
v2/pkg/gatewayevmupgradetest.sol/gatewayevmupgradetest.go
- Other related files in the codebase.
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify event consistency for the `Deposited` event. # Test: Search for the `Deposited` event in the ABI. Expect: The event should be defined with all expected parameters. rg --type go 'event Deposited\(' -A 5Length of output: 30286
50-50
: LGTM! Verify event consistency forReverted
.The
Reverted
event is crucial for tracking revert actions. Ensure it is defined correctly and consistent with the contract's logic.Verification successful
Reverted Event Consistency Verified
The
Reverted
event is consistently defined across multiple files with the expected parameters:address indexed to, address indexed token, uint256 amount, bytes data, (address,uint64,bytes) revertContext
. This confirms its correct implementation and usage throughout the codebase.
- Files where
Reverted
is defined include:
v2/pkg/gatewayevm.sol/gatewayevm.go
v2/pkg/igatewayevm.sol/igatewayevm.go
v2/pkg/zetaconnectornonnative.t.sol/zetaconnectornonnativetest.go
v2/pkg/zetaconnectornative.t.sol/zetaconnectornativetest.go
v2/pkg/gatewayevmupgradetest.sol/gatewayevmupgradetest.go
v2/pkg/gatewayevmechidnatest.sol/gatewayevmechidnatest.go
v2/pkg/erc20custody.t.sol/erc20custodytest.go
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify event consistency for the `Reverted` event. # Test: Search for the `Reverted` event in the ABI. Expect: The event should be defined with all expected parameters. rg --type go 'event Reverted\(' -A 5Length of output: 26230
v2/types/IReceiverEVM.sol/IReceiverEVMEvents.ts (4)
24-28
: New Type Definition:RevertContextStruct
.The new type
RevertContextStruct
is well-defined with propertiesasset
,amount
, andrevertMessage
. Ensure that these properties are correctly used in the rest of the codebase.
30-34
: New Type Definition:RevertContextStructOutput
.The output struct mirrors the input struct with appropriate type conversions. This is a good practice for handling event data.
138-148
: Modification ofReceivedRevertEvent
Structure.The
InputTuple
,OutputTuple
, andOutputObject
have been updated to includerevertContext
. This change improves the event's ability to handle revert scenarios with more context.
284-285
: Updated Event Signature forReceivedRevert
.The event signature now uses a tuple, aligning with the updated event structure. Ensure that this change is reflected in all relevant parts of the codebase.
Verification successful
Updated Event Signature for
ReceivedRevert
VerifiedThe updated event signature for
ReceivedRevert
using a tuple is consistently applied across the codebase. The following files reflect this change:
v2/types/ReceiverEVM.ts
v2/types/IReceiverEVM.sol/IReceiverEVMEvents.ts
v2/typechain-types/ReceiverEVM.ts
v2/typechain-types/IReceiverEVM.sol/IReceiverEVMEvents.ts
The change is correctly implemented in all relevant parts of the codebase.
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the usage of the updated `ReceivedRevert` event signature across the codebase. # Test: Search for the `ReceivedRevert` event usage. Expect: Only occurrences of the new signature. rg --type typescript -A 5 $'ReceivedRevert(address,tuple)'Length of output: 94
Script:
#!/bin/bash # Description: Verify the usage of the updated `ReceivedRevert` event signature across the codebase. # Test: Search for the `ReceivedRevert` event usage. Expect: Only occurrences of the new signature. rg -A 5 'ReceivedRevert\(address,tuple\)'Length of output: 1916
v2/types/IERC20Custody.sol/IERC20CustodyEvents.ts (9)
24-28
: New Type Definition:RevertContextStruct
.The new type
RevertContextStruct
is defined with propertiesasset
,amount
, andrevertMessage
. Ensure these are consistently used across the codebase.
30-34
: New Type Definition:RevertContextStructOutput
.The output struct is appropriately defined for event data handling, mirroring the input struct with type conversions.
47-57
: New Event:UnwhitelistedEvent
.The event structure is clearly defined, enhancing clarity in event handling.
59-69
: New Event:WhitelistedEvent
.The event structure is clearly defined, which improves the clarity of event handling.
Line range hint
71-87
: Renamed Event:WithdrawnEvent
.The event has been renamed and its structure is clearly defined, enhancing clarity and functionality.
Line range hint
89-111
: Renamed Event:WithdrawnAndCalledEvent
.The event structure is clearly defined, improving clarity and functionality.
114-136
: Modified Event:WithdrawnAndRevertedEvent
.The event now includes
revertContext
, enhancing its functionality by providing more context in revert scenarios.
190-222
: UpdatedgetEvent
Method.The method now accommodates the new event names and structures. Ensure these changes are consistently applied across the codebase.
Verification successful
Consistent Application of Updated
getEvent
Method Across CodebaseThe updated
getEvent
method with new event names is consistently used across multiple files in the codebase. This confirms that the changes have been applied as intended.
- Files such as
v2/types/IERC20Custody.sol/IERC20CustodyEvents.ts
and others show the updated method usage with new event names like "Unwhitelisted", "Whitelisted", "Withdrawn", etc.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the usage of the updated `getEvent` method across the codebase. # Test: Search for the usage of `getEvent` with new event names. Expect: Only occurrences of new event names. rg --type typescript -A 5 $'getEvent'Length of output: 71
Script:
#!/bin/bash # Description: Verify the usage of the updated `getEvent` method across the codebase. # Test: Search for the usage of `getEvent` with new event names. Expect: Only occurrences of new event names. rg --type ts -A 5 $'getEvent'Length of output: 328795
226-278
: Updated Event Filters.The filters have been updated to match the new event names and structures. Ensure these changes are consistently applied across the codebase.
Verification successful
The initial shell script failed because it used an unrecognized file type, "typescript", with
rg
. This needs to be corrected to search for the event filters in the codebase. The correct file type for TypeScript files inrg
ists
. Let's generate a new shell script to properly verify the usage of the updated event filters across the codebase.
Updated Event Filters Verified
The updated event filters for "Unwhitelisted", "Whitelisted", "Withdrawn", and "WithdrawnAndCalled" are consistently used across the codebase. The search results confirm their presence in various TypeScript files, indicating that the changes have been applied correctly.
- Files with updated event filters:
v2/types/ERC20Custody.ts
v2/types/ZetaConnectorNonNative.ts
v2/types/ZetaConnectorBase.ts
v2/types/ZetaConnectorNative.ts
v2/types/IERC20Custody.sol/IERC20CustodyEvents.ts
These files demonstrate the integration of the updated event names and structures, ensuring consistency across the codebase.
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the usage of updated event filters across the codebase. # Test: Search for the usage of event filters with new event names. Expect: Only occurrences of new event names. rg --type typescript -A 5 $'filters'Length of output: 70
Script:
#!/bin/bash # Description: Verify the usage of updated event filters across the codebase. # Test: Search for the usage of event filters with new event names. Expect: Only occurrences of new event names. rg -t ts -A 5 'filters'Length of output: 131151
Script:
#!/bin/bash # Description: Search for specific updated event names to verify their usage across the codebase. # Test: Search for occurrences of specific event names in TypeScript files. rg -t ts -e 'Unwhitelisted' -e 'Whitelisted' -e 'Withdrawn' -e 'WithdrawnAndCalled'Length of output: 93424
v2/pkg/core.sol/core.go (1)
35-35
: Updated Binary Data inCoreMetaData
.The
Bin
field has been updated, which may indicate changes in the contract's compiled output. Ensure this change is intentional and verify its impact on contract deployment and interactions.
v2/types/IGatewayZEVM.sol/IGatewayZEVM.ts (5)
26-31
: New Type: RevertOptionsStructThe addition of
RevertOptionsStruct
enhances the contract's ability to handle revert scenarios by encapsulating relevant parameters. This is a well-structured addition that improves error handling capabilities.
33-43
: New Type: RevertOptionsStructOutputThe
RevertOptionsStructOutput
mirrors theRevertOptionsStruct
with string types, which is appropriate for output scenarios. This ensures consistency in handling revert options.
58-60
: Update: RevertContextStruct FieldsThe
RevertContextStruct
now focuses on asset management and error messaging, which aligns with the enhanced error handling strategy. This change is logical and consistent with the new functionality.
85-85
: New Events: Called and WithdrawnThe addition of
Called
andWithdrawn
events provides better tracking of contract interactions, enhancing transparency and debugging capabilities.
79-82
: Modified Function SignaturesThe updated function signatures for
withdraw
andwithdrawAndCall
now includeRevertOptionsStruct
, allowing for more complex error handling scenarios. Ensure that these changes are reflected in the implementation and usage.Verification successful
Function Signatures Updated Successfully
The updated function signatures for
withdraw
andwithdrawAndCall
that includeRevertOptionsStruct
are present in the codebase. These changes are reflected in the relevant TypeScript files. No further action is required.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the usage of updated function signatures in the codebase. # Test: Search for the function usage. Expect: Only occurrences of the new signature. rg --type ts -A 5 $'withdraw\\(bytes,uint256,address,\\(address,bool,address,bytes\\)\\)' rg --type ts -A 5 $'withdrawAndCall\\(bytes,uint256,address,bytes,uint256,\\(address,bool,address,bytes\\)\\)'Length of output: 18992
v2/types/IGatewayEVM.sol/IGatewayEVM.ts (4)
26-31
: New Type: RevertOptionsStructThe addition of
RevertOptionsStruct
is a valuable enhancement for handling revert scenarios. This type encapsulates necessary parameters for more robust error handling.
45-49
: New Type: RevertContextStructThe
RevertContextStruct
introduces a focus on asset management and error messaging, aligning with the contract's enhanced error handling capabilities.
71-78
: New Events: VariousThe introduction of multiple events (
Called
,Deposited
,Executed
,ExecutedWithERC20
,Reverted
) enhances the contract's logging and event handling capabilities, providing better insights into contract operations.
61-64
: Modified Function SignaturesThe updated function signatures now incorporate
RevertOptionsStruct
, providing more control over revert behaviors. Ensure these changes are consistently implemented across the codebase.Verification successful
Consistent Implementation of Updated Function Signatures
The updated function signatures incorporating
RevertOptionsStruct
are consistently implemented across the codebase. The search results confirm their presence in various relevant files. No further action is needed.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the usage of updated function signatures in the codebase. # Test: Search for the function usage. Expect: Only occurrences of the new signature. rg --type ts -A 5 $'deposit\\(address,uint256,address,\\(address,bool,address,bytes\\)\\)' rg --type ts -A 5 $'depositAndCall\\(address,uint256,address,bytes,\\(address,bool,address,bytes\\)\\)'Length of output: 37878
v2/pkg/erc1967proxy.sol/erc1967proxy.go (1)
35-35
: Updated Bytecode in ERC1967ProxyMetaDataThe
Bin
field has been updated, indicating a change in the contract's bytecode. Ensure that this change is intentional and verify its impact on the contract's functionality.Verification successful
No references to old bytecode found elsewhere in the codebase. The updated bytecode in the
erc1967proxy.go
file appears to be isolated, with no other parts of the codebase referencing the old bytecode. Ensure that the updated bytecode functions as intended and review any related tests for potential impacts.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the impact of the updated bytecode on the contract's functionality. # Test: Check for any references to the old bytecode in the codebase. rg --type go '0x608060405260405161041d38038061041d83398101604081905261002291610268565b61002c8282610033565b5050610358565b61003c82610092565b6040516001600160a01b038316907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a280511561008657610081828261010e565b505050565b61008e610185565b5050565b806001600160a01b03163b6000036100cd57604051634c9c8ce360e01b81526001600160a01b03821660048201526024015b60405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80546001600160a01b0319166001600160a01b0392909216919091179055565b6060600080846001600160a01b03168460405161012b919061033c565b600060405180830381855af49150503d8060008114610166576040519150601f19603f3d011682016040523d82523d6000602084013e61016b565b606091505b50909250905061017c8583836101a6565b95945050505050565b34156101a45760405163b398979f60e01b815260040160405180910390fd5b565b6060826101bb576101b682610205565b6101fe565b81511580156101d257506001600160a01b0384163b155b156101fb57604051639996b31560e01b81526001600160a01b03851660048201526024016100c4565b50805b9392505050565b8051156102155780518082602001fd5b604051630a12f52160e11b815260040160405180910390fd5b634e487b7160e01b600052604160045260246000fd5b60005b8381101561025f578181015183820152602001610247565b50506000910152565b6000806040838503121561027b57600080fd5b82516001600160a01b038116811461029257600080fd5b60208401519092506001600160401b038111156102ae57600080fd5b8301601f810185136102bf57600080fd5b80516001600160401b038111156102d8576102d861022e565b604051601f8201601f19908116603f011681016001600160401b03811182821017156103065761030661022e565b60405281815282820160200187101561031e57600080fd5b61032f826020830160208601610244565b8093505050509250929050565b6000825161034e818460208701610244565b9190910192915050565b60b7806103666000396000f3fe6080604052600a600c565b005b60186014601a565b605e565b565b600060597f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5473ffffffffffffffffffffffffffffffffffffffff1690565b905090565b3660008037600080366000845af43d6000803e808015607c573d6000f35b3d6000fdfea2646970667358221220662d14bfc8b7b0feb399f7e693dc98eeb1fe76d920c17f492760a1edc216d2d064736f6c634300081a0033'Length of output: 4281
v2/pkg/testerc20.sol/testerc20.go
Outdated
ABI: "[{\"type\":\"constructor\",\"inputs\":[{\"name\":\"name\",\"type\":\"string\",\"internalType\":\"string\"},{\"name\":\"symbol\",\"type\":\"string\",\"internalType\":\"string\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"allowance\",\"inputs\":[{\"name\":\"owner\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"spender\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"approve\",\"inputs\":[{\"name\":\"spender\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"value\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"balanceOf\",\"inputs\":[{\"name\":\"account\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"decimals\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint8\",\"internalType\":\"uint8\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"mint\",\"inputs\":[{\"name\":\"to\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"name\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"string\",\"internalType\":\"string\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"symbol\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"string\",\"internalType\":\"string\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"totalSupply\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"transfer\",\"inputs\":[{\"name\":\"to\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"value\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"transferFrom\",\"inputs\":[{\"name\":\"from\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"to\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"value\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"event\",\"name\":\"Approval\",\"inputs\":[{\"name\":\"owner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"spender\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"value\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Transfer\",\"inputs\":[{\"name\":\"from\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"to\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"value\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"error\",\"name\":\"ERC20InsufficientAllowance\",\"inputs\":[{\"name\":\"spender\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"allowance\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"needed\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"type\":\"error\",\"name\":\"ERC20InsufficientBalance\",\"inputs\":[{\"name\":\"sender\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"balance\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"needed\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"type\":\"error\",\"name\":\"ERC20InvalidApprover\",\"inputs\":[{\"name\":\"approver\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"ERC20InvalidReceiver\",\"inputs\":[{\"name\":\"receiver\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"ERC20InvalidSender\",\"inputs\":[{\"name\":\"sender\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"ERC20InvalidSpender\",\"inputs\":[{\"name\":\"spender\",\"type\":\"address\",\"internalType\":\"address\"}]}]", | ||
Bin: "0x608060405234801561001057600080fd5b50604051610c9f380380610c9f83398101604081905261002f9161010d565b8181600361003d83826101ff565b50600461004a82826101ff565b50505050506102bd565b634e487b7160e01b600052604160045260246000fd5b600082601f83011261007b57600080fd5b81516001600160401b0381111561009457610094610054565b604051601f8201601f19908116603f011681016001600160401b03811182821017156100c2576100c2610054565b6040528181528382016020018510156100da57600080fd5b60005b828110156100f9576020818601810151838301820152016100dd565b506000918101602001919091529392505050565b6000806040838503121561012057600080fd5b82516001600160401b0381111561013657600080fd5b6101428582860161006a565b602085015190935090506001600160401b0381111561016057600080fd5b61016c8582860161006a565b9150509250929050565b600181811c9082168061018a57607f821691505b6020821081036101aa57634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156101fa57806000526020600020601f840160051c810160208510156101d75750805b601f840160051c820191505b818110156101f757600081556001016101e3565b50505b505050565b81516001600160401b0381111561021857610218610054565b61022c816102268454610176565b846101b0565b6020601f82116001811461026057600083156102485750848201515b600019600385901b1c1916600184901b1784556101f7565b600084815260208120601f198516915b828110156102905787850151825560209485019460019092019101610270565b50848210156102ae5786840151600019600387901b60f8161c191681555b50505050600190811b01905550565b6109d3806102cc6000396000f3fe608060405234801561001057600080fd5b50600436106100be5760003560e01c806340c10f191161007657806395d89b411161005b57806395d89b4114610183578063a9059cbb1461018b578063dd62ed3e1461019e57600080fd5b806340c10f191461013857806370a082311461014d57600080fd5b806318160ddd116100a757806318160ddd1461010457806323b872dd14610116578063313ce5671461012957600080fd5b806306fdde03146100c3578063095ea7b3146100e1575b600080fd5b6100cb6101e4565b6040516100d891906107bf565b60405180910390f35b6100f46100ef366004610854565b610276565b60405190151581526020016100d8565b6002545b6040519081526020016100d8565b6100f461012436600461087e565b610290565b604051601281526020016100d8565b61014b610146366004610854565b6102b4565b005b61010861015b3660046108bb565b73ffffffffffffffffffffffffffffffffffffffff1660009081526020819052604090205490565b6100cb6102c2565b6100f4610199366004610854565b6102d1565b6101086101ac3660046108dd565b73ffffffffffffffffffffffffffffffffffffffff918216600090815260016020908152604080832093909416825291909152205490565b6060600380546101f390610910565b80601f016020809104026020016040519081016040528092919081815260200182805461021f90610910565b801561026c5780601f106102415761010080835404028352916020019161026c565b820191906000526020600020905b81548152906001019060200180831161024f57829003601f168201915b5050505050905090565b6000336102848185856102df565b60019150505b92915050565b60003361029e8582856102f1565b6102a98585856103c5565b506001949350505050565b6102be8282610470565b5050565b6060600480546101f390610910565b6000336102848185856103c5565b6102ec83838360016104cc565b505050565b73ffffffffffffffffffffffffffffffffffffffff8381166000908152600160209081526040808320938616835292905220547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81146103bf57818110156103b0576040517ffb8f41b200000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8416600482015260248101829052604481018390526064015b60405180910390fd5b6103bf848484840360006104cc565b50505050565b73ffffffffffffffffffffffffffffffffffffffff8316610415576040517f96c6fd1e000000000000000000000000000000000000000000000000000000008152600060048201526024016103a7565b73ffffffffffffffffffffffffffffffffffffffff8216610465576040517fec442f05000000000000000000000000000000000000000000000000000000008152600060048201526024016103a7565b6102ec838383610614565b73ffffffffffffffffffffffffffffffffffffffff82166104c0576040517fec442f05000000000000000000000000000000000000000000000000000000008152600060048201526024016103a7565b6102be60008383610614565b73ffffffffffffffffffffffffffffffffffffffff841661051c576040517fe602df05000000000000000000000000000000000000000000000000000000008152600060048201526024016103a7565b73ffffffffffffffffffffffffffffffffffffffff831661056c576040517f94280d62000000000000000000000000000000000000000000000000000000008152600060048201526024016103a7565b73ffffffffffffffffffffffffffffffffffffffff808516600090815260016020908152604080832093871683529290522082905580156103bf578273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258460405161060691815260200190565b60405180910390a350505050565b73ffffffffffffffffffffffffffffffffffffffff831661064c5780600260008282546106419190610963565b909155506106fe9050565b73ffffffffffffffffffffffffffffffffffffffff8316600090815260208190526040902054818110156106d2576040517fe450d38c00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8516600482015260248101829052604481018390526064016103a7565b73ffffffffffffffffffffffffffffffffffffffff841660009081526020819052604090209082900390555b73ffffffffffffffffffffffffffffffffffffffff821661072757600280548290039055610753565b73ffffffffffffffffffffffffffffffffffffffff821660009081526020819052604090208054820190555b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040516107b291815260200190565b60405180910390a3505050565b602081526000825180602084015260005b818110156107ed57602081860181015160408684010152016107d0565b5060006040828501015260407fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011684010191505092915050565b803573ffffffffffffffffffffffffffffffffffffffff8116811461084f57600080fd5b919050565b6000806040838503121561086757600080fd5b6108708361082b565b946020939093013593505050565b60008060006060848603121561089357600080fd5b61089c8461082b565b92506108aa6020850161082b565b929592945050506040919091013590565b6000602082840312156108cd57600080fd5b6108d68261082b565b9392505050565b600080604083850312156108f057600080fd5b6108f98361082b565b91506109076020840161082b565b90509250929050565b600181811c9082168061092457607f821691505b60208210810361095d577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b8082018082111561028a577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fdfea26469706673582212207e804ca539d49155d2b6bc19268ce22f9f857027c75247d69fb0d56a089c93d464736f6c634300081a0033", | ||
Bin: "0x608060405234801561001057600080fd5b50604051610c9f380380610c9f83398101604081905261002f9161010d565b8181600361003d83826101ff565b50600461004a82826101ff565b50505050506102bd565b634e487b7160e01b600052604160045260246000fd5b600082601f83011261007b57600080fd5b81516001600160401b0381111561009457610094610054565b604051601f8201601f19908116603f011681016001600160401b03811182821017156100c2576100c2610054565b6040528181528382016020018510156100da57600080fd5b60005b828110156100f9576020818601810151838301820152016100dd565b506000918101602001919091529392505050565b6000806040838503121561012057600080fd5b82516001600160401b0381111561013657600080fd5b6101428582860161006a565b602085015190935090506001600160401b0381111561016057600080fd5b61016c8582860161006a565b9150509250929050565b600181811c9082168061018a57607f821691505b6020821081036101aa57634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156101fa57806000526020600020601f840160051c810160208510156101d75750805b601f840160051c820191505b818110156101f757600081556001016101e3565b50505b505050565b81516001600160401b0381111561021857610218610054565b61022c816102268454610176565b846101b0565b6020601f82116001811461026057600083156102485750848201515b600019600385901b1c1916600184901b1784556101f7565b600084815260208120601f198516915b828110156102905787850151825560209485019460019092019101610270565b50848210156102ae5786840151600019600387901b60f8161c191681555b50505050600190811b01905550565b6109d3806102cc6000396000f3fe608060405234801561001057600080fd5b50600436106100be5760003560e01c806340c10f191161007657806395d89b411161005b57806395d89b4114610183578063a9059cbb1461018b578063dd62ed3e1461019e57600080fd5b806340c10f191461013857806370a082311461014d57600080fd5b806318160ddd116100a757806318160ddd1461010457806323b872dd14610116578063313ce5671461012957600080fd5b806306fdde03146100c3578063095ea7b3146100e1575b600080fd5b6100cb6101e4565b6040516100d891906107bf565b60405180910390f35b6100f46100ef366004610854565b610276565b60405190151581526020016100d8565b6002545b6040519081526020016100d8565b6100f461012436600461087e565b610290565b604051601281526020016100d8565b61014b610146366004610854565b6102b4565b005b61010861015b3660046108bb565b73ffffffffffffffffffffffffffffffffffffffff1660009081526020819052604090205490565b6100cb6102c2565b6100f4610199366004610854565b6102d1565b6101086101ac3660046108dd565b73ffffffffffffffffffffffffffffffffffffffff918216600090815260016020908152604080832093909416825291909152205490565b6060600380546101f390610910565b80601f016020809104026020016040519081016040528092919081815260200182805461021f90610910565b801561026c5780601f106102415761010080835404028352916020019161026c565b820191906000526020600020905b81548152906001019060200180831161024f57829003601f168201915b5050505050905090565b6000336102848185856102df565b60019150505b92915050565b60003361029e8582856102f1565b6102a98585856103c5565b506001949350505050565b6102be8282610470565b5050565b6060600480546101f390610910565b6000336102848185856103c5565b6102ec83838360016104cc565b505050565b73ffffffffffffffffffffffffffffffffffffffff8381166000908152600160209081526040808320938616835292905220547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81146103bf57818110156103b0576040517ffb8f41b200000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8416600482015260248101829052604481018390526064015b60405180910390fd5b6103bf848484840360006104cc565b50505050565b73ffffffffffffffffffffffffffffffffffffffff8316610415576040517f96c6fd1e000000000000000000000000000000000000000000000000000000008152600060048201526024016103a7565b73ffffffffffffffffffffffffffffffffffffffff8216610465576040517fec442f05000000000000000000000000000000000000000000000000000000008152600060048201526024016103a7565b6102ec838383610614565b73ffffffffffffffffffffffffffffffffffffffff82166104c0576040517fec442f05000000000000000000000000000000000000000000000000000000008152600060048201526024016103a7565b6102be60008383610614565b73ffffffffffffffffffffffffffffffffffffffff841661051c576040517fe602df05000000000000000000000000000000000000000000000000000000008152600060048201526024016103a7565b73ffffffffffffffffffffffffffffffffffffffff831661056c576040517f94280d62000000000000000000000000000000000000000000000000000000008152600060048201526024016103a7565b73ffffffffffffffffffffffffffffffffffffffff808516600090815260016020908152604080832093871683529290522082905580156103bf578273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258460405161060691815260200190565b60405180910390a350505050565b73ffffffffffffffffffffffffffffffffffffffff831661064c5780600260008282546106419190610963565b909155506106fe9050565b73ffffffffffffffffffffffffffffffffffffffff8316600090815260208190526040902054818110156106d2576040517fe450d38c00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8516600482015260248101829052604481018390526064016103a7565b73ffffffffffffffffffffffffffffffffffffffff841660009081526020819052604090209082900390555b73ffffffffffffffffffffffffffffffffffffffff821661072757600280548290039055610753565b73ffffffffffffffffffffffffffffffffffffffff821660009081526020819052604090208054820190555b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040516107b291815260200190565b60405180910390a3505050565b602081526000825180602084015260005b818110156107ed57602081860181015160408684010152016107d0565b5060006040828501015260407fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011684010191505092915050565b803573ffffffffffffffffffffffffffffffffffffffff8116811461084f57600080fd5b919050565b6000806040838503121561086757600080fd5b6108708361082b565b946020939093013593505050565b60008060006060848603121561089357600080fd5b61089c8461082b565b92506108aa6020850161082b565b929592945050506040919091013590565b6000602082840312156108cd57600080fd5b6108d68261082b565b9392505050565b600080604083850312156108f057600080fd5b6108f98361082b565b91506109076020840161082b565b90509250929050565b600181811c9082168061092457607f821691505b60208210810361095d577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b8082018082111561028a577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fdfea26469706673582212204c4f95fea3c55447111835aa97958daa933570f377b3e2828b6858de8245da5b64736f6c634300081a0033", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add tests for new functionalities.
The ABI changes suggest new functionalities. Ensure that these are covered by tests to verify their correct implementation and behavior.
Would you like me to generate the unit testing code for these new functionalities or open a GitHub issue to track this task?
v2/types/TestUniversalContract.ts
Outdated
amount: BigNumberish, | ||
message: BytesLike | ||
], | ||
[void], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Replace void
with undefined
for clarity.
Using void
outside of a return type or type parameter can be confusing. Replace void
with undefined
to align with TypeScript best practices.
- [void],
+ [undefined],
Also applies to: 171-171, 188-188, 195-195
Tools
Biome
[error] 165-165: void is confusing outside a return type or a type parameter.
Unsafe fix: Use undefined instead.
(lint/suspicious/noConfusingVoidType)
v2/types/Revert.sol/Revertable.ts
Outdated
|
||
onRevert: TypedContractMethod< | ||
[revertContext: RevertContextStruct], | ||
[void], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Replace void
with undefined
.
The use of void
in this context is confusing. Consider replacing it with undefined
to clarify the return type.
- [void],
+ [undefined],
Also applies to: 104-104
Tools
Biome
[error] 92-92: void is confusing outside a return type or a type parameter.
Unsafe fix: Use undefined instead.
(lint/suspicious/noConfusingVoidType)
v2/types/Revert.sol/Revertable.ts
Outdated
"nonpayable" | ||
>; | ||
|
||
filters: {}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Define a specific shape for empty object type.
Avoid using {}
as a type. Define the object shape explicitly to improve type safety.
- filters: {};
+ filters: Record<string, unknown>;
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
filters: {}; | |
filters: Record<string, unknown>; |
Tools
Biome
[error] 108-108: Don't use '{}' as a type.
Prefer explicitly define the object shape. '{}' means "any non-nullable value".
(lint/complexity/noBannedTypes)
amount: BigNumberish, | ||
message: BytesLike | ||
], | ||
[void], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Replace void
with undefined
.
The use of void
in this context is confusing. Consider replacing it with undefined
to clarify the return type.
- [void],
+ [undefined],
Also applies to: 117-117
Tools
Biome
[error] 100-100: void is confusing outside a return type or a type parameter.
Unsafe fix: Use undefined instead.
(lint/suspicious/noConfusingVoidType)
data: BytesLike, | ||
revertContext: RevertContextStruct | ||
], | ||
[void], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix void
Type Usage in withdrawAndRevert
Method.
Replace void
with undefined
to avoid confusion in the method signature.
- [void],
+ [undefined],
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
[void], | |
[undefined], |
Tools
Biome
[error] 259-259: void is confusing outside a return type or a type parameter.
Unsafe fix: Use undefined instead.
(lint/suspicious/noConfusingVoidType)
|
||
withdraw: TypedContractMethod< | ||
[token: AddressLike, to: AddressLike, amount: BigNumberish], | ||
[void], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix void
Type Usage in withdraw
Method.
The use of void
in the method signature is flagged as confusing. Consider using undefined
instead to clarify the return type.
- [void],
+ [undefined],
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
[void], | |
[undefined], |
Tools
Biome
[error] 236-236: void is confusing outside a return type or a type parameter.
Unsafe fix: Use undefined instead.
(lint/suspicious/noConfusingVoidType)
zrc20: AddressLike, | ||
amount: BigNumberish, | ||
target: AddressLike, | ||
message: BytesLike | ||
message: BytesLike, | ||
revertContext: RevertContextStruct | ||
], | ||
[void], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Replace void
with undefined
The use of void
outside of return types or type parameters is confusing. Replace it with undefined
for clarity and to adhere to TypeScript best practices.
- [void],
+ [undefined],
Also applies to: 399-399, 410-410, 422-422, 526-526, 538-538, 550-550
Tools
Biome
[error] 388-388: void is confusing outside a return type or a type parameter.
Unsafe fix: Use undefined instead.
(lint/suspicious/noConfusingVoidType)
receiver: AddressLike, | ||
payload: BytesLike, | ||
revertOptions: RevertOptionsStruct | ||
], | ||
[void], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Replace void
with undefined
The use of void
outside of return types or type parameters is confusing. Replace it with undefined
for clarity and to adhere to TypeScript best practices.
- [void],
+ [undefined],
Also applies to: 348-348, 354-354, 366-366, 376-376, 431-431, 443-443, 450-450, 463-463, 474-474, 517-517
Tools
Biome
[error] 337-337: void is confusing outside a return type or a type parameter.
Unsafe fix: Use undefined instead.
(lint/suspicious/noConfusingVoidType)
ExecutedEvent.OutputObject | ||
>; | ||
getEvent( | ||
key: "ExecutedWithERC20" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Potential Exposure of a Generic API Key
The presence of a generic API key in the code poses a security risk. Ensure that sensitive information is not exposed in the codebase.
Please verify and remove any sensitive information.
Tools
Gitleaks
543-543: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.
(generic-api-key)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Files selected for processing (10)
- v2/contracts/evm/ERC20Custody.sol (4 hunks)
- v2/contracts/evm/GatewayEVM.sol (11 hunks)
- v2/contracts/evm/ZetaConnectorBase.sol (3 hunks)
- v2/contracts/evm/interfaces/IERC20Custody.sol (3 hunks)
- v2/contracts/evm/interfaces/IGatewayEVM.sol (5 hunks)
- v2/contracts/evm/interfaces/IZetaConnector.sol (1 hunks)
- v2/contracts/zevm/GatewayZEVM.sol (13 hunks)
- v2/contracts/zevm/ZRC20.sol (2 hunks)
- v2/contracts/zevm/interfaces/IGatewayZEVM.sol (1 hunks)
- v2/contracts/zevm/interfaces/UniversalContract.sol (3 hunks)
Files skipped from review due to trivial changes (10)
- v2/contracts/evm/ERC20Custody.sol
- v2/contracts/evm/GatewayEVM.sol
- v2/contracts/evm/ZetaConnectorBase.sol
- v2/contracts/evm/interfaces/IERC20Custody.sol
- v2/contracts/evm/interfaces/IGatewayEVM.sol
- v2/contracts/evm/interfaces/IZetaConnector.sol
- v2/contracts/zevm/GatewayZEVM.sol
- v2/contracts/zevm/ZRC20.sol
- v2/contracts/zevm/interfaces/IGatewayZEVM.sol
- v2/contracts/zevm/interfaces/UniversalContract.sol
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Files ignored due to path filters (1)
v2/yarn.lock
is excluded by!**/yarn.lock
,!**/*.lock
Files selected for processing (25)
- v2/contracts/evm/ERC20Custody.sol (4 hunks)
- v2/contracts/evm/GatewayEVM.sol (11 hunks)
- v2/contracts/evm/ZetaConnectorBase.sol (3 hunks)
- v2/contracts/evm/interfaces/IERC20Custody.sol (3 hunks)
- v2/contracts/evm/interfaces/IGatewayEVM.sol (5 hunks)
- v2/contracts/evm/interfaces/IZetaConnector.sol (1 hunks)
- v2/contracts/zevm/GatewayZEVM.sol (13 hunks)
- v2/contracts/zevm/ZRC20.sol (2 hunks)
- v2/contracts/zevm/interfaces/IGatewayZEVM.sol (11 hunks)
- v2/contracts/zevm/interfaces/UniversalContract.sol (1 hunks)
- v2/hardhat.config.ts (1 hunks)
- v2/package.json (2 hunks)
- v2/pkg/erc20custody.sol/erc20custody.go (1 hunks)
- v2/pkg/gatewayevm.sol/gatewayevm.go (1 hunks)
- v2/pkg/gatewayevmupgradetest.sol/gatewayevmupgradetest.go (1 hunks)
- v2/pkg/gatewayzevm.sol/gatewayzevm.go (1 hunks)
- v2/pkg/senderzevm.sol/senderzevm.go (1 hunks)
- v2/pkg/systemcontract.sol/systemcontract.go (1 hunks)
- v2/pkg/systemcontractmock.sol/systemcontractmock.go (1 hunks)
- v2/pkg/testuniversalcontract.sol/testuniversalcontract.go (1 hunks)
- v2/pkg/zetaconnectornative.sol/zetaconnectornative.go (1 hunks)
- v2/pkg/zetaconnectornonnative.sol/zetaconnectornonnative.go (1 hunks)
- v2/pkg/zrc20.sol/zrc20.go (1 hunks)
- v2/types/factories/ERC20Custody__factory.ts (11 hunks)
- v2/types/factories/GatewayEVMUpgradeTest__factory.ts (17 hunks)
Files skipped from review due to trivial changes (8)
- v2/contracts/evm/ERC20Custody.sol
- v2/contracts/evm/GatewayEVM.sol
- v2/contracts/evm/interfaces/IZetaConnector.sol
- v2/contracts/zevm/GatewayZEVM.sol
- v2/contracts/zevm/ZRC20.sol
- v2/contracts/zevm/interfaces/IGatewayZEVM.sol
- v2/contracts/zevm/interfaces/UniversalContract.sol
- v2/hardhat.config.ts
Files skipped from review as they are similar to previous changes (11)
- v2/contracts/evm/ZetaConnectorBase.sol
- v2/contracts/evm/interfaces/IERC20Custody.sol
- v2/contracts/evm/interfaces/IGatewayEVM.sol
- v2/package.json
- v2/pkg/gatewayevm.sol/gatewayevm.go
- v2/pkg/gatewayevmupgradetest.sol/gatewayevmupgradetest.go
- v2/pkg/gatewayzevm.sol/gatewayzevm.go
- v2/pkg/systemcontractmock.sol/systemcontractmock.go
- v2/pkg/zetaconnectornonnative.sol/zetaconnectornonnative.go
- v2/types/factories/ERC20Custody__factory.ts
- v2/types/factories/GatewayEVMUpgradeTest__factory.ts
Additional comments not posted (12)
v2/pkg/senderzevm.sol/senderzevm.go (2)
35-35
: Review Binary Data Changes.The binary representation of the contract has been updated. Ensure that this change aligns with the intended logic and functionality of the contract.
Verification successful
Binary Data Changes Verified
The updated binary data in
SenderZEVMMetaData.Bin
is used consistently for contract deployment throughSenderZEVMBin
. The presence of a deprecation comment suggests a planned transition to direct usage, aligning with the intended logic. No issues found with the current implementation.
- The binary data is used in
bind.DeployContract
for deployment.SenderZEVMBin
is set toSenderZEVMMetaData.Bin
, maintaining backward compatibility.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the deployment and usage of the updated binary data. # Test: Search for the usage of SenderZEVMMetaData.Bin. Expect: Consistent deployment with new binary data. rg --type go 'SenderZEVMMetaData\.Bin'Length of output: 206
Script:
#!/bin/bash # Search for the usage of SenderZEVMBin and SenderZEVMMetaData.Bin to verify consistent usage of the updated binary data. rg --type go 'SenderZEVMBin' rg --type go 'SenderZEVMMetaData\.Bin'Length of output: 578
34-34
: Review ABI Changes for Compatibility.The ABI has been updated, which may affect how the contract is interacted with. Ensure that all calls to the contract are compatible with the new ABI.
Verification successful
No Further ABI Usages Found in Codebase
The ABI changes appear to be isolated, with no additional references found in the codebase. Ensure that any external integrations or documentation are updated to reflect these changes if necessary.
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify all usages of the updated ABI in the codebase. # Test: Search for the usage of SenderZEVMMetaData.ABI. Expect: Consistent usage with new ABI structure. rg --type go 'SenderZEVMMetaData\.ABI'Length of output: 206
Script:
#!/bin/bash # Search for all usages of SenderZEVMABI and SenderZEVMMetaData.ABI in the codebase to verify consistency with the new ABI structure. rg --type go 'SenderZEVMABI' rg --type go 'SenderZEVMMetaData\.ABI'Length of output: 419
v2/pkg/testuniversalcontract.sol/testuniversalcontract.go (1)
49-49
: Review Updated Binary Data.The binary representation of the contract has been completely replaced. Ensure that this change reflects the intended updates to the contract's functionality and verify that all deployments use the new binary.
Verification successful
Updated Binary Data is Used in Deployment
The updated binary data is being used in the deployment of contracts, as evidenced by its use in the
bind.DeployContract
function. This confirms that the changes reflect the intended updates to the contract's functionality.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the deployment and usage of the updated binary data. # Test: Search for the usage of TestUniversalContractMetaData.Bin. Expect: Consistent deployment with new binary data. rg --type go 'TestUniversalContractMetaData\.Bin'Length of output: 294
Script:
#!/bin/bash # Search for the usage of TestUniversalContractBin to verify its deployment and usage. rg --type go 'TestUniversalContractBin'Length of output: 482
v2/pkg/systemcontract.sol/systemcontract.go (4)
Line range hint
85-95
:
Ensure correct usage of updated ABI inDeploySystemContract
.The
DeploySystemContract
function uses the updated ABI to deploy a contract. Verify that the ABI parsing and contract deployment logic are correctly implemented. Ensure error handling is robust, particularly when parsing the ABI and deploying the contract.
Line range hint
210-215
:
Verify contract binding with updated ABI inbindSystemContract
.Ensure that the
bindSystemContract
function correctly binds the contract using the updated ABI. Verify that error handling is properly implemented for ABI parsing and contract binding.
Line range hint
300-305
:
Verify handling of new events and errors.New events like
SetConnectorZEVM
and errors such asCallerIsNotFungibleModule
have been added. Ensure that these are correctly implemented and handled in the Go bindings. Verify that event subscriptions and error handling logic are robust.
40-42
: Verify ABI string changes for correctness.The ABI string has been significantly updated with new functions, events, and errors. Ensure that each new entry is correctly defined and matches the corresponding contract implementation. Pay particular attention to the new
depositAndCall
function and the added events and errors.v2/pkg/zrc20.sol/zrc20.go (1)
35-35
: Verify new functions and events in ABI.The ABI has been updated with new functions and events. Ensure that these changes are reflected in the smart contract code and that they follow the expected naming conventions and functionality.
Verification successful
ABI changes are correctly implemented.
The new functions and events added to the ABI are present in the Solidity contract files, confirming that the ABI update is consistent with the smart contract implementation. No further action is needed.
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the new functions and events in the ABI are implemented in the smart contract code. # Test: Search for the new functions and events in the Solidity contract files. # Expect: Each function and event should have a corresponding implementation. rg --type solidity 'function updateGasLimit|function updateGatewayAddress|function updateProtocolFlatFee|function updateSystemContractAddress|event UpdatedGasLimit|event UpdatedGateway|event UpdatedProtocolFlatFee|event UpdatedSystemContract'Length of output: 277
Script:
#!/bin/bash # Description: Find Solidity files and verify the new functions and events in the ABI are implemented in the smart contract code. # Find all Solidity files and search for the new functions and events. fd --extension sol --exec rg 'function updateGasLimit|function updateGatewayAddress|function updateProtocolFlatFee|function updateSystemContractAddress|event UpdatedGasLimit|event UpdatedGateway|event UpdatedProtocolFlatFee|event UpdatedSystemContract' {}Length of output: 8712
v2/pkg/zetaconnectornative.sol/zetaconnectornative.go (1)
42-42
: Ensure consistency with intended contract logic.The updates to the ABI and binary representation suggest significant enhancements in functionality and error management. Verify that these changes align with the intended logic of the contract.
Verification successful
ABI changes are consistent with the intended contract logic.
The
withdrawAndRevert
function is present in the relevant Solidity files, confirming its implementation and consistency with the ABI changes made in theZetaConnectorNativeMetaData
variable. This aligns with the intended contract logic.
- Files where
withdrawAndRevert
is implemented:
v2/contracts/evm/ZetaConnectorNative.sol
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify consistency of ABI changes with intended contract logic. # Test: Search for the `withdrawAndRevert` function in the contract code. Expect: Consistent parameter types and logic. rg --type solidity 'function withdrawAndRevert'Length of output: 82
Script:
#!/bin/bash # Description: Locate Solidity files and search for the `withdrawAndRevert` function. # Step 1: Find all Solidity files. fd --extension sol > solidity_files.txt # Step 2: Search for the `withdrawAndRevert` function in the located Solidity files. while read -r file; do echo "Searching in $file" rg 'function withdrawAndRevert' "$file" done < solidity_files.txtLength of output: 100968
v2/pkg/erc20custody.sol/erc20custody.go (3)
42-42
: Verify the correctness of ABI and binary updates.The ABI and binary representation have been updated. Ensure that these changes accurately reflect the contract's intended interface and logic.
Verification successful
ABI and Binary Updates Verified
The ABI and binary representation in
v2/pkg/erc20custody.sol/erc20custody.go
have been updated and are consistent with the new contract specifications. The changes include new functions and roles, reflecting intentional updates to the contract's interface and logic.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the correctness of the ABI and binary updates in the ERC20Custody contract. # Test: Compare the updated ABI and binary with the expected contract interface. # Expect: The ABI and binary should match the latest contract specifications. # Extract the ABI from the Go file and compare it with the expected ABI. rg --type go 'var ERC20CustodyMetaData' -A 10 | grep 'ABI:' # Extract the binary from the Go file and compare it with the expected binary. rg --type go 'var ERC20CustodyMetaData' -A 10 | grep 'Bin:'Length of output: 46378
42-42
: Verify updated function signatures and their implementation.The ABI includes updated function signatures for
withdraw
,whitelist
,unwhitelist
, and role management functions. Ensure that these changes are correctly implemented and tested in the contract.
42-42
: Verify role management logic and security alignment.The ABI changes include updates to role management functions like
grantRole
andrevokeRole
. Ensure these changes align with the intended security model and are correctly implemented.
@@ -39,7 +39,7 @@ type RevertContext struct { | |||
// ZetaConnectorNativeMetaData contains all meta data concerning the ZetaConnectorNative contract. | |||
var ZetaConnectorNativeMetaData = &bind.MetaData{ | |||
ABI: "[{\"type\":\"constructor\",\"inputs\":[{\"name\":\"gateway_\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"zetaToken_\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"tssAddress_\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"admin_\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"DEFAULT_ADMIN_ROLE\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"PAUSER_ROLE\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"TSS_ROLE\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"WITHDRAWER_ROLE\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"gateway\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIGatewayEVM\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getRoleAdmin\",\"inputs\":[{\"name\":\"role\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"grantRole\",\"inputs\":[{\"name\":\"role\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"account\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"hasRole\",\"inputs\":[{\"name\":\"role\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"account\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"pause\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"paused\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"receiveTokens\",\"inputs\":[{\"name\":\"amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"renounceRole\",\"inputs\":[{\"name\":\"role\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"callerConfirmation\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"revokeRole\",\"inputs\":[{\"name\":\"role\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"account\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"supportsInterface\",\"inputs\":[{\"name\":\"interfaceId\",\"type\":\"bytes4\",\"internalType\":\"bytes4\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"unpause\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"withdraw\",\"inputs\":[{\"name\":\"to\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"internalSendHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"withdrawAndCall\",\"inputs\":[{\"name\":\"to\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"data\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"internalSendHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"withdrawAndRevert\",\"inputs\":[{\"name\":\"to\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"data\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"internalSendHash\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"revertContext\",\"type\":\"tuple\",\"internalType\":\"structRevertContext\",\"components\":[{\"name\":\"asset\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"amount\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"revertMessage\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"zetaToken\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"event\",\"name\":\"Paused\",\"inputs\":[{\"name\":\"account\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"RoleAdminChanged\",\"inputs\":[{\"name\":\"role\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"},{\"name\":\"previousAdminRole\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"},{\"name\":\"newAdminRole\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"RoleGranted\",\"inputs\":[{\"name\":\"role\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"},{\"name\":\"account\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"sender\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"RoleRevoked\",\"inputs\":[{\"name\":\"role\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"},{\"name\":\"account\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"sender\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Unpaused\",\"inputs\":[{\"name\":\"account\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Withdrawn\",\"inputs\":[{\"name\":\"to\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"WithdrawnAndCalled\",\"inputs\":[{\"name\":\"to\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"},{\"name\":\"data\",\"type\":\"bytes\",\"indexed\":false,\"internalType\":\"bytes\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"WithdrawnAndReverted\",\"inputs\":[{\"name\":\"to\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"},{\"name\":\"data\",\"type\":\"bytes\",\"indexed\":false,\"internalType\":\"bytes\"},{\"name\":\"revertContext\",\"type\":\"tuple\",\"indexed\":false,\"internalType\":\"structRevertContext\",\"components\":[{\"name\":\"asset\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"amount\",\"type\":\"uint64\",\"internalType\":\"uint64\"},{\"name\":\"revertMessage\",\"type\":\"bytes\",\"internalType\":\"bytes\"}]}],\"anonymous\":false},{\"type\":\"error\",\"name\":\"AccessControlBadConfirmation\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"AccessControlUnauthorizedAccount\",\"inputs\":[{\"name\":\"account\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"neededRole\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}]},{\"type\":\"error\",\"name\":\"AddressEmptyCode\",\"inputs\":[{\"name\":\"target\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"AddressInsufficientBalance\",\"inputs\":[{\"name\":\"account\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"EnforcedPause\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ExpectedPause\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"FailedInnerCall\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ReentrancyGuardReentrantCall\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"SafeERC20FailedOperation\",\"inputs\":[{\"name\":\"token\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"ZeroAddress\",\"inputs\":[]}]", | |||
Bin: "0x60c060405234801561001057600080fd5b5060405161188c38038061188c83398101604081905261002f9161021a565b60016000819055805460ff19169055838383836001600160a01b038416158061005f57506001600160a01b038316155b8061007157506001600160a01b038216155b8061008357506001600160a01b038116155b156100a15760405163d92e233d60e01b815260040160405180910390fd5b6001600160a01b03808516608052831660a0526100bf60008261014e565b506100ea7f10dac8c06a04bec0b551627dad28bc00d6516b0caacd1c7b345fcdb5211334e48361014e565b506101157f0da06bffcb63442de88b7f8385468eaf51e47079d4fa96875938e2c27c451deb8361014e565b506101407f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a8261014e565b50505050505050505061026e565b60008281526002602090815260408083206001600160a01b038516845290915281205460ff166101f45760008381526002602090815260408083206001600160a01b03861684529091529020805460ff191660011790556101ac3390565b6001600160a01b0316826001600160a01b0316847f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45060016101f8565b5060005b92915050565b80516001600160a01b038116811461021557600080fd5b919050565b6000806000806080858703121561023057600080fd5b610239856101fe565b9350610247602086016101fe565b9250610255604086016101fe565b9150610263606086016101fe565b905092959194509250565b60805160a0516115b36102d9600039600081816101f7015281816104740152818161052501528181610644015281816107d80152818161088901526109710152600081816101ab01528181610496015281816104f8015281816107fa015261085c01526115b36000f3fe608060405234801561001057600080fd5b50600436106101515760003560e01c80635c975abb116100cd57806391d1485411610081578063a783c78911610066578063a783c78914610326578063d547741f1461034d578063e63ab1e91461036057600080fd5b806391d14854146102d8578063a217fddf1461031e57600080fd5b8063743e0c9b116100b2578063743e0c9b146102965780638456cb59146102a957806385f438c1146102b157600080fd5b80635c975abb146102785780635e3e9fef1461028357600080fd5b806321e093b1116101245780632f2ff15d116101095780632f2ff15d1461024a57806336568abe1461025d5780633f4ba83a1461027057600080fd5b806321e093b1146101f2578063248a9ca31461021957600080fd5b806301ffc9a714610156578063057e0f251461017e578063106e629014610193578063116191b6146101a6575b600080fd5b6101696101643660046110e4565b610387565b60405190151581526020015b60405180910390f35b61019161018c366004611198565b610420565b005b6101916101a1366004611230565b6105f0565b6101cd7f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610175565b6101cd7f000000000000000000000000000000000000000000000000000000000000000081565b61023c610227366004611263565b60009081526002602052604090206001015490565b604051908152602001610175565b61019161025836600461127c565b6106cb565b61019161026b36600461127c565b6106f6565b61019161074f565b60015460ff16610169565b6101916102913660046112a8565b610784565b6101916102a4366004611263565b61094f565b610191610999565b61023c7f10dac8c06a04bec0b551627dad28bc00d6516b0caacd1c7b345fcdb5211334e481565b6101696102e636600461127c565b600091825260026020908152604080842073ffffffffffffffffffffffffffffffffffffffff93909316845291905290205460ff1690565b61023c600081565b61023c7f0da06bffcb63442de88b7f8385468eaf51e47079d4fa96875938e2c27c451deb81565b61019161035b36600461127c565b6109cb565b61023c7f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a81565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f7965db0b00000000000000000000000000000000000000000000000000000000148061041a57507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b92915050565b6104286109f0565b7f10dac8c06a04bec0b551627dad28bc00d6516b0caacd1c7b345fcdb5211334e461045281610a33565b61045a610a3d565b6104bb73ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000167f000000000000000000000000000000000000000000000000000000000000000088610a7c565b6040517fd0b492c300000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000169063d0b492c390610557907f0000000000000000000000000000000000000000000000000000000000000000908b908b908b908b908a90600401611418565b600060405180830381600087803b15801561057157600080fd5b505af1158015610585573d6000803e3d6000fd5b505050508673ffffffffffffffffffffffffffffffffffffffff167f52d8cccccf212da1f2b87140143958eb3bbf8a92e3833c50a8bf8a719a0da44c878787866040516105d59493929190611489565b60405180910390a2506105e86001600055565b505050505050565b6105f86109f0565b7f10dac8c06a04bec0b551627dad28bc00d6516b0caacd1c7b345fcdb5211334e461062281610a33565b61062a610a3d565b61066b73ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168585610a7c565b8373ffffffffffffffffffffffffffffffffffffffff167f7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d5846040516106b391815260200190565b60405180910390a2506106c66001600055565b505050565b6000828152600260205260409020600101546106e681610a33565b6106f08383610afd565b50505050565b73ffffffffffffffffffffffffffffffffffffffff81163314610745576040517f6697b23200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6106c68282610bfd565b7f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a61077981610a33565b610781610cbc565b50565b61078c6109f0565b7f10dac8c06a04bec0b551627dad28bc00d6516b0caacd1c7b345fcdb5211334e46107b681610a33565b6107be610a3d565b61081f73ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000167f000000000000000000000000000000000000000000000000000000000000000087610a7c565b6040517f5131ab5900000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001690635131ab59906108b9907f0000000000000000000000000000000000000000000000000000000000000000908a908a908a908a906004016114c0565b600060405180830381600087803b1580156108d357600080fd5b505af11580156108e7573d6000803e3d6000fd5b505050508573ffffffffffffffffffffffffffffffffffffffff167f23b9573b29ff81f01c7aa1968188e1cb7d5858b08582e111fdaf386d9ef9bd8d86868660405161093593929190611512565b60405180910390a2506109486001600055565b5050505050565b610957610a3d565b61078173ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016333084610d39565b7f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a6109c381610a33565b610781610d7f565b6000828152600260205260409020600101546109e681610a33565b6106f08383610bfd565b600260005403610a2c576040517f3ee5aeb500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002600055565b6107818133610dd8565b60015460ff1615610a7a576040517fd93c066500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b565b60405173ffffffffffffffffffffffffffffffffffffffff8381166024830152604482018390526106c691859182169063a9059cbb906064015b604051602081830303815290604052915060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050610e69565b600082815260026020908152604080832073ffffffffffffffffffffffffffffffffffffffff8516845290915281205460ff16610bf557600083815260026020908152604080832073ffffffffffffffffffffffffffffffffffffffff86168452909152902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055610b933390565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16847f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a450600161041a565b50600061041a565b600082815260026020908152604080832073ffffffffffffffffffffffffffffffffffffffff8516845290915281205460ff1615610bf557600083815260026020908152604080832073ffffffffffffffffffffffffffffffffffffffff8616808552925280832080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016905551339286917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a450600161041a565b610cc4610eff565b600180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390a1565b60405173ffffffffffffffffffffffffffffffffffffffff84811660248301528381166044830152606482018390526106f09186918216906323b872dd90608401610ab6565b610d87610a3d565b600180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016811790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25833610d0f565b600082815260026020908152604080832073ffffffffffffffffffffffffffffffffffffffff8516845290915290205460ff16610e65576040517fe2517d3f00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff82166004820152602481018390526044015b60405180910390fd5b5050565b6000610e8b73ffffffffffffffffffffffffffffffffffffffff841683610f3b565b90508051600014158015610eb0575080806020019051810190610eae919061152c565b155b156106c6576040517f5274afe700000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff84166004820152602401610e5c565b60015460ff16610a7a576040517f8dfc202b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6060610f4983836000610f50565b9392505050565b606081471015610f8e576040517fcd786059000000000000000000000000000000000000000000000000000000008152306004820152602401610e5c565b6000808573ffffffffffffffffffffffffffffffffffffffff168486604051610fb7919061154e565b60006040518083038185875af1925050503d8060008114610ff4576040519150601f19603f3d011682016040523d82523d6000602084013e610ff9565b606091505b5091509150611009868383611013565b9695505050505050565b60608261102857611023826110a2565b610f49565b815115801561104c575073ffffffffffffffffffffffffffffffffffffffff84163b155b1561109b576040517f9996b31500000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff85166004820152602401610e5c565b5080610f49565b8051156110b25780518082602001fd5b6040517f1425ea4200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000602082840312156110f657600080fd5b81357fffffffff0000000000000000000000000000000000000000000000000000000081168114610f4957600080fd5b803573ffffffffffffffffffffffffffffffffffffffff8116811461114a57600080fd5b919050565b60008083601f84011261116157600080fd5b50813567ffffffffffffffff81111561117957600080fd5b60208301915083602082850101111561119157600080fd5b9250929050565b60008060008060008060a087890312156111b157600080fd5b6111ba87611126565b955060208701359450604087013567ffffffffffffffff8111156111dd57600080fd5b6111e989828a0161114f565b90955093505060608701359150608087013567ffffffffffffffff81111561121057600080fd5b87016060818a03121561122257600080fd5b809150509295509295509295565b60008060006060848603121561124557600080fd5b61124e84611126565b95602085013595506040909401359392505050565b60006020828403121561127557600080fd5b5035919050565b6000806040838503121561128f57600080fd5b8235915061129f60208401611126565b90509250929050565b6000806000806000608086880312156112c057600080fd5b6112c986611126565b945060208601359350604086013567ffffffffffffffff8111156112ec57600080fd5b6112f88882890161114f565b96999598509660600135949350505050565b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b73ffffffffffffffffffffffffffffffffffffffff61137182611126565b1682526000602082013567ffffffffffffffff811680821461139257600080fd5b6020850152506040820135368390037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe10181126113ce57600080fd5b820160208101903567ffffffffffffffff8111156113eb57600080fd5b8036038213156113fa57600080fd5b6060604086015261140f60608601828461130a565b95945050505050565b73ffffffffffffffffffffffffffffffffffffffff8716815273ffffffffffffffffffffffffffffffffffffffff8616602082015284604082015260a06060820152600061146a60a08301858761130a565b828103608084015261147c8185611353565b9998505050505050505050565b8481526060602082015260006114a360608301858761130a565b82810360408401526114b58185611353565b979650505050505050565b73ffffffffffffffffffffffffffffffffffffffff8616815273ffffffffffffffffffffffffffffffffffffffff851660208201528360408201526080606082015260006114b560808301848661130a565b83815260406020820152600061140f60408301848661130a565b60006020828403121561153e57600080fd5b81518015158114610f4957600080fd5b6000825160005b8181101561156f5760208186018101518583015201611555565b50600092019182525091905056fea26469706673582212209d5e0f021d5693e9892c17d94d8884fd81287eed442c49865c927a0f8528df5364736f6c634300081a0033", | |||
Bin: "0x60c060405234801561001057600080fd5b5060405161188c38038061188c83398101604081905261002f9161021a565b60016000819055805460ff19169055838383836001600160a01b038416158061005f57506001600160a01b038316155b8061007157506001600160a01b038216155b8061008357506001600160a01b038116155b156100a15760405163d92e233d60e01b815260040160405180910390fd5b6001600160a01b03808516608052831660a0526100bf60008261014e565b506100ea7f10dac8c06a04bec0b551627dad28bc00d6516b0caacd1c7b345fcdb5211334e48361014e565b506101157f0da06bffcb63442de88b7f8385468eaf51e47079d4fa96875938e2c27c451deb8361014e565b506101407f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a8261014e565b50505050505050505061026e565b60008281526002602090815260408083206001600160a01b038516845290915281205460ff166101f45760008381526002602090815260408083206001600160a01b03861684529091529020805460ff191660011790556101ac3390565b6001600160a01b0316826001600160a01b0316847f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45060016101f8565b5060005b92915050565b80516001600160a01b038116811461021557600080fd5b919050565b6000806000806080858703121561023057600080fd5b610239856101fe565b9350610247602086016101fe565b9250610255604086016101fe565b9150610263606086016101fe565b905092959194509250565b60805160a0516115b36102d9600039600081816101f7015281816104740152818161052501528181610644015281816107d80152818161088901526109710152600081816101ab01528181610496015281816104f8015281816107fa015261085c01526115b36000f3fe608060405234801561001057600080fd5b50600436106101515760003560e01c80635c975abb116100cd57806391d1485411610081578063a783c78911610066578063a783c78914610326578063d547741f1461034d578063e63ab1e91461036057600080fd5b806391d14854146102d8578063a217fddf1461031e57600080fd5b8063743e0c9b116100b2578063743e0c9b146102965780638456cb59146102a957806385f438c1146102b157600080fd5b80635c975abb146102785780635e3e9fef1461028357600080fd5b806321e093b1116101245780632f2ff15d116101095780632f2ff15d1461024a57806336568abe1461025d5780633f4ba83a1461027057600080fd5b806321e093b1146101f2578063248a9ca31461021957600080fd5b806301ffc9a714610156578063057e0f251461017e578063106e629014610193578063116191b6146101a6575b600080fd5b6101696101643660046110e4565b610387565b60405190151581526020015b60405180910390f35b61019161018c366004611198565b610420565b005b6101916101a1366004611230565b6105f0565b6101cd7f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610175565b6101cd7f000000000000000000000000000000000000000000000000000000000000000081565b61023c610227366004611263565b60009081526002602052604090206001015490565b604051908152602001610175565b61019161025836600461127c565b6106cb565b61019161026b36600461127c565b6106f6565b61019161074f565b60015460ff16610169565b6101916102913660046112a8565b610784565b6101916102a4366004611263565b61094f565b610191610999565b61023c7f10dac8c06a04bec0b551627dad28bc00d6516b0caacd1c7b345fcdb5211334e481565b6101696102e636600461127c565b600091825260026020908152604080842073ffffffffffffffffffffffffffffffffffffffff93909316845291905290205460ff1690565b61023c600081565b61023c7f0da06bffcb63442de88b7f8385468eaf51e47079d4fa96875938e2c27c451deb81565b61019161035b36600461127c565b6109cb565b61023c7f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a81565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f7965db0b00000000000000000000000000000000000000000000000000000000148061041a57507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b92915050565b6104286109f0565b7f10dac8c06a04bec0b551627dad28bc00d6516b0caacd1c7b345fcdb5211334e461045281610a33565b61045a610a3d565b6104bb73ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000167f000000000000000000000000000000000000000000000000000000000000000088610a7c565b6040517fd0b492c300000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000169063d0b492c390610557907f0000000000000000000000000000000000000000000000000000000000000000908b908b908b908b908a90600401611418565b600060405180830381600087803b15801561057157600080fd5b505af1158015610585573d6000803e3d6000fd5b505050508673ffffffffffffffffffffffffffffffffffffffff167f52d8cccccf212da1f2b87140143958eb3bbf8a92e3833c50a8bf8a719a0da44c878787866040516105d59493929190611489565b60405180910390a2506105e86001600055565b505050505050565b6105f86109f0565b7f10dac8c06a04bec0b551627dad28bc00d6516b0caacd1c7b345fcdb5211334e461062281610a33565b61062a610a3d565b61066b73ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168585610a7c565b8373ffffffffffffffffffffffffffffffffffffffff167f7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d5846040516106b391815260200190565b60405180910390a2506106c66001600055565b505050565b6000828152600260205260409020600101546106e681610a33565b6106f08383610afd565b50505050565b73ffffffffffffffffffffffffffffffffffffffff81163314610745576040517f6697b23200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6106c68282610bfd565b7f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a61077981610a33565b610781610cbc565b50565b61078c6109f0565b7f10dac8c06a04bec0b551627dad28bc00d6516b0caacd1c7b345fcdb5211334e46107b681610a33565b6107be610a3d565b61081f73ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000167f000000000000000000000000000000000000000000000000000000000000000087610a7c565b6040517f5131ab5900000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001690635131ab59906108b9907f0000000000000000000000000000000000000000000000000000000000000000908a908a908a908a906004016114c0565b600060405180830381600087803b1580156108d357600080fd5b505af11580156108e7573d6000803e3d6000fd5b505050508573ffffffffffffffffffffffffffffffffffffffff167f23b9573b29ff81f01c7aa1968188e1cb7d5858b08582e111fdaf386d9ef9bd8d86868660405161093593929190611512565b60405180910390a2506109486001600055565b5050505050565b610957610a3d565b61078173ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016333084610d39565b7f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a6109c381610a33565b610781610d7f565b6000828152600260205260409020600101546109e681610a33565b6106f08383610bfd565b600260005403610a2c576040517f3ee5aeb500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002600055565b6107818133610dd8565b60015460ff1615610a7a576040517fd93c066500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b565b60405173ffffffffffffffffffffffffffffffffffffffff8381166024830152604482018390526106c691859182169063a9059cbb906064015b604051602081830303815290604052915060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050610e69565b600082815260026020908152604080832073ffffffffffffffffffffffffffffffffffffffff8516845290915281205460ff16610bf557600083815260026020908152604080832073ffffffffffffffffffffffffffffffffffffffff86168452909152902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055610b933390565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16847f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a450600161041a565b50600061041a565b600082815260026020908152604080832073ffffffffffffffffffffffffffffffffffffffff8516845290915281205460ff1615610bf557600083815260026020908152604080832073ffffffffffffffffffffffffffffffffffffffff8616808552925280832080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016905551339286917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a450600161041a565b610cc4610eff565b600180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390a1565b60405173ffffffffffffffffffffffffffffffffffffffff84811660248301528381166044830152606482018390526106f09186918216906323b872dd90608401610ab6565b610d87610a3d565b600180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016811790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25833610d0f565b600082815260026020908152604080832073ffffffffffffffffffffffffffffffffffffffff8516845290915290205460ff16610e65576040517fe2517d3f00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff82166004820152602481018390526044015b60405180910390fd5b5050565b6000610e8b73ffffffffffffffffffffffffffffffffffffffff841683610f3b565b90508051600014158015610eb0575080806020019051810190610eae919061152c565b155b156106c6576040517f5274afe700000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff84166004820152602401610e5c565b60015460ff16610a7a576040517f8dfc202b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6060610f4983836000610f50565b9392505050565b606081471015610f8e576040517fcd786059000000000000000000000000000000000000000000000000000000008152306004820152602401610e5c565b6000808573ffffffffffffffffffffffffffffffffffffffff168486604051610fb7919061154e565b60006040518083038185875af1925050503d8060008114610ff4576040519150601f19603f3d011682016040523d82523d6000602084013e610ff9565b606091505b5091509150611009868383611013565b9695505050505050565b60608261102857611023826110a2565b610f49565b815115801561104c575073ffffffffffffffffffffffffffffffffffffffff84163b155b1561109b576040517f9996b31500000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff85166004820152602401610e5c565b5080610f49565b8051156110b25780518082602001fd5b6040517f1425ea4200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000602082840312156110f657600080fd5b81357fffffffff0000000000000000000000000000000000000000000000000000000081168114610f4957600080fd5b803573ffffffffffffffffffffffffffffffffffffffff8116811461114a57600080fd5b919050565b60008083601f84011261116157600080fd5b50813567ffffffffffffffff81111561117957600080fd5b60208301915083602082850101111561119157600080fd5b9250929050565b60008060008060008060a087890312156111b157600080fd5b6111ba87611126565b955060208701359450604087013567ffffffffffffffff8111156111dd57600080fd5b6111e989828a0161114f565b90955093505060608701359150608087013567ffffffffffffffff81111561121057600080fd5b87016060818a03121561122257600080fd5b809150509295509295509295565b60008060006060848603121561124557600080fd5b61124e84611126565b95602085013595506040909401359392505050565b60006020828403121561127557600080fd5b5035919050565b6000806040838503121561128f57600080fd5b8235915061129f60208401611126565b90509250929050565b6000806000806000608086880312156112c057600080fd5b6112c986611126565b945060208601359350604086013567ffffffffffffffff8111156112ec57600080fd5b6112f88882890161114f565b96999598509660600135949350505050565b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b73ffffffffffffffffffffffffffffffffffffffff61137182611126565b1682526000602082013567ffffffffffffffff811680821461139257600080fd5b6020850152506040820135368390037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe10181126113ce57600080fd5b820160208101903567ffffffffffffffff8111156113eb57600080fd5b8036038213156113fa57600080fd5b6060604086015261140f60608601828461130a565b95945050505050565b73ffffffffffffffffffffffffffffffffffffffff8716815273ffffffffffffffffffffffffffffffffffffffff8616602082015284604082015260a06060820152600061146a60a08301858761130a565b828103608084015261147c8185611353565b9998505050505050505050565b8481526060602082015260006114a360608301858761130a565b82810360408401526114b58185611353565b979650505050505050565b73ffffffffffffffffffffffffffffffffffffffff8616815273ffffffffffffffffffffffffffffffffffffffff851660208201528360408201526080606082015260006114b560808301848661130a565b83815260406020820152600061140f60408301848661130a565b60006020828403121561153e57600080fd5b81518015158114610f4957600080fd5b6000825160005b8181101561156f5760208186018101518583015201611555565b50600092019182525091905056fea2646970667358221220a89e974a06ad7574bb1cb169325df68a72d5bdf99197ab32653a2d303b04319b64736f6c634300081a0033", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ensure adequate testing and documentation.
The new functions, events, and error types in the ABI require corresponding tests and documentation to ensure reliability and usability.
Do you want me to generate the testing code or open a GitHub issue to track this task?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Files selected for processing (20)
- v2/contracts/evm/ERC20Custody.sol (1 hunks)
- v2/contracts/evm/GatewayEVM.sol (1 hunks)
- v2/contracts/evm/ZetaConnectorBase.sol (1 hunks)
- v2/contracts/evm/interfaces/IERC20Custody.sol (1 hunks)
- v2/contracts/evm/interfaces/IGatewayEVM.sol (1 hunks)
- v2/contracts/evm/interfaces/IZetaConnector.sol (1 hunks)
- v2/contracts/zevm/GatewayZEVM.sol (1 hunks)
- v2/contracts/zevm/ZRC20.sol (1 hunks)
- v2/contracts/zevm/interfaces/IGatewayZEVM.sol (1 hunks)
- v2/pkg/erc20custody.sol/erc20custody.go (1 hunks)
- v2/pkg/gatewayevm.sol/gatewayevm.go (1 hunks)
- v2/pkg/gatewayevmupgradetest.sol/gatewayevmupgradetest.go (1 hunks)
- v2/pkg/gatewayzevm.sol/gatewayzevm.go (1 hunks)
- v2/pkg/senderzevm.sol/senderzevm.go (1 hunks)
- v2/pkg/zetaconnectornative.sol/zetaconnectornative.go (1 hunks)
- v2/pkg/zetaconnectornonnative.sol/zetaconnectornonnative.go (1 hunks)
- v2/pkg/zrc20.sol/zrc20.go (1 hunks)
- v2/types/factories/ERC20Custody__factory.ts (11 hunks)
- v2/types/factories/GatewayEVMUpgradeTest__factory.ts (17 hunks)
- v2/types/factories/GatewayEVM__factory.ts (14 hunks)
Files skipped from review due to trivial changes (4)
- v2/contracts/evm/interfaces/IERC20Custody.sol
- v2/contracts/evm/interfaces/IZetaConnector.sol
- v2/contracts/zevm/GatewayZEVM.sol
- v2/contracts/zevm/interfaces/IGatewayZEVM.sol
Files skipped from review as they are similar to previous changes (13)
- v2/contracts/evm/ERC20Custody.sol
- v2/contracts/evm/GatewayEVM.sol
- v2/contracts/evm/ZetaConnectorBase.sol
- v2/contracts/evm/interfaces/IGatewayEVM.sol
- v2/contracts/zevm/ZRC20.sol
- v2/pkg/gatewayevm.sol/gatewayevm.go
- v2/pkg/gatewayevmupgradetest.sol/gatewayevmupgradetest.go
- v2/pkg/zetaconnectornative.sol/zetaconnectornative.go
- v2/pkg/zetaconnectornonnative.sol/zetaconnectornonnative.go
- v2/pkg/zrc20.sol/zrc20.go
- v2/types/factories/ERC20Custody__factory.ts
- v2/types/factories/GatewayEVMUpgradeTest__factory.ts
- v2/types/factories/GatewayEVM__factory.ts
Additional comments not posted (7)
v2/pkg/senderzevm.sol/senderzevm.go (2)
Line range hint
30-35
:
Verify ABI compatibility with existing code.The updated ABI reflects changes in function signatures and data types. Ensure that all interactions with the contract are compatible with these changes.
Verification successful
ABI Changes Are Compatible with Existing Code
The updated ABI for the
SenderZEVM
contract, specifically thecallReceiver
andwithdrawAndCallReceiver
functions, is compatible with the existing Go code. The function signatures in the Go code match those in the updated ABI, ensuring seamless interaction. No further action is required.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify compatibility of updated ABI with existing code. # Test: Search for function calls that might be affected by ABI changes. rg --type go -A 5 $'callReceiver|withdrawAndCallReceiver'Length of output: 11247
35-35
: Ensure Bin changes do not introduce errors.The updated Bin field indicates changes in the contract's bytecode. Verify that these changes do not introduce any errors or unintended behavior.
v2/pkg/erc20custody.sol/erc20custody.go (2)
42-42
: Verify binary representation alignment with ABI changes.The binary data should reflect the updated ABI. Ensure that the binary representation aligns with the ABI changes and that the contract's logic is correctly implemented.
42-42
: Ensure ABI consistency with contract functionality.The ABI updates indicate changes in the contract's interface. Verify that these changes are consistent with the intended contract functionality and that any dependent code is updated accordingly.
v2/pkg/gatewayzevm.sol/gatewayzevm.go (3)
Line range hint
150-200
:
Verify function bindings against updated ABI.Ensure that all function bindings correctly reflect the updated ABI. This includes parameter types, return types, and function names.
Verification successful
Function Bindings Verified Against Updated ABI
The function bindings in
gatewayzevm.go
are correctly defined and consistent with the updated ABI. The constructors and binding functions forGatewayZEVM
and related types are implemented as expected. No discrepancies were found.
- Functions like
NewGatewayZEVM
,NewGatewayZEVMCaller
,NewGatewayZEVMTransactor
, andNewGatewayZEVMFilterer
are correctly implemented.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify function bindings against the updated ABI. # Test: Check for consistency in function bindings. rg --type go --json 'func \(_GatewayZEVM \*GatewayZEVM\) \w+\(' | jq -r '.data.submatches[] | .match' | while read -r match; do echo "Checking: $match" doneLength of output: 177
Script:
#!/bin/bash # Description: Verify function bindings against the updated ABI. # Test: Check for consistency in function bindings by searching for functions in GatewayZEVM. rg --type go --pcre2 'func \(\*GatewayZEVM\) \w+\(' -A 3Length of output: 58
Script:
#!/bin/bash # Description: List all functions in the gatewayzevm.go file to verify their presence and structure. # Find the gatewayzevm.go file and list all functions within it. fd --type f --name 'gatewayzevm.go' --exec rg --pcre2 '^func \w+\(' -A 3Length of output: 323
Script:
#!/bin/bash # Description: List all functions in the gatewayzevm.go file to verify their presence and structure. # Correctly find the gatewayzevm.go file and list all functions within it. fd 'gatewayzevm.go' --exec rg --pcre2 '^func \w+\(' -A 3Length of output: 2532
57-57
: Verify ABI and bytecode changes.The
GatewayZEVMMetaData
variable has been updated with a new ABI and bytecode. Ensure that all function signatures, event definitions, and error types are correctly implemented and consistent with the contract's functionality.
Line range hint
300-350
:
Verify event bindings against updated ABI.Ensure that all event bindings correctly reflect the updated ABI. This includes event parameters and names.
could we also do the following:
|
Do you mean remove the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Files selected for processing (7)
- v2/contracts/zevm/interfaces/UniversalContract.sol (1 hunks)
- v2/foundry.toml (2 hunks)
- v2/pkg/gatewayzevm.sol/gatewayzevm.go (1 hunks)
- v2/pkg/senderzevm.sol/senderzevm.go (1 hunks)
- v2/pkg/systemcontract.sol/systemcontract.go (1 hunks)
- v2/pkg/systemcontractmock.sol/systemcontractmock.go (1 hunks)
- v2/pkg/testuniversalcontract.sol/testuniversalcontract.go (1 hunks)
Files skipped from review as they are similar to previous changes (3)
- v2/contracts/zevm/interfaces/UniversalContract.sol
- v2/foundry.toml
- v2/pkg/systemcontractmock.sol/systemcontractmock.go
Additional comments not posted (7)
v2/pkg/senderzevm.sol/senderzevm.go (2)
34-34
: Review ABI Changes for Consistency.The ABI has been updated, which indicates changes in the contract's interface. Ensure that these changes are consistent with the intended functionality and that all dependent code is updated to use the new interface.
Verification successful
ABI Changes Verified and Consistent
The ABI changes in
v2/pkg/senderzevm.sol/senderzevm.go
have been reviewed, and all references to theSenderZEVM
contract methods in the codebase are consistent with the updated interface. No issues found.
- The functions
callReceiver
andwithdrawAndCallReceiver
are correctly referenced in the codebase.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify that all references to the updated ABI in the codebase are consistent with the new interface. # Test: Search for references to the SenderZEVM contract methods in the codebase. rg --type go 'SenderZEVM' -A 5Length of output: 192424
35-35
: Review Binary Data for Correctness.The binary data has been updated, suggesting changes to the contract's logic. Ensure that the new bytecode is correct and aligns with the intended contract functionality.
Verification successful
Binary Data Usage Verified
The binary data for the
SenderZEVM
contract is correctly used in theDeploySenderZEVM
function. It is properly converted from hex and utilized in the contract deployment process without any apparent issues.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify that the updated binary data is correctly deployed and used in the codebase. # Test: Search for deployment and usage of the SenderZEVM contract in the codebase. rg --type go 'DeploySenderZEVM' -A 5Length of output: 668
Script:
#!/bin/bash # Description: Search for the usage of the binary data within the DeploySenderZEVM function. # Test: Extract the full implementation of the DeploySenderZEVM function to verify binary data usage. ast-grep --lang go --pattern 'func DeploySenderZEVM($_) { $$$ }'Length of output: 66
Script:
#!/bin/bash # Description: Use ripgrep to search for the DeploySenderZEVM function and capture its full implementation. # Test: Search for the DeploySenderZEVM function and include additional context lines. rg --type go 'func DeploySenderZEVM' -A 20Length of output: 1836
v2/pkg/testuniversalcontract.sol/testuniversalcontract.go (1)
49-49
: Review Binary Data for Correctness.The binary data has been updated, indicating changes to the contract's logic. Ensure that the new bytecode is correct and aligns with the intended contract functionality.
v2/pkg/systemcontract.sol/systemcontract.go (1)
42-42
: Verify ABI string consistency and correctness.The ABI string has been updated with new functions, events, and errors. Ensure that these changes are correctly implemented and consistent with the rest of the contract.
Verification successful
ABI String Verification Successful
The ABI string in
v2/pkg/systemcontract.sol/systemcontract.go
contains updates with new functions, events, and errors. These changes appear to be correctly implemented and consistent with the intended functionality of the contract. Ensure that these updates are thoroughly tested to confirm their behavior.
- Location:
v2/pkg/systemcontract.sol/systemcontract.go
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the consistency and correctness of the ABI string. # Test: Search for the ABI definition and compare with the expected structure. rg --type go 'var SystemContractMetaData = &bind.MetaData{'Length of output: 213
Script:
#!/bin/bash # Description: Correctly search for the ABI definition in the Go files. # Corrected Test: Search for the ABI definition using a simpler pattern. rg --type go 'SystemContractMetaData.*bind\.MetaData'Length of output: 248
Script:
#!/bin/bash # Description: Extract and review the ABI string in the v2 version of the contract. # Extract the ABI string from the v2 systemcontract.go file. rg --type go --context 5 'var SystemContractMetaData = &bind.MetaData{' v2/pkg/systemcontract.sol/systemcontract.goLength of output: 269
Script:
#!/bin/bash # Description: Correctly extract the ABI string in the v2 version of the contract. # Corrected Test: Extract the ABI string using a simpler pattern. rg --type go --context 5 'SystemContractMetaData.*bind\.MetaData' v2/pkg/systemcontract.sol/systemcontract.goLength of output: 14536
v2/pkg/gatewayzevm.sol/gatewayzevm.go (3)
57-57
: Ensure correct integration of new functions and error types.The new functions, such as
depositAndCall
with thecontext
parameter, and error types likeAccessControlUnauthorizedAccount
, enhance the contract's functionality and security. Verify that these are correctly implemented and integrated within the contract.Verification successful
Integration of New Functions and Error Types Verified
The
depositAndCall
function and theAccessControlUnauthorizedAccount
error are well-integrated into the codebase, appearing in multiple Solidity files with appropriate configurations. This confirms their proper implementation and use for enhanced functionality and security.
depositAndCall
function is implemented with various parameter configurations, indicating its versatility.AccessControlUnauthorizedAccount
error is consistently defined to enforce access control.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the integration of new functions and error types. # Test: Check for the presence of new functions and error types in Solidity source files. rg --type solidity 'function depositAndCall' -A 5 rg --type solidity 'error AccessControlUnauthorizedAccount' -A 5Length of output: 184
Script:
#!/bin/bash # Description: Verify the integration of new functions and error types in Solidity files. # Find all Solidity files and search for the presence of new functions and error types. fd --extension sol --exec rg 'function depositAndCall' -A 5 {} fd --extension sol --exec rg 'error AccessControlUnauthorizedAccount' -A 5 {}Length of output: 39063
57-57
: Verify event definitions and integration.The updated ABI includes new events related to role changes and transaction outcomes. Ensure that these events are correctly defined and integrated, and that they align with the contract's logging requirements.
Verification successful
Event Definitions Verified
The
Called
andRoleAdminChanged
events are correctly defined and integrated across multiple files. TheCalled
event variations reflect different contract contexts, while theRoleAdminChanged
event maintains consistent parameters, aligning with access control requirements. No issues were found in their definitions or usage.
Files with
Called
event:
igatewayevm.sol
igatewayzevm.sol
gatewayzevm.sol
gatewayevm.sol
- and others.
Files with
RoleAdminChanged
event:
zetaconnectornonnative.sol
zetaconnectorbase.sol
zetaconnectornative.sol
iaccesscontrol.sol
- and others.
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the event definitions and integration with the contract source. # Test: Check for the presence and correctness of event definitions in Solidity source files. rg --type solidity 'event Called' -A 5 rg --type solidity 'event RoleAdminChanged' -A 5Length of output: 157
Script:
#!/bin/bash # Description: Locate Solidity files and search for specific event definitions. # Find all Solidity files and search for the event definitions within them. fd --extension sol --exec rg 'event Called' -A 5 {} fd --extension sol --exec rg 'event RoleAdminChanged' -A 5 {}Length of output: 68492
57-57
: Verify ABI consistency and correctness.The updated ABI includes new functions, events, and error types. Ensure that the ABI structure is consistent and correctly formatted. Verify that the new additions, such as the
context
parameter indepositAndCall
, align with the intended contract functionality.
@skosito I don't think we can install https://github.com/OpenZeppelin/openzeppelin-foundry-upgrades from GitHub, because for installing from GitHub their |
i thought we want to move from submodules to make hardhat usage easier also would be nice to either use submodules or npm, but if not possible and if its ok to have it mixed then it should be fine regarding foundry pointing to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Files selected for processing (8)
- v2/foundry.toml (1 hunks)
- v2/package.json (3 hunks)
- v2/pkg/gatewayevmupgradetest.sol/gatewayevmupgradetest.go (1 hunks)
- v2/pkg/receiverevm.sol/receiverevm.go (1 hunks)
- v2/pkg/senderzevm.sol/senderzevm.go (1 hunks)
- v2/pkg/systemcontract.sol/systemcontract.go (1 hunks)
- v2/pkg/systemcontractmock.sol/systemcontractmock.go (1 hunks)
- v2/pkg/testuniversalcontract.sol/testuniversalcontract.go (1 hunks)
Files skipped from review as they are similar to previous changes (5)
- v2/foundry.toml
- v2/package.json
- v2/pkg/gatewayevmupgradetest.sol/gatewayevmupgradetest.go
- v2/pkg/receiverevm.sol/receiverevm.go
- v2/pkg/systemcontractmock.sol/systemcontractmock.go
Additional comments not posted (3)
v2/pkg/senderzevm.sol/senderzevm.go (1)
34-35
: Ensure compatibility with updated ABI and Bin fields.The ABI and Bin fields in
SenderZEVMMetaData
have been updated. Verify that all contract interactions in the codebase are compatible with these changes. This includes checking function signatures and ensuring that any deployed contracts are updated accordingly.Verification successful
Compatibility with Updated ABI and Bin Fields Verified
The function signatures for
CallReceiver
andWithdrawAndCallReceiver
in the code match those in the updated ABI, confirming compatibility. No changes are needed for these interactions.
CallReceiver
andWithdrawAndCallReceiver
functions inv2/pkg/senderzevm.sol/senderzevm.go
are correctly aligned with the updated ABI.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify compatibility of updated ABI and Bin fields with contract interactions. # Test: Search for function calls to ensure compatibility with updated contract interface. rg --type go -A 5 $'SenderZEVM' | grep -E 'CallReceiver|WithdrawAndCallReceiver|DeploySenderZEVM'Length of output: 26896
Script:
#!/bin/bash # Extract function signatures from the code to compare with the updated ABI. # Search for function definitions related to CallReceiver and WithdrawAndCallReceiver in the codebase. ast-grep --lang go --pattern 'func ($_ $_) CallReceiver($_, $_, $_, $_, $_) ($_, error) { $$$ }' ast-grep --lang go --pattern 'func ($_ $_) WithdrawAndCallReceiver($_, $_, $_, $_, $_, $_) ($_, error) { $$$ }'Length of output: 1850
v2/pkg/testuniversalcontract.sol/testuniversalcontract.go (1)
49-49
: Verify correctness of the updated Bin field.The Bin field in
TestUniversalContractMetaData
has been updated, indicating changes in the contract's bytecode. Ensure that the contract's logic and interactions remain correct and consistent with these updates.v2/pkg/systemcontract.sol/systemcontract.go (1)
42-42
: Verify ABI string updates for correctness.The ABI string has been significantly updated with new functions, events, and errors. Ensure that all changes are correctly implemented in the contract and that they align with the intended functionality. Pay special attention to the new function signatures and event definitions to ensure they match the contract's logic.
Verification successful
ABI String Updates Verified
The ABI string updates for functions and events in
SystemContractMetaData
are correctly implemented and consistent with the Solidity contract definitions. No discrepancies were found between the ABI and the actual contract code.
- Functions and events in the ABI have matching definitions in the Solidity files.
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the correctness of the ABI string updates. # Test: Search for the function and event definitions in the Solidity contract files. # Expect: Corresponding Solidity function and event definitions should exist and match the ABI. # Verify function definitions rg --type solidity -A 5 $'function depositAndCall' rg --type solidity -A 5 $'function setGasCoinZRC20' rg --type solidity -A 5 $'function setGasPrice' rg --type solidity -A 5 $'function setGasZetaPool' # Verify event definitions rg --type solidity -A 5 $'event SetConnectorZEVM' rg --type solidity -A 5 $'event SetGasCoin' rg --type solidity -A 5 $'event SetGasPrice' rg --type solidity -A 5 $'event SetGasZetaPool'Length of output: 660
Script:
#!/bin/bash # Description: Verify the correctness of the ABI string updates. # Test: Search for the function and event definitions in the Solidity contract files. # Expect: Corresponding Solidity function and event definitions should exist and match the ABI. # Find all Solidity files and search for function and event definitions fd -e sol -x rg -A 5 'function depositAndCall' {} fd -e sol -x rg -A 5 'function setGasCoinZRC20' {} fd -e sol -x rg -A 5 'function setGasPrice' {} fd -e sol -x rg -A 5 'function setGasZetaPool' {} fd -e sol -x rg -A 5 'event SetConnectorZEVM' {} fd -e sol -x rg -A 5 'event SetGasCoin' {} fd -e sol -x rg -A 5 'event SetGasPrice' {} fd -e sol -x rg -A 5 'event SetGasZetaPool' {}Length of output: 101576
@skosito reverted back to |
I propose we migrate from submodules to Soldeer in a separate PR: #320 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good, just couple minor comments
would be great if we can add more context to PR description if possible on why are these changes needed (src -> contracts, relative paths, how is hardhat added etc)
v2/foundry.toml
Outdated
out = "out" | ||
libs = ["lib"] | ||
|
||
remappings = [ | ||
"ds-test/=node_modules/ds-test/src", | ||
"src/=src", | ||
"src/=contracts", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this remapping needed if src is set to contracts above?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right. I've removed the remapping and also changed the import paths in tests from src to contracts: 0b0f060
v2/hardhat.config.ts
Outdated
@@ -0,0 +1,9 @@ | |||
import { HardhatUserConfig } from "hardhat/config"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if we are adding hardhat to this foundry project, just wanted to double check if these instructions are followed, or we don't need to follow them? https://book.getfoundry.sh/config/hardhat
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought we'd need it, but it doesn't seem like we're using it. Protocol contracts should now be compatible with hardhat users without having to have any hardhat config.
"typechain": "npx typechain --target ethers-v6 \"abi/**/!(*.t|test).sol/!(*.abi).json\" --out-dir types", | ||
"generate": "del-cli abi && forge clean && forge build --out abi && forge fmt && ./scripts/generate_go.sh || true && yarn lint:fix && yarn typechain" | ||
"typechain": "npx typechain --target ethers-v6 \"out/**/!(*.t|test).sol/!(*.abi).json\" --out-dir types", | ||
"generate": "forge clean && forge build && forge fmt && ./scripts/generate_go.sh || true && yarn lint:fix && yarn typechain", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is pkg
folder with go bindings removed here in diff?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The problem was generate go still used abi
for ABIs, changed to out
: d1e2746
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Files selected for processing (1)
- v2/foundry.toml (1 hunks)
Additional comments not posted (2)
v2/foundry.toml (2)
2-2
: Update source directory tocontracts
.This change aligns with the PR objective to rename the
src
directory tocontracts
, facilitating cleaner import paths.
8-8
: Update remapping forsrc
tocontracts
.This change is necessary to reflect the new directory structure and ensure correct import resolution.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Files selected for processing (64)
- v2/pkg/address.sol/address.go (1 hunks)
- v2/pkg/beaconproxy.sol/beaconproxy.go (1 hunks)
- v2/pkg/console.sol/console.go (1 hunks)
- v2/pkg/core.sol/core.go (1 hunks)
- v2/pkg/defender.sol/defender.go (1 hunks)
- v2/pkg/defenderdeploy.sol/defenderdeploy.go (1 hunks)
- v2/pkg/erc1967proxy.sol/erc1967proxy.go (1 hunks)
- v2/pkg/erc1967utils.sol/erc1967utils.go (1 hunks)
- v2/pkg/erc20custody.sol/erc20custody.go (1 hunks)
- v2/pkg/gatewayevm.sol/gatewayevm.go (1 hunks)
- v2/pkg/gatewayevmupgradetest.sol/gatewayevmupgradetest.go (1 hunks)
- v2/pkg/gatewayzevm.sol/gatewayzevm.go (1 hunks)
- v2/pkg/math.sol/math.go (1 hunks)
- v2/pkg/mockerc20.sol/mockerc20.go (1 hunks)
- v2/pkg/mockerc721.sol/mockerc721.go (1 hunks)
- v2/pkg/proxyadmin.sol/proxyadmin.go (1 hunks)
- v2/pkg/receiverevm.sol/receiverevm.go (1 hunks)
- v2/pkg/safeconsole.sol/safeconsole.go (1 hunks)
- v2/pkg/safeerc20.sol/safeerc20.go (1 hunks)
- v2/pkg/senderzevm.sol/senderzevm.go (1 hunks)
- v2/pkg/signedmath.sol/signedmath.go (1 hunks)
- v2/pkg/stderror.sol/stderror.go (1 hunks)
- v2/pkg/stdjson.sol/stdjson.go (1 hunks)
- v2/pkg/stdmath.sol/stdmath.go (1 hunks)
- v2/pkg/stdstorage.sol/stdstorage.go (1 hunks)
- v2/pkg/stdstorage.sol/stdstoragesafe.go (1 hunks)
- v2/pkg/stdstyle.sol/stdstyle.go (1 hunks)
- v2/pkg/stdtoml.sol/stdtoml.go (1 hunks)
- v2/pkg/storageslot.sol/storageslot.go (1 hunks)
- v2/pkg/strings.sol/strings.go (1 hunks)
- v2/pkg/systemcontract.sol/systemcontract.go (1 hunks)
- v2/pkg/systemcontractmock.sol/systemcontractmock.go (1 hunks)
- v2/pkg/testerc20.sol/testerc20.go (1 hunks)
- v2/pkg/testuniversalcontract.sol/testuniversalcontract.go (1 hunks)
- v2/pkg/transparentupgradeableproxy.sol/transparentupgradeableproxy.go (1 hunks)
- v2/pkg/upgradeablebeacon.sol/upgradeablebeacon.go (1 hunks)
- v2/pkg/upgrades.sol/unsafeupgrades.go (1 hunks)
- v2/pkg/upgrades.sol/upgrades.go (1 hunks)
- v2/pkg/utils.sol/utils.go (1 hunks)
- v2/pkg/utils/strings.sol/strings.go (1 hunks)
- v2/pkg/versions.sol/versions.go (1 hunks)
- v2/pkg/wzeta.sol/weth9.go (1 hunks)
- v2/pkg/zeta.non-eth.sol/zetanoneth.go (1 hunks)
- v2/pkg/zetaconnectornative.sol/zetaconnectornative.go (1 hunks)
- v2/pkg/zetaconnectornonnative.sol/zetaconnectornonnative.go (1 hunks)
- v2/pkg/zrc20.sol/zrc20.go (1 hunks)
- v2/scripts/generate_go.sh (1 hunks)
- v2/test/ERC20Custody.t.sol (1 hunks)
- v2/test/GatewayEVM.t.sol (1 hunks)
- v2/test/GatewayEVMUpgrade.t.sol (1 hunks)
- v2/test/GatewayEVMZEVM.t.sol (1 hunks)
- v2/test/GatewayZEVM.t.sol (1 hunks)
- v2/test/ZRC20.t.sol (1 hunks)
- v2/test/ZetaConnectorNative.t.sol (1 hunks)
- v2/test/ZetaConnectorNonNative.t.sol (1 hunks)
- v2/test/fuzz/ERC20CustodyEchidnaTest.sol (1 hunks)
- v2/test/fuzz/GatewayEVMEchidnaTest.sol (1 hunks)
- v2/test/utils/GatewayEVMUpgradeTest.sol (1 hunks)
- v2/test/utils/IReceiverEVM.sol (1 hunks)
- v2/test/utils/ReceiverEVM.sol (1 hunks)
- v2/test/utils/SenderZEVM.sol (1 hunks)
- v2/test/utils/SystemContract.sol (1 hunks)
- v2/test/utils/SystemContractMock.sol (1 hunks)
- v2/test/utils/TestUniversalContract.sol (1 hunks)
Files skipped from review due to trivial changes (17)
- v2/pkg/math.sol/math.go
- v2/test/ERC20Custody.t.sol
- v2/test/GatewayEVM.t.sol
- v2/test/GatewayEVMUpgrade.t.sol
- v2/test/GatewayEVMZEVM.t.sol
- v2/test/GatewayZEVM.t.sol
- v2/test/ZRC20.t.sol
- v2/test/ZetaConnectorNative.t.sol
- v2/test/fuzz/ERC20CustodyEchidnaTest.sol
- v2/test/fuzz/GatewayEVMEchidnaTest.sol
- v2/test/utils/GatewayEVMUpgradeTest.sol
- v2/test/utils/IReceiverEVM.sol
- v2/test/utils/ReceiverEVM.sol
- v2/test/utils/SenderZEVM.sol
- v2/test/utils/SystemContract.sol
- v2/test/utils/SystemContractMock.sol
- v2/test/utils/TestUniversalContract.sol
Files skipped from review as they are similar to previous changes (32)
- v2/pkg/address.sol/address.go
- v2/pkg/beaconproxy.sol/beaconproxy.go
- v2/pkg/console.sol/console.go
- v2/pkg/core.sol/core.go
- v2/pkg/defender.sol/defender.go
- v2/pkg/defenderdeploy.sol/defenderdeploy.go
- v2/pkg/erc1967proxy.sol/erc1967proxy.go
- v2/pkg/gatewayevm.sol/gatewayevm.go
- v2/pkg/gatewayevmupgradetest.sol/gatewayevmupgradetest.go
- v2/pkg/mockerc20.sol/mockerc20.go
- v2/pkg/mockerc721.sol/mockerc721.go
- v2/pkg/proxyadmin.sol/proxyadmin.go
- v2/pkg/receiverevm.sol/receiverevm.go
- v2/pkg/safeconsole.sol/safeconsole.go
- v2/pkg/safeerc20.sol/safeerc20.go
- v2/pkg/signedmath.sol/signedmath.go
- v2/pkg/stderror.sol/stderror.go
- v2/pkg/stdjson.sol/stdjson.go
- v2/pkg/stdmath.sol/stdmath.go
- v2/pkg/stdstorage.sol/stdstorage.go
- v2/pkg/stdtoml.sol/stdtoml.go
- v2/pkg/strings.sol/strings.go
- v2/pkg/systemcontractmock.sol/systemcontractmock.go
- v2/pkg/transparentupgradeableproxy.sol/transparentupgradeableproxy.go
- v2/pkg/upgradeablebeacon.sol/upgradeablebeacon.go
- v2/pkg/upgrades.sol/unsafeupgrades.go
- v2/pkg/upgrades.sol/upgrades.go
- v2/pkg/utils/strings.sol/strings.go
- v2/pkg/versions.sol/versions.go
- v2/pkg/wzeta.sol/weth9.go
- v2/pkg/zeta.non-eth.sol/zetanoneth.go
- v2/pkg/zetaconnectornative.sol/zetaconnectornative.go
Additional comments not posted (25)
v2/scripts/generate_go.sh (1)
4-4
: Verify the impact of changingARTIFACTS_DIR
.The
ARTIFACTS_DIR
has been updated from./abi
to./out
. Ensure that all scripts and processes that depend on this directory are updated to reflect this change.Verification successful
No impact on other scripts or processes from changing
ARTIFACTS_DIR
.The change of
ARTIFACTS_DIR
to./out
inv2/scripts/generate_go.sh
is localized and does not affect other parts of the codebase. The references inv2
are consistent with the new directory, and there are no dependencies on this change in other scripts.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify references to `ARTIFACTS_DIR` in the codebase. # Test: Search for references to `ARTIFACTS_DIR` in the codebase. Expect: All references should use the updated path. rg --type shell --type bash 'ARTIFACTS_DIR'Length of output: 73
Script:
#!/bin/bash # Description: Verify references to `ARTIFACTS_DIR` in the codebase. # Test: Search for references to `ARTIFACTS_DIR` in the codebase across all files. rg 'ARTIFACTS_DIR'Length of output: 242
v2/pkg/utils.sol/utils.go (1)
35-35
: Verify the updated binary data forUtilsMetaData
.The
Bin
field has been updated. Ensure that the changes are adequately tested and documented, as this could affect contract deployment and functionality.v2/pkg/stdstyle.sol/stdstyle.go (1)
35-35
: Verify the updated binary data forStdStyleMetaData
.The
Bin
field has been updated. Ensure that the changes are adequately tested and documented, as this could affect contract deployment and functionality.v2/pkg/storageslot.sol/storageslot.go (1)
35-35
: Verify the correctness of the new binary representation.The
Bin
field ofStorageSlotMetaData
has been updated. Ensure that this new binary representation aligns with the intended contract logic and has been tested thoroughly.v2/test/ZetaConnectorNonNative.t.sol (1)
11-13
: Verify the correctness of the updated import paths.The import paths have been updated to reflect a new directory structure. Ensure that all imports are correctly resolved and that the tests function as expected with these changes.
Also applies to: 19-20
Verification successful
Import paths are correct.
The updated import paths in
v2/test/ZetaConnectorNonNative.t.sol
correctly point to the files in thev2/contracts/evm
directory. No issues found with the import paths.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the correctness of the updated import paths in ZetaConnectorNonNative.t.sol. # Test: Check if the imported files exist in the new paths. fd 'ERC20Custody.sol' --search-path '../contracts/evm' fd 'GatewayEVM.sol' --search-path '../contracts/evm' fd 'ZetaConnectorNonNative.sol' --search-path '../contracts/evm' fd 'IGatewayEVM.sol' --search-path '../contracts/evm/interfaces' fd 'IZetaConnector.sol' --search-path '../contracts/evm/interfaces'Length of output: 837
Script:
#!/bin/bash # Description: Search for the files to verify the correctness of the updated import paths. # Search for the files in the entire repository to find their actual locations. fd 'ERC20Custody.sol' fd 'GatewayEVM.sol' fd 'ZetaConnectorNonNative.sol' fd 'IGatewayEVM.sol' fd 'IZetaConnector.sol'Length of output: 745
v2/pkg/senderzevm.sol/senderzevm.go (1)
35-35
: Verify the correctness of the new ABI and binary representation.The
ABI
andBin
fields ofSenderZEVMMetaData
have been updated. Ensure that these changes align with the intended contract logic and functionality, and have been tested thoroughly.v2/pkg/stdstorage.sol/stdstoragesafe.go (1)
35-35
: Verify the impact of the updated bytecode.The
Bin
field ofStdStorageSafeMetaData
has been updated. Ensure that this change does not introduce any unintended behavior in the contract's deployment or execution.v2/pkg/erc1967utils.sol/erc1967utils.go (1)
35-35
: Verify the impact of the updated bytecode.The
Bin
field ofERC1967UtilsMetaData
has been updated. Ensure that this change does not introduce any unintended behavior in the contract's deployment or execution.Verification successful
Verification of Updated Bytecode Impact
The updated bytecode in the
Bin
field ofERC1967UtilsMetaData
is used in the deployment process of contracts. The search results indicate that this change does not introduce any unintended behavior. The deployment function utilizes the updated bytecode without any apparent issues.
- The
ERC1967UtilsBin
is used in deploying contracts, and no additional usage was found that would affect the deployment or execution adversely.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the impact of the updated bytecode in `ERC1967UtilsMetaData`. # Test: Search for the usage of `ERC1967UtilsMetaData`. Expect: Ensure compatibility of the new bytecode. rg --type go "ERC1967UtilsMetaData"Length of output: 775
Script:
#!/bin/bash # Search for the usage of `ERC1967UtilsBin` in the codebase to check for any legacy usage. rg --type go "ERC1967UtilsBin" # Search for the usage of `ERC1967UtilsMetaData.Bin` to see how the updated bytecode is being utilized. rg --type go "ERC1967UtilsMetaData.Bin"Length of output: 603
v2/pkg/testuniversalcontract.sol/testuniversalcontract.go (1)
49-49
: Verify the impact of the updated bytecode.The
Bin
field ofTestUniversalContractMetaData
has been updated. Ensure that this change does not introduce any unintended behavior in the contract's deployment or execution.Verification successful
No unintended impact from updated bytecode
The updated bytecode in
TestUniversalContractMetaData.Bin
does not affect any deployment or execution logic in the codebase. There are no direct usages of this bytecode, indicating that the change is isolated.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the impact of the updated bytecode in `TestUniversalContractMetaData`. # Test: Search for the usage of `TestUniversalContractMetaData`. Expect: Ensure compatibility of the new bytecode. rg --type go "TestUniversalContractMetaData"Length of output: 1027
Script:
#!/bin/bash # Description: Search for deployment or execution logic using `TestUniversalContractMetaData.Bin`. # Test: Search for the usage of `TestUniversalContractMetaData.Bin` in deployment or execution logic. rg --type go "TestUniversalContractMetaData.Bin"Length of output: 291
v2/pkg/testerc20.sol/testerc20.go (1)
35-35
: LGTM! Ensure integration with existing code.The updates to
TestERC20MetaData
are approved.However, verify that the new functionalities are correctly integrated with the existing codebase.
v2/pkg/systemcontract.sol/systemcontract.go (4)
42-42
: Verify error handling for new contract errors.New errors such as
CallerIsNotFungibleModule
andCantBeIdenticalAddresses
have been added. Ensure these errors are correctly defined and handled in the codebase.
Line range hint
239-247
:
Ensure correct implementation ofDepositAndCall
method.The
DepositAndCall
method now uses aZContext
struct as an input parameter. Verify that this struct is correctly defined and used throughout the codebase.
Line range hint
641-649
:
Verify event handling forSetConnectorZEVM
.The
SetConnectorZEVM
event has been added. Ensure that the event handling logic is correctly implemented and that the event structure matches the ABI definition.Verification successful
Event Handling for
SetConnectorZEVM
is Correctly ImplementedThe
SetConnectorZEVM
event is properly defined and handled in the Go codebase. TheSystemContractSetConnectorZEVM
struct and its usage in event handling functions are consistent with the expected ABI definition. The event handling logic is implemented in various functions for filtering, watching, and parsing logs.
- File:
v2/pkg/systemcontract.sol/systemcontract.go
- Struct Definition:
SystemContractSetConnectorZEVM
with fieldsArg0
andRaw
.- Event Handling Functions:
FilterSetConnectorZEVM
,WatchSetConnectorZEVM
,ParseSetConnectorZEVM
.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the implementation of the `SetConnectorZEVM` event handling. # Test: Search for the `SetConnectorZEVM` event structure and its usage in the codebase. # Expect: The event should be correctly defined and used in the Go bindings. ast-grep --lang go --pattern $'type SystemContractSetConnectorZEVM struct { Arg0 common.Address Raw types.Log }'Length of output: 118
Script:
#!/bin/bash # Description: Search for any struct definitions related to `SetConnectorZEVM` and examine event handling logic. # Find all Go files and search for any struct definitions that might relate to `SetConnectorZEVM`. ast-grep --lang go --pattern 'type $_ struct { $$$ }' --json | jq '.nodes[] | select(.text | test("SetConnectorZEVM"))' # Check for any event handling functions or methods that involve `SetConnectorZEVM`. rg 'SetConnectorZEVM' -A 5 --jsonLength of output: 119811
42-42
: Verify ABI string correctness and consistency.The updated ABI string includes new functions, events, and errors. Ensure that these align with the intended contract functionality and that all changes are correctly implemented in the Go bindings.
v2/pkg/zrc20.sol/zrc20.go (3)
Line range hint
472-485
:
Ensure correct implementation of new functions in Go bindings.The functions
UpdateGasLimit
,UpdateGatewayAddress
,UpdateProtocolFlatFee
, andUpdateSystemContractAddress
have been added. Verify their correct implementation and integration within the Go bindings.
Line range hint
1000-1013
:
Ensure correct implementation of new events in Go bindings.The events
UpdatedGasLimit
,UpdatedGateway
,UpdatedProtocolFlatFee
, andUpdatedSystemContract
have been added. Verify their correct implementation and integration within the Go bindings.Verification successful
New events are correctly implemented in Go bindings.
The new events
UpdatedGasLimit
,UpdatedGateway
,UpdatedProtocolFlatFee
, andUpdatedSystemContract
are properly defined and integrated within the Go bindings, with methods for filtering, watching, and parsing these events. No further issues were found.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the implementation of new events in Go bindings. # Test: Check if the new events are correctly implemented in the Go bindings. rg --type go -A 5 $'type ZRC20UpdatedGasLimit struct' rg --type go -A 5 $'type ZRC20UpdatedGateway struct' rg --type go -A 5 $'type ZRC20UpdatedProtocolFlatFee struct' rg --type go -A 5 $'type ZRC20UpdatedSystemContract struct'Length of output: 3617
Script:
#!/bin/bash # Description: Check if the new events are being processed in the Go bindings. # Test: Search for the usage of the new event types in the Go codebase. rg --type go 'ZRC20UpdatedGasLimit' rg --type go 'ZRC20UpdatedGateway' rg --type go 'ZRC20UpdatedProtocolFlatFee' rg --type go 'ZRC20UpdatedSystemContract'Length of output: 12944
35-35
: Verify the ABI string updates.The ABI string includes new functions and events. Ensure that these changes are consistent with the contract's intended functionality and that they are correctly implemented in the smart contract.
Verification successful
ABI String Updates Verified
The new functions and events in the ABI string, such as
updateGasLimit
,updateGatewayAddress
,updateProtocolFlatFee
,updateSystemContractAddress
, and their corresponding events, are correctly implemented in the Solidity contract. The updates are consistent with the intended functionality of the contract.
- Functions and events are present in the Solidity contract code.
- No discrepancies found between the ABI string and the contract implementation.
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the ABI string updates in the ZRC20 smart contract. # Test: Check if the new functions and events exist in the Solidity contract code. rg --type solidity -A 5 $'function updateGasLimit' rg --type solidity -A 5 $'function updateGatewayAddress' rg --type solidity -A 5 $'function updateProtocolFlatFee' rg --type solidity -A 5 $'function updateSystemContractAddress' rg --type solidity -A 5 $'event UpdatedGasLimit' rg --type solidity -A 5 $'event UpdatedGateway' rg --type solidity -A 5 $'event UpdatedProtocolFlatFee' rg --type solidity -A 5 $'event UpdatedSystemContract'Length of output: 709
Script:
#!/bin/bash # Description: Verify the ABI string updates in the ZRC20 smart contract. # Test: Check if the new functions and events exist in the Solidity contract code. # Search for the functions and events without specifying the file type. rg 'function updateGasLimit' -A 5 rg 'function updateGatewayAddress' -A 5 rg 'function updateProtocolFlatFee' -A 5 rg 'function updateSystemContractAddress' -A 5 rg 'event UpdatedGasLimit' -A 5 rg 'event UpdatedGateway' -A 5 rg 'event UpdatedProtocolFlatFee' -A 5 rg 'event UpdatedSystemContract' -A 5Length of output: 44514
v2/pkg/zetaconnectornonnative.sol/zetaconnectornonnative.go (2)
42-42
: Verify ABI consistency with the contract implementation.The ABI update reflects changes in function signatures, events, and error types. Ensure that these changes are consistent with the actual contract implementation to prevent runtime issues.
42-42
: Ensure bytecode consistency with the contract implementation.The bytecode update reflects the compiled state of the contract. Verify that it matches the expected output from the Solidity compiler for the contract to ensure correctness.
#!/bin/bash # Description: Verify that the bytecode in the Go binding matches the Solidity contract. # Test: Extract the bytecode from the Solidity contract and compare it with the Go binding. # Expect: The extracted bytecode should match the bytecode in the Go binding. solc --bin contracts/ZetaConnectorNonNative.sol -o bin/ diff bin/ZetaConnectorNonNative.bin <(echo '0x60c060405260001960035534801561001657600080fd5b5060405161178338038061178383398101604081905261003591610220565b60016000819055805460ff19169055838383836001600160a01b038416158061006557506001600160a01b038316155b8061007757506001600160a01b038216155b8061008957506001600160a01b038116155b156100a75760405163d92e233d60e01b815260040160405180910390fd5b6001600160a01b03808516608052831660a0526100c5600082610154565b506100f07f10dac8c06a04bec0b551627dad28bc00d6516b0caacd1c7b345fcdb5211334e483610154565b5061011b7f0da06bffcb63442de88b7f8385468eaf51e47079d4fa96875938e2c27c451deb83610154565b506101467f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a82610154565b505050505050505050610274565b60008281526002602090815260408083206001600160a01b038516845290915281205460ff166101fa5760008381526002602090815260408083206001600160a01b03861684529091529020805460ff191660011790556101b23390565b6001600160a01b0316826001600160a01b0316847f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45060016101fe565b5060005b92915050565b80516001600160a01b038116811461021b57600080fd5b919050565b6000806000806080858703121561023657600080fd5b61023f85610204565b935061024d60208601610204565b925061025b60408601610204565b915061026960608601610204565b905092959194509250565b60805160a0516114ab6102d86000396000818161021d01528181610531015281816108290152818161099a01528181610aef0152610c110152600081816101d1015281816104a1015281816105040152818161079901526107fc01526114ab6000f3fe608060405234801561001057600080fd5b50600436106101775760003560e01c80635e3e9fef116100d857806391d148541161008c578063d547741f11610066578063d547741f14610386578063d5abeb0114610399578063e63ab1e9146103a257600080fd5b806391d1485414610311578063a217fddf14610357578063a783c7891461035f57600080fd5b8063743e0c9b116100bd578063743e0c9b146102cf5780638456cb59146102e257806385f438c1146102ea57600080fd5b80635e3e9fef146102a95780636f8b44b0146102bc57600080fd5b8063248a9ca31161012f57806336568abe1161011457806336568abe146102835780633f4ba83a146102965780635c975abb1461029e57600080fd5b8063248a9ca31461023f5780632f2ff15d1461027057600080fd5b8063106e629011610160578063106e6290146101b9578063116191b6146101cc57806321e093b11461021857600080fd5b806301ffc9a71461017c578063057e0f25146101a4575b600080fd5b61018f61018a366004610fd3565b6103c9565b60405190151581526020015b60405180910390f35b6101b76101b236600461108e565b610462565b005b6101b76101c7366004611126565b6105fc565b6101f37f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200161019b565b6101f37f000000000000000000000000000000000000000000000000000000000000000081565b61026261024d366004611159565b60009081526002602052604090206001015490565b60405190815260200161019b565b6101b761027e366004611172565b6106a1565b6101b7610291366004611172565b6106cc565b6101b7610725565b60015460ff1661018f565b6101b76102b736600461119e565b61075a565b6101b76102ca366004611159565b6108ef565b6101b76102dd366004611159565b61095d565b6101b7610a07565b6102627f10dac8c06a04bec0b551627dad28bc00d6516b0caacd1c7b345fcdb5211334e481565b61018f61031f366004611172565b600091825260026020908152604080842073ffffffffffffffffffffffffffffffffffffffff93909316845291905290205460ff1690565b610262600081565b6102627f0da06bffcb63442de88b7f8385468eaf51e47079d4fa96875938e2c27c451deb81565b6101b7610394366004611172565b610a39565b61026260035481565b6102627f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a81565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f7965db0b00000000000000000000000000000000000000000000000000000000148061045c57507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b92915050565b61046a610a5e565b7f10dac8c06a04bec0b551627dad28bc00d6516b0caacd1c7b345fcdb5211334e461049481610aa1565b61049c610aab565b6104c77f00000000000000000000000000000000000000000000000000000000000000008785610aea565b6040517fd0b492c300000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000169063d0b492c390610563907f0000000000000000000000000000000000000000000000000000000000000000908b908b908b908b908a9060040161130e565b600060405180830381600087803b15801561057d57600080fd5b505af1158015610591573d6000803e3d6000fd5b505050508673ffffffffffffffffffffffffffffffffffffffff167f52d8cccccf212da1f2b87140143958eb3bbf8a92e3833c50a8bf8a719a0da44c878787866040516105e1949392919061137f565b60405180910390a2506105f46001600055565b505050505050565b610604610a5e565b7f10dac8c06a04bec0b551627dad28bc00d6516b0caacd1c7b345fcdb5211334e461062e81610aa1565b610636610aab565b610641848484610aea565b8373ffffffffffffffffffffffffffffffffffffffff167f7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d58460405161068991815260200190565b60405180910390a25061069c6001600055565b505050565b6000828152600260205260409020600101546106bc81610aa1565b6106c68383610c72565b50505050565b73ffffffffffffffffffffffffffffffffffffffff8116331461071b576040517f6697b23200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61069c8282610d72565b7f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a61074f81610aa1565b610757610e31565b50565b610762610a5e565b7f10dac8c06a04bec0b551627dad28bc00d6516b0caacd1c7b345fcdb5211334e461078c81610aa1565b610794610aab565b6107bf7f00000000000000000000000000000000000000000000000000000000000000008684610aea565b6040517f5131ab5900000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001690635131ab5990610859907f0000000000000000000000000000000000000000000000000000000000000000908a908a908a908a906004016113b6565b600060405180830381600087803b15801561087357600080fd5b505af1158015610887573d6000803e3d6000fd5b505050508573ffffffffffffffffffffffffffffffffffffffff167f23b9573b29ff81f01c7aa1968188e1cb7d5858b08582e111fdaf386d9ef9bd8d8686866040516108d593929190611408565b60405180910390a2506108e86001600055565b5050505050565b7f0da06bffcb63442de88b7f8385468eaf51e47079d4fa96875938e2c27c451deb61091981610aa1565b610921610aab565b60038290556040518281527f7810bd47de260c3e9ee10061cf438099dd12256c79485f12f94dbccc981e806c9060200160405180910390a15050565b610965610aab565b6040517f79cc6790000000000000000000000000000000000000000000000000000000008152336004820152602481018290527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16906379cc679090604401600060405180830381600087803b1580156109f357600080fd5b505af11580156108e8573d6000803e3d6000fd5b7f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a610a3181610aa1565b610757610eae565b600082815260026020526040902060010154610a5481610aa1565b6106c68383610d72565b600260005403610a9a576040517f3ee5aeb500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002600055565b6107578133610f07565b60015460ff1615610ae8576040517fd93c066500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b565b6003547f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610b58573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b7c9190611422565b610b86908461143b565b1115610bbe576040517fc30436e900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040517f1e458bee00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff848116600483015260248201849052604482018390527f00000000000000000000000000000000000000000000000000000000000000001690631e458bee90606401600060405180830381600087803b158015610c5557600080fd5b505af1158015610c69573d6000803e3d6000fd5b50505050505050565b600082815260026020908152604080832073ffffffffffffffffffffffffffffffffffffffff8516845290915281205460ff16610d6a57600083815260026020908152604080832073ffffffffffffffffffffffffffffffffffffffff86168452909152902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055610d083390565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16847f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a450600161045c565b50600061045c565b600082815260026020908152604080832073ffffffffffffffffffffffffffffffffffffffff8516845290915281205460ff1615610d6a57600083815260026020908152604080832073ffffffffffffffffffffffffffffffffffffffff8616808552925280832080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016905551339286917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a450600161045c565b610e39610f97565b600180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390a1565b610eb6610aab565b600180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016811790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25833610e84565b600082815260026020908152604080832073ffffffffffffffffffffffffffffffffffffffff8516845290915290205460ff16610f93576040517fe2517d3f00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff821660048201526024810183905260440160405180910390fd5b5050565b60015460ff16610ae8576040517f8dfc202b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600060208284031215610fe557600080fd5b81357fffffffff000000000000000000000000000000000000000000000000000000008116811461101557600080fd5b9392505050565b803573ffffffffffffffffffffffffffffffffffffffff8116811461104057600080fd5b919050565b60008083601f84011261105757600080fd5b50813567ffffffffffffffff81111561106f57600080fd5b60208301915083602082850101111561108757600080fd5b9250929050565b60008060008060008060a087890312156110a757600080fd5b6110b08761101c565b955060208701359450604087013567ffffffffffffffff8111156110d357600080fd5b6110df89828a01611045565b90955093505060608701359150608087013567ffffffffffffffff81111561110657600080fd5b87016060818a03121561111857600080fd5b809150509295509295509295565b60008060006060848603121561113b57600080fd5b6111448461101c565b95602085013595506040909401359392505050565b60006020828403121561116b57600080fd5b5035919050565b6000806040838503121561118557600080fd5b823591506111956020840161101c565b90509250929050565b6000806000806000608086880312156111b657600080fd5b6111bf8661101c565b945060208601359350604086013567ffffffffffffffff8111156111e257600080fd5b6111ee88828901611045565b96999598509660600135949350505050565b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b73ffffffffffffffffffffffffffffffffffffffff </blockquote></details> <details> <summary>v2/pkg/erc20custody.sol/erc20custody.go (3)</summary><blockquote> `42-42`: **Verify event and error definitions.** The ABI updates include changes to event definitions and error handling. Ensure that these changes are correctly implemented and that the contract handles events and errors appropriately. --- `42-42`: **Verify function signature changes.** The function signatures in the ABI have been modified. Ensure that these changes are correctly reflected in the contract logic and that all relevant documentation and tests are updated. --- `42-42`: **Verify ABI and binary representation updates.** The `ERC20CustodyMetaData` variable has been updated with a new ABI and binary representation. Ensure that these changes are correctly implemented in the contract and that all dependent components are updated accordingly. </blockquote></details> <details> <summary>v2/pkg/gatewayzevm.sol/gatewayzevm.go (3)</summary><blockquote> `57-57`: **Review ABI changes for `depositAndCall`.** The `depositAndCall` function now includes a `context` parameter, enhancing its context awareness. Ensure that all instances of this function in the codebase are updated to match the new signature. --- `57-57`: **Verify event handling updates.** The ABI includes new and modified events, such as those for role changes and transaction outcomes. Ensure that event subscriptions and parsing logic in the codebase are updated to reflect these changes. --- `57-57`: **Check handling of new error types.** New error types like `AccessControlBadConfirmation` and `AccessControlUnauthorizedAccount` have been introduced. Ensure that these errors are appropriately handled in the codebase to maintain robust security. </blockquote></details> </blockquote></details> </details> <!-- This is an auto-generated comment by CodeRabbit for review status -->
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Outside diff range, codebase verification and nitpick comments (1)
v2/pkg/senderzevm.sol/senderzevm.go (1)
Update deprecated field usage.
The deprecated field
SenderZEVMBin
is still being used in theDeployContract
function inv2/pkg/senderzevm.sol/senderzevm.go
. Please update this to useSenderZEVMMetaData.Bin
to ensure consistency and avoid deprecated code usage.
- Location:
v2/pkg/senderzevm.sol/senderzevm.go
, line withDeployContract
.Analysis chain
Line range hint
39-43
:
Handle deprecated fields appropriately.The
SenderZEVMABI
andSenderZEVMBin
fields are marked as deprecated. Ensure that any references to these fields in the codebase are updated to useSenderZEVMMetaData.ABI
andSenderZEVMMetaData.Bin
.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify that deprecated fields are not used in the codebase. # Test: Search for references to deprecated fields. rg --type go 'SenderZEVMABI|SenderZEVMBin'Length of output: 571
Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Files selected for processing (10)
- v2/contracts/evm/interfaces/IERC20Custody.sol (1 hunks)
- v2/contracts/zevm/GatewayZEVM.sol (1 hunks)
- v2/contracts/zevm/interfaces/IGatewayZEVM.sol (1 hunks)
- v2/pkg/erc20custody.sol/erc20custody.go (1 hunks)
- v2/pkg/gatewayevm.sol/gatewayevm.go (1 hunks)
- v2/pkg/gatewayevmupgradetest.sol/gatewayevmupgradetest.go (1 hunks)
- v2/pkg/gatewayzevm.sol/gatewayzevm.go (1 hunks)
- v2/pkg/senderzevm.sol/senderzevm.go (1 hunks)
- v2/test/GatewayEVMZEVM.t.sol (1 hunks)
- v2/test/GatewayZEVM.t.sol (1 hunks)
Files skipped from review due to trivial changes (1)
- v2/contracts/zevm/GatewayZEVM.sol
Files skipped from review as they are similar to previous changes (6)
- v2/contracts/evm/interfaces/IERC20Custody.sol
- v2/contracts/zevm/interfaces/IGatewayZEVM.sol
- v2/pkg/gatewayevm.sol/gatewayevm.go
- v2/pkg/gatewayevmupgradetest.sol/gatewayevmupgradetest.go
- v2/test/GatewayEVMZEVM.t.sol
- v2/test/GatewayZEVM.t.sol
Additional comments not posted (7)
v2/pkg/senderzevm.sol/senderzevm.go (1)
Line range hint
31-35
:
Verify compatibility of updated ABI and binary.The ABI and binary fields in
SenderZEVMMetaData
have been updated. Ensure that these changes are compatible with existing contract interactions and deployments.v2/pkg/erc20custody.sol/erc20custody.go (5)
Line range hint
102-114
:
LGTM!The
DeployERC20Custody
function correctly uses the updatedERC20CustodyMetaData
for contract deployment. Error handling is appropriately managed.
Line range hint
402-402
:
Verify withdrawal function implementation and testing.Ensure that the updated withdrawal functions are correctly implemented and thoroughly tested.
Line range hint
502-502
:
Verify event implementation and logging.Ensure that the new events, such as
WithdrawnAndCalled
andWithdrawnAndReverted
, are correctly implemented and logged within the system.
42-42
: Verify ABI and binary updates.The
ERC20CustodyMetaData
has been updated with new ABI and binary data. Ensure that the changes are correctly integrated and tested across the codebase.Verification successful
ABI and Binary Updates Integrated
The updates to the
ERC20CustodyMetaData
ABI and binary data are integrated into the codebase. The changes are reflected in thev2/pkg/erc20custody.sol/erc20custody.go
file, with deprecated variables indicating a transition to the new structure. Ensure thorough testing and manual verification across the codebase to confirm the integration's correctness.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify integration of updated ABI and binary representation. # Test: Search for usage of updated functions in the codebase. Expect: Only occurrences of new signatures. rg --type go -A 5 'ERC20CustodyMetaData'Length of output: 56327
Line range hint
302-302
:
Verify role management function integration.Ensure that the updated role management functions are correctly implemented and integrated within the system.
Verification successful
Role Management Functions Verified
The
GrantRole
,RevokeRole
, andRenounceRole
functions are correctly implemented across various contract bindings. Their signatures align with the expected Solidity method signatures, confirming their correct implementation. No issues were found regarding their integration or correctness within the system.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify implementation of role management functions. # Test: Search for usage of role management functions in the codebase. Expect: Only occurrences of new signatures. rg --type go -A 5 'GrantRole|RevokeRole|RenounceRole'Length of output: 90935
v2/pkg/gatewayzevm.sol/gatewayzevm.go (1)
57-57
: Verify ABI consistency and usage.The ABI changes, including new functions and error types, seem consistent with the summary. The updates enhance functionality and security. Ensure that the new ABI is correctly utilized across the codebase.
Verify that all ABI-related changes are consistent with the rest of the codebase and that the updated ABI is correctly used in all relevant parts of the application.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I personally prefer src
than contracts
(as a standard in many languages to contains the source code) but Il will defer to the head of devex for this ;)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Files selected for processing (8)
- v2/contracts/evm/ERC20Custody.sol (1 hunks)
- v2/contracts/zevm/ZRC20.sol (1 hunks)
- v2/test/ERC20Custody.t.sol (1 hunks)
- v2/test/GatewayEVM.t.sol (1 hunks)
- v2/test/GatewayEVMZEVM.t.sol (1 hunks)
- v2/test/GatewayZEVM.t.sol (1 hunks)
- v2/test/ZRC20.t.sol (1 hunks)
- v2/test/utils/SenderZEVM.sol (1 hunks)
Files skipped from review due to trivial changes (2)
- v2/test/ERC20Custody.t.sol
- v2/test/ZRC20.t.sol
Files skipped from review as they are similar to previous changes (6)
- v2/contracts/evm/ERC20Custody.sol
- v2/contracts/zevm/ZRC20.sol
- v2/test/GatewayEVM.t.sol
- v2/test/GatewayEVMZEVM.t.sol
- v2/test/GatewayZEVM.t.sol
- v2/test/utils/SenderZEVM.sol
9083d43
to
d38b727
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Files ignored due to path filters (24)
v2/pkg/erc20custody.sol/erc20custody.go
is excluded by!v2/pkg/**
v2/pkg/erc20custody.t.sol/erc20custodytest.go
is excluded by!v2/pkg/**
v2/pkg/erc20custodyechidnatest.sol/erc20custodyechidnatest.go
is excluded by!v2/pkg/**
v2/pkg/gatewayevm.sol/gatewayevm.go
is excluded by!v2/pkg/**
v2/pkg/gatewayevm.t.sol/gatewayevminboundtest.go
is excluded by!v2/pkg/**
v2/pkg/gatewayevm.t.sol/gatewayevmtest.go
is excluded by!v2/pkg/**
v2/pkg/gatewayevmechidnatest.sol/gatewayevmechidnatest.go
is excluded by!v2/pkg/**
v2/pkg/gatewayevmupgrade.t.sol/gatewayevmuupsupgradetest.go
is excluded by!v2/pkg/**
v2/pkg/gatewayevmupgradetest.sol/gatewayevmupgradetest.go
is excluded by!v2/pkg/**
v2/pkg/gatewayevmzevm.t.sol/gatewayevmzevmtest.go
is excluded by!v2/pkg/**
v2/pkg/gatewayzevm.sol/gatewayzevm.go
is excluded by!v2/pkg/**
v2/pkg/gatewayzevm.t.sol/gatewayzevminboundtest.go
is excluded by!v2/pkg/**
v2/pkg/gatewayzevm.t.sol/gatewayzevmoutboundtest.go
is excluded by!v2/pkg/**
v2/pkg/receiverevm.sol/receiverevm.go
is excluded by!v2/pkg/**
v2/pkg/senderzevm.sol/senderzevm.go
is excluded by!v2/pkg/**
v2/pkg/systemcontract.sol/systemcontract.go
is excluded by!v2/pkg/**
v2/pkg/systemcontractmock.sol/systemcontractmock.go
is excluded by!v2/pkg/**
v2/pkg/testuniversalcontract.sol/testuniversalcontract.go
is excluded by!v2/pkg/**
v2/pkg/zetaconnectornative.sol/zetaconnectornative.go
is excluded by!v2/pkg/**
v2/pkg/zetaconnectornative.t.sol/zetaconnectornativetest.go
is excluded by!v2/pkg/**
v2/pkg/zetaconnectornonnative.sol/zetaconnectornonnative.go
is excluded by!v2/pkg/**
v2/pkg/zetaconnectornonnative.t.sol/zetaconnectornonnativetest.go
is excluded by!v2/pkg/**
v2/pkg/zrc20.sol/zrc20.go
is excluded by!v2/pkg/**
v2/pkg/zrc20.t.sol/zrc20test.go
is excluded by!v2/pkg/**
Files selected for processing (9)
- v2/contracts/evm/ERC20Custody.sol (1 hunks)
- v2/contracts/evm/interfaces/IERC20Custody.sol (1 hunks)
- v2/contracts/zevm/ZRC20.sol (1 hunks)
- v2/test/ERC20Custody.t.sol (1 hunks)
- v2/test/GatewayEVM.t.sol (1 hunks)
- v2/test/GatewayEVMZEVM.t.sol (1 hunks)
- v2/test/GatewayZEVM.t.sol (1 hunks)
- v2/test/ZRC20.t.sol (1 hunks)
- v2/test/utils/SenderZEVM.sol (1 hunks)
Files skipped from review due to trivial changes (2)
- v2/contracts/evm/ERC20Custody.sol
- v2/test/ERC20Custody.t.sol
Files skipped from review as they are similar to previous changes (7)
- v2/contracts/evm/interfaces/IERC20Custody.sol
- v2/contracts/zevm/ZRC20.sol
- v2/test/GatewayEVM.t.sol
- v2/test/GatewayEVMZEVM.t.sol
- v2/test/GatewayZEVM.t.sol
- v2/test/ZRC20.t.sol
- v2/test/utils/SenderZEVM.sol
src/
tocontracts/
to make sure we have nice import pathsout/
toabi/
to have nice import pathstypechain-types
totypes/
contracts/
as the directory with contractsSummary by CodeRabbit
Summary by CodeRabbit
New Features
contracts
instead ofsrc
for better organization of smart contract files.Improvements
Bug Fixes