polytope-labs / hyperbridge

Hyperbridge is a hyperscalable coprocessor for verifiable, cross-chain interoperability
https://docs.hyperbridge.network/
Apache License 2.0
107 stars 33 forks source link

Relay chain native asset XCM Support #155

Closed Wizdave97 closed 5 months ago

Wizdave97 commented 5 months ago

Allow receiving the native asset from the relay chain through xcm and dispatch an ismp request to the destination chain. Multilocation variant accepted for beneficiary is of the form described below

The nework id for the AccountKey20 should be the chain id for a destination evm network supported by hyperbridge. The value in the GeneralIndex is going to be used as the request timeout for the ismp post request that would be dispatched.

   MultiLocation {
        parents: 0,
        interior:
              Junctions::X3(
                   Junction::AccountId32 { id , .. },
                   Junction::AccountKey20 { network: Some(network), key },
                   GeneralIndex(timeout)
               ),
     }
Wizdave97 commented 5 months ago

Working on an integration test.