chiru-labs/PBT

toEthSignedMessageHash() issue

Closed this issue · 3 comments

Since toEthSignedMessageHash() was moved to the MessageHashUtils.sol library, an error occurred in the existing code, so that part has to fixed.

`...
import "@openzeppelin/contracts/utils/cryptography/MessageHashUtils.sol";
...

using MessageHashUtils for bytes32;
...
`

When I changed the code as above and ran it, there was no compilation error, but there seemed to be a problem during the verification process. What should I do?

When I call
-> _mintTokenWithChip(**signatureFromChip**, blockNumberUsedInSig);
method to mint,

I entered the signatureFromChip value through getSignatureFromScan at
https://github.com/chiru-labs/pbt-chip-client#getsignaturefromscan,
but mint fails with a return value indicating that the signature is incorrect. Where is the mistake?

Solved. I did not include a checksum when creating the signature.