Earning
Calls
bond
Attributes
Python
call = substrate.compose_call(
'Earning', 'bond', {'amount': 'u128'}
)
rebond
Attributes
Python
call = substrate.compose_call(
'Earning', 'rebond', {'amount': 'u128'}
)
unbond
Attributes
Python
call = substrate.compose_call(
'Earning', 'unbond', {'amount': 'u128'}
)
unbond_instant
Attributes
Python
call = substrate.compose_call(
'Earning', 'unbond_instant', {'amount': 'u128'}
)
withdraw_unbonded
Attributes
No attributes
Python
call = substrate.compose_call(
'Earning', 'withdraw_unbonded', {}
)
Events
Bonded
Attributes
Name |
Type |
Composition |
who |
T::AccountId |
AccountId |
amount |
Balance |
u128 |
InstantUnbonded
Attributes
Name |
Type |
Composition |
who |
T::AccountId |
AccountId |
amount |
Balance |
u128 |
fee |
Balance |
u128 |
Rebonded
Attributes
Name |
Type |
Composition |
who |
T::AccountId |
AccountId |
amount |
Balance |
u128 |
Unbonded
Attributes
Name |
Type |
Composition |
who |
T::AccountId |
AccountId |
amount |
Balance |
u128 |
Withdrawn
Attributes
Name |
Type |
Composition |
who |
T::AccountId |
AccountId |
amount |
Balance |
u128 |
Storage functions
Ledger
Python
result = substrate.query(
'Earning', 'Ledger', ['AccountId']
)
Return value
{
'active': 'u128',
'total': 'u128',
'unlocking': [{'unlock_at': 'u32', 'value': 'u128'}],
}
Constants
LockIdentifier
Value
'0x6163612f6561726e'
Python
constant = substrate.get_constant('Earning', 'LockIdentifier')
MaxUnbondingChunks
Value
10
Python
constant = substrate.get_constant('Earning', 'MaxUnbondingChunks')
MinBond
Value
100000000000000
Python
constant = substrate.get_constant('Earning', 'MinBond')
UnbondingPeriod
Value
201600
Python
constant = substrate.get_constant('Earning', 'UnbondingPeriod')
Errors
BelowMinBondThreshold
MaxUnlockChunksExceeded
NotAllowed
NotBonded