• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

ExWeb3 / elixir_ethers / 0d126542b4c6dda2b805c7286fac735e38a88f55
92%

Build:
DEFAULT BRANCH: main
Ran 15 Nov 2026 08:56PM UTC
Jobs 1
Files 44
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

15 Nov 2026 08:55PM UTC coverage: 91.639% (+0.7%) from 90.931%
0d126542b4c6dda2b805c7286fac735e38a88f55

push

github

web-flow
Fix transaction decoding errors and sender recovery (#297)

* Left-pad signature r and s before recovering the sender

`Transaction.Signed.from_address/1` passed `signature_r` / `signature_s`
to secp256k1 recovery as-is. RLP decoding and JSON-RPC quantities strip
leading zero bytes, so about 1 in 128 signatures failed with
`{:error, :invalid_r}` or `{:error, :invalid_s}`. Pad both to 32 bytes,
as `Ethers.Authorization.Signed.recover_authority/1` already does.

Issue: #280

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* Return error tuples from Transaction.decode/1 on malformed input

`Transaction.decode/1` raised `ExRLP.DecodeError`, `MatchError`,
`FunctionClauseError` or `ArgumentError` on most malformed input. It
now returns:

- `{:error, :invalid_rlp}` for empty, truncated or otherwise invalid
  RLP, and for trailing bytes after the transaction list (ExRLP mixes
  them into the decoded result, so the list header is checked first).
- `{:error, :unsupported_transaction_type}` for a first byte in
  0x00..0x7f that is not a registered type, instead of handing it to
  the legacy decoder.
- `{:error, :transaction_decode_failed}` for RLP that is not a list of
  transaction fields, or fields of the wrong kind (a list where a
  binary is expected and vice versa), including access list entries
  and blob versioned hashes, which must also be 20/32-byte values.
- `{:error, :invalid_address}` for a `to` that is neither empty nor 20
  bytes, as type-4 transactions already did.
- `{:error, :authorization_decode_failed}` and
  `{:error, :signature_decode_failed}` for malformed authorization
  tuples and signature fields.

Issue: #285

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* Decode unsigned EIP-155 legacy transactions as unsigned

An unsigned legacy transaction with a chain id is encoded as
`rlp([..., chain_id, 0, 0])`. `Transaction.decode/1` read those three
trailing items as `[v, r, s]` and returned a `%Signed{}` with an empty
sig... (continued)

50 of 52 new or added lines in 9 files covered. (96.15%)

1940 of 2117 relevant lines covered (91.64%)

69.28 hits per line

Uncovered Changes

Lines Coverage ∆ File
1
93.71
2.66% lib/ethers/transaction.ex
1
90.0
lib/ethers/transaction/decode_helpers.ex
Jobs
ID Job ID Ran Files Coverage
1 0d126542b4c6dda2b805c7286fac735e38a88f55.1 15 Nov 2026 08:56PM UTC 44
91.64
GitHub Action Run
Source Files on build 0d126542b4c6dda2b805c7286fac735e38a88f55
  • Tree
  • List 44
  • Changed 9
  • Source Changed 0
  • Coverage Changed 9
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 0d126542 on github
  • Prev Build on main (#96B7156B...)
  • Next Build on main (#15633015...)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc