Skip to content

Fix gas estimation for Dynamic wallet contract writes#3578

Merged
tom2drum merged 2 commits into
mainfrom
tom2drum/dynamic-gas-estimation
Jul 21, 2026
Merged

Fix gas estimation for Dynamic wallet contract writes#3578
tom2drum merged 2 commits into
mainfrom
tom2drum/dynamic-gas-estimation

Conversation

@tom2drum

Copy link
Copy Markdown
Collaborator

Description and Related Issue(s)

Dynamic WaaS wallets were sending contract write transactions with gas: 0, which broke writes. This PR estimates gas via the public client and passes a buffered limit instead.

Proposed Changes

  • Estimate gas for Dynamic WaaS writes (dynamicwaas) instead of hardcoding 0
  • Share encoding + estimation in estimateTransactionGas (viem public client, so disconnected read/simulate still work)
  • Apply a 20% gas buffer on Dynamic writes to reduce OOG between estimate and inclusion
  • Only run gas estimation on public-client paths that need it (simulate / fallback / receive), not plain reads

Breaking or Incompatible Changes

None.

Additional Information

N/A

Checklist for PR author

  • I have tested these changes locally.
  • I added tests to cover any new functionality, following this guide
  • Whenever I fix a bug, I include a regression test to ensure that the bug does not reappear silently.
  • If I have added a feature or functionality that is not privacy-compliant (e.g., tracking, analytics, third-party services), I have disabled it for private mode.
  • If I have added, changed, renamed, or removed an environment variable
    • I updated the list of environment variables in the documentation
    • I made the necessary changes to the validator script according to the guide
    • I added "ENVs" label to this pull request

Made with Cursor

@coderabbitai

coderabbitai Bot commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on this repository. To trigger a review, include @coderabbitai review in the PR description. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 3b8c4f22-f73b-4974-b3bf-7b73d01ae6e1

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@tom2drum tom2drum added the bug Something isn't working label Jul 21, 2026
@tom2drum
tom2drum merged commit aa1fb5a into main Jul 21, 2026
12 checks passed
@tom2drum
tom2drum deleted the tom2drum/dynamic-gas-estimation branch July 21, 2026 09:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant