SubnetLease
Composite 463 v393pallet_subtensor::subnets::leasing::SubnetLease
About This Type
Structured type: SubnetLease.
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 (7)
SCALE Encoding
- Rule
- 7 fields encoded consecutively in declaration order. No field names or delimiters.
- Size
- sum of field sizes
Examples
Struct with 7 fields = beneficiary: AccountId, coldkey: AccountId, hotkey: AccountId, emissions_share: Percent, end_block: Option, netuid: u16, cost: u64
0x<field0><field1><field2><field3><field4><field5><field6>field 0 beneficiary: AccountIdfield 1 coldkey: AccountIdfield 2 hotkey: AccountIdfield 3 emissions_share: Percentfield 4 end_block: Optionfield 5 netuid: u16field 6 cost: u64Code Examples
import { TypeRegistry } from "@polkadot/types";
const registry = new TypeRegistry();
// Encode SubnetLease
const value = registry.createType("SubnetLease", {
beneficiary: "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY",
coldkey: "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY",
hotkey: "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY",
emissions_share: 0,
end_block: 0,
netuid: 1,
cost: 1_000_000_000n
});
console.log("Hex:", value.toHex());Type Parameters
AccountId = AccountId
BlockNumber = u32
Balance = u64
Type Information
- Type ID
- 463
- Kind
- Composite
- Path
- pallet_subtensor::subnets::leasing::SubnetLease
- Runtime
- v393