Skip to content

Remove deprecated API, require Elixir 1.18 and document the RPC client adapter - #316

Merged
alisinabh merged 1 commit into
mainfrom
chore/pre-1.0-cleanup
Nov 23, 2026
Merged

alisinabh merged 1 commit into
mainfrom
chore/pre-1.0-cleanup

Conversation

@alisinabh

Copy link
Copy Markdown
Member

Cleanup ahead of 1.0.0: the changes that are easier to make before the first stable release than after it.

Breaking changes

All three have an entry in guides/upgrading.md under "Upgrading to 1.0.0".

Deprecated functions are removed

These were deprecated in 0.6.0 (January 2025).

Removed Use instead
Ethers.send/2, Ethers.send!/2 Ethers.send_transaction/2, Ethers.send_transaction!/2
:send action of Ethers.batch/2 :send_transaction
Ethers.Utils.maybe_add_gas_limit/2 Ethers.estimate_gas/2
Ethers.Transaction.calculate_y_parity_or_v/2 The same function of Ethers.Transaction.Signed

Elixir 1.18 or later

mix.exs asked for ~> 1.15, but CI only ran 1.19 and 1.20, and the locked ethereumex 0.15 already needs 1.16. The floor is now 1.18, and CI has a 1.18 / OTP 27 row so it stays tested.

SKIP_EX_KECCAK is removed

The flag was attached to ex_abi instead of ex_keccak, and the published package lists both as required, so it never made ex_keccak optional. The :keccak_module configuration is unchanged.

Ethers.RpcClient.Adapter is documented

The configuration guide tells users to implement this behaviour for a custom :rpc_client, but the module had @moduledoc false. It now documents how to configure and write an adapter, what the arguments and return values look like, and which callbacks are optional and what happens without them. It has its own "RPC Client" group in the docs sidebar.

Three specs are corrected while documenting them:

  • eth_get_block_by_number/3, eth_get_transaction_by_hash/2 and eth_get_transaction_receipt/2 may return {:ok, nil}, which Ethers already handles.
  • batch_request/2 takes [term()] params (transactions are maps) and returns a list of {:ok, result} or {:error, reason}.

The default adapter (the one backed by Ethereumex) stays hidden.

Housekeeping

  • mix docs builds without warnings (it had 14). The changelog and the upgrade guide are exempt from undefined-reference warnings, since they name removed functions, and Ethereumex.HttpClient is not autolinked, since Ethereumex does not document it.
  • .gitignore ignores ethers-*.tar instead of the stale elixirium-*.tar.
  • Ethers.Transaction.cap_gas_limit/3 (@doc false) is private now that its only outside caller is gone.

Testing

  • mix compile --warnings-as-errors, mix format --check-formatted, mix credo --strict and mix dialyzer pass.
  • The test suite was run on Elixir 1.20.1 / OTP 29 and on Elixir 1.18.0 / OTP 27: 738 of 739 tests pass on both. The remaining one (create_access_list/2 returns the node error when the simulated transaction reverts) fails on main as well against a local anvil 1.6.0. CI pins anvil 1.9.0, so CI is the reference for it.

🤖 Generated with Claude Code

https://claude.ai/code/session_012hqvX8fogANB2K8w3BGdBR

…t adapter

Cleanup ahead of 1.0.0:

- Remove the functions deprecated in 0.6.0: Ethers.send/2, Ethers.send!/2,
  the :send action of Ethers.batch/2, Ethers.Utils.maybe_add_gas_limit/2 and
  Ethers.Transaction.calculate_y_parity_or_v/2
- Require Elixir 1.18 and test it in CI
- Drop the SKIP_EX_KECCAK environment variable, which never made ex_keccak
  optional
- Document the Ethers.RpcClient.Adapter behaviour
- Build the docs without warnings and fix the tarball pattern in .gitignore

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012hqvX8fogANB2K8w3BGdBR
@alisinabh
alisinabh merged commit 5d15e38 into main Nov 23, 2026
6 checks passed
@alisinabh
alisinabh deleted the chore/pre-1.0-cleanup branch November 23, 2026 20:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant