The Balances pallet example of storing the balance of an account.
Example
impl pallet_balances::Config for Runtime {
type AccountStore = StorageMapShim, frame_system::Provider, AccountId, Self::AccountData>
}
You can also store the balance of an account in the System pallet.
Example
impl pallet_balances::Config for Runtime {
type AccountStore = System
}
But this comes with tradeoffs, storing account balances in the system pallet stores
frame_system data alongside the account data contrary to storing account balances in the
Balances pallet, which uses a StorageMap to store balances data only.
NOTE: This is only used in the case that this pallet is used to store balances.
The Balances pallet example of storing the balance of an account.
Example
You can also store the balance of an account in the
System
pallet.Example
But this comes with tradeoffs, storing account balances in the system pallet stores
frame_system
data alongside the account data contrary to storing account balances in theBalances
pallet, which uses aStorageMap
to store balances data only. NOTE: This is only used in the case that this pallet is used to store balances.