-
I am trying to deploy Raffle to test if the script is working correctly (15:19:46 of the video) I keep getting this error
I had a simliar problem when trying to deploy a mock for chapter 7 and the issue was in the named accounts in hardhat.config . I tried using that solution, as well as copying the deploy01 and hardhat.config from the repo and I'm still getting the same issue. |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 29 replies
-
Can you share the code? |
Beta Was this translation helpful? Give feedback.
-
@cah311 Push your code to GitHub and leave your repo link here. |
Beta Was this translation helpful? Give feedback.
-
@cah311 Delete your args variable and replace it with mine and let me know if it fixes your problem: const arguments = [
vrfCoordinatorV2Address,
subscriptionId,
networkConfig[chainId]["gasLane"],
networkConfig[chainId]["keepersUpdateInterval"],
networkConfig[chainId]["raffleEntranceFee"],
networkConfig[chainId]["callbackGasLimit"],
] Also, rename any other instances (in deploy and verify in the same file) to |
Beta Was this translation helpful? Give feedback.
-
Print all the variables which you get from networkConfig object i.e.: console.log(`-------------1---------${entranceFeeToEnterTheLottery}------------------------------`);
console.log(`-------------2---------${gasLane}------------------------------`);
console.log(`-------------3---------${callBackGasLimit}------------------------------`);
console.log(`-------------4---------${lotteryTimeInterval}------------------------------`);
console.log(`-------------5---------${subscriptionId}------------------------------`); One of them will be undefiend either you misspelled the name incorrectly in helper-hardhat-config.js or in 01-deploy-raffle.js. |
Beta Was this translation helpful? Give feedback.
-
Thank you everyone for trying to help me out. Unfortunatly with each piece of advice, a new error has come up. As of now I feel like I am very close to the solution, but I am stuck on this issue now:
const { getNamedAccounts, deployments, network, run } = require("hardhat") const FUND_AMOUNT = "1000000000000000000000" module.exports = async ({ getNamedAccounts, deployments }) => {
} module.exports.tags = ["all", "raffle"] `` |
Beta Was this translation helpful? Give feedback.
Thank you everyone for trying to help me out. Unfortunatly with each piece of advice, a new error has come up. As of now I feel like I am very close to the solution, but I am stuck on this issue now: