Skip to main content
Became Hot Network Question
added 235 characters in body; edited tags
Source Link

I am using pallet_assets for creating custom assets and I want to call the transfer function from pallet_assets in my other custom pallet. The thing is I want to pass the AccountId of the recipient but the transfer function in pallet_assets does not take AccounId, rather it takes <T::Lookup as StaticLookup>::Source as parameter.

How can I pass AccountId to <T::Lookup as StaticLookup>::Source ??

This is the error that I'm getting:

mismatched types
expected associated type `<<T as frame_system::Config>::Lookup as StaticLookup>::Source`
   found associated type `<T as frame_system::Config>::AccountId`rustcE0308

I am using pallet_assets for creating custom assets and I want to call the transfer function from pallet_assets in my other custom pallet. The thing is I want to pass the AccountId of the recipient but the transfer function in pallet_assets does not take AccounId, rather it takes <T::Lookup as StaticLookup>::Source as parameter.

How can I pass AccountId to <T::Lookup as StaticLookup>::Source ??

I am using pallet_assets for creating custom assets and I want to call the transfer function from pallet_assets in my other custom pallet. The thing is I want to pass the AccountId of the recipient but the transfer function in pallet_assets does not take AccounId, rather it takes <T::Lookup as StaticLookup>::Source as parameter.

How can I pass AccountId to <T::Lookup as StaticLookup>::Source ??

This is the error that I'm getting:

mismatched types
expected associated type `<<T as frame_system::Config>::Lookup as StaticLookup>::Source`
   found associated type `<T as frame_system::Config>::AccountId`rustcE0308
Source Link

How to pass an AccountId to a parameter of type <T::Lookup as StaticLookup>::Source?

I am using pallet_assets for creating custom assets and I want to call the transfer function from pallet_assets in my other custom pallet. The thing is I want to pass the AccountId of the recipient but the transfer function in pallet_assets does not take AccounId, rather it takes <T::Lookup as StaticLookup>::Source as parameter.

How can I pass AccountId to <T::Lookup as StaticLookup>::Source ??