Questions tagged [accountdata]
The accountdata tag has no usage guidance.
8
questions
1
vote
0
answers
8
views
How to provide an AccountData type implementing some trait?
In pallet config, it would be convenient to require the AccountData type to implement a given trait, like:
#[pallet::config]
pub trait Config:
frame_system::Config<AccountData: SomeCustomTrait&...
1
vote
1
answer
24
views
What is the flags field in system account info?
In the Polkadot-JS UI, one can query account data under Developer > Chain state > system > account.
According to Polkadot Wiki, we know
data, the additional data that belongs to this ...
1
vote
1
answer
39
views
How do I create an Asset account using polkadot JS with a reason other than Consumer?
So there are 4 reasons listed on ExistenceReason for an Asset account namely:
Consumer,
Sufficient,
DepositHeld,
DepositRefunded
Usually minting an asset would use the Consumer reason. I'd like to ...
4
votes
1
answer
50
views
Get a breakdown of DOT for an account
For any given account can I get a breakdown of DOT that is bonded, vested, locked, transferable, locked for democracy etc.
Ideally looking for way to do it through py-substrate-interface or PolkadotJs ...
0
votes
1
answer
14
views
account_sequence and suggested_fee in substrate
I am looking into rosetta-api for substrate. I have two questions regarding one of its endpoint construction/metadata
Does substrate maintain an account_sequence number somewhere? where
can I find it?...
3
votes
2
answers
55
views
How to calculate Total Value Locked for a Substrate Chain? Should 'Reserved Balances' be included?
If you wanted to calculate TVL for a substrate chain would you include 'Reserved Balances'? Or would you only be interested in 'Locked Balances'? (Locked Balance = max lock on an account)
7
votes
2
answers
308
views
How to get bytes [u8; 32] from AccountId?
There is a way to convert [u8; 32] to AccountId
T::AccountId::decode(&mut &bytes[..]).unwrap_or_default();
but how to do the reverse?
let sender: T::AccountId = ensure_signed(origin)?;
let ...
10
votes
2
answers
101
views
How does the AccountData type work in FRAME runtimes?
The FRAME system for runtime development defines an AccountData type, which is coupled with data from the Balances Pallet in the Polkadot runtime.
What other types of data could be tracked using this ...