Skip to main content
1 vote
Accepted

Using ecrecover returns incorrect signer only for specific data (approx 0.3% of cases)

In your signMessage function, to get the bytes (Uint8Array) representation of the messageHash, you need to use the ethers.getBytes function instead of ethers.toBeArray, like: const signMessage = async ...
SYED ASAD KAZMI's user avatar
1 vote

Mint function is failing with Status: "Unfinalized (Safe)"everytime, i am trying to mint the contract

You've added the minting logic twice: once in the mint function and again in the generatePokeMon function. As a result, the _nextTokenId and newItemId are both being incremented twice, causing a ...
SYED ASAD KAZMI's user avatar
1 vote

How do i fix the issue of Invalid Bytecode, code: invalid argument when deploying?

Have a look at your constructor. It takes no arguments. Now if you look at your deployment script, it specifies args: [deployer]. Remove this argument and this error should disappear. You can't give ...
Lauri Peltonen's user avatar
1 vote
Accepted

Create/set "subId" by createSubscription() and get "subId" vrfCoordinatorV2_5Mock calling by javascript in hardhat environment

Instead of events, it should be the logs array, inside the createSubIdReceipt object. So, replace this line: subscriptionId = createSubIdReceipt.events[0].args.subId with: subscriptionId = ...
SYED ASAD KAZMI's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible