Lesson 9: Error: value must be a string (argument="value", value=0.01, code=INVALID_ARGUMENT, version=units/5.7.0) #5282
Answered
by
alymurtazamemon
bijabhai-fatima
asked this question in
Q&A
-
Receiving this error white trying to deploy Raffle/Lottery contract on hardhat network. An unexpected error occurred:
Error: ERROR processing skip func of D:\props\lottery\deploy\00-deploy-mocks.js:
Error: value must be a string (argument="value", value=0.01, code=INVALID_ARGUMENT, version=units/5.7.0) 00-deploy-mocks.jsconst {network} = require("hardhat");
const {developmentChains } = require('../helper-hardhat-cofig')
const BASE_FEE = ethers.utils.parseEther('0.25')
const GAS_PRIZE_LINK = 1e9;
const args = [BASE_FEE, GAS_PRIZE_LINK];
module.exports = async ({ getNamedAccounts, deployments }) => {
const { deploy, log } = deployments;
const { deployer } = await getNamedAccounts();
if(developmentChains.includes(network.name)){
// deploy VRFCoordimatorV2 mock contract
log("Local network detected. Deploying mocks....");
await deploy("VRFCoordinatorV2Mock", {
from: deployer,
args: args,
log: true,
waitConfirmations: network.config.blockConfirmations || 1,
})
log("Mock deployed!");
}
}
module.exports.tags = ['all', 'mocks']; |
Beta Was this translation helpful? Give feedback.
Answered by
alymurtazamemon
Apr 12, 2023
Replies: 1 comment 3 replies
-
@bijabhai-fatima Not sure, it looks correct. Please leave your repo so I can test it locally. |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@bijabhai-fatima In the helper-hardhat.config.js file, you need to pass value in string form parseEther.