Skip to content
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

Add Gas Metering Tests for WebAuthn Signers #201

Merged
merged 5 commits into from
Jan 12, 2024
Merged

Conversation

nlordell
Copy link
Collaborator

Fixes #173

This PR adds tests that execute user operations on Safes with WebAuthn signers over the reference entrypoint and prints out the gas usage. It includes both Safe deployment as well as regular user operation usage.

The results are in:

  Safe4337Module - WebAuthn Owner
    executeUserOp - new account
           Used 2293926 gas for >WebAuthn signer Safe deployment<
      ✔ should execute user operation (357ms)
    executeUserOp - existing account
           Used 374142 gas for >WebAuthn signer Safe operation<
      ✔ should execute user operation (229ms)

@nlordell nlordell requested a review from a team as a code owner January 10, 2024 13:07
@nlordell nlordell requested review from rmeissner, akshay-ap, mmv08 and remedcu and removed request for a team January 10, 2024 13:07
@@ -200,76 +197,4 @@ describe('E2E - WebAuthn Signers', () => {
const safeInstance = await ethers.getContractAt('SafeL2', safe)
expect(await safeInstance.getOwners()).to.deep.equal([signerAddress])
})

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Moved to utils/webauthn.

@coveralls
Copy link

coveralls commented Jan 10, 2024

Pull Request Test Coverage Report for Build 7476607332

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 100.0%

Totals Coverage Status
Change from base Build 7459198498: 0.0%
Covered Lines: 33
Relevant Lines: 33

💛 - Coveralls

Copy link
Member

@mmv08 mmv08 left a comment

Choose a reason for hiding this comment

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

Spenny

@mmv08 mmv08 merged commit 77858d5 into master Jan 12, 2024
10 checks passed
@mmv08 mmv08 deleted the gas-metering-for-webauthn branch January 12, 2024 10:32
@github-actions github-actions bot locked and limited conversation to collaborators Jan 12, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Gas profile WebAuthn FCL signer implementation
3 participants