Zeitgeist
subscan
Runtime Modules / Swaps
Spec Version:
Events
Name
Lookup
Attributes
DistributeShareHolderRewards3800["PoolId","u64","BalanceOf"]
PoolCreate3801["CommonPoolEventParams<AccountIdOf>","PoolOf","BalanceOf","AccountId"]
PoolClosed3802["PoolId"]
PoolCleanedUp3803["PoolId"]
PoolActive3804["PoolId"]
PoolExit3805["PoolAssetsEvent<AccountIdOf, AssetOf, BalanceOf>"]
PoolExitWithExactAssetAmount3806["PoolAssetEvent<AccountIdOf, AssetOf, BalanceOf>"]
PoolExitWithExactPoolAmount3807["PoolAssetEvent<AccountIdOf, AssetOf, BalanceOf>"]
PoolJoin3808["PoolAssetsEvent<AccountIdOf, AssetOf, BalanceOf>"]
PoolJoinWithExactAssetAmount3809["PoolAssetEvent<AccountIdOf, AssetOf, BalanceOf>"]
PoolJoinWithExactPoolAmount380a["PoolAssetEvent<AccountIdOf, AssetOf, BalanceOf>"]
PoolDestroyed380b["PoolId"]
SwapExactAmountIn380c["SwapEvent<AccountIdOf, AssetOf, BalanceOf>"]
SwapExactAmountOut380d["SwapEvent<AccountIdOf, AssetOf, BalanceOf>"]
Storage Functions
Name
Type
Pools{"origin":"Map","n_map_type":{"hashers":["Blake2_128Concat"],"key_vec":["U128"],"value":"zrml_swaps:types:pool:Pool","keys_id":6,"value_id":86}}
NextPoolId{"origin":"PlainType","plain_type":"U128","PlainTypeValue":6}
Constants
Name
Type
Value
ExitFeeU12840420f00000000000000000000000000
MaxAssetsU164100
MaxSwapFeeU12800ca9a3b000000000000000000000000
MaxTotalWeightU1280000f2052a0100000000000000000000
MaxWeightU1280000f902950000000000000000000000
MinAssetsU160200
MinWeightU12800e40b54020000000000000000000000
PalletId[U8; 8]7a67652f73776170
Error Types
Name
Docs
AboveMaximumWeightThe weight of an asset in a CPMM swap pool is greater than the upper weight cap.
AssetNotInPoolThe asset in question could not be found within the pool.
BadLimitPriceThe spot price of an asset pair was greater than the specified limit.
BelowMinimumWeightThe weight of an asset in a CPMM swap pool is lower than the upper weight cap.
InsufficientBalanceSome funds could not be transferred due to a too low balance.
InsufficientLiquidityLiquidity provided to new CPMM pool is less than the minimum allowed balance.
InvalidPoolStatusDispatch called on pool with invalid status.
InvalidStateTransitionA function was called for a swaps pool that does not fulfill the state requirement.
LimitInA transferal of funds into a swaps pool was above a threshold specified by the sender.
LimitMissingNo limit was specified for a swap.
LimitOutA transferal of funds out of a swaps pool was below a threshold specified by thereceiver.
MathApproximationThe custom math library yielded an invalid result (most times unexpected zero value).
MaxInRatioThe proportion of an asset added into a pool in comparison to the amountof that asset in the pool is above the threshold specified by a constant.
MaxOutRatioThe proportion of an asset taken from a pool in comparison to the amountof that asset in the pool is above the threshold specified by a constant.
MaxTotalWeightThe total weight of all assets within a CPMM pool is above a threshold specifiedby a constant.
PoolDoesNotExistThe pool in question does not exist.
PoolDrainA pool balance dropped below the allowed minimum.
PoolIsNotActiveThe pool in question is inactive.
ProvidedValuesLenMustEqualAssetsLenTwo vectors do not have the same length (usually CPMM pool assets and weights).
SwapFeeTooHighThe swap fee is higher than the allowed maximum.
TooFewAssetsTried to create a pool that has less assets than the lower threshold specified bya constant.
TooManyAssetsTried to create a pool that has more assets than the upper threshold specified bya constant.
SomeIdenticalAssetsTried to create a pool with at least two identical assets.
ZeroAmountSome amount in a transaction equals zero.
UnexpectedAn unexpected error occurred. This is the result of faulty pallet logic and should bereported to the pallet maintainers.