-
Notifications
You must be signed in to change notification settings - Fork 78
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
Send encoded Safe operation bytes to checkSignatures
call
#165
Conversation
Pull Request Test Coverage Report for Build 6955856472
💛 - Coveralls |
@@ -152,6 +155,75 @@ describe('Safe4337Module - Reference EntryPoint', () => { | |||
expect(await ethers.provider.getBalance(safe.address)).to.be.eq(accountBalance - transfers - deposits) | |||
}) | |||
|
|||
it('should support a Safe signer (NOTE: would require a staked paymaster for ERC-4337)', async () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is that because the signer would access its storage and that goes against the rules?
Have just seen the public data commit. I think it's fine to leave it as internal, because it can be computed offchain |
This reverts commit 3e4c4a1.
Reverted. I was unsure about the change - but decided to propose it anyway just in case. The rationale was that it would be useful for computing |
cant wait for 1.5.0 to get released 😄 |
Fixes #160
This PR fixes the
checkSignatures
call to the Safe to include both the Safe operation hash for recovery, but also the encoded operation bytes, which is required when using an ERC-1271 signer. In order to test this, theSafeMock
now requires thatdataHash == keccak256(data)
and I added a unit test using a nested Safe set (note that this would require a staked paymaster to work with 4337 bundlers, but the test does check that the contract signatures works as expected).