Repository navigation
What's Changed
Breaking Changes
- Require Elixir 1.18 or later
- Remove deprecated
Ethers.send/2,Ethers.send!/2and the:sendaction ofEthers.batch/2 - Remove deprecated
Ethers.Utils.maybe_add_gas_limit/2andEthers.Transaction.calculate_y_parity_or_v/2 - Remove the
SKIP_EX_KECCAKenvironment variable - Fetched transactions hold
access_listandblob_versioned_hashesas binaries instead of raw RPC values Ethers.Transaction.to_rpc_map/1emits access lists as{address, storageKeys}objectsEthers.Transaction.to_rpc_map/1emits EIP-7702 authorizationrandsas quantitiesEthers.Transaction.to_rpc_map/1raisesArgumentErrorfor unsupported values- Transaction
new/1returns{:error, :missing_<field>}for missing required fields instead of raising - Stricter transaction
new/1validation (to, access lists, blob versioned hashes, EIP-7702 authorizations) Ethers.Transaction.Signed.from_address/1now returns{:ok, address}Ethers.Transaction.decode/1returns{: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.EventaddressandEthers.deployed_address/2 Ethers.get_transaction_receipt/2returns anEthers.Receiptstruct instead of the raw RPC mapEthers.Transaction.from_rpc_map/1andEthers.get_transaction/2returnEthers.Transaction.Unknownfor unregistered transaction types instead of{:error, :unsupported_type}Ethers.Transaction.decode/1returnsEthers.Transaction.Unknownfor unregistered transaction types instead of{:error, :unsupported_transaction_type}
Enhancements
- Add
Ethers.config/1(eth_config, EIP-7910) returningEthers.ForkConfigstructs - Update dependencies
- Allow
idna8.x - Add
Ethers.get_code/2(eth_getCode) - Add
Ethers.get_delegation/2andEthers.Authorization.parse_delegation/1to inspect EIP-7702 delegations - Warn about gas limits above the EIP-7825 cap, enforce a cap with
:max_transaction_gas - Add
Ethers.Receiptstruct with decoded transaction receipt fields - Add
Ethers.Receipt.decode_logs/2to decode receipt logs with event filters - Add
Ethers.Event.eth_transfer_log?/1andEthers.Event.system_address/0to identify EIP-7708 ETH transfer logs - Document that
Transferevent filters also match EIP-7708 ETH transfer logs - Add
Ethers.Transaction.Unknownfor 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.mdfor coding agents and ship the guides in the package - Document the
Ethers.RpcClient.Adapterbehaviour 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_listandblob_versioned_hashestypespecs 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
rors - Fix
Ethers.Transaction.Signed.from_address/1raising on out-of-range recovery ids - Fix
:deployed_addressinEthers.batch/2 - Compare the
:signer_optsfromaddress with the transactionfromcase-insensitively - Fix the
http_optionstimeout example in the configuration guide - Fix
:get_balancerequests inEthers.batch/2 - Fix the
:get_transaction_receiptaction ofEthers.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