Skip to content

1.0.0

Latest

Choose a tag to compare

@alisinabh alisinabh released this 23 Nov 20:53
746f8b7

What's Changed

Breaking Changes

  • Require Elixir 1.18 or later
  • Remove deprecated Ethers.send/2, Ethers.send!/2 and the :send action of Ethers.batch/2
  • Remove deprecated Ethers.Utils.maybe_add_gas_limit/2 and Ethers.Transaction.calculate_y_parity_or_v/2
  • Remove the SKIP_EX_KECCAK environment variable
  • Fetched transactions hold access_list and blob_versioned_hashes as binaries instead of raw RPC values
  • Ethers.Transaction.to_rpc_map/1 emits access lists as {address, storageKeys} objects
  • Ethers.Transaction.to_rpc_map/1 emits EIP-7702 authorization r and s as quantities
  • Ethers.Transaction.to_rpc_map/1 raises ArgumentError for unsupported values
  • Transaction new/1 returns {:error, :missing_<field>} for missing required fields instead of raising
  • Stricter transaction new/1 validation (to, access lists, blob versioned hashes, EIP-7702 authorizations)
  • Ethers.Transaction.Signed.from_address/1 now returns {:ok, address}
  • Ethers.Transaction.decode/1 returns {:error, reason} instead of raising on malformed input
  • Unsigned EIP-155 legacy transactions decode as %Legacy{} instead of %Signed{}
  • All returned addresses are EIP-55 checksummed, including Ethers.Event address and Ethers.deployed_address/2
  • Ethers.get_transaction_receipt/2 returns an Ethers.Receipt struct instead of the raw RPC map
  • Ethers.Transaction.from_rpc_map/1 and Ethers.get_transaction/2 return Ethers.Transaction.Unknown for unregistered transaction types instead of {:error, :unsupported_type}
  • Ethers.Transaction.decode/1 returns Ethers.Transaction.Unknown for unregistered transaction types instead of {:error, :unsupported_transaction_type}

Enhancements

  • Add Ethers.config/1 (eth_config, EIP-7910) returning Ethers.ForkConfig structs
  • Update dependencies
  • Allow idna 8.x
  • Add Ethers.get_code/2 (eth_getCode)
  • Add Ethers.get_delegation/2 and Ethers.Authorization.parse_delegation/1 to inspect EIP-7702 delegations
  • Warn about gas limits above the EIP-7825 cap, enforce a cap with :max_transaction_gas
  • Add Ethers.Receipt struct with decoded transaction receipt fields
  • Add Ethers.Receipt.decode_logs/2 to decode receipt logs with event filters
  • Add Ethers.Event.eth_transfer_log?/1 and Ethers.Event.system_address/0 to identify EIP-7708 ETH transfer logs
  • Document that Transfer event filters also match EIP-7708 ETH transfer logs
  • Add Ethers.Transaction.Unknown for unregistered transaction types like OP-stack deposit transactions
  • Restructure the documentation into a shorter README, topic guides, a cheatsheet and a Livebook tour
  • Add usage-rules.md for coding agents and ship the guides in the package
  • Document the Ethers.RpcClient.Adapter behaviour for custom RPC clients

Bug Fixes

  • Fix re-encoding and hashing of fetched transactions with access lists
  • Fix access lists in JSON-RPC params being rejected by geth
  • Support signed transactions in Ethers.Transaction.to_rpc_map/1
  • Support pre-EIP-155 legacy transactions without chain_id
  • Fix access_list and blob_versioned_hashes typespecs of typed transactions
  • Fix transaction docs (supported types and options of Ethers.send_transaction/2, EIP-4844 limitations)
  • Fix sender recovery for signatures with leading zero bytes in r or s
  • Fix Ethers.Transaction.Signed.from_address/1 raising on out-of-range recovery ids
  • Fix :deployed_address in Ethers.batch/2
  • Compare the :signer_opts from address with the transaction from case-insensitively
  • Fix the http_options timeout example in the configuration guide
  • Fix :get_balance requests in Ethers.batch/2
  • Fix the :get_transaction_receipt action of Ethers.batch/2

Pull Requests in Release

  • Fix CI: install pinned solc from official binaries, fail loudly in test prep by @alisinabh in #298
  • Fix access lists, signed transactions and authorizations in Transaction RPC maps by @alisinabh in #299
  • Add weekly CI canary against the latest solc and Foundry by @alisinabh in #303
  • Unify transaction new/1 validation and accept pre-EIP-155 legacy transactions by @alisinabh in #300
  • Add eth_config (EIP-7910) support by @alisinabh in #295
  • Fix inaccurate typespecs and docs in the transaction modules by @alisinabh in #296
  • Fix transaction decoding errors and sender recovery by @alisinabh in #297
  • Update all dependencies and allow idna 8.x by @alisinabh in #304
  • Return EIP-55 checksummed addresses everywhere by @alisinabh in #312
  • Fix the http_options timeout example in the configuration guide by @alisinabh in #306
  • Add Ethers.get_code/2 and EIP-7702 delegation helpers by @alisinabh in #305
  • Check transaction gas limits against the EIP-7825 cap by @alisinabh in #307
  • Add a decoded Ethers.Receipt struct for transaction receipts by @alisinabh in #310
  • Document EIP-7708 ETH transfer logs and add helpers to identify them by @alisinabh in #309
  • Return Ethers.Transaction.Unknown for unregistered transaction types by @alisinabh in #308
  • Redesign the README and move the manual into guides by @alisinabh in #313
  • Bump ex_doc from 0.40.4 to 0.40.5 by @dependabot[bot] in #315
  • Bump plug from 1.20.3 to 1.20.4 by @dependabot[bot] in #314
  • Remove deprecated API, require Elixir 1.18 and document the RPC client adapter by @alisinabh in #316
  • Release 1.0.0 by @alisinabh in #317

Full Changelog: v0.8.0...v1.0.0