SubnetPrice
Composite 721 v393pallet_subtensor_swap_runtime_api::SubnetPrice
About This Type
Structured type: SubnetPrice.
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 (2)
SCALE Encoding
- Rule
- 2 fields encoded consecutively in declaration order. No field names or delimiters.
- Size
- sum of field sizes
Examples
Struct with 2 fields = netuid: u16, price: u64
0x<field0><field1>field 0 netuid: u16field 1 price: u64Code Examples
import { TypeRegistry } from "@polkadot/types";
const registry = new TypeRegistry();
// Encode SubnetPrice
const value = registry.createType("SubnetPrice", {
netuid: 1,
price: 1_000_000_000n
});
console.log("Hex:", value.toHex());Referenced By (1)
Type Information
- Type ID
- 721
- Kind
- Composite
- Path
- pallet_subtensor_swap_runtime_api::SubnetPrice
- Runtime
- v393