abi

package
v0.18.0 Latest Latest
Warning

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

Go to latest
Published: May 8, 2018 License: Apache-2.0 Imports: 1 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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