Lesson 17: deploy GovernorContract #5792
Answered
by
Alanle1011
Alanle1011
asked this question in
Q&A
-
when i try to run my deploy script for GovernorContract const { network, ethers } = require("hardhat");
const { verify } = require("../utils/verify");
const {
developmentChains,
VOTING_DELAY,
VOTING_PERIOD,
QUORUM_PERCANTAGE,
} = require("../helper-hardhat-config");
module.exports = async ({ getNamedAccounts, deployments }) => {
const { deploy, log, get } = deployments;
const { deployer } = await getNamedAccounts();
const governanceToken = await get("GovernanceToken");
const timeLock = await get("TimeLock");
log("----------------Deploying Governor Contract...--------------------");
const args = [
governanceToken.address,
timeLock.address,
QUORUM_PERCANTAGE,
VOTING_PERIOD,
VOTING_DELAY,
];
const governorContract = await deploy("GovernorContract", {
from: deployer,
args: args,
log: true,
waitConfirmations: network.config.blockConfirmations || 1,
});
if (
!developmentChains.includes(network.name) &&
process.env.ETHERSCAN_API_KEY
) {
await verify(governorContract.address, args);
}
};
module.exports.tags = ["all", "governorContract"]; i run to this error
|
Beta Was this translation helpful? Give feedback.
Answered by
Alanle1011
Jul 4, 2023
Replies: 1 comment
-
I add to my network in the hardhat.config.js the line
|
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
Alanle1011
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I add to my network in the hardhat.config.js the line