You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is a public view override of isValidSignature that does something strange which is probably causing an issue.
See attached image.
Per interface, IERC1271 the isValidSignature is taking hash as its argument, while your implementation takes that through getMessageHash(abi.encode(digest)) where digest is actually already hashed.
We get our signature created on the wallet side using "sign typed data"
Ecrecover return that signer is 0x719C69387f7644642FC0F3577FC1dDc996e42af3 (which is correct)
BUT, 0x0353e55535B26cFeba6E2b4ABD3fEAA8c6477d0D contract returns not correct value.
There is a public view override of isValidSignature that does something strange which is probably causing an issue.
See attached image.
Per interface, IERC1271 the
isValidSignature
is taking hash as its argument, while your implementation takes that throughgetMessageHash(abi.encode(digest))
where digest is actually already hashed.We get our signature created on the wallet side using "sign typed data"
Wallet Address: 0x0353e55535b26cfeba6e2b4abd3feaa8c6477d0d
Signer Address: 0x719C69387f7644642FC0F3577FC1dDc996e42af3
Hash: 0x03fba88cd7469badb066eab75fde4e4c7d717000e522b86971690e83971afc4f
Signature: 0x0b50bcf153358604c8897471e244c4e585c95f5951414d849a89aaa85e8eb98a10610ddb050284c7d97af8cee50e24fe3d56db1a6a953b9591dfcdd0fd8e5d401c
Ecrecover return that signer is 0x719C69387f7644642FC0F3577FC1dDc996e42af3 (which is correct)
BUT, 0x0353e55535B26cFeba6E2b4ABD3fEAA8c6477d0D contract returns not correct value.
If everything’s ok, then isValidSignature should return 0x1626ba7e (as per https://ethereum.org/en/developers/tutorials/eip-1271-smart-contract-signatures/)
The text was updated successfully, but these errors were encountered: