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
When I construct a signature client side using the const signature = await signer.signMessage(digest) and verify that the recoveredAddress matches the signer client side and pass the same signature and digest used to calculate the signature I get different values after immediately logging the arguments in the solidity code. The emit events are placed prior to any code running in the solidity function and I get different values from the digest, signature as well as the address passed into the function. How could this happen and what am I not noticing that can correct the issue? Is there something happening with the transaction that changing the encoding and values received by the solidity function?
Console.log
Signer address: 0xabcdefg7ad71A5A3aEbF929B4E39AacC23b30B0c
Hash to sign 1.0: 0xc3ea7127e1631e27bdaceef454a7e781cb22235f8bbfb788c19fe3494883d4f2
Received Signature: 0xacb99316f84654aa29874c237f10acf8b8f95a79dd47141d9b4b3b7427b9fbac5a6c95d7bf683227b984d756aafce994587c1ee8a5c905f41a1f0edbf0ebf9331b
Signature is valid and matches the address: 0xabcdefg7ad71A5A3aEbF929B4E39AacC23b30B0c
//NOTICE THAT ALL ARGUMENTS PASS DIRECTLY TO SOLIDITY FUNCTION DO NOT MATCH
Decoded Log:
Object { fragment: {…}, name: "AddressLogged", signature: "AddressLogged(address)", topic: "0x36341629533027a87dbcdf4df3be2c81bf2b9e23f8d33eb2b6903f9b873a9fe8", args: Proxy }
index.tsx:134:18
//SIGNATURE IS NOT CORRECT OR THE CORRECT LENGTH
Decoded Log:
Object { fragment: {…}, name: "SignatureLogged", signature: "SignatureLogged(bytes)", topic: "0x04634f62df3e49b268cd707758d24bdf4e7c1998ec4b03d9edb12f6ee57eba0f", args: Proxy }
index.tsx:134:18
//HASH IS DISPLAY DIFFERENT FROM HASH PASSED THAT IS IMMEDIATELY LOGGED AFTER INPUT
Decoded Log:
Object { fragment: {…}, name: "HashLogged", signature: "HashLogged(bytes32)", topic: "0xdc7bac3048a782a7fe02ea91f7aee3a7afd2ada6752d98756c99ad00c34b2ea9", args: Proxy }
index.tsx:134:18
//SIGNATURE RECOVERY FAILURE AS ARGUMENTS PASS ARE NOT THE SAME AS CALCULATED CLIENT SIDE
Decoded Log:
Object { fragment: {…}, name: "InvalidRecoveredAddress", signature: "InvalidRecoveredAddress(address)", topic: "0x1881324958f5516d2a7001f234662202e284d65459abc9edf891fb1b579759b7", args: Proxy }
Environment
No response
Environment (Other)
No response
The text was updated successfully, but these errors were encountered:
Ethers Version
6.10.0
Search Terms
Contract instance arguments encoding, Invalid Signature retrieval
Describe the Problem
When I construct a signature client side using the const signature = await signer.signMessage(digest) and verify that the recoveredAddress matches the signer client side and pass the same signature and digest used to calculate the signature I get different values after immediately logging the arguments in the solidity code. The emit events are placed prior to any code running in the solidity function and I get different values from the digest, signature as well as the address passed into the function. How could this happen and what am I not noticing that can correct the issue? Is there something happening with the transaction that changing the encoding and values received by the solidity function?
Code Snippet
Contract ABI
Errors
Environment
No response
Environment (Other)
No response
The text was updated successfully, but these errors were encountered: