Currencies¶
Calls¶
transfer¶
See [Pallet::transfer
].
Attributes¶
Name | Type |
---|---|
dest | <T::Lookup as StaticLookup>::Source |
currency_id | CurrencyIdOf<T> |
amount | BalanceOf<T> |
Python¶
call = substrate.compose_call(
'Currencies', 'transfer', {
'amount': 'u128',
'currency_id': {
'AUSD': None,
'ForeignAsset': (
'ETH',
'USDT',
),
'KAR': None,
'KSM': None,
'MGX': None,
'Native': None,
},
'dest': {
'Address20': '[u8; 20]',
'Address32': '[u8; 32]',
'Id': 'AccountId',
'Index': (),
'Raw': 'Bytes',
},
}
)
transfer_native_currency¶
See [Pallet::transfer_native_currency
].
Attributes¶
Name | Type |
---|---|
dest | <T::Lookup as StaticLookup>::Source |
amount | BalanceOf<T> |
Python¶
call = substrate.compose_call(
'Currencies', 'transfer_native_currency', {
'amount': 'u128',
'dest': {
'Address20': '[u8; 20]',
'Address32': '[u8; 32]',
'Id': 'AccountId',
'Index': (),
'Raw': 'Bytes',
},
}
)
update_balance¶
See [Pallet::update_balance
].
Attributes¶
Name | Type |
---|---|
who | <T::Lookup as StaticLookup>::Source |
currency_id | CurrencyIdOf<T> |
amount | AmountOf<T> |
Python¶
call = substrate.compose_call(
'Currencies', 'update_balance', {
'amount': 'i128',
'currency_id': {
'AUSD': None,
'ForeignAsset': (
'ETH',
'USDT',
),
'KAR': None,
'KSM': None,
'MGX': None,
'Native': None,
},
'who': {
'Address20': '[u8; 20]',
'Address32': '[u8; 32]',
'Id': 'AccountId',
'Index': (),
'Raw': 'Bytes',
},
}
)
Constants¶
GetNativeCurrencyId¶
Value¶
'Native'
Python¶
constant = substrate.get_constant('Currencies', 'GetNativeCurrencyId')
Errors¶
AmountIntoBalanceFailed¶
Unable to convert the Amount type into Balance.
BalanceTooLow¶
Balance is too low.
DepositFailed¶
Deposit result is not expected