SubnetLease

Composite 463 v393

pallet_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)

#NameType
0beneficiaryAccountId
1coldkeyAccountId
2hotkeyAccountId
3emissions_sharePercent
4end_blockOption
5netuidu16
6costu64

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: AccountId
field 1 coldkey: AccountId
field 2 hotkey: AccountId
field 3 emissions_share: Percent
field 4 end_block: Option
field 5 netuid: u16
field 6 cost: u64

Code 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