Repository navigation
Remove deprecated API, require Elixir 1.18 and document the RPC client adapter - #316
Merged
Merged
Conversation
…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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.mdunder "Upgrading to 1.0.0".Deprecated functions are removed
These were deprecated in 0.6.0 (January 2025).
Ethers.send/2,Ethers.send!/2Ethers.send_transaction/2,Ethers.send_transaction!/2:sendaction ofEthers.batch/2:send_transactionEthers.Utils.maybe_add_gas_limit/2Ethers.estimate_gas/2Ethers.Transaction.calculate_y_parity_or_v/2Ethers.Transaction.SignedElixir 1.18 or later
mix.exsasked for~> 1.15, but CI only ran 1.19 and 1.20, and the lockedethereumex0.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_KECCAKis removedThe flag was attached to
ex_abiinstead ofex_keccak, and the published package lists both as required, so it never madeex_keccakoptional. The:keccak_moduleconfiguration is unchanged.Ethers.RpcClient.Adapteris documentedThe 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/2andeth_get_transaction_receipt/2may return{:ok, nil}, which Ethers already handles.batch_request/2takes[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 docsbuilds without warnings (it had 14). The changelog and the upgrade guide are exempt from undefined-reference warnings, since they name removed functions, andEthereumex.HttpClientis not autolinked, since Ethereumex does not document it..gitignoreignoresethers-*.tarinstead of the staleelixirium-*.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 --strictandmix dialyzerpass.create_access_list/2 returns the node error when the simulated transaction reverts) fails onmainas 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