0
const { network, ethers } = require("hardhat")
const {developmentChains} =require('../helper-hardhat-config')

const BASE_FEE=ethers.utils.parseEther("0.25") // 0.25 is the premium amount to be used
//it cost 0.25 LINK per request for the mocks [check premium this is measure in gasLink ]
const GAS_PRICE_LINK=1e9 //link per gas used for the mocks deployment




module.exports=async ({deployments,getNamedAccounts})=>{
 const {deploy,log}=deployments
 const {deployer}=await getNamedAccounts()
 const chainId=network.config.chainId
 const args=[BASE_FEE,GAS_PRICE_LINK]

 if(developmentChains.includes(network.name)){
         log('local network detected! deploying mocks......')
         await deploy('VRFCoordinatorV2Mock',{
           from:deployer,
           log:true,
           args:args,
         })
         log('mocks deployed.....')
         log('--------------------------------')
 }
}

module.exports.tags=['all','mocks']

i have this encountered this error:

Error: invalid BigNumber string (argument="value", value="0.01", code=INVALID_ARGUMENT, version=bignumber/5.6.2)

please i need help!!!

1 Answer 1

0

Specify the base fee like this:

const BASE_FEE = "250000000000000000";
1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.