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

safe-global / safe-core-sdk / 25915283797
80%

Build:
DEFAULT BRANCH: main
Ran 15 May 2026 11:27AM UTC
Jobs 1
Files 42
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 May 2026 11:25AM UTC coverage: 78.235%. Remained the same
25915283797

push

github

web-flow
fix(protocol-kit): refine baseGas estimation against execTransaction (#1336)

* fix(protocol-kit): refine baseGas estimation against execTransaction

Aligns `estimateTxBaseGas` with the current Safe `execTransaction`
implementation so refunds (especially ERC20) and event emission are
not under-counted, which previously could lead to relayer-side reverts.

- Replace the flat `TRANSFER_GAS_COST = 32_000` with `calculateRefundGas`,
  which models `handlePayment` per gas token:
    - native ETH: cold address access (EIP-2929) + value transfer, plus
      NEWACCOUNT (EIP-161) when the receiver is a fresh account
    - ERC20: typical transfer cost, plus the SSTORE 0->non-zero delta
      (EIP-2200) when the receiver has no prior token balance
      (detected via `balanceOf`; reverts treated as new-holder)
    - returns 0 when `gasPrice == 0` (handlePayment is gated by it)
- Add `calculateExecTransactionEventsGas` accounting for
  `ExecutionSuccess`/`ExecutionFailure` (always emitted) and
  `SafeMultiSigTransaction` (L2 only).
- Drop the stale pre-Istanbul `+64/+128` adjustment for the baseGas
  calldata placeholder, replacing it with the correct delta based on
  the byte count of the final value, applied at the end of the
  function so the count reflects all add-ons.
- Break the previously-bundled overhead into
  `INTRINSIC_TX_GAS_COST` + `PRE_EXEC_STORAGE_GAS_COST` +
  `MISC_OVERHEAD_GAS_COST` for traceability and headroom.
- Add a TODO for transaction guard hooks (cost depends on the guard
  implementation).
- Tests: split the token-refund case into existing-holder,
  new-holder, and reverting-balanceOf scenarios (each verifying
  the +17k delta).

Refs: PLA-1429

* Fix tests

- Remove 500 of gas for `abi.encode` (absorbed by MISC_OVERHEAD_GAS_COST)

* Fix baseGas encoding gas on tests

* Improve docs

* Update packages/protocol-kit/src/utils/transactions/gas.ts

Co-authored-by: Daniel <25051234+dasanra@users.noreply.github.com>

261 of 409 branches covered (63.81%)

Branch coverage included in aggregate %.

918 of 1098 relevant lines covered (83.61%)

4.82 hits per line

Subprojects
ID Flag name Job ID Ran Files Coverage
1 /jobs/181827207 25915283797.1 15 May 2026 11:27AM UTC 42
78.23
GitHub Action Run
Source Files on build 25915283797
  • Tree
  • List 42
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #25915283797
  • 50f1e1d3 on github
  • Prev Build on main (#25684572925)
  • Next Build on main (#26088363737)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc