You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 17, 2024. It is now read-only.
I have an issue when deploying my 01-deploy-fund-me.js script. When I type into command line:
yarn hardhat deploy --network goerli
I get the following error. Following the stack trace, it looks like in prober.ts, there is a destructuring of customChains which should be an array. I'm not sure where customChains comes from though.
Error Message
Verifying contract...
<contractId> [ '0xD4a33860578De61DBAbDc8BFdb98FD742fA7028e' ]
TypeError: customChains is not iterable
at getEtherscanEndpoints (/home/shawnesquivel/hh-fcc/hardhat-fund-me-fcc/node_modules/@nomiclabs/hardhat-etherscan/src/network/prober.ts:33:37)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at Environment._runTaskDefinition (/home/shawnesquivel/hh-fcc/hardhat-fund-me-fcc/node_modules/hardhat/src/internal/core/runtime-environment.ts:308:14)
at Environment.run (/home/shawnesquivel/hh-fcc/hardhat-fund-me-fcc/node_modules/hardhat/src/internal/core/runtime-environment.ts:156:14)
at SimpleTaskDefinition.verifySubtask [as action] (/home/shawnesquivel/hh-fcc/hardhat-fund-me-fcc/node_modules/@nomiclabs/hardhat-etherscan/src/index.ts:220:30)
at Environment._runTaskDefinition (/home/shawnesquivel/hh-fcc/hardhat-fund-me-fcc/node_modules/hardhat/src/internal/core/runtime-environment.ts:308:14)
at Environment.run (/home/shawnesquivel/hh-fcc/hardhat-fund-me-fcc/node_modules/hardhat/src/internal/core/runtime-environment.ts:156:14)
at verify (/home/shawnesquivel/hh-fcc/hardhat-fund-me-fcc/utils/verify.js:7:9)
at Object.module.exports [as func] (/home/shawnesquivel/hh-fcc/hardhat-fund-me-fcc/deploy/01-deploy-fund-me.js:38:9)
at DeploymentsManager.executeDeployScripts (/home/shawnesquivel/hh-fcc/hardhat-fund-me-fcc/node_modules/hardhat-deploy/src/DeploymentsManager.ts:1220:22)
01-deploy-fund-me.js
module.exports = async ({ getNamedAccounts, deployments }) => {
...
const args = [ethUsdPriceFeedAddress]
// To change chains, use a mock
const fundMe = await deploy("FundMe", {
from: deployer,
args: args, // put price feed address
log: true,
waitConfirmations: network.config.blockConfirmations || 1,
})
// not a local network - verification needed
if (
!developmentChains.includes(
network.name && process.env.ETHERSCAN_API_KEY
)
) {
log(fundMe.address, args)
await verify(fundMe.address, args)
}
log("---------------------------------------")
}
as per this recommendation, smartcontractkit/hardhat-starter-kit#140 I changed my hardhat.config.js etherscan property to include the following. I'm not sure why it works, all I know is that it works - my contract was successfully verified after doing this.
I have an issue when deploying my 01-deploy-fund-me.js script. When I type into command line:
I get the following error. Following the stack trace, it looks like in prober.ts, there is a destructuring of customChains which should be an array. I'm not sure where customChains comes from though.
Error Message
01-deploy-fund-me.js
verify.js
The text was updated successfully, but these errors were encountered: