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

KarpelesLab / libwallet / 24421574149
25%

Build:
DEFAULT BRANCH: master
Ran 14 Apr 2026 08:42PM 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:34PM UTC coverage: 22.552% (-0.5%) from 23.073%
24421574149

push

github

MagicalTux
Transaction:simulate — decoded preview per chain

New wlttx/simulate.go exposes `Transaction:simulate`, returning a
structured SimulationResult for the approval sheet. Covers:

EVM:
- eth_call on the current network; revert → willRevert + decoded
  Error(string) reason
- On success: eth_estimateGas → gasEstimate
- Calldata decoding: recognizes ERC-20 transfer / approve (common
  drainer patterns) and surfaces decodedMethod + typed decodedArgs
  (token, to / spender, amount). Unknown selectors fall back to
  {selector, data} so the host can still display something.
- Plain native transfer (no data, non-zero amount) → native_transfer.

Solana:
- Wraps simulateTransaction (commitment: processed, sigVerify: false)
- Returns program logs, unitsConsumed, and any error encoded as JSON
- Includes native_transfer decoding when amount is set.

Bitcoin-family:
- Parses tx.Raw via outscript.BtcTx.UnmarshalBinary
- Returns per-input (txid, vout) and per-output (amount, script hex)
- Fee surfaced when the tx was built by libwallet (tx.Fee already set).

Dart:
- TransactionSimulation model + BitcoinIO
- TransactionApi.simulate(UnsignedTransaction) → TransactionSimulation
- Barrel export + integration test covering ERC-20 transfer calldata
  decoding (runs even when the RPC is unreachable in CI).

api.md entry added. 107 Dart tests pass.

v1 scope notes:
- ERC-721 / ERC-1155 decoding not implemented yet (follow-up).
- Bitcoin output addresses not resolved; raw script hex is surfaced
  instead (outscript doesn't expose a script→address decoder).
- Bitcoin input amounts require a per-input prev-txo RPC and aren't
  fetched in v1 — fee is instead taken from the known tx.Fee.

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

3 of 223 new or added lines in 1 file covered. (1.35%)

2098 of 9303 relevant lines covered (22.55%)

2.72 hits per line

Uncovered Changes

Lines Coverage ∆ File
220
1.35
wlttx/simulate.go
Jobs
ID Job ID Ran Files Coverage
1 24421574149.1 14 Apr 2026 08:42PM UTC 79
22.55
GitHub Action Run
Source Files on build 24421574149
  • Tree
  • List 79
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #24421574149
  • 4b998981 on github
  • Prev Build on master (#24421247051)
  • Next Build on master (#24422014076)
  • 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