Etherex.Type (Etherex v1.0.0) View Source

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

Specs

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

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

Specs

block_parameter() :: quantity() | tag()

Block parameters are block numbers or a tag.

Specs

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.

Specs

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

Specs

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

Events emitted in a new message call transcation.

Specs

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

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

Specs

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

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

Specs

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

Options that can be used in some Etherex function calls.

Specs

quantity() :: non_neg_integer()

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

Specs

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

Tags to represent the default block in some methods.

Specs

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

Ether units