maidenlanedbind

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
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

func ABIEventSignature(event *ABIEvent) string

ABIEventSignature returns a signature for an ABI event

func HexDecode

func HexDecode(hex string) ([]byte, error)

HexDecode decodes an 0x prefixed hex string

Types

type ABIArgument

type ABIArgument = abi.Argument

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

type ABIArguments = abi.Arguments

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

type ABIEvent = abi.Event

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

type ABIMethod = abi.Method

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

type ABIType = abi.Type

ABIType is a type

func ABITypeFor

func ABITypeFor(typeName string) (ABIType, error)

ABITypeFor gives you a type for a string

func ABITypeKnown

func ABITypeKnown(typeName string) ABIType

ABITypeKnown gives you a type for a string you are sure is known

type Address

type Address = common.Address

Address models and serializes a 20 byte ethereum address

func BytesToAddress

func BytesToAddress(b []byte) Address

BytesToAddress converts bytes to address

func HexToAddress

func HexToAddress(hex string) Address

HexToAddress convert hex to an address

type Hash

type Hash = common.Hash

Hash models and serializes a 32 byte ethereum hash

func HexToHash

func HexToHash(hex string) Hash

HexToHash convert hex to an address

type Header = types.Header

Header is a type for ethereum block Header representation

type HexBigInt

type HexBigInt = hexutil.Big

HexBigInt models and serializes big.Int

type HexUint

type HexUint = hexutil.Uint

HexUint models and serializes uint

type HexUint64

type HexUint64 = hexutil.Uint64

HexUint64 models and serializes uint64

type RuntimeABI

type RuntimeABI struct {
	abi.ABI
}

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

Jump to

Keyboard shortcuts

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