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

Fix: Remove gasleft in setupModules, add erc4337 compatibility test #572

Merged
merged 1 commit into from
May 26, 2023

Conversation

mmv08
Copy link
Member

@mmv08 mmv08 commented May 24, 2023

This PR:

  • Fixes ERC-4337 Factory Support for setupModules() #568 by replacing the gasleft with type(uint256).max
  • Adds a test for ERC4337 compatibility that uses a live production network with a production bundler. The test estimates gas for a user operation that deploys a Safe + executes a transaction. It uses a dummy ERC4337 module that doesn't have any security measures. The test is run optionally if the environment variables required for the test are set. The requirements are added in the README.md

@mmv08 mmv08 force-pushed the fix/gasleft-setupModules branch from b08d4a5 to be953e0 Compare May 24, 2023 17:13
@github-actions
Copy link

github-actions bot commented May 24, 2023

Pull Request Test Coverage Report for Build 5078570173

  • 1 of 15 (6.67%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-4.3%) to 92.8%

Changes Missing Coverage Covered Lines Changed/Added Lines %
contracts/test/4337/Test4337ModuleAndHandler.sol 0 14 0.0%
Totals Coverage Status
Change from base Build 4991446336: -4.3%
Covered Lines: 308
Relevant Lines: 330

💛 - Coveralls

@@ -18,5 +18,6 @@
"resolveJsonModule": true
},
"exclude": ["dist", "node_modules"],
"include": ["./src/index.ts", "./types"]
"include": ["./src/index.ts", "./types"],
"files": ["./hardhat.config.ts"]
Copy link
Member Author

@mmv08 mmv08 May 24, 2023

Choose a reason for hiding this comment

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

This change was required for the ts compiler to pick up imports in the hardhat config that extend the hardhat runtime to update types accordingly

Copy link
Member Author

Choose a reason for hiding this comment

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

This wasn't enough, so I created #573

yarn.lock Outdated Show resolved Hide resolved
@mmv08 mmv08 requested review from a team, rmeissner, Uxio0 and akshay-ap and removed request for a team May 24, 2023 17:17
@mmv08 mmv08 force-pushed the fix/gasleft-setupModules branch 2 times, most recently from aebb5a9 to a96739c Compare May 25, 2023 09:52
@mmv08 mmv08 force-pushed the fix/gasleft-setupModules branch from a96739c to 22d9fd2 Compare May 25, 2023 09:53
@mmv08 mmv08 requested a review from rmeissner May 25, 2023 13:29
@mmv08 mmv08 merged commit f8bd215 into main May 26, 2023
@mmv08 mmv08 deleted the fix/gasleft-setupModules branch May 26, 2023 17:40
@github-actions github-actions bot locked and limited conversation to collaborators May 26, 2023
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.

ERC-4337 Factory Support for setupModules()
2 participants