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

KarpelesLab / libwallet / 24422014076
25%

Build:
DEFAULT BRANCH: master
Ran 14 Apr 2026 08:54PM UTC
Jobs 1
Files 79
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

14 Apr 2026 08:44PM UTC coverage: 22.117% (-0.4%) from 22.552%
24422014076

push

github

MagicalTux
simulate: use erigon debug_traceCall for depth-N transfer extraction

The previous EVM simulator only ran eth_call + eth_estimateGas and
decoded the top-level calldata. That misses the anti-drainer signal:
a dApp can send innocuous-looking calldata (e.g. increaseAllowance
for a tiny amount) that triggers a massive Transfer via a nested
call, and the user wouldn't see it.

Erigon v3 exposes debug_traceCall with the callTracer. Upgrade:

- Primary path: debug_traceCall(call, "latest", {tracer:"callTracer",
  tracerConfig:{withLog:true}}) → walk the full call frame tree,
  pull out every ERC-20 Transfer + Approval event and every
  value-carrying CALL/CREATE. Populates a new SimulationResult.Effects
  list — one Effect per transfer the tx will actually cause.

- Gas estimate comes from the root frame's gasUsed (no separate
  eth_estimateGas round trip).

- Revert reason decoded from the callTracer's revertReason field
  (standard Error(string) ABI) rather than parsed from the
  eth_call error string.

- Second pass: debug_traceCall(... {tracer:"prestateTracer",
  tracerConfig:{diffMode:true}}) → native-balance deltas for every
  touched address. Populates SimulationResult.BalanceChanges as
  signed decimal wei. Negative = net spend (includes gas cost).

- Fallback chain preserved: if the node doesn't expose debug_*,
  fall back to plain eth_call + eth_estimateGas and synthesize a
  single Effect from the top-level decoded call.

Dart:
- TransactionSimulation.effects (List<Effect>) and balanceChanges
  (List<BalanceChange>) exposed + exported.
- Effect has isNative / isErc20Transfer / isErc20Approve getters.
- BalanceChange has an isLoss convenience.

107 tests pass.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

0 of 187 new or added lines in 1 file covered. (0.0%)

2098 of 9486 relevant lines covered (22.12%)

2.66 hits per line

Uncovered Changes

Lines Coverage ∆ File
187
0.74
-0.61% wlttx/simulate.go
Jobs
ID Job ID Ran Files Coverage
1 24422014076.1 14 Apr 2026 08:54PM UTC 79
22.12
GitHub Action Run
Source Files on build 24422014076
  • Tree
  • List 79
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #24422014076
  • 97f87d5d on github
  • Prev Build on master (#24421574149)
  • Next Build on master (#24424621479)
  • 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