Common Types

Foundational types used throughout go-ethereum.

Two types are defined in common/types.go: Address and Hash.

Address

Address is defined as an array of 20 bytes:

const (
    HashLength    = 32
    AddressLength = 20
)

// Address represents the 20 byte address of an Ethereum account.
type Address [AddressLength]byte

Hash

Hash is defined as an array of 32 bytes:

// Hash represents the 32 byte Keccak256 hash of arbitrary data.
type Hash [HashLength]byte

results matching ""

    No results matching ""