1

I'm trying to transfer the collection ID from relay chain to a parachain. I am currently accessing the collectionId from its storage, and I am wondering if there's a way to access the storage of the pallet_nft on another chain in order to facilitate the transfer.

1 Answer 1

2

Between two pallets in the same chain you need coupling between them to access the storage. An example about this in the Substrate FRAME repository is between pallets bounties and child-bounties which are tightly coupled.

See this specific example where in pallet child-bounties access the storage of pallet bounties.

let parent_bounty = pallet_bounties::Pallet::<T>::bounties(bounty_id)
            .ok_or(BountiesError::<T>::InvalidIndex)?;

To query another pallet storage from another chain you have to construct an XCM call using the instruction Transact. It has been proposed by the main XCM ideologues on a previous StackExchange question: XCM Transact for interfaces and in this Post on the Polkadot Forum: XCM Storage Query.

You can find a similar example about what you achieve in the XCM docs Examples.

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.