Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options not deleted user 28
11 votes

How to manage native tokens in Substrate?

For a native token on a Substrate chain you should use the Balances Pallet, not the Assets Pallet. The balances pallet is specially optimized to minimize its computational and storage footprint. …
Shawn Tabrizi's user avatar
  • 16.3k
2 votes
Accepted

How to store a list of allowable assets for a pallet extrinsic?

, so you could not support an unlimited number of whitelisted assets in this object. … Finally, you can imagine not using storage at all, and hard-coding a table of accepted assets into the Runtime itself as some configurable value. …
Shawn Tabrizi's user avatar
  • 16.3k
7 votes

<T::Lookup as StaticLookup>::Source vs T::AccountId?

You can start by looking at the trait: /// Means of changing one type into another in a manner dependent on the source type. /// This variant is different to `Lookup` in that it doesn't (can cannot) r …
Shawn Tabrizi's user avatar
  • 16.3k
4 votes
Accepted

When using pallet-assets in another pallet: how to make pallet-assets calls private?

Something like: /// Use this filter to block users from calling any function in Assets pallet. pub struct DontAllowAssets; impl Contains<Call> for DontAllowAssets { fn contains(c: &Call) -> bool { … match c { Call::Assets(_) => false, _ => true, } } } …
Shawn Tabrizi's user avatar
  • 16.3k