Name | Lookup | Parameters | |
---|---|---|---|
create_pool | 6500 | 4 | |
add_liquidity | 6501 | 4 | |
remove_liquidity | 6502 | 3 | |
sell | 6503 | 5 | |
buy | 6504 | 5 |
Name | Lookup | Attributes | |
---|---|---|---|
LiquidityAdded | 6500 | ["AccountId","AssetId","AssetId","Balance","Balance"] | |
LiquidityRemoved | 6501 | ["AccountId","AssetId","AssetId","Balance"] | |
PoolCreated | 6502 | ["AccountId","AssetId","AssetId","Balance","AssetId","AccountId"] | |
PoolDestroyed | 6503 | ["AccountId","AssetId","AssetId","AssetId","AccountId"] | |
SellExecuted | 6504 | ["AccountId","AssetId","AssetId","Balance","Balance","AssetId","Balance","AccountId"] | |
BuyExecuted | 6505 | ["AccountId","AssetId","AssetId","Balance","Balance","AssetId","Balance","AccountId"] |
Name | Type | |
---|---|---|
ShareToken | {"origin":"Map","n_map_type":{"hashers":["Blake2_128Concat"],"key_vec":["AccountId"],"value":"U32","keys_id":0,"value_id":4}} | |
TotalLiquidity | {"origin":"Map","n_map_type":{"hashers":["Blake2_128Concat"],"key_vec":["AccountId"],"value":"U128","keys_id":0,"value_id":6}} | |
PoolAssets | {"origin":"Map","n_map_type":{"hashers":["Blake2_128Concat"],"key_vec":["AccountId"],"value":"Tuple:U32U32","keys_id":0,"value_id":75}} |
Name | Type | Value | |
---|---|---|---|
NativeAssetId | U32 | 00000000 | |
GetExchangeFee | Tuple:U32U32 | 03000000e8030000 | |
MinTradingLimit | U128 | e8030000000000000000000000000000 | |
MinPoolLiquidity | U128 | e8030000000000000000000000000000 | |
MaxInRatio | U128 | 03000000000000000000000000000000 | |
MaxOutRatio | U128 | 03000000000000000000000000000000 | |
OracleSource | [U8; 8] | 736e656b2f78796b |
Name | Docs |
---|---|
CannotCreatePoolWithSameAssets | It is not allowed to create a pool between same assets. |
InsufficientLiquidity | Liquidity has not reached the required minimum. |
InsufficientTradingAmount | Amount is less than min trading limit. |
ZeroLiquidity | Liquidity is zero. |
ZeroInitialPrice | It is not allowed to create a pool with zero initial price.Not used, kept for backward compatibility |
CreatePoolAssetAmountInvalid | OverflowNot used, kept for backward compatibility |
InvalidMintedLiquidity | Overflow |
InvalidLiquidityAmount | Overflow |
AssetAmountExceededLimit | Asset amount has exceeded given limit. |
AssetAmountNotReachedLimit | Asset amount has not reached given limit. |
InsufficientAssetBalance | Asset balance is not sufficient. |
InsufficientPoolAssetBalance | Not enough asset liquidity in the pool. |
InsufficientNativeCurrencyBalance | Not enough core asset liquidity in the pool. |
TokenPoolNotFound | Liquidity pool for given assets does not exist. |
TokenPoolAlreadyExists | Liquidity pool for given assets already exists. |
AddAssetAmountInvalid | Overflow |
RemoveAssetAmountInvalid | Overflow |
SellAssetAmountInvalid | Overflow |
BuyAssetAmountInvalid | Overflow |
FeeAmountInvalid | Overflow |
CannotApplyDiscount | Overflow |
MaxOutRatioExceeded | Max fraction of pool to buy in single transaction has been exceeded. |
MaxInRatioExceeded | Max fraction of pool to sell in single transaction has been exceeded. |
Overflow | Overflow |
CannotCreatePool | Pool cannot be created due to outside factors. |