-
Notifications
You must be signed in to change notification settings - Fork 54
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
MultiOffRamp - configurable metadataHash #1004
Conversation
I see you updated files related to |
Go solidity wrappers are out-of-date, regenerate them via the |
LCOV of commit
|
ba45a06
to
a9ebe66
Compare
1d84a86
to
9900b28
Compare
onRamp: address(s_onRamp) | ||
// Must match OnRamp's metadataHash | ||
metadataHash: keccak256( | ||
abi.encode(Internal.EVM_2_EVM_MESSAGE_HASH, SOURCE_CHAIN_SELECTOR, DEST_CHAIN_SELECTOR, address(s_onRamp)) |
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.
This is the metadataHash
logic from the OnRamp. Would it be simpler if we also make this configurable on the MultiOnRamp? Then we could re-use the same hash compute logic off-chain - it would be less error-prone that way.
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 think in practice we can just read directly the metadata hash onramp when we configure on the offramp
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.
Yeah that's less error prone, true. We'll have to change this prefix to EVM_2_ANY_MESSAGE_HASH
though
Closing - reworking to use OnRamp address without a configurable metadataHash |
Motivation
Due to the different encoding schemes on non-EVM chains, the conversion of the MultiOffRamp requires making the
metadataHash
not tied to the abi encoding scheme.Solution
Makes the
metadataHash
configurable with a uniqueness check