Transaction envelope encoding/decoding for legacy and typed transactions.
Decoding turns wire addresses into integers, an empty to into nil, and
access-list storage keys into integers; encoding does the reverse.
Summary
Functions
@spec decode(binary()) :: {:ok, EEVM.Transaction.t()} | {:error, atom()}
Decode a transaction from wire format.
A 0x-prefixed hex string returns {:error, :hex_string}; decode it with
EEVM.bytes/1 first.
@spec encode(EEVM.Transaction.t()) :: binary()
Encode a transaction to its wire format (binary).
Raises ArgumentError naming the field when a field has the wrong type,
such as a hex string for to or a missing signature.