-
Notifications
You must be signed in to change notification settings - Fork 526
Description
We want to be able to use some core types (like HyperlaneMessage
, the Encode & Decode traits, etc) in WASM. This is because the Fuel indexer logic is WASM based (see hyperlane-xyz/fuel-contracts#39)
At the moment, HyperlaneMessage
lives in hyperlane-core
, which has a few dependencies that are not able to be compiled to WASM. These dependencies include ethers, I think tokio, and I'm sure many others. So for now in the Fuel indexer, we're just copying the Encode & Decode traits (https://github.com/hyperlane-xyz/fuel-contracts/pull/39/files#diff-9d5375e58ae555a71d183e064e25ded61d9e0e6da09c419a5243b312750f9a22), and the HyperlaneMessage type (https://github.com/hyperlane-xyz/fuel-contracts/pull/39/files#diff-c1df921b29777e810d4612bf6e315c71cf5f404d83cf0413cdeea3b4d2134ace). We'll soon be wanting access to the InterchainGasPayment
struct too.
Ideally we shouldn't be copying code just to get it to work in WASM. Instead we should rip out some of the really basic types from hyperlane-core
into something like a hyperlane-types
crate that can compile to WASM, and then use that.
We should make sure that this crate is also able to be used in Sealevel / Solana for this PR #1345
Metadata
Metadata
Assignees
Labels
Type
Projects
Status