SimSwapResult
Composite 722 v393pallet_subtensor_swap_runtime_api::SimSwapResult
About This Type
Structured type: SimSwapResult.
A struct-like type where each field is encoded in declaration order.
Encoding: Fields encoded consecutively in declaration order, no field names or separators.
Fields (6)
SCALE Encoding
- Rule
- 6 fields encoded consecutively in declaration order. No field names or delimiters.
- Size
- sum of field sizes
Examples
Struct with 6 fields = tao_amount: u64, alpha_amount: u64, tao_fee: u64, alpha_fee: u64, tao_slippage: u64, alpha_slippage: u64
0x<field0><field1><field2><field3><field4><field5>field 0 tao_amount: u64field 1 alpha_amount: u64field 2 tao_fee: u64field 3 alpha_fee: u64field 4 tao_slippage: u64field 5 alpha_slippage: u64Code Examples
import { TypeRegistry } from "@polkadot/types";
const registry = new TypeRegistry();
// Encode SimSwapResult
const value = registry.createType("SimSwapResult", {
tao_amount: 1_000_000_000n,
alpha_amount: 1_000_000_000n,
tao_fee: 1_000_000_000n,
alpha_fee: 1_000_000_000n,
tao_slippage: 1_000_000_000n,
alpha_slippage: 1_000_000_000n
});
console.log("Hex:", value.toHex());Type Information
- Type ID
- 722
- Kind
- Composite
- Path
- pallet_subtensor_swap_runtime_api::SimSwapResult
- Runtime
- v393