You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.
some on Rococo:Statemine account can submit extrinsic xcm:Transact(System::remark_with_event) like this:
message comes and is dispatched on Wococo:Westmint as:
account in received Event::Remark is sovereign account of Wococo:BridgeHub(1014)
Problem and proof-of-concept
System::remark_with_event does validation let who = ensure_signed(origin)?;
to pass ensure_signed xcm config needs to have some implementation for OriginConverter that returns RuntimeOrigin::signed(...)
here is very very naive xcm ConvertOrigin implementation BridgedSignedAccountId32AsNative, which just converts MultiLocation{ parents: 2, interior: X3(GlobalConsensus(Rococo), Parachain(1000), AccountId32 { network: Rococo, id: ... })} to the configured local bridge-hub sovereign account LocationConverter::convert(MultiLocation { parents: 1, interior: X1(Parachain(1014)) }) (I know this impl is no-go for any production, it is just PoC to trigger successful dispatch + test )
Question:
what should be the "proper/correct/recommended" way to handle this AccountId conversion from different globalConsensus ?
The text was updated successfully, but these errors were encountered:
Unless I'm misunderstanding something, I think you can simply convert the ID in the AccountId32 junction directly to a local SS58 address. You'll most likely create a new struct under xcm-builder to allow this.
Story:
xcm:v3:Transact
calls fromRococo:Statemine(1000)
->Rococo:BridgeHub(1013)
->substrate-relayer
->Wococo:BridgeHub(1014)
->Wococo:Westmint(1000)
Rococo:Statemine
account can submit extrinsicxcm:Transact(System::remark_with_event)
like this:Wococo:Westmint
as:Event::Remark
is sovereign account ofWococo:BridgeHub(1014)
Problem and proof-of-concept
System::remark_with_event
does validationlet who = ensure_signed(origin)?;
ensure_signed
xcm config needs to have some implementation forOriginConverter
that returnsRuntimeOrigin::signed(...)
ConvertOrigin
implementation BridgedSignedAccountId32AsNative, which just convertsMultiLocation{ parents: 2, interior: X3(GlobalConsensus(Rococo), Parachain(1000), AccountId32 { network: Rococo, id: ... })}
to the configured local bridge-hub sovereign accountLocationConverter::convert(MultiLocation { parents: 1, interior: X1(Parachain(1014)) })
(I know this impl is no-go for any production, it is just PoC to trigger successful dispatch + test )Question:
The text was updated successfully, but these errors were encountered: