ethereumabi

package
v0.0.1-gowrapper-dev Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2025 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	AbiError_name = map[int32]string{
		0:  "OK",
		1:  "Error_internal",
		2:  "Error_abi_mismatch",
		3:  "Error_invalid_abi",
		4:  "Error_invalid_param_type",
		5:  "Error_invalid_address_value",
		6:  "Error_invalid_uint_value",
		7:  "Error_missing_param_type",
		8:  "Error_missing_param_value",
		9:  "Error_decoding_data",
		10: "Error_empty_type",
	}
	AbiError_value = map[string]int32{
		"OK":                          0,
		"Error_internal":              1,
		"Error_abi_mismatch":          2,
		"Error_invalid_abi":           3,
		"Error_invalid_param_type":    4,
		"Error_invalid_address_value": 5,
		"Error_invalid_uint_value":    6,
		"Error_missing_param_type":    7,
		"Error_missing_param_value":   8,
		"Error_decoding_data":         9,
		"Error_empty_type":            10,
	}
)

Enum value maps for AbiError.

View Source
var File_EthereumAbi_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type AbiError

type AbiError int32
const (
	// This is the OK case, with value=0
	AbiError_OK AbiError = 0
	// Internal error.
	AbiError_Error_internal AbiError = 1
	// Unexpected function signature or ABI mismatch.
	AbiError_Error_abi_mismatch AbiError = 2
	// Invalid ABI.
	AbiError_Error_invalid_abi AbiError = 3
	// Invalid parameter type.
	AbiError_Error_invalid_param_type AbiError = 4
	// Invalid address value.
	AbiError_Error_invalid_address_value AbiError = 5
	// Invalid UInt value.
	AbiError_Error_invalid_uint_value AbiError = 6
	// Missing parameter type.
	AbiError_Error_missing_param_type AbiError = 7
	// Missing parameter value.
	AbiError_Error_missing_param_value AbiError = 8
	// Invalid encoded data.
	AbiError_Error_decoding_data AbiError = 9
	// Invalid empty type.
	// For example, bytes0, address[0].
	AbiError_Error_empty_type AbiError = 10
)

func (AbiError) Descriptor

func (AbiError) Descriptor() protoreflect.EnumDescriptor

func (AbiError) Enum

func (x AbiError) Enum() *AbiError

func (AbiError) EnumDescriptor deprecated

func (AbiError) EnumDescriptor() ([]byte, []int)

Deprecated: Use AbiError.Descriptor instead.

func (AbiError) Number

func (x AbiError) Number() protoreflect.EnumNumber

func (AbiError) String

func (x AbiError) String() string

func (AbiError) Type

type AbiParams

type AbiParams struct {

	// ABI type parameters.
	Params []*Param `protobuf:"bytes,1,rep,name=params,proto3" json:"params,omitempty"`
	// contains filtered or unexported fields
}

A set of ABI type parameters.

func (*AbiParams) Descriptor deprecated

func (*AbiParams) Descriptor() ([]byte, []int)

Deprecated: Use AbiParams.ProtoReflect.Descriptor instead.

func (*AbiParams) GetParams

func (x *AbiParams) GetParams() []*Param

func (*AbiParams) ProtoMessage

func (*AbiParams) ProtoMessage()

func (*AbiParams) ProtoReflect

func (x *AbiParams) ProtoReflect() protoreflect.Message

func (*AbiParams) Reset

func (x *AbiParams) Reset()

func (*AbiParams) String

func (x *AbiParams) String() string

type AddressType

type AddressType struct {
	// contains filtered or unexported fields
}

Indicates an address type.

func (*AddressType) Descriptor deprecated

func (*AddressType) Descriptor() ([]byte, []int)

Deprecated: Use AddressType.ProtoReflect.Descriptor instead.

func (*AddressType) ProtoMessage

func (*AddressType) ProtoMessage()

func (*AddressType) ProtoReflect

func (x *AddressType) ProtoReflect() protoreflect.Message

func (*AddressType) Reset

func (x *AddressType) Reset()

func (*AddressType) String

func (x *AddressType) String() string

type ArrayParam

type ArrayParam struct {

	// The type of array elements.
	ElementType *ParamType `protobuf:"bytes,1,opt,name=element_type,json=elementType,proto3" json:"element_type,omitempty"`
	// Array elements.
	Elements []*Token `protobuf:"bytes,2,rep,name=elements,proto3" json:"elements,omitempty"`
	// contains filtered or unexported fields
}

A byte array of arbitrary size.

func (*ArrayParam) Descriptor deprecated

func (*ArrayParam) Descriptor() ([]byte, []int)

Deprecated: Use ArrayParam.ProtoReflect.Descriptor instead.

func (*ArrayParam) GetElementType

func (x *ArrayParam) GetElementType() *ParamType

func (*ArrayParam) GetElements

func (x *ArrayParam) GetElements() []*Token

func (*ArrayParam) ProtoMessage

func (*ArrayParam) ProtoMessage()

func (*ArrayParam) ProtoReflect

func (x *ArrayParam) ProtoReflect() protoreflect.Message

func (*ArrayParam) Reset

func (x *ArrayParam) Reset()

func (*ArrayParam) String

func (x *ArrayParam) String() string

type ArrayType

type ArrayType struct {

	// The type of array elements.
	ElementType *ParamType `protobuf:"bytes,1,opt,name=element_type,json=elementType,proto3" json:"element_type,omitempty"`
	// contains filtered or unexported fields
}

Indicates an array type with an inner `element_type`.

func (*ArrayType) Descriptor deprecated

func (*ArrayType) Descriptor() ([]byte, []int)

Deprecated: Use ArrayType.ProtoReflect.Descriptor instead.

func (*ArrayType) GetElementType

func (x *ArrayType) GetElementType() *ParamType

func (*ArrayType) ProtoMessage

func (*ArrayType) ProtoMessage()

func (*ArrayType) ProtoReflect

func (x *ArrayType) ProtoReflect() protoreflect.Message

func (*ArrayType) Reset

func (x *ArrayType) Reset()

func (*ArrayType) String

func (x *ArrayType) String() string

type BoolType

type BoolType struct {
	// contains filtered or unexported fields
}

Indicates a boolean type.

func (*BoolType) Descriptor deprecated

func (*BoolType) Descriptor() ([]byte, []int)

Deprecated: Use BoolType.ProtoReflect.Descriptor instead.

func (*BoolType) ProtoMessage

func (*BoolType) ProtoMessage()

func (*BoolType) ProtoReflect

func (x *BoolType) ProtoReflect() protoreflect.Message

func (*BoolType) Reset

func (x *BoolType) Reset()

func (*BoolType) String

func (x *BoolType) String() string

type ByteArrayFixType

type ByteArrayFixType struct {

	// The fixed-size of the array.
	Size uint64 `protobuf:"varint,1,opt,name=size,proto3" json:"size,omitempty"`
	// contains filtered or unexported fields
}

Indicates a fixed-size byte array type.

func (*ByteArrayFixType) Descriptor deprecated

func (*ByteArrayFixType) Descriptor() ([]byte, []int)

Deprecated: Use ByteArrayFixType.ProtoReflect.Descriptor instead.

func (*ByteArrayFixType) GetSize

func (x *ByteArrayFixType) GetSize() uint64

func (*ByteArrayFixType) ProtoMessage

func (*ByteArrayFixType) ProtoMessage()

func (*ByteArrayFixType) ProtoReflect

func (x *ByteArrayFixType) ProtoReflect() protoreflect.Message

func (*ByteArrayFixType) Reset

func (x *ByteArrayFixType) Reset()

func (*ByteArrayFixType) String

func (x *ByteArrayFixType) String() string

type ByteArrayType

type ByteArrayType struct {
	// contains filtered or unexported fields
}

Indicates a byte array type.

func (*ByteArrayType) Descriptor deprecated

func (*ByteArrayType) Descriptor() ([]byte, []int)

Deprecated: Use ByteArrayType.ProtoReflect.Descriptor instead.

func (*ByteArrayType) ProtoMessage

func (*ByteArrayType) ProtoMessage()

func (*ByteArrayType) ProtoReflect

func (x *ByteArrayType) ProtoReflect() protoreflect.Message

func (*ByteArrayType) Reset

func (x *ByteArrayType) Reset()

func (*ByteArrayType) String

func (x *ByteArrayType) String() string

type ContractCallDecodingInput

type ContractCallDecodingInput struct {

	// An encoded smart contract call with a prefixed function signature (4 bytes).
	Encoded []byte `protobuf:"bytes,1,opt,name=encoded,proto3" json:"encoded,omitempty"`
	// A smart contract ABI in JSON.
	// Each ABI function must be mapped to a short signature.
	// Expected to be a set of functions mapped to corresponding short signatures.
	// Example:
	// “`
	//
	//	{
	//	    "1896f70a": {
	//	        "name": "setResolver",
	//	        "inputs": [...],
	//	        ...
	//	    },
	//	    "ac9650d8": {
	//	        "name": "multicall",
	//	        "inputs": [...],
	//	        ...
	//	    }
	//	}
	//
	// “`
	SmartContractAbiJson string `protobuf:"bytes,2,opt,name=smart_contract_abi_json,json=smartContractAbiJson,proto3" json:"smart_contract_abi_json,omitempty"`
	// contains filtered or unexported fields
}

Decode a contract call (function input) according to the given ABI json.

func (*ContractCallDecodingInput) Descriptor deprecated

func (*ContractCallDecodingInput) Descriptor() ([]byte, []int)

Deprecated: Use ContractCallDecodingInput.ProtoReflect.Descriptor instead.

func (*ContractCallDecodingInput) GetEncoded

func (x *ContractCallDecodingInput) GetEncoded() []byte

func (*ContractCallDecodingInput) GetSmartContractAbiJson

func (x *ContractCallDecodingInput) GetSmartContractAbiJson() string

func (*ContractCallDecodingInput) ProtoMessage

func (*ContractCallDecodingInput) ProtoMessage()

func (*ContractCallDecodingInput) ProtoReflect

func (*ContractCallDecodingInput) Reset

func (x *ContractCallDecodingInput) Reset()

func (*ContractCallDecodingInput) String

func (x *ContractCallDecodingInput) String() string

type ContractCallDecodingOutput

type ContractCallDecodingOutput struct {

	// Human readable json format, according to the input `ContractCallDecodingInput::smart_contract_abi_json`.
	DecodedJson string `protobuf:"bytes,1,opt,name=decoded_json,json=decodedJson,proto3" json:"decoded_json,omitempty"`
	// Decoded parameters.
	Tokens []*Token `protobuf:"bytes,2,rep,name=tokens,proto3" json:"tokens,omitempty"`
	// error code, 0 is ok, other codes will be treated as errors
	Error AbiError `protobuf:"varint,3,opt,name=error,proto3,enum=TW.EthereumAbi.Proto.AbiError" json:"error,omitempty"`
	// error code description
	ErrorMessage string `protobuf:"bytes,4,opt,name=error_message,json=errorMessage,proto3" json:"error_message,omitempty"`
	// contains filtered or unexported fields
}

func (*ContractCallDecodingOutput) Descriptor deprecated

func (*ContractCallDecodingOutput) Descriptor() ([]byte, []int)

Deprecated: Use ContractCallDecodingOutput.ProtoReflect.Descriptor instead.

func (*ContractCallDecodingOutput) GetDecodedJson

func (x *ContractCallDecodingOutput) GetDecodedJson() string

func (*ContractCallDecodingOutput) GetError

func (x *ContractCallDecodingOutput) GetError() AbiError

func (*ContractCallDecodingOutput) GetErrorMessage

func (x *ContractCallDecodingOutput) GetErrorMessage() string

func (*ContractCallDecodingOutput) GetTokens

func (x *ContractCallDecodingOutput) GetTokens() []*Token

func (*ContractCallDecodingOutput) ProtoMessage

func (*ContractCallDecodingOutput) ProtoMessage()

func (*ContractCallDecodingOutput) ProtoReflect

func (*ContractCallDecodingOutput) Reset

func (x *ContractCallDecodingOutput) Reset()

func (*ContractCallDecodingOutput) String

func (x *ContractCallDecodingOutput) String() string

type FixedArrayType

type FixedArrayType struct {

	// The fixed-size of the array.
	Size uint64 `protobuf:"varint,1,opt,name=size,proto3" json:"size,omitempty"`
	// The type of array elements.
	ElementType *ParamType `protobuf:"bytes,2,opt,name=element_type,json=elementType,proto3" json:"element_type,omitempty"`
	// contains filtered or unexported fields
}

Indicates a fixed-size array type with an inner `element_type`.

func (*FixedArrayType) Descriptor deprecated

func (*FixedArrayType) Descriptor() ([]byte, []int)

Deprecated: Use FixedArrayType.ProtoReflect.Descriptor instead.

func (*FixedArrayType) GetElementType

func (x *FixedArrayType) GetElementType() *ParamType

func (*FixedArrayType) GetSize

func (x *FixedArrayType) GetSize() uint64

func (*FixedArrayType) ProtoMessage

func (*FixedArrayType) ProtoMessage()

func (*FixedArrayType) ProtoReflect

func (x *FixedArrayType) ProtoReflect() protoreflect.Message

func (*FixedArrayType) Reset

func (x *FixedArrayType) Reset()

func (*FixedArrayType) String

func (x *FixedArrayType) String() string

type FunctionEncodingInput

type FunctionEncodingInput struct {

	// Function name.
	FunctionName string `protobuf:"bytes,1,opt,name=function_name,json=functionName,proto3" json:"function_name,omitempty"`
	// Parameters to be encoded.
	Tokens []*Token `protobuf:"bytes,2,rep,name=tokens,proto3" json:"tokens,omitempty"`
	// contains filtered or unexported fields
}

Encode a function call to Eth ABI binary.

func (*FunctionEncodingInput) Descriptor deprecated

func (*FunctionEncodingInput) Descriptor() ([]byte, []int)

Deprecated: Use FunctionEncodingInput.ProtoReflect.Descriptor instead.

func (*FunctionEncodingInput) GetFunctionName

func (x *FunctionEncodingInput) GetFunctionName() string

func (*FunctionEncodingInput) GetTokens

func (x *FunctionEncodingInput) GetTokens() []*Token

func (*FunctionEncodingInput) ProtoMessage

func (*FunctionEncodingInput) ProtoMessage()

func (*FunctionEncodingInput) ProtoReflect

func (x *FunctionEncodingInput) ProtoReflect() protoreflect.Message

func (*FunctionEncodingInput) Reset

func (x *FunctionEncodingInput) Reset()

func (*FunctionEncodingInput) String

func (x *FunctionEncodingInput) String() string

type FunctionEncodingOutput

type FunctionEncodingOutput struct {

	// The function type signature.
	// Example: "baz(int32,uint256)"
	FunctionType string `protobuf:"bytes,1,opt,name=function_type,json=functionType,proto3" json:"function_type,omitempty"`
	// An encoded smart contract call with a prefixed function signature (4 bytes).
	Encoded []byte `protobuf:"bytes,2,opt,name=encoded,proto3" json:"encoded,omitempty"`
	// error code, 0 is ok, other codes will be treated as errors
	Error AbiError `protobuf:"varint,3,opt,name=error,proto3,enum=TW.EthereumAbi.Proto.AbiError" json:"error,omitempty"`
	// error code description
	ErrorMessage string `protobuf:"bytes,4,opt,name=error_message,json=errorMessage,proto3" json:"error_message,omitempty"`
	// contains filtered or unexported fields
}

func (*FunctionEncodingOutput) Descriptor deprecated

func (*FunctionEncodingOutput) Descriptor() ([]byte, []int)

Deprecated: Use FunctionEncodingOutput.ProtoReflect.Descriptor instead.

func (*FunctionEncodingOutput) GetEncoded

func (x *FunctionEncodingOutput) GetEncoded() []byte

func (*FunctionEncodingOutput) GetError

func (x *FunctionEncodingOutput) GetError() AbiError

func (*FunctionEncodingOutput) GetErrorMessage

func (x *FunctionEncodingOutput) GetErrorMessage() string

func (*FunctionEncodingOutput) GetFunctionType

func (x *FunctionEncodingOutput) GetFunctionType() string

func (*FunctionEncodingOutput) ProtoMessage

func (*FunctionEncodingOutput) ProtoMessage()

func (*FunctionEncodingOutput) ProtoReflect

func (x *FunctionEncodingOutput) ProtoReflect() protoreflect.Message

func (*FunctionEncodingOutput) Reset

func (x *FunctionEncodingOutput) Reset()

func (*FunctionEncodingOutput) String

func (x *FunctionEncodingOutput) String() string

type FunctionGetTypeInput

type FunctionGetTypeInput struct {

	// Function signature. Includes function inputs if they are.
	// Examples:
	// - `functionName()`
	// - `functionName()`
	// - `functionName(bool)`
	// - `functionName(uint256,bytes32)`
	FunctionName string `protobuf:"bytes,1,opt,name=function_name,json=functionName,proto3" json:"function_name,omitempty"`
	// A set of ABI type parameters.
	Inputs []*Param `protobuf:"bytes,2,rep,name=inputs,proto3" json:"inputs,omitempty"`
	// contains filtered or unexported fields
}

Return the function type signature, of the form "baz(int32,uint256)".

func (*FunctionGetTypeInput) Descriptor deprecated

func (*FunctionGetTypeInput) Descriptor() ([]byte, []int)

Deprecated: Use FunctionGetTypeInput.ProtoReflect.Descriptor instead.

func (*FunctionGetTypeInput) GetFunctionName

func (x *FunctionGetTypeInput) GetFunctionName() string

func (*FunctionGetTypeInput) GetInputs

func (x *FunctionGetTypeInput) GetInputs() []*Param

func (*FunctionGetTypeInput) ProtoMessage

func (*FunctionGetTypeInput) ProtoMessage()

func (*FunctionGetTypeInput) ProtoReflect

func (x *FunctionGetTypeInput) ProtoReflect() protoreflect.Message

func (*FunctionGetTypeInput) Reset

func (x *FunctionGetTypeInput) Reset()

func (*FunctionGetTypeInput) String

func (x *FunctionGetTypeInput) String() string

type NumberNParam

type NumberNParam struct {

	// Count of bits of the number.
	// 0 < bits <= 256, bits % 8 == 0
	Bits uint32 `protobuf:"varint,1,opt,name=bits,proto3" json:"bits,omitempty"`
	// Serialized big endian.
	Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
	// contains filtered or unexported fields
}

Generic number parameter for all other bit sizes, like UInt24, 40, 48, ... 248.

func (*NumberNParam) Descriptor deprecated

func (*NumberNParam) Descriptor() ([]byte, []int)

Deprecated: Use NumberNParam.ProtoReflect.Descriptor instead.

func (*NumberNParam) GetBits

func (x *NumberNParam) GetBits() uint32

func (*NumberNParam) GetValue

func (x *NumberNParam) GetValue() []byte

func (*NumberNParam) ProtoMessage

func (*NumberNParam) ProtoMessage()

func (*NumberNParam) ProtoReflect

func (x *NumberNParam) ProtoReflect() protoreflect.Message

func (*NumberNParam) Reset

func (x *NumberNParam) Reset()

func (*NumberNParam) String

func (x *NumberNParam) String() string

type NumberNType

type NumberNType struct {

	// The number of bits of an integer.
	Bits uint32 `protobuf:"varint,1,opt,name=bits,proto3" json:"bits,omitempty"`
	// contains filtered or unexported fields
}

Generic number type for all bit sizes, like UInt24, 40, 48, ... 248.

func (*NumberNType) Descriptor deprecated

func (*NumberNType) Descriptor() ([]byte, []int)

Deprecated: Use NumberNType.ProtoReflect.Descriptor instead.

func (*NumberNType) GetBits

func (x *NumberNType) GetBits() uint32

func (*NumberNType) ProtoMessage

func (*NumberNType) ProtoMessage()

func (*NumberNType) ProtoReflect

func (x *NumberNType) ProtoReflect() protoreflect.Message

func (*NumberNType) Reset

func (x *NumberNType) Reset()

func (*NumberNType) String

func (x *NumberNType) String() string

type Param

type Param struct {

	// Name of the parameter.
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// Type of the parameter.
	Param *ParamType `protobuf:"bytes,2,opt,name=param,proto3" json:"param,omitempty"`
	// contains filtered or unexported fields
}

Named parameter with type.

func (*Param) Descriptor deprecated

func (*Param) Descriptor() ([]byte, []int)

Deprecated: Use Param.ProtoReflect.Descriptor instead.

func (*Param) GetName

func (x *Param) GetName() string

func (*Param) GetParam

func (x *Param) GetParam() *ParamType

func (*Param) ProtoMessage

func (*Param) ProtoMessage()

func (*Param) ProtoReflect

func (x *Param) ProtoReflect() protoreflect.Message

func (*Param) Reset

func (x *Param) Reset()

func (*Param) String

func (x *Param) String() string

type ParamType

type ParamType struct {

	// Types that are valid to be assigned to Param:
	//
	//	*ParamType_Boolean
	//	*ParamType_NumberInt
	//	*ParamType_NumberUint
	//	*ParamType_StringParam
	//	*ParamType_Address
	//	*ParamType_ByteArray
	//	*ParamType_ByteArrayFix
	//	*ParamType_Array
	//	*ParamType_FixedArray
	//	*ParamType_Tuple
	Param isParamType_Param `protobuf_oneof:"param"`
	// contains filtered or unexported fields
}

func (*ParamType) Descriptor deprecated

func (*ParamType) Descriptor() ([]byte, []int)

Deprecated: Use ParamType.ProtoReflect.Descriptor instead.

func (*ParamType) GetAddress

func (x *ParamType) GetAddress() *AddressType

func (*ParamType) GetArray

func (x *ParamType) GetArray() *ArrayType

func (*ParamType) GetBoolean

func (x *ParamType) GetBoolean() *BoolType

func (*ParamType) GetByteArray

func (x *ParamType) GetByteArray() *ByteArrayType

func (*ParamType) GetByteArrayFix

func (x *ParamType) GetByteArrayFix() *ByteArrayFixType

func (*ParamType) GetFixedArray

func (x *ParamType) GetFixedArray() *FixedArrayType

func (*ParamType) GetNumberInt

func (x *ParamType) GetNumberInt() *NumberNType

func (*ParamType) GetNumberUint

func (x *ParamType) GetNumberUint() *NumberNType

func (*ParamType) GetParam

func (x *ParamType) GetParam() isParamType_Param

func (*ParamType) GetStringParam

func (x *ParamType) GetStringParam() *StringType

func (*ParamType) GetTuple

func (x *ParamType) GetTuple() *TupleType

func (*ParamType) ProtoMessage

func (*ParamType) ProtoMessage()

func (*ParamType) ProtoReflect

func (x *ParamType) ProtoReflect() protoreflect.Message

func (*ParamType) Reset

func (x *ParamType) Reset()

func (*ParamType) String

func (x *ParamType) String() string

type ParamType_Address

type ParamType_Address struct {
	Address *AddressType `protobuf:"bytes,8,opt,name=address,proto3,oneof"`
}

type ParamType_Array

type ParamType_Array struct {
	// Nested values. Gap in field numbering is intentional.
	Array *ArrayType `protobuf:"bytes,14,opt,name=array,proto3,oneof"`
}

type ParamType_Boolean

type ParamType_Boolean struct {
	Boolean *BoolType `protobuf:"bytes,1,opt,name=boolean,proto3,oneof"`
}

type ParamType_ByteArray

type ParamType_ByteArray struct {
	ByteArray *ByteArrayType `protobuf:"bytes,9,opt,name=byte_array,json=byteArray,proto3,oneof"`
}

type ParamType_ByteArrayFix

type ParamType_ByteArrayFix struct {
	ByteArrayFix *ByteArrayFixType `protobuf:"bytes,10,opt,name=byte_array_fix,json=byteArrayFix,proto3,oneof"`
}

type ParamType_FixedArray

type ParamType_FixedArray struct {
	FixedArray *FixedArrayType `protobuf:"bytes,15,opt,name=fixed_array,json=fixedArray,proto3,oneof"`
}

type ParamType_NumberInt

type ParamType_NumberInt struct {
	NumberInt *NumberNType `protobuf:"bytes,2,opt,name=number_int,json=numberInt,proto3,oneof"`
}

type ParamType_NumberUint

type ParamType_NumberUint struct {
	NumberUint *NumberNType `protobuf:"bytes,3,opt,name=number_uint,json=numberUint,proto3,oneof"`
}

type ParamType_StringParam

type ParamType_StringParam struct {
	// Nested values. Gap in field numbering is intentional.
	StringParam *StringType `protobuf:"bytes,7,opt,name=string_param,json=stringParam,proto3,oneof"`
}

type ParamType_Tuple

type ParamType_Tuple struct {
	// Nested values. Gap in field numbering is intentional.
	Tuple *TupleType `protobuf:"bytes,19,opt,name=tuple,proto3,oneof"`
}

type ParamsDecodingInput

type ParamsDecodingInput struct {

	// An encoded ABI.
	Encoded []byte `protobuf:"bytes,1,opt,name=encoded,proto3" json:"encoded,omitempty"`
	// Types that are valid to be assigned to Abi:
	//
	//	*ParamsDecodingInput_AbiJson
	//	*ParamsDecodingInput_AbiParams
	Abi isParamsDecodingInput_Abi `protobuf_oneof:"abi"`
	// contains filtered or unexported fields
}

Decode a function input or output data according to the given ABI json.

func (*ParamsDecodingInput) Descriptor deprecated

func (*ParamsDecodingInput) Descriptor() ([]byte, []int)

Deprecated: Use ParamsDecodingInput.ProtoReflect.Descriptor instead.

func (*ParamsDecodingInput) GetAbi

func (x *ParamsDecodingInput) GetAbi() isParamsDecodingInput_Abi

func (*ParamsDecodingInput) GetAbiJson

func (x *ParamsDecodingInput) GetAbiJson() string

func (*ParamsDecodingInput) GetAbiParams

func (x *ParamsDecodingInput) GetAbiParams() *AbiParams

func (*ParamsDecodingInput) GetEncoded

func (x *ParamsDecodingInput) GetEncoded() []byte

func (*ParamsDecodingInput) ProtoMessage

func (*ParamsDecodingInput) ProtoMessage()

func (*ParamsDecodingInput) ProtoReflect

func (x *ParamsDecodingInput) ProtoReflect() protoreflect.Message

func (*ParamsDecodingInput) Reset

func (x *ParamsDecodingInput) Reset()

func (*ParamsDecodingInput) String

func (x *ParamsDecodingInput) String() string

type ParamsDecodingInput_AbiJson

type ParamsDecodingInput_AbiJson struct {
	// A set of ABI parameters in JSON.
	// Expected to be a JSON array at the entry level.
	// Example:
	// “`
	// [
	//
	//	{
	//	    "name": "_to',
	//	    "type": "address"
	//	},
	//	{
	//	    "name": "_value",
	//	    "type": "uint256"
	//	}
	//
	// ]
	// “`
	AbiJson string `protobuf:"bytes,2,opt,name=abi_json,json=abiJson,proto3,oneof"`
}

type ParamsDecodingInput_AbiParams

type ParamsDecodingInput_AbiParams struct {
	// A set of ABI type parameters.
	AbiParams *AbiParams `protobuf:"bytes,3,opt,name=abi_params,json=abiParams,proto3,oneof"`
}

type ParamsDecodingOutput

type ParamsDecodingOutput struct {

	// Decoded parameters.
	Tokens []*Token `protobuf:"bytes,1,rep,name=tokens,proto3" json:"tokens,omitempty"`
	// error code, 0 is ok, other codes will be treated as errors
	Error AbiError `protobuf:"varint,2,opt,name=error,proto3,enum=TW.EthereumAbi.Proto.AbiError" json:"error,omitempty"`
	// error code description
	ErrorMessage string `protobuf:"bytes,3,opt,name=error_message,json=errorMessage,proto3" json:"error_message,omitempty"`
	// contains filtered or unexported fields
}

func (*ParamsDecodingOutput) Descriptor deprecated

func (*ParamsDecodingOutput) Descriptor() ([]byte, []int)

Deprecated: Use ParamsDecodingOutput.ProtoReflect.Descriptor instead.

func (*ParamsDecodingOutput) GetError

func (x *ParamsDecodingOutput) GetError() AbiError

func (*ParamsDecodingOutput) GetErrorMessage

func (x *ParamsDecodingOutput) GetErrorMessage() string

func (*ParamsDecodingOutput) GetTokens

func (x *ParamsDecodingOutput) GetTokens() []*Token

func (*ParamsDecodingOutput) ProtoMessage

func (*ParamsDecodingOutput) ProtoMessage()

func (*ParamsDecodingOutput) ProtoReflect

func (x *ParamsDecodingOutput) ProtoReflect() protoreflect.Message

func (*ParamsDecodingOutput) Reset

func (x *ParamsDecodingOutput) Reset()

func (*ParamsDecodingOutput) String

func (x *ParamsDecodingOutput) String() string

type StringType

type StringType struct {
	// contains filtered or unexported fields
}

Indicates a string type.

func (*StringType) Descriptor deprecated

func (*StringType) Descriptor() ([]byte, []int)

Deprecated: Use StringType.ProtoReflect.Descriptor instead.

func (*StringType) ProtoMessage

func (*StringType) ProtoMessage()

func (*StringType) ProtoReflect

func (x *StringType) ProtoReflect() protoreflect.Message

func (*StringType) Reset

func (x *StringType) Reset()

func (*StringType) String

func (x *StringType) String() string

type Token

type Token struct {

	// Optional. Name of a corresponding parameter.
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// Types that are valid to be assigned to Token:
	//
	//	*Token_Boolean
	//	*Token_NumberInt
	//	*Token_NumberUint
	//	*Token_StringValue
	//	*Token_Address
	//	*Token_ByteArray
	//	*Token_ByteArrayFix
	//	*Token_Array
	//	*Token_FixedArray
	//	*Token_Tuple
	Token isToken_Token `protobuf_oneof:"token"`
	// contains filtered or unexported fields
}

A value of an ABI parameter.

func (*Token) Descriptor deprecated

func (*Token) Descriptor() ([]byte, []int)

Deprecated: Use Token.ProtoReflect.Descriptor instead.

func (*Token) GetAddress

func (x *Token) GetAddress() string

func (*Token) GetArray

func (x *Token) GetArray() *ArrayParam

func (*Token) GetBoolean

func (x *Token) GetBoolean() bool

func (*Token) GetByteArray

func (x *Token) GetByteArray() []byte

func (*Token) GetByteArrayFix

func (x *Token) GetByteArrayFix() []byte

func (*Token) GetFixedArray

func (x *Token) GetFixedArray() *ArrayParam

func (*Token) GetName

func (x *Token) GetName() string

func (*Token) GetNumberInt

func (x *Token) GetNumberInt() *NumberNParam

func (*Token) GetNumberUint

func (x *Token) GetNumberUint() *NumberNParam

func (*Token) GetStringValue

func (x *Token) GetStringValue() string

func (*Token) GetToken

func (x *Token) GetToken() isToken_Token

func (*Token) GetTuple

func (x *Token) GetTuple() *TupleParam

func (*Token) ProtoMessage

func (*Token) ProtoMessage()

func (*Token) ProtoReflect

func (x *Token) ProtoReflect() protoreflect.Message

func (*Token) Reset

func (x *Token) Reset()

func (*Token) String

func (x *Token) String() string

type Token_Address

type Token_Address struct {
	Address string `protobuf:"bytes,8,opt,name=address,proto3,oneof"`
}

type Token_Array

type Token_Array struct {
	// Nested values. Gap in field numbering is intentional.
	Array *ArrayParam `protobuf:"bytes,14,opt,name=array,proto3,oneof"`
}

type Token_Boolean

type Token_Boolean struct {
	// Integer values.
	Boolean bool `protobuf:"varint,2,opt,name=boolean,proto3,oneof"`
}

type Token_ByteArray

type Token_ByteArray struct {
	ByteArray []byte `protobuf:"bytes,9,opt,name=byte_array,json=byteArray,proto3,oneof"`
}

type Token_ByteArrayFix

type Token_ByteArrayFix struct {
	ByteArrayFix []byte `protobuf:"bytes,10,opt,name=byte_array_fix,json=byteArrayFix,proto3,oneof"`
}

type Token_FixedArray

type Token_FixedArray struct {
	FixedArray *ArrayParam `protobuf:"bytes,15,opt,name=fixed_array,json=fixedArray,proto3,oneof"`
}

type Token_NumberInt

type Token_NumberInt struct {
	NumberInt *NumberNParam `protobuf:"bytes,3,opt,name=number_int,json=numberInt,proto3,oneof"`
}

type Token_NumberUint

type Token_NumberUint struct {
	NumberUint *NumberNParam `protobuf:"bytes,4,opt,name=number_uint,json=numberUint,proto3,oneof"`
}

type Token_StringValue

type Token_StringValue struct {
	// Simple values. Gap in field numbering is intentional.
	StringValue string `protobuf:"bytes,7,opt,name=string_value,json=stringValue,proto3,oneof"`
}

type Token_Tuple

type Token_Tuple struct {
	// Nested values. Gap in field numbering is intentional.
	Tuple *TupleParam `protobuf:"bytes,19,opt,name=tuple,proto3,oneof"`
}

type TupleParam

type TupleParam struct {

	// Tokens (values) of the tuple parameters.
	Params []*Token `protobuf:"bytes,1,rep,name=params,proto3" json:"params,omitempty"`
	// contains filtered or unexported fields
}

A tuple with various parameters similar to a structure.

func (*TupleParam) Descriptor deprecated

func (*TupleParam) Descriptor() ([]byte, []int)

Deprecated: Use TupleParam.ProtoReflect.Descriptor instead.

func (*TupleParam) GetParams

func (x *TupleParam) GetParams() []*Token

func (*TupleParam) ProtoMessage

func (*TupleParam) ProtoMessage()

func (*TupleParam) ProtoReflect

func (x *TupleParam) ProtoReflect() protoreflect.Message

func (*TupleParam) Reset

func (x *TupleParam) Reset()

func (*TupleParam) String

func (x *TupleParam) String() string

type TupleType

type TupleType struct {

	// Tuple named parameters.
	Params []*Param `protobuf:"bytes,1,rep,name=params,proto3" json:"params,omitempty"`
	// contains filtered or unexported fields
}

Indicates a tuple with inner type parameters.

func (*TupleType) Descriptor deprecated

func (*TupleType) Descriptor() ([]byte, []int)

Deprecated: Use TupleType.ProtoReflect.Descriptor instead.

func (*TupleType) GetParams

func (x *TupleType) GetParams() []*Param

func (*TupleType) ProtoMessage

func (*TupleType) ProtoMessage()

func (*TupleType) ProtoReflect

func (x *TupleType) ProtoReflect() protoreflect.Message

func (*TupleType) Reset

func (x *TupleType) Reset()

func (*TupleType) String

func (x *TupleType) String() string

type ValueDecodingInput

type ValueDecodingInput struct {

	// An encoded value to be decoded.
	Encoded []byte `protobuf:"bytes,1,opt,name=encoded,proto3" json:"encoded,omitempty"`
	// A type of the parameter.
	// Example: "bytes[32]".
	// Please note `tuple` is not supported.
	ParamType string `protobuf:"bytes,2,opt,name=param_type,json=paramType,proto3" json:"param_type,omitempty"`
	// contains filtered or unexported fields
}

Decode an Eth ABI value.

func (*ValueDecodingInput) Descriptor deprecated

func (*ValueDecodingInput) Descriptor() ([]byte, []int)

Deprecated: Use ValueDecodingInput.ProtoReflect.Descriptor instead.

func (*ValueDecodingInput) GetEncoded

func (x *ValueDecodingInput) GetEncoded() []byte

func (*ValueDecodingInput) GetParamType

func (x *ValueDecodingInput) GetParamType() string

func (*ValueDecodingInput) ProtoMessage

func (*ValueDecodingInput) ProtoMessage()

func (*ValueDecodingInput) ProtoReflect

func (x *ValueDecodingInput) ProtoReflect() protoreflect.Message

func (*ValueDecodingInput) Reset

func (x *ValueDecodingInput) Reset()

func (*ValueDecodingInput) String

func (x *ValueDecodingInput) String() string

type ValueDecodingOutput

type ValueDecodingOutput struct {

	// Decoded parameter.
	Token *Token `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"`
	// Decoded parameter as a string.
	ParamStr string `protobuf:"bytes,2,opt,name=param_str,json=paramStr,proto3" json:"param_str,omitempty"`
	// error code, 0 is ok, other codes will be treated as errors
	Error AbiError `protobuf:"varint,3,opt,name=error,proto3,enum=TW.EthereumAbi.Proto.AbiError" json:"error,omitempty"`
	// error code description
	ErrorMessage string `protobuf:"bytes,4,opt,name=error_message,json=errorMessage,proto3" json:"error_message,omitempty"`
	// contains filtered or unexported fields
}

func (*ValueDecodingOutput) Descriptor deprecated

func (*ValueDecodingOutput) Descriptor() ([]byte, []int)

Deprecated: Use ValueDecodingOutput.ProtoReflect.Descriptor instead.

func (*ValueDecodingOutput) GetError

func (x *ValueDecodingOutput) GetError() AbiError

func (*ValueDecodingOutput) GetErrorMessage

func (x *ValueDecodingOutput) GetErrorMessage() string

func (*ValueDecodingOutput) GetParamStr

func (x *ValueDecodingOutput) GetParamStr() string

func (*ValueDecodingOutput) GetToken

func (x *ValueDecodingOutput) GetToken() *Token

func (*ValueDecodingOutput) ProtoMessage

func (*ValueDecodingOutput) ProtoMessage()

func (*ValueDecodingOutput) ProtoReflect

func (x *ValueDecodingOutput) ProtoReflect() protoreflect.Message

func (*ValueDecodingOutput) Reset

func (x *ValueDecodingOutput) Reset()

func (*ValueDecodingOutput) String

func (x *ValueDecodingOutput) String() string

Jump to

Keyboard shortcuts

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