Lesson 9 Raffle.staging.test.js #677
-
I am trying to run the command "yarn hardhat deploy --network rinkeby" yarn run v1.22.15 { This is my hardhat.config file require("@nomiclabs/hardhat-waffle")
require("@nomiclabs/hardhat-etherscan")
require("hardhat-deploy")
require("solidity-coverage")
require("hardhat-gas-reporter")
require("hardhat-contract-sizer")
require("dotenv").config()
/**
* @type import('hardhat/config').HardhatUserConfig
*/
const RINKEBY_RPC_URL = process.env.RINKEBY_RPC_URL
const PRIVATE_KEY = process.env.PRIVATE_KEY
const COINMARKETCAP_API_KEY = process.env.COINMARKETCAP_API_KEY
const ETHERSCAN_API_KEY = process.env.ETHERSCAN_API_KEY
module.exports = {
defaultNetwork: "hardhat",
networks: {
hardhat: {
chainId: 31337,
blockConfirmations: 1,
},
rinkeby: {
chainId: 4,
blockConfirmations: 6,
url: RINKEBY_RPC_URL,
accounts: [PRIVATE_KEY],
},
},
gasReporter: {
enabled: false,
outputFile: "gas-report.txt",
noColors: true,
currency: "USD",
coinmarketcap: COINMARKETCAP_API_KEY,
token: "ETH",
},
solidity: "0.8.7",
namedAccounts: {
deployer: {
default: 0, // here this will by default take the first account as deployer
},
player: {
default: 1,
},
},
mocha: {
timeout: 300000, // 300 seconds
},
} I have my env file with all of my keys and URLs |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
add this etherscan: {
apiKey: process.env.ETHERSCAN_API_KEY,
}, |
Beta Was this translation helpful? Give feedback.
@armontej
add this