Documentation
¶
Index ¶
- Variables
- type Contract
- type Method
- func (*Method) Descriptor() ([]byte, []int)deprecated
- func (x *Method) GetComponents() []*MethodIO
- func (x *Method) GetInputs() []*MethodIO
- func (x *Method) GetName() string
- func (x *Method) GetOutputs() []*MethodIO
- func (x *Method) GetStateMutability() string
- func (x *Method) GetType() string
- func (*Method) ProtoMessage()
- func (x *Method) ProtoReflect() protoreflect.Message
- func (x *Method) Reset()
- func (x *Method) String() string
- type MethodIO
- func (*MethodIO) Descriptor() ([]byte, []int)deprecated
- func (x *MethodIO) GetComponents() []*MethodIO
- func (x *MethodIO) GetIndexed() bool
- func (x *MethodIO) GetInputs() []*MethodIO
- func (x *MethodIO) GetInternalType() string
- func (x *MethodIO) GetName() string
- func (x *MethodIO) GetOutputs() []*MethodIO
- func (x *MethodIO) GetStateMutability() string
- func (x *MethodIO) GetType() string
- func (*MethodIO) ProtoMessage()
- func (x *MethodIO) ProtoReflect() protoreflect.Message
- func (x *MethodIO) Reset()
- func (x *MethodIO) String() string
- type Root
- func (*Root) Descriptor() ([]byte, []int)deprecated
- func (x *Root) GetContracts() map[string]*Contract
- func (x *Root) GetContractsCount() int32
- func (x *Root) GetEntryContractId() int64
- func (x *Root) GetEntryContractName() string
- func (*Root) ProtoMessage()
- func (x *Root) ProtoReflect() protoreflect.Message
- func (x *Root) Reset()
- func (x *Root) String() string
Constants ¶
This section is empty.
Variables ¶
var File_abi_contract_proto protoreflect.FileDescriptor
var File_abi_method_proto protoreflect.FileDescriptor
var File_abi_root_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type Contract ¶
type Contract struct {
// A repeated field containing all the methods associated with the contract.
// Each method is represented by the Method message, which details the method's name,
// input parameters, output parameters, and other relevant attributes.
Methods []*Method `protobuf:"bytes,1,rep,name=methods,proto3" json:"methods,omitempty"`
// contains filtered or unexported fields
}
Contract represents a Solidity contract's ABI (Application Binary Interface) details. In the Ethereum ecosystem, a contract's ABI is essential for encoding and decoding data to and from the contract. This Contract message encapsulates the methods that are part of the contract, allowing for a structured representation of the contract's functionalities.
func (*Contract) Descriptor
deprecated
func (*Contract) GetMethods ¶
func (*Contract) ProtoMessage ¶
func (*Contract) ProtoMessage()
func (*Contract) ProtoReflect ¶
func (x *Contract) ProtoReflect() protoreflect.Message
type Method ¶
type Method struct {
// If the function has parameters of type 'struct' or 'tuple', this field contains its components.
Components []*MethodIO `protobuf:"bytes,1,rep,name=components,proto3" json:"components,omitempty"`
// The input parameters of the function.
Inputs []*MethodIO `protobuf:"bytes,2,rep,name=inputs,proto3" json:"inputs,omitempty"`
// The output parameters of the function.
Outputs []*MethodIO `protobuf:"bytes,3,rep,name=outputs,proto3" json:"outputs,omitempty"`
// The name of the function.
Name string `protobuf:"bytes,4,opt,name=name,proto3" json:"name,omitempty"`
// The type of the method (always "function" for functions).
Type string `protobuf:"bytes,5,opt,name=type,proto3" json:"type,omitempty"`
// The state mutability of the function (e.g., pure, view, nonpayable, payable).
StateMutability string `protobuf:"bytes,6,opt,name=stateMutability,proto3" json:"stateMutability,omitempty"`
// contains filtered or unexported fields
}
Method represents a contract function in the ABI. It provides a structured representation of the function's attributes, such as its name, type, input parameters, and output parameters.
func (*Method) Descriptor
deprecated
func (*Method) GetComponents ¶
func (*Method) GetOutputs ¶
func (*Method) GetStateMutability ¶
func (*Method) ProtoMessage ¶
func (*Method) ProtoMessage()
func (*Method) ProtoReflect ¶
func (x *Method) ProtoReflect() protoreflect.Message
type MethodIO ¶
type MethodIO struct {
// Indicates if the parameter is indexed. This is primarily used for event parameters.
Indexed bool `protobuf:"varint,1,opt,name=indexed,proto3" json:"indexed,omitempty"`
// Represents the internal Solidity type of the parameter.
InternalType string `protobuf:"bytes,2,opt,name=internalType,proto3" json:"internalType,omitempty"`
// The name of the parameter.
Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`
// The type of the parameter, as represented in the ABI.
Type string `protobuf:"bytes,4,opt,name=type,proto3" json:"type,omitempty"`
// If the parameter is of type 'struct' or 'tuple', this field contains its components.
Components []*MethodIO `protobuf:"bytes,5,rep,name=components,proto3" json:"components,omitempty"`
// The state mutability of the function (e.g., pure, view, nonpayable, payable).
StateMutability string `protobuf:"bytes,6,opt,name=stateMutability,proto3" json:"stateMutability,omitempty"`
// The input parameters of the function.
Inputs []*MethodIO `protobuf:"bytes,7,rep,name=inputs,proto3" json:"inputs,omitempty"`
// The output parameters of the function.
Outputs []*MethodIO `protobuf:"bytes,8,rep,name=outputs,proto3" json:"outputs,omitempty"`
// contains filtered or unexported fields
}
MethodIO represents an input or output parameter of a contract method or event. It provides a structured representation of the parameter's attributes, such as its name, type, and whether it's indexed (for events).
func (*MethodIO) Descriptor
deprecated
func (*MethodIO) GetComponents ¶
func (*MethodIO) GetIndexed ¶
func (*MethodIO) GetInternalType ¶
func (*MethodIO) GetOutputs ¶
func (*MethodIO) GetStateMutability ¶
func (*MethodIO) ProtoMessage ¶
func (*MethodIO) ProtoMessage()
func (*MethodIO) ProtoReflect ¶
func (x *MethodIO) ProtoReflect() protoreflect.Message
type Root ¶
type Root struct {
// The unique identifier for the entry contract.
// This ID is used as a reference to the main or primary contract within the ABI.
EntryContractId int64 `protobuf:"varint,1,opt,name=entryContractId,proto3" json:"entryContractId,omitempty"`
// The name of the entry contract.
// This provides a human-readable identifier for the primary contract within the ABI.
EntryContractName string `protobuf:"bytes,2,opt,name=entryContractName,proto3" json:"entryContractName,omitempty"`
// The total number of contracts present in the ABI.
// This count includes the entry contract and any other contracts that are part of the ABI.
ContractsCount int32 `protobuf:"varint,3,opt,name=contractsCount,proto3" json:"contractsCount,omitempty"`
// A map that associates contract names with their corresponding Contract details.
// The key is the name of the contract, and the value is the Contract message containing details about the contract's methods and other attributes.
Contracts map[string]*Contract `` /* 159-byte string literal not displayed */
// contains filtered or unexported fields
}
Root represents the root of a Solidity contract's ABI (Application Binary Interface). The ABI is a critical component for interacting with contracts in Ethereum. It is a representation of the contract's functions, the input and output parameters of these functions, and details about the data types of these parameters. The Root message encapsulates the main details of the ABI, including the entry contract's ID and name, the total number of contracts, and a map of contract names to their corresponding Contract details.
func (*Root) Descriptor
deprecated
func (*Root) GetContracts ¶
func (*Root) GetContractsCount ¶
func (*Root) GetEntryContractId ¶
func (*Root) GetEntryContractName ¶
func (*Root) ProtoMessage ¶
func (*Root) ProtoMessage()
func (*Root) ProtoReflect ¶
func (x *Root) ProtoReflect() protoreflect.Message