wrapper

package
v0.0.0-...-f4b6cf4 Latest Latest
Warning

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

Go to latest
Published: May 24, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ABICodecJsonWrapper

type ABICodecJsonWrapper struct {
}

type ABIDefinition

type ABIDefinition struct {
	Name            string      `json:"name"`
	Type            string      `json:"type"`
	Constant        bool        `json:"constant"`
	Payable         bool        `json:"payable"`
	Anonymous       bool        `json:"anonymous"`
	StateMutability string      `json:"stateMutability"`
	Inputs          []NamedType `json:"inputs"`
	Outputs         []NamedType `json:"outputs"`
}

ABIDefinition 定义 ABI 定义

func (*ABIDefinition) GetMethodId

func (ad *ABIDefinition) GetMethodId() string

func (*ABIDefinition) GetMethodSignatureAsString

func (ad *ABIDefinition) GetMethodSignatureAsString() string

type ABIObject

type ABIObject struct {
	Name         string
	Type         ObjectType
	ValueType    ValueType
	NumericValue NumericType
	//BytesValue        Bytes
	//AddressValue      Address
	//BoolValue         Bool
	DynamicBytesValue DynamicBytes
	StringValue       Utf8String
	ListType          ListType
	ListValues        []ABIObject
	ListLength        int
	ListValueType     *ABIObject
	StructFields      []ABIObject
}

ABIObject ABI 对象

func BuildRawTypeObject

func BuildRawTypeObject(rawType string) ABIObject

func CreateObject

func CreateObject(name string, objectType string) ABIObject

func CreateOutputObject

func CreateOutputObject(abiDefinition ABIDefinition) ABIObject

type ABIObjectFactory

type ABIObjectFactory struct {
}

func (*ABIObjectFactory) CreateInputObject

func (aof *ABIObjectFactory) CreateInputObject(abiDefinition ABIDefinition) ABIObject

type ContractABIDefinition

type ContractABIDefinition struct {
	Constructor         *ABIDefinition
	Functions           map[string][]*ABIDefinition
	Events              map[string][]*ABIDefinition
	MethodIDToFunctions map[string]*ABIDefinition
}

func NewContractABIDefinition

func NewContractABIDefinition() *ContractABIDefinition

func (*ContractABIDefinition) AddEvent

func (c *ContractABIDefinition) AddEvent(name string, abiDefinition *ABIDefinition)

func (*ContractABIDefinition) GetABIDefinitionByMethodID

func (c *ContractABIDefinition) GetABIDefinitionByMethodID(methodID string) *ABIDefinition

type DynamicBytes

type DynamicBytes struct {
}

DynamicBytes 动态字节类型

type ListType

type ListType string

ListType 列表类型

const (
	// Dynamic 动态列表类型
	Dynamic ListType = "DYNAMIC"
)

枚举值定义

type NamedType

type NamedType struct {
	Name       string      `json:"name"`
	Type       string      `json:"type"`
	Indexed    bool        `json:"indexed"`
	Components []NamedType `json:"components"`
}

NamedType 定义命名类型

func NewNamedType

func NewNamedType(name string, typeStr string, indexed bool) NamedType

NewNamedType 创建新的命名类型

func (NamedType) GetTupleRawTypeAsString

func (nt NamedType) GetTupleRawTypeAsString() string

GetTupleRawTypeAsString 获取元组原始类型字符串

func (NamedType) GetTypeAsString

func (nt NamedType) GetTypeAsString() string

GetTypeAsString 获取类型字符串

func (NamedType) NewType

func (nt NamedType) NewType() Type

NewType 创建新的类型

type NumericType

type NumericType struct {
}

NumericType 数字类型

type ObjectType

type ObjectType string

ObjectType 对象类型

type Type

type Type struct {
	TypeStr    string
	RawType    string
	Dimensions []int
}

Type 定义类型

func NewType

func NewType(name string) Type

NewType 创建新的类型

func (*Type) Initialize

func (t *Type) Initialize()

Initialize 初始化类型

func (Type) IsDynamicList

func (t Type) IsDynamicList() bool

IsDynamicList 判断是否为动态列表

func (Type) IsFixedList

func (t Type) IsFixedList() bool

IsFixedList 判断是否为固定列表

func (Type) IsList

func (t Type) IsList() bool

IsList 判断是否为列表

func (Type) ReduceDimensionAndGetType

func (t Type) ReduceDimensionAndGetType() Type

ReduceDimensionAndGetType 减少维度并获取类型

type Utf8String

type Utf8String struct {
}

Utf8String UTF-8 字符串类型

type ValueType

type ValueType string

ValueType 值类型

const (
	// Bool 布尔类型
	Bool ValueType = "BOOL"
	// Uint 无符号整数类型
	Uint ValueType = "UINT"
	// Int 有符号整数类型
	Int ValueType = "INT"
	// Bytes 字节类型
	Bytes ValueType = "BYTES"
	// Address 地址类型
	Address ValueType = "ADDRESS"
	// String 字符串类型
	String ValueType = "STRING"
	// DBytes 动态字节类型
	DBytes ValueType = "DBYTES"
	// Fixed 固定小数类型
	Fixed ValueType = "FIXED"
	// UFixed 无符号固定小数类型
	UFixed ValueType = "UFIXED"
)

枚举值定义

Jump to

Keyboard shortcuts

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