vm.sign and cast wallet sign produce different signatures given the same data. #6794
Closed
2 tasks done
Labels
T-bug
Type: bug
Component
Forge, Cast
Have you ensured that all of these are up to date?
What version of Foundry are you on?
forge 0.2.0 (477b345 2023-12-18T00:22:09.434601489Z)
What command(s) is the bug in?
cast wallet sign
Operating System
Linux
Describe the bug
This is the typed data hash that I am trying to sign
0x868df30ebcbde6a6e7f33c8d8bfd704884c74739295b1fea15b8a20815028a18
. when signing with cast I get a different signature vs when signing with vm.sign I get a different output.when calling cast
I get the signature
0x70edc0ec8b7bddf618e91b3fb...041ca33e11b
when executing from foundry
I get this answer
0xe90e83e7ccffa3752...835b4f691b
If i produce the signature using wagmi i get the same signature as when produced from cast, but the contract only accepts the signature produced from the vm.sign. (For context I use
SignatureChecker.isValidSignatureNow
to verify signatures & yes I checked datahash is the same)How can I create uniform signatures?
The text was updated successfully, but these errors were encountered: