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': {
'BLP': 'u32',
'ForeignAsset': 'u32',
'LPToken': (
(
'ASG',
'BNC',
'KUSD',
'DOT',
'KSM',
'ETH',
'KAR',
'ZLK',
'PHA',
'RMRK',
'MOVR',
),
'u8',
(
'ASG',
'BNC',
'KUSD',
'DOT',
'KSM',
'ETH',
'KAR',
'ZLK',
'PHA',
'RMRK',
'MOVR',
),
'u8',
),
'Lend': 'u8',
'Native': (
'ASG',
'BNC',
'KUSD',
'DOT',
'KSM',
'ETH',
'KAR',
'ZLK',
'PHA',
'RMRK',
'MOVR',
),
'Stable': (
'ASG',
'BNC',
'KUSD',
'DOT',
'KSM',
'ETH',
'KAR',
'ZLK',
'PHA',
'RMRK',
'MOVR',
),
'StableLpToken': 'u32',
'Token': (
'ASG',
'BNC',
'KUSD',
'DOT',
'KSM',
'ETH',
'KAR',
'ZLK',
'PHA',
'RMRK',
'MOVR',
),
'Token2': 'u8',
'VSBond': (
(
'ASG',
'BNC',
'KUSD',
'DOT',
'KSM',
'ETH',
'KAR',
'ZLK',
'PHA',
'RMRK',
'MOVR',
),
'u32',
'u32',
'u32',
),
'VSBond2': (
'u8',
'u32',
'u32',
'u32',
),
'VSToken': (
'ASG',
'BNC',
'KUSD',
'DOT',
'KSM',
'ETH',
'KAR',
'ZLK',
'PHA',
'RMRK',
'MOVR',
),
'VSToken2': 'u8',
'VToken': (
'ASG',
'BNC',
'KUSD',
'DOT',
'KSM',
'ETH',
'KAR',
'ZLK',
'PHA',
'RMRK',
'MOVR',
),
'VToken2': 'u8',
},
'dest': {
'Address20': '[u8; 20]',
'Address32': '[u8; 32]',
'Id': 'AccountId',
'Index': 'u32',
'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': 'u32',
'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': {
'BLP': 'u32',
'ForeignAsset': 'u32',
'LPToken': (
(
'ASG',
'BNC',
'KUSD',
'DOT',
'KSM',
'ETH',
'KAR',
'ZLK',
'PHA',
'RMRK',
'MOVR',
),
'u8',
(
'ASG',
'BNC',
'KUSD',
'DOT',
'KSM',
'ETH',
'KAR',
'ZLK',
'PHA',
'RMRK',
'MOVR',
),
'u8',
),
'Lend': 'u8',
'Native': (
'ASG',
'BNC',
'KUSD',
'DOT',
'KSM',
'ETH',
'KAR',
'ZLK',
'PHA',
'RMRK',
'MOVR',
),
'Stable': (
'ASG',
'BNC',
'KUSD',
'DOT',
'KSM',
'ETH',
'KAR',
'ZLK',
'PHA',
'RMRK',
'MOVR',
),
'StableLpToken': 'u32',
'Token': (
'ASG',
'BNC',
'KUSD',
'DOT',
'KSM',
'ETH',
'KAR',
'ZLK',
'PHA',
'RMRK',
'MOVR',
),
'Token2': 'u8',
'VSBond': (
(
'ASG',
'BNC',
'KUSD',
'DOT',
'KSM',
'ETH',
'KAR',
'ZLK',
'PHA',
'RMRK',
'MOVR',
),
'u32',
'u32',
'u32',
),
'VSBond2': (
'u8',
'u32',
'u32',
'u32',
),
'VSToken': (
'ASG',
'BNC',
'KUSD',
'DOT',
'KSM',
'ETH',
'KAR',
'ZLK',
'PHA',
'RMRK',
'MOVR',
),
'VSToken2': 'u8',
'VToken': (
'ASG',
'BNC',
'KUSD',
'DOT',
'KSM',
'ETH',
'KAR',
'ZLK',
'PHA',
'RMRK',
'MOVR',
),
'VToken2': 'u8',
},
'who': {
'Address20': '[u8; 20]',
'Address32': '[u8; 32]',
'Id': 'AccountId',
'Index': 'u32',
'Raw': 'Bytes',
},
}
)
Constants¶
GetNativeCurrencyId¶
Value¶
{'Native': 'BNC'}
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