View Source Etherex.Type (Etherex v1.1.0)

Basic types in Ethereum.

Link to this section Summary

Types

20 bytes account addresses in hex representation (starting with "0x")

Block parameters are block numbers or a tag.

Call error contains the hash of the transaction, the error type (for example revert) and the reason.

Errors: :econnrefused when no client is listening, otherwise, when the client encounters an error a short description of the error

Events emitted in a new message call transcation.

32 bytes hashes in hex representation (starting with "0x")

Numbers, byte arrays, account addresses, hashes, and bytecode arrays encoded as hex, prefix with “0x”, two hex digits per byte.

Options that can be used in some Etherex function calls.

Quantities as non negative integers (used in values, block height, counts, etc.)

Tags to represent the default block in some methods.

Ether units

Link to this section Types

@type address() :: <<_::336>>

20 bytes account addresses in hex representation (starting with "0x")

@type block_parameter() :: quantity() | tag()

Block parameters are block numbers or a tag.

@type call_error() :: %{hash: hash(), error: String.t(), reason: String.t()}

Call error contains the hash of the transaction, the error type (for example revert) and the reason.

@type error() :: :econnrefused | :timeout | String.t()

Errors: :econnrefused when no client is listening, otherwise, when the client encounters an error a short description of the error

@type event() :: {String.t(), %{required(String.t()) => any()}}

Events emitted in a new message call transcation.

@type hash() :: <<_::528>>

32 bytes hashes in hex representation (starting with "0x")

@type hex() :: <<_::16, _::_*8>>

Numbers, byte arrays, account addresses, hashes, and bytecode arrays encoded as hex, prefix with “0x”, two hex digits per byte.

@type opts() :: [gas: quantity(), gas_price: quantity(), nonce: quantity()]

Options that can be used in some Etherex function calls.

@type quantity() :: non_neg_integer()

Quantities as non negative integers (used in values, block height, counts, etc.)

@type tag() :: :earliest | :latest | :pending

Tags to represent the default block in some methods.

@type unit() :: :WEI | :GWEI | :PWEI | :ETH

Ether units