abi

package
v0.19.0 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2018 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FunctionSelectorLength = 4
	AddressLength          = 20
)

Variables

This section is empty.

Functions

func FirstFourBytes

func FirstFourBytes(byteSlice []byte) [4]byte

Types

type Address

type Address [AddressLength]byte

type Arg

type Arg struct {
	Name     string
	TypeName TypeName
}

type FunctionSelector

type FunctionSelector [FunctionSelectorLength]byte

func FunctionID

func FunctionID(signature string) FunctionSelector

type Return

type Return struct {
	Name     string
	TypeName TypeName
}

type TypeName

type TypeName string

We use TypeName rather than Type to reserve 'Type' for a possible future ABI type the can hold an ABI-native type mapping

const (
	// We don't need to be exhaustive here, just make what we used strongly typed
	AddressTypeName TypeName = "address"
	IntTypeName     TypeName = "int"
	Uint64TypeName  TypeName = "uint64"
	Bytes32TypeName TypeName = "bytes32"
	StringTypeName  TypeName = "string"
	BoolTypeName    TypeName = "bool"
)

Jump to

Keyboard shortcuts

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