I'm getting an BigNumber overflow error when running hardhat tests. How do I fix this?
const ownerBalance = await MyToken.mint(
owner.address,
"ipfs://".length,
{ value: ethers.BigNumber.from(50000000000000000) }
);
I'm getting an BigNumber overflow error when running hardhat tests. How do I fix this?
const ownerBalance = await MyToken.mint(
owner.address,
"ipfs://".length,
{ value: ethers.BigNumber.from(50000000000000000) }
);
If you are getting the error from the BigNumber
part, then I suggest you construct the number like this: ethers.utils.parseUnits("5", 16)
.