metadata

package
v0.2.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 12, 2025 License: Apache-2.0 Imports: 11 Imported by: 0

README

AccountIdLookupOf -> primitives.MultiAddress Balances -> Balance T::Balance -> Balance AppId -> uint32 Option -> primitives.ScaleOption T::AccountId -> AccountId

Documentation

Index

Constants

View Source
const Blake2_128ConcatHasher = uint8(0)
View Source
const Twox64ConcatHasher = uint8(1)

Variables

This section is empty.

Functions

func DecodePrimitive

func DecodePrimitive(decoder *primitives.Decoder, value *gsrpcTypes.Si1TypeDefPrimitive, isCompact bool) error

func GenericDoubleMapFetch

func GenericDoubleMapFetch[V any, K1 any, K2 any, S StorageDoubleMapT](blockStorage interfaces.BlockStorageT, mapKey1 K1, mapKey2 K2, storage S) (prim.Option[StorageEntryDoubleMap[K1, K2, V]], error)

func GenericFetch

func GenericFetch[V any, S StorageT](blockStorage interfaces.BlockStorageT, storage S) (prim.Option[V], error)

func GenericFetchDefault

func GenericFetchDefault[V any, S StorageT](blockStorage interfaces.BlockStorageT, storage S) (V, error)

func GenericMapFetch

func GenericMapFetch[V any, K any, S StorageMapT](blockStorage interfaces.BlockStorageT, mapKey K, storage S) (prim.Option[StorageEntry[K, V]], error)

Types

type AccountData

type AccountData struct {
	Free     Balance
	Reserved Balance
	Frozen   Balance
	Flags    uint128.Uint128
}

Do not add, remove or change any of the field members.

type AddressedMessage

type AddressedMessage struct {
	Message           VectorMessageKind
	From              prim.H256
	To                prim.H256
	OriginDomain      uint32 `scale:"compact"`
	DestinationDomain uint32 `scale:"compact"`
	Id                uint64 `scale:"compact"`
}

type ArithmeticError

type ArithmeticError struct {
	VariantIndex uint8
}

Do not add, remove or change any of the field members.

func (ArithmeticError) ToHuman

func (this ArithmeticError) ToHuman() string

func (ArithmeticError) ToString

func (this ArithmeticError) ToString() string

type Balance

type Balance struct {
	Value uint128.Uint128
}

func NewBalanceFromBigInt

func NewBalanceFromBigInt(value *big.Int) Balance

func NewBalanceFromString

func NewBalanceFromString(value string) (Balance, error)

func (Balance) Add

func (this Balance) Add(v Balance) Balance

Add returns this+v.

func (Balance) Add128

func (this Balance) Add128(v uint128.Uint128) Balance

Add128 returns this+v.

func (Balance) Add64

func (this Balance) Add64(v uint64) Balance

Add64 returns this+v.

func (Balance) Div

func (this Balance) Div(v Balance) Balance

Div returns this/v.

func (Balance) Div128

func (this Balance) Div128(v uint128.Uint128) Balance

Div128 returns this/v.

func (Balance) Div64

func (this Balance) Div64(v uint64) Balance

Div64 returns this/v.

func (Balance) Mul

func (this Balance) Mul(v Balance) Balance

Mul returns this*v.

func (Balance) Mul128

func (this Balance) Mul128(v uint128.Uint128) Balance

Mul128 returns this*v.

func (Balance) Mul64

func (this Balance) Mul64(v uint64) Balance

Mul64 returns this*v.

func (Balance) String

func (this Balance) String() string

func (Balance) Sub

func (this Balance) Sub(v Balance) Balance

Sub returns this-v.

func (Balance) Sub128

func (this Balance) Sub128(v uint128.Uint128) Balance

Sub128 returns this-v.

func (Balance) Sub64

func (this Balance) Sub64(v uint64) Balance

Sub64 returns this-v.

func (Balance) ToHuman

func (this Balance) ToHuman() string

func (Balance) ToString

func (this Balance) ToString() string

type BlockLength

type BlockLength struct {
	Max       PerDispatchClassU32
	Cols      uint32 `scale:"compact"`
	Rows      uint32 `scale:"compact"`
	ChunkSize uint32 `scale:"compact"`
}

type CommissionClaimPermission

type CommissionClaimPermission struct {
	VariantIndex uint8
	Account      prim.Option[prim.AccountId]
}

func (*CommissionClaimPermission) Decode

func (this *CommissionClaimPermission) Decode(decoder *prim.Decoder) error

func (*CommissionClaimPermission) EncodeTo

func (this *CommissionClaimPermission) EncodeTo(dest *string)

func (CommissionClaimPermission) ToHuman

func (this CommissionClaimPermission) ToHuman() string

func (CommissionClaimPermission) ToString

func (this CommissionClaimPermission) ToString() string

type DataProof

type DataProof struct {
	Roots          TxDataRoots
	Proof          []prim.H256
	NumberOfLeaves uint32 `scale:"compact"`
	LeafIndex      uint32 `scale:"compact"`
	Leaf           prim.H256
}

type DispatchClass

type DispatchClass struct {
	VariantIndex uint8
}

Do not add, remove or change any of the field members.

func (DispatchClass) String

func (this DispatchClass) String() string

func (DispatchClass) ToHuman

func (this DispatchClass) ToHuman() string

func (DispatchClass) ToString

func (this DispatchClass) ToString() string

type DispatchError

type DispatchError struct {
	VariantIndex  uint8
	Module        prim.Option[ModuleError]
	Token         prim.Option[TokenError]
	Arithmetic    prim.Option[ArithmeticError]
	Transactional prim.Option[TransactionalError]
}

Do not add, remove or change any of the field members.

func (*DispatchError) Decode

func (this *DispatchError) Decode(decoder *prim.Decoder) error

func (*DispatchError) EncodeTo

func (this *DispatchError) EncodeTo(dest *string)

func (DispatchError) ToHuman

func (this DispatchError) ToHuman() string

func (DispatchError) ToString

func (this DispatchError) ToString() string

type DispatchFeeModifier

type DispatchFeeModifier struct {
	WeightMaximumFee    prim.Option[uint128.Uint128]
	WeightFeeDivider    prim.Option[uint32]
	WeightFeeMultiplier prim.Option[uint32]
}

Do not add, remove or change any of the field members.

type DispatchInfo

type DispatchInfo struct {
	Weight      Weight
	Class       DispatchClass
	PaysFee     Pays
	FeeModifier DispatchFeeModifier
}

Do not add, remove or change any of the field members.

type DispatchResult

type DispatchResult struct {
	VariantIndex uint8
	Err          prim.Option[DispatchError]
}

func (*DispatchResult) Decode

func (this *DispatchResult) Decode(decoder *prim.Decoder) error

func (*DispatchResult) EncodeTo

func (this *DispatchResult) EncodeTo(dest *string)

func (DispatchResult) ToHuman

func (this DispatchResult) ToHuman() string

func (DispatchResult) ToString

func (this DispatchResult) ToString() string

type FeeDetails

type FeeDetails struct {
	InclusionFee prim.Option[InclusionFee]
}

type IdentityData

type IdentityData struct {
	VariantIndex uint8
	Raw0         prim.Option[[0]byte]
	Raw1         prim.Option[[1]byte]
	Raw2         prim.Option[[2]byte]
	Raw3         prim.Option[[3]byte]
	Raw4         prim.Option[[4]byte]
	Raw5         prim.Option[[5]byte]
	Raw6         prim.Option[[6]byte]
	Raw7         prim.Option[[7]byte]
	Raw8         prim.Option[[8]byte]
	Raw9         prim.Option[[9]byte]
	Raw10        prim.Option[[10]byte]
	Raw11        prim.Option[[11]byte]
	Raw12        prim.Option[[12]byte]
	Raw13        prim.Option[[13]byte]
	Raw14        prim.Option[[14]byte]
	Raw15        prim.Option[[15]byte]
	Raw16        prim.Option[[16]byte]
	Raw17        prim.Option[[17]byte]
	Raw18        prim.Option[[18]byte]
	Raw19        prim.Option[[19]byte]
	Raw20        prim.Option[[20]byte]
	Raw21        prim.Option[[21]byte]
	Raw22        prim.Option[[22]byte]
	Raw23        prim.Option[[23]byte]
	Raw24        prim.Option[[24]byte]
	Raw25        prim.Option[[25]byte]
	Raw26        prim.Option[[26]byte]
	Raw27        prim.Option[[27]byte]
	Raw28        prim.Option[[28]byte]
	Raw29        prim.Option[[29]byte]
	Raw30        prim.Option[[30]byte]
	Raw31        prim.Option[[31]byte]
	Raw32        prim.Option[[32]byte]
	BlakeTwo256  prim.Option[prim.H256]
	Sha256       prim.Option[prim.H256]
	Keccak256    prim.Option[prim.H256]
	ShaThree256  prim.Option[prim.H256]
}

func (*IdentityData) Decode

func (this *IdentityData) Decode(decoder *prim.Decoder) error

func (*IdentityData) EncodeTo

func (this *IdentityData) EncodeTo(dest *string)

func (IdentityData) ToHuman

func (this IdentityData) ToHuman() string

func (IdentityData) ToString

func (this IdentityData) ToString() string

type IdentityInfo

type IdentityInfo struct {
	Additional     []Tuple2[IdentityData, IdentityData]
	Display        IdentityData
	Legal          IdentityData
	Web            IdentityData
	Riot           IdentityData
	Email          IdentityData
	PgpFingerprint prim.Option[[20]byte]
	Image          IdentityData
	Twitter        IdentityData
}

type InclusionFee

type InclusionFee struct {
	BaseFee           Balance
	LenFee            Balance
	AdjustedWeightFee Balance
}

type Judgement

type Judgement struct {
	VariantIndex uint8
	FeePaid      prim.Option[Balance]
}

func (*Judgement) Decode

func (this *Judgement) Decode(decoder *prim.Decoder) error

func (*Judgement) EncodeTo

func (this *Judgement) EncodeTo(dest *string)

func (Judgement) ToHuman

func (this Judgement) ToHuman() string

func (Judgement) ToString

func (this Judgement) ToString() string

type MessageFungibleToken

type MessageFungibleToken struct {
	AssetId prim.H256
	Amount  Balance `scale:"compact"`
}

type Metadata

type Metadata struct {
	Value gsrpcTypes.Metadata
}

func NewMetadata

func NewMetadata(rawMetadata string) (Metadata, error)

func (*Metadata) DecodeEvent

func (this *Metadata) DecodeEvent(palletIndex uint8, eventIndex uint8, decoder *primitives.Decoder) error

func (*Metadata) FindPalletMetadata

func (this *Metadata) FindPalletMetadata(palletIndex uint8) *gsrpcTypes.PalletMetadataV14

func (*Metadata) GetTypeFromId

func (this *Metadata) GetTypeFromId(id int64) *gsrpcTypes.Si1Type

func (*Metadata) PalletCallName

func (this *Metadata) PalletCallName(palletIndex uint8, callIndex uint8) (string, string, error)

func (*Metadata) PalletEventName

func (this *Metadata) PalletEventName(palletIndex uint8, eventIndex uint8) (string, string, error)

type ModuleError

type ModuleError struct {
	Index uint8
	Error [4]byte
}

Do not add, remove or change any of the field members.

type Payload

type Payload struct {
	Call primitives.Call
	// contains filtered or unexported fields
}

func NewPayload

func NewPayload(call primitives.Call, palletName string, callName string) Payload

func (*Payload) CallName

func (this *Payload) CallName() string

func (*Payload) PalletName

func (this *Payload) PalletName() string

type Pays

type Pays struct {
	VariantIndex uint8
}

Do not add, remove or change any of the field members.

func (Pays) ToString

func (this Pays) ToString() string

type PerDispatchClassU32

type PerDispatchClassU32 struct {
	Normal      uint32
	Operational uint32
	Mandatory   uint32
}

Do not add, remove or change any of the field members.

type Perbill

type Perbill struct {
	Value uint32
}

func NewPerbillFromU8

func NewPerbillFromU8(percent uint8) Perbill

func (Perbill) ToHuman

func (this Perbill) ToHuman() string

func (Perbill) ToString

func (this Perbill) ToString() string

type PoolBondExtra

type PoolBondExtra struct {
	VariantIndex uint8
	FreeBalance  prim.Option[Balance]
}

func (*PoolBondExtra) Decode

func (this *PoolBondExtra) Decode(decoder *prim.Decoder) error

func (*PoolBondExtra) EncodeTo

func (this *PoolBondExtra) EncodeTo(dest *string)

func (PoolBondExtra) ToHuman

func (this PoolBondExtra) ToHuman() string

func (PoolBondExtra) ToString

func (this PoolBondExtra) ToString() string

type PoolClaimPermission

type PoolClaimPermission struct {
	VariantIndex uint8
}

func (*PoolClaimPermission) Decode

func (this *PoolClaimPermission) Decode(decoder *prim.Decoder) error

func (*PoolClaimPermission) EncodeTo

func (this *PoolClaimPermission) EncodeTo(dest *string)

func (PoolClaimPermission) ToHuman

func (this PoolClaimPermission) ToHuman() string

func (PoolClaimPermission) ToString

func (this PoolClaimPermission) ToString() string

type PoolCommission

type PoolCommission struct {
	Current         prim.Option[Tuple2[Perbill, prim.AccountId]]
	Max             prim.Option[Perbill]
	ChangeRate      prim.Option[PoolCommissionChangeRate]
	ThrottleFrom    prim.Option[uint32]
	ClaimPermission prim.Option[CommissionClaimPermission]
}

type PoolCommissionChangeRate

type PoolCommissionChangeRate struct {
	MaxIncrease Perbill
	MinDelay    uint32
}

type PoolRoleConfig

type PoolRoleConfig struct {
	VariantIndex uint8
	Set          prim.Option[prim.AccountId]
}

func (*PoolRoleConfig) Decode

func (this *PoolRoleConfig) Decode(decoder *prim.Decoder) error

func (*PoolRoleConfig) EncodeTo

func (this *PoolRoleConfig) EncodeTo(dest *string)

func (PoolRoleConfig) ToHuman

func (this PoolRoleConfig) ToHuman() string

func (PoolRoleConfig) ToString

func (this PoolRoleConfig) ToString() string

type PoolRoles

type PoolRoles struct {
	Depositor prim.AccountId
	Root      prim.Option[prim.AccountId]
	Nominator prim.Option[prim.AccountId]
	Bouncer   prim.Option[prim.AccountId]
}

type PoolState

type PoolState struct {
	VariantIndex uint8
}

func (*PoolState) Decode

func (this *PoolState) Decode(decoder *prim.Decoder) error

func (*PoolState) EncodeTo

func (this *PoolState) EncodeTo(dest *string)

func (PoolState) ToHuman

func (this PoolState) ToHuman() string

func (PoolState) ToString

func (this PoolState) ToString() string

type ProofResponse

type ProofResponse struct {
	DataProof DataProof
	Message   prim.Option[AddressedMessage]
}

type ProxyType

type ProxyType struct {
	VariantIndex uint8
}

func (*ProxyType) Decode

func (this *ProxyType) Decode(decoder *prim.Decoder) error

func (*ProxyType) EncodeTo

func (this *ProxyType) EncodeTo(dest *string)

func (ProxyType) ToHuman

func (this ProxyType) ToHuman() string

func (ProxyType) ToString

func (this ProxyType) ToString() string

type Registration

type Registration struct {
	Judgements []Tuple2[uint32, Judgement]
	Deposit    Balance
	Info       IdentityInfo
}

type RewardDestination

type RewardDestination struct {
	VariantIndex uint8
	Account      prim.Option[prim.AccountId]
}

Variant 0: Staked Variant 1: Stash Variant 2: Controller Variant 3: Account - Account field needs to be set up Variant 4 Nonce

func (*RewardDestination) Decode

func (this *RewardDestination) Decode(decoder *prim.Decoder) error

func (*RewardDestination) EncodeTo

func (this *RewardDestination) EncodeTo(dest *string)

func (RewardDestination) ToHuman

func (this RewardDestination) ToHuman() string

func (RewardDestination) ToString

func (this RewardDestination) ToString() string

type RuntimeDispatchInfo

type RuntimeDispatchInfo struct {
	Weight     Weight
	Class      DispatchClass
	PartialFee Balance
}

type SessionKeys

type SessionKeys struct {
	Babe               prim.H256
	Grandpa            prim.H256
	ImOnline           prim.H256
	AuthorityDiscovery prim.H256
}

type StorageDoubleMapT

type StorageDoubleMapT interface {
	PalletName() string
	StorageName() string
	MapKey1Hasher() uint8
	MapKey2Hasher() uint8
}

type StorageEntry

type StorageEntry[K any, V any] struct {
	Key   K
	Value V
}

func GenericMapKeysFetch

func GenericMapKeysFetch[V any, K any, S StorageMapT](blockStorage interfaces.BlockStorageT, storage S) ([]StorageEntry[K, V], error)

type StorageEntryDoubleMap

type StorageEntryDoubleMap[K1 any, K2 any, V any] struct {
	Key1  K1
	Key2  K2
	Value V
}

func GenericDoubleMapKeysFetch

func GenericDoubleMapKeysFetch[V any, K1 any, K2 any, S StorageDoubleMapT](blockStorage interfaces.BlockStorageT, mapKey1 K1, storage S) ([]StorageEntryDoubleMap[K1, K2, V], error)

type StorageMapT

type StorageMapT interface {
	PalletName() string
	StorageName() string
	MapKeyHasher() uint8
}

type StorageT

type StorageT interface {
	PalletName() string
	StorageName() string
}

type TokenError

type TokenError struct {
	VariantIndex uint8
}

Do not add, remove or change any of the field members.

func (TokenError) ToHuman

func (this TokenError) ToHuman() string

func (TokenError) ToString

func (this TokenError) ToString() string

type TransactionalError

type TransactionalError struct {
	VariantIndex uint8
}

Do not add, remove or change any of the field members.

func (TransactionalError) ToHuman

func (this TransactionalError) ToHuman() string

func (TransactionalError) ToString

func (this TransactionalError) ToString() string

type Tuple2

type Tuple2[T0 any, T1 any] struct {
	T0 T0
	T1 T1
}

func NewTuple2

func NewTuple2[T0 any, T1 any](v1 T0, v2 T1) Tuple2[T0, T1]

type TxDataRoots

type TxDataRoots struct {
	DataRoot   prim.H256
	BlobRoot   prim.H256
	BridgeRoot prim.H256
}

type ValidatorPrefs

type ValidatorPrefs struct {
	Commission Perbill `scale:"compact"`
	Blocked    bool
}

type VectorMessageKind

type VectorMessageKind struct {
	VariantIndex     uint8
	ArbitraryMessage prim.Option[[]byte]
	FungibleToken    prim.Option[MessageFungibleToken]
}

func (*VectorMessageKind) Decode

func (this *VectorMessageKind) Decode(decoder *prim.Decoder) error

func (*VectorMessageKind) EncodeTo

func (this *VectorMessageKind) EncodeTo(dest *string)

func (VectorMessageKind) ToHuman

func (this VectorMessageKind) ToHuman() string

func (VectorMessageKind) ToString

func (this VectorMessageKind) ToString() string

type Weight

type Weight struct {
	RefTime   uint64 `scale:"compact"`
	ProofSize uint64 `scale:"compact"`
}

Do not add, remove or change any of the field members.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL