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

safe-global / safe-decoder-service / 35327124152
91%

Build:
DEFAULT BRANCH: main
Ran 18 Sep 2026 09:00AM UTC
Jobs 1
Files 68
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

18 Sep 2026 08:58AM UTC coverage: 91.031% (+0.06%) from 90.968%
35327124152

push

github

web-flow
fix: Skip an ABI function that cannot be indexed (#351)

* fix: Skip an ABI function that cannot be indexed

Rows in the abi table come from third party sources, so an element can be
missing the fields a selector needs. selectors_from_abis read fn_abi["type"]
and let the exception out, so one bad row aborted the whole batch. At startup
that reached the background loader in main.py, which retries forever, so
/health/ready stayed at 503 and the pod never joined the Service. The reload
path already tolerated a bad row since PLA-1954, startup did not.

The guard is now per element and catches everything. Which exception a
malformed element raises is a detail of the libraries that parse it, and the
invariant is that no single element can leave the decoder without a selector
map. Per element also means losing one method instead of every function of a
contract, which is what a per row guard would drop.

A missing type now means "function", as the ABI spec says. It has to be filled
in because function_abi_to_4byte_selector reads the key and raises without it.
Elements with no name are left out: abi_to_signature invents a signature for
them, and decoding one raises KeyError later, outside DataDecoderException, so
the request returns 500.

The per row handler in load_new_abis is gone. selectors_from_abis is the single
funnel for startup, reload and the per address lookup, so the guard belongs
there and only there.

The malformed_abi mock was [{"name": "buyDroid"}], which is now a valid ABI, so
it moves to a tuple input without components.

Refs PLA-2002

* Update app/services/data_decoder.py

Co-authored-by: Felipe Alvarado <felipe@safe.global>

* style: Format the warning added from the review suggestion

---------

Co-authored-by: Felipe Alvarado <felipe@safe.global>

20 of 20 new or added lines in 2 files covered. (100.0%)

1 existing line in 1 file now uncovered.

1421 of 1561 relevant lines covered (91.03%)

0.91 hits per line

Coverage Regressions

Lines Coverage ∆ File
1
95.8
0.18% app/services/data_decoder.py
Jobs
ID Job ID Ran Files Coverage
1 35327124152.1 18 Sep 2026 09:00AM UTC 68
91.03
GitHub Action Run
Source Files on build 35327124152
  • Tree
  • List 68
  • Changed 2
  • Source Changed 0
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • bb435185 on github
  • Prev Build on main (#35231585975)
  • Delete
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