Documentation
¶
Index ¶
- Constants
- func ABIEventSignature(event *ABIEvent) string
- func HexDecode(hex string) ([]byte, error)
- type ABIArgument
- type ABIArgumentMarshaling
- type ABIArguments
- type ABIElementMarshaling
- type ABIEvent
- type ABIMarshaling
- type ABIMethod
- type ABIType
- type Address
- type Hash
- type Header
- type HexBigInt
- type HexUint
- type HexUint64
- type RuntimeABI
Constants ¶
const ( // IntTy - type IntTy = abi.IntTy // UintTy - type UintTy = abi.UintTy // BoolTy - type BoolTy = abi.BoolTy // StringTy - type StringTy = abi.StringTy // BytesTy - type BytesTy = abi.BytesTy // FixedBytesTy - type FixedBytesTy = abi.FixedBytesTy // AddressTy - type AddressTy = abi.AddressTy // SliceTy - type SliceTy = abi.SliceTy // ArrayTy - type ArrayTy = abi.ArrayTy )
Variables ¶
This section is empty.
Functions ¶
func ABIEventSignature ¶
ABIEventSignature returns a signature for an ABI event
Types ¶
type ABIArgument ¶
ABIArgument is an argument in the Inputs or Outputs of an ABI
type ABIArgumentMarshaling ¶
type ABIArgumentMarshaling struct { Name string `json:"name"` Type string `json:"type"` InternalType string `json:"internalType,omitempty"` Components []ABIArgumentMarshaling `json:"components,omitempty"` Indexed bool `json:"indexed,omitempty"` }
ABIArgumentMarshaling is abi.ArgumentMarshaling
type ABIArguments ¶
ABIArguments is an array of arguments with helper functions
func ABIArgumentsMarshalingToABIArguments ¶
func ABIArgumentsMarshalingToABIArguments(marshalable []ABIArgumentMarshaling) (ABIArguments, error)
ABIArgumentsMarshalingToABIArguments converts ABI serialized reprsentations of arguments to the processed type information
type ABIElementMarshaling ¶
type ABIElementMarshaling struct { Type string `json:"type,omitempty"` Name string `json:"name,omitempty"` Payable bool `json:"payable,omitempty"` Constant bool `json:"constant,omitempty"` Anonymous bool `json:"anonymous,omitempty"` StateMutability string `json:"stateMutability,omitempty"` Inputs []ABIArgumentMarshaling `json:"inputs"` Outputs []ABIArgumentMarshaling `json:"outputs"` }
ABIElementMarshaling is the serialized representation of a method or event in an ABI
type ABIEvent ¶
ABIEvent is an event on the ABI
func ABIElementMarshalingToABIEvent ¶
func ABIElementMarshalingToABIEvent(marshalable *ABIElementMarshaling) (event *ABIEvent, err error)
ABIElementMarshalingToABIEvent converts a de-serialized event with full type information, per the original ABI, into a runtime ABIEvent with a processed type
type ABIMarshaling ¶
type ABIMarshaling []ABIElementMarshaling
ABIMarshaling is the JSON array representation of an ABI
type ABIMethod ¶
ABIMethod is an method on the ABI
func ABIElementMarshalingToABIMethod ¶
func ABIElementMarshalingToABIMethod(m *ABIElementMarshaling) (method *ABIMethod, err error)
ABIElementMarshalingToABIMethod converts a de-serialized method with full type information, per the original ABI, into a runtime ABIEvent with a processed type
type ABIType ¶
ABIType is a type
func ABITypeFor ¶
ABITypeFor gives you a type for a string
func ABITypeKnown ¶
ABITypeKnown gives you a type for a string you are sure is known
type Address ¶
Address models and serializes a 20 byte ethereum address
func BytesToAddress ¶
BytesToAddress converts bytes to address
type RuntimeABI ¶
RuntimeABI is the ethereum implementation of an ABI. It can be unmarshalled from an ABI JSON, but does not support marshalling.
func ABIMarshalingToABIRuntime ¶
func ABIMarshalingToABIRuntime(marshalable ABIMarshaling) (*RuntimeABI, error)
ABIMarshalingToABIRuntime takes a serialized form ABI and converts it into RuntimeABI This is not performance optimized, so the RuntimeABI once generated should be used for runtime processing