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

ExWeb3 / elixir_ethers / 19bb78c70f501bb42929d18a9f7dd285fd9a1295
92%

Build:
DEFAULT BRANCH: main
Ran 16 Nov 2026 05:47AM UTC
Jobs 1
Files 45
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

16 Nov 2026 05:46AM UTC coverage: 92.072% (+0.1%) from 91.935%
19bb78c70f501bb42929d18a9f7dd285fd9a1295

push

github

web-flow
Add a decoded Ethers.Receipt struct for transaction receipts (#310)

* Return an Ethers.Receipt struct from get_transaction_receipt/2

`Ethers.get_transaction_receipt/2` returned the node's JSON untouched: a
string-keyed map with hex quantities. It now returns an `Ethers.Receipt`
struct decoded after the execution-apis `ReceiptInfo` schema:

- quantities (including `type`, the EIP-2718 type id, also for types
  the library has no module for) are integers
- `status` is `:success | :failure`, `nil` for pre-Byzantium receipts,
  which carry `root` instead
- addresses are checksummed, hashes stay `0x` hex strings, `logs_bloom`
  is a binary and `logs` are kept as returned by the node
- omitted members are `nil`, unknown members are ignored and the node's
  map is kept in `raw` for chain specific members (OP Stack L1 fees...)
- a member not matching the schema returns
  `{:error, {:invalid_receipt_member, member}}` instead of raising

The `:get_transaction_receipt` batch action now works and returns the
same struct: it was not mapped to `eth_getTransactionReceipt`, so the
node answered "Method not found".

This is a breaking change for 1.0.0.

Issue: #294

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012hqvX8DbbP3mgXy5hVEDc6

* Add Ethers.Receipt.decode_logs/2

A receipt holds the logs of every contract the transaction called, so
its logs are kept as returned by the node. `decode_logs/2` decodes the
ones matching an event filter, a combined event filter or a contract's
EventFilters module into `%Ethers.Event{}` structs, in emission order.

A log matches like with `eth_getLogs` (topic_0, indexed argument values
with `nil` as a wildcard, the filter's default address compared case
insensitively) plus two checks receipts need: the topic count must equal
1 + the number of indexed arguments, so ERC-20 and ERC-721 `Transfer`
logs are not decoded as each other, and logs whose data does not ABI
decode as the... (continued)

47 of 50 new or added lines in 2 files covered. (94.0%)

2044 of 2220 relevant lines covered (92.07%)

101.5 hits per line

Uncovered Changes

Lines Coverage ∆ File
3
93.88
lib/ethers/receipt.ex
Jobs
ID Job ID Ran Files Coverage
1 19bb78c70f501bb42929d18a9f7dd285fd9a1295.1 16 Nov 2026 05:47AM UTC 45
92.07
GitHub Action Run
Source Files on build 19bb78c70f501bb42929d18a9f7dd285fd9a1295
  • Tree
  • List 45
  • Changed 3
  • Source Changed 0
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 19bb78c7 on github
  • Prev Build on main (#C590E562...)
  • Next Build on main (#FCB5F48E...)
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