Swap::Error
Variant 542 v393pallet_subtensor_swap::pallet::pallet::Error
The `Error` enum of this pallet.
About This Type
The raw extrinsic (transaction) format before signature verification.
This is the actual on-chain transaction format: a length-prefixed byte sequence containing an optional signature and the encoded call data. This is what gets broadcast to the network.
Encoding: Compact length prefix + 1-byte version/signing flag + optional (signer + signature + extra) + call bytes.
Variants (14)
| Index | Name | Fields | Docs |
|---|---|---|---|
| 0 | FeeRateTooHigh | none | The fee rate is too high |
| 1 | InsufficientInputAmount | none | The provided amount is insufficient for the swap. |
| 2 | InsufficientLiquidity | none | The provided liquidity is insufficient for the operation. |
| 3 | PriceLimitExceeded | none | The operation would exceed the price limit. |
| 4 | InsufficientBalance | none | The caller does not have enough balance for the operation. |
| 5 | LiquidityNotFound | none | Attempted to remove liquidity that does not exist. |
| 6 | InvalidTickRange | none | The provided tick range is invalid. |
| 7 | MaxPositionsExceeded | none | Maximum user positions exceeded |
| 8 | TooManySwapSteps | none | Too many swap steps |
| 9 | InvalidLiquidityValue | none | Provided liquidity parameter is invalid (likely too small) |
| 10 | ReservesTooLow | none | Reserves too low for operation. |
| 11 | MechanismDoesNotExist | none | The subnet does not exist. |
| 12 | UserLiquidityDisabled | none | User liquidity operations are disabled for this subnet |
| 13 | SubtokenDisabled | none | The subnet does not have subtoken enabled |
SCALE Encoding
- Rule
- 1-byte variant index followed by variant-specific field data. 14 possible variants.
- Size
- variable (1+ bytes)
Examples
FeeRateTooHigh
0x0000 Variant index 0 = FeeRateTooHighInsufficientInputAmount
0x0101 Variant index 1 = InsufficientInputAmountInsufficientLiquidity
0x0202 Variant index 2 = InsufficientLiquidityCode Examples
import { TypeRegistry } from "@polkadot/types";
const registry = new TypeRegistry();
// Encode Swap::Error — variant "FeeRateTooHigh"
const value = registry.createType("Swap::Error", "FeeRateTooHigh");
console.log("Hex:", value.toHex());Type Parameters
T
Referenced By (21)
#726 RuntimeError via System#726 RuntimeError via Grandpa#726 RuntimeError via Balances#726 RuntimeError via SubtensorModule#726 RuntimeError via Utility#726 RuntimeError via Sudo#726 RuntimeError via Multisig#726 RuntimeError via Preimage#726 RuntimeError via Scheduler#726 RuntimeError via Proxy#726 RuntimeError via Registry#726 RuntimeError via Commitments#726 RuntimeError via AdminUtils#726 RuntimeError via SafeMode#726 RuntimeError via Ethereum#726 RuntimeError via EVM#726 RuntimeError via Drand#726 RuntimeError via Crowdloan#726 RuntimeError via Swap#726 RuntimeError via Contracts
and 1 more...
Also See
Type Information
- Type ID
- 542
- Kind
- Variant
- Path
- pallet_subtensor_swap::pallet::pallet::Error
- Runtime
- v393