Skip to content

feat: adds test for webauthn gas estimator #1576

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 7 commits into
base: linna/webauth-tests
Choose a base branch
from

Conversation

linnall
Copy link
Collaborator

@linnall linnall commented Apr 30, 2025

Pull Request Checklist


PR-Codex overview

This PR introduces a new test for estimating gas when sending User Operations (UOs) using a webauthn account, incorporating a 2000 gas buffer. It utilizes the webauthnGasEstimator from the @aa-sdk/core package to modify gas estimates.

Detailed summary

  • Added import for webauthnGasEstimator from @aa-sdk/core.
  • Created a test to estimate gas for sending UOs with a webauthn account.
  • Set up a connected provider and adjusted the balance for testing.
  • Built and signed a User Operation (UO) with a modified gas limit.
  • Sent both the original and modified gas UOs.

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

Copy link

vercel bot commented Apr 30, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
aa-sdk-site ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 30, 2025 8:29pm
aa-sdk-ui-demo ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 30, 2025 8:29pm

@@ -71,6 +71,7 @@
import { generatePrivateKey, privateKeyToAccount } from "viem/accounts";
import { mintableERC20Abi, mintableERC20Bytecode } from "../utils.js";
import { type P256Credential } from "viem/account-abstraction";
import { webauthnGasEstimator } from "@aa-sdk/core";
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [eslint] <@typescript-eslint/no-unused-vars> reported by reviewdog 🐶
'webauthnGasEstimator' is defined but never used.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants