From 83047203b614f4b57d3ccb34f7d5e920e1d7009f Mon Sep 17 00:00:00 2001 From: eiyen <937915771@qq.com> Date: Thu, 30 Mar 2023 19:20:30 +0800 Subject: [PATCH] successfully deploy and verify --- W3-1/hardhat.config.js | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 W3-1/hardhat.config.js diff --git a/W3-1/hardhat.config.js b/W3-1/hardhat.config.js new file mode 100644 index 0000000..717d7d0 --- /dev/null +++ b/W3-1/hardhat.config.js @@ -0,0 +1,26 @@ +require("@nomiclabs/hardhat-waffle"); +require("dotenv").config(); +require("@nomiclabs/hardhat-etherscan"); + +const { ProxyAgent, setGlobalDispatcher } = require("undici"); +const proxyAgent = new ProxyAgent("http://127.0.0.1:7890"); +setGlobalDispatcher(proxyAgent); + +const { INFURA_RPC_URL, PRIVATE_KEY, ETHERSCAN_API_KEY } = process.env; + +module.exports = { + solidity: "0.8.9", + networks: { + localhost: { + url: "http://localhost:8545", + }, + goerli: { + url:INFURA_RPC_URL, + accounts: [PRIVATE_KEY], + chainId: 5, + } + }, + etherscan: { + apiKey: ETHERSCAN_API_KEY, + } +}; \ No newline at end of file