types

package
v5.0.0-...-8798099 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2024 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Examples

Constants

View Source
const (
	// None 0.1x votes, unlocked
	None = 0
	// Locked1x votes, locked for an enactment period following a successful vote.
	Locked1x = 1
	// Locked2x votes, locked for 2x enactment periods following a successful vote.
	Locked2x = 2
	// Locked3x votes, locked for 4x...
	Locked3x = 3
	// Locked4x votes, locked for 8x...
	Locked4x = 4
	// Locked5x votes, locked for 16x...
	Locked5x = 5
	// Locked6x votes, locked for 32x...
	Locked6x = 6
)
View Source
const (
	// Unknown A call of this hash was not known.
	Unknown = 0
	// BadFormat The preimage for this hash was known but could not be decoded into a Call.
	BadFormat = 1
)
View Source
const (
	IsBool = 0
	IsChar = 1
	IsStr  = 2
	IsU8   = 3
	IsU16  = 4
	IsU32  = 5
	IsU64  = 6
	IsU128 = 7
	IsU256 = 8
	IsI8   = 9
	IsI16  = 10
	IsI32  = 11
	IsI64  = 12
	IsI128 = 13
	IsI256 = 14
)

Si0TypeDefPrimitive variants

View Source
const (
	NanosInSecond  = 1e9
	MillisInSecond = 1e3
)
View Source
const (
	AccountIDLen = 32
)
View Source
const MagicNumber uint32 = 0x6174656d
View Source
const (

	//nolint:lll
	MetadataV14Data = "" /* 621780-byte string literal not displayed */
)

Variables

View Source
var (
	BitOrderName = map[BitOrder]string{
		BitOrderLsb0: "Lsb0",
		BitOrderMsb0: "Msb0",
	}

	BitOrderValue = map[string]BitOrder{
		"Lsb0": BitOrderLsb0,
		"Msb0": BitOrderMsb0,
	}
)
View Source
var (
	ErrInvalidAccountIDBytes = errors.New("invalid account ID bytes")
)

Functions

func BigIntToIntBytes

func BigIntToIntBytes(i *big.Int, bytelen int) ([]byte, error)

BigIntToIntBytes encodes the given big.Int to a big endian encoded signed integer byte slice of the given byte length, using a two's complement if the big.Int is negative and returning an error if the given big.Int would be bigger than the maximum positive (negative) numbers the byte slice of the given length could hold

func BigIntToUintBytes

func BigIntToUintBytes(i *big.Int, bytelen int) ([]byte, error)

BigIntToUintBytes encodes the given big.Int to a big endian encoded unsigned integer byte slice of the given byte length, returning an error if the given big.Int would be bigger than the maximum number the byte slice of the given length could hold

func DefaultPlainHasher

func DefaultPlainHasher(entry StorageEntryMetadata) (hash.Hash, error)

Default implementation of Hasher() for a Storage entry It fails when called if entry is not a plain type.

func IntBytesToBigInt

func IntBytesToBigInt(b []byte) (*big.Int, error)

IntBytesToBigInt decodes the given byte slice containing a big endian encoded signed integer to a big.Int, using a two's complement if the most significant bit is 1

func SetSerDeOptions

func SetSerDeOptions(so SerDeOptions)

SetSerDeOptions overrides default serialise and deserialize options

func UintBytesToBigInt

func UintBytesToBigInt(b []byte) (*big.Int, error)

UintBytesToBigInt decodes the given byte slice containing a big endian encoded unsigned integer to a big.Int

Types

type AccountID

type AccountID [AccountIDLen]byte

AccountID represents a public key (an 32 byte array)

func NewAccountID

func NewAccountID(b []byte) (*AccountID, error)

NewAccountID creates a new AccountID type

func NewAccountIDFromHexString

func NewAccountIDFromHexString(accountIDHex string) (*AccountID, error)

func (*AccountID) Equal

func (a *AccountID) Equal(accountID *AccountID) bool

func (AccountID) MarshalJSON

func (a AccountID) MarshalJSON() ([]byte, error)

func (*AccountID) ToBytes

func (a *AccountID) ToBytes() []byte

func (*AccountID) ToHexString

func (a *AccountID) ToHexString() string

func (*AccountID) UnmarshalJSON

func (a *AccountID) UnmarshalJSON(data []byte) error

type AccountIndex

type AccountIndex uint32

AccountIndex is a shortened, variable-length encoding for an Account

func NewAccountIndex

func NewAccountIndex(i uint32) AccountIndex

NewAccountIndex creates a new AccountIndex type

type AccountInfo

type AccountInfo struct {
	Nonce       U32
	Consumers   U32
	Providers   U32
	Sufficients U32
	Data        struct {
		Free       U128
		Reserved   U128
		MiscFrozen U128
		Flags      U128
	}
}

AccountInfo contains information of an account

type AccountInfoV4 deprecated

type AccountInfoV4 struct {
	TrieID           []byte
	CurrentMemStored uint64
}

Deprecated: AccountInfoV4 is an account information structure for contracts

func NewAccountInfoV4 deprecated

func NewAccountInfoV4(trieID []byte, currentMemStored uint64) AccountInfoV4

Deprecated: NewAccountInfoV4 creates a new AccountInfoV4 type

type Address

type Address struct {
	IsAccountID    bool
	AsAccountID    AccountID
	IsAccountIndex bool
	AsAccountIndex AccountIndex
}

Address is a wrapper around an AccountId or an AccountIndex. It is encoded with a prefix in case of an AccountID. Basically the Address is encoded as `[ <prefix-byte>, ...publicKey/...bytes ]` as per spec

func NewAddressFromAccountID

func NewAddressFromAccountID(b []byte) (Address, error)

NewAddressFromAccountID creates an Address from the given AccountID (public key)

func NewAddressFromAccountIndex

func NewAddressFromAccountIndex(u uint32) Address

NewAddressFromAccountIndex creates an Address from the given AccountIndex

func NewAddressFromHexAccountID

func NewAddressFromHexAccountID(str string) (Address, error)

NewAddressFromHexAccountID creates an Address from the given hex string that contains an AccountID (public key)

func (*Address) Decode

func (a *Address) Decode(decoder scale.Decoder) error

func (Address) Encode

func (a Address) Encode(encoder scale.Encoder) error

type Args

type Args []byte

Args are the encoded arguments for a Call

func (*Args) Decode

func (a *Args) Decode(decoder scale.Decoder) error

Decode implements decoding for Args, which just reads all the remaining bytes into Args

func (Args) Encode

func (a Args) Encode(encoder scale.Encoder) error

Encode implements encoding for Args, which just unwraps the bytes of Args

type ArithmeticError

type ArithmeticError struct {
	IsUnderflow bool

	IsOverflow bool

	IsDivisionByZero bool
}

func (*ArithmeticError) Decode

func (a *ArithmeticError) Decode(decoder scale.Decoder) error

func (ArithmeticError) Encode

func (a ArithmeticError) Encode(encoder scale.Encoder) error

type AssetID

type AssetID struct {
	Parents  U8
	Interior JunctionsV1
}

func (*AssetID) Decode

func (a *AssetID) Decode(decoder scale.Decoder) error

func (AssetID) Encode

func (a AssetID) Encode(encoder scale.Encoder) error

type AssetInstance

type AssetInstance struct {
	IsUndefined bool

	IsIndex bool
	Index   U128

	IsArray4 bool
	Array4   [4]U8

	IsArray8 bool
	Array8   [8]U8

	IsArray16 bool
	Array16   [16]U8

	IsArray32 bool
	Array32   [32]U8

	IsBlob bool
	Blob   []U8
}

func (*AssetInstance) Decode

func (a *AssetInstance) Decode(decoder scale.Decoder) error

func (AssetInstance) Encode

func (a AssetInstance) Encode(encoder scale.Encoder) error

type AssetMetadata

type AssetMetadata struct {
	Decimals           U32
	Name               []U8
	Symbol             []U8
	ExistentialBalance U128
	Location           Option[VersionedMultiLocation]
	Additional         CustomMetadata
}

type AuthorityID

type AuthorityID [32]byte

AuthorityID represents a public key (an 32 byte array)

func NewAuthorityID

func NewAuthorityID(b [32]byte) AuthorityID

NewAuthorityID creates a new AuthorityID type

type BalanceStatus

type BalanceStatus byte
const (
	// Funds are free, as corresponding to `free` item in Balances.
	Free BalanceStatus = 0
	// Funds are reserved, as corresponding to `reserved` item in Balances.
	Reserved BalanceStatus = 1
)

func (*BalanceStatus) Decode

func (bs *BalanceStatus) Decode(decoder scale.Decoder) error

func (BalanceStatus) Encode

func (bs BalanceStatus) Encode(encoder scale.Encoder) error

type BeefyNextAuthoritySet

type BeefyNextAuthoritySet struct {
	// ID
	ID U64
	// Number of validators in the set.
	Len U32
	// Merkle Root Hash build from BEEFY uncompressed AuthorityIds.
	Root H256
}

type BeefySignature

type BeefySignature [65]byte

BeefySignature is a beefy signature

type BitOrder

type BitOrder uint
const (
	BitOrderLsb0 BitOrder = iota
	BitOrderMsb0
)

func NewBitOrderFromString

func NewBitOrderFromString(s string) (BitOrder, error)

func (*BitOrder) String

func (b *BitOrder) String() string

type BitVec

type BitVec struct {
	BitOrder BitOrder

	ByteSlice []uint8
}

func NewBitVec

func NewBitVec(bitOrder BitOrder) *BitVec

func (*BitVec) Decode

func (b *BitVec) Decode(decoder scale.Decoder) error

func (*BitVec) GetMinimumNumberOfBytes

func (b *BitVec) GetMinimumNumberOfBytes(decoder scale.Decoder) (uint, error)

func (*BitVec) String

func (b *BitVec) String() string

type BlockNumber

type BlockNumber U32

func (*BlockNumber) Decode

func (b *BlockNumber) Decode(decoder scale.Decoder) error

Decode implements decoding for BlockNumber, which just wraps the bytes in BlockNumber

func (BlockNumber) Encode

func (b BlockNumber) Encode(encoder scale.Encoder) error

Encode implements encoding for BlockNumber, which just unwraps the bytes of BlockNumber

func (BlockNumber) MarshalJSON

func (b BlockNumber) MarshalJSON() ([]byte, error)

MarshalJSON returns a JSON encoded byte array of BlockNumber

func (*BlockNumber) UnmarshalJSON

func (b *BlockNumber) UnmarshalJSON(bz []byte) error

UnmarshalJSON fills BlockNumber with the JSON encoded byte array given by bz

type BodyID

type BodyID struct {
	IsUnit bool

	IsNamed bool
	Body    []U8

	IsIndex bool
	Index   U32

	IsExecutive bool

	IsTechnical bool

	IsLegislative bool

	IsJudicial bool
}

func (*BodyID) Decode

func (b *BodyID) Decode(decoder scale.Decoder) error

func (BodyID) Encode

func (b BodyID) Encode(encoder scale.Encoder) error

type BodyPart

type BodyPart struct {
	IsVoice bool

	IsMembers    bool
	MembersCount U32

	IsFraction    bool
	FractionNom   U32
	FractionDenom U32

	IsAtLeastProportion    bool
	AtLeastProportionNom   U32
	AtLeastProportionDenom U32

	IsMoreThanProportion    bool
	MoreThanProportionNom   U32
	MoreThanProportionDenom U32
}

func (*BodyPart) Decode

func (b *BodyPart) Decode(decoder scale.Decoder) error

func (BodyPart) Encode

func (b BodyPart) Encode(encoder scale.Encoder) error

type Bool

type Bool bool

Bool represents boolean values

func NewBool

func NewBool(b bool) Bool

NewBool creates a new Bool

type BountyIndex

type BountyIndex U32

type Bytes

type Bytes []byte

Bytes represents byte slices. Bytes has a variable length, it is encoded with a scale prefix

func NewBytes

func NewBytes(b []byte) Bytes

NewBytes creates a new Bytes type

type Bytes1024

type Bytes1024 [1024]byte

Bytes1024 represents an 1024 byte array

func NewBytes1024

func NewBytes1024(b [1024]byte) Bytes1024

NewBytes1024 creates a new Bytes1024 type

type Bytes128

type Bytes128 [128]byte

Bytes128 represents an 128 byte array

func NewBytes128

func NewBytes128(b [128]byte) Bytes128

NewBytes128 creates a new Bytes128 type

type Bytes16

type Bytes16 [16]byte

Bytes16 represents an 16 byte array

func NewBytes16

func NewBytes16(b [16]byte) Bytes16

NewBytes16 creates a new Bytes16 type

type Bytes2048

type Bytes2048 [2048]byte

Bytes2048 represents an 2048 byte array

func NewBytes2048

func NewBytes2048(b [2048]byte) Bytes2048

NewBytes2048 creates a new Bytes2048 type

type Bytes256

type Bytes256 [256]byte

Bytes256 represents an 256 byte array

func NewBytes256

func NewBytes256(b [256]byte) Bytes256

NewBytes256 creates a new Bytes256 type

type Bytes32

type Bytes32 [32]byte

Bytes32 represents an 32 byte array

func NewBytes32

func NewBytes32(b [32]byte) Bytes32

NewBytes32 creates a new Bytes32 type

type Bytes512

type Bytes512 [512]byte

Bytes512 represents an 512 byte array

func NewBytes512

func NewBytes512(b [512]byte) Bytes512

NewBytes512 creates a new Bytes512 type

type Bytes64

type Bytes64 [64]byte

Bytes64 represents an 64 byte array

func NewBytes64

func NewBytes64(b [64]byte) Bytes64

NewBytes64 creates a new Bytes64 type

type Bytes8

type Bytes8 [8]byte

Bytes8 represents an 8 byte array

func NewBytes8

func NewBytes8(b [8]byte) Bytes8

NewBytes8 creates a new Bytes8 type

type BytesBare

type BytesBare []byte

BytesBare represents byte slices that will be encoded bare, i. e. without a compact length prefix. This makes it impossible to decode the bytes, but is used as the payload for signing.

func (*BytesBare) Decode

func (b *BytesBare) Decode(decoder scale.Decoder) error

Decode does nothing and always returns an error. BytesBare is only used for encoding, not for decoding

func (BytesBare) Encode

func (b BytesBare) Encode(encoder scale.Encoder) error

Encode implements encoding for BytesBare, which just unwraps the bytes of BytesBare without adding a compact length prefix

type Call

type Call struct {
	CallIndex CallIndex
	Args      Args
}

Call is the extrinsic function descriptor

func NewCall

func NewCall(m *Metadata, call string, args ...interface{}) (Call, error)

type CallIndex

type CallIndex struct {
	SectionIndex uint8
	MethodIndex  uint8
}

Callindex is a 16 bit wrapper around the `[sectionIndex, methodIndex]` value that uniquely identifies a method

func (*CallIndex) Decode

func (m *CallIndex) Decode(decoder scale.Decoder) error

func (CallIndex) Encode

func (m CallIndex) Encode(encoder scale.Encoder) error

type CandidateDescriptor

type CandidateDescriptor struct {
	ParachainID                  ParachainID
	RelayParent                  Hash
	CollatorID                   CollatorID
	PersistentValidationDataHash Hash
	PoVHash                      Hash
	ErasureRoot                  Hash
	CollatorSignature            CollatorSignature
	ParaHead                     Hash
	ValidationCodeHash           Hash
}

type CandidateReceipt

type CandidateReceipt struct {
	Descriptor CandidateDescriptor

	CommitmentsHash Hash
}

type ChainProperties

type ChainProperties struct {
	IsSS58Format    bool
	AsSS58Format    U8
	IsTokenDecimals bool
	AsTokenDecimals U32
	IsTokenSymbol   bool
	AsTokenSymbol   Text
}

ChainProperties contains the SS58 format, the token decimals and the token symbol

func (*ChainProperties) Decode

func (a *ChainProperties) Decode(decoder scale.Decoder) error

func (ChainProperties) Encode

func (a ChainProperties) Encode(encoder scale.Encoder) error

type ChangesTrieConfiguration

type ChangesTrieConfiguration struct {
	DigestInterval U32
	DigestLevels   U32
}

type ChangesTrieSignal

type ChangesTrieSignal struct {
	IsNewConfiguration bool
	AsNewConfiguration Bytes
}

func (*ChangesTrieSignal) Decode

func (c *ChangesTrieSignal) Decode(decoder scale.Decoder) error

func (ChangesTrieSignal) Encode

func (c ChangesTrieSignal) Encode(encoder scale.Encoder) error

type ClassMetadata

type ClassMetadata struct {
	Deposit  U128
	Data     Bytes
	IsFrozen bool
}

func (*ClassMetadata) Decode

func (c *ClassMetadata) Decode(decoder scale.Decoder) error

func (ClassMetadata) Encode

func (c ClassMetadata) Encode(encoder scale.Encoder) error

type CollatorID

type CollatorID [32]U8

type CollatorSignature

type CollatorSignature [64]U8

type CollectionDetails

type CollectionDetails struct {
	Owner             AccountID
	Issuer            AccountID
	Admin             AccountID
	Freezer           AccountID
	TotalDeposit      U128
	FreeHolding       bool
	Instances         U32
	InstanceMetadatas U32
	Attributes        U32
	IsFrozen          bool
}

func (*CollectionDetails) Decode

func (c *CollectionDetails) Decode(decoder scale.Decoder) error

func (CollectionDetails) Encode

func (c CollectionDetails) Encode(encoder scale.Encoder) error

type Commitment

type Commitment struct {
	Payload        []PayloadItem
	BlockNumber    uint32
	ValidatorSetID uint64
}

Commitment is a beefy commitment

type CompactSignedCommitment

type CompactSignedCommitment struct {
	Commitment        Commitment
	SignaturesFrom    []byte
	ValidatorSetLen   uint32
	SignaturesCompact []BeefySignature
}

type Consensus

type Consensus struct {
	ConsensusEngineID ConsensusEngineID
	Bytes             Bytes
}

type ConsensusEngineID

type ConsensusEngineID U32

ConsensusEngineID is a 4-byte identifier (actually a [u8; 4]) identifying the engine, e.g. for Aura it would be [b'a', b'u', b'r', b'a']

type ConstantMetadataV14

type ConstantMetadataV14 struct {
	Name  Text
	Type  Si1LookupTypeID
	Value Bytes
	Docs  []Text
}

type CoreIndex

type CoreIndex U32

type CrossChainTransferability

type CrossChainTransferability struct {
	IsNone bool

	IsXcm bool
	AsXcm XcmMetadata

	IsConnectors bool

	IsAll bool
	AsAll XcmMetadata
}

func (*CrossChainTransferability) Decode

func (c *CrossChainTransferability) Decode(decoder scale.Decoder) error

func (CrossChainTransferability) Encode

func (c CrossChainTransferability) Encode(encoder scale.Encoder) error

type CrowloadMemo

type CrowloadMemo []byte

type CurrencyID

type CurrencyID struct {
	IsNative bool

	IsTranche bool
	Tranche   Tranche

	IsKSM bool

	IsAUSD bool

	IsForeignAsset bool
	AsForeignAsset U32

	IsStaking bool
	AsStaking StakingCurrency
}

func (*CurrencyID) Decode

func (c *CurrencyID) Decode(decoder scale.Decoder) error

func (CurrencyID) Encode

func (c CurrencyID) Encode(encoder scale.Encoder) error

type CustomMetadata

type CustomMetadata struct {
	Transferability CrossChainTransferability
	Mintable        bool
	Permissioned    bool
	PoolCurrency    bool
}

type Data

type Data []byte

Data is a raw data structure, containing raw bytes that are not decoded/encoded (without any length encoding). Be careful using this in your own structs – it only works as the last value in a struct since it will consume the remainder of the encoded data. The reason for this is that it does not contain any length encoding, so it would not know where to stop.

func NewData

func NewData(b []byte) Data

NewData creates a new Data type

func (*Data) Decode

func (d *Data) Decode(decoder scale.Decoder) error

Decode implements decoding for Data, which just reads all the remaining bytes into Data

func (Data) Encode

func (d Data) Encode(encoder scale.Encoder) error

Encode implements encoding for Data, which just unwraps the bytes of Data

func (Data) Hex

func (d Data) Hex() string

Hex returns a hex string representation of the value

type DemocracyConviction

type DemocracyConviction byte

func (*DemocracyConviction) Decode

func (dc *DemocracyConviction) Decode(decoder scale.Decoder) error

func (DemocracyConviction) Encode

func (dc DemocracyConviction) Encode(encoder scale.Encoder) error

type DemocracyVote

type DemocracyVote struct {
	Aye        bool
	Conviction DemocracyConviction
}

func (*DemocracyVote) Decode

func (d *DemocracyVote) Decode(decoder scale.Decoder) error

func (DemocracyVote) Encode

func (d DemocracyVote) Encode(encoder scale.Encoder) error

type Digest

type Digest []DigestItem

Digest contains logs

func (Digest) MarshalJSON

func (d Digest) MarshalJSON() ([]byte, error)

MarshalJSON returns a JSON encoded byte array of u

func (*Digest) UnmarshalJSON

func (d *Digest) UnmarshalJSON(bz []byte) error

UnmarshalJSON fills u with the JSON encoded byte array given by b

type DigestItem

type DigestItem struct {
	IsChangesTrieRoot   bool // 2
	AsChangesTrieRoot   Hash
	IsPreRuntime        bool // 6
	AsPreRuntime        PreRuntime
	IsConsensus         bool // 4
	AsConsensus         Consensus
	IsSeal              bool // 5
	AsSeal              Seal
	IsChangesTrieSignal bool // 7
	AsChangesTrieSignal ChangesTrieSignal
	IsOther             bool // 0
	AsOther             Bytes
}

DigestItem specifies the item in the logs of a digest

func (*DigestItem) Decode

func (m *DigestItem) Decode(decoder scale.Decoder) error

func (DigestItem) Encode

func (m DigestItem) Encode(encoder scale.Encoder) error

type DigestOf

type DigestOf []DigestItem

DigestOf contains logs

func (DigestOf) MarshalJSON

func (d DigestOf) MarshalJSON() ([]byte, error)

MarshalJSON returns a JSON encoded byte array of u

func (*DigestOf) UnmarshalJSON

func (d *DigestOf) UnmarshalJSON(bz []byte) error

UnmarshalJSON fills u with the JSON encoded byte array given by b

type DispatchClass

type DispatchClass struct {
	// A normal dispatch
	IsNormal bool
	// An operational dispatch
	IsOperational bool
	// A mandatory dispatch
	IsMandatory bool
}

DispatchClass is a generalized group of dispatch types. This is only distinguishing normal, user-triggered transactions (`Normal`) and anything beyond which serves a higher purpose to the system (`Operational`).

func (*DispatchClass) Decode

func (d *DispatchClass) Decode(decoder scale.Decoder) error

func (DispatchClass) Encode

func (d DispatchClass) Encode(encoder scale.Encoder) error

type DispatchError

type DispatchError struct {
	IsOther bool

	IsCannotLookup bool

	IsBadOrigin bool

	IsModule    bool
	ModuleError ModuleError

	IsConsumerRemaining bool

	IsNoProviders bool

	IsTooManyConsumers bool

	IsToken    bool
	TokenError TokenError

	IsArithmetic    bool
	ArithmeticError ArithmeticError

	IsTransactional    bool
	TransactionalError TransactionalError
}

DispatchError is an error occurring during extrinsic dispatch

func (*DispatchError) Decode

func (d *DispatchError) Decode(decoder scale.Decoder) error

func (DispatchError) Encode

func (d DispatchError) Encode(encoder scale.Encoder) error

type DispatchErrorWithPostInfo

type DispatchErrorWithPostInfo struct {
	PostInfo PostDispatchInfo
	Error    DispatchError
}

DispatchErrorWithPostInfo is used in DispatchResultWithPostInfo.

func (*DispatchErrorWithPostInfo) Decode

func (d *DispatchErrorWithPostInfo) Decode(decoder scale.Decoder) error

func (DispatchErrorWithPostInfo) Encode

func (d DispatchErrorWithPostInfo) Encode(encoder scale.Encoder) error

type DispatchInfo

type DispatchInfo struct {
	// Weight of this transaction
	Weight Weight
	// Class of this transaction
	Class DispatchClass
	// PaysFee indicates whether this transaction pays fees
	PaysFee Pays
}

DispatchInfo contains a bundle of static information collected from the `#[weight = $x]` attributes.

func (*DispatchInfo) Decode

func (d *DispatchInfo) Decode(decoder scale.Decoder) error

type DispatchResult

type DispatchResult struct {
	Ok    bool
	Error DispatchError
}

DispatchResult can be returned from dispatchable functions

func (*DispatchResult) Decode

func (d *DispatchResult) Decode(decoder scale.Decoder) error

func (DispatchResult) Encode

func (d DispatchResult) Encode(encoder scale.Encoder) error

type DispatchResultWithPostInfo

type DispatchResultWithPostInfo struct {
	IsOk bool
	Ok   PostDispatchInfo

	IsError bool
	Error   DispatchErrorWithPostInfo
}

DispatchResultWithPostInfo can be returned from dispatch able functions.

func (*DispatchResultWithPostInfo) Decode

func (d *DispatchResultWithPostInfo) Decode(decoder scale.Decoder) error

func (DispatchResultWithPostInfo) Encode

func (d DispatchResultWithPostInfo) Encode(encoder scale.Encoder) error

type DisputeLocation

type DisputeLocation struct {
	IsLocal bool

	IsRemote bool
}

func (*DisputeLocation) Decode

func (d *DisputeLocation) Decode(decoder scale.Decoder) error

func (DisputeLocation) Encode

func (d DisputeLocation) Encode(encoder scale.Encoder) error

type DisputeResult

type DisputeResult struct {
	IsValid bool

	IsInvalid bool
}

func (*DisputeResult) Decode

func (d *DisputeResult) Decode(decoder scale.Decoder) error

func (DisputeResult) Encode

func (d DisputeResult) Encode(encoder scale.Encoder) error

type DoubleMapTypeV10

type DoubleMapTypeV10 struct {
	Hasher     StorageHasherV10
	Key1       Type
	Key2       Type
	Value      Type
	Key2Hasher StorageHasherV10
}

type DoubleMapTypeV4

type DoubleMapTypeV4 struct {
	Hasher     StorageHasher
	Key1       Type
	Key2       Type
	Value      Type
	Key2Hasher Text
}

type DoubleMapTypeV5

type DoubleMapTypeV5 struct {
	Hasher     StorageHasher
	Key1       Type
	Key2       Type
	Value      Type
	Key2Hasher StorageHasher
}

type EcdsaSignature

type EcdsaSignature [65]byte

EcdsaSignature is a 65 byte array

func NewEcdsaSignature

func NewEcdsaSignature(b []byte) EcdsaSignature

NewEcdsaSignature creates a new EcdsaSignature type

func (EcdsaSignature) Hex

func (eh EcdsaSignature) Hex() string

Hex returns a hex string representation of the value (not of the encoded value)

type ElectionCompute

type ElectionCompute byte
const (
	// OnChain means that the result was forcefully computed on chain at the end of the session.
	OnChain ElectionCompute = 0
	// Signed means that the result was submitted and accepted to the chain via a signed transaction.
	Signed ElectionCompute = 1
	// Unsigned means that the result was submitted and accepted to the chain via
	// an unsigned transaction (by an authority).
	Unsigned ElectionCompute = 2
)

func NewElectionCompute

func NewElectionCompute(b byte) ElectionCompute

func (*ElectionCompute) Decode

func (ec *ElectionCompute) Decode(decoder scale.Decoder) error

func (ElectionCompute) Encode

func (ec ElectionCompute) Encode(encoder scale.Encoder) error

type EncodedCall

type EncodedCall struct {
	Call []U8
}

func (*EncodedCall) Decode

func (e *EncodedCall) Decode(decoder scale.Decoder) error

func (EncodedCall) Encode

func (e EncodedCall) Encode(encoder scale.Encoder) error

type ErrorMetadataV14

type ErrorMetadataV14 struct {
	Type Si1LookupTypeID
}

type ErrorMetadataV8

type ErrorMetadataV8 struct {
	Name          Text
	Documentation []Text
}

type EventAssetApprovalCancelled

type EventAssetApprovalCancelled struct {
	Phase    Phase
	AssetID  U32
	Owner    AccountID
	Delegate AccountID
	Topics   []Hash
}

EventAssetApprovalCancelled is emitted when an approval for account `delegate` was cancelled by `owner`.

type EventAssetApprovedTransfer

type EventAssetApprovedTransfer struct {
	Phase    Phase
	AssetID  U32
	Source   AccountID
	Delegate AccountID
	Amount   U128
	Topics   []Hash
}

EventAssetApprovedTransfer is emitted when (additional) funds have been approved for transfer to a destination account.

type EventAssetAssetFrozen

type EventAssetAssetFrozen struct {
	Phase   Phase
	AssetID U32
	Topics  []Hash
}

EventAssetAssetFrozen is emitted when some asset `asset_id` was frozen.

type EventAssetAssetStatusChanged

type EventAssetAssetStatusChanged struct {
	Phase   Phase
	AssetID U32
	Topics  []Hash
}

EventAssetAssetStatusChanged is emitted when an asset has had its attributes changed by the `Force` origin.

type EventAssetAssetThawed

type EventAssetAssetThawed struct {
	Phase   Phase
	AssetID U32
	Topics  []Hash
}

EventAssetAssetThawed is emitted when some asset `asset_id` was thawed.

type EventAssetBurned

type EventAssetBurned struct {
	Phase   Phase
	AssetID U32
	Owner   AccountID
	Balance U128
	Topics  []Hash
}

EventAssetBurned is emitted when an asset is destroyed.

type EventAssetCreated

type EventAssetCreated struct {
	Phase   Phase
	AssetID U32
	Creator AccountID
	Owner   AccountID
	Topics  []Hash
}

EventAssetCreated is emitted when an asset is created.

type EventAssetDestroyed

type EventAssetDestroyed struct {
	Phase   Phase
	AssetID U32
	Topics  []Hash
}

EventAssetDestroyed is emitted when an asset class is destroyed.

type EventAssetForceCreated

type EventAssetForceCreated struct {
	Phase   Phase
	AssetID U32
	Owner   AccountID
	Topics  []Hash
}

EventAssetForceCreated is emitted when some asset class was force-created.

type EventAssetFrozen

type EventAssetFrozen struct {
	Phase   Phase
	AssetID U32
	Who     AccountID
	Topics  []Hash
}

EventAssetFrozen is emitted when some account `who` was frozen.

type EventAssetIssued

type EventAssetIssued struct {
	Phase   Phase
	AssetID U32
	Who     AccountID
	Balance U128
	Topics  []Hash
}

EventAssetIssued is emitted when an asset is issued.

type EventAssetMetadataCleared

type EventAssetMetadataCleared struct {
	Phase   Phase
	AssetID U32
	Topics  []Hash
}

EventAssetMetadataCleared is emitted when metadata has been cleared for an asset.

type EventAssetMetadataSet

type EventAssetMetadataSet struct {
	Phase    Phase
	AssetID  U32
	Name     MetadataSetName
	Symbol   MetadataSetSymbol
	Decimals U8
	IsFrozen bool
	Topics   []Hash
}

EventAssetMetadataSet is emitted when new metadata has been set for an asset.

type EventAssetOwnerChanged

type EventAssetOwnerChanged struct {
	Phase   Phase
	AssetID U32
	Owner   AccountID
	Topics  []Hash
}

EventAssetOwnerChanged is emitted when the owner changed.

type EventAssetTeamChanged

type EventAssetTeamChanged struct {
	Phase   Phase
	AssetID U32
	Issuer  AccountID
	Admin   AccountID
	Freezer AccountID
	Topics  []Hash
}

EventAssetTeamChanged is emitted when the management team changed.

type EventAssetThawed

type EventAssetThawed struct {
	Phase   Phase
	AssetID U32
	Who     AccountID
	Topics  []Hash
}

EventAssetThawed is emitted when some account `who` was thawed.

type EventAssetTransferred

type EventAssetTransferred struct {
	Phase   Phase
	AssetID U32
	To      AccountID
	From    AccountID
	Balance U128
	Topics  []Hash
}

EventAssetTransferred is emitted when an asset is transferred.

type EventAssetTransferredApproved

type EventAssetTransferredApproved struct {
	Phase       Phase
	AssetID     U32
	Owner       AccountID
	Delegate    AccountID
	Destination AccountID
	Amount      U128
	Topics      []Hash
}

EventAssetTransferredApproved is emitted when an `amount` was transferred in its entirety from `owner` to `destination` by the approved `delegate`.

type EventAuctionsAuctionClosed

type EventAuctionsAuctionClosed struct {
	Phase        Phase
	AuctionIndex U32
	Topics       []Hash
}

EventAuctionsAuctionClosed is emitted when an auction ended. All funds become unreserved.

type EventAuctionsAuctionStarted

type EventAuctionsAuctionStarted struct {
	Phase        Phase
	AuctionIndex U32
	LeasePeriod  U32
	Ending       U32
	Topics       []Hash
}

EventAuctionsAuctionStarted is emitted when an auction started. Provides its index and the block number where it will begin to close and the first lease period of the quadruplet that is auctioned.

type EventAuctionsBidAccepted

type EventAuctionsBidAccepted struct {
	Phase       Phase
	Who         AccountID
	ParachainID ParachainID
	Amount      U128
	FirstSlot   U32
	LastSlot    U32
	Topics      []Hash
}

EventAuctionsBidAccepted is emitted when a new bid has been accepted as the current winner.

type EventAuctionsReserveConfiscated

type EventAuctionsReserveConfiscated struct {
	Phase       Phase
	ParachainID ParachainID
	Leaser      AccountID
	Amount      U128
	Topics      []Hash
}

EventAuctionsReserveConfiscated is emitted when someone attempted to lease the same slot twice for a parachain. The amount is held in reserve but no parachain slot has been leased.

type EventAuctionsReserved

type EventAuctionsReserved struct {
	Phase         Phase
	Bidder        AccountID
	ExtraReserved U128
	TotalAmount   U128
	Topics        []Hash
}

EventAuctionsReserved is emitted when funds were reserved for a winning bid. First balance is the extra amount reserved. Second is the total.

type EventAuctionsUnreserved

type EventAuctionsUnreserved struct {
	Phase  Phase
	Bidder AccountID
	Amount U128
	Topics []Hash
}

EventAuctionsUnreserved is emitted when funds were unreserved since bidder is no longer active.

type EventAuctionsWinningOffset

type EventAuctionsWinningOffset struct {
	Phase        Phase
	AuctionIndex U32
	BlockNumber  U32
	Topics       []Hash
}

EventAuctionsWinningOffset is emitted when the winning offset was chosen for an auction. This will map into the `Winning` storage map.

type EventBagsListRebagged

type EventBagsListRebagged struct {
	Phase  Phase
	Who    AccountID
	From   U64
	To     U64
	Topics []Hash
}

EventBagsListRebagged is emitted when an account was moved from one bag to another.

type EventBalancesBalanceSet

type EventBalancesBalanceSet struct {
	Phase    Phase
	Who      AccountID
	Free     U128
	Reserved U128
	Topics   []Hash
}

EventBalancesBalanceSet is emitted when a balance is set by root

type EventBalancesDeposit

type EventBalancesDeposit struct {
	Phase   Phase
	Who     AccountID
	Balance U128
	Topics  []Hash
}

EventBalancesDeposit is emitted when an account receives some free balance

type EventBalancesDustLost

type EventBalancesDustLost struct {
	Phase   Phase
	Who     AccountID
	Balance U128
	Topics  []Hash
}

EventBalancesDustLost is emitted when an account is removed with a balance that is non-zero but below ExistentialDeposit, resulting in a loss.

type EventBalancesEndowed

type EventBalancesEndowed struct {
	Phase   Phase
	Who     AccountID
	Balance U128
	Topics  []Hash
}

EventBalancesEndowed is emitted when an account is created with some free balance

type EventBalancesReserveRepatriated

type EventBalancesReserveRepatriated struct {
	Phase             Phase
	From              AccountID
	To                AccountID
	Balance           U128
	DestinationStatus BalanceStatus
	Topics            []Hash
}

EventBalancesReserveRepatriated is emitted when some balance was moved from the reserve of the first account to the second account.

type EventBalancesReserved

type EventBalancesReserved struct {
	Phase   Phase
	Who     AccountID
	Balance U128
	Topics  []Hash
}

EventBalancesReserved is emitted when some balance was reserved (moved from free to reserved)

type EventBalancesSlashed

type EventBalancesSlashed struct {
	Phase   Phase
	Who     AccountID
	Balance U128
	Topics  []Hash
}

EventBalancesSlashed is emitted when some amount was removed from the account (e.g. for misbehavior)

type EventBalancesTransfer

type EventBalancesTransfer struct {
	Phase  Phase
	From   AccountID
	To     AccountID
	Value  U128
	Topics []Hash
}

EventBalancesTransfer is emitted when a transfer succeeded (from, to, value)

type EventBalancesUnreserved

type EventBalancesUnreserved struct {
	Phase   Phase
	Who     AccountID
	Balance U128
	Topics  []Hash
}

EventBalancesUnreserved is emitted when some balance was unreserved (moved from reserved to free)

type EventBalancesWithdraw

type EventBalancesWithdraw struct {
	Phase   Phase
	Who     AccountID
	Balance U128
	Topics  []Hash
}

EventBalancesWithdraw is emitted when some amount was withdrawn from the account (e.g. for transaction fees)

type EventBountiesBountyAwarded

type EventBountiesBountyAwarded struct {
	Phase       Phase
	Index       BountyIndex
	Beneficiary AccountID
	Topics      []Hash
}

EventBountiesBountyAwarded is emitted when a bounty is awarded to a beneficiary

type EventBountiesBountyBecameActive

type EventBountiesBountyBecameActive struct {
	Phase  Phase
	Index  BountyIndex
	Topics []Hash
}

EventBountiesBountyBecameActive is emitted when a bounty proposal is funded and became active

type EventBountiesBountyCanceled

type EventBountiesBountyCanceled struct {
	Phase  Phase
	Index  BountyIndex
	Topics []Hash
}

EventBountiesBountyCanceled is emitted when a bounty is cancelled.

type EventBountiesBountyClaimed

type EventBountiesBountyClaimed struct {
	Phase       Phase
	Index       BountyIndex
	Payout      U128
	Beneficiary AccountID
	Topics      []Hash
}

EventBountiesBountyClaimed is emitted when a bounty is claimed by beneficiary

type EventBountiesBountyExtended

type EventBountiesBountyExtended struct {
	Phase  Phase
	Index  BountyIndex
	Topics []Hash
}

EventBountiesBountyExtended is emitted when a bounty is extended.

type EventBountiesBountyProposed

type EventBountiesBountyProposed struct {
	Phase         Phase
	ProposalIndex BountyIndex
	Topics        []Hash
}

EventBountiesBountyProposed is emitted for a new bounty proposal.

type EventBountiesBountyRejected

type EventBountiesBountyRejected struct {
	Phase         Phase
	ProposalIndex BountyIndex
	Bond          U128
	Topics        []Hash
}

EventBountiesBountyRejected is emitted when a bounty proposal was rejected; funds were slashed.

type EventChildBountiesAdded

type EventChildBountiesAdded struct {
	Phase      Phase
	Index      BountyIndex
	ChildIndex BountyIndex
	Topics     []Hash
}

EventChildBountiesAdded is emitted when a child-bounty is added.

type EventChildBountiesAwarded

type EventChildBountiesAwarded struct {
	Phase       Phase
	Index       BountyIndex
	ChildIndex  BountyIndex
	Beneficiary AccountID
	Topics      []Hash
}

EventChildBountiesAwarded is emitted when a child-bounty is awarded to a beneficiary.

type EventChildBountiesCanceled

type EventChildBountiesCanceled struct {
	Phase      Phase
	Index      BountyIndex
	ChildIndex BountyIndex
	Topics     []Hash
}

EventChildBountiesCanceled is emitted when a child-bounty is canceled.

type EventChildBountiesClaimed

type EventChildBountiesClaimed struct {
	Phase       Phase
	Index       BountyIndex
	ChildIndex  BountyIndex
	Payout      U128
	Beneficiary AccountID
	Topics      []Hash
}

EventChildBountiesClaimed is emitted when a child-bounty is claimed by a beneficiary.

type EventClaimsClaimed

type EventClaimsClaimed struct {
	Phase           Phase
	Who             AccountID
	EthereumAddress H160
	Amount          U128
	Topics          []Hash
}

EventClaimsClaimed is emitted when an account claims some DOTs

type EventCollatorSelectionCandidateAdded

type EventCollatorSelectionCandidateAdded struct {
	Phase          Phase
	CandidateAdded AccountID
	Bond           U128
	Topics         []Hash
}

type EventCollatorSelectionCandidateRemoved

type EventCollatorSelectionCandidateRemoved struct {
	Phase            Phase
	CandidateRemoved AccountID
	Topics           []Hash
}

type EventCollatorSelectionNewCandidacyBond

type EventCollatorSelectionNewCandidacyBond struct {
	Phase            Phase
	NewCandidacyBond U128
	Topics           []Hash
}

type EventCollatorSelectionNewDesiredCandidates

type EventCollatorSelectionNewDesiredCandidates struct {
	Phase                Phase
	NewDesiredCandidates U32
	Topics               []Hash
}

type EventCollatorSelectionNewInvulnerables

type EventCollatorSelectionNewInvulnerables struct {
	Phase            Phase
	NewInvulnerables []AccountID
	Topics           []Hash
}

type EventContractsCodeRemoved

type EventContractsCodeRemoved struct {
	Phase    Phase
	CodeHash Hash
	Topics   []Hash
}

EventContractsCodeRemoved is emitted when code with the specified hash was removed

type EventContractsCodeStored

type EventContractsCodeStored struct {
	Phase    Phase
	CodeHash Hash
	Topics   []Hash
}

EventContractsCodeStored is emitted when code with the specified hash has been stored

type EventContractsContractCodeUpdated

type EventContractsContractCodeUpdated struct {
	Phase       Phase
	Contract    AccountID
	NewCodeHash Hash
	OldCodeHash Hash
	Topics      []Hash
}

EventContractsContractCodeUpdated is emitted when a contract's code was updated

type EventContractsContractEmitted

type EventContractsContractEmitted struct {
	Phase    Phase
	Contract AccountID
	Data     Bytes
	Topics   []Hash
}

EventContractsContractEmitted is emitted when a custom event emitted by the contract

type EventContractsContractExecution

type EventContractsContractExecution struct {
	Phase   Phase
	Account AccountID
	Data    Bytes
	Topics  []Hash
}

EventContractsContractExecution is triggered when an event deposited upon execution of a contract from the account

type EventContractsInstantiated

type EventContractsInstantiated struct {
	Phase    Phase
	Deployer AccountID
	Contract AccountID
	Topics   []Hash
}

EventContractsInstantiated is emitted when a contract is deployed by address at the specified address

type EventContractsScheduleUpdated

type EventContractsScheduleUpdated struct {
	Phase    Phase
	Schedule U32
	Topics   []Hash
}

EventContractsScheduleUpdated is triggered when the current [schedule] is updated

type EventContractsTerminated

type EventContractsTerminated struct {
	Phase       Phase
	Contract    AccountID
	Beneficiary AccountID
	Topics      []Hash
}

EventContractsTerminated The only way for a contract to be removed and emitting this event is by calling `seal_terminate`

type EventConvictionVotingDelegated

type EventConvictionVotingDelegated struct {
	Phase  Phase
	Who    AccountID
	Target AccountID
	Topics []Hash
}

EventConvictionVotingDelegated is emitted when an account has delegated their vote to another account.

type EventConvictionVotingUndelegated

type EventConvictionVotingUndelegated struct {
	Phase  Phase
	Who    AccountID
	Target AccountID
	Topics []Hash
}

EventConvictionVotingUndelegated is emitted when an account has delegated their vote to another account.

type EventCouncilApproved

type EventCouncilApproved struct {
	Phase    Phase
	Proposal Hash
	Topics   []Hash
}

EventCouncilApproved is emitted when a motion was approved by the required threshold.

type EventCouncilClosed

type EventCouncilClosed struct {
	Phase    Phase
	Proposal Hash
	YesCount U32
	NoCount  U32
	Topics   []Hash
}

EventCouncilClosed is emitted when a proposal was closed after its duration was up.

type EventCouncilDisapproved

type EventCouncilDisapproved struct {
	Phase    Phase
	Proposal Hash
	Topics   []Hash
}

EventCouncilDisapproved is emitted when a motion was not approved by the required threshold.

type EventCouncilExecuted

type EventCouncilExecuted struct {
	Phase    Phase
	Proposal Hash
	Result   DispatchResult
	Topics   []Hash
}

EventCouncilExecuted is emitted when a motion was executed; `result` is true if returned without error.

type EventCouncilMemberExecuted

type EventCouncilMemberExecuted struct {
	Phase    Phase
	Proposal Hash
	Result   DispatchResult
	Topics   []Hash
}

EventCouncilMemberExecuted is emitted when a single member did some action; `result` is true if returned without error.

type EventCouncilProposed

type EventCouncilProposed struct {
	Phase         Phase
	Who           AccountID
	ProposalIndex U32
	Proposal      Hash
	MemberCount   U32
	Topics        []Hash
}

EventCouncilProposed is emitted when a motion (given hash) has been proposed (by given account) with a threshold (given `MemberCount`).

type EventCouncilVoted

type EventCouncilVoted struct {
	Phase    Phase
	Who      AccountID
	Proposal Hash
	Approve  bool
	YesCount U32
	NoCount  U32
	Topics   []Hash
}

EventCollectiveVote is emitted when a motion (given hash) has been voted on by given account, leaving a tally (yes votes and no votes given respectively as `MemberCount`).

type EventCrowdloanAddedToNewRaise

type EventCrowdloanAddedToNewRaise struct {
	Phase     Phase
	FundIndex U32
	Topics    []Hash
}

EventCrowdloanAddedToNewRaise is emitted when a parachain has been moved to `NewRaise`.

type EventCrowdloanAllRefunded

type EventCrowdloanAllRefunded struct {
	Phase     Phase
	FundIndex U32
	Topics    []Hash
}

EventCrowdloanAllRefunded is emitted when all loans in a fund have been refunded.

type EventCrowdloanContributed

type EventCrowdloanContributed struct {
	Phase     Phase
	Who       AccountID
	FundIndex U32
	Amount    U128
	Topics    []Hash
}

EventCrowdloanContributed is emitted when `who` contributed to a crowd sale.

type EventCrowdloanCreated

type EventCrowdloanCreated struct {
	Phase     Phase
	FundIndex U32
	Topics    []Hash
}

EventCrowdloanCreated is emitted when a new crowdloaning campaign is created.

type EventCrowdloanDissolved

type EventCrowdloanDissolved struct {
	Phase     Phase
	FundIndex U32
	Topics    []Hash
}

EventCrowdloanDissolved is emitted when the fund is dissolved.

type EventCrowdloanEdited

type EventCrowdloanEdited struct {
	Phase     Phase
	FundIndex U32
	Topics    []Hash
}

EventCrowdloanEdited is emitted when the configuration to a crowdloan has been edited.

type EventCrowdloanHandleBidResult

type EventCrowdloanHandleBidResult struct {
	Phase          Phase
	FundIndex      U32
	DispatchResult DispatchResult
	Topics         []Hash
}

EventCrowdloanHandleBidResult is emitted when trying to submit a new bid to the Slots pallet.

type EventCrowdloanMemoUpdated

type EventCrowdloanMemoUpdated struct {
	Phase     Phase
	Who       AccountID
	FundIndex U32
	Memo      CrowloadMemo
	Topics    []Hash
}

EventCrowdloanMemoUpdated is emitted when a memo has been updated.

type EventCrowdloanPartiallyRefunded

type EventCrowdloanPartiallyRefunded struct {
	Phase     Phase
	FundIndex U32
	Topics    []Hash
}

EventCrowdloanPartiallyRefunded is emitted when the loans in a fund have been partially dissolved, i.e. there are some left over child keys that still need to be killed.

type EventCrowdloanWithdrew

type EventCrowdloanWithdrew struct {
	Phase     Phase
	Who       AccountID
	FundIndex U32
	Amount    U128
	Topics    []Hash
}

EventCrowdloanWithdrew is emitted when the full balance of a contributor was withdrawn.

type EventDemocracyBlacklisted

type EventDemocracyBlacklisted struct {
	Phase  Phase
	Hash   Hash
	Topics []Hash
}

EventDemocracyBlacklisted is emitted when A proposal has been blacklisted permanently

type EventDemocracyCancelled

type EventDemocracyCancelled struct {
	Phase           Phase
	ReferendumIndex U32
	Topics          []Hash
}

EventDemocracyCancelled is emitted when a referendum has been cancelled.

type EventDemocracyDelegated

type EventDemocracyDelegated struct {
	Phase  Phase
	Who    AccountID
	Target AccountID
	Topics []Hash
}

EventDemocracyDelegated is emitted when an account has delegated their vote to another account.

type EventDemocracyExecuted

type EventDemocracyExecuted struct {
	Phase           Phase
	ReferendumIndex U32
	Result          DispatchResult
	Topics          []Hash
}

EventDemocracyExecuted is emitted when a proposal has been enacted.

type EventDemocracyExternalTabled

type EventDemocracyExternalTabled struct {
	Phase  Phase
	Topics []Hash
}

EventDemocracyExternalTabled is emitted when an external proposal has been tabled.

type EventDemocracyNotPassed

type EventDemocracyNotPassed struct {
	Phase           Phase
	ReferendumIndex U32
	Topics          []Hash
}

EventDemocracyNotPassed is emitted when a proposal has been rejected by referendum.

type EventDemocracyPassed

type EventDemocracyPassed struct {
	Phase           Phase
	ReferendumIndex U32
	Topics          []Hash
}

EventDemocracyPassed is emitted when a proposal has been approved by referendum.

type EventDemocracyPreimageInvalid

type EventDemocracyPreimageInvalid struct {
	Phase           Phase
	Hash            Hash
	ReferendumIndex U32
	Topics          []Hash
}

EventDemocracyPreimageInvalid is emitted when a proposal could not be executed because its preimage was invalid.

type EventDemocracyPreimageMissing

type EventDemocracyPreimageMissing struct {
	Phase           Phase
	Hash            Hash
	ReferendumIndex U32
	Topics          []Hash
}

EventDemocracyPreimageMissing is emitted when a proposal could not be executed because its preimage was missing.

type EventDemocracyPreimageNoted

type EventDemocracyPreimageNoted struct {
	Phase     Phase
	Hash      Hash
	AccountID AccountID
	Balance   U128
	Topics    []Hash
}

EventDemocracyPreimageNoted is emitted when a proposal's preimage was noted, and the deposit taken.

type EventDemocracyPreimageReaped

type EventDemocracyPreimageReaped struct {
	Phase    Phase
	Hash     Hash
	Provider AccountID
	Balance  U128
	Who      AccountID
	Topics   []Hash
}

EventDemocracyPreimageReaped is emitted when a registered preimage was removed and the deposit collected by the reaper (last item).

type EventDemocracyPreimageUsed

type EventDemocracyPreimageUsed struct {
	Phase     Phase
	Hash      Hash
	AccountID AccountID
	Balance   U128
	Topics    []Hash
}

EventDemocracyPreimageUsed is emitted when a proposal preimage was removed and used (the deposit was returned).

type EventDemocracyProposed

type EventDemocracyProposed struct {
	Phase         Phase
	ProposalIndex U32
	Balance       U128
	Topics        []Hash
}

EventDemocracyProposed is emitted when a motion has been proposed by a public account.

type EventDemocracySeconded

type EventDemocracySeconded struct {
	Phase     Phase
	AccountID AccountID
	Balance   U128
	Topics    []Hash
}

EventDemocracySeconded is emitted when an account has seconded a proposal.

type EventDemocracyStarted

type EventDemocracyStarted struct {
	Phase           Phase
	ReferendumIndex U32
	VoteThreshold   VoteThreshold
	Topics          []Hash
}

EventDemocracyStarted is emitted when a referendum has begun.

type EventDemocracyTabled

type EventDemocracyTabled struct {
	Phase         Phase
	ProposalIndex U32
	Balance       U128
	Accounts      []AccountID
	Topics        []Hash
}

EventDemocracyTabled is emitted when a public proposal has been tabled for referendum vote.

type EventDemocracyUndelegated

type EventDemocracyUndelegated struct {
	Phase  Phase
	Target AccountID
	Topics []Hash
}

EventDemocracyUndelegated is emitted when an account has cancelled a previous delegation operation.

type EventDemocracyVetoed

type EventDemocracyVetoed struct {
	Phase       Phase
	Who         AccountID
	Hash        Hash
	BlockNumber U32
	Topics      []Hash
}

EventDemocracyVetoed is emitted when an external proposal has been vetoed.

type EventDemocracyVoted

type EventDemocracyVoted struct {
	Phase           Phase
	Who             AccountID
	ReferendumIndex U32
	Vote            VoteAccountVote
	Topics          []Hash
}

EventDemocracyVoted is emitted when an account has voted in a referendum.

type EventElectionProviderMultiPhaseElectionFinalized

type EventElectionProviderMultiPhaseElectionFinalized struct {
	Phase           Phase
	ElectionCompute OptionElectionCompute
	Topics          []Hash
}

EventElectionProviderMultiPhaseElectionFinalized is emitted when the election has been finalized, with `Some` of the given computation, or else if the election failed, `None`.

type EventElectionProviderMultiPhaseRewarded

type EventElectionProviderMultiPhaseRewarded struct {
	Phase   Phase
	Account AccountID
	Value   U128
	Topics  []Hash
}

EventElectionProviderMultiPhaseRewarded is emitted when an account has been rewarded for their signed submission being finalized.

type EventElectionProviderMultiPhaseSignedPhaseStarted

type EventElectionProviderMultiPhaseSignedPhaseStarted struct {
	Phase  Phase
	Round  U32
	Topics []Hash
}

EventElectionProviderMultiPhaseSignedPhaseStarted is emitted when the signed phase of the given round has started.

type EventElectionProviderMultiPhaseSlashed

type EventElectionProviderMultiPhaseSlashed struct {
	Phase   Phase
	Account AccountID
	Value   U128
	Topics  []Hash
}

EventElectionProviderMultiPhaseSlashed is emitted when an account has been slashed for submitting an invalid signed submission.

type EventElectionProviderMultiPhaseSolutionStored

type EventElectionProviderMultiPhaseSolutionStored struct {
	Phase           Phase
	ElectionCompute ElectionCompute
	PrevEjected     bool
	Topics          []Hash
}

EventElectionProviderMultiPhaseSolutionStored is emitted when a solution was stored with the given compute.

If the solution is signed, this means that it hasn't yet been processed. If the solution is unsigned, this means that it has also been processed.

The `bool` is `true` when a previous solution was ejected to make room for this one.

type EventElectionProviderMultiPhaseUnsignedPhaseStarted

type EventElectionProviderMultiPhaseUnsignedPhaseStarted struct {
	Phase  Phase
	Round  U32
	Topics []Hash
}

EventElectionProviderMultiPhaseUnsignedPhaseStarted is emitted when the unsigned phase of the given round has started.

type EventElectionsCandidateSlashed

type EventElectionsCandidateSlashed struct {
	Phase   Phase
	Who     AccountID
	Balance U128
	Topics  []Hash
}

EventElectionsCandidateSlashed is emitted when a candidate was slashed by amount due to failing to obtain a seat as member or runner-up. Note that old members and runners-up are also candidates.

type EventElectionsElectionError

type EventElectionsElectionError struct {
	Phase  Phase
	Topics []Hash
}

EventElectionsElectionError is emitted when an internal error happened while trying to perform election

type EventElectionsEmptyTerm

type EventElectionsEmptyTerm struct {
	Phase  Phase
	Topics []Hash
}

EventElectionsEmptyTerm is emitted when No (or not enough) candidates existed for this round.

type EventElectionsMemberKicked

type EventElectionsMemberKicked struct {
	Phase  Phase
	Member AccountID
	Topics []Hash
}

EventElectionsMemberKicked is emitted when a member has been removed. This should always be followed by either `NewTerm` or `EmptyTerm`.

type EventElectionsNewTerm

type EventElectionsNewTerm struct {
	Phase      Phase
	NewMembers []struct {
		Member  AccountID
		Balance U128
	}
	Topics []Hash
}

EventElectionsNewTerm is emitted when a new term with new members. This indicates that enough candidates existed, not that enough have has been elected. The inner value must be examined for this purpose.

type EventElectionsRenounced

type EventElectionsRenounced struct {
	Phase  Phase
	Member AccountID
	Topics []Hash
}

EventElectionsRenounced is emitted when a member has renounced their candidacy.

type EventElectionsSeatHolderSlashed

type EventElectionsSeatHolderSlashed struct {
	Phase   Phase
	Who     AccountID
	Balance U128
	Topics  []Hash
}

EventElectionsSeatHolderSlashed is emitted when a seat holder was slashed by amount by being forcefully removed from the set

type EventGiltBidPlaced

type EventGiltBidPlaced struct {
	Phase    Phase
	Who      AccountID
	Amount   U128
	Duration U32
	Topics   []Hash
}

EventGiltBidPlaced is emitted when a bid was successfully placed.

type EventGiltBidRetracted

type EventGiltBidRetracted struct {
	Phase    Phase
	Who      AccountID
	Amount   U128
	Duration U32
	Topics   []Hash
}

EventGiltBidRetracted is emitted when a bid was successfully removed (before being accepted as a gilt).

type EventGiltGiltIssued

type EventGiltGiltIssued struct {
	Phase  Phase
	Index  U32
	Expiry U32
	Who    AccountID
	Amount U128
	Topics []Hash
}

EventGiltGiltIssued is emitted when a bid was accepted as a gilt. The balance may not be released until expiry.

type EventGiltGiltThawed

type EventGiltGiltThawed struct {
	Phase            Phase
	Index            U32
	Who              AccountID
	OriginalAmount   U128
	AdditionalAmount U128
	Topics           []Hash
}

EventGiltGiltThawed is emitted when an expired gilt has been thawed.

type EventGrandpaNewAuthorities

type EventGrandpaNewAuthorities struct {
	Phase          Phase
	NewAuthorities []struct {
		AuthorityID     AuthorityID
		AuthorityWeight U64
	}
	Topics []Hash
}

EventGrandpaNewAuthorities is emitted when a new authority set has been applied

type EventGrandpaPaused

type EventGrandpaPaused struct {
	Phase  Phase
	Topics []Hash
}

EventGrandpaPaused is emitted when the current authority set has been paused

type EventGrandpaResumed

type EventGrandpaResumed struct {
	Phase  Phase
	Topics []Hash
}

EventGrandpaResumed is emitted when the current authority set has been resumed

type EventHRMPChannelClosed

type EventHRMPChannelClosed struct {
	Phase       Phase
	ByParachain ParachainID
	ChannelID   HRMPChannelID
	Topics      []Hash
}

EventHRMPChannelClosed is emitted when an HRMP channel is closed.

type EventHRMPOpenChannelAccepted

type EventHRMPOpenChannelAccepted struct {
	Phase     Phase
	Sender    ParachainID
	Recipient ParachainID
	Topics    []Hash
}

EventHRMPOpenChannelAccepted is emitted when an open HRMP channel is accepted.

type EventHRMPOpenChannelCanceled

type EventHRMPOpenChannelCanceled struct {
	Phase       Phase
	ByParachain ParachainID
	ChannelID   HRMPChannelID
	Topics      []Hash
}

EventHRMPOpenChannelCanceled is emitted when an HRMP channel request sent by the receiver was canceled by either party.

type EventHRMPOpenChannelRequested

type EventHRMPOpenChannelRequested struct {
	Phase                  Phase
	Sender                 ParachainID
	Recipient              ParachainID
	ProposedMaxCapacity    U32
	ProposedMaxMessageSize U32
	Topics                 []Hash
}

EventHRMPOpenChannelRequested is emitted when an open HRMP channel is requested.

type EventID

type EventID [2]byte

type EventIdentityCleared

type EventIdentityCleared struct {
	Phase    Phase
	Identity AccountID
	Balance  U128
	Topics   []Hash
}

A name was cleared, and the given balance returned.

type EventIdentityJudgementGiven

type EventIdentityJudgementGiven struct {
	Phase          Phase
	Target         AccountID
	RegistrarIndex U32
	Topics         []Hash
}

A judgement was given by a registrar.

type EventIdentityJudgementRequested

type EventIdentityJudgementRequested struct {
	Phase          Phase
	Sender         AccountID
	RegistrarIndex U32
	Topics         []Hash
}

A judgement was asked from a registrar.

type EventIdentityJudgementUnrequested

type EventIdentityJudgementUnrequested struct {
	Phase          Phase
	Sender         AccountID
	RegistrarIndex U32
	Topics         []Hash
}

A judgement request was retracted.

type EventIdentityKilled

type EventIdentityKilled struct {
	Phase    Phase
	Identity AccountID
	Balance  U128
	Topics   []Hash
}

A name was removed and the given balance slashed.

type EventIdentityRegistrarAdded

type EventIdentityRegistrarAdded struct {
	Phase          Phase
	RegistrarIndex U32
	Topics         []Hash
}

A registrar was added.

type EventIdentitySet

type EventIdentitySet struct {
	Phase    Phase
	Identity AccountID
	Topics   []Hash
}

A name was set or reset (which will remove all judgements).

type EventIdentitySubIdentityAdded

type EventIdentitySubIdentityAdded struct {
	Phase   Phase
	Sub     AccountID
	Main    AccountID
	Deposit U128
	Topics  []Hash
}

EventIdentitySubIdentityAdded is emitted when a sub-identity was added to an identity and the deposit paid

type EventIdentitySubIdentityRemoved

type EventIdentitySubIdentityRemoved struct {
	Phase   Phase
	Sub     AccountID
	Main    AccountID
	Deposit U128
	Topics  []Hash
}

EventIdentitySubIdentityRemoved is emitted when a sub-identity was removed from an identity and the deposit freed

type EventIdentitySubIdentityRevoked

type EventIdentitySubIdentityRevoked struct {
	Phase   Phase
	Sub     AccountID
	Main    AccountID
	Deposit U128
	Topics  []Hash
}

EventIdentitySubIdentityRevoked is emitted when a sub-identity was cleared, and the given deposit repatriated from the main identity account to the sub-identity account.

type EventImOnlineAllGood

type EventImOnlineAllGood struct {
	Phase  Phase
	Topics []Hash
}

EventImOnlineAllGood is emitted when at the end of the session, no offence was committed

type EventImOnlineHeartbeatReceived

type EventImOnlineHeartbeatReceived struct {
	Phase       Phase
	AuthorityID AuthorityID
	Topics      []Hash
}

EventImOnlineHeartbeatReceived is emitted when a new heartbeat was received from AuthorityId

type EventImOnlineSomeOffline

type EventImOnlineSomeOffline struct {
	Phase                Phase
	IdentificationTuples []struct {
		ValidatorID        AccountID
		FullIdentification Exposure
	}
	Topics []Hash
}

EventImOnlineSomeOffline is emitted when the end of the session, at least once validator was found to be offline

type EventIndicesIndexAssigned

type EventIndicesIndexAssigned struct {
	Phase        Phase
	AccountID    AccountID
	AccountIndex AccountIndex
	Topics       []Hash
}

EventIndicesIndexAssigned is emitted when an index is assigned to an AccountID.

type EventIndicesIndexFreed

type EventIndicesIndexFreed struct {
	Phase        Phase
	AccountIndex AccountIndex
	Topics       []Hash
}

EventIndicesIndexFreed is emitted when an index is unassigned.

type EventIndicesIndexFrozen

type EventIndicesIndexFrozen struct {
	Phase        Phase
	AccountIndex AccountIndex
	AccountID    AccountID
	Topics       []Hash
}

EventIndicesIndexFrozen is emitted when an index is frozen to its current account ID.

type EventLotteryCallsUpdated

type EventLotteryCallsUpdated struct {
	Phase  Phase
	Topics []Hash
}

EventLotteryCallsUpdated is emitted when a new set of calls has been set.

type EventLotteryLotteryStarted

type EventLotteryLotteryStarted struct {
	Phase  Phase
	Topics []Hash
}

EventLotteryLotteryStarted is emitted when a lottery has been started.

type EventLotteryTicketBought

type EventLotteryTicketBought struct {
	Phase     Phase
	Who       AccountID
	CallIndex LotteryCallIndex
	Topics    []Hash
}

EventLotteryTicketBought is emitted when a ticket has been bought.

type EventLotteryWinner

type EventLotteryWinner struct {
	Phase          Phase
	Winner         AccountID
	LotteryBalance U128
	Topics         []Hash
}

EventLotteryWinner is emitted when a winner has been chosen.

type EventMetadataV14

type EventMetadataV14 struct {
	Type Si1LookupTypeID
}

type EventMetadataV4

type EventMetadataV4 struct {
	Name          Text
	Args          []Type
	Documentation []Text
}

type EventMultisigApproval

type EventMultisigApproval struct {
	Phase     Phase
	Who       AccountID
	TimePoint TimePoint
	ID        AccountID
	CallHash  Hash
	Topics    []Hash
}

EventUtility is emitted when a multisig operation has been approved by someone. First param is the account that is approving, third is the multisig account, fourth is hash of the call.

type EventMultisigCancelled

type EventMultisigCancelled struct {
	Phase     Phase
	Who       AccountID
	TimePoint TimePoint
	ID        AccountID
	CallHash  Hash
	Topics    []Hash
}

EventUtility is emitted when a multisig operation has been cancelled. First param is the account that is cancelling, third is the multisig account, fourth is hash of the call.

type EventMultisigExecuted

type EventMultisigExecuted struct {
	Phase     Phase
	Who       AccountID
	TimePoint TimePoint
	ID        AccountID
	CallHash  Hash
	Result    DispatchResult
	Topics    []Hash
}

EventUtility is emitted when a multisig operation has been executed. First param is the account that is approving, third is the multisig account, fourth is hash of the call to be executed.

type EventMultisigNewMultisig

type EventMultisigNewMultisig struct {
	Phase    Phase
	Who, ID  AccountID
	CallHash Hash
	Topics   []Hash
}

EventUtilityNewMultisig is emitted when a new multisig operation has begun. First param is the account that is approving, second is the multisig account, third is hash of the call.

type EventNftSalesForSale

type EventNftSalesForSale struct {
	Phase      Phase
	ClassID    U64
	InstanceID U128
	Sale       Sale
	Topics     []Hash
}

EventNftSalesForSale is emitted when an NFT is out for sale.

type EventNftSalesRemoved

type EventNftSalesRemoved struct {
	Phase      Phase
	ClassID    U64
	InstanceID U128
	Topics     []Hash
}

EventNftSalesRemoved is emitted when an NFT is removed.

type EventNftSalesSold

type EventNftSalesSold struct {
	Phase      Phase
	ClassID    U64
	InstanceID U128
	Sale       Sale
	Buyer      AccountID
	Topics     []Hash
}

EventNftSalesSold is emitted when an NFT is sold.

type EventOffencesOffence

type EventOffencesOffence struct {
	Phase          Phase
	Kind           Bytes16
	OpaqueTimeSlot Bytes
	Topics         []Hash
}

EventOffencesOffence is emitted when there is an offence reported of the given kind happened at the session_index and (kind-specific) time slot. This event is not deposited for duplicate slashes

type EventOrmlAssetRegistryRegisteredAsset

type EventOrmlAssetRegistryRegisteredAsset struct {
	Phase    Phase
	AssetID  CurrencyID
	Metadata AssetMetadata
	Topics   []Hash
}

type EventOrmlAssetRegistryUpdatedAsset

type EventOrmlAssetRegistryUpdatedAsset struct {
	Phase    Phase
	AssetID  CurrencyID
	Metadata AssetMetadata
	Topics   []Hash
}

type EventOrmlTokensBalanceSet

type EventOrmlTokensBalanceSet struct {
	Phase      Phase
	CurrencyID CurrencyID
	Who        AccountID
	Free       U128
	Reserved   U128
	Topics     []Hash
}

type EventOrmlTokensDeposited

type EventOrmlTokensDeposited struct {
	Phase      Phase
	CurrencyID CurrencyID
	Who        AccountID
	Amount     U128
	Topics     []Hash
}

type EventOrmlTokensDustLost

type EventOrmlTokensDustLost struct {
	Phase      Phase
	CurrencyID CurrencyID
	Who        AccountID
	Amount     U128
	Topics     []Hash
}

type EventOrmlTokensEndowed

type EventOrmlTokensEndowed struct {
	Phase      Phase
	CurrencyID CurrencyID
	Who        AccountID
	Amount     U128
	Topics     []Hash
}

type EventOrmlTokensLockRemoved

type EventOrmlTokensLockRemoved struct {
	Phase      Phase
	LockID     [8]U8
	CurrencyID CurrencyID
	Who        AccountID
	Topics     []Hash
}

type EventOrmlTokensLockSet

type EventOrmlTokensLockSet struct {
	Phase      Phase
	LockID     [8]U8
	CurrencyID CurrencyID
	Who        AccountID
	Amount     U128
	Topics     []Hash
}

type EventOrmlTokensLocked

type EventOrmlTokensLocked struct {
	Phase      Phase
	CurrencyID CurrencyID
	Who        AccountID
	Amount     U128
	Topics     []Hash
}

type EventOrmlTokensReserveRepatriated

type EventOrmlTokensReserveRepatriated struct {
	Phase      Phase
	CurrencyID CurrencyID
	From       AccountID
	To         AccountID
	Amount     U128
	Status     BalanceStatus
	Topics     []Hash
}

type EventOrmlTokensReserved

type EventOrmlTokensReserved struct {
	Phase      Phase
	CurrencyID CurrencyID
	Who        AccountID
	Amount     U128
	Topics     []Hash
}

type EventOrmlTokensSlashed

type EventOrmlTokensSlashed struct {
	Phase          Phase
	CurrencyID     CurrencyID
	Who            AccountID
	FreeAmount     U128
	ReservedAmount U128
	Topics         []Hash
}

type EventOrmlTokensTotalIssuanceSet

type EventOrmlTokensTotalIssuanceSet struct {
	Phase      Phase
	CurrencyID CurrencyID
	Amount     U128
	Topics     []Hash
}

type EventOrmlTokensTransfer

type EventOrmlTokensTransfer struct {
	Phase      Phase
	CurrencyID CurrencyID
	From       AccountID
	To         AccountID
	Amount     U128
	Topics     []Hash
}

type EventOrmlTokensUnlocked

type EventOrmlTokensUnlocked struct {
	Phase      Phase
	CurrencyID CurrencyID
	Who        AccountID
	Amount     U128
	Topics     []Hash
}

type EventOrmlTokensUnreserved

type EventOrmlTokensUnreserved struct {
	Phase      Phase
	CurrencyID CurrencyID
	Who        AccountID
	Amount     U128
	Topics     []Hash
}

type EventOrmlTokensWithdrawn

type EventOrmlTokensWithdrawn struct {
	Phase      Phase
	CurrencyID CurrencyID
	Who        AccountID
	Amount     U128
	Topics     []Hash
}

type EventParaInclusionCandidateBacked

type EventParaInclusionCandidateBacked struct {
	Phase            Phase
	CandidateReceipt CandidateReceipt
	HeadData         HeadData
	CoreIndex        CoreIndex
	GroupIndex       GroupIndex
	Topics           []Hash
}

EventParaInclusionCandidateBacked is emitted when a candidate was backed.

type EventParaInclusionCandidateIncluded

type EventParaInclusionCandidateIncluded struct {
	Phase            Phase
	CandidateReceipt CandidateReceipt
	HeadData         HeadData
	CoreIndex        CoreIndex
	GroupIndex       GroupIndex
	Topics           []Hash
}

EventParaInclusionCandidateIncluded is emitted when a candidate was included.

type EventParaInclusionCandidateTimedOut

type EventParaInclusionCandidateTimedOut struct {
	Phase            Phase
	CandidateReceipt CandidateReceipt
	HeadData         HeadData
	CoreIndex        CoreIndex
	Topics           []Hash
}

EventParaInclusionCandidateTimedOut is emitted when a candidate timed out.

type EventParachainSystemDownwardMessagesProcessed

type EventParachainSystemDownwardMessagesProcessed struct {
	Phase         Phase
	Weight        Weight
	ResultMqcHead Hash
	Topics        []Hash
}

EventParachainSystemDownwardMessagesProcessed is emitted when downward messages were processed using the given weight.

type EventParachainSystemDownwardMessagesReceived

type EventParachainSystemDownwardMessagesReceived struct {
	Phase  Phase
	Count  U32
	Topics []Hash
}

EventParachainSystemDownwardMessagesReceived is emitted when some downward messages have been received and will be processed.

type EventParachainSystemUpgradeAuthorized

type EventParachainSystemUpgradeAuthorized struct {
	Phase  Phase
	Hash   Hash
	Topics []Hash
}

EventParachainSystemUpgradeAuthorized is emitted when an upgrade has been authorized.

type EventParachainSystemValidationFunctionApplied

type EventParachainSystemValidationFunctionApplied struct {
	Phase                 Phase
	RelayChainBlockNumber U32
	Topics                []Hash
}

EventParachainSystemValidationFunctionApplied is emitted when the validation function was applied as of the contained relay chain block number.

type EventParachainSystemValidationFunctionDiscarded

type EventParachainSystemValidationFunctionDiscarded struct {
	Phase  Phase
	Topics []Hash
}

EventParachainSystemValidationFunctionDiscarded is emitted when the relay-chain aborted the upgrade process.

type EventParachainSystemValidationFunctionStored

type EventParachainSystemValidationFunctionStored struct {
	Phase  Phase
	Topics []Hash
}

EventParachainSystemValidationFunctionStored is emitted when the validation function has been scheduled to apply.

type EventParasActionQueued

type EventParasActionQueued struct {
	Phase        Phase
	ParachainID  ParachainID
	SessionIndex U32
	Topics       []Hash
}

EventParasActionQueued is emitted when a para has been queued to execute pending actions.

type EventParasCodeUpgradeScheduled

type EventParasCodeUpgradeScheduled struct {
	Phase       Phase
	ParachainID ParachainID
	Topics      []Hash
}

EventParasCodeUpgradeScheduled is emitted when a code upgrade has been scheduled for a Para.

type EventParasCurrentCodeUpdated

type EventParasCurrentCodeUpdated struct {
	Phase       Phase
	ParachainID ParachainID
	Topics      []Hash
}

EventParasCurrentCodeUpdated is emitted when the current code has been updated for a Para.

type EventParasCurrentHeadUpdated

type EventParasCurrentHeadUpdated struct {
	Phase       Phase
	ParachainID ParachainID
	Topics      []Hash
}

EventParasCurrentHeadUpdated is emitted when the current head has been updated for a Para.

type EventParasDisputesDisputeConcluded

type EventParasDisputesDisputeConcluded struct {
	Phase           Phase
	CandidateHash   Hash
	DisputeLocation DisputeResult
	Topics          []Hash
}

EventParasDisputesDisputeConcluded is emitted when a dispute has concluded for or against a candidate.

type EventParasDisputesDisputeInitiated

type EventParasDisputesDisputeInitiated struct {
	Phase           Phase
	CandidateHash   Hash
	DisputeLocation DisputeLocation
	Topics          []Hash
}

EventParasDisputesDisputeInitiated is emitted when a dispute has been initiated.

type EventParasDisputesDisputeTimedOut

type EventParasDisputesDisputeTimedOut struct {
	Phase         Phase
	CandidateHash Hash
	Topics        []Hash
}

EventParasDisputesDisputeTimedOut is emitted when a dispute has timed out due to insufficient participation.

type EventParasDisputesRevert

type EventParasDisputesRevert struct {
	Phase       Phase
	BlockNumber U32
	Topics      []Hash
}

EventParasDisputesRevert is emitted when a dispute has concluded with supermajority against a candidate. Block authors should no longer build on top of this head and should instead revert the block at the given height. This should be the number of the child of the last known valid block in the chain.

type EventParasNewHeadNoted

type EventParasNewHeadNoted struct {
	Phase       Phase
	ParachainID ParachainID
	Topics      []Hash
}

EventParasNewHeadNoted is emitted when a new head has been noted for a Para.

type EventParasPvfCheckAccepted

type EventParasPvfCheckAccepted struct {
	Phase       Phase
	CodeHash    Hash
	ParachainID ParachainID
	Topics      []Hash
}

EventParasPvfCheckAccepted is emitted when the given validation code was accepted by the PVF pre-checking vote.

type EventParasPvfCheckRejected

type EventParasPvfCheckRejected struct {
	Phase       Phase
	CodeHash    Hash
	ParachainID ParachainID
	Topics      []Hash
}

EventParasPvfCheckRejected is emitted when the given validation code was rejected by the PVF pre-checking vote.

type EventParasPvfCheckStarted

type EventParasPvfCheckStarted struct {
	Phase       Phase
	CodeHash    Hash
	ParachainID ParachainID
	Topics      []Hash
}

EventParasPvfCheckStarted is emitted when the given para either initiated or subscribed to a PVF check for the given validation code.

type EventPreimageCleared

type EventPreimageCleared struct {
	Phase  Phase
	Hash   Hash
	Topics []Hash
}

EventPreimageCleared is emitted when a preimage has been cleared

type EventPreimageNoted

type EventPreimageNoted struct {
	Phase  Phase
	Hash   Hash
	Topics []Hash
}

EventPreimageNoted is emitted when a preimage has been noted

type EventPreimageRequested

type EventPreimageRequested struct {
	Phase  Phase
	Hash   Hash
	Topics []Hash
}

EventPreimageRequested is emitted when a preimage has been requested

type EventProxyAnnounced

type EventProxyAnnounced struct {
	Phase    Phase
	Real     AccountID
	Proxy    AccountID
	CallHash Hash
	Topics   []Hash
}

EventProxyAnnounced is emitted when an announcement was placed to make a call in the future

type EventProxyProxyAdded

type EventProxyProxyAdded struct {
	Phase     Phase
	Delegator AccountID
	Delegatee AccountID
	ProxyType U8
	Delay     U32
	Topics    []Hash
}

EventProxyProxyAdded is emitted when a proxy was added.

type EventProxyProxyExecuted

type EventProxyProxyExecuted struct {
	Phase  Phase
	Result DispatchResult
	Topics []Hash
}

EventProxyProxyExecuted is emitted when a proxy was executed correctly, with the given [result]

type EventProxyProxyRemoved

type EventProxyProxyRemoved struct {
	Phase       Phase
	Delegator   AccountID
	Delegatee   AccountID
	ProxyType   U8
	BlockNumber U32
	Topics      []Hash
}

EventProxyProxyRemoved is emitted when a proxy was removed.

type EventProxyPureCreated

type EventProxyPureCreated struct {
	Phase               Phase
	Pure                AccountID
	Who                 AccountID
	ProxyType           U8
	DisambiguationIndex U16
	Topics              []Hash
}

EventProxyPureCreated is emitted when an anonymous account has been created by new proxy with given, disambiguation index and proxy type.

type EventRecords

type EventRecords struct {
	Auctions_AuctionStarted     []EventAuctionsAuctionStarted
	Auctions_AuctionClosed      []EventAuctionsAuctionClosed
	Auctions_Reserved           []EventAuctionsReserved
	Auctions_Unreserved         []EventAuctionsUnreserved
	Auctions_ReserveConfiscated []EventAuctionsReserveConfiscated
	Auctions_BidAccepted        []EventAuctionsBidAccepted
	Auctions_WinningOffset      []EventAuctionsWinningOffset

	Assets_Created             []EventAssetCreated
	Assets_Issued              []EventAssetIssued
	Assets_Transferred         []EventAssetTransferred
	Assets_Burned              []EventAssetBurned
	Assets_TeamChanged         []EventAssetTeamChanged
	Assets_OwnerChanged        []EventAssetOwnerChanged
	Assets_Frozen              []EventAssetFrozen
	Assets_Thawed              []EventAssetThawed
	Assets_AssetFrozen         []EventAssetAssetFrozen
	Assets_AssetThawed         []EventAssetAssetThawed
	Assets_Destroyed           []EventAssetDestroyed
	Assets_ForceCreated        []EventAssetForceCreated
	Assets_MetadataSet         []EventAssetMetadataSet
	Assets_MetadataCleared     []EventAssetMetadataCleared
	Assets_ApprovedTransfer    []EventAssetApprovedTransfer
	Assets_ApprovalCancelled   []EventAssetApprovalCancelled
	Assets_TransferredApproved []EventAssetTransferredApproved
	Assets_AssetStatusChanged  []EventAssetAssetStatusChanged

	BagsList_Rebagged []EventBagsListRebagged

	Balances_BalanceSet         []EventBalancesBalanceSet
	Balances_Deposit            []EventBalancesDeposit
	Balances_DustLost           []EventBalancesDustLost
	Balances_Endowed            []EventBalancesEndowed
	Balances_Reserved           []EventBalancesReserved
	Balances_ReserveRepatriated []EventBalancesReserveRepatriated
	Balances_Slashed            []EventBalancesSlashed
	Balances_Transfer           []EventBalancesTransfer
	Balances_Unreserved         []EventBalancesUnreserved
	Balances_Withdraw           []EventBalancesWithdraw

	Bounties_BountyProposed     []EventBountiesBountyProposed
	Bounties_BountyRejected     []EventBountiesBountyRejected
	Bounties_BountyBecameActive []EventBountiesBountyBecameActive
	Bounties_BountyAwarded      []EventBountiesBountyAwarded
	Bounties_BountyClaimed      []EventBountiesBountyClaimed
	Bounties_BountyCanceled     []EventBountiesBountyCanceled
	Bounties_BountyExtended     []EventBountiesBountyExtended

	ChildBounties_Added    []EventChildBountiesAdded
	ChildBounties_Awarded  []EventChildBountiesAwarded
	ChildBounties_Claimed  []EventChildBountiesClaimed
	ChildBounties_Canceled []EventChildBountiesCanceled

	Claims_Claimed []EventClaimsClaimed

	CollatorSelection_NewInvulnerables     []EventCollatorSelectionNewInvulnerables
	CollatorSelection_NewDesiredCandidates []EventCollatorSelectionNewDesiredCandidates
	CollatorSelection_NewCandidacyBond     []EventCollatorSelectionNewCandidacyBond
	CollatorSelection_CandidateAdded       []EventCollatorSelectionCandidateAdded
	CollatorSelection_CandidateRemoved     []EventCollatorSelectionCandidateRemoved

	Contracts_CodeRemoved         []EventContractsCodeRemoved
	Contracts_CodeStored          []EventContractsCodeStored
	Contracts_ContractCodeUpdated []EventContractsContractCodeUpdated
	Contracts_ContractEmitted     []EventContractsContractEmitted
	Contracts_Instantiated        []EventContractsInstantiated
	Contracts_Terminated          []EventContractsTerminated

	ConvictionVoting_Delegated   []EventConvictionVotingDelegated
	ConvictionVoting_Undelegated []EventConvictionVotingUndelegated

	Council_Approved       []EventCouncilApproved
	Council_Closed         []EventCouncilClosed
	Council_Disapproved    []EventCouncilDisapproved
	Council_Executed       []EventCouncilExecuted
	Council_MemberExecuted []EventCouncilMemberExecuted
	Council_Proposed       []EventCouncilProposed
	Council_Voted          []EventCouncilVoted

	Crowdloan_Created           []EventCrowdloanCreated
	Crowdloan_Contributed       []EventCrowdloanContributed
	Crowdloan_Withdrew          []EventCrowdloanWithdrew
	Crowdloan_PartiallyRefunded []EventCrowdloanPartiallyRefunded
	Crowdloan_AllRefunded       []EventCrowdloanAllRefunded
	Crowdloan_Dissolved         []EventCrowdloanDissolved
	Crowdloan_HandleBidResult   []EventCrowdloanHandleBidResult
	Crowdloan_Edited            []EventCrowdloanEdited
	Crowdloan_MemoUpdated       []EventCrowdloanMemoUpdated
	Crowdloan_AddedToNewRaise   []EventCrowdloanAddedToNewRaise

	Democracy_Blacklisted     []EventDemocracyBlacklisted
	Democracy_Cancelled       []EventDemocracyCancelled
	Democracy_Delegated       []EventDemocracyDelegated
	Democracy_Executed        []EventDemocracyExecuted
	Democracy_ExternalTabled  []EventDemocracyExternalTabled
	Democracy_NotPassed       []EventDemocracyNotPassed
	Democracy_Passed          []EventDemocracyPassed
	Democracy_PreimageInvalid []EventDemocracyPreimageInvalid
	Democracy_PreimageMissing []EventDemocracyPreimageMissing
	Democracy_PreimageNoted   []EventDemocracyPreimageNoted
	Democracy_PreimageReaped  []EventDemocracyPreimageReaped
	Democracy_PreimageUsed    []EventDemocracyPreimageUsed
	Democracy_Proposed        []EventDemocracyProposed
	Democracy_Seconded        []EventDemocracySeconded
	Democracy_Started         []EventDemocracyStarted
	Democracy_Tabled          []EventDemocracyTabled
	Democracy_Undelegated     []EventDemocracyUndelegated
	Democracy_Vetoed          []EventDemocracyVetoed
	Democracy_Voted           []EventDemocracyVoted

	ElectionProviderMultiPhase_SolutionStored       []EventElectionProviderMultiPhaseSolutionStored
	ElectionProviderMultiPhase_ElectionFinalized    []EventElectionProviderMultiPhaseElectionFinalized
	ElectionProviderMultiPhase_Rewarded             []EventElectionProviderMultiPhaseRewarded
	ElectionProviderMultiPhase_Slashed              []EventElectionProviderMultiPhaseSlashed
	ElectionProviderMultiPhase_SignedPhaseStarted   []EventElectionProviderMultiPhaseSignedPhaseStarted
	ElectionProviderMultiPhase_UnsignedPhaseStarted []EventElectionProviderMultiPhaseUnsignedPhaseStarted

	Elections_CandidateSlashed  []EventElectionsCandidateSlashed
	Elections_ElectionError     []EventElectionsElectionError
	Elections_EmptyTerm         []EventElectionsEmptyTerm
	Elections_MemberKicked      []EventElectionsMemberKicked
	Elections_NewTerm           []EventElectionsNewTerm
	Elections_Renounced         []EventElectionsRenounced
	Elections_SeatHolderSlashed []EventElectionsSeatHolderSlashed

	Gilt_BidPlaced    []EventGiltBidPlaced
	Gilt_BidRetracted []EventGiltBidRetracted
	Gilt_GiltIssued   []EventGiltGiltIssued
	Gilt_GiltThawed   []EventGiltGiltThawed

	Grandpa_NewAuthorities []EventGrandpaNewAuthorities
	Grandpa_Paused         []EventGrandpaPaused
	Grandpa_Resumed        []EventGrandpaResumed

	Hrmp_OpenChannelRequested []EventHRMPOpenChannelRequested
	Hrmp_OpenChannelCanceled  []EventHRMPOpenChannelCanceled
	Hrmp_OpenChannelAccepted  []EventHRMPOpenChannelAccepted
	Hrmp_ChannelClosed        []EventHRMPChannelClosed

	Identity_IdentityCleared      []EventIdentityCleared
	Identity_IdentityKilled       []EventIdentityKilled
	Identity_IdentitySet          []EventIdentitySet
	Identity_JudgementGiven       []EventIdentityJudgementGiven
	Identity_JudgementRequested   []EventIdentityJudgementRequested
	Identity_JudgementUnrequested []EventIdentityJudgementUnrequested
	Identity_RegistrarAdded       []EventIdentityRegistrarAdded
	Identity_SubIdentityAdded     []EventIdentitySubIdentityAdded
	Identity_SubIdentityRemoved   []EventIdentitySubIdentityRemoved
	Identity_SubIdentityRevoked   []EventIdentitySubIdentityRevoked

	ImOnline_AllGood           []EventImOnlineAllGood
	ImOnline_HeartbeatReceived []EventImOnlineHeartbeatReceived
	ImOnline_SomeOffline       []EventImOnlineSomeOffline

	Indices_IndexAssigned []EventIndicesIndexAssigned
	Indices_IndexFreed    []EventIndicesIndexFreed
	Indices_IndexFrozen   []EventIndicesIndexFrozen

	Lottery_LotteryStarted []EventLotteryLotteryStarted
	Lottery_CallsUpdated   []EventLotteryCallsUpdated
	Lottery_Winner         []EventLotteryWinner
	Lottery_TicketBought   []EventLotteryTicketBought

	Multisig_MultisigApproval  []EventMultisigApproval
	Multisig_MultisigCancelled []EventMultisigCancelled
	Multisig_MultisigExecuted  []EventMultisigExecuted
	Multisig_NewMultisig       []EventMultisigNewMultisig

	NftSales_ForSale []EventNftSalesForSale
	NftSales_Removed []EventNftSalesRemoved
	NftSales_Sold    []EventNftSalesSold

	Offences_Offence []EventOffencesOffence

	OrmlAssetRegistry_RegisteredAsset []EventOrmlAssetRegistryRegisteredAsset
	OrmlAssetRegistry_UpdatedAsset    []EventOrmlAssetRegistryUpdatedAsset

	OrmlTokens_Endowed            []EventOrmlTokensEndowed
	OrmlTokens_DustLost           []EventOrmlTokensDustLost
	OrmlTokens_Transfer           []EventOrmlTokensTransfer
	OrmlTokens_Reserved           []EventOrmlTokensReserved
	OrmlTokens_Unreserved         []EventOrmlTokensUnreserved
	OrmlTokens_ReserveRepatriated []EventOrmlTokensReserveRepatriated
	OrmlTokens_BalanceSet         []EventOrmlTokensBalanceSet
	OrmlTokens_TotalIssuanceSet   []EventOrmlTokensTotalIssuanceSet
	OrmlTokens_Withdrawn          []EventOrmlTokensWithdrawn
	OrmlTokens_Slashed            []EventOrmlTokensSlashed
	OrmlTokens_Deposited          []EventOrmlTokensDeposited
	OrmlTokens_LockSet            []EventOrmlTokensLockSet
	OrmlTokens_LockRemoved        []EventOrmlTokensLockRemoved
	OrmlTokens_Locked             []EventOrmlTokensLocked
	OrmlTokens_Unlocked           []EventOrmlTokensUnlocked

	Paras_CurrentCodeUpdated   []EventParasCurrentCodeUpdated
	Paras_CurrentHeadUpdated   []EventParasCurrentHeadUpdated
	Paras_CodeUpgradeScheduled []EventParasCodeUpgradeScheduled
	Paras_NewHeadNoted         []EventParasNewHeadNoted
	Paras_ActionQueued         []EventParasActionQueued
	Paras_PvfCheckStarted      []EventParasPvfCheckStarted
	Paras_PvfCheckAccepted     []EventParasPvfCheckAccepted
	Paras_PvfCheckRejected     []EventParasPvfCheckRejected

	ParasDisputes_DisputeInitiated []EventParasDisputesDisputeInitiated
	ParasDisputes_DisputeConcluded []EventParasDisputesDisputeConcluded
	ParasDisputes_DisputeTimedOut  []EventParasDisputesDisputeTimedOut
	ParasDisputes_Revert           []EventParasDisputesRevert

	ParaInclusion_CandidateBacked   []EventParaInclusionCandidateBacked
	ParaInclusion_CandidateIncluded []EventParaInclusionCandidateIncluded
	ParaInclusion_CandidateTimedOut []EventParaInclusionCandidateTimedOut

	ParachainSystem_ValidationFunctionStored    []EventParachainSystemValidationFunctionStored
	ParachainSystem_ValidationFunctionApplied   []EventParachainSystemValidationFunctionApplied
	ParachainSystem_ValidationFunctionDiscarded []EventParachainSystemValidationFunctionDiscarded
	ParachainSystem_UpgradeAuthorized           []EventParachainSystemUpgradeAuthorized
	ParachainSystem_DownwardMessagesReceived    []EventParachainSystemDownwardMessagesReceived
	ParachainSystem_DownwardMessagesProcessed   []EventParachainSystemDownwardMessagesProcessed

	Preimage_Cleared   []EventPreimageCleared
	Preimage_Noted     []EventPreimageNoted
	Preimage_Requested []EventPreimageRequested

	Proxy_Announced     []EventProxyAnnounced
	Proxy_PureCreated   []EventProxyPureCreated
	Proxy_ProxyAdded    []EventProxyProxyAdded
	Proxy_ProxyExecuted []EventProxyProxyExecuted
	Proxy_ProxyRemoved  []EventProxyProxyRemoved

	Recovery_AccountRecovered  []EventRecoveryAccountRecovered
	Recovery_RecoveryClosed    []EventRecoveryClosed
	Recovery_RecoveryCreated   []EventRecoveryCreated
	Recovery_RecoveryInitiated []EventRecoveryInitiated
	Recovery_RecoveryRemoved   []EventRecoveryRemoved
	Recovery_RecoveryVouched   []EventRecoveryVouched

	Registrar_Registered   []EventRegistrarRegistered
	Registrar_Deregistered []EventRegistrarDeregistered
	Registrar_Reserved     []EventRegistrarReserved

	Referenda_Submitted               []EventReferendaSubmitted
	Referenda_DecisionDepositPlaced   []EventReferendaDecisionDepositPlaced
	Referenda_DecisionDepositRefunded []EventReferendaDecisionDepositRefunded
	Referenda_DepositSlashed          []EventReferendaDecisionSlashed
	Referenda_DecisionStarted         []EventReferendaDecisionStarted
	Referenda_ConfirmStarted          []EventReferendaConfirmStarted
	Referenda_ConfirmAborted          []EventReferendaConfirmAborted
	Referenda_Confirmed               []EventReferendaConfirmed
	Referenda_Approved                []EventReferendaApproved
	Referenda_Rejected                []EventReferendaRejected
	Referenda_TimedOut                []EventReferendaTimedOut
	Referenda_Cancelled               []EventReferendaCancelled
	Referenda_Killed                  []EventReferendaKilled

	Scheduler_CallLookupFailed []EventSchedulerCallLookupFailed
	Scheduler_Canceled         []EventSchedulerCanceled
	Scheduler_Dispatched       []EventSchedulerDispatched
	Scheduler_Scheduled        []EventSchedulerScheduled

	Session_NewSession []EventSessionNewSession

	Slots_NewLeasePeriod []EventSlotsNewLeasePeriod
	Slots_Leased         []EventSlotsLeased

	Society_AutoUnbid                []EventSocietyAutoUnbid
	Society_Bid                      []EventSocietyBid
	Society_CandidateSuspended       []EventSocietyCandidateSuspended
	Society_Challenged               []EventSocietyChallenged
	Society_DefenderVote             []EventSocietyDefenderVote
	Society_Deposit                  []EventSocietyDeposit
	Society_Founded                  []EventSocietyFounded
	Society_Inducted                 []EventSocietyInducted
	Society_MemberSuspended          []EventSocietyMemberSuspended
	Society_NewMaxMembers            []EventSocietyNewMaxMembers
	Society_SuspendedMemberJudgement []EventSocietySuspendedMemberJudgement
	Society_Unbid                    []EventSocietyUnbid
	Society_Unfounded                []EventSocietyUnfounded
	Society_Unvouch                  []EventSocietyUnvouch
	Society_Vote                     []EventSocietyVote
	Society_Vouch                    []EventSocietyVouch

	Staking_Bonded                     []EventStakingBonded
	Staking_Chilled                    []EventStakingChilled
	Staking_EraPaid                    []EventStakingEraPaid
	Staking_Kicked                     []EventStakingKicked
	Staking_OldSlashingReportDiscarded []EventStakingOldSlashingReportDiscarded
	Staking_PayoutStarted              []EventStakingPayoutStarted
	Staking_Rewarded                   []EventStakingRewarded
	Staking_Slashed                    []EventStakingSlashed
	Staking_StakersElected             []EventStakingStakersElected
	Staking_StakingElectionFailed      []EventStakingStakingElectionFailed
	Staking_Unbonded                   []EventStakingUnbonded
	Staking_Withdrawn                  []EventStakingWithdrawn

	StateTrieMigration_Migrated              []EventStateTrieMigrationMigrated
	StateTrieMigration_Slashed               []EventStateTrieMigrationSlashed
	StateTrieMigration_AutoMigrationFinished []EventStateTrieMigrationAutoMigrationFinished
	StateTrieMigration_Halted                []EventStateTrieMigrationHalted

	Sudo_KeyChanged []EventSudoKeyChanged
	Sudo_Sudid      []EventSudoSudid
	Sudo_SudoAsDone []EventSudoAsDone

	System_CodeUpdated      []EventSystemCodeUpdated
	System_ExtrinsicFailed  []EventSystemExtrinsicFailed
	System_ExtrinsicSuccess []EventSystemExtrinsicSuccess
	System_KilledAccount    []EventSystemKilledAccount
	System_NewAccount       []EventSystemNewAccount
	System_Remarked         []EventSystemRemarked

	TechnicalCommittee_Approved       []EventTechnicalCommitteeApproved
	TechnicalCommittee_Closed         []EventTechnicalCommitteeClosed
	TechnicalCommittee_Disapproved    []EventTechnicalCommitteeDisapproved
	TechnicalCommittee_Executed       []EventTechnicalCommitteeExecuted
	TechnicalCommittee_MemberExecuted []EventTechnicalCommitteeMemberExecuted
	TechnicalCommittee_Proposed       []EventTechnicalCommitteeProposed
	TechnicalCommittee_Voted          []EventTechnicalCommitteeVoted

	TechnicalMembership_Dummy          []EventTechnicalMembershipDummy
	TechnicalMembership_KeyChanged     []EventTechnicalMembershipKeyChanged
	TechnicalMembership_MemberAdded    []EventTechnicalMembershipMemberAdded
	TechnicalMembership_MemberRemoved  []EventTechnicalMembershipMemberRemoved
	TechnicalMembership_MembersReset   []EventTechnicalMembershipMembersReset
	TechnicalMembership_MembersSwapped []EventTechnicalMembershipMembersSwapped

	Tips_NewTip       []EventTipsNewTip
	Tips_TipClosed    []EventTipsTipClosed
	Tips_TipClosing   []EventTipsTipClosing
	Tips_TipRetracted []EventTipsTipRetracted
	Tips_TipSlashed   []EventTipsTipSlashed

	TransactionStorage_Stored       []EventTransactionStorageStored
	TransactionStorage_Renewed      []EventTransactionStorageRenewed
	TransactionStorage_ProofChecked []EventTransactionStorageProofChecked

	TransactionPayment_TransactionFeePaid []EventTransactionPaymentTransactionFeePaid

	Treasury_Proposed        []EventTreasuryProposed
	Treasury_Spending        []EventTreasurySpending
	Treasury_Awarded         []EventTreasuryAwarded
	Treasury_Rejected        []EventTreasuryRejected
	Treasury_Burnt           []EventTreasuryBurnt
	Treasury_Rollover        []EventTreasuryRollover
	Treasury_Deposit         []EventTreasuryDeposit
	Treasury_SpendApproved   []EventTreasurySpendApproved
	Treasury_UpdatedInactive []EventTreasuryUpdatedInactive

	Uniques_ApprovalCancelled    []EventUniquesApprovalCancelled
	Uniques_ApprovedTransfer     []EventUniquesApprovedTransfer
	Uniques_AssetStatusChanged   []EventUniquesAssetStatusChanged
	Uniques_AttributeCleared     []EventUniquesAttributeCleared
	Uniques_AttributeSet         []EventUniquesAttributeSet
	Uniques_Burned               []EventUniquesBurned
	Uniques_ClassFrozen          []EventUniquesClassFrozen
	Uniques_ClassMetadataCleared []EventUniquesClassMetadataCleared
	Uniques_ClassMetadataSet     []EventUniquesClassMetadataSet
	Uniques_ClassThawed          []EventUniquesClassThawed
	Uniques_Created              []EventUniquesCreated
	Uniques_Destroyed            []EventUniquesDestroyed
	Uniques_ForceCreated         []EventUniquesForceCreated
	Uniques_Frozen               []EventUniquesFrozen
	Uniques_Issued               []EventUniquesIssued
	Uniques_MetadataCleared      []EventUniquesMetadataCleared
	Uniques_MetadataSet          []EventUniquesMetadataSet
	Uniques_OwnerChanged         []EventUniquesOwnerChanged
	Uniques_Redeposited          []EventUniquesRedeposited
	Uniques_TeamChanged          []EventUniquesTeamChanged
	Uniques_Thawed               []EventUniquesThawed
	Uniques_Transferred          []EventUniquesTransferred

	Ump_InvalidFormat          []EventUMPInvalidFormat
	Ump_UnsupportedVersion     []EventUMPUnsupportedVersion
	Ump_ExecutedUpward         []EventUMPExecutedUpward
	Ump_WeightExhausted        []EventUMPWeightExhausted
	Ump_UpwardMessagesReceived []EventUMPUpwardMessagesReceived
	Ump_OverweightEnqueued     []EventUMPOverweightEnqueued
	Ump_OverweightServiced     []EventUMPOverweightServiced

	Utility_BatchCompleted   []EventUtilityBatchCompleted
	Utility_BatchInterrupted []EventUtilityBatchInterrupted
	Utility_DispatchedAs     []EventUtilityBatchInterrupted
	Utility_ItemCompleted    []EventUtilityItemCompleted

	Vesting_VestingCompleted []EventVestingVestingCompleted
	Vesting_VestingUpdated   []EventVestingVestingUpdated

	VoterList_Rebagged     []EventVoterListRebagged
	VoterList_ScoreUpdated []EventVoterListScoreUpdated

	Whitelist_CallWhitelisted           []EventWhitelistCallWhitelisted
	Whitelist_WhitelistedCallRemoved    []EventWhitelistWhitelistedCallRemoved
	Whitelist_WhitelistedCallDispatched []EventWhitelistWhitelistedCallRemoved

	XcmPallet_Attempted                 []EventXcmPalletAttempted
	XcmPallet_Sent                      []EventXcmPalletSent
	XcmPallet_UnexpectedResponse        []EventXcmPalletUnexpectedResponse
	XcmPallet_ResponseReady             []EventXcmPalletResponseReady
	XcmPallet_Notified                  []EventXcmPalletNotified
	XcmPallet_NotifyOverweight          []EventXcmPalletNotifyOverweight
	XcmPallet_NotifyDispatchError       []EventXcmPalletNotifyDispatchError
	XcmPallet_NotifyDecodeFailed        []EventXcmPalletNotifyDecodeFailed
	XcmPallet_InvalidResponder          []EventXcmPalletInvalidResponder
	XcmPallet_InvalidResponderVersion   []EventXcmPalletInvalidResponderVersion
	XcmPallet_ResponseTaken             []EventXcmPalletResponseTaken
	XcmPallet_AssetsTrapped             []EventXcmPalletAssetsTrapped
	XcmPallet_VersionChangeNotified     []EventXcmPalletVersionChangeNotified
	XcmPallet_SupportedVersionChanged   []EventXcmPalletSupportedVersionChanged
	XcmPallet_NotifyTargetSendFail      []EventXcmPalletNotifyTargetSendFail
	XcmPallet_NotifyTargetMigrationFail []EventXcmPalletNotifyTargetMigrationFail
}

EventRecords is a default set of possible event records that can be used as a target for `func (e EventRecordsRaw) Decode(...` Sources: https://github.com/polkadot-js/api/blob/master/packages/api-augment/src/substrate/events.ts https://github.com/polkadot-js/api/blob/master/packages/api-augment/src/polkadot/events.ts

type EventRecordsRaw deprecated

type EventRecordsRaw []byte

EventRecordsRaw is a raw record for a set of events, represented as the raw bytes. It exists since decoding of events can only be done with metadata, so events can't follow the static way of decoding other types do. It exposes functions to decode events using metadata and targets. Be careful using this in your own structs – it only works as the last value in a struct since it will consume the remainder of the encoded data. The reason for this is that it does not contain any length encoding, so it would not know where to stop.

Deprecated: EventRecordsRaw relies on static event definition that is no longer maintained, please check retriever.EventRetriever.

func (*EventRecordsRaw) Decode

func (e *EventRecordsRaw) Decode(decoder scale.Decoder) error

Decode implements decoding for Data, which just reads all the remaining bytes into Data

func (EventRecordsRaw) DecodeEventRecords

func (e EventRecordsRaw) DecodeEventRecords(m *Metadata, t interface{}) error

DecodeEventRecords decodes the events records from an EventRecordRaw into a target t using the given Metadata m If this method returns an error like `unable to decode Phase for event #x: EOF`, it is likely that you have defined a custom event record with a wrong type. For example your custom event record has a field with a length prefixed type, such as types.Bytes, where your event in reallity contains a fixed width type, such as a types.U32.

func (EventRecordsRaw) Encode

func (e EventRecordsRaw) Encode(encoder scale.Encoder) error

Encode implements encoding for Data, which just unwraps the bytes of Data

type EventRecoveryAccountRecovered

type EventRecoveryAccountRecovered struct {
	Phase   Phase
	Who     AccountID
	Rescuer AccountID
	Topics  []Hash
}

EventRecoveryAccountRecovered is emitted when account_1 has been successfully recovered by account_2

type EventRecoveryClosed

type EventRecoveryClosed struct {
	Phase   Phase
	Who     AccountID
	Rescuer AccountID
	Topics  []Hash
}

EventRecoveryClosed is emitted when a recovery process for account_1 by account_2 has been closed

type EventRecoveryCreated

type EventRecoveryCreated struct {
	Phase  Phase
	Who    AccountID
	Topics []Hash
}

EventRecoveryCreated is emitted when a recovery process has been set up for an account

type EventRecoveryInitiated

type EventRecoveryInitiated struct {
	Phase   Phase
	Account AccountID
	Who     AccountID
	Topics  []Hash
}

EventRecoveryInitiated is emitted when a recovery process has been initiated for account_1 by account_2

type EventRecoveryRemoved

type EventRecoveryRemoved struct {
	Phase  Phase
	Who    AccountID
	Topics []Hash
}

EventRecoveryRemoved is emitted when a recovery process has been removed for an account

type EventRecoveryVouched

type EventRecoveryVouched struct {
	Phase   Phase
	Lost    AccountID
	Rescuer AccountID
	Who     AccountID
	Topics  []Hash
}

EventRecoveryVouched is emitted when a recovery process for account_1 by account_2 has been vouched for by account_3

type EventReferendaApproved

type EventReferendaApproved struct {
	Phase  Phase
	Index  U32
	Topics []Hash
}

EventReferendaApproved is emitted when a referendum has been approved and its proposal has been scheduled.

type EventReferendaCancelled

type EventReferendaCancelled struct {
	Phase  Phase
	Index  U32
	Tally  Tally
	Topics []Hash
}

EventReferendaCancelled is emitted when a referendum has been cancelled.

type EventReferendaConfirmAborted

type EventReferendaConfirmAborted struct {
	Phase  Phase
	Index  U32
	Topics []Hash
}

EventReferendaConfirmAborted is emitted when a referendum has been aborted.

type EventReferendaConfirmStarted

type EventReferendaConfirmStarted struct {
	Phase  Phase
	Index  U32
	Topics []Hash
}

EventReferendaConfirmStarted is emitted when a referendum has been started.

type EventReferendaConfirmed

type EventReferendaConfirmed struct {
	Phase  Phase
	Index  U32
	Tally  Tally
	Topics []Hash
}

EventReferendaConfirmed is emitted when a referendum has ended its confirmation phase and is ready for approval.

type EventReferendaDecisionDepositPlaced

type EventReferendaDecisionDepositPlaced struct {
	Phase  Phase
	Index  U32
	Who    AccountID
	Amount U128
	Topics []Hash
}

EventReferendaDecisionDepositPlaced is emitted when the decision deposit has been placed.

type EventReferendaDecisionDepositRefunded

type EventReferendaDecisionDepositRefunded struct {
	Phase  Phase
	Index  U32
	Who    AccountID
	Amount U128
	Topics []Hash
}

EventReferendaDecisionDepositRefunded is emitted when the decision deposit has been refunded.

type EventReferendaDecisionSlashed

type EventReferendaDecisionSlashed struct {
	Phase  Phase
	Who    AccountID
	Amount U128
	Topics []Hash
}

EventReferendaDecisionSlashed is emitted when a deposit has been slashed.

type EventReferendaDecisionStarted

type EventReferendaDecisionStarted struct {
	Phase        Phase
	Index        U32
	Track        U8
	ProposalHash Hash
	Tally        Tally
	Topics       []Hash
}

EventReferendaDecisionStarted is emitted when a referendum has moved into the deciding phase.

type EventReferendaKilled

type EventReferendaKilled struct {
	Phase  Phase
	Index  U32
	Tally  Tally
	Topics []Hash
}

EventReferendaKilled is emitted when a referendum has been killed.

type EventReferendaRejected

type EventReferendaRejected struct {
	Phase  Phase
	Index  U32
	Tally  Tally
	Topics []Hash
}

EventReferendaRejected is emitted when a proposal has been rejected by referendum.

type EventReferendaSubmitted

type EventReferendaSubmitted struct {
	Phase        Phase
	Index        U32
	Track        U8
	ProposalHash Hash
	Topics       []Hash
}

EventReferendaSubmitted is emitted when a referendum has been submitted.

type EventReferendaTimedOut

type EventReferendaTimedOut struct {
	Phase  Phase
	Index  U32
	Tally  Tally
	Topics []Hash
}

EventReferendaTimedOut is emitted when a referendum has been timed out without being decided.

type EventRegistrarDeregistered

type EventRegistrarDeregistered struct {
	Phase       Phase
	ParachainID ParachainID
	Topics      []Hash
}

EventRegistrarDeregistered is emitted when a parachain is deregistered.

type EventRegistrarRegistered

type EventRegistrarRegistered struct {
	Phase       Phase
	ParachainID ParachainID
	Account     AccountID
	Topics      []Hash
}

EventRegistrarRegistered is emitted when a parachain is registered.

type EventRegistrarReserved

type EventRegistrarReserved struct {
	Phase       Phase
	ParachainID ParachainID
	Account     AccountID
	Topics      []Hash
}

EventRegistrarReserved is emitted when a parachain slot is reserved.

type EventSchedulerCallLookupFailed

type EventSchedulerCallLookupFailed struct {
	Phase  Phase
	Task   TaskAddress
	ID     OptionBytes
	Error  SchedulerLookupError
	Topics []Hash
}

EventSchedulerCallLookupFailed is emitted when the call for the provided hash was not found so the task has been aborted.

type EventSchedulerCanceled

type EventSchedulerCanceled struct {
	Phase  Phase
	When   U32
	Index  U32
	Topics []Hash
}

EventSchedulerCanceled is emitted when canceled some task

type EventSchedulerDispatched

type EventSchedulerDispatched struct {
	Phase  Phase
	Task   TaskAddress
	ID     OptionBytes
	Result DispatchResult
	Topics []Hash
}

EventSchedulerDispatched is emitted when dispatched some task

type EventSchedulerScheduled

type EventSchedulerScheduled struct {
	Phase  Phase
	When   U32
	Index  U32
	Topics []Hash
}

EventSchedulerScheduled is emitted when scheduled some task

type EventSessionNewSession

type EventSessionNewSession struct {
	Phase        Phase
	SessionIndex U32
	Topics       []Hash
}

EventSessionNewSession is emitted when a new session has happened. Note that the argument is the session index, not the block number as the type might suggest

type EventSlotsLeased

type EventSlotsLeased struct {
	Phase         Phase
	ParachainID   ParachainID
	Leaser        AccountID
	PeriodBegin   U32
	PeriodCount   U32
	ExtraReserved U128
	TotalAmount   U128
	Topics        []Hash
}

EventSlotsLeased is emitted when a para has won the right to a continuous set of lease periods as a parachain. First balance is any extra amount reserved on top of the para's existing deposit. Second balance is the total amount reserved.

type EventSlotsNewLeasePeriod

type EventSlotsNewLeasePeriod struct {
	Phase       Phase
	LeasePeriod U32
	Topics      []Hash
}

EventSlotsNewLeasePeriod is emitted when a new `[lease_period]` is beginning.

type EventSocietyAutoUnbid

type EventSocietyAutoUnbid struct {
	Phase     Phase
	Candidate AccountID
	Topics    []Hash
}

EventSocietyAutoUnbid is emitted when a [candidate] was dropped (due to an excess of bids in the system)

type EventSocietyBid

type EventSocietyBid struct {
	Phase     Phase
	Candidate AccountID
	Offer     U128
	Topics    []Hash
}

EventSocietyBid is emitted when a membership bid just happened. The given account is the candidate's ID and their offer is the second

type EventSocietyCandidateSuspended

type EventSocietyCandidateSuspended struct {
	Phase     Phase
	Candidate AccountID
	Topics    []Hash
}

EventSocietyCandidateSuspended is emitted when a [candidate] has been suspended

type EventSocietyChallenged

type EventSocietyChallenged struct {
	Phase  Phase
	Member AccountID
	Topics []Hash
}

EventSocietyChallenged is emitted when a [member] has been challenged

type EventSocietyDefenderVote

type EventSocietyDefenderVote struct {
	Phase  Phase
	Voter  AccountID
	Vote   bool
	Topics []Hash
}

EventSocietyDefenderVote is emitted when a vote has been placed for a defending member

type EventSocietyDeposit

type EventSocietyDeposit struct {
	Phase  Phase
	Value  U128
	Topics []Hash
}

EventSocietyDeposit is emitted when some funds were deposited into the society account

type EventSocietyFounded

type EventSocietyFounded struct {
	Phase   Phase
	Founder AccountID
	Topics  []Hash
}

EventSocietyFounded is emitted when the society is founded by the given identity

type EventSocietyInducted

type EventSocietyInducted struct {
	Phase      Phase
	Primary    AccountID
	Candidates []AccountID
	Topics     []Hash
}

EventSocietyInducted is emitted when a group of candidates have been inducted. The batch's primary is the first value, the batch in full is the second.

type EventSocietyMemberSuspended

type EventSocietyMemberSuspended struct {
	Phase  Phase
	Member AccountID
	Topics []Hash
}

EventSocietyMemberSuspended is emitted when a [member] has been suspended

type EventSocietyNewMaxMembers

type EventSocietyNewMaxMembers struct {
	Phase  Phase
	Max    U32
	Topics []Hash
}

EventSocietyNewMaxMembers is emitted when a new [max] member count has been set

type EventSocietySuspendedMemberJudgement

type EventSocietySuspendedMemberJudgement struct {
	Phase  Phase
	Who    AccountID
	Judged bool
	Topics []Hash
}

EventSocietySuspendedMemberJudgement is emitted when a suspended member has been judged

type EventSocietyUnbid

type EventSocietyUnbid struct {
	Phase     Phase
	Candidate AccountID
	Topics    []Hash
}

EventSocietyUnbid is emitted when a [candidate] was dropped (by their request)

type EventSocietyUnfounded

type EventSocietyUnfounded struct {
	Phase   Phase
	Founder AccountID
	Topics  []Hash
}

EventSocietyUnfounded is emitted when society is unfounded

type EventSocietyUnvouch

type EventSocietyUnvouch struct {
	Phase     Phase
	Candidate AccountID
	Topics    []Hash
}

EventSocietyUnvouch is emitted when a [candidate] was dropped (by request of who vouched for them)

type EventSocietyVote

type EventSocietyVote struct {
	Phase     Phase
	Candidate AccountID
	Voter     AccountID
	Vote      bool
	Topics    []Hash
}

EventSocietyVote is emitted when a vote has been placed

type EventSocietyVouch

type EventSocietyVouch struct {
	Phase     Phase
	Candidate AccountID
	Offer     U128
	Vouching  AccountID
	Topics    []Hash
}

EventSocietyVouch is emitted when a membership bid just happened by vouching. The given account is the candidate's ID and, their offer is the second. The vouching party is the third.

type EventStakingBonded

type EventStakingBonded struct {
	Phase  Phase
	Stash  AccountID
	Amount U128
	Topics []Hash
}

EventStakingBonded is emitted when an account has bonded this amount

type EventStakingChilled

type EventStakingChilled struct {
	Phase  Phase
	Stash  AccountID
	Topics []Hash
}

EventStakingChilled is emitted when an account has stopped participating as either a validator or nominator

type EventStakingEraPaid

type EventStakingEraPaid struct {
	Phase           Phase
	EraIndex        U32
	ValidatorPayout U128
	Remainder       U128
	Topics          []Hash
}

EventStakingEraPaid is emitted when the era payout has been set;

type EventStakingKicked

type EventStakingKicked struct {
	Phase     Phase
	Nominator AccountID
	Stash     AccountID
	Topics    []Hash
}

EventStakingKicked is emitted when a nominator has been kicked from a validator.

type EventStakingOldSlashingReportDiscarded

type EventStakingOldSlashingReportDiscarded struct {
	Phase        Phase
	SessionIndex U32
	Topics       []Hash
}

EventStakingOldSlashingReportDiscarded is emitted when an old slashing report from a prior era was discarded because it could not be processed

type EventStakingPayoutStarted

type EventStakingPayoutStarted struct {
	Phase    Phase
	EraIndex U32
	Stash    AccountID
	Topics   []Hash
}

EventStakingPayoutStarted is emitted when the stakers' rewards are getting paid

type EventStakingRewarded

type EventStakingRewarded struct {
	Phase  Phase
	Stash  AccountID
	Amount U128
	Topics []Hash
}

EventStakingRewarded is emitted when the staker has been rewarded by this amount.

type EventStakingSlashed

type EventStakingSlashed struct {
	Phase     Phase
	AccountID AccountID
	Balance   U128
	Topics    []Hash
}

EventStakingSlashed is emitted when one validator (and its nominators) has been slashed by the given amount

type EventStakingSolutionStored

type EventStakingSolutionStored struct {
	Phase   Phase
	Compute ElectionCompute
	Topics  []Hash
}

EventStakingSolutionStored is emitted when a new solution for the upcoming election has been stored

type EventStakingStakersElected

type EventStakingStakersElected struct {
	Phase  Phase
	Topics []Hash
}

EventStakingStakersElected is emitted when a new set of stakers was elected

type EventStakingStakingElectionFailed

type EventStakingStakingElectionFailed struct {
	Phase  Phase
	Topics []Hash
}

EventStakingStakingElectionFailed is emitted when the election failed. No new era is planned.

type EventStakingUnbonded

type EventStakingUnbonded struct {
	Phase  Phase
	Stash  AccountID
	Amount U128
	Topics []Hash
}

EventStakingUnbonded is emitted when an account has unbonded this amount

type EventStakingWithdrawn

type EventStakingWithdrawn struct {
	Phase  Phase
	Stash  AccountID
	Amount U128
	Topics []Hash
}

EventStakingWithdrawn is emitted when an account has called `withdraw_unbonded` and removed unbonding chunks worth `Balance` from the unlocking queue.

type EventStateTrieMigrationAutoMigrationFinished

type EventStateTrieMigrationAutoMigrationFinished struct {
	Phase  Phase
	Topics []Hash
}

EventStateTrieMigrationAutoMigrationFinished is emitted when the auto migration task has finished.

type EventStateTrieMigrationHalted

type EventStateTrieMigrationHalted struct {
	Phase  Phase
	Topics []Hash
}

EventStateTrieMigrationHalted is emitted when the migration got halted.

type EventStateTrieMigrationMigrated

type EventStateTrieMigrationMigrated struct {
	Phase   Phase
	Top     U32
	Child   U32
	Compute MigrationCompute
	Topics  []Hash
}

EventStateTrieMigrationMigrated is emitted when the given number of `(top, child)` keys were migrated respectively, with the given `compute`.

type EventStateTrieMigrationSlashed

type EventStateTrieMigrationSlashed struct {
	Phase  Phase
	Who    AccountID
	Amount U128
	Topics []Hash
}

EventStateTrieMigrationSlashed is emitted when some account got slashed by the given amount.

type EventSudoAsDone

type EventSudoAsDone struct {
	Phase  Phase
	Done   bool
	Topics []Hash
}

A sudo just took place.

type EventSudoKeyChanged

type EventSudoKeyChanged struct {
	Phase     Phase
	AccountID AccountID
	Topics    []Hash
}

EventSudoKeyChanged is emitted when the sudoer just switched identity; the old key is supplied.

type EventSudoSudid

type EventSudoSudid struct {
	Phase  Phase
	Result DispatchResult
	Topics []Hash
}

EventSudoSudid is emitted when a sudo just took place.

type EventSystemCodeUpdated

type EventSystemCodeUpdated struct {
	Phase  Phase
	Topics []Hash
}

EventSystemCodeUpdated is emitted when the runtime code (`:code`) is updated

type EventSystemExtrinsicFailed

type EventSystemExtrinsicFailed struct {
	Phase         Phase
	DispatchError DispatchError
	DispatchInfo  DispatchInfo
	Topics        []Hash
}

EventSystemExtrinsicFailed is emitted when an extrinsic failed

type EventSystemExtrinsicFailedV8 deprecated

type EventSystemExtrinsicFailedV8 struct {
	Phase         Phase
	DispatchError DispatchError
	Topics        []Hash
}

EventSystemExtrinsicFailedV8 is emitted when an extrinsic failed

Deprecated: EventSystemExtrinsicFailedV8 exists to allow users to simply implement their own EventRecords struct if they are on metadata version 8 or below. Use EventSystemExtrinsicFailed otherwise

type EventSystemExtrinsicSuccess

type EventSystemExtrinsicSuccess struct {
	Phase        Phase
	DispatchInfo DispatchInfo
	Topics       []Hash
}

EventSystemExtrinsicSuccess is emitted when an extrinsic completed successfully

type EventSystemExtrinsicSuccessV8 deprecated

type EventSystemExtrinsicSuccessV8 struct {
	Phase  Phase
	Topics []Hash
}

EventSystemExtrinsicSuccessV8 is emitted when an extrinsic completed successfully

Deprecated: EventSystemExtrinsicSuccessV8 exists to allow users to simply implement their own EventRecords struct if they are on metadata version 8 or below. Use EventSystemExtrinsicSuccess otherwise

type EventSystemKilledAccount

type EventSystemKilledAccount struct {
	Phase  Phase
	Who    AccountID
	Topics []Hash
}

EventSystemKilledAccount is emitted when an account is reaped

type EventSystemNewAccount

type EventSystemNewAccount struct {
	Phase  Phase
	Who    AccountID
	Topics []Hash
}

EventSystemNewAccount is emitted when a new account was created

type EventSystemRemarked

type EventSystemRemarked struct {
	Phase  Phase
	Who    AccountID
	Hash   Hash
	Topics []Hash
}

EventSystemRemarked is emitted when an on-chain remark happened

type EventTechnicalCommitteeApproved

type EventTechnicalCommitteeApproved struct {
	Phase    Phase
	Proposal Hash
	Topics   []Hash
}

EventTechnicalCommitteeApproved is emitted when a motion was approved by the required threshold.

type EventTechnicalCommitteeClosed

type EventTechnicalCommitteeClosed struct {
	Phase    Phase
	Proposal Hash
	YesCount U32
	NoCount  U32
	Topics   []Hash
}

EventTechnicalCommitteeClosed is emitted when A proposal was closed because its threshold was reached or after its duration was up

type EventTechnicalCommitteeDisapproved

type EventTechnicalCommitteeDisapproved struct {
	Phase    Phase
	Proposal Hash
	Topics   []Hash
}

EventTechnicalCommitteeDisapproved is emitted when a motion was not approved by the required threshold.

type EventTechnicalCommitteeExecuted

type EventTechnicalCommitteeExecuted struct {
	Phase    Phase
	Proposal Hash
	Result   DispatchResult
	Topics   []Hash
}

EventTechnicalCommitteeExecuted is emitted when a motion was executed; result will be `Ok` if it returned without error.

type EventTechnicalCommitteeMemberExecuted

type EventTechnicalCommitteeMemberExecuted struct {
	Phase    Phase
	Proposal Hash
	Result   DispatchResult
	Topics   []Hash
}

EventTechnicalCommitteeMemberExecuted is emitted when a single member did some action; result will be `Ok` if it returned without error

type EventTechnicalCommitteeProposed

type EventTechnicalCommitteeProposed struct {
	Phase         Phase
	Account       AccountID
	ProposalIndex U32
	Proposal      Hash
	Threshold     U32
	Topics        []Hash
}

EventTechnicalCommitteeProposed is emitted when a motion (given hash) has been proposed (by given account) with a threshold (given, `MemberCount`)

type EventTechnicalCommitteeVoted

type EventTechnicalCommitteeVoted struct {
	Phase    Phase
	Account  AccountID
	Proposal Hash
	Voted    bool
	YesCount U32
	NoCount  U32
	Topics   []Hash
}

EventTechnicalCommitteeVoted is emitted when a motion (given hash) has been voted on by given account, leaving, a tally (yes votes and no votes given respectively as `MemberCount`).

type EventTechnicalMembershipDummy

type EventTechnicalMembershipDummy struct {
	Phase  Phase
	Topics []Hash
}

EventTechnicalMembershipKeyChanged is emitted when - phantom member, never used.

type EventTechnicalMembershipKeyChanged

type EventTechnicalMembershipKeyChanged struct {
	Phase  Phase
	Topics []Hash
}

EventTechnicalMembershipKeyChanged is emitted when one of the members' keys changed.

type EventTechnicalMembershipMemberAdded

type EventTechnicalMembershipMemberAdded struct {
	Phase  Phase
	Topics []Hash
}

EventTechnicalMembershipMemberAdded is emitted when the given member was added; see the transaction for who

type EventTechnicalMembershipMemberRemoved

type EventTechnicalMembershipMemberRemoved struct {
	Phase  Phase
	Topics []Hash
}

EventTechnicalMembershipMemberRemoved is emitted when the given member was removed; see the transaction for who

type EventTechnicalMembershipMembersReset

type EventTechnicalMembershipMembersReset struct {
	Phase  Phase
	Topics []Hash
}

EventTechnicalMembershipMembersReset is emitted when the membership was reset; see the transaction for who the new set is.

type EventTechnicalMembershipMembersSwapped

type EventTechnicalMembershipMembersSwapped struct {
	Phase  Phase
	Topics []Hash
}

EventTechnicalMembershipMembersSwapped is emitted when two members were swapped;; see the transaction for who

type EventTipsNewTip

type EventTipsNewTip struct {
	Phase  Phase
	Hash   Hash
	Topics []Hash
}

EventTipsNewTip is emitted when a new tip suggestion has been opened.

type EventTipsTipClosed

type EventTipsTipClosed struct {
	Phase     Phase
	Hash      Hash
	AccountID AccountID
	Balance   U128
	Topics    []Hash
}

EventTipsTipClosed is emitted when a tip suggestion has been closed.

type EventTipsTipClosing

type EventTipsTipClosing struct {
	Phase  Phase
	Hash   Hash
	Topics []Hash
}

EventTipsTipClosing is emitted when a tip suggestion has reached threshold and is closing.

type EventTipsTipRetracted

type EventTipsTipRetracted struct {
	Phase  Phase
	Hash   Hash
	Topics []Hash
}

EventTipsTipRetracted is emitted when a tip suggestion has been retracted.

type EventTipsTipSlashed

type EventTipsTipSlashed struct {
	Phase     Phase
	Hash      Hash
	AccountID AccountID
	Balance   U128
	Topics    []Hash
}

EventTipsTipSlashed is emitted when a tip suggestion has been slashed.

type EventTransactionPaymentTransactionFeePaid

type EventTransactionPaymentTransactionFeePaid struct {
	Phase     Phase
	Who       AccountID
	ActualFee U128
	Tip       U128
	Topics    []Hash
}

type EventTransactionStorageProofChecked

type EventTransactionStorageProofChecked struct {
	Phase  Phase
	Topics []Hash
}

EventTransactionStorageProofChecked is emitted when storage proof was successfully checked.

type EventTransactionStorageRenewed

type EventTransactionStorageRenewed struct {
	Phase  Phase
	Index  U32
	Topics []Hash
}

EventTransactionStorageRenewed is emitted when data is renewed under a specific index.

type EventTransactionStorageStored

type EventTransactionStorageStored struct {
	Phase  Phase
	Index  U32
	Topics []Hash
}

EventTransactionStorageStored is emitted when data is stored under a specific index.

type EventTreasuryAwarded

type EventTreasuryAwarded struct {
	Phase         Phase
	ProposalIndex U32
	Amount        U128
	Beneficiary   AccountID
	Topics        []Hash
}

EventTreasuryAwarded is emitted when some funds have been allocated.

type EventTreasuryBurnt

type EventTreasuryBurnt struct {
	Phase  Phase
	Burn   U128
	Topics []Hash
}

EventTreasuryBurnt is emitted when some of our funds have been burnt.

type EventTreasuryDeposit

type EventTreasuryDeposit struct {
	Phase     Phase
	Deposited U128
	Topics    []Hash
}

EventTreasuryDeposit is emitted when some funds have been deposited.

type EventTreasuryProposed

type EventTreasuryProposed struct {
	Phase         Phase
	ProposalIndex U32
	Topics        []Hash
}

EventTreasuryProposed is emitted when New proposal.

type EventTreasuryRejected

type EventTreasuryRejected struct {
	Phase         Phase
	ProposalIndex U32
	Amount        U128
	Topics        []Hash
}

EventTreasuryRejected is emitted when s proposal was rejected; funds were slashed.

type EventTreasuryRollover

type EventTreasuryRollover struct {
	Phase           Phase
	BudgetRemaining U128
	Topics          []Hash
}

EventTreasuryRollover is emitted when spending has finished; this is the amount that rolls over until next spend.

type EventTreasurySpendApproved

type EventTreasurySpendApproved struct {
	Phase         Phase
	ProposalIndex U32
	Amount        U128
	Beneficiary   AccountID
	Topics        []Hash
}

EventTreasurySpendApproved is emitted when a spend is approved.

type EventTreasurySpending

type EventTreasurySpending struct {
	Phase           Phase
	BudgetRemaining U128
	Topics          []Hash
}

EventTreasurySpending is emitted when we have ended a spend period and will now allocate funds.

type EventTreasuryUpdatedInactive

type EventTreasuryUpdatedInactive struct {
	Phase       Phase
	Reactivated U128
	Deactivated U128
	Topics      []Hash
}

EventTreasuryUpdatedInactive is emitted when the inactive funds of the pallet have been updated.

type EventUMPExecutedUpward

type EventUMPExecutedUpward struct {
	Phase     Phase
	MessageID [32]U8
	Outcome   Outcome
	Topics    []Hash
}

EventUMPExecutedUpward is emitted when the upward message executed with the given outcome.

type EventUMPInvalidFormat

type EventUMPInvalidFormat struct {
	Phase     Phase
	MessageID [32]U8
	Topics    []Hash
}

EventUMPInvalidFormat is emitted when the upward message is invalid XCM.

type EventUMPOverweightEnqueued

type EventUMPOverweightEnqueued struct {
	Phase           Phase
	ParachainID     ParachainID
	MessageID       [32]U8
	OverweightIndex U64
	RequiredWeight  Weight
	Topics          []Hash
}

EventUMPOverweightEnqueued is emitted when the weight budget was exceeded for an individual upward message. This message can be later dispatched manually using `service_overweight` dispatchable using the assigned `overweight_index`.

type EventUMPOverweightServiced

type EventUMPOverweightServiced struct {
	Phase           Phase
	OverweightIndex U64
	Used            Weight
	Topics          []Hash
}

EventUMPOverweightServiced is emitted when the upward message from the overweight queue was executed with the given actual weight used.

type EventUMPUnsupportedVersion

type EventUMPUnsupportedVersion struct {
	Phase     Phase
	MessageID [32]U8
	Topics    []Hash
}

EventUMPUnsupportedVersion is emitted when the upward message is unsupported version of XCM.

type EventUMPUpwardMessagesReceived

type EventUMPUpwardMessagesReceived struct {
	Phase       Phase
	ParachainID ParachainID
	Count       U32
	Size        U32
	Topics      []Hash
}

EventUMPUpwardMessagesReceived is emitted when some upward messages have been received and will be processed.

type EventUMPWeightExhausted

type EventUMPWeightExhausted struct {
	Phase     Phase
	MessageID [32]U8
	Remaining Weight
	Required  Weight
	Topics    []Hash
}

EventUMPWeightExhausted is emitted when the weight limit for handling upward messages was reached.

type EventUniquesApprovalCancelled

type EventUniquesApprovalCancelled struct {
	Phase        Phase
	CollectionID U64
	ItemID       U128
	Owner        AccountID
	Delegate     AccountID
	Topics       []Hash
}

EventUniquesApprovalCancelled is emitted when an approval for a delegate account to transfer the instance of an asset class was cancelled by its owner

type EventUniquesApprovedTransfer

type EventUniquesApprovedTransfer struct {
	Phase        Phase
	CollectionID U64
	ItemID       U128
	Owner        AccountID
	Delegate     AccountID
	Topics       []Hash
}

EventUniquesApprovedTransfer is emitted when an `instance` of an asset `class` has been approved by the `owner` for transfer by a `delegate`.

type EventUniquesAssetStatusChanged

type EventUniquesAssetStatusChanged struct {
	Phase        Phase
	CollectionID U64
	Topics       []Hash
}

EventUniquesAssetStatusChanged is emitted when an asset `class` has had its attributes changed by the `Force` origin

type EventUniquesAttributeCleared

type EventUniquesAttributeCleared struct {
	Phase        Phase
	CollectionID U64
	MaybeItem    Option[U128]
	Key          Bytes
	Topics       []Hash
}

EventUniquesAttributeCleared is emitted when an attribute metadata has been cleared for an asset class or instance

type EventUniquesAttributeSet

type EventUniquesAttributeSet struct {
	Phase        Phase
	CollectionID U64
	MaybeItem    Option[U128]
	Key          Bytes
	Value        Bytes
	Topics       []Hash
}

EventUniquesAttributeSet is emitted when a new attribute metadata has been set for an asset class or instance

type EventUniquesBurned

type EventUniquesBurned struct {
	Phase        Phase
	CollectionID U64
	ItemID       U128
	Owner        AccountID
	Topics       []Hash
}

EventUniquesBurned is emitted when an asset `instance` was destroyed

type EventUniquesClassFrozen

type EventUniquesClassFrozen struct {
	Phase        Phase
	CollectionID U64
	Topics       []Hash
}

EventUniquesClassFrozen is emitted when some asset `class` was frozen

type EventUniquesClassMetadataCleared

type EventUniquesClassMetadataCleared struct {
	Phase        Phase
	CollectionID U64
	Topics       []Hash
}

EventUniquesClassMetadataCleared is emitted when metadata has been cleared for an asset class

type EventUniquesClassMetadataSet

type EventUniquesClassMetadataSet struct {
	Phase        Phase
	CollectionID U64
	Data         Bytes
	IsFrozen     Bool
	Topics       []Hash
}

EventUniquesClassMetadataSet is emitted when new metadata has been set for an asset class

type EventUniquesClassThawed

type EventUniquesClassThawed struct {
	Phase        Phase
	CollectionID U64
	Topics       []Hash
}

EventUniquesClassThawed is emitted when some asset `class` was thawed

type EventUniquesCreated

type EventUniquesCreated struct {
	Phase        Phase
	CollectionID U64
	Creator      AccountID
	Owner        AccountID
	Topics       []Hash
}

EventUniquesCreated is emitted when an asset class was created

type EventUniquesDestroyed

type EventUniquesDestroyed struct {
	Phase        Phase
	CollectionID U64
	Topics       []Hash
}

EventUniquesDestroyed is emitted when an asset `class` was destroyed

type EventUniquesForceCreated

type EventUniquesForceCreated struct {
	Phase        Phase
	CollectionID U64
	Owner        AccountID
	Topics       []Hash
}

EventUniquesForceCreated is emitted when an asset class was force-created

type EventUniquesFrozen

type EventUniquesFrozen struct {
	Phase        Phase
	CollectionID U64
	ItemID       U128
	Topics       []Hash
}

EventUniquesFrozen is emitted when some asset `instance` was frozen

type EventUniquesIssued

type EventUniquesIssued struct {
	Phase        Phase
	CollectionID U64
	ItemID       U128
	Owner        AccountID
	Topics       []Hash
}

EventUniquesIssued is emitted when an asset instance was issued

type EventUniquesMetadataCleared

type EventUniquesMetadataCleared struct {
	Phase        Phase
	CollectionID U64
	ItemID       U128
	Topics       []Hash
}

EventUniquesMetadataCleared is emitted when metadata has been cleared for an asset instance

type EventUniquesMetadataSet

type EventUniquesMetadataSet struct {
	Phase        Phase
	CollectionID U64
	ItemID       U128
	Data         Bytes
	IsFrozen     Bool
	Topics       []Hash
}

EventUniquesMetadataSet is emitted when metadata has been set for an asset instance

type EventUniquesOwnerChanged

type EventUniquesOwnerChanged struct {
	Phase        Phase
	CollectionID U64
	NewOwner     AccountID
	Topics       []Hash
}

EventUniquesOwnerChanged is emitted when the owner changed

type EventUniquesRedeposited

type EventUniquesRedeposited struct {
	Phase           Phase
	CollectionID    U64
	SuccessfulItems []U128
	Topics          []Hash
}

EventUniquesRedeposited is emitted when metadata has been cleared for an asset instance

type EventUniquesTeamChanged

type EventUniquesTeamChanged struct {
	Phase        Phase
	CollectionID U64
	Issuer       AccountID
	Admin        AccountID
	Freezer      AccountID
	Topics       []Hash
}

EventUniquesTeamChanged is emitted when the management team changed

type EventUniquesThawed

type EventUniquesThawed struct {
	Phase        Phase
	CollectionID U64
	ItemID       U128
	Topics       []Hash
}

EventUniquesThawed is emitted when some asset instance was thawed

type EventUniquesTransferred

type EventUniquesTransferred struct {
	Phase        Phase
	CollectionID U64
	ItemID       U128
	From         AccountID
	To           AccountID
	Topics       []Hash
}

EventUniquesTransferred is emitted when some asset instance was transferred

type EventUtilityBatchCompleted

type EventUtilityBatchCompleted struct {
	Phase  Phase
	Topics []Hash
}

EventUtilityBatchCompleted is emitted when a batch of dispatches completed fully with no error.

type EventUtilityBatchInterrupted

type EventUtilityBatchInterrupted struct {
	Phase         Phase
	Index         U32
	DispatchError DispatchError
	Topics        []Hash
}

EventUtilityBatchInterrupted is emitted when a batch of dispatches did not complete fully. Index of first failing dispatch given, as well as the error.

type EventUtilityDispatchedAs

type EventUtilityDispatchedAs struct {
	Phase  Phase
	Index  U32
	Result DispatchResult
	Topics []Hash
}

EventUtilityDispatchedAs is emitted when a call was dispatched

type EventUtilityItemCompleted

type EventUtilityItemCompleted struct {
	Phase  Phase
	Topics []Hash
}

EventUtilityItemCompleted is emitted when a single item within a Batch of dispatches has completed with no error

type EventVestingVestingCompleted

type EventVestingVestingCompleted struct {
	Phase   Phase
	Account AccountID
	Topics  []Hash
}

EventVestingVestingCompleted is emitted when an [account] has become fully vested. No further vesting can happen

type EventVestingVestingUpdated

type EventVestingVestingUpdated struct {
	Phase    Phase
	Account  AccountID
	Unvested U128
	Topics   []Hash
}

EventVestingVestingUpdated is emitted when the amount vested has been updated. This could indicate more funds are available. The balance given is the amount which is left unvested (and thus locked)

type EventVoterListRebagged

type EventVoterListRebagged struct {
	Phase  Phase
	Who    AccountID
	From   U64
	To     U64
	Topics []Hash
}

EventVoterListRebagged is emitted when an account is moved from one bag to another.

type EventVoterListScoreUpdated

type EventVoterListScoreUpdated struct {
	Phase    Phase
	Who      AccountID
	NewScore U64
	Topics   []Hash
}

EventVoterListScoreUpdated is emitted when the score of an account is updated to the given amount.

type EventWhitelistCallWhitelisted

type EventWhitelistCallWhitelisted struct {
	Phase    Phase
	CallHash Hash
	Topics   []Hash
}

EventWhitelistCallWhitelisted is emitted when a call has been whitelisted.

type EventWhitelistWhitelistedCallDispatched

type EventWhitelistWhitelistedCallDispatched struct {
	Phase    Phase
	CallHash Hash
	Result   DispatchResult
	Topics   []Hash
}

EventWhitelistWhitelistedCallDispatched is emitted when a whitelisted call has been dispatched.

type EventWhitelistWhitelistedCallRemoved

type EventWhitelistWhitelistedCallRemoved struct {
	Phase    Phase
	CallHash Hash
	Topics   []Hash
}

EventWhitelistWhitelistedCallRemoved is emitted when a whitelisted call has been removed.

type EventXcmPalletAssetsTrapped

type EventXcmPalletAssetsTrapped struct {
	Phase  Phase
	Hash   H256
	Origin MultiLocationV1
	Assets VersionedMultiAssets
	Topics []Hash
}

EventXcmPalletAssetsTrapped is emitted when some assets have been placed in an asset trap.

type EventXcmPalletAttempted

type EventXcmPalletAttempted struct {
	Phase   Phase
	Outcome Outcome
	Topics  []Hash
}

EventXcmPalletAttempted is emitted when the execution of an XCM message was attempted.

type EventXcmPalletInvalidResponder

type EventXcmPalletInvalidResponder struct {
	Phase            Phase
	OriginLocation   MultiLocationV1
	QueryID          U64
	ExpectedLocation OptionMultiLocationV1
	Topics           []Hash
}

EventXcmPalletInvalidResponder is emitted when the expected query response has been received but the origin location of the response does not match that expected. The query remains registered for a later, valid, response to be received and acted upon.

type EventXcmPalletInvalidResponderVersion

type EventXcmPalletInvalidResponderVersion struct {
	Phase          Phase
	OriginLocation MultiLocationV1
	QueryID        U64
	Topics         []Hash
}

EventXcmPalletInvalidResponderVersion is emitted when the expected query response has been received but the expected origin location placed in storage by this runtime previously cannot be decoded. The query remains registered. This is unexpected (since a location placed in storage in a previously executing runtime should be readable prior to query timeout) and dangerous since the possibly valid response will be dropped. Manual governance intervention is probably going to be needed.

type EventXcmPalletNotified

type EventXcmPalletNotified struct {
	Phase       Phase
	QueryID     U64
	PalletIndex U8
	CallIndex   U8
	Topics      []Hash
}

EventXcmPalletNotified is emitted when a query response has been received and query is removed. The registered notification has been dispatched and executed successfully.

type EventXcmPalletNotifyDecodeFailed

type EventXcmPalletNotifyDecodeFailed struct {
	Phase       Phase
	QueryID     U64
	PalletIndex U8
	CallIndex   U8
	Topics      []Hash
}

EventXcmPalletNotifyDecodeFailed is emitted when a query response has been received and query is removed. The dispatch was unable to be decoded into a `Call`; this might be due to dispatch function having a signature which is not `(origin, QueryId, Response)`.

type EventXcmPalletNotifyDispatchError

type EventXcmPalletNotifyDispatchError struct {
	Phase       Phase
	QueryID     U64
	PalletIndex U8
	CallIndex   U8
	Topics      []Hash
}

EventXcmPalletNotifyDispatchError is emitted when a query response has been received and query is removed. There was a general error with dispatching the notification call.

type EventXcmPalletNotifyOverweight

type EventXcmPalletNotifyOverweight struct {
	Phase             Phase
	QueryID           U64
	PalletIndex       U8
	CallIndex         U8
	ActualWeight      Weight
	MaxBudgetedWeight Weight
	Topics            []Hash
}

EventXcmPalletNotifyOverweight is emitted when a query response has been received and query is removed. The registered notification could not be dispatched because the dispatch weight is greater than the maximum weight originally budgeted by this runtime for the query result.

type EventXcmPalletNotifyTargetMigrationFail

type EventXcmPalletNotifyTargetMigrationFail struct {
	Phase    Phase
	Location VersionedMultiLocation
	QueryID  U64
	Topics   []Hash
}

EventXcmPalletNotifyTargetMigrationFail is emitted when a given location which had a version change subscription was dropped owing to an error migrating the location to our new XCM format.

type EventXcmPalletNotifyTargetSendFail

type EventXcmPalletNotifyTargetSendFail struct {
	Phase    Phase
	Location MultiLocationV1
	QueryID  U64
	XcmError XCMError
	Topics   []Hash
}

EventXcmPalletNotifyTargetSendFail is emitted when a given location which had a version change subscription was dropped owing to an error sending the notification to it.

type EventXcmPalletResponseReady

type EventXcmPalletResponseReady struct {
	Phase    Phase
	QueryID  U64
	Response Response
	Topics   []Hash
}

EventXcmPalletResponseReady is emitted when a query response has been received and is ready for taking with `take_response`. There is no registered notification call.

type EventXcmPalletResponseTaken

type EventXcmPalletResponseTaken struct {
	Phase   Phase
	QueryID U64
	Topics  []Hash
}

EventXcmPalletResponseTaken is emitted when the received query response has been read and removed.

type EventXcmPalletSent

type EventXcmPalletSent struct {
	Phase       Phase
	Origin      MultiLocationV1
	Destination MultiLocationV1
	Message     []Instruction
	Topics      []Hash
}

EventXcmPalletSent is emitted when an XCM message was sent.

type EventXcmPalletSupportedVersionChanged

type EventXcmPalletSupportedVersionChanged struct {
	Phase      Phase
	Location   MultiLocationV1
	XcmVersion XcmVersion
	Topics     []Hash
}

EventXcmPalletSupportedVersionChanged is emitted when the supported version of a location has been changed. This might be through an automatic notification or a manual intervention.

type EventXcmPalletUnexpectedResponse

type EventXcmPalletUnexpectedResponse struct {
	Phase          Phase
	OriginLocation MultiLocationV1
	QueryID        U64
	Topics         []Hash
}

EventXcmPalletUnexpectedResponse is emitted when a query response which does not match a registered query is received. This may be because a matching query was never registered, it may be because it is a duplicate response, or because the query timed out.

type EventXcmPalletVersionChangeNotified

type EventXcmPalletVersionChangeNotified struct {
	Phase       Phase
	Destination MultiLocationV1
	Result      XcmVersion
	Topics      []Hash
}

EventXcmPalletVersionChangeNotified is emitted when an XCM version change notification message has been attempted to be sent.

type ExampleEnum

type ExampleEnum struct{}

ExampleEnum - Enum types can be represented using Go's structs. The ExampleEnum type itself is not used anywhere, it's just here for documentation purposes.

Example (ApplyExtrinsic)
applyExtrinsic := PhaseEnum{
	IsApplyExtrinsic: true,
	AsApplyExtrinsic: 1234,
}

enc, err := EncodeToHex(applyExtrinsic)
if err != nil {
	panic(err)
}

var dec PhaseEnum
err = DecodeFromHex(enc, &dec)
if err != nil {
	panic(err)
}

fmt.Println(reflect.DeepEqual(applyExtrinsic, dec))
Output:

Example (Finalization)
finalization := PhaseEnum{
	IsFinalization: true,
}

enc, err := EncodeToHex(finalization)
if err != nil {
	panic(err)
}

var dec PhaseEnum
err = DecodeFromHex(enc, &dec)
if err != nil {
	panic(err)
}

fmt.Println(reflect.DeepEqual(finalization, dec))
Output:

type ExampleStruct

type ExampleStruct struct{}

ExampleStruct - Struct types (fixed-sized series of values with predetermined and fixed types, typically without names/labels/keys) can be represented using Go's structs. The ExampleStruct type itself is not used anywhere, it's just here for documentation purposes.

Example
type Animal struct {
	Name     string
	Legs     U8
	Children []string
}

dog := Animal{Name: "Bello", Legs: 2, Children: []string{"Sam"}}

encoded, err := EncodeToHex(dog)
if err != nil {
	panic(err)
}
fmt.Println(encoded)

var decoded Animal
err = DecodeFromHex(encoded, &decoded)
if err != nil {
	panic(err)
}
fmt.Println(decoded)
Output:

0x1442656c6c6f02040c53616d
{Bello 2 [Sam]}

type ExampleTuple

type ExampleTuple struct{}

ExampleTuple - Tuple types (fixed-sized series of values with predetermined and fixed types, typically without names/labels/keys) can be represented using Go's structs. To use tuples, just define a struct that has exported fields with the right types for each value in the tuple, and the encoding manages the rest for you. The ExampleTuple type itself is not used anywhere, it's just here for documentation purposes.

Example
// This represents a document tuple of types [uint64, hash]
type Doc struct {
	ID   U64
	Hash Hash
}

doc := Doc{12, blake2b.Sum256([]byte("My document"))}

encoded, err := EncodeToHex(doc)
if err != nil {
	panic(err)
}
fmt.Println(encoded)

var decoded Doc
err = DecodeFromHex(encoded, &decoded)
if err != nil {
	panic(err)
}
fmt.Println(decoded)
Output:

0x0c000000000000009199a254aedc9d92a3157cd27bd21ceccc1e2ecee5760788663a3e523bc1a759
{12 [145 153 162 84 174 220 157 146 163 21 124 210 123 210 28 236 204 30 46 206 229 118 7 136 102 58 62 82 59 193 167 89]}

type ExampleVec

type ExampleVec struct{}

ExampleVec - Vec types (vectors, lists, series, sets, arrays, slices) can be represented using Go's native slices and arrays. The ExampleVec type itself is not used anywhere, it's just here for documentation purposes.

Example (Simple)
ingredients := []string{"salt", "sugar"}

encoded, err := EncodeToHex(ingredients)
if err != nil {
	panic(err)
}
fmt.Println(encoded)

var decoded []string
err = DecodeFromHex(encoded, &decoded)
if err != nil {
	panic(err)
}
fmt.Println(decoded)
Output:

0x081073616c74147375676172
[salt sugar]
Example (Struct)
type Votes struct {
	Options     [2]string
	Yay         []string
	Nay         []string
	Outstanding []string
}

votes := Votes{
	Options:     [2]string{"no deal", "muddle through"},
	Yay:         []string{"Alice"},
	Nay:         nil,
	Outstanding: []string{"Bob", "Carol"},
}

encoded, err := Encode(votes)
if err != nil {
	panic(err)
}
var decoded Votes
err = Decode(encoded, &decoded)
if err != nil {
	panic(err)
}

fmt.Println(reflect.DeepEqual(votes, decoded))
Output:

true

type ExampleVecAny

type ExampleVecAny struct{}

ExampleVecAny - VecAny is used in polkadot-js as a list of elements that are of any type, while Vec and VecFixed require fixed types. Albeit Go has no dynamic types, VecAny can be implemented using arrays/slices of custom types with custom encoding. An example is provided here. The ExampleVecAny type itself is not used anywhere, it's just here for documentation purposes.

Example
// Go Substrate RPC Client (GSRPC) provides APIs and types around Polkadot and any Substrate-based chain RPC calls
//
// Copyright 2019 Centrifuge GmbH
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

package main

import (
	"fmt"
	"reflect"

	"github.com/centrifuge/go-substrate-rpc-client/v4/scale"
	. "github.com/centrifuge/go-substrate-rpc-client/v4/types/codec"
)

// MyVal is a custom type that is used to hold arbitrarily encoded data. In this example, we encode uint8s with a 0x00
// and strings with 0x01 as the first byte.
type MyVal struct {
	Value interface{}
}

func (a *MyVal) Decode(decoder scale.Decoder) error {
	b, err := decoder.ReadOneByte()

	if err != nil {
		return err
	}

	if b == 0 {
		var u uint8
		err = decoder.Decode(&u)
		a.Value = u
	} else if b == 1 {
		var s string
		err = decoder.Decode(&s)
		a.Value = s
	}

	if err != nil {
		return err
	}

	return nil
}

func (a MyVal) Encode(encoder scale.Encoder) error {
	var err1, err2 error

	switch v := a.Value.(type) {
	case uint8:
		err1 = encoder.PushByte(0)
		err2 = encoder.Encode(v)
	case string:
		err1 = encoder.PushByte(1)
		err2 = encoder.Encode(v)
	default:
		return fmt.Errorf("unknown type %T", v)
	}

	if err1 != nil {
		return err1
	}
	if err2 != nil {
		return err2
	}

	return nil
}

func main() {
	myValSlice := []MyVal{{uint8(12)}, {"Abc"}}

	encoded, err := Encode(myValSlice)
	if err != nil {
		panic(err)
	}
	fmt.Println(encoded)

	var decoded []MyVal
	err = Decode(encoded, &decoded)
	if err != nil {
		panic(err)
	}

	fmt.Println(reflect.DeepEqual(myValSlice, decoded))
}
Output:

[8 0 12 1 12 65 98 99]
true

type ExecutionResult

type ExecutionResult struct {
	Outcome U32
	Error   XCMError
}

func (*ExecutionResult) Decode

func (e *ExecutionResult) Decode(decoder scale.Decoder) error

func (ExecutionResult) Encode

func (e ExecutionResult) Encode(encoder scale.Encoder) error

type Exposure

type Exposure struct {
	Total  UCompact
	Own    UCompact
	Others []IndividualExposure
}

Exposure lists the own and nominated stake of a validator

type ExtrinsicEra

type ExtrinsicEra struct {
	IsImmortalEra bool
	// AsImmortalEra ImmortalEra
	IsMortalEra bool
	AsMortalEra MortalEra
}

ExtrinsicEra indicates either a mortal or immortal extrinsic

func (*ExtrinsicEra) Decode

func (e *ExtrinsicEra) Decode(decoder scale.Decoder) error

func (ExtrinsicEra) Encode

func (e ExtrinsicEra) Encode(encoder scale.Encoder) error

type ExtrinsicStatus

type ExtrinsicStatus struct {
	IsFuture          bool // 00:: Future
	IsReady           bool // 1:: Ready
	IsBroadcast       bool // 2:: Broadcast(Vec<Text>)
	AsBroadcast       []Text
	IsInBlock         bool // 3:: InBlock(BlockHash)
	AsInBlock         Hash
	IsRetracted       bool // 4:: Retracted(BlockHash)
	AsRetracted       Hash
	IsFinalityTimeout bool // 5:: FinalityTimeout(BlockHash)
	AsFinalityTimeout Hash
	IsFinalized       bool // 6:: Finalized(BlockHash)
	AsFinalized       Hash
	IsUsurped         bool // 7:: Usurped(Hash)
	AsUsurped         Hash
	IsDropped         bool // 8:: Dropped
	IsInvalid         bool // 9:: Invalid
}

ExtrinsicStatus is an enum containing the result of an extrinsic submission

func (*ExtrinsicStatus) Decode

func (e *ExtrinsicStatus) Decode(decoder scale.Decoder) error

func (ExtrinsicStatus) Encode

func (e ExtrinsicStatus) Encode(encoder scale.Encoder) error

func (ExtrinsicStatus) MarshalJSON

func (e ExtrinsicStatus) MarshalJSON() ([]byte, error)

func (*ExtrinsicStatus) UnmarshalJSON

func (e *ExtrinsicStatus) UnmarshalJSON(b []byte) error

type ExtrinsicV11

type ExtrinsicV11 struct {
	Version          uint8
	SignedExtensions []string
}

Modelled after packages/types/src/Metadata/v10/toV11.ts

func (*ExtrinsicV11) Decode

func (e *ExtrinsicV11) Decode(decoder scale.Decoder) error

func (ExtrinsicV11) Encode

func (e ExtrinsicV11) Encode(encoder scale.Encoder) error

type ExtrinsicV14

type ExtrinsicV14 struct {
	Type             Si1LookupTypeID
	Version          U8
	SignedExtensions []SignedExtensionMetadataV14
}

type FunctionArgumentMetadata

type FunctionArgumentMetadata struct {
	Name Text
	Type Type
}

type FunctionMetadataV14

type FunctionMetadataV14 struct {
	Type Si1LookupTypeID
}

type FunctionMetadataV4

type FunctionMetadataV4 struct {
	Name          Text
	Args          []FunctionArgumentMetadata
	Documentation []Text
}

type Fungibility

type Fungibility struct {
	IsFungible bool
	Amount     UCompact

	IsNonFungible bool
	AssetInstance AssetInstance
}

func (*Fungibility) Decode

func (f *Fungibility) Decode(decoder scale.Decoder) error

func (Fungibility) Encode

func (f Fungibility) Encode(encoder scale.Encoder) error

type GenerateMMRProofResponse

type GenerateMMRProofResponse struct {
	BlockHash H256
	Leaf      MMRLeaf
	Proof     MMRProof
}

GenerateMMRProofResponse contains the generate proof rpc response

func (*GenerateMMRProofResponse) UnmarshalJSON

func (d *GenerateMMRProofResponse) UnmarshalJSON(bz []byte) error

UnmarshalJSON fills u with the JSON encoded byte array given by b

type GroupIndex

type GroupIndex U32

type H160

type H160 [20]byte

H160 is a hash containing 160 bits (20 bytes), typically used in blocks, extrinsics and as a sane default

func NewH160

func NewH160(b []byte) H160

NewH160 creates a new H160 type

func (H160) Hex

func (h H160) Hex() string

Hex returns a hex string representation of the value (not of the encoded value)

type H256

type H256 [32]byte

H256 is a hash containing 256 bits (32 bytes), typically used in blocks, extrinsics and as a sane default

func NewH256

func NewH256(b []byte) H256

NewH256 creates a new H256 type

func (H256) Hex

func (h H256) Hex() string

Hex returns a hex string representation of the value (not of the encoded value)

type H512

type H512 [64]byte

H512 is a hash containing 512 bits (64 bytes), typically used for signature

func NewH512

func NewH512(b []byte) H512

NewH512 creates a new H512 type

func (H512) Hex

func (h H512) Hex() string

Hex returns a hex string representation of the value (not of the encoded value)

type HRMPChannelID

type HRMPChannelID struct {
	Sender    U32
	Recipient U32
}

func (*HRMPChannelID) Decode

func (h *HRMPChannelID) Decode(decoder scale.Decoder) error

func (HRMPChannelID) Encode

func (h HRMPChannelID) Encode(encoder scale.Encoder) error

type Hash

type Hash H256

Hash is the default hash that is used across the system. It is just a thin wrapper around H256

func NewHash

func NewHash(b []byte) Hash

NewHash creates a new Hash type

func NewHashFromHexString

func NewHashFromHexString(s string) (Hash, error)

NewHashFromHexString creates a new Hash type from a hex string

func (Hash) Hex

func (h Hash) Hex() string

Hex returns a hex string representation of the value (not of the encoded value)

func (Hash) MarshalJSON

func (h Hash) MarshalJSON() ([]byte, error)

MarshalJSON returns a JSON encoded byte array of h

func (*Hash) UnmarshalJSON

func (h *Hash) UnmarshalJSON(b []byte) error

UnmarshalJSON fills h with the JSON encoded byte array given by b

type HeadData

type HeadData []U8
type Header struct {
	ParentHash     Hash        `json:"parentHash"`
	Number         BlockNumber `json:"number"`
	StateRoot      Hash        `json:"stateRoot"`
	ExtrinsicsRoot Hash        `json:"extrinsicsRoot"`
	Digest         Digest      `json:"digest"`
}

type Health

type Health struct {
	Peers           U64
	IsSyncing       bool
	ShouldHavePeers bool
}

Health contains the status of a node

type I128

type I128 struct {
	*big.Int
}

I128 is a signed 128-bit integer, it is represented as a big.Int in Go.

func NewI128

func NewI128(i big.Int) I128

NewI128 creates a new I128 type

func (*I128) Decode

func (i *I128) Decode(decoder scale.Decoder) error

Decode implements decoding as per the Scale specification

func (I128) Encode

func (i I128) Encode(encoder scale.Encoder) error

Encode implements encoding as per the Scale specification

type I16

type I16 int16

I16 is a signed 16-bit integer

func NewI16

func NewI16(i int16) I16

NewI16 creates a new I16 type

func (I16) MarshalJSON

func (i I16) MarshalJSON() ([]byte, error)

MarshalJSON returns a JSON encoded byte array of i

func (*I16) UnmarshalJSON

func (i *I16) UnmarshalJSON(b []byte) error

UnmarshalJSON fills i with the JSON encoded byte array given by b

type I256

type I256 struct {
	*big.Int
}

I256 is a signed 256-bit integer, it is represented as a big.Int in Go.

func NewI256

func NewI256(i big.Int) I256

NewI256 creates a new I256 type

func (*I256) Decode

func (i *I256) Decode(decoder scale.Decoder) error

Decode implements decoding as per the Scale specification

func (I256) Encode

func (i I256) Encode(encoder scale.Encoder) error

Encode implements encoding as per the Scale specification

type I32

type I32 int32

I32 is a signed 32-bit integer

func NewI32

func NewI32(i int32) I32

NewI32 creates a new I32 type

func (I32) MarshalJSON

func (i I32) MarshalJSON() ([]byte, error)

MarshalJSON returns a JSON encoded byte array of i

func (*I32) UnmarshalJSON

func (i *I32) UnmarshalJSON(b []byte) error

UnmarshalJSON fills i with the JSON encoded byte array given by b

type I64

type I64 int64

I64 is a signed 64-bit integer

func NewI64

func NewI64(i int64) I64

NewI64 creates a new I64 type

func (I64) MarshalJSON

func (i I64) MarshalJSON() ([]byte, error)

MarshalJSON returns a JSON encoded byte array of i

func (*I64) UnmarshalJSON

func (i *I64) UnmarshalJSON(b []byte) error

UnmarshalJSON fills i with the JSON encoded byte array given by b

type I8

type I8 int8

I8 is a signed 8-bit integer

func NewI8

func NewI8(i int8) I8

NewI8 creates a new I8 type

func (I8) MarshalJSON

func (i I8) MarshalJSON() ([]byte, error)

MarshalJSON returns a JSON encoded byte array of i

func (*I8) UnmarshalJSON

func (i *I8) UnmarshalJSON(b []byte) error

UnmarshalJSON fills i with the JSON encoded byte array given by b

type IndividualExposure

type IndividualExposure struct {
	Who   AccountID
	Value UCompact
}

IndividualExposure contains the nominated stake by one specific third party

type Instruction

type Instruction struct {
	IsWithdrawAsset          bool
	WithdrawAssetMultiAssets MultiAssetsV1

	IsReserveAssetDeposited          bool
	ReserveAssetDepositedMultiAssets MultiAssetsV1

	IsReceiveTeleportedAsset          bool
	ReceiveTeleportedAssetMultiAssets MultiAssetsV1

	IsQueryResponse        bool
	QueryResponseQueryID   UCompact
	QueryResponseResponse  Response
	QueryResponseMaxWeight UCompact

	IsTransferAsset          bool
	TransferAssetAssets      MultiAssetsV1
	TransferAssetBeneficiary MultiLocationV1

	IsTransferReserveAsset          bool
	TransferReserveAssetMultiAssets MultiAssetsV1
	TransferReserveAssetDest        MultiLocationV1
	TransferReserveAssetXCM         []Instruction

	IsTransact                  bool
	TransactOriginType          OriginKind
	TransactRequireWeightAtMost UCompact
	// NOTE:
	//
	// As per https://github.com/paritytech/polkadot/blob/c254e5975711a6497af256f6831e9a6c752d28f5/xcm/src/v2/mod.rs#L343
	// The `Call` should be wrapped by the `DoubleEncoded` found here:
	// https://github.com/paritytech/polkadot/blob/c254e5975711a6497af256f6831e9a6c752d28f5/xcm/src/double_encoded.rs#L27
	//
	// However, since the decoded option is skipped by the codec, we are not adding it here.
	TransactCall EncodedCall

	IsHrmpNewChannelOpenRequest             bool
	HrmpNewChannelOpenRequestSender         U32
	HrmpNewChannelOpenRequestMaxMessageSize U32
	HrmpNewChannelOpenRequestMaxCapacity    U32

	IsHrmpChannelAccepted        bool
	HrmpChannelAcceptedRecipient U32

	IsHrmpChannelClosing        bool
	HrmpChannelClosingInitiator U32
	HrmpChannelClosingSender    U32
	HrmpChannelClosingRecipient U32

	IsClearOrigin bool

	IsDescendOrigin       bool
	DescendOriginLocation JunctionsV1

	IsReportError                bool
	ReportErrorQueryID           U64
	ReportErrorDestination       MultiLocationV1
	ReportErrorMaxResponseWeight U64

	IsDepositAsset               bool
	DepositAssetMultiAssetFilter MultiAssetFilter
	DepositAssetMaxAssets        U32
	DepositAssetBeneficiary      MultiLocationV1

	IsDepositReserveAsset               bool
	DepositReserveAssetMultiAssetFilter MultiAssetFilter
	DepositReserveAssetMaxAssets        U32
	DepositReserveAssetDest             MultiLocationV1
	DepositReserveAssetXCM              []Instruction

	IsExchangeAsset      bool
	ExchangeAssetGive    MultiAssetFilter
	ExchangeAssetReceive MultiAssetsV1

	IsInitiateReserveWithdraw      bool
	InitiateReserveWithdrawAssets  MultiAssetFilter
	InitiateReserveWithdrawReserve MultiLocationV1
	InitiateReserveWithdrawXCM     []Instruction

	IsInitiateTeleport     bool
	InitiateTeleportAssets MultiAssetFilter
	InitiateTeleportDest   MultiLocationV1
	InitiateTeleportXCM    []Instruction

	IsQueryHolding                bool
	QueryHoldingQueryID           U64
	QueryHoldingDest              MultiLocationV1
	QueryHoldingAssets            MultiAssetFilter
	QueryHoldingMaxResponseWeight U64

	IsBuyExecution          bool
	BuyExecutionFees        MultiAssetV1
	BuyExecutionWeightLimit WeightLimit

	IsRefundSurplus bool

	IsSetErrorHandler  bool
	SetErrorHandlerXCM []Instruction

	IsSetAppendix  bool
	SetAppendixXCM []Instruction

	IsClearError bool

	IsClaimAsset     bool
	ClaimAssetAssets MultiAssetsV1
	ClaimAssetTicket MultiLocationV1

	IsTrap   bool
	TrapCode U64

	IsSubscribeVersion                bool
	SubscribeVersionQueryID           U64
	SubscribeVersionMaxResponseWeight U64

	IsUnsubscribeVersion bool
}

func (*Instruction) Decode

func (i *Instruction) Decode(decoder scale.Decoder) error

func (Instruction) Encode

func (i Instruction) Encode(encoder scale.Encoder) error

type ItemDetails

type ItemDetails struct {
	Owner    AccountID
	Approved OptionAccountID
	IsFrozen bool
	Deposit  U128
}

func (*ItemDetails) Decode

func (i *ItemDetails) Decode(decoder scale.Decoder) error

func (ItemDetails) Encode

func (i ItemDetails) Encode(encoder scale.Encoder) error

type ItemMetadata

type ItemMetadata struct {
	Deposit  U128
	Data     Bytes
	IsFrozen bool
}

func (*ItemMetadata) Decode

func (i *ItemMetadata) Decode(decoder scale.Decoder) error

func (ItemMetadata) Encode

func (i ItemMetadata) Encode(encoder scale.Encoder) error

type JunctionV0

type JunctionV0 struct {
	IsParent bool

	IsParachain bool
	ParachainID U32

	IsAccountID32        bool
	AccountID32NetworkID NetworkID
	AccountID            []U8

	IsAccountIndex64        bool
	AccountIndex64NetworkID NetworkID
	AccountIndex            U64

	IsAccountKey20        bool
	AccountKey20NetworkID NetworkID
	AccountKey            []U8

	IsPalletInstance bool
	PalletIndex      U8

	IsGeneralIndex bool
	GeneralIndex   U128

	IsGeneralKey bool
	GeneralKey   []U8

	IsOnlyChild bool

	IsPlurality   bool
	PluralityID   BodyID
	PluralityPart BodyPart
}

func (*JunctionV0) Decode

func (j *JunctionV0) Decode(decoder scale.Decoder) error

func (JunctionV0) Encode

func (j JunctionV0) Encode(encoder scale.Encoder) error

type JunctionV1

type JunctionV1 struct {
	IsParachain bool
	ParachainID UCompact

	IsAccountID32        bool
	AccountID32NetworkID NetworkID
	AccountID            []U8

	IsAccountIndex64        bool
	AccountIndex64NetworkID NetworkID
	AccountIndex            U64

	IsAccountKey20        bool
	AccountKey20NetworkID NetworkID
	AccountKey            []U8

	IsPalletInstance bool
	PalletIndex      U8

	IsGeneralIndex bool
	GeneralIndex   U128

	IsGeneralKey bool
	GeneralKey   []U8

	IsOnlyChild bool

	IsPlurality bool
	BodyID      BodyID
	BodyPart    BodyPart
}

func (*JunctionV1) Decode

func (j *JunctionV1) Decode(decoder scale.Decoder) error

func (JunctionV1) Encode

func (j JunctionV1) Encode(encoder scale.Encoder) error

type JunctionsV1

type JunctionsV1 struct {
	IsHere bool

	IsX1 bool
	X1   JunctionV1

	IsX2 bool
	X2   [2]JunctionV1

	IsX3 bool
	X3   [3]JunctionV1

	IsX4 bool
	X4   [4]JunctionV1

	IsX5 bool
	X5   [5]JunctionV1

	IsX6 bool
	X6   [6]JunctionV1

	IsX7 bool
	X7   [7]JunctionV1

	IsX8 bool
	X8   [8]JunctionV1
}

func (*JunctionsV1) Decode

func (j *JunctionsV1) Decode(decoder scale.Decoder) error

func (JunctionsV1) Encode

func (j JunctionsV1) Encode(encoder scale.Encoder) error

type Justification

type Justification Bytes

type KeyValueOption

type KeyValueOption struct {
	StorageKey     StorageKey
	HasStorageData bool
	StorageData    StorageDataRaw
}

func (KeyValueOption) MarshalJSON

func (r KeyValueOption) MarshalJSON() ([]byte, error)

func (*KeyValueOption) UnmarshalJSON

func (r *KeyValueOption) UnmarshalJSON(b []byte) error

type LotteryCallIndex

type LotteryCallIndex struct {
	PalletIndex U8
	CallIndex   U8
}

func (*LotteryCallIndex) Decode

func (m *LotteryCallIndex) Decode(decoder scale.Decoder) error

func (LotteryCallIndex) Encode

func (m LotteryCallIndex) Encode(encoder scale.Encoder) error

type MMREncodableOpaqueLeaf

type MMREncodableOpaqueLeaf Bytes

type MMRLeaf

type MMRLeaf struct {
	Version               MMRLeafVersion
	ParentNumberAndHash   ParentNumberAndHash
	BeefyNextAuthoritySet BeefyNextAuthoritySet
	ParachainHeads        H256
}

type MMRLeafVersion

type MMRLeafVersion U8

type MMRProof

type MMRProof struct {
	// The index of the leaf the proof is for.
	LeafIndex U64
	// Number of leaves in MMR, when the proof was generated.
	LeafCount U64
	// Proof elements (hashes of siblings of inner nodes on the path to the leaf).
	Items []H256
}

MMRProof is a MMR proof

type MapTypeV10

type MapTypeV10 struct {
	Hasher StorageHasherV10
	Key    Type
	Value  Type
	Linked bool
}

type MapTypeV14

type MapTypeV14 struct {
	Hashers []StorageHasherV10
	Key     Si1LookupTypeID
	Value   Si1LookupTypeID
}

type MapTypeV4

type MapTypeV4 struct {
	Hasher StorageHasher
	Key    Type
	Value  Type
	Linked bool
}

type Metadata

type Metadata struct {
	MagicNumber uint32
	// The version in use
	Version uint8

	AsMetadataV4  MetadataV4
	AsMetadataV7  MetadataV7
	AsMetadataV8  MetadataV8
	AsMetadataV9  MetadataV9
	AsMetadataV10 MetadataV10
	AsMetadataV11 MetadataV11
	AsMetadataV12 MetadataV12
	AsMetadataV13 MetadataV13
	AsMetadataV14 MetadataV14
}

func NewMetadataV10

func NewMetadataV10() *Metadata

func NewMetadataV11

func NewMetadataV11() *Metadata

func NewMetadataV12

func NewMetadataV12() *Metadata

func NewMetadataV13

func NewMetadataV13() *Metadata

func NewMetadataV14

func NewMetadataV14() *Metadata

func NewMetadataV4

func NewMetadataV4() *Metadata

func NewMetadataV7

func NewMetadataV7() *Metadata

func NewMetadataV8

func NewMetadataV8() *Metadata

func NewMetadataV9

func NewMetadataV9() *Metadata

func (*Metadata) Decode

func (m *Metadata) Decode(decoder scale.Decoder) error

func (Metadata) Encode

func (m Metadata) Encode(encoder scale.Encoder) error

func (*Metadata) ExistsModuleMetadata

func (m *Metadata) ExistsModuleMetadata(module string) bool

func (*Metadata) FindCallIndex

func (m *Metadata) FindCallIndex(call string) (CallIndex, error)

func (*Metadata) FindConstantValue

func (m *Metadata) FindConstantValue(module string, constantName string) ([]byte, error)

func (*Metadata) FindError

func (m *Metadata) FindError(moduleIndex U8, errorIndex [4]U8) (*MetadataError, error)

func (*Metadata) FindEventNamesForEventID

func (m *Metadata) FindEventNamesForEventID(eventID EventID) (Text, Text, error)

func (*Metadata) FindStorageEntryMetadata

func (m *Metadata) FindStorageEntryMetadata(module string, fn string) (StorageEntryMetadata, error)

type MetadataError

type MetadataError struct {
	Name  string
	Value string
}

func NewMetadataError

func NewMetadataError(variant Si1Variant) *MetadataError

type MetadataSetName

type MetadataSetName []byte

type MetadataSetSymbol

type MetadataSetSymbol []byte

type MetadataV10

type MetadataV10 struct {
	Modules []ModuleMetadataV10
}

Modelled after packages/types/src/Metadata/v10/Metadata.ts

func (*MetadataV10) Decode

func (m *MetadataV10) Decode(decoder scale.Decoder) error

func (MetadataV10) Encode

func (m MetadataV10) Encode(encoder scale.Encoder) error

func (*MetadataV10) ExistsModuleMetadata

func (m *MetadataV10) ExistsModuleMetadata(module string) bool

func (*MetadataV10) FindCallIndex

func (m *MetadataV10) FindCallIndex(call string) (CallIndex, error)

func (*MetadataV10) FindConstantValue

func (m *MetadataV10) FindConstantValue(module Text, constant Text) ([]byte, error)

func (*MetadataV10) FindEventNamesForEventID

func (m *MetadataV10) FindEventNamesForEventID(eventID EventID) (Text, Text, error)

func (*MetadataV10) FindStorageEntryMetadata

func (m *MetadataV10) FindStorageEntryMetadata(module string, fn string) (StorageEntryMetadata, error)

type MetadataV11

type MetadataV11 struct {
	MetadataV10
	Extrinsic ExtrinsicV11
}

Modelled after packages/types/src/Metadata/v10/toV11.ts

func (*MetadataV11) Decode

func (m *MetadataV11) Decode(decoder scale.Decoder) error

func (MetadataV11) Encode

func (m MetadataV11) Encode(encoder scale.Encoder) error

type MetadataV12

type MetadataV12 struct {
	Modules   []ModuleMetadataV12
	Extrinsic ExtrinsicV11
}

Modelled after packages/types/src/Metadata/v11/toV12.ts

func (*MetadataV12) Decode

func (m *MetadataV12) Decode(decoder scale.Decoder) error

func (MetadataV12) Encode

func (m MetadataV12) Encode(encoder scale.Encoder) error

func (*MetadataV12) ExistsModuleMetadata

func (m *MetadataV12) ExistsModuleMetadata(module string) bool

func (*MetadataV12) FindCallIndex

func (m *MetadataV12) FindCallIndex(call string) (CallIndex, error)

func (*MetadataV12) FindConstantValue

func (m *MetadataV12) FindConstantValue(module Text, constant Text) ([]byte, error)

func (*MetadataV12) FindEventNamesForEventID

func (m *MetadataV12) FindEventNamesForEventID(eventID EventID) (Text, Text, error)

func (*MetadataV12) FindStorageEntryMetadata

func (m *MetadataV12) FindStorageEntryMetadata(module string, fn string) (StorageEntryMetadata, error)

type MetadataV13

type MetadataV13 struct {
	Modules   []ModuleMetadataV13
	Extrinsic ExtrinsicV11
}

func (*MetadataV13) Decode

func (m *MetadataV13) Decode(decoder scale.Decoder) error

func (MetadataV13) Encode

func (m MetadataV13) Encode(encoder scale.Encoder) error

func (*MetadataV13) ExistsModuleMetadata

func (m *MetadataV13) ExistsModuleMetadata(module string) bool

func (*MetadataV13) FindCallIndex

func (m *MetadataV13) FindCallIndex(call string) (CallIndex, error)

func (*MetadataV13) FindConstantValue

func (m *MetadataV13) FindConstantValue(module Text, constant Text) ([]byte, error)

func (*MetadataV13) FindEventNamesForEventID

func (m *MetadataV13) FindEventNamesForEventID(eventID EventID) (Text, Text, error)

func (*MetadataV13) FindStorageEntryMetadata

func (m *MetadataV13) FindStorageEntryMetadata(module string, fn string) (StorageEntryMetadata, error)

type MetadataV14

type MetadataV14 struct {
	Lookup    PortableRegistryV14
	Pallets   []PalletMetadataV14
	Extrinsic ExtrinsicV14
	Type      Si1LookupTypeID

	// Custom field to help us lookup a type from the registry
	// more efficiently. This field is built while decoding and
	// it is not to be encoded.
	EfficientLookup map[int64]*Si1Type `scale:"-"`
}

nolint:lll Based on https://github.com/polkadot-js/api/blob/80b581f0df87108c59f71e67d7c5fc5f8c89ec33/packages/types/src/interfaces/metadata/v14.ts

func (*MetadataV14) Decode

func (m *MetadataV14) Decode(decoder scale.Decoder) error

Decode implementation for MetadataV14 Note: We opt for a custom impl build `EfficientLookup` on the fly.

func (*MetadataV14) ExistsModuleMetadata

func (m *MetadataV14) ExistsModuleMetadata(module string) bool

func (*MetadataV14) FindCallIndex

func (m *MetadataV14) FindCallIndex(call string) (CallIndex, error)

func (*MetadataV14) FindConstantValue

func (m *MetadataV14) FindConstantValue(module Text, constant Text) ([]byte, error)

func (*MetadataV14) FindError

func (m *MetadataV14) FindError(moduleIndex U8, errorIndex [4]U8) (*MetadataError, error)

func (*MetadataV14) FindEventNamesForEventID

func (m *MetadataV14) FindEventNamesForEventID(eventID EventID) (Text, Text, error)

func (*MetadataV14) FindStorageEntryMetadata

func (m *MetadataV14) FindStorageEntryMetadata(module string, fn string) (StorageEntryMetadata, error)

type MetadataV4

type MetadataV4 struct {
	Modules []ModuleMetadataV4
}

Modelled after https://github.com/paritytech/substrate/blob/v1.0.0rc2/srml/metadata/src/lib.rs

func (*MetadataV4) Decode

func (m *MetadataV4) Decode(decoder scale.Decoder) error

func (MetadataV4) Encode

func (m MetadataV4) Encode(encoder scale.Encoder) error

func (*MetadataV4) ExistsModuleMetadata

func (m *MetadataV4) ExistsModuleMetadata(module string) bool

func (*MetadataV4) FindCallIndex

func (m *MetadataV4) FindCallIndex(call string) (CallIndex, error)

func (*MetadataV4) FindConstantValue

func (m *MetadataV4) FindConstantValue(_module Text, _constant Text) ([]byte, error)

func (*MetadataV4) FindEventNamesForEventID

func (m *MetadataV4) FindEventNamesForEventID(eventID EventID) (Text, Text, error)

func (*MetadataV4) FindStorageEntryMetadata

func (m *MetadataV4) FindStorageEntryMetadata(module string, fn string) (StorageEntryMetadata, error)

type MetadataV7

type MetadataV7 struct {
	Modules []ModuleMetadataV7
}

Modelled after packages/types/src/Metadata/v7/Metadata.ts

func (*MetadataV7) Decode

func (m *MetadataV7) Decode(decoder scale.Decoder) error

func (MetadataV7) Encode

func (m MetadataV7) Encode(encoder scale.Encoder) error

func (*MetadataV7) ExistsModuleMetadata

func (m *MetadataV7) ExistsModuleMetadata(module string) bool

func (*MetadataV7) FindCallIndex

func (m *MetadataV7) FindCallIndex(call string) (CallIndex, error)

func (*MetadataV7) FindConstantValue

func (m *MetadataV7) FindConstantValue(module Text, constant Text) ([]byte, error)

func (*MetadataV7) FindEventNamesForEventID

func (m *MetadataV7) FindEventNamesForEventID(eventID EventID) (Text, Text, error)

func (*MetadataV7) FindStorageEntryMetadata

func (m *MetadataV7) FindStorageEntryMetadata(module string, fn string) (StorageEntryMetadata, error)

type MetadataV8

type MetadataV8 struct {
	Modules []ModuleMetadataV8
}

Modelled after packages/types/src/Metadata/v8/Metadata.ts

func (*MetadataV8) Decode

func (m *MetadataV8) Decode(decoder scale.Decoder) error

func (MetadataV8) Encode

func (m MetadataV8) Encode(encoder scale.Encoder) error

func (*MetadataV8) ExistsModuleMetadata

func (m *MetadataV8) ExistsModuleMetadata(module string) bool

func (*MetadataV8) FindCallIndex

func (m *MetadataV8) FindCallIndex(call string) (CallIndex, error)

func (*MetadataV8) FindConstantValue

func (m *MetadataV8) FindConstantValue(module Text, constant Text) ([]byte, error)

func (*MetadataV8) FindEventNamesForEventID

func (m *MetadataV8) FindEventNamesForEventID(eventID EventID) (Text, Text, error)

func (*MetadataV8) FindStorageEntryMetadata

func (m *MetadataV8) FindStorageEntryMetadata(module string, fn string) (StorageEntryMetadata, error)

type MetadataV9

type MetadataV9 struct {
	Modules []ModuleMetadataV8
}

Modelled after packages/types/src/Metadata/v9/Metadata.ts

func (*MetadataV9) Decode

func (m *MetadataV9) Decode(decoder scale.Decoder) error

func (MetadataV9) Encode

func (m MetadataV9) Encode(encoder scale.Encoder) error

func (*MetadataV9) ExistsModuleMetadata

func (m *MetadataV9) ExistsModuleMetadata(module string) bool

func (*MetadataV9) FindCallIndex

func (m *MetadataV9) FindCallIndex(call string) (CallIndex, error)

func (*MetadataV9) FindConstantValue

func (m *MetadataV9) FindConstantValue(module Text, constant Text) ([]byte, error)

func (*MetadataV9) FindEventNamesForEventID

func (m *MetadataV9) FindEventNamesForEventID(eventID EventID) (Text, Text, error)

func (*MetadataV9) FindStorageEntryMetadata

func (m *MetadataV9) FindStorageEntryMetadata(module string, fn string) (StorageEntryMetadata, error)

type MigrationCompute

type MigrationCompute struct {
	IsSigned bool
	IsAuto   bool
}

MigrationCompute is an enum describing how a migration was computed.

func (*MigrationCompute) Decode

func (m *MigrationCompute) Decode(decoder scale.Decoder) error

func (MigrationCompute) Encode

func (m MigrationCompute) Encode(encoder scale.Encoder) error

type ModuleConstantMetadataV6

type ModuleConstantMetadataV6 struct {
	Name          Text
	Type          Type
	Value         Bytes
	Documentation []Text
}

type ModuleError

type ModuleError struct {
	Index U8

	Error [4]U8
}

func (*ModuleError) Decode

func (m *ModuleError) Decode(decoder scale.Decoder) error

func (ModuleError) Encode

func (m ModuleError) Encode(encoder scale.Encoder) error

type ModuleMetadataV10

type ModuleMetadataV10 struct {
	Name       Text
	HasStorage bool
	Storage    StorageMetadataV10
	HasCalls   bool
	Calls      []FunctionMetadataV4
	HasEvents  bool
	Events     []EventMetadataV4
	Constants  []ModuleConstantMetadataV6
	Errors     []ErrorMetadataV8
}

func (*ModuleMetadataV10) Decode

func (m *ModuleMetadataV10) Decode(decoder scale.Decoder) error

func (ModuleMetadataV10) Encode

func (m ModuleMetadataV10) Encode(encoder scale.Encoder) error

func (*ModuleMetadataV10) FindConstantValue

func (m *ModuleMetadataV10) FindConstantValue(constant Text) ([]byte, error)

type ModuleMetadataV12

type ModuleMetadataV12 struct {
	ModuleMetadataV10
	Index uint8
}

func (*ModuleMetadataV12) Decode

func (m *ModuleMetadataV12) Decode(decoder scale.Decoder) error

func (ModuleMetadataV12) Encode

func (m ModuleMetadataV12) Encode(encoder scale.Encoder) error

type ModuleMetadataV13

type ModuleMetadataV13 struct {
	Name       Text
	HasStorage bool
	Storage    StorageMetadataV13
	HasCalls   bool
	Calls      []FunctionMetadataV4
	HasEvents  bool
	Events     []EventMetadataV4
	Constants  []ModuleConstantMetadataV6
	Errors     []ErrorMetadataV8
	Index      uint8
}

func (*ModuleMetadataV13) Decode

func (m *ModuleMetadataV13) Decode(decoder scale.Decoder) error

func (ModuleMetadataV13) Encode

func (m ModuleMetadataV13) Encode(encoder scale.Encoder) error

func (*ModuleMetadataV13) FindConstantValue

func (m *ModuleMetadataV13) FindConstantValue(constant Text) ([]byte, error)

type ModuleMetadataV4

type ModuleMetadataV4 struct {
	Name       Text
	Prefix     Text
	HasStorage bool
	Storage    []StorageFunctionMetadataV4
	HasCalls   bool
	Calls      []FunctionMetadataV4
	HasEvents  bool
	Events     []EventMetadataV4
}

func (*ModuleMetadataV4) Decode

func (m *ModuleMetadataV4) Decode(decoder scale.Decoder) error

func (ModuleMetadataV4) Encode

func (m ModuleMetadataV4) Encode(encoder scale.Encoder) error

type ModuleMetadataV7

type ModuleMetadataV7 struct {
	Name       Text
	HasStorage bool
	Storage    StorageMetadata
	HasCalls   bool
	Calls      []FunctionMetadataV4
	HasEvents  bool
	Events     []EventMetadataV4
	Constants  []ModuleConstantMetadataV6
}

func (*ModuleMetadataV7) Decode

func (m *ModuleMetadataV7) Decode(decoder scale.Decoder) error

func (ModuleMetadataV7) Encode

func (m ModuleMetadataV7) Encode(encoder scale.Encoder) error

type ModuleMetadataV8

type ModuleMetadataV8 struct {
	Name       Text
	HasStorage bool
	Storage    StorageMetadata
	HasCalls   bool
	Calls      []FunctionMetadataV4
	HasEvents  bool
	Events     []EventMetadataV4
	Constants  []ModuleConstantMetadataV6
	Errors     []ErrorMetadataV8
}

func (*ModuleMetadataV8) Decode

func (m *ModuleMetadataV8) Decode(decoder scale.Decoder) error

func (ModuleMetadataV8) Encode

func (m ModuleMetadataV8) Encode(encoder scale.Encoder) error

type Moment

type Moment struct {
	time.Time
}

Moment is a wrapper around milliseconds/timestamps using the `time.Time` type.

func NewMoment

func NewMoment(t time.Time) Moment

NewMoment creates a new Moment type

func (*Moment) Decode

func (m *Moment) Decode(decoder scale.Decoder) error

func (Moment) Encode

func (m Moment) Encode(encoder scale.Encoder) error

type MortalEra

type MortalEra struct {
	First  byte
	Second byte
}

MortalEra for an extrinsic, indicating period and phase

type MultiAddress

type MultiAddress struct {
	IsID        bool
	AsID        AccountID
	IsIndex     bool
	AsIndex     AccountIndex
	IsRaw       bool
	AsRaw       []byte
	IsAddress32 bool
	AsAddress32 [32]byte
	IsAddress20 bool
	AsAddress20 [20]byte
}

func NewMultiAddressFromAccountID

func NewMultiAddressFromAccountID(b []byte) (MultiAddress, error)

NewMultiAddressFromAccountID creates an Address from the given AccountID (public key)

func NewMultiAddressFromHexAccountID

func NewMultiAddressFromHexAccountID(str string) (MultiAddress, error)

NewMultiAddressFromHexAccountID creates an Address from the given hex string that contains an AccountID (public key)

func (*MultiAddress) Decode

func (m *MultiAddress) Decode(decoder scale.Decoder) error

func (MultiAddress) Encode

func (m MultiAddress) Encode(encoder scale.Encoder) error

type MultiAssetFilter

type MultiAssetFilter struct {
	IsDefinite  bool
	MultiAssets MultiAssetsV1

	IsWild         bool
	WildMultiAsset WildMultiAsset
}

func (*MultiAssetFilter) Decode

func (m *MultiAssetFilter) Decode(decoder scale.Decoder) error

func (MultiAssetFilter) Encode

func (m MultiAssetFilter) Encode(encoder scale.Encoder) error

type MultiAssetV0

type MultiAssetV0 struct {
	IsNone bool

	IsAll bool

	IsAllFungible bool

	IsAllNonFungible bool

	IsAllAbstractFungible bool
	AllAbstractFungibleID []U8

	IsAllAbstractNonFungible    bool
	AllAbstractNonFungibleClass []U8

	IsAllConcreteFungible bool
	AllConcreteFungibleID MultiLocationV1

	IsAllConcreteNonFungible    bool
	AllConcreteNonFungibleClass MultiLocationV1

	IsAbstractFungible bool
	AbstractFungibleID []U8
	AbstractFungible   U128

	IsAbstractNonFungible       bool
	AbstractNonFungibleClass    []U8
	AbstractNonFungibleInstance AssetInstance

	IsConcreteFungible     bool
	ConcreteFungibleID     MultiLocationV1
	ConcreteFungibleAmount U128

	IsConcreteNonFungible       bool
	ConcreteNonFungibleClass    MultiLocationV1
	ConcreteNonFungibleInstance AssetInstance
}

func (*MultiAssetV0) Decode

func (m *MultiAssetV0) Decode(decoder scale.Decoder) error

func (MultiAssetV0) Encode

func (m MultiAssetV0) Encode(encoder scale.Encoder) error

type MultiAssetV1

type MultiAssetV1 struct {
	ID          AssetID
	Fungibility Fungibility
}

func (*MultiAssetV1) Decode

func (m *MultiAssetV1) Decode(decoder scale.Decoder) error

func (MultiAssetV1) Encode

func (m MultiAssetV1) Encode(encoder scale.Encoder) error

type MultiAssetsV1

type MultiAssetsV1 []MultiAssetV1

type MultiLocationV0

type MultiLocationV0 struct {
	IsNull bool

	IsX1 bool
	X1   JunctionV0

	IsX2 bool
	X2   [2]JunctionV0

	IsX3 bool
	X3   [3]JunctionV0

	IsX4 bool
	X4   [4]JunctionV0

	IsX5 bool
	X5   [5]JunctionV0

	IsX6 bool
	X6   [6]JunctionV0

	IsX7 bool
	X7   [7]JunctionV0

	IsX8 bool
	X8   [8]JunctionV0
}

func (*MultiLocationV0) Decode

func (m *MultiLocationV0) Decode(decoder scale.Decoder) error

func (MultiLocationV0) Encode

func (m MultiLocationV0) Encode(encoder scale.Encoder) error

type MultiLocationV1

type MultiLocationV1 struct {
	Parents  U8
	Interior JunctionsV1
}

func (*MultiLocationV1) Decode

func (m *MultiLocationV1) Decode(decoder scale.Decoder) error

func (*MultiLocationV1) Encode

func (m *MultiLocationV1) Encode(encoder scale.Encoder) error

type MultiSignature

type MultiSignature struct {
	IsEd25519 bool           // 0:: Ed25519(Ed25519Signature)
	AsEd25519 SignatureHash  // Ed25519Signature
	IsSr25519 bool           // 1:: Sr25519(Sr25519Signature)
	AsSr25519 SignatureHash  // Sr25519Signature
	IsEcdsa   bool           // 2:: Ecdsa(EcdsaSignature)
	AsEcdsa   EcdsaSignature // EcdsaSignature
}

MultiSignature

func (*MultiSignature) Decode

func (m *MultiSignature) Decode(decoder scale.Decoder) error

func (MultiSignature) Encode

func (m MultiSignature) Encode(encoder scale.Encoder) error

type NMapTypeV13

type NMapTypeV13 struct {
	Keys    []Type
	Hashers []StorageHasherV10
	Value   Type
}

type NetworkID

type NetworkID struct {
	IsAny bool

	IsNamed      bool
	NamedNetwork []U8

	IsPolkadot bool

	IsKusama bool
}

func (*NetworkID) Decode

func (n *NetworkID) Decode(decoder scale.Decoder) error

func (NetworkID) Encode

func (n NetworkID) Encode(encoder scale.Encoder) error

type NetworkState

type NetworkState struct {
	PeerID Text
}

NetworkState contains the current state of the network

type Null

type Null byte

Null is a type that does not contain anything (apart from null)

func NewNull

func NewNull() Null

NewNull creates a new Null type

func (*Null) Decode

func (n *Null) Decode(decoder scale.Decoder) error

Decode implements decoding for Null, which does nothing

func (Null) Encode

func (n Null) Encode(encoder scale.Encoder) error

Encode implements encoding for Null, which does nothing

func (Null) String

func (n Null) String() string

String returns a string representation of the value

type Option

type Option[T any] struct {
	// contains filtered or unexported fields
}

func NewEmptyOption

func NewEmptyOption[T any]() Option[T]

func NewOption

func NewOption[T any](t T) Option[T]

func (*Option[T]) Decode

func (o *Option[T]) Decode(decoder scale.Decoder) error

func (Option[T]) Encode

func (o Option[T]) Encode(encoder scale.Encoder) error

func (*Option[T]) HasValue

func (o *Option[T]) HasValue() bool

func (*Option[T]) SetNone

func (o *Option[T]) SetNone()

SetNone removes a value and marks it as missing

func (*Option[T]) SetSome

func (o *Option[T]) SetSome(value T)

SetSome sets a value

func (*Option[T]) Unwrap

func (o *Option[T]) Unwrap() (ok bool, value T)

Unwrap returns a flag that indicates whether a value is present and the stored value

type OptionAccountID

type OptionAccountID struct {
	// contains filtered or unexported fields
}

func NewOptionAccountID

func NewOptionAccountID(value AccountID) OptionAccountID

func NewOptionAccountIDEmpty

func NewOptionAccountIDEmpty() OptionAccountID

func (*OptionAccountID) Decode

func (o *OptionAccountID) Decode(decoder scale.Decoder) error

func (OptionAccountID) Encode

func (o OptionAccountID) Encode(encoder scale.Encoder) error

func (OptionAccountID) IsNone

func (o OptionAccountID) IsNone() bool

IsNone returns true if the value is missing

func (OptionAccountID) IsSome

func (o OptionAccountID) IsSome() bool

IsSome returns true if a value is present

func (*OptionAccountID) SetNone

func (o *OptionAccountID) SetNone()

SetNone removes a value and marks it as missing

func (*OptionAccountID) SetSome

func (o *OptionAccountID) SetSome(value AccountID)

SetSome sets a value

func (*OptionAccountID) Unwrap

func (o *OptionAccountID) Unwrap() (ok bool, value AccountID)

Unwrap returns a flag that indicates whether a value is present and the stored value

type OptionBeefySignature

type OptionBeefySignature struct {
	// contains filtered or unexported fields
}

OptionBeefySignature is a structure that can store a BeefySignature or a missing value

func NewOptionBeefySignature

func NewOptionBeefySignature(value BeefySignature) OptionBeefySignature

NewOptionBeefySignature creates an OptionBeefySignature with a value

func NewOptionBeefySignatureEmpty

func NewOptionBeefySignatureEmpty() OptionBeefySignature

NewOptionBeefySignatureEmpty creates an OptionBeefySignature without a value

func (*OptionBeefySignature) Decode

func (o *OptionBeefySignature) Decode(decoder scale.Decoder) error

func (OptionBeefySignature) Encode

func (o OptionBeefySignature) Encode(encoder scale.Encoder) error

func (OptionBeefySignature) IsNone

func (o OptionBeefySignature) IsNone() bool

IsNone returns true if the value is missing

func (OptionBeefySignature) IsSome

func (o OptionBeefySignature) IsSome() bool

IsSome returns true if a value is present

func (*OptionBeefySignature) SetNone

func (o *OptionBeefySignature) SetNone()

SetNone removes a value and marks it as missing

func (*OptionBeefySignature) SetSome

func (o *OptionBeefySignature) SetSome(value BeefySignature)

SetSome sets a value

func (OptionBeefySignature) Unwrap

func (o OptionBeefySignature) Unwrap() (ok bool, value BeefySignature)

Unwrap returns a flag that indicates whether a value is present and the stored value

type OptionBool

type OptionBool struct {
	// contains filtered or unexported fields
}

OptionBool is a structure that can store a Bool or a missing value Note that encoding rules are slightly different from other "option" fields This implementation was adopted from https://github.com/Joystream/parity-codec-go/blob/develop/noreflect/codec.go

func NewOptionBool

func NewOptionBool(value Bool) OptionBool

NewOptionBool creates an OptionBool with a value

func NewOptionBoolEmpty

func NewOptionBoolEmpty() OptionBool

NewOptionBoolEmpty creates an OptionBool without a value

func (*OptionBool) Decode

func (o *OptionBool) Decode(decoder scale.Decoder) error

Decode implements decoding for OptionBool as per Rust implementation

func (OptionBool) Encode

func (o OptionBool) Encode(encoder scale.Encoder) error

Encode implements encoding for OptionBool as per Rust implementation

func (OptionBool) IsNone

func (o OptionBool) IsNone() bool

IsNone returns true if the value is missing

func (OptionBool) IsSome

func (o OptionBool) IsSome() bool

IsSome returns true if a value is present

func (*OptionBool) SetNone

func (o *OptionBool) SetNone()

SetNone removes a value and marks it as missing

func (*OptionBool) SetSome

func (o *OptionBool) SetSome(value Bool)

SetSome sets a value

func (OptionBool) Unwrap

func (o OptionBool) Unwrap() (ok bool, value Bool)

Unwrap returns a flag that indicates whether a value is present and the stored value

type OptionBytes

type OptionBytes struct {
	// contains filtered or unexported fields
}

OptionBytes is a structure that can store a Bytes or a missing value

func NewOptionBytes

func NewOptionBytes(value Bytes) OptionBytes

NewOptionBytes creates an OptionBytes with a value

func NewOptionBytesEmpty

func NewOptionBytesEmpty() OptionBytes

NewOptionBytesEmpty creates an OptionBytes without a value

func (*OptionBytes) Decode

func (o *OptionBytes) Decode(decoder scale.Decoder) error

func (OptionBytes) Encode

func (o OptionBytes) Encode(encoder scale.Encoder) error

func (OptionBytes) IsNone

func (o OptionBytes) IsNone() bool

IsNone returns true if the value is missing

func (OptionBytes) IsSome

func (o OptionBytes) IsSome() bool

IsSome returns true if a value is present

func (*OptionBytes) SetNone

func (o *OptionBytes) SetNone()

SetNone removes a value and marks it as missing

func (*OptionBytes) SetSome

func (o *OptionBytes) SetSome(value Bytes)

SetSome sets a value

func (OptionBytes) Unwrap

func (o OptionBytes) Unwrap() (ok bool, value Bytes)

Unwrap returns a flag that indicates whether a value is present and the stored value

type OptionBytes1024

type OptionBytes1024 struct {
	// contains filtered or unexported fields
}

OptionBytes1024 is a structure that can store a Bytes1024 or a missing value

func NewOptionBytes1024

func NewOptionBytes1024(value Bytes1024) OptionBytes1024

NewOptionBytes1024 creates an OptionBytes1024 with a value

func NewOptionBytes1024Empty

func NewOptionBytes1024Empty() OptionBytes1024

NewOptionBytes1024Empty creates an OptionBytes1024 without a value

func (*OptionBytes1024) Decode

func (o *OptionBytes1024) Decode(decoder scale.Decoder) error

func (OptionBytes1024) Encode

func (o OptionBytes1024) Encode(encoder scale.Encoder) error

func (OptionBytes1024) IsNone

func (o OptionBytes1024) IsNone() bool

IsNone returns true if the value is missing

func (OptionBytes1024) IsSome

func (o OptionBytes1024) IsSome() bool

IsSome returns true if a value is present

func (*OptionBytes1024) SetNone

func (o *OptionBytes1024) SetNone()

SetNone removes a value and marks it as missing

func (*OptionBytes1024) SetSome

func (o *OptionBytes1024) SetSome(value Bytes1024)

SetSome sets a value

func (OptionBytes1024) Unwrap

func (o OptionBytes1024) Unwrap() (ok bool, value Bytes1024)

Unwrap returns a flag that indicates whether a value is present and the stored value

type OptionBytes128

type OptionBytes128 struct {
	// contains filtered or unexported fields
}

OptionBytes128 is a structure that can store a Bytes128 or a missing value

func NewOptionBytes128

func NewOptionBytes128(value Bytes128) OptionBytes128

NewOptionBytes128 creates an OptionBytes128 with a value

func NewOptionBytes128Empty

func NewOptionBytes128Empty() OptionBytes128

NewOptionBytes128Empty creates an OptionBytes128 without a value

func (*OptionBytes128) Decode

func (o *OptionBytes128) Decode(decoder scale.Decoder) error

func (OptionBytes128) Encode

func (o OptionBytes128) Encode(encoder scale.Encoder) error

func (OptionBytes128) IsNone

func (o OptionBytes128) IsNone() bool

IsNone returns true if the value is missing

func (OptionBytes128) IsSome

func (o OptionBytes128) IsSome() bool

IsSome returns true if a value is present

func (*OptionBytes128) SetNone

func (o *OptionBytes128) SetNone()

SetNone removes a value and marks it as missing

func (*OptionBytes128) SetSome

func (o *OptionBytes128) SetSome(value Bytes128)

SetSome sets a value

func (OptionBytes128) Unwrap

func (o OptionBytes128) Unwrap() (ok bool, value Bytes128)

Unwrap returns a flag that indicates whether a value is present and the stored value

type OptionBytes16

type OptionBytes16 struct {
	// contains filtered or unexported fields
}

OptionBytes16 is a structure that can store a Bytes16 or a missing value

func NewOptionBytes16

func NewOptionBytes16(value Bytes16) OptionBytes16

NewOptionBytes16 creates an OptionBytes16 with a value

func NewOptionBytes16Empty

func NewOptionBytes16Empty() OptionBytes16

NewOptionBytes16Empty creates an OptionBytes16 without a value

func (*OptionBytes16) Decode

func (o *OptionBytes16) Decode(decoder scale.Decoder) error

func (OptionBytes16) Encode

func (o OptionBytes16) Encode(encoder scale.Encoder) error

func (OptionBytes16) IsNone

func (o OptionBytes16) IsNone() bool

IsNone returns true if the value is missing

func (OptionBytes16) IsSome

func (o OptionBytes16) IsSome() bool

IsSome returns true if a value is present

func (*OptionBytes16) SetNone

func (o *OptionBytes16) SetNone()

SetNone removes a value and marks it as missing

func (*OptionBytes16) SetSome

func (o *OptionBytes16) SetSome(value Bytes16)

SetSome sets a value

func (OptionBytes16) Unwrap

func (o OptionBytes16) Unwrap() (ok bool, value Bytes16)

Unwrap returns a flag that indicates whether a value is present and the stored value

type OptionBytes2048

type OptionBytes2048 struct {
	// contains filtered or unexported fields
}

OptionBytes2048 is a structure that can store a Bytes2048 or a missing value

func NewOptionBytes2048

func NewOptionBytes2048(value Bytes2048) OptionBytes2048

NewOptionBytes2048 creates an OptionBytes2048 with a value

func NewOptionBytes2048Empty

func NewOptionBytes2048Empty() OptionBytes2048

NewOptionBytes2048Empty creates an OptionBytes2048 without a value

func (*OptionBytes2048) Decode

func (o *OptionBytes2048) Decode(decoder scale.Decoder) error

func (OptionBytes2048) Encode

func (o OptionBytes2048) Encode(encoder scale.Encoder) error

func (OptionBytes2048) IsNone

func (o OptionBytes2048) IsNone() bool

IsNone returns true if the value is missing

func (OptionBytes2048) IsSome

func (o OptionBytes2048) IsSome() bool

IsSome returns true if a value is present

func (*OptionBytes2048) SetNone

func (o *OptionBytes2048) SetNone()

SetNone removes a value and marks it as missing

func (*OptionBytes2048) SetSome

func (o *OptionBytes2048) SetSome(value Bytes2048)

SetSome sets a value

func (OptionBytes2048) Unwrap

func (o OptionBytes2048) Unwrap() (ok bool, value Bytes2048)

Unwrap returns a flag that indicates whether a value is present and the stored value

type OptionBytes256

type OptionBytes256 struct {
	// contains filtered or unexported fields
}

OptionBytes256 is a structure that can store a Bytes256 or a missing value

func NewOptionBytes256

func NewOptionBytes256(value Bytes256) OptionBytes256

NewOptionBytes256 creates an OptionBytes256 with a value

func NewOptionBytes256Empty

func NewOptionBytes256Empty() OptionBytes256

NewOptionBytes256Empty creates an OptionBytes256 without a value

func (*OptionBytes256) Decode

func (o *OptionBytes256) Decode(decoder scale.Decoder) error

func (OptionBytes256) Encode

func (o OptionBytes256) Encode(encoder scale.Encoder) error

func (OptionBytes256) IsNone

func (o OptionBytes256) IsNone() bool

IsNone returns true if the value is missing

func (OptionBytes256) IsSome

func (o OptionBytes256) IsSome() bool

IsSome returns true if a value is present

func (*OptionBytes256) SetNone

func (o *OptionBytes256) SetNone()

SetNone removes a value and marks it as missing

func (*OptionBytes256) SetSome

func (o *OptionBytes256) SetSome(value Bytes256)

SetSome sets a value

func (OptionBytes256) Unwrap

func (o OptionBytes256) Unwrap() (ok bool, value Bytes256)

Unwrap returns a flag that indicates whether a value is present and the stored value

type OptionBytes32

type OptionBytes32 struct {
	// contains filtered or unexported fields
}

OptionBytes32 is a structure that can store a Bytes32 or a missing value

func NewOptionBytes32

func NewOptionBytes32(value Bytes32) OptionBytes32

NewOptionBytes32 creates an OptionBytes32 with a value

func NewOptionBytes32Empty

func NewOptionBytes32Empty() OptionBytes32

NewOptionBytes32Empty creates an OptionBytes32 without a value

func (*OptionBytes32) Decode

func (o *OptionBytes32) Decode(decoder scale.Decoder) error

func (OptionBytes32) Encode

func (o OptionBytes32) Encode(encoder scale.Encoder) error

func (OptionBytes32) IsNone

func (o OptionBytes32) IsNone() bool

IsNone returns true if the value is missing

func (OptionBytes32) IsSome

func (o OptionBytes32) IsSome() bool

IsSome returns true if a value is present

func (*OptionBytes32) SetNone

func (o *OptionBytes32) SetNone()

SetNone removes a value and marks it as missing

func (*OptionBytes32) SetSome

func (o *OptionBytes32) SetSome(value Bytes32)

SetSome sets a value

func (OptionBytes32) Unwrap

func (o OptionBytes32) Unwrap() (ok bool, value Bytes32)

Unwrap returns a flag that indicates whether a value is present and the stored value

type OptionBytes512

type OptionBytes512 struct {
	// contains filtered or unexported fields
}

OptionBytes512 is a structure that can store a Bytes512 or a missing value

func NewOptionBytes512

func NewOptionBytes512(value Bytes512) OptionBytes512

NewOptionBytes512 creates an OptionBytes512 with a value

func NewOptionBytes512Empty

func NewOptionBytes512Empty() OptionBytes512

NewOptionBytes512Empty creates an OptionBytes512 without a value

func (*OptionBytes512) Decode

func (o *OptionBytes512) Decode(decoder scale.Decoder) error

func (OptionBytes512) Encode

func (o OptionBytes512) Encode(encoder scale.Encoder) error

func (OptionBytes512) IsNone

func (o OptionBytes512) IsNone() bool

IsNone returns true if the value is missing

func (OptionBytes512) IsSome

func (o OptionBytes512) IsSome() bool

IsSome returns true if a value is present

func (*OptionBytes512) SetNone

func (o *OptionBytes512) SetNone()

SetNone removes a value and marks it as missing

func (*OptionBytes512) SetSome

func (o *OptionBytes512) SetSome(value Bytes512)

SetSome sets a value

func (OptionBytes512) Unwrap

func (o OptionBytes512) Unwrap() (ok bool, value Bytes512)

Unwrap returns a flag that indicates whether a value is present and the stored value

type OptionBytes64

type OptionBytes64 struct {
	// contains filtered or unexported fields
}

OptionBytes64 is a structure that can store a Bytes64 or a missing value

func NewOptionBytes64

func NewOptionBytes64(value Bytes64) OptionBytes64

NewOptionBytes64 creates an OptionBytes64 with a value

func NewOptionBytes64Empty

func NewOptionBytes64Empty() OptionBytes64

NewOptionBytes64Empty creates an OptionBytes64 without a value

func (*OptionBytes64) Decode

func (o *OptionBytes64) Decode(decoder scale.Decoder) error

func (OptionBytes64) Encode

func (o OptionBytes64) Encode(encoder scale.Encoder) error

func (OptionBytes64) IsNone

func (o OptionBytes64) IsNone() bool

IsNone returns true if the value is missing

func (OptionBytes64) IsSome

func (o OptionBytes64) IsSome() bool

IsSome returns true if a value is present

func (*OptionBytes64) SetNone

func (o *OptionBytes64) SetNone()

SetNone removes a value and marks it as missing

func (*OptionBytes64) SetSome

func (o *OptionBytes64) SetSome(value Bytes64)

SetSome sets a value

func (OptionBytes64) Unwrap

func (o OptionBytes64) Unwrap() (ok bool, value Bytes64)

Unwrap returns a flag that indicates whether a value is present and the stored value

type OptionBytes8

type OptionBytes8 struct {
	// contains filtered or unexported fields
}

OptionBytes8 is a structure that can store a Bytes8 or a missing value

func NewOptionBytes8

func NewOptionBytes8(value Bytes8) OptionBytes8

NewOptionBytes8 creates an OptionBytes8 with a value

func NewOptionBytes8Empty

func NewOptionBytes8Empty() OptionBytes8

NewOptionBytes8Empty creates an OptionBytes8 without a value

func (*OptionBytes8) Decode

func (o *OptionBytes8) Decode(decoder scale.Decoder) error

func (OptionBytes8) Encode

func (o OptionBytes8) Encode(encoder scale.Encoder) error

func (OptionBytes8) IsNone

func (o OptionBytes8) IsNone() bool

IsNone returns true if the value is missing

func (OptionBytes8) IsSome

func (o OptionBytes8) IsSome() bool

IsSome returns true if a value is present

func (*OptionBytes8) SetNone

func (o *OptionBytes8) SetNone()

SetNone removes a value and marks it as missing

func (*OptionBytes8) SetSome

func (o *OptionBytes8) SetSome(value Bytes8)

SetSome sets a value

func (OptionBytes8) Unwrap

func (o OptionBytes8) Unwrap() (ok bool, value Bytes8)

Unwrap returns a flag that indicates whether a value is present and the stored value

type OptionElectionCompute

type OptionElectionCompute struct {
	// contains filtered or unexported fields
}

func NewOptionElectionCompute

func NewOptionElectionCompute(value ElectionCompute) OptionElectionCompute

func NewOptionElectionComputeEmpty

func NewOptionElectionComputeEmpty() OptionElectionCompute

func (*OptionElectionCompute) Decode

func (o *OptionElectionCompute) Decode(decoder scale.Decoder) error

func (OptionElectionCompute) Encode

func (o OptionElectionCompute) Encode(encoder scale.Encoder) error

func (OptionElectionCompute) IsNone

func (o OptionElectionCompute) IsNone() bool

IsNone returns true if the value is missing

func (OptionElectionCompute) IsSome

func (o OptionElectionCompute) IsSome() bool

IsSome returns true if a value is present

func (*OptionElectionCompute) SetNone

func (o *OptionElectionCompute) SetNone()

SetNone removes a value and marks it as missing

func (*OptionElectionCompute) SetSome

func (o *OptionElectionCompute) SetSome(value ElectionCompute)

SetSome sets a value

func (*OptionElectionCompute) Unwrap

func (o *OptionElectionCompute) Unwrap() (ok bool, value ElectionCompute)

Unwrap returns a flag that indicates whether a value is present and the stored value

type OptionExecutionResult

type OptionExecutionResult struct {
	// contains filtered or unexported fields
}

func NewOptionExecutionResult

func NewOptionExecutionResult(value ExecutionResult) OptionExecutionResult

func NewOptionExecutionResultEmpty

func NewOptionExecutionResultEmpty() OptionExecutionResult

func (*OptionExecutionResult) Decode

func (o *OptionExecutionResult) Decode(decoder scale.Decoder) error

func (OptionExecutionResult) Encode

func (o OptionExecutionResult) Encode(encoder scale.Encoder) error

func (OptionExecutionResult) IsNone

func (o OptionExecutionResult) IsNone() bool

IsNone returns true if the value is missing

func (OptionExecutionResult) IsSome

func (o OptionExecutionResult) IsSome() bool

IsSome returns true if a value is present

func (*OptionExecutionResult) SetNone

func (o *OptionExecutionResult) SetNone()

SetNone removes a value and marks it as missing

func (*OptionExecutionResult) SetSome

func (o *OptionExecutionResult) SetSome(value ExecutionResult)

SetSome sets a value

func (*OptionExecutionResult) Unwrap

func (o *OptionExecutionResult) Unwrap() (ok bool, value ExecutionResult)

Unwrap returns a flag that indicates whether a value is present and the stored value

type OptionH160

type OptionH160 struct {
	// contains filtered or unexported fields
}

OptionH160 is a structure that can store a H160 or a missing value

func NewOptionH160

func NewOptionH160(value H160) OptionH160

NewOptionH160 creates an OptionH160 with a value

func NewOptionH160Empty

func NewOptionH160Empty() OptionH160

NewOptionH160Empty creates an OptionH160 without a value

func (*OptionH160) Decode

func (o *OptionH160) Decode(decoder scale.Decoder) error

func (OptionH160) Encode

func (o OptionH160) Encode(encoder scale.Encoder) error

func (OptionH160) IsNone

func (o OptionH160) IsNone() bool

IsNone returns true if the value is missing

func (OptionH160) IsSome

func (o OptionH160) IsSome() bool

IsSome returns true if a value is present

func (*OptionH160) SetNone

func (o *OptionH160) SetNone()

SetNone removes a value and marks it as missing

func (*OptionH160) SetSome

func (o *OptionH160) SetSome(value H160)

SetSome sets a value

func (OptionH160) Unwrap

func (o OptionH160) Unwrap() (ok bool, value H160)

Unwrap returns a flag that indicates whether a value is present and the stored value

type OptionH256

type OptionH256 struct {
	// contains filtered or unexported fields
}

OptionH256 is a structure that can store a H256 or a missing value

func NewOptionH256

func NewOptionH256(value H256) OptionH256

NewOptionH256 creates an OptionH256 with a value

func NewOptionH256Empty

func NewOptionH256Empty() OptionH256

NewOptionH256Empty creates an OptionH256 without a value

func (*OptionH256) Decode

func (o *OptionH256) Decode(decoder scale.Decoder) error

func (OptionH256) Encode

func (o OptionH256) Encode(encoder scale.Encoder) error

func (OptionH256) IsNone

func (o OptionH256) IsNone() bool

IsNone returns true if the value is missing

func (OptionH256) IsSome

func (o OptionH256) IsSome() bool

IsSome returns true if a value is present

func (*OptionH256) SetNone

func (o *OptionH256) SetNone()

SetNone removes a value and marks it as missing

func (*OptionH256) SetSome

func (o *OptionH256) SetSome(value H256)

SetSome sets a value

func (OptionH256) Unwrap

func (o OptionH256) Unwrap() (ok bool, value H256)

Unwrap returns a flag that indicates whether a value is present and the stored value

type OptionH512

type OptionH512 struct {
	// contains filtered or unexported fields
}

OptionH512 is a structure that can store a H512 or a missing value

func NewOptionH512

func NewOptionH512(value H512) OptionH512

NewOptionH512 creates an OptionH512 with a value

func NewOptionH512Empty

func NewOptionH512Empty() OptionH512

NewOptionH512Empty creates an OptionH512 without a value

func (*OptionH512) Decode

func (o *OptionH512) Decode(decoder scale.Decoder) error

func (OptionH512) Encode

func (o OptionH512) Encode(encoder scale.Encoder) error

func (OptionH512) IsNone

func (o OptionH512) IsNone() bool

IsNone returns true if the value is missing

func (OptionH512) IsSome

func (o OptionH512) IsSome() bool

IsSome returns true if a value is present

func (*OptionH512) SetNone

func (o *OptionH512) SetNone()

SetNone removes a value and marks it as missing

func (*OptionH512) SetSome

func (o *OptionH512) SetSome(value H512)

SetSome sets a value

func (OptionH512) Unwrap

func (o OptionH512) Unwrap() (ok bool, value H512)

Unwrap returns a flag that indicates whether a value is present and the stored value

type OptionHash

type OptionHash struct {
	// contains filtered or unexported fields
}

OptionHash is a structure that can store a Hash or a missing value

func NewOptionHash

func NewOptionHash(value Hash) OptionHash

NewOptionHash creates an OptionHash with a value

func NewOptionHashEmpty

func NewOptionHashEmpty() OptionHash

NewOptionHashEmpty creates an OptionHash without a value

func (*OptionHash) Decode

func (o *OptionHash) Decode(decoder scale.Decoder) error

func (OptionHash) Encode

func (o OptionHash) Encode(encoder scale.Encoder) error

func (OptionHash) IsNone

func (o OptionHash) IsNone() bool

IsNone returns true if the value is missing

func (OptionHash) IsSome

func (o OptionHash) IsSome() bool

IsSome returns true if a value is present

func (*OptionHash) SetNone

func (o *OptionHash) SetNone()

SetNone removes a value and marks it as missing

func (*OptionHash) SetSome

func (o *OptionHash) SetSome(value Hash)

SetSome sets a value

func (OptionHash) Unwrap

func (o OptionHash) Unwrap() (ok bool, value Hash)

Unwrap returns a flag that indicates whether a value is present and the stored value

type OptionI16

type OptionI16 struct {
	// contains filtered or unexported fields
}

OptionI16 is a structure that can store a I16 or a missing value

func NewOptionI16

func NewOptionI16(value I16) OptionI16

NewOptionI16 creates an OptionI16 with a value

func NewOptionI16Empty

func NewOptionI16Empty() OptionI16

NewOptionI16Empty creates an OptionI16 without a value

func (*OptionI16) Decode

func (o *OptionI16) Decode(decoder scale.Decoder) error

func (OptionI16) Encode

func (o OptionI16) Encode(encoder scale.Encoder) error

func (OptionI16) IsNone

func (o OptionI16) IsNone() bool

IsNone returns true if the value is missing

func (OptionI16) IsSome

func (o OptionI16) IsSome() bool

IsSome returns true if a value is present

func (*OptionI16) SetNone

func (o *OptionI16) SetNone()

SetNone removes a value and marks it as missing

func (*OptionI16) SetSome

func (o *OptionI16) SetSome(value I16)

SetSome sets a value

func (OptionI16) Unwrap

func (o OptionI16) Unwrap() (ok bool, value I16)

Unwrap returns a flag that indicates whether a value is present and the stored value

type OptionI32

type OptionI32 struct {
	// contains filtered or unexported fields
}

OptionI32 is a structure that can store a I32 or a missing value

func NewOptionI32

func NewOptionI32(value I32) OptionI32

NewOptionI32 creates an OptionI32 with a value

func NewOptionI32Empty

func NewOptionI32Empty() OptionI32

NewOptionI32Empty creates an OptionI32 without a value

func (*OptionI32) Decode

func (o *OptionI32) Decode(decoder scale.Decoder) error

func (OptionI32) Encode

func (o OptionI32) Encode(encoder scale.Encoder) error

func (OptionI32) IsNone

func (o OptionI32) IsNone() bool

IsNone returns true if the value is missing

func (OptionI32) IsSome

func (o OptionI32) IsSome() bool

IsSome returns true if a value is present

func (*OptionI32) SetNone

func (o *OptionI32) SetNone()

SetNone removes a value and marks it as missing

func (*OptionI32) SetSome

func (o *OptionI32) SetSome(value I32)

SetSome sets a value

func (OptionI32) Unwrap

func (o OptionI32) Unwrap() (ok bool, value I32)

Unwrap returns a flag that indicates whether a value is present and the stored value

type OptionI64

type OptionI64 struct {
	// contains filtered or unexported fields
}

OptionI64 is a structure that can store a I64 or a missing value

func NewOptionI64

func NewOptionI64(value I64) OptionI64

NewOptionI64 creates an OptionI64 with a value

func NewOptionI64Empty

func NewOptionI64Empty() OptionI64

NewOptionI64Empty creates an OptionI64 without a value

func (*OptionI64) Decode

func (o *OptionI64) Decode(decoder scale.Decoder) error

func (OptionI64) Encode

func (o OptionI64) Encode(encoder scale.Encoder) error

func (OptionI64) IsNone

func (o OptionI64) IsNone() bool

IsNone returns true if the value is missing

func (OptionI64) IsSome

func (o OptionI64) IsSome() bool

IsSome returns true if a value is present

func (*OptionI64) SetNone

func (o *OptionI64) SetNone()

SetNone removes a value and marks it as missing

func (*OptionI64) SetSome

func (o *OptionI64) SetSome(value I64)

SetSome sets a value

func (OptionI64) Unwrap

func (o OptionI64) Unwrap() (ok bool, value I64)

Unwrap returns a flag that indicates whether a value is present and the stored value

type OptionI8

type OptionI8 struct {
	// contains filtered or unexported fields
}

OptionI8 is a structure that can store a I8 or a missing value

func NewOptionI8

func NewOptionI8(value I8) OptionI8

NewOptionI8 creates an OptionI8 with a value

func NewOptionI8Empty

func NewOptionI8Empty() OptionI8

NewOptionI8Empty creates an OptionI8 without a value

func (*OptionI8) Decode

func (o *OptionI8) Decode(decoder scale.Decoder) error

func (OptionI8) Encode

func (o OptionI8) Encode(encoder scale.Encoder) error

func (OptionI8) IsNone

func (o OptionI8) IsNone() bool

IsNone returns true if the value is missing

func (OptionI8) IsSome

func (o OptionI8) IsSome() bool

IsSome returns true if a value is present

func (*OptionI8) SetNone

func (o *OptionI8) SetNone()

SetNone removes a value and marks it as missing

func (*OptionI8) SetSome

func (o *OptionI8) SetSome(value I8)

SetSome sets a value

func (OptionI8) Unwrap

func (o OptionI8) Unwrap() (ok bool, value I8)

Unwrap returns a flag that indicates whether a value is present and the stored value

type OptionMultiLocationV1

type OptionMultiLocationV1 struct {
	// contains filtered or unexported fields
}

func NewOptionMultiLocationV1

func NewOptionMultiLocationV1(value MultiLocationV1) OptionMultiLocationV1

func NewOptionMultiLocationV1Empty

func NewOptionMultiLocationV1Empty() OptionMultiLocationV1

func (*OptionMultiLocationV1) Decode

func (o *OptionMultiLocationV1) Decode(decoder scale.Decoder) error

func (OptionMultiLocationV1) Encode

func (o OptionMultiLocationV1) Encode(encoder scale.Encoder) error

func (OptionMultiLocationV1) IsNone

func (o OptionMultiLocationV1) IsNone() bool

IsNone returns true if the value is missing

func (OptionMultiLocationV1) IsSome

func (o OptionMultiLocationV1) IsSome() bool

IsSome returns true if a value is present

func (*OptionMultiLocationV1) SetNone

func (o *OptionMultiLocationV1) SetNone()

SetNone removes a value and marks it as missing

func (*OptionMultiLocationV1) SetSome

func (o *OptionMultiLocationV1) SetSome(value MultiLocationV1)

SetSome sets a value

func (*OptionMultiLocationV1) Unwrap

func (o *OptionMultiLocationV1) Unwrap() (ok bool, value MultiLocationV1)

Unwrap returns a flag that indicates whether a value is present and the stored value

type OptionU128

type OptionU128 struct {
	// contains filtered or unexported fields
}

OptionU128 is a structure that can store a U128 or a missing value

func NewOptionU128

func NewOptionU128(value U128) OptionU128

NewOptionU128 creates an OptionU128 with a value

func NewOptionU128Empty

func NewOptionU128Empty() OptionU128

NewOptionU128Empty creates an OptionU128 without a value

func (*OptionU128) Decode

func (o *OptionU128) Decode(decoder scale.Decoder) error

func (OptionU128) Encode

func (o OptionU128) Encode(encoder scale.Encoder) error

func (OptionU128) IsNone

func (o OptionU128) IsNone() bool

IsNone returns true if the value is missing

func (OptionU128) IsSome

func (o OptionU128) IsSome() bool

IsSome returns true if a value is present

func (*OptionU128) SetNone

func (o *OptionU128) SetNone()

SetNone removes a value and marks it as missing

func (*OptionU128) SetSome

func (o *OptionU128) SetSome(value U128)

SetSome sets a value

func (OptionU128) Unwrap

func (o OptionU128) Unwrap() (ok bool, value U128)

Unwrap returns a flag that indicates whether a value is present and the stored value

type OptionU16

type OptionU16 struct {
	// contains filtered or unexported fields
}

OptionU16 is a structure that can store a U16 or a missing value

func NewOptionU16

func NewOptionU16(value U16) OptionU16

NewOptionU16 creates an OptionU16 with a value

func NewOptionU16Empty

func NewOptionU16Empty() OptionU16

NewOptionU16Empty creates an OptionU16 without a value

func (*OptionU16) Decode

func (o *OptionU16) Decode(decoder scale.Decoder) error

func (OptionU16) Encode

func (o OptionU16) Encode(encoder scale.Encoder) error

func (OptionU16) IsNone

func (o OptionU16) IsNone() bool

IsNone returns true if the value is missing

func (OptionU16) IsSome

func (o OptionU16) IsSome() bool

IsSome returns true if a value is present

func (*OptionU16) SetNone

func (o *OptionU16) SetNone()

SetNone removes a value and marks it as missing

func (*OptionU16) SetSome

func (o *OptionU16) SetSome(value U16)

SetSome sets a value

func (OptionU16) Unwrap

func (o OptionU16) Unwrap() (ok bool, value U16)

Unwrap returns a flag that indicates whether a value is present and the stored value

type OptionU32

type OptionU32 struct {
	// contains filtered or unexported fields
}

OptionU32 is a structure that can store a U32 or a missing value

func NewOptionU32

func NewOptionU32(value U32) OptionU32

NewOptionU32 creates an OptionU32 with a value

func NewOptionU32Empty

func NewOptionU32Empty() OptionU32

NewOptionU32Empty creates an OptionU32 without a value

func (*OptionU32) Decode

func (o *OptionU32) Decode(decoder scale.Decoder) error

func (OptionU32) Encode

func (o OptionU32) Encode(encoder scale.Encoder) error

func (OptionU32) IsNone

func (o OptionU32) IsNone() bool

IsNone returns true if the value is missing

func (OptionU32) IsSome

func (o OptionU32) IsSome() bool

IsSome returns true if a value is present

func (*OptionU32) SetNone

func (o *OptionU32) SetNone()

SetNone removes a value and marks it as missing

func (*OptionU32) SetSome

func (o *OptionU32) SetSome(value U32)

SetSome sets a value

func (OptionU32) Unwrap

func (o OptionU32) Unwrap() (ok bool, value U32)

Unwrap returns a flag that indicates whether a value is present and the stored value

type OptionU64

type OptionU64 struct {
	// contains filtered or unexported fields
}

OptionU64 is a structure that can store a U64 or a missing value

func NewOptionU64

func NewOptionU64(value U64) OptionU64

NewOptionU64 creates an OptionU64 with a value

func NewOptionU64Empty

func NewOptionU64Empty() OptionU64

NewOptionU64Empty creates an OptionU64 without a value

func (*OptionU64) Decode

func (o *OptionU64) Decode(decoder scale.Decoder) error

func (OptionU64) Encode

func (o OptionU64) Encode(encoder scale.Encoder) error

func (OptionU64) IsNone

func (o OptionU64) IsNone() bool

IsNone returns true if the value is missing

func (OptionU64) IsSome

func (o OptionU64) IsSome() bool

IsSome returns true if a value is present

func (*OptionU64) SetNone

func (o *OptionU64) SetNone()

SetNone removes a value and marks it as missing

func (*OptionU64) SetSome

func (o *OptionU64) SetSome(value U64)

SetSome sets a value

func (OptionU64) Unwrap

func (o OptionU64) Unwrap() (ok bool, value U64)

Unwrap returns a flag that indicates whether a value is present and the stored value

type OptionU8

type OptionU8 struct {
	// contains filtered or unexported fields
}

OptionU8 is a structure that can store a U8 or a missing value

func NewOptionU8

func NewOptionU8(value U8) OptionU8

NewOptionU8 creates an OptionU8 with a value

func NewOptionU8Empty

func NewOptionU8Empty() OptionU8

NewOptionU8Empty creates an OptionU8 without a value

func (*OptionU8) Decode

func (o *OptionU8) Decode(decoder scale.Decoder) error

func (OptionU8) Encode

func (o OptionU8) Encode(encoder scale.Encoder) error

func (OptionU8) IsNone

func (o OptionU8) IsNone() bool

IsNone returns true if the value is missing

func (OptionU8) IsSome

func (o OptionU8) IsSome() bool

IsSome returns true if a value is present

func (*OptionU8) SetNone

func (o *OptionU8) SetNone()

SetNone removes a value and marks it as missing

func (*OptionU8) SetSome

func (o *OptionU8) SetSome(value U8)

SetSome sets a value

func (OptionU8) Unwrap

func (o OptionU8) Unwrap() (ok bool, value U8)

Unwrap returns a flag that indicates whether a value is present and the stored value

type OptionalSignedCommitment

type OptionalSignedCommitment struct {
	// contains filtered or unexported fields
}

func (*OptionalSignedCommitment) Decode

func (o *OptionalSignedCommitment) Decode(decoder scale.Decoder) error

func (OptionalSignedCommitment) Encode

func (o OptionalSignedCommitment) Encode(encoder scale.Encoder) error

func (OptionalSignedCommitment) IsNone

func (o OptionalSignedCommitment) IsNone() bool

IsNone returns true if the value is missing

func (OptionalSignedCommitment) IsSome

func (o OptionalSignedCommitment) IsSome() bool

IsSome returns true if a value is present

func (*OptionalSignedCommitment) SetNone

func (o *OptionalSignedCommitment) SetNone()

func (*OptionalSignedCommitment) SetSome

func (o *OptionalSignedCommitment) SetSome(value SignedCommitment)

func (OptionalSignedCommitment) Unwrap

func (o OptionalSignedCommitment) Unwrap() (ok bool, value SignedCommitment)

type Origin

type Origin byte

Origin is an internal-only value that will be ignored when encoding/decoding

func (*Origin) Decode

func (n *Origin) Decode(decoder scale.Decoder) error

Decode implements decoding for Origin, which does nothing

func (Origin) Encode

func (n Origin) Encode(encoder scale.Encoder) error

Encode implements encoding for Origin, which does nothing

func (Origin) String

func (n Origin) String() string

String returns a string representation of the value

type OriginKind

type OriginKind struct {
	IsNative bool

	IsSovereignAccount bool

	IsSuperuser bool

	IsXcm bool
}

func (*OriginKind) Decode

func (o *OriginKind) Decode(decoder scale.Decoder) error

func (OriginKind) Encode

func (o OriginKind) Encode(encoder scale.Encoder) error

type Outcome

type Outcome struct {
	IsComplete     bool
	CompleteWeight Weight

	IsIncomplete     bool
	IncompleteWeight Weight
	IncompleteError  XCMError

	IsError bool
	Error   XCMError
}

func (*Outcome) Decode

func (o *Outcome) Decode(decoder scale.Decoder) error

func (Outcome) Encode

func (o Outcome) Encode(encoder scale.Encoder) error

type PalletMetadataV14

type PalletMetadataV14 struct {
	Name       Text
	HasStorage bool
	Storage    StorageMetadataV14
	HasCalls   bool
	Calls      FunctionMetadataV14
	HasEvents  bool
	Events     EventMetadataV14
	Constants  []ConstantMetadataV14
	HasErrors  bool
	Errors     ErrorMetadataV14
	Index      U8
}

func (*PalletMetadataV14) Decode

func (m *PalletMetadataV14) Decode(decoder scale.Decoder) error

func (PalletMetadataV14) Encode

func (m PalletMetadataV14) Encode(encoder scale.Encoder) error

func (*PalletMetadataV14) FindConstantValue

func (m *PalletMetadataV14) FindConstantValue(constant Text) ([]byte, error)

type ParachainID

type ParachainID U32

type ParentNumberAndHash

type ParentNumberAndHash struct {
	ParentNumber U32
	Hash         Hash
}

type PayloadItem

type PayloadItem struct {
	ID   [2]byte
	Data []byte
}

PayloadItem ...

type Pays

type Pays struct {
	IsYes bool
	IsNo  bool
}

func (*Pays) Decode

func (p *Pays) Decode(decoder scale.Decoder) error

func (Pays) Encode

func (p Pays) Encode(encoder scale.Encoder) error

type PeerInfo

type PeerInfo struct {
	PeerID          Text
	Roles           Text
	ProtocolVersion U32
	BestHash        Hash
	BestNumber      U32
}

PeerInfo contains information about a connected peer

type PermissionedCurrency

type PermissionedCurrency struct {
}

func (*PermissionedCurrency) Decode

func (p *PermissionedCurrency) Decode(_ scale.Decoder) error

func (*PermissionedCurrency) Encode

func (p *PermissionedCurrency) Encode(_ scale.Encoder) error

type Phase

type Phase struct {
	IsApplyExtrinsic bool
	AsApplyExtrinsic uint32
	IsFinalization   bool
	IsInitialization bool
}

Phase is an enum describing the current phase of the event (applying the extrinsic or finalized)

func (*Phase) Decode

func (p *Phase) Decode(decoder scale.Decoder) error

func (Phase) Encode

func (p Phase) Encode(encoder scale.Encoder) error

type PortableRegistryV14

type PortableRegistryV14 struct {
	Types []PortableTypeV14
}

type PortableTypeV14

type PortableTypeV14 struct {
	ID   Si1LookupTypeID
	Type Si1Type
}

type PostDispatchInfo

type PostDispatchInfo struct {
	ActualWeight Option[Weight]
	PaysFee      Pays
}

PostDispatchInfo is used in DispatchResultWithPostInfo. Weight information that is only available post dispatch.

func (*PostDispatchInfo) Decode

func (p *PostDispatchInfo) Decode(decoder scale.Decoder) error

func (PostDispatchInfo) Encode

func (p PostDispatchInfo) Encode(encoder scale.Encoder) error

type PreRuntime

type PreRuntime struct {
	ConsensusEngineID ConsensusEngineID
	Bytes             Bytes
}

type Price

type Price struct {
	CurrencyID CurrencyID
	Amount     U128
}

func (*Price) Decode

func (p *Price) Decode(decoder scale.Decoder) error

func (Price) Encode

func (p Price) Encode(encoder scale.Encoder) error

type ProxyDefinition

type ProxyDefinition struct {
	Delegate  AccountID
	ProxyType U8
	Delay     U32
}

func (*ProxyDefinition) Decode

func (p *ProxyDefinition) Decode(decoder scale.Decoder) error

func (ProxyDefinition) Encode

func (p ProxyDefinition) Encode(encoder scale.Encoder) error

type ProxyStorageEntry

type ProxyStorageEntry struct {
	ProxyDefinitions []ProxyDefinition
	Balance          U128
}

func (*ProxyStorageEntry) Decode

func (p *ProxyStorageEntry) Decode(decoder scale.Decoder) error

func (ProxyStorageEntry) Encode

func (p ProxyStorageEntry) Encode(encoder scale.Encoder) error

type Response

type Response struct {
	IsNull bool

	IsAssets    bool
	MultiAssets MultiAssetsV1

	IsExecutionResult bool
	ExecutionResult   ExecutionResult

	IsVersion bool
	Version   U32
}

func (*Response) Decode

func (r *Response) Decode(decoder scale.Decoder) error

func (Response) Encode

func (r Response) Encode(encoder scale.Encoder) error

type RuntimeVersion

type RuntimeVersion struct {
	APIs               []RuntimeVersionAPI `json:"apis"`
	AuthoringVersion   U32                 `json:"authoringVersion"`
	ImplName           string              `json:"implName"`
	ImplVersion        U32                 `json:"implVersion"`
	SpecName           string              `json:"specName"`
	SpecVersion        U32                 `json:"specVersion"`
	TransactionVersion U32                 `json:"transactionVersion"`
}

func NewRuntimeVersion

func NewRuntimeVersion() *RuntimeVersion

func (*RuntimeVersion) Decode

func (r *RuntimeVersion) Decode(decoder scale.Decoder) error

func (RuntimeVersion) Encode

func (r RuntimeVersion) Encode(encoder scale.Encoder) error

type RuntimeVersionAPI

type RuntimeVersionAPI struct {
	APIID   string
	Version U32
}

func (*RuntimeVersionAPI) Decode

func (r *RuntimeVersionAPI) Decode(decoder scale.Decoder) error

func (RuntimeVersionAPI) Encode

func (r RuntimeVersionAPI) Encode(encoder scale.Encoder) error

func (RuntimeVersionAPI) MarshalJSON

func (r RuntimeVersionAPI) MarshalJSON() ([]byte, error)

func (*RuntimeVersionAPI) UnmarshalJSON

func (r *RuntimeVersionAPI) UnmarshalJSON(b []byte) error

type Sale

type Sale struct {
	Seller AccountID
	Price  Price
}

func (*Sale) Decode

func (s *Sale) Decode(decoder scale.Decoder) error

func (Sale) Encode

func (s Sale) Encode(encoder scale.Encoder) error

type SchedulerLookupError

type SchedulerLookupError byte

func (*SchedulerLookupError) Decode

func (sle *SchedulerLookupError) Decode(decoder scale.Decoder) error

func (SchedulerLookupError) Encode

func (sle SchedulerLookupError) Encode(encoder scale.Encoder) error

type Seal

type Seal struct {
	ConsensusEngineID ConsensusEngineID
	Bytes             Bytes
}

type SerDeOptions

type SerDeOptions struct {
	// NoPalletIndices enable this to work with substrate chains that do not have indices pallet in runtime
	NoPalletIndices bool
}

SerDeOptions are serialise and deserialize options for types

func SerDeOptionsFromMetadata

func SerDeOptionsFromMetadata(meta *Metadata) SerDeOptions

SerDeOptionsFromMetadata returns Serialise and deserialize options from metadata

type Si0LookupTypeID

type Si0LookupTypeID UCompact

type Si0Path

type Si0Path []Text

type Si0TypeDefPrimitive

type Si0TypeDefPrimitive byte

`byte` can only be one of the variants listed below

func (*Si0TypeDefPrimitive) Decode

func (d *Si0TypeDefPrimitive) Decode(decoder scale.Decoder) error

type Si1Field

type Si1Field struct {
	HasName     bool
	Name        Text
	Type        Si1LookupTypeID
	HasTypeName bool
	TypeName    Text
	Docs        []Text
}

func (*Si1Field) Decode

func (d *Si1Field) Decode(decoder scale.Decoder) error

func (Si1Field) Encode

func (d Si1Field) Encode(encoder scale.Encoder) error

type Si1LookupTypeID

type Si1LookupTypeID struct {
	UCompact
}

func NewSi1LookupTypeID

func NewSi1LookupTypeID(value *big.Int) Si1LookupTypeID

func NewSi1LookupTypeIDFromUInt

func NewSi1LookupTypeIDFromUInt(value uint64) Si1LookupTypeID

type Si1Path

type Si1Path Si0Path

type Si1Type

type Si1Type struct {
	Path   Si1Path
	Params []Si1TypeParameter
	Def    Si1TypeDef
	Docs   []Text
}

type Si1TypeDef

type Si1TypeDef struct {
	IsComposite bool
	Composite   Si1TypeDefComposite

	IsVariant bool
	Variant   Si1TypeDefVariant

	IsSequence bool
	Sequence   Si1TypeDefSequence

	IsArray bool
	Array   Si1TypeDefArray

	IsTuple bool
	Tuple   Si1TypeDefTuple

	IsPrimitive bool
	Primitive   Si1TypeDefPrimitive

	IsCompact bool
	Compact   Si1TypeDefCompact

	IsBitSequence bool
	BitSequence   Si1TypeDefBitSequence

	IsHistoricMetaCompat bool
	HistoricMetaCompat   Type
}

func (*Si1TypeDef) Decode

func (d *Si1TypeDef) Decode(decoder scale.Decoder) error

func (Si1TypeDef) Encode

func (d Si1TypeDef) Encode(encoder scale.Encoder) error

type Si1TypeDefArray

type Si1TypeDefArray struct {
	Len  U32
	Type Si1LookupTypeID
}

type Si1TypeDefBitSequence

type Si1TypeDefBitSequence struct {
	BitStoreType Si1LookupTypeID
	BitOrderType Si1LookupTypeID
}

type Si1TypeDefCompact

type Si1TypeDefCompact struct {
	Type Si1LookupTypeID
}

type Si1TypeDefComposite

type Si1TypeDefComposite struct {
	Fields []Si1Field
}

type Si1TypeDefPrimitive

type Si1TypeDefPrimitive struct {
	Si0TypeDefPrimitive
}

type Si1TypeDefSequence

type Si1TypeDefSequence struct {
	Type Si1LookupTypeID
}

type Si1TypeDefTuple

type Si1TypeDefTuple []Si1LookupTypeID

type Si1TypeDefVariant

type Si1TypeDefVariant struct {
	Variants []Si1Variant
}

type Si1TypeParameter

type Si1TypeParameter struct {
	Name    Text
	HasType bool
	Type    Si1LookupTypeID
}

func (*Si1TypeParameter) Decode

func (d *Si1TypeParameter) Decode(decoder scale.Decoder) error

func (Si1TypeParameter) Encode

func (d Si1TypeParameter) Encode(encoder scale.Encoder) error

type Si1Variant

type Si1Variant struct {
	Name   Text
	Fields []Si1Field
	Index  U8
	Docs   []Text
}

type SignatureHash

type SignatureHash H512

SignatureHash is a H512

func NewSignature

func NewSignature(b []byte) SignatureHash

NewSignature creates a new SignatureHash type

func (SignatureHash) Hex

func (h SignatureHash) Hex() string

Hex returns a hex string representation of the value (not of the encoded value)

type SignedCommitment

type SignedCommitment struct {
	Commitment Commitment
	Signatures []OptionBeefySignature
}

SignedCommitment is a beefy commitment with optional signatures from the set of validators

func (*SignedCommitment) Decode

func (s *SignedCommitment) Decode(decoder scale.Decoder) error

func (SignedCommitment) Encode

func (s SignedCommitment) Encode(encoder scale.Encoder) error

func (*SignedCommitment) UnmarshalText

func (s *SignedCommitment) UnmarshalText(text []byte) error

UnmarshalText deserializes hex string into a SignedCommitment. Used for decoding JSON-RPC subscription messages (beefy_subscribeJustifications)

type SignedExtensionMetadataV14

type SignedExtensionMetadataV14 struct {
	Identifier       Text
	Type             Si1LookupTypeID
	AdditionalSigned Si1LookupTypeID
}

type StakingCurrency

type StakingCurrency struct {
	IsBlockRewards bool
}

func (*StakingCurrency) Decode

func (s *StakingCurrency) Decode(decoder scale.Decoder) error

func (StakingCurrency) Encode

func (s StakingCurrency) Encode(encoder scale.Encoder) error

type StorageChangeSet

type StorageChangeSet struct {
	Block   Hash             `json:"block"`
	Changes []KeyValueOption `json:"changes"`
}

StorageChangeSet contains changes from storage subscriptions

type StorageDataRaw

type StorageDataRaw []byte

StorageDataRaw contains raw bytes that are not decoded/encoded. Be careful using this in your own structs – it only works as the last value in a struct since it will consume the remainder of the encoded data. The reason for this is that it does not contain any length encoding, so it would not know where to stop.

func NewStorageDataRaw

func NewStorageDataRaw(b []byte) StorageDataRaw

NewStorageDataRaw creates a new StorageDataRaw type

func (*StorageDataRaw) Decode

func (s *StorageDataRaw) Decode(decoder scale.Decoder) error

Decode implements decoding for StorageDataRaw, which just reads all the remaining bytes into StorageDataRaw

func (StorageDataRaw) Encode

func (s StorageDataRaw) Encode(encoder scale.Encoder) error

Encode implements encoding for StorageDataRaw, which just unwraps the bytes of StorageDataRaw

func (StorageDataRaw) Hex

func (s StorageDataRaw) Hex() string

Hex returns a hex string representation of the value

type StorageEntryMetadata

type StorageEntryMetadata interface {
	// Check whether the entry is a plain type
	IsPlain() bool
	// Get the hasher to store the plain type
	Hasher() (hash.Hash, error)

	// Check whether the entry is a map type.
	// Since v14, a Map is the union of the old Map, DoubleMap, and NMap.
	IsMap() bool
	// Get the hashers of the map keys. It should contain one hash per key.
	Hashers() ([]hash.Hash, error)
}

type StorageEntryMetadataV14

type StorageEntryMetadataV14 struct {
	Name          Text
	Modifier      StorageFunctionModifierV0
	Type          StorageEntryTypeV14
	Fallback      Bytes
	Documentation []Text
}

func (StorageEntryMetadataV14) Hasher

func (s StorageEntryMetadataV14) Hasher() (hash.Hash, error)

func (StorageEntryMetadataV14) Hashers

func (s StorageEntryMetadataV14) Hashers() ([]hash.Hash, error)

func (StorageEntryMetadataV14) IsMap

func (s StorageEntryMetadataV14) IsMap() bool

func (StorageEntryMetadataV14) IsPlain

func (s StorageEntryMetadataV14) IsPlain() bool

type StorageEntryTypeV14

type StorageEntryTypeV14 struct {
	IsPlainType bool
	AsPlainType Si1LookupTypeID
	IsMap       bool
	AsMap       MapTypeV14
}

func (*StorageEntryTypeV14) Decode

func (s *StorageEntryTypeV14) Decode(decoder scale.Decoder) error

func (StorageEntryTypeV14) Encode

func (s StorageEntryTypeV14) Encode(encoder scale.Encoder) error

type StorageFunctionMetadataV10

type StorageFunctionMetadataV10 struct {
	Name          Text
	Modifier      StorageFunctionModifierV0
	Type          StorageFunctionTypeV10
	Fallback      Bytes
	Documentation []Text
}

func (StorageFunctionMetadataV10) Hasher

func (s StorageFunctionMetadataV10) Hasher() (hash.Hash, error)

func (StorageFunctionMetadataV10) Hashers

func (s StorageFunctionMetadataV10) Hashers() ([]hash.Hash, error)

func (StorageFunctionMetadataV10) IsMap

func (s StorageFunctionMetadataV10) IsMap() bool

func (StorageFunctionMetadataV10) IsPlain

func (s StorageFunctionMetadataV10) IsPlain() bool

type StorageFunctionMetadataV13

type StorageFunctionMetadataV13 struct {
	Name          Text
	Modifier      StorageFunctionModifierV0
	Type          StorageFunctionTypeV13
	Fallback      Bytes
	Documentation []Text
}

func (StorageFunctionMetadataV13) Hasher

func (s StorageFunctionMetadataV13) Hasher() (hash.Hash, error)

func (StorageFunctionMetadataV13) Hashers

func (s StorageFunctionMetadataV13) Hashers() ([]hash.Hash, error)

func (StorageFunctionMetadataV13) IsMap

func (s StorageFunctionMetadataV13) IsMap() bool

func (StorageFunctionMetadataV13) IsPlain

func (s StorageFunctionMetadataV13) IsPlain() bool

type StorageFunctionMetadataV4

type StorageFunctionMetadataV4 struct {
	Name          Text
	Modifier      StorageFunctionModifierV0
	Type          StorageFunctionTypeV4
	Fallback      Bytes
	Documentation []Text
}

func (StorageFunctionMetadataV4) Hasher

func (s StorageFunctionMetadataV4) Hasher() (hash.Hash, error)

func (StorageFunctionMetadataV4) Hashers

func (s StorageFunctionMetadataV4) Hashers() ([]hash.Hash, error)

func (StorageFunctionMetadataV4) IsMap

func (s StorageFunctionMetadataV4) IsMap() bool

func (StorageFunctionMetadataV4) IsPlain

func (s StorageFunctionMetadataV4) IsPlain() bool

type StorageFunctionMetadataV5

type StorageFunctionMetadataV5 struct {
	Name          Text
	Modifier      StorageFunctionModifierV0
	Type          StorageFunctionTypeV5
	Fallback      Bytes
	Documentation []Text
}

func (StorageFunctionMetadataV5) Hasher

func (s StorageFunctionMetadataV5) Hasher() (hash.Hash, error)

func (StorageFunctionMetadataV5) Hashers

func (s StorageFunctionMetadataV5) Hashers() ([]hash.Hash, error)

func (StorageFunctionMetadataV5) IsMap

func (s StorageFunctionMetadataV5) IsMap() bool

func (StorageFunctionMetadataV5) IsPlain

func (s StorageFunctionMetadataV5) IsPlain() bool

type StorageFunctionModifierV0

type StorageFunctionModifierV0 struct {
	IsOptional bool // 0
	IsDefault  bool // 1
	IsRequired bool // 2
}

func (*StorageFunctionModifierV0) Decode

func (s *StorageFunctionModifierV0) Decode(decoder scale.Decoder) error

func (StorageFunctionModifierV0) Encode

func (s StorageFunctionModifierV0) Encode(encoder scale.Encoder) error

type StorageFunctionTypeV10

type StorageFunctionTypeV10 struct {
	IsType      bool
	AsType      Type // 0
	IsMap       bool
	AsMap       MapTypeV10 // 1
	IsDoubleMap bool
	AsDoubleMap DoubleMapTypeV10 // 2
}

func (*StorageFunctionTypeV10) Decode

func (s *StorageFunctionTypeV10) Decode(decoder scale.Decoder) error

func (StorageFunctionTypeV10) Encode

func (s StorageFunctionTypeV10) Encode(encoder scale.Encoder) error

type StorageFunctionTypeV13

type StorageFunctionTypeV13 struct {
	IsType      bool
	AsType      Type // 0
	IsMap       bool
	AsMap       MapTypeV10 // 1
	IsDoubleMap bool
	AsDoubleMap DoubleMapTypeV10 // 2
	IsNMap      bool
	AsNMap      NMapTypeV13 // 3
}

func (*StorageFunctionTypeV13) Decode

func (s *StorageFunctionTypeV13) Decode(decoder scale.Decoder) error

func (StorageFunctionTypeV13) Encode

func (s StorageFunctionTypeV13) Encode(encoder scale.Encoder) error

type StorageFunctionTypeV4

type StorageFunctionTypeV4 struct {
	IsType      bool
	AsType      Type // 0
	IsMap       bool
	AsMap       MapTypeV4 // 1
	IsDoubleMap bool
	AsDoubleMap DoubleMapTypeV4 // 2
}

func (*StorageFunctionTypeV4) Decode

func (s *StorageFunctionTypeV4) Decode(decoder scale.Decoder) error

func (StorageFunctionTypeV4) Encode

func (s StorageFunctionTypeV4) Encode(encoder scale.Encoder) error

type StorageFunctionTypeV5

type StorageFunctionTypeV5 struct {
	IsType      bool
	AsType      Type // 0
	IsMap       bool
	AsMap       MapTypeV4 // 1
	IsDoubleMap bool
	AsDoubleMap DoubleMapTypeV5 // 2
}

func (*StorageFunctionTypeV5) Decode

func (s *StorageFunctionTypeV5) Decode(decoder scale.Decoder) error

func (StorageFunctionTypeV5) Encode

func (s StorageFunctionTypeV5) Encode(encoder scale.Encoder) error

type StorageHasher

type StorageHasher struct {
	IsBlake2_128   bool // 0
	IsBlake2_256   bool // 1
	IsTwox128      bool // 2
	IsTwox256      bool // 3
	IsTwox64Concat bool // 4
}

func (*StorageHasher) Decode

func (s *StorageHasher) Decode(decoder scale.Decoder) error

func (StorageHasher) Encode

func (s StorageHasher) Encode(encoder scale.Encoder) error

func (StorageHasher) HashFunc

func (s StorageHasher) HashFunc() (hash.Hash, error)

type StorageHasherV10

type StorageHasherV10 struct {
	IsBlake2_128       bool // 0
	IsBlake2_256       bool // 1
	IsBlake2_128Concat bool // 2
	IsTwox128          bool // 3
	IsTwox256          bool // 4
	IsTwox64Concat     bool // 5
	IsIdentity         bool // 6
}

func (*StorageHasherV10) Decode

func (s *StorageHasherV10) Decode(decoder scale.Decoder) error

func (StorageHasherV10) Encode

func (s StorageHasherV10) Encode(encoder scale.Encoder) error

func (StorageHasherV10) HashFunc

func (s StorageHasherV10) HashFunc() (hash.Hash, error)

type StorageKey

type StorageKey []byte

StorageKey represents typically hashed storage keys of the system. Be careful using this in your own structs – it only works as the last value in a struct since it will consume the remainder of the encoded data. The reason for this is that it does not contain any length encoding, so it would not know where to stop.

func CreateStorageKey

func CreateStorageKey(meta *Metadata, prefix, method string, args ...[]byte) (StorageKey, error)

CreateStorageKey uses the given metadata and to derive the right hashing of method, prefix as well as arguments to create a hashed StorageKey Using variadic argument, so caller do not need to construct array of arguments

func NewStorageKey

func NewStorageKey(b []byte) StorageKey

NewStorageKey creates a new StorageKey type

func (*StorageKey) Decode

func (s *StorageKey) Decode(decoder scale.Decoder) error

Decode implements decoding for StorageKey, which just reads all the remaining bytes into StorageKey

func (StorageKey) Encode

func (s StorageKey) Encode(encoder scale.Encoder) error

Encode implements encoding for StorageKey, which just unwraps the bytes of StorageKey

func (StorageKey) Hex

func (s StorageKey) Hex() string

Hex returns a hex string representation of the value (not of the encoded value)

type StorageMetadata

type StorageMetadata struct {
	Prefix Text
	Items  []StorageFunctionMetadataV5
}

type StorageMetadataV10

type StorageMetadataV10 struct {
	Prefix Text
	Items  []StorageFunctionMetadataV10
}

type StorageMetadataV13

type StorageMetadataV13 struct {
	Prefix Text
	Items  []StorageFunctionMetadataV13
}

type StorageMetadataV14

type StorageMetadataV14 struct {
	Prefix Text
	Items  []StorageEntryMetadataV14
}

type Tally

type Tally struct {
	Votes U128
	Total U128
}

func (*Tally) Decode

func (t *Tally) Decode(decoder scale.Decoder) error

func (Tally) Encode

func (t Tally) Encode(encoder scale.Encoder) error

type TaskAddress

type TaskAddress struct {
	When  U32
	Index U32
}

TaskAddress holds the location of a scheduled task that can be used to remove it

type Text

type Text string

Text is a string type

func NewText

func NewText(s string) Text

NewText creates a new Text type

type TimePoint

type TimePoint struct {
	Height U32
	Index  U32
}

TimePoint is a global extrinsic index, formed as the extrinsic index within a block, together with that block's height.

type TokenError

type TokenError struct {
	IsNoFunds bool

	IsWouldDie bool

	IsBelowMinimum bool

	IsCannotCreate bool

	IsUnknownAsset bool

	IsFrozen bool

	IsUnsupported bool
}

func (*TokenError) Decode

func (t *TokenError) Decode(decoder scale.Decoder) error

func (TokenError) Encode

func (t TokenError) Encode(encoder scale.Encoder) error

type Tranche

type Tranche struct {
	FirstVal  U64
	SecondVal [16]U8
}

func (*Tranche) Decode

func (t *Tranche) Decode(decoder scale.Decoder) error

func (Tranche) Encode

func (t Tranche) Encode(encoder scale.Encoder) error

type TransactionalError

type TransactionalError struct {
	IsLimitReached bool

	IsNoLayer bool
}

func (*TransactionalError) Decode

func (t *TransactionalError) Decode(decoder scale.Decoder) error

func (TransactionalError) Encode

func (t TransactionalError) Encode(encoder scale.Encoder) error

type Type

type Type string

Type is a string, specifically to handle types

type U128

type U128 struct {
	*big.Int
}

U128 is an unsigned 128-bit integer, it is represented as a big.Int in Go.

func NewU128

func NewU128(i big.Int) U128

NewU128 creates a new U128 type

func (*U128) Decode

func (i *U128) Decode(decoder scale.Decoder) error

Decode implements decoding as per the Scale specification

func (U128) Encode

func (i U128) Encode(encoder scale.Encoder) error

Encode implements encoding as per the Scale specification

func (*U128) GobDecode

func (i *U128) GobDecode(b []byte) error

func (U128) GobEncode

func (i U128) GobEncode() ([]byte, error)

type U16

type U16 uint16

U16 is an unsigned 16-bit integer

func NewU16

func NewU16(u uint16) U16

NewU16 creates a new U16 type

func (U16) MarshalJSON

func (u U16) MarshalJSON() ([]byte, error)

MarshalJSON returns a JSON encoded byte array of u

func (*U16) UnmarshalJSON

func (u *U16) UnmarshalJSON(b []byte) error

UnmarshalJSON fills u with the JSON encoded byte array given by b

type U256

type U256 struct {
	*big.Int
}

U256 is an usigned 256-bit integer, it is represented as a big.Int in Go.

func NewU256

func NewU256(i big.Int) U256

NewU256 creates a new U256 type

func (*U256) Decode

func (i *U256) Decode(decoder scale.Decoder) error

Decode implements decoding as per the Scale specification

func (U256) Encode

func (i U256) Encode(encoder scale.Encoder) error

Encode implements encoding as per the Scale specification

type U32

type U32 uint32

U32 is an unsigned 32-bit integer

func NewU32

func NewU32(u uint32) U32

NewU32 creates a new U32 type

func (U32) MarshalJSON

func (u U32) MarshalJSON() ([]byte, error)

MarshalJSON returns a JSON encoded byte array of u

func (*U32) UnmarshalJSON

func (u *U32) UnmarshalJSON(b []byte) error

UnmarshalJSON fills u with the JSON encoded byte array given by b

type U64

type U64 uint64

U64 is an unsigned 64-bit integer

func NewU64

func NewU64(u uint64) U64

NewU64 creates a new U64 type

func (U64) MarshalJSON

func (u U64) MarshalJSON() ([]byte, error)

MarshalJSON returns a JSON encoded byte array of u

func (*U64) UnmarshalJSON

func (u *U64) UnmarshalJSON(b []byte) error

UnmarshalJSON fills u with the JSON encoded byte array given by b

type U8

type U8 uint8

U8 is an unsigned 8-bit integer

func NewU8

func NewU8(u uint8) U8

NewU8 creates a new U8 type

func (U8) MarshalJSON

func (u U8) MarshalJSON() ([]byte, error)

MarshalJSON returns a JSON encoded byte array of u

func (*U8) UnmarshalJSON

func (u *U8) UnmarshalJSON(b []byte) error

UnmarshalJSON fills u with the JSON encoded byte array given by b

type UCompact

type UCompact big.Int

func NewUCompact

func NewUCompact(value *big.Int) UCompact

func NewUCompactFromUInt

func NewUCompactFromUInt(value uint64) UCompact

func (*UCompact) Decode

func (u *UCompact) Decode(decoder scale.Decoder) error

func (UCompact) Encode

func (u UCompact) Encode(encoder scale.Encoder) error

func (*UCompact) Int64

func (u *UCompact) Int64() int64

func (UCompact) MarshalJSON

func (u UCompact) MarshalJSON() ([]byte, error)

type USize deprecated

type USize uint32

Deprecated: USize is a system default unsigned number, typically used in RPC to report non-consensus data. It is a wrapper for [U32] as a WASM default (as generated by Rust bindings). It is not to be used, since it created consensus mismatches.

func (USize) MarshalJSON

func (u USize) MarshalJSON() ([]byte, error)

MarshalJSON returns a JSON encoded byte array of u

func (*USize) UnmarshalJSON

func (u *USize) UnmarshalJSON(b []byte) error

UnmarshalJSON fills u with the JSON encoded byte array given by b

type VersionedMultiAssets

type VersionedMultiAssets struct {
	IsV0          bool
	MultiAssetsV0 []MultiAssetV0

	IsV1          bool
	MultiAssetsV1 MultiAssetsV1
}

func (*VersionedMultiAssets) Decode

func (v *VersionedMultiAssets) Decode(decoder scale.Decoder) error

func (VersionedMultiAssets) Encode

func (v VersionedMultiAssets) Encode(encoder scale.Encoder) error

type VersionedMultiLocation

type VersionedMultiLocation struct {
	IsV0            bool
	MultiLocationV0 MultiLocationV0

	IsV1            bool
	MultiLocationV1 MultiLocationV1
}

func (*VersionedMultiLocation) Decode

func (m *VersionedMultiLocation) Decode(decoder scale.Decoder) error

func (VersionedMultiLocation) Encode

func (m VersionedMultiLocation) Encode(encoder scale.Encoder) error

type VoteAccountVote

type VoteAccountVote struct {
	IsStandard bool
	AsStandard VoteAccountVoteAsStandard
	IsSplit    bool
	AsSplit    VoteAccountVoteAsSplit
}

func (*VoteAccountVote) Decode

func (vv *VoteAccountVote) Decode(decoder scale.Decoder) error

func (VoteAccountVote) Encode

func (vv VoteAccountVote) Encode(encoder scale.Encoder) error

type VoteAccountVoteAsSplit

type VoteAccountVoteAsSplit struct {
	Aye U128
	Nay U128
}

type VoteAccountVoteAsStandard

type VoteAccountVoteAsStandard struct {
	Vote    DemocracyVote
	Balance U128
}

func (*VoteAccountVoteAsStandard) Decode

func (v *VoteAccountVoteAsStandard) Decode(decoder scale.Decoder) error

func (VoteAccountVoteAsStandard) Encode

func (v VoteAccountVoteAsStandard) Encode(encoder scale.Encoder) error

type VoteThreshold

type VoteThreshold byte

VoteThreshold is a means of determining if a vote is past pass threshold.

const (
	// SuperMajorityApprove require super majority of approvals is needed to pass this vote.
	SuperMajorityApprove VoteThreshold = 0
	// SuperMajorityAgainst require super majority of rejects is needed to fail this vote.
	SuperMajorityAgainst VoteThreshold = 1
	// SimpleMajority require simple majority of approvals is needed to pass this vote.
	SimpleMajority VoteThreshold = 2
)

func (*VoteThreshold) Decode

func (v *VoteThreshold) Decode(decoder scale.Decoder) error

func (VoteThreshold) Encode

func (v VoteThreshold) Encode(encoder scale.Encoder) error

type Weight

type Weight struct {
	// The weight of computational time used based on some reference hardware.
	RefTime UCompact
	// The weight of storage space used by proof of validity.
	ProofSize UCompact
}

Weight is a numeric range of a transaction weight

func NewWeight

func NewWeight(refTime UCompact, proofSize UCompact) Weight

NewWeight creates a new Weight type

type WeightLimit

type WeightLimit struct {
	IsUnlimited bool

	IsLimited bool
	Limit     U64
}

func (*WeightLimit) Decode

func (w *WeightLimit) Decode(decoder scale.Decoder) error

func (WeightLimit) Encode

func (w WeightLimit) Encode(encoder scale.Encoder) error

type WeightMultiplier

type WeightMultiplier int64

WeightMultiplier represents how a fee value can be computed from a weighted transaction

func NewWeightMultiplier

func NewWeightMultiplier(i int64) WeightMultiplier

NewWeightMultiplier creates a new WeightMultiplier type

type WildFungibility

type WildFungibility struct {
	IsFungible    bool
	IsNonFungible bool
}

func (*WildFungibility) Decode

func (w *WildFungibility) Decode(decoder scale.Decoder) error

func (WildFungibility) Encode

func (w WildFungibility) Encode(encoder scale.Encoder) error

type WildMultiAsset

type WildMultiAsset struct {
	IsAll bool

	IsAllOf bool
	ID      AssetID
	Fun     WildFungibility
}

func (*WildMultiAsset) Decode

func (w *WildMultiAsset) Decode(decoder scale.Decoder) error

func (WildMultiAsset) Encode

func (w WildMultiAsset) Encode(encoder scale.Encoder) error

type XCMError

type XCMError struct {
	IsOverflow bool

	IsUnimplemented bool

	IsUntrustedReserveLocation bool

	IsUntrustedTeleportLocation bool

	IsMultiLocationFull bool

	IsMultiLocationNotInvertible bool

	IsBadOrigin bool

	IsInvalidLocation bool

	IsAssetNotFound bool

	IsFailedToTransactAsset bool

	IsNotWithdrawable bool

	IsLocationCannotHold bool

	IsExceedsMaxMessageSize bool

	IsDestinationUnsupported bool

	IsTransport bool
	Transport   string

	IsUnroutable bool

	IsUnknownClaim bool

	IsFailedToDecode bool

	IsMaxWeightInvalid bool

	IsNotHoldingFees bool

	IsTooExpensive bool

	IsTrap   bool
	TrapCode U64

	IsUnhandledXcmVersion bool

	IsWeightLimitReached bool
	Weight               Weight

	IsBarrier bool

	IsWeightNotComputable bool
}

func (*XCMError) Decode

func (x *XCMError) Decode(decoder scale.Decoder) error

func (XCMError) Encode

func (x XCMError) Encode(encoder scale.Encoder) error

type XcmMetadata

type XcmMetadata struct {
	FeePerSecond Option[U128]
}

type XcmVersion

type XcmVersion U32

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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