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 CreateObject ¶
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 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 ¶
NewNamedType 创建新的命名类型
func (NamedType) GetTupleRawTypeAsString ¶
GetTupleRawTypeAsString 获取元组原始类型字符串
func (NamedType) GetTypeAsString ¶
GetTypeAsString 获取类型字符串
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" )
枚举值定义
Click to show internal directories.
Click to hide internal directories.