View Source Ethers.Transaction (Ethers v0.5.5)

Transaction struct and helper functions

Summary

Types

t()

@type t() :: %Ethers.Transaction{
  access_list: [{binary(), [binary()]}],
  block_hash: binary() | nil,
  block_number: binary() | nil,
  chain_id: binary() | nil,
  data: binary(),
  from: Ethers.Types.t_address() | nil,
  gas: binary() | nil,
  gas_price: binary() | nil,
  hash: binary() | nil,
  max_fee_per_gas: binary() | nil,
  max_priority_fee_per_gas: binary(),
  nonce: binary() | nil,
  signature_r: binary() | nil,
  signature_s: binary() | nil,
  signature_y_parity_or_v: binary() | non_neg_integer() | nil,
  to: Ethers.Types.t_address() | nil,
  transaction_index: binary() | nil,
  type: t_transaction_type(),
  value: binary()
}

t_transaction_type()

@type t_transaction_type() :: :legacy | :eip1559 | :eip2930 | :eip4844

Functions

calculate_y_parity_or_v(tx, recovery_id)

decode_values(tx)

@spec decode_values(t()) :: map()

Decodes a transaction struct values in a new map.

encode(transaction)

fill_with_defaults(tx, opts)

from_map(tx)

new(params, type \\ :eip1559)

to_map(tx)