0

What is the sovereign account of a relay chain on a parachain? This can be useful for e.g. funding the account for xcm execution fee payment.

1 Answer 1

0

Referring to Asset Hub's configuration to convert the multi location of the relay chain (parent: 1, interior: Here) to a native account id, ParentIsPreset is provided by the xcm-builder, the encoding is done via (ref):

Some(
    b"Parent"
        .using_encoded(|b| AccountId::decode(&mut TrailingZeroInput::new(b)))
        .expect("infinite length input; no invalid inputs for type; qed"),
)

This is commonly used by parachains as far as I know, but otherwise look for the LocationToAccountId => something that converts the MultiLocation of the relay chain to an AccountId.

Resulting into the AccountId: 5Dt6dpkWPwLaH4BBCKJwjiWrFVAGyYk3tLUabvyn4v7KtESG

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.