contract

package
v1.8.3 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AbiSiType

type AbiSiType struct {
	Path   []string                `json:"path,omitempty"`
	Params []types.SiTypeParameter `json:"params,omitempty"`
	Def    SiTypeDef               `json:"def"`
	Docs   []string                `json:"docs,omitempty"`
}

type AbiType

type AbiType struct {
	Id   int       `json:"id"`
	Type AbiSiType `json:"type"`
}

func (*AbiType) ToScalePortableType

func (a *AbiType) ToScalePortableType() *types.PortableType

type EventArg

type EventArg struct {
	Docs    []string            `json:"docs"`
	Indexed bool                `json:"indexed"`
	Payable bool                `json:"payable"`
	Type    TypeWithDisplayName `json:"type"`
}

type Message

type Message struct {
	Args       []MessageArg        `json:"args"`
	Docs       []string            `json:"docs"`
	Label      string              `json:"label"`
	Payable    bool                `json:"payable"`
	ReturnType TypeWithDisplayName `json:"returnType"`
	Selector   string              `json:"selector"`
}

type MessageArg

type MessageArg struct {
	Label string              `json:"label"`
	Type  TypeWithDisplayName `json:"type"`
}

type MetadataAbi

type MetadataAbi struct {
	RegisteredSiType map[int]string `json:"-"`
	Spec             Spec           `json:"spec"`
	Types            []AbiType      `json:"types"`
	Version          string         `json:"version,omitempty"`
}

func InitAbi

func InitAbi(raw []byte) (*MetadataAbi, error)

func (*MetadataAbi) GetTypeNames

func (m *MetadataAbi) GetTypeNames(id int) string

func (*MetadataAbi) Register

func (m *MetadataAbi) Register(s *types.ScaleDecoder, prefix string)

type SiTypeDef

type SiTypeDef struct {
	Composite      *types.SiTypeDefComposite   `json:"composite,omitempty"`
	Variant        *types.SiTypeDefVariant     `json:"variant,omitempty"`
	Sequence       *types.SiTypeDefSequence    `json:"sequence,omitempty"`
	Array          *types.SiTypeDefArray       `json:"array,omitempty"`
	Tuple          *types.SiTypeDefTuple       `json:"tuple,omitempty"`
	Primitive      *types.SiTypeDefPrimitive   `json:"primitive,omitempty"`
	Compact        *types.SiTypeDefCompact     `json:"compact,omitempty"`
	BitSequence    *types.SiTypeDefBitSequence `json:"bitSequence,omitempty"`
	SiTypeDefRange *types.SiTypeDefRange       `json:"range,omitempty"`
}

type Spec

type Spec struct {
	Constructors []Message           `json:"constructors"`
	Docs         []interface{}       `json:"docs"`
	LangError    TypeWithDisplayName `json:"lang_error"`
	Events       []SpecEvent         `json:"events"`
	Messages     []interface{}       `json:"messages"`
}

type SpecEvent

type SpecEvent struct {
	Args  []EventArg `json:"args"`
	Docs  []string   `json:"docs"`
	Label string     `json:"label"`
}

type TypeWithDisplayName

type TypeWithDisplayName struct {
	DisplayName []string `json:"displayName"`
	Type        int      `json:"type"`
}

Jump to

Keyboard shortcuts

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