0

I need to get the owner of an asset to filter extrinsic calls. I tight couple the assets pallet to my pallet and I'm trying to access the Asset storage but getting the following error:

enter image description here

How can I solve this error or otherwise how can I get the owner of an specific asset.

1 Answer 1

0

Assets pallet is a little bit special. They marked all storage as private.

And they provided a list of functions to access the storage.

Check if these functions could help you: https://github.com/paritytech/substrate/blob/5b6519a7ff4a2d3cc424d78bc4830688f3b184c0/frame/assets/src/impl_fungibles.rs#L273-L291

1
  • It works. Thank you! This is how I check for the owner using the functions that you post. let asset_owner = <pallet_assets::Pallet<T>>::owner(asset_id); Commented Feb 21, 2023 at 14:59

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.