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

Full test coverage #178

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

0xCooki
Copy link

@0xCooki 0xCooki commented May 26, 2024

TLDR

  • Increased test coverage to 100% for Branches and Lines.
  • Revealed superfluous require branch on line 96 of contracts/VerifyingPaymaster.sol.

Coverage

Extended the hardhat tests to increase code coverage to 100% for all metrics.

Before
before
After
after

Unnecessary Require Branch in VerifyingPaymaster.sol

As the increased test coverage to should revert on invalid signature test reveals, even if a signature with length 64 is passed to the simulateValidation function on the entryPoint contract, and subsequently passes the require check on line 96, the call will still revert due to the OpenZeppelin ECDSA library requiring that the signature length be equal to 65. Thus, the branch in this require check can be removed, as it is superfluous.

No changes to the contracts/VerifyingPaymaster.sol contract has been made due to extant live deployments of this contract, and the desire to maintain consistency between this repo and the canonical contracts.

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.

1 participant