-
Notifications
You must be signed in to change notification settings - Fork 45
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
Fix/onramp allowlist race condition #1480
base: ccip-develop
Are you sure you want to change the base?
Conversation
…ndition Signed-off-by: 0xsuryansh <suryansh.shrivastava@smartcontract.com>
Signed-off-by: 0xsuryansh <suryansh.shrivastava@smartcontract.com>
LCOV of commit
|
@@ -91,6 +91,7 @@ contract OnRamp is IEVM2AnyOnRampClient, ITypeAndVersion, OwnerIsCreator { | |||
struct DestChainConfigArgs { | |||
uint64 destChainSelector; // Destination chain selector | |||
IRouter router; // Source router address | |||
bool allowListEnabled; // Boolean indicator to specify if allowList check is enabled |
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.
let's add struct packing comments, they should have been there already but the previous person also missed them :)
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.
# Conflicts: # contracts/gas-snapshots/ccip.gas-snapshot # core/gethwrappers/ccip/generated/onramp/onramp.go # core/gethwrappers/ccip/generation/generated-wrapper-dependency-versions-do-not-edit.txt
Signed-off-by: 0xsuryansh <suryansh.shrivastava@smartcontract.com>
Signed-off-by: 0xsuryansh <suryansh.shrivastava@smartcontract.com>
Quality Gate passedIssues Measures |
Added a test for setting a new chain with |
Motivation
When the
onRamp::_applyDestChainConfigUpdates
is invoked in the constructor, theallowListEnabled
field of the destination chain configuration is not set directly. As a result, if an onRamp with an allow list is required, the deployment must be bundled with a call toonRamp::applyAllowListUpdates
Solution
Directly sets the
allowListEnabled
field during the constructor execution.