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
I've had this issue for sometime now, and not been able to resolve it. I have tried copying code directly from the repository, and that still doesn't work. If anyone could help me, I would appreciate it. Thank you in advance - and apologies, my code doesn't format in the "add code" button.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I've had this issue for sometime now, and not been able to resolve it. I have tried copying code directly from the repository, and that still doesn't work. If anyone could help me, I would appreciate it. Thank you in advance - and apologies, my code doesn't format in the "add code" button.
hardhat.config.js
`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()
const GOERLI_RPC_URL = process.env.GOERLI_RPC_URL || "https://eth-rinkeby" //do process.env.goerly_rpc_url, and if that doesn't work, do the other seperated by ||
const PRIVATE_KEY = process.env.PRIVATE_KEY || "0xkey"
const ETHERSCAN_API_KEY = process.env.ETHERSCAN_API_KEY || "key"
const COINMARKETCAP_API_KEY = process.env.COINMARKETCAP_API_KEY || "key"
/** @type import('hardhat/config').HardhatUserConfig */
module.exports = {
defaultNetwork: "hardhat",
networks: {
hardhat: {
chainId: 31337,
blockConfirmations: 1
},
goerli: {
url: GOERLI_RPC_URL,
accounts: [PRIVATE_KEY],
chainId: 5,
blockConfirmations: 6,
},
},
etherscan: {
apiKey: ETHERSCAN_API_KEY,
},
gasReporter: {
enabled: false,
currency: "USD",
outputFile: "gas-reporter.txt",
noColors: true,
},
solidity: "0.8.7",
namedAccounts: {
deployer: {
default: 0,
},
player: {
default: 1,
},
},
//set time out for how long it takes an event to be emitted. 200 seconds
mocha:{
timeout: 500000 //500 seconds max for testing
}
};`
Raffle.staging.test.js
`const { assert, expect } = require("chai")
const { getNamedAccounts, ethers, network } = require("hardhat")
const { developmentChains } = require("../../helper-hardhat-config")
developmentChains.includes(network.name)
? describe.skip
: describe("Raffle Staging Tests", function () {
let raffle, raffleEntranceFee, deployer
Beta Was this translation helpful? Give feedback.
All reactions