Swap::Event
Variant 92 v393pallet_subtensor_swap::pallet::pallet::Event
The `Event` enum of this pallet
About This Type
Event enum for the pallet pallet.
Contains all possible events emitted by the pallet pallet. Each variant represents a different event type with its own data fields.
Variants (5)
| Index | Name | Fields | Docs |
|---|---|---|---|
| 0 | FeeRateSet | Event emitted when the fee rate has been updated for a subnet | |
| 1 | UserLiquidityToggled | Event emitted when user liquidity operations are enabled for a subnet. First enable even indicates a switch from V2 to V3 swap. | |
| 2 | LiquidityAdded | Event emitted when a liquidity position is added to a subnet's liquidity pool. | |
| 3 | LiquidityRemoved | Event emitted when a liquidity position is removed from a subnet's liquidity pool. | |
| 4 | LiquidityModified | Event emitted when a liquidity position is modified in a subnet's liquidity pool. Modifying causes the fees to be claimed. |
SCALE Encoding
- Rule
- 1-byte variant index followed by variant-specific field data. 5 possible variants.
- Size
- variable (1+ bytes)
Examples
FeeRateSet = FeeRateSet(netuid, rate)
0x00<field0><field1>00 Variant index 0 = FeeRateSetfield 0 netuid: u16field 1 rate: u16UserLiquidityToggled = UserLiquidityToggled(netuid, enable)
0x01<field0><field1>01 Variant index 1 = UserLiquidityToggledfield 0 netuid: u16field 1 enable: boolLiquidityAdded = LiquidityAdded(coldkey, hotkey, netuid, position_id, liquidity, tao, alpha, tick_low, tick_high)
0x02<field0><field1><field2><field3><field4><field5><field6><field7><field8>02 Variant index 2 = LiquidityAddedfield 0 coldkey: AccountIdfield 1 hotkey: AccountIdfield 2 netuid: u16field 3 position_id: PositionIdfield 4 liquidity: u64field 5 tao: u64field 6 alpha: u64field 7 tick_low: TickIndexfield 8 tick_high: TickIndexCode Examples
import { TypeRegistry } from "@polkadot/types";
const registry = new TypeRegistry();
// Encode Swap::Event — variant "FeeRateSet"
const value = registry.createType("Swap::Event", { FeeRateSet: { netuid: 1, rate: 1 } });
console.log("Hex:", value.toHex());Type Parameters
T
Referenced By (23)
#21 RuntimeEvent via System#21 RuntimeEvent via Grandpa#21 RuntimeEvent via Balances#21 RuntimeEvent via TransactionPayment#21 RuntimeEvent via SubtensorModule#21 RuntimeEvent via Utility#21 RuntimeEvent via Sudo#21 RuntimeEvent via Multisig#21 RuntimeEvent via Preimage#21 RuntimeEvent via Scheduler#21 RuntimeEvent via Proxy#21 RuntimeEvent via Registry#21 RuntimeEvent via Commitments#21 RuntimeEvent via AdminUtils#21 RuntimeEvent via SafeMode#21 RuntimeEvent via Ethereum#21 RuntimeEvent via EVM#21 RuntimeEvent via BaseFee#21 RuntimeEvent via Drand#21 RuntimeEvent via Crowdloan
and 3 more...
Also See
Type Information
- Type ID
- 92
- Kind
- Variant
- Path
- pallet_subtensor_swap::pallet::pallet::Event
- Runtime
- v393