-
Notifications
You must be signed in to change notification settings - Fork 33
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
Re-deploy Interchain Testnet Contracts #2344
Conversation
WalkthroughThe recent updates across various contract deployment files in the Changes
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 Configration File (
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## feat/communication #2344 +/- ##
============================================================
- Coverage 48.34123% 47.66098% -0.68026%
============================================================
Files 428 382 -46
Lines 30384 28730 -1654
Branches 204 83 -121
============================================================
- Hits 14688 13693 -995
+ Misses 14163 13593 -570
+ Partials 1533 1444 -89
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ 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.
Review Status
Actionable comments generated: 0
Configuration used: .coderabbit.yaml
Files selected for processing (14)
- packages/contracts-communication/deployments/eth_sepolia/ExecutionFees.json (2 hunks)
- packages/contracts-communication/deployments/eth_sepolia/ExecutionService.json (1 hunks)
- packages/contracts-communication/deployments/eth_sepolia/InterchainClientV1.json (13 hunks)
- packages/contracts-communication/deployments/eth_sepolia/InterchainDB.json (19 hunks)
- packages/contracts-communication/deployments/eth_sepolia/PingPongApp.json (4 hunks)
- packages/contracts-communication/deployments/eth_sepolia/SynapseGasOracleV1.json (1 hunks)
- packages/contracts-communication/deployments/eth_sepolia/SynapseModule.json (12 hunks)
- packages/contracts-communication/deployments/op_sepolia/ExecutionFees.json (2 hunks)
- packages/contracts-communication/deployments/op_sepolia/ExecutionService.json (1 hunks)
- packages/contracts-communication/deployments/op_sepolia/InterchainClientV1.json (12 hunks)
- packages/contracts-communication/deployments/op_sepolia/InterchainDB.json (19 hunks)
- packages/contracts-communication/deployments/op_sepolia/PingPongApp.json (4 hunks)
- packages/contracts-communication/deployments/op_sepolia/SynapseGasOracleV1.json (1 hunks)
- packages/contracts-communication/deployments/op_sepolia/SynapseModule.json (12 hunks)
Additional comments: 69
packages/contracts-communication/deployments/eth_sepolia/ExecutionService.json (3)
- 2-2: The contract address has been updated. Ensure that all references to this contract's address across the project are also updated to reflect this change.
Verification successful
The search for the updated contract address "0x47Db180bf3bE5AeE5Da3DfA9DAF1Ba9547A5E032" only found occurrences in the intended
ExecutionService.json
file. This indicates that there are no outdated references to this contract address elsewhere in the project, suggesting that the update has been properly handled.* 5-5: Receipt hash updated. Verify that this hash corresponds to a valid transaction on the Ethereum Sepolia testnet that deployed the new contract version.Scripts Executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Search for old contract address to ensure it's updated everywhere. rg "0x47Db180bf3bE5AeE5Da3DfA9DAF1Ba9547A5E032"Length of output: 185
Verification successful
The transaction hash
0xa11e748ee82e3defbddc51272a887c85b4c2561c81acb0b1753230c09f817ee3
corresponds to a valid transaction on the Ethereum Sepolia testnet that deployed the new contract version. The verification process confirms the hash's validity and its successful status.* 6-6: Block number updated. Confirm that this block number is accurate and corresponds to the block containing the contract deployment transaction.Scripts Executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Assuming the use of etherscan API for Sepolia testnet (if available) to verify the transaction hash. curl -X GET "https://api-sepolia.etherscan.io/api?module=transaction&action=getstatus&txhash=0xa11e748ee82e3defbddc51272a887c85b4c2561c81acb0b1753230c09f817ee3&apikey=YourApiKeyToken"Length of output: 631
packages/contracts-communication/deployments/op_sepolia/ExecutionService.json (3)
- 2-2: The contract address has been updated. Ensure that all references to this contract's address across the project are also updated to reflect this change.
Verification successful
The verification process confirms that the updated contract address is correctly reflected across the project, with no outdated references found. This aligns with the goal of ensuring that all references to the contract's address are updated.
* 5-5: Receipt hash updated. Verify that this hash corresponds to a valid transaction on the Ethereum Sepolia testnet that deployed the new contract version. * 6-6: Block number updated. Confirm that this block number is accurate and corresponds to the block containing the contract deployment transaction.Scripts Executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Search for old contract address to ensure it's updated everywhere. rg "0x0854bDdE8875B820973cb540ef367F26f8A4Eb03"Length of output: 184
packages/contracts-communication/deployments/eth_sepolia/ExecutionFees.json (4)
- 2-2: The contract address has been updated. Ensure that all references to this contract's address across the project are also updated to reflect this change.
Verification successful
The search for the old contract address
0xD0fd41B442Be26B15B56b47A7F0dE47328521208
only found occurrences in the expected file (packages/contracts-communication/deployments/eth_sepolia/ExecutionFees.json
). This indicates that all references to this contract's address across the project have been updated to reflect the change as required.* 5-5: Receipt hash updated. Verify that this hash corresponds to a valid transaction on the Ethereum Sepolia testnet that deployed the new contract version.Scripts Executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Search for old contract address to ensure it's updated everywhere. rg "0xD0fd41B442Be26B15B56b47A7F0dE47328521208"Length of output: 182
Verification successful
The transaction hash
0xb5ab461abab69b657842699771f0c9d29f8f8b419bda9e7a62f7360c05e934f8
corresponds to a valid transaction on the Ethereum Sepolia testnet, as indicated by the "isError":"0" in the query result. This confirms the receipt hash update is valid.* 6-6: Block number updated. Confirm that this block number is accurate and corresponds to the block containing the contract deployment transaction. * 500-516: The addition of new input fields (`dstChainId`, `transactionId`, `executor`) to the error type `ExecutionFees__AlreadyRecorded` enhances error reporting by providing more context. Ensure that these fields are properly utilized in the contract logic where this error is thrown.Scripts Executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Assuming the use of etherscan API for Sepolia testnet (if available) to verify the transaction hash. curl -X GET "https://api-sepolia.etherscan.io/api?module=transaction&action=getstatus&txhash=0xb5ab461abab69b657842699771f0c9d29f8f8b419bda9e7a62f7360c05e934f8&apikey=YourApiKeyToken"Length of output: 631
packages/contracts-communication/deployments/op_sepolia/ExecutionFees.json (4)
- 2-2: The contract address has been updated. Ensure that all references to this contract's address across the project are also updated to reflect this change.
Verification successful
The search for the old contract address "0x9E97773998dc14200DF9014585eE183c3FD73f01" only found it in the intended file
packages/contracts-communication/deployments/op_sepolia/ExecutionFees.json
. This indicates that all references to this contract's address across the project have been updated to reflect the change as required. No further action is needed.* 5-5: Receipt hash updated. Verify that this hash corresponds to a valid transaction on the Ethereum Sepolia testnet that deployed the new contract version.Scripts Executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Search for old contract address to ensure it's updated everywhere. rg "0x9E97773998dc14200DF9014585eE183c3FD73f01"Length of output: 181
Verification successful
The transaction hash
0x7e93bd76783eb72d783948ac8b64c910d049f7b73536055a5fc490fb57449a7e
corresponds to a valid transaction on the Ethereum Sepolia testnet. The verification process confirms the transaction exists and was processed without errors.* 6-6: Block number updated. Confirm that this block number is accurate and corresponds to the block containing the contract deployment transaction. * 500-516: The addition of new input fields (`dstChainId`, `transactionId`, `executor`) to the error type `ExecutionFees__AlreadyRecorded` enhances error reporting by providing more context. Ensure that these fields are properly utilized in the contract logic where this error is thrown.Scripts Executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Assuming the use of etherscan API for Sepolia testnet (if available) to verify the transaction hash. curl -X GET "https://api-sepolia.etherscan.io/api?module=transaction&action=getstatus&txhash=0x7e93bd76783eb72d783948ac8b64c910d049f7b73536055a5fc490fb57449a7e&apikey=YourApiKeyToken"Length of output: 631
packages/contracts-communication/deployments/op_sepolia/InterchainDB.json (7)
- 2-6: The contract address, receipt hash, and block number have been updated to reflect the latest deployment. Ensure these values accurately correspond to the contract's deployment on the Ethereum Sepolia testnet.
- 11-55: Renamed function
getDBNonce
tocheckVerification
with updated input parameters and output names/types. This change aligns with the PR objectives to improve clarity and functionality. Ensure that all references to this function in the codebase have been updated accordingly.- 76-82: > 📝 NOTE
This review was outside the diff hunks and was mapped to the diff hunk with the greatest overlap. Original lines [67-92]
Introduced the
getBatch
function with new input and output parameters. This addition enhances the contract's functionality by allowing batch operations, which is crucial for efficient interchain communication. Review the implementation details to ensure they meet the requirements and are secure.
- 103-118: Added
getBatchLeafs
function to retrieve batch leafs. This function is essential for operations requiring access to specific data within a batch. Verify that the data returned by this function is used securely and efficiently in the broader system.- 121-147: The
getBatchLeafsPaginated
function introduces pagination to batch leaf retrieval, improving performance for large datasets. Ensure that the pagination logic is correctly implemented and tested for edge cases.- 411-438: Introduced new event
InterchainBatchVerificationRequested
. This event is crucial for tracking batch verification requests. Ensure that the event is emitted correctly in all relevant scenarios and that event listeners are properly set up to handle it.- 503-512: Introduced new error
InterchainDB__BatchDoesNotExist
. This error handling improvement is important for robustness. Ensure that this error is thrown and handled correctly in all relevant scenarios.packages/contracts-communication/deployments/eth_sepolia/PingPongApp.json (5)
- 2-2: The contract address has been updated. Ensure this address corresponds to the latest deployment on the Ethereum Sepolia testnet.
- 5-6: The receipt hash and block number have been updated. Verify these values accurately reflect the transaction of the latest contract deployment.
- 56-60: New fields
entryIndex
anddbNonce
have been added to the ABI. Confirm these additions align with the intended contract functionality enhancements and that their types (uint64
forentryIndex
anduint256
fordbNonce
) are appropriate for their use cases.- 542-553: The addition of
dbNonce
andentryIndex
to thePingReceived
event in the ABI. Ensure these fields are necessary for the event's purpose and that their data types are correctly chosen.- 567-578: The addition of
dbNonce
andentryIndex
to thePingSent
event in the ABI. It's important to verify that these new fields serve a clear purpose and are implemented correctly in the contract's logic.packages/contracts-communication/deployments/op_sepolia/PingPongApp.json (5)
- 2-2: The contract address has been updated. Confirm this address is correct for the intended deployment on the network.
- 5-6: The receipt hash and block number have been updated. It's crucial to verify these values to ensure they accurately represent the transaction of the contract deployment.
- 56-60: New fields
entryIndex
anddbNonce
have been added to the ABI. Validate that these additions are consistent with the contract's intended enhancements and that their data types (uint64
forentryIndex
anduint256
fordbNonce
) are suitable.- 542-553: The addition of
dbNonce
andentryIndex
to thePingReceived
event in the ABI. Confirm the necessity of these fields for the event and that their data types are correctly chosen.- 567-578: The addition of
dbNonce
andentryIndex
to thePingSent
event in the ABI. Ensure these new fields are purposeful and correctly implemented within the contract's logic.packages/contracts-communication/deployments/eth_sepolia/SynapseModule.json (10)
- 2-2: The contract address has been updated to
0xC94ee5444605254F77672175E8bC90A74d4778BA
. Ensure this address corresponds to the latest, verified deployment on the Ethereum Sepolia testnet.- 3-3: The constructor arguments have been updated. Verify that these new arguments are correct and align with the intended contract initialization parameters.
- 5-6: Receipt details including the hash and block number have been updated. Confirm that these details accurately reflect the transaction of the contract deployment on the Ethereum Sepolia testnet.
- 269-285: > 📝 NOTE
This review was outside the diff hunks and was mapped to the diff hunk with the greatest overlap. Original lines [272-295]
The function
requestBatchVerification
has been introduced, replacing the previousrequestVerification
function. This change likely reflects an enhancement in batch processing capabilities. Ensure that all dependent contracts and client code have been updated to use this new function signature.
- 390-393: The
verifyRemoteBatch
function has been added, indicating new functionality for verifying batches from remote chains. Review the implementation details and usage of this function to ensure it meets security and efficiency standards.- 408-426: The event
BatchVerificationRequested
has been introduced, likely as part of the new batch verification process. Ensure that all event listeners and handlers are updated to accommodate this new event.- 439-471: > 📝 NOTE
This review was outside the diff hunks and was mapped to the diff hunk with the greatest overlap. Original lines [433-448]
The event
BatchVerified
has been added, which is expected to be emitted upon successful batch verification. Verify that the logic triggering this event is correctly implemented and that any listeners are properly handling it.
- 456-467: The event
ClaimFeeFractionChanged
has been renamed from a previous name not specified in the provided context. Confirm that this change is accurately reflected in all parts of the system that interact with or depend on this event.- 687-693: A new error
InterchainModule__NotInterchainDB
has been introduced. Ensure that this error is correctly used in scenarios where an invalid interchain database interaction is attempted.- 756-759: The error
SynapseModule__GasOracleNotSet
has been added, indicating a more granular error handling for gas oracle settings. Review the use cases for this error to ensure it's appropriately triggered.packages/contracts-communication/deployments/op_sepolia/SynapseModule.json (10)
- 2-2: The contract address has been updated to
0x79D5c202d2243B7d405eB1b98c79595A692bfD0E
. Confirm that this address is correct for the latest deployment on the intended network.- 3-3: Constructor arguments have been updated. It's crucial to verify these changes to ensure they match the intended initialization parameters for the contract.
- 5-6: Updated receipt details including the hash and block number. Validate these details against the blockchain to confirm the accuracy of the deployment transaction.
- 269-285: > 📝 NOTE
This review was outside the diff hunks and was mapped to the diff hunk with the greatest overlap. Original lines [272-295]
Introduction of
requestBatchVerification
function suggests an enhancement in handling batch operations. Ensure compatibility and update all relevant contract interactions to accommodate this new function.
- 390-393: The addition of
verifyRemoteBatch
function indicates new functionality for batch verification. Review its implementation for security and efficiency considerations.- 408-426: New event
BatchVerificationRequested
has been added. Verify that all event handlers are updated to process this event correctly.- 439-471: > 📝 NOTE
This review was outside the diff hunks and was mapped to the diff hunk with the greatest overlap. Original lines [433-448]
The
BatchVerified
event has been introduced. Ensure that the logic for emitting this event is correctly implemented and that it is properly handled by any listeners.
- 456-467: The event
ClaimFeeFractionChanged
appears to have been renamed. Confirm that this renaming is consistently applied across all parts of the system that use or listen to this event.- 687-693: Introduction of the error
InterchainModule__NotInterchainDB
. Ensure that this error is used appropriately in the contract logic.- 756-759: The error
SynapseModule__GasOracleNotSet
has been added. Review its usage to ensure it's triggered under the correct conditions.packages/contracts-communication/deployments/op_sepolia/InterchainClientV1.json (9)
- 2-2: The contract address has been updated. Ensure this new address corresponds to the latest, verified deployment on the Ethereum Sepolia testnet.
- 3-3: The constructor arguments have been updated. Verify that these new arguments are correct and align with the intended contract initialization parameters.
- 5-6: Receipt hash and block number have been updated. Confirm these values accurately reflect the transaction of the latest contract deployment.
- 103-107: A new field
entryIndex
has been added to theInterchainTransaction
struct. Ensure this addition aligns with the contract's logic and intended use cases.- 271-275: The
interchainExecute
function now includes aproof
parameter. Confirm that this parameter is properly validated and used within the function.- 318-337: The
interchainSend
function's output now includes adesc
tuple with a newentryIndex
field. Verify the correctness and usage of this output structure in the contract's logic.- 516-527: A new event
ExecutionFeesSet
has been added. Ensure that this event is emitted correctly in the contract's logic where execution fees are set.- 670-687: The
LinkedClientSet
event has been introduced. Confirm that this event is emitted appropriately when a linked client is set in the contract.- 832-841: New error types
InterchainClientV1__ZeroReceiver
andInterchainClientV1__ZeroRequiredResponses
have been added. Ensure these errors are thrown under the correct conditions in the contract's functions.packages/contracts-communication/deployments/eth_sepolia/InterchainClientV1.json (9)
- 2-2: The contract address has been updated for the eth_sepolia deployment. Confirm this address is correct and reflects the contract's latest deployment on the network.
- 3-3: Constructor arguments have been updated. Verify these arguments are accurate and match the intended initialization parameters for the contract.
- 5-6: Updated receipt hash and block number. Ensure these values are correct and correspond to the transaction of the contract's most recent deployment.
- 103-107: The addition of the
entryIndex
field to theInterchainTransaction
struct is noted. Confirm this field's integration aligns with the contract's functionality and use cases.- 271-275: The inclusion of a
proof
parameter in theinterchainExecute
function is observed. Verify the parameter's validation and utilization within the function.- 318-337: The output structure of the
interchainSend
function now includes a newentryIndex
field within thedesc
tuple. Confirm the correctness of this output structure and its usage in the contract.- 516-527: The new event
ExecutionFeesSet
has been added. Ensure this event is emitted correctly within the contract where execution fees are set.- 670-687: Introduction of the
LinkedClientSet
event. Confirm appropriate emission of this event when setting a linked client in the contract.- 832-841: New error types
InterchainClientV1__ZeroReceiver
andInterchainClientV1__ZeroRequiredResponses
are added. Ensure these errors are appropriately thrown in the contract's logic.
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.
Review Status
Actionable comments generated: 0
Configuration used: .coderabbit.yaml
Files selected for processing (1)
- packages/contracts-communication/configs/global/SynapseGasOracleV1.testnet.json (1 hunks)
Additional comments: 2
packages/contracts-communication/configs/global/SynapseGasOracleV1.testnet.json (2)
- 4-4: The
gasPrice
foreth_sepolia
has been updated to 2000000. Please ensure this value accurately reflects current gas price trends on the Ethereum Sepolia testnet to maintain cost-effectiveness in transactions.- 9-9: The
gasPrice
forop_sepolia
has been adjusted to 1000000. It's important to verify that this value is in line with the current gas price trends on the Optimism Sepolia testnet to ensure efficient and cost-effective contract interactions.
Description
A clear and concise description of the features you're adding in this pull request.
Additional context
Add any other context about the problem you're solving.
Metadata
Summary by CodeRabbit
SynapseGasOracleV1
contract for estimating transaction costs, gas data retrieval, and cross-chain value conversion.InterchainClientV1
andInterchainDB
contracts with new functions, events, and error types for improved contract interactions.PingPongApp
contract with additional fields to support advanced features.ExecutionFees
contract by adding new input fields.