Name | Lookup | Parameters | |
|---|---|---|---|
| create_base_pool | 5200 | 7 | |
| create_meta_pool | 5201 | 7 | |
| add_liquidity | 5202 | 5 | |
| swap | 5203 | 7 | |
| remove_liquidity | 5204 | 5 | |
| remove_liquidity_one_currency | 5205 | 6 | |
| remove_liquidity_imbalance | 5206 | 5 | |
| add_pool_and_base_pool_liquidity | 5207 | 7 | |
| remove_pool_and_base_pool_liquidity | 5208 | 7 | |
| remove_pool_and_base_pool_liquidity_one_currency | 5209 | 7 | |
| swap_pool_from_base | 520a | 8 | |
| swap_pool_to_base | 520b | 8 | |
| swap_meta_pool_underlying | 520c | 7 | |
| update_fee_receiver | 520d | 2 | |
| set_swap_fee | 520e | 2 | |
| set_admin_fee | 520f | 2 | |
| ramp_a | 5210 | 3 | |
| stop_ramp_a | 5211 | 1 | |
| withdraw_admin_fee | 5212 | 1 |
Name | Lookup | Attributes | |
|---|---|---|---|
| CreatePool | 5200 | ["PoolId","Vec<CurrencyId>","CurrencyId","Number","AccountId","AccountId"] | |
| UpdateAdminFeeReceiver | 5201 | ["PoolId","AccountId"] | |
| AddLiquidity | 5202 | ["PoolId","AccountId","AccountId","Vec<Balance>","Vec<Balance>","Balance","Balance"] | |
| CurrencyExchange | 5203 | ["PoolId","AccountId","AccountId","u32","Balance","u32","Balance"] | |
| RemoveLiquidity | 5204 | ["PoolId","AccountId","AccountId","Vec<Balance>","Vec<Balance>","Balance"] | |
| RemoveLiquidityOneCurrency | 5205 | ["PoolId","AccountId","AccountId","u32","Balance","Balance"] | |
| RemoveLiquidityImbalance | 5206 | ["PoolId","AccountId","AccountId","Vec<Balance>","Vec<Balance>","Balance","Balance"] | |
| NewSwapFee | 5207 | ["PoolId","Number"] | |
| NewAdminFee | 5208 | ["PoolId","Number"] | |
| RampA | 5209 | ["PoolId","Number","Number","Number","Number"] | |
| StopRampA | 520a | ["PoolId","Number","Number"] | |
| CollectProtocolFee | 520b | ["PoolId","CurrencyId","Balance"] | |
| CurrencyExchangeUnderlying | 520c | ["PoolId","AccountId","Balance","Balance","u32","u32","AccountId"] |
Name | Type | |
|---|---|---|
| NextPoolId | {"origin":"PlainType","plain_type":"U32","PlainTypeValue":4} | |
| Pools | {"origin":"Map","n_map_type":{"hashers":["Blake2_128Concat"],"key_vec":["U32"],"value":"zenlink_stable_amm:primitives:Pool","keys_id":4,"value_id":794}} | |
| LpCurrencies | {"origin":"Map","n_map_type":{"hashers":["Blake2_128Concat"],"key_vec":["bifrost_primitives:currency:CurrencyId"],"value":"U32","keys_id":302,"value_id":4}} |
Name | Type | Value | |
|---|---|---|---|
| PoolCurrencySymbolLimit | U32 | 32000000 | |
| PalletId | [U8; 8] | 62662f7374616d6d |
Name | Docs |
|---|---|
| InvalidPooledCurrency | The currency id can't join stable amm pool. |
| InvalidLpCurrency | The currency id can't become the lp currency id of stable amm pool. |
| MismatchParameter | The parameters of a call are contradictory. |
| InvalidCurrencyDecimal | The decimal of currency is invalid when create pool. |
| InvalidPoolId | The pool id is invalid. |
| InvalidBasePool | The base pool mismatch this pool. |
| Arithmetic | The error generate by some arithmetic function. |
| Deadline | The call already expired. |
| InsufficientSupply | The caller does not have enough currencies. |
| InsufficientReserve | The pool does not have enough currencies. |
| CheckDFailed | The new d below then older. |
| AmountSlippage | Slippage is too large. |
| SwapSameCurrency | Forbid swap same currency. |
| CurrencyIndexOutRange | The index of currency id bigger the length of pool's currencies; |
| InsufficientLpReserve | The pool does not have enough lp currency. |
| ExceedThreshold | The setting value exceed threshold. |
| RampADelay | The A of this pool is already ramped in current period. |
| MinRampTime | The value of feature_a_time is too small. |
| ExceedMaxAChange | Forbid change A of a pool bigger than MAX_A. |
| AlreadyStoppedRampA | The ramping A of this pool is already stopped. |
| ExceedMaxFee | The fee parameter exceeds MAX_SWAP_FEE when create pool. |
| ExceedMaxAdminFee | The admin fee parameter exceeds MAX_ADMIN_FEE when create pool. |
| ExceedMaxA | The A parameter exceed MAX_A when create pool. |
| LpCurrencyAlreadyUsed | The lp currency id is already used when create pool. |
| RequireAllCurrencies | Require all currencies of this pool when first supply. |
| BadPoolCurrencySymbol | The symbol of created pool maybe exceed length limit. |
| InvalidTransaction | The transaction change nothing. |
| InvalidBasePoolLpCurrency | The base pool lp currency is invalid when create meta pool. |
| TokenIndexOutOfRange | The token index out of range. |