Balances
Calls
force_set_balance
Attributes
Name |
Type |
who |
AccountIdLookupOf<T> |
new_free |
T::Balance |
Python
call = substrate.compose_call(
'Balances', 'force_set_balance', {
'new_free': 'u128',
'who': {
'Address20': '[u8; 20]',
'Address32': '[u8; 32]',
'Id': 'AccountId',
'Index': 'u32',
'Raw': 'Bytes',
},
}
)
force_transfer
Attributes
Name |
Type |
source |
AccountIdLookupOf<T> |
dest |
AccountIdLookupOf<T> |
value |
T::Balance |
Python
call = substrate.compose_call(
'Balances', 'force_transfer', {
'dest': {
'Address20': '[u8; 20]',
'Address32': '[u8; 32]',
'Id': 'AccountId',
'Index': 'u32',
'Raw': 'Bytes',
},
'source': {
'Address20': '[u8; 20]',
'Address32': '[u8; 32]',
'Id': 'AccountId',
'Index': 'u32',
'Raw': 'Bytes',
},
'value': 'u128',
}
)
force_unreserve
Attributes
Name |
Type |
who |
AccountIdLookupOf<T> |
amount |
T::Balance |
Python
call = substrate.compose_call(
'Balances', 'force_unreserve', {
'amount': 'u128',
'who': {
'Address20': '[u8; 20]',
'Address32': '[u8; 32]',
'Id': 'AccountId',
'Index': 'u32',
'Raw': 'Bytes',
},
}
)
transfer_all
Attributes
Name |
Type |
dest |
AccountIdLookupOf<T> |
keep_alive |
bool |
Python
call = substrate.compose_call(
'Balances', 'transfer_all', {
'dest': {
'Address20': '[u8; 20]',
'Address32': '[u8; 32]',
'Id': 'AccountId',
'Index': 'u32',
'Raw': 'Bytes',
},
'keep_alive': 'bool',
}
)
transfer_allow_death
Attributes
Name |
Type |
dest |
AccountIdLookupOf<T> |
value |
T::Balance |
Python
call = substrate.compose_call(
'Balances', 'transfer_allow_death', {
'dest': {
'Address20': '[u8; 20]',
'Address32': '[u8; 32]',
'Id': 'AccountId',
'Index': 'u32',
'Raw': 'Bytes',
},
'value': 'u128',
}
)
transfer_keep_alive
Attributes
Name |
Type |
dest |
AccountIdLookupOf<T> |
value |
T::Balance |
Python
call = substrate.compose_call(
'Balances', 'transfer_keep_alive', {
'dest': {
'Address20': '[u8; 20]',
'Address32': '[u8; 32]',
'Id': 'AccountId',
'Index': 'u32',
'Raw': 'Bytes',
},
'value': 'u128',
}
)
upgrade_accounts
Attributes
Name |
Type |
who |
Vec<T::AccountId> |
Python
call = substrate.compose_call(
'Balances', 'upgrade_accounts', {'who': ['AccountId']}
)
Events
BalanceSet
Attributes
Name |
Type |
Composition |
who |
T::AccountId |
AccountId |
free |
T::Balance |
u128 |
Burned
Attributes
Name |
Type |
Composition |
who |
T::AccountId |
AccountId |
amount |
T::Balance |
u128 |
Deposit
Attributes
Name |
Type |
Composition |
who |
T::AccountId |
AccountId |
amount |
T::Balance |
u128 |
DustLost
Attributes
Name |
Type |
Composition |
account |
T::AccountId |
AccountId |
amount |
T::Balance |
u128 |
Endowed
Attributes
Name |
Type |
Composition |
account |
T::AccountId |
AccountId |
free_balance |
T::Balance |
u128 |
Frozen
Attributes
Name |
Type |
Composition |
who |
T::AccountId |
AccountId |
amount |
T::Balance |
u128 |
Issued
Attributes
Name |
Type |
Composition |
amount |
T::Balance |
u128 |
Locked
Attributes
Name |
Type |
Composition |
who |
T::AccountId |
AccountId |
amount |
T::Balance |
u128 |
Minted
Attributes
Name |
Type |
Composition |
who |
T::AccountId |
AccountId |
amount |
T::Balance |
u128 |
Rescinded
Attributes
Name |
Type |
Composition |
amount |
T::Balance |
u128 |
ReserveRepatriated
Attributes
Name |
Type |
Composition |
from |
T::AccountId |
AccountId |
to |
T::AccountId |
AccountId |
amount |
T::Balance |
u128 |
destination_status |
Status |
('Free', 'Reserved') |
Reserved
Attributes
Name |
Type |
Composition |
who |
T::AccountId |
AccountId |
amount |
T::Balance |
u128 |
Restored
Attributes
Name |
Type |
Composition |
who |
T::AccountId |
AccountId |
amount |
T::Balance |
u128 |
Slashed
Attributes
Name |
Type |
Composition |
who |
T::AccountId |
AccountId |
amount |
T::Balance |
u128 |
Suspended
Attributes
Name |
Type |
Composition |
who |
T::AccountId |
AccountId |
amount |
T::Balance |
u128 |
Thawed
Attributes
Name |
Type |
Composition |
who |
T::AccountId |
AccountId |
amount |
T::Balance |
u128 |
Transfer
Attributes
Name |
Type |
Composition |
from |
T::AccountId |
AccountId |
to |
T::AccountId |
AccountId |
amount |
T::Balance |
u128 |
Unlocked
Attributes
Name |
Type |
Composition |
who |
T::AccountId |
AccountId |
amount |
T::Balance |
u128 |
Unreserved
Attributes
Name |
Type |
Composition |
who |
T::AccountId |
AccountId |
amount |
T::Balance |
u128 |
Upgraded
Attributes
Name |
Type |
Composition |
who |
T::AccountId |
AccountId |
Withdraw
Attributes
Name |
Type |
Composition |
who |
T::AccountId |
AccountId |
amount |
T::Balance |
u128 |
Storage functions
Account
Python
result = substrate.query(
'Balances', 'Account', ['AccountId']
)
Return value
{'flags': 'u128', 'free': 'u128', 'frozen': 'u128', 'reserved': 'u128'}
Freezes
Python
result = substrate.query(
'Balances', 'Freezes', ['AccountId']
)
Return value
[{'amount': 'u128', 'id': ()}]
Holds
Python
result = substrate.query(
'Balances', 'Holds', ['AccountId']
)
Return value
[{'amount': 'u128', 'id': {None: None, 'Preimage': ('Preimage', )}}]
InactiveIssuance
Python
result = substrate.query(
'Balances', 'InactiveIssuance', []
)
Return value
'u128'
Locks
Python
result = substrate.query(
'Balances', 'Locks', ['AccountId']
)
Return value
[{'amount': 'u128', 'id': '[u8; 8]', 'reasons': ('Fee', 'Misc', 'All')}]
Reserves
Python
result = substrate.query(
'Balances', 'Reserves', ['AccountId']
)
Return value
[
{
'amount': 'u128',
'id': (
'CollatorSelection',
'EvmStorageDeposit',
'EvmDeveloperDeposit',
'Honzon',
'Nft',
'TransactionPayment',
'TransactionPaymentDeposit',
'Count',
),
},
]
TotalIssuance
Python
result = substrate.query(
'Balances', 'TotalIssuance', []
)
Return value
'u128'
Constants
ExistentialDeposit
Value
100000000000
Python
constant = substrate.get_constant('Balances', 'ExistentialDeposit')
MaxFreezes
Value
0
Python
constant = substrate.get_constant('Balances', 'MaxFreezes')
MaxHolds
Value
7
Python
constant = substrate.get_constant('Balances', 'MaxHolds')
MaxLocks
Value
50
Python
constant = substrate.get_constant('Balances', 'MaxLocks')
MaxReserves
Value
7
Python
constant = substrate.get_constant('Balances', 'MaxReserves')
Errors
DeadAccount
ExistentialDeposit
ExistingVestingSchedule
Expendability
InsufficientBalance
LiquidityRestrictions
TooManyFreezes
TooManyHolds
TooManyReserves
VestingBalance