-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MultiOnRamp - family-agnostic messages (#1140)
## Motivation * Converts the `EVM2EVMMultiOnRamp` to an `EVM2Any` family-agnostic ramp to support non-EVM use-cases from a single multi-onramp. * Collapses `sourceTokenData` + `tokenAmounts` into one `RampTokenAmount` array (simplification to no longer require encoding / decoding on-chain) ## Solution * Message format changes: convert `EVM2EVMMessage` to `EVM2AnyRampMessage`, which contains a more generic `receiver` target and stores the family-specific args as bytes * Note: `hash(Any2EVMRampMessage) != hash(EVM2AnyRampMessage)` - the messages are now asymmetric * Note: `EVM2AnyRampMessage.messageId = hash(EVM2AnyRampMessage)`, but `messageId != hash(Any2EVMRampMessage)` due to the message asymmetry * Add a `familyTag` to the dest chain config, to group multiple chains under one family to perform validations * Convert `extraArgs` to bytes, implement conditional flows to retrieve EVM-specific fields * Add `RampTokenAmount` which is constructed from `Client.EVMTokenAmount` on the OnRamp. The struct unrolls `SourceTokenData` and `EVMTokenAmount` into one struct, no longer requiring additional decoding * Out-of-scope: moving family-specific fee & validation logic to `PriceRegistry` - to be done in next PR --------- Co-authored-by: app-token-issuer-infra-releng[bot] <120227048+app-token-issuer-infra-releng[bot]@users.noreply.github.com> Co-authored-by: Makram <[email protected]>
- Loading branch information
1 parent
6ac3cdd
commit 7d7b54a
Showing
19 changed files
with
876 additions
and
664 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.