customscale

package
v0.0.0-...-09e170c Latest Latest
Warning

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

Go to latest
Published: May 22, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecodeByTypeID

func DecodeByTypeID(metadata *types.Metadata, arg *ArgDecoder, typeId types.Si1LookupTypeID) (interface{}, error)

func FindEventNamesForEventID

func FindEventNamesForEventID(metadata *types.Metadata, eventID types.EventID) (types.Text, types.Text, []types.Si1Field, error)

func GetCallMethodFromMetadata

func GetCallMethodFromMetadata(metadata *types.Metadata, call *types.Call) (variant types.Si1Variant, mod types.PalletMetadataV14)

func GetSi1TypeFromMetadata

func GetSi1TypeFromMetadata(metadata *types.Metadata, typeId types.Si1LookupTypeID) *types.Si1Type

func PrimitiveDecode

func PrimitiveDecode(arg *ArgDecoder, typeDefPrimitive types.Si1TypeDefPrimitive) (interface{}, error)

Types

type ArgDecoder

type ArgDecoder struct {
	*scale.Decoder
}

func NewArgDecoder

func NewArgDecoder(reader io.Reader) *ArgDecoder

func (ArgDecoder) Decode

func (pd ArgDecoder) Decode(target ...interface{}) error

type CallArg

type CallArg struct {
	FieldName string
	Value     any
}

func ArgDecode

func ArgDecode(metadata *types.Metadata, arg *ArgDecoder, si1Field []types.Si1Field) ([]*CallArg, error)

type CallData

type CallData struct {
	Method string
	Arg    []*CallArg
}

func DecodeCall

func DecodeCall(metadata *types.Metadata, call *types.Call) (*CallData, error)

type Event

type Event struct {
	Phase     *types.Phase
	EventData *EventData
	Topics    []*types.Hash
}

type EventData

type EventData struct {
	ModuleName types.Text
	EventName  types.Text
	Args       []*CallArg
}

type EventRaw

type EventRaw []byte

func (*EventRaw) DecodeRaw

func (e *EventRaw) DecodeRaw(metadata *types.Metadata) ([]*Event, error)

type Variants

type Variants struct {
	MethodName string
	Value      []interface{}
}

Jump to

Keyboard shortcuts

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