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

safe-global / safe-modules / 9677603386
100%
master: 85%

Build:
Build:
LAST BUILD BRANCH: main
DEFAULT BRANCH: master
Ran 26 Jun 2024 10:03AM UTC
Jobs 1
Files 3
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

26 Jun 2024 10:01AM UTC coverage: 100.0%. Remained the same
9677603386

push

github

web-flow
Add a new logUserOperationGas function and improve user operation gas estimation (#446)

This PR fixes https://github.com/safe-global/safe-modules/issues/425 by
introducing a new `estimateUserOperationGas` function, which runs the
simulation using AA's reference `EntryPointSimulations` contract to
ensure we use correct estimations for our test user operations.
Previously, we set them to arbitrarily high numbers to make the tests
pass. I also improved a couple of tests where we set `maxFeePerGas` to 0
by actually obtaining the prefund value the account paid for the
operation.

The code was mostly borrowed from the account-abstraction reference
bundler and is not suitable for use in a production environment.

It also includes the `logUserOperationGas` function, which fixes the
core issue of displaying the actual gas used by the user operation.

Example log:
```
  Gas Metering
    Safe Deployment + Enabling 4337 Module
           Used 418349 gas (Account or Paymaster) for >Safe with 4337 Module Deployment<
           Used 415210 gas (Transaction) for >Safe with 4337 Module Deployment<
      ✔ Safe with 4337 Module Deployment (137ms)
    Safe Deployment + Enabling 4337 Module + Native Transfers
           Used 449725 gas (Account or Paymaster) for >Safe with 4337 Module Deployment + Native Transfer<
           Used 447665 gas (Transaction) for >Safe with 4337 Module Deployment + Native Transfer<
      ✔ Safe with 4337 Module Deployment + Native Transfer
           Used 191691 gas (Account or Paymaster) for >Safe with 4337 Module Native Transfer<
           Used 182078 gas (Transaction) for >Safe with 4337 Module Native Transfer<
      ✔ Safe with 4337 Module Native Transfer
    Safe Deployment + Enabling 4337 Module + Token Operations
           Used 435081 gas (Account or Paymaster) for >Safe with 4337 Module Deployment + ERC20 Transfer<
           Used 426148 gas (Transaction) for >Safe with 4337 Module Deployment + ERC20 ... (continued)

20 of 20 branches covered (100.0%)

Branch coverage included in aggregate %.

39 of 39 relevant lines covered (100.0%)

36.62 hits per line

Jobs
ID Job ID Ran Files Coverage
1 9677603386.1 26 Jun 2024 10:03AM UTC 3
100.0
GitHub Action Run
Source Files on build 9677603386
  • Tree
  • List 3
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • b4a0b608 on github
  • Prev Build on main (#9668894213)
  • Next Build on main (#9710872352)
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

© 2025 Coveralls, Inc