DelegateInfo

Composite 629 v393

pallet_subtensor::rpc_info::delegate_info::DelegateInfo

About This Type

Structured type: DelegateInfo.

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 (8)

#NameType
0delegate_ss58AccountId
1takeCompact<u16>
2nominatorsVec<(AccountId, Vec<(Compact<u16>, Compact<u64>)>)>
3owner_ss58AccountId
4registrationsVec<Compact<u16>>
5validator_permitsVec<Compact<u16>>
6return_per_1000Compact<u64>
7total_daily_returnCompact<u64>

SCALE Encoding

Rule
8 fields encoded consecutively in declaration order. No field names or delimiters.
Size
sum of field sizes

Examples

Struct with 8 fields = delegate_ss58: AccountId, take: Compact<u16>, nominators: Vec<(AccountId, Vec<(Compact<u16>, Compact<u64>)>)>, owner_ss58: AccountId, registrations: Vec<Compact<u16>>, validator_permits: Vec<Compact<u16>>, return_per_1000: Compact<u64>, total_daily_return: Compact<u64>
0x<field0><field1><field2><field3><field4><field5><field6><field7>
field 0 delegate_ss58: AccountId
field 1 take: Compact<u16>
field 2 nominators: Vec<(AccountId, Vec<(Compact<u16>, Compact<u64>)>)>
field 3 owner_ss58: AccountId
field 4 registrations: Vec<Compact<u16>>
field 5 validator_permits: Vec<Compact<u16>>
field 6 return_per_1000: Compact<u64>
field 7 total_daily_return: Compact<u64>

Code Examples

import { TypeRegistry } from "@polkadot/types";

const registry = new TypeRegistry();

// Encode DelegateInfo
const value = registry.createType("DelegateInfo", {
  delegate_ss58: "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY",
  take: 0,
  nominators: "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY",
  owner_ss58: "5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY",
  registrations: 0,
  validator_permits: 0,
  return_per_1000: 0,
  total_daily_return: 0
});
console.log("Hex:", value.toHex());

Type Parameters

AccountId = AccountId

Referenced By (3)

Type Information

Type ID
629
Kind
Composite
Path
pallet_subtensor::rpc_info::delegate_info::DelegateInfo
Runtime
v393