before verify at etherscan
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
// SPDX-License-Identifier: MIT
|
||||
pragma solidity 0.8.24;
|
||||
pragma solidity ^0.8.8;
|
||||
|
||||
contract SimpleStorage {
|
||||
// boolean, uint, int, address, bytes
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
require("@nomicfoundation/hardhat-toolbox");
|
||||
//// Deprecated, below import combined in toolbox import already
|
||||
require("@nomiclabs/hardhat-ethers");
|
||||
//require("@nomiclabs/hardhat-etherscan");
|
||||
//require("@nomicfoundation/hardhat-verify");
|
||||
require("dotenv").config();
|
||||
|
||||
const RPC_URL_SEPOLIA = process.env.SEPOLIA_RPC_URL;
|
||||
@@ -8,25 +11,29 @@ const PRIVATE_KEY_SEPOLIA = process.env.SEPOLIA_PRIVATE_KEY;
|
||||
const RPC_URL_GANACHE = process.env.LOCAL_RPC_URL;
|
||||
const PRIVATE_KEY_GANACHE = process.env.LOCAL_PRIVATE_KEY;
|
||||
|
||||
const ETHERSCAN_API_KEY = process.env.ETHERSCAN_API_KEY;
|
||||
|
||||
/** @type import('hardhat/config').HardhatUserConfig */
|
||||
module.exports = {
|
||||
defaultNetwork: "hardhat",
|
||||
networks: {
|
||||
sepolia: {
|
||||
url: RPC_URL_SEPOLIA,
|
||||
accounts: [PRIVATE_KEY_SEPOLIA],
|
||||
chainID: 11155111,
|
||||
},
|
||||
ganache: {
|
||||
url: RPC_URL_GANACHE,
|
||||
accounts: [PRIVATE_KEY_GANACHE],
|
||||
chainID: 5777,
|
||||
},
|
||||
},
|
||||
solidity: "0.8.24",
|
||||
defaultNetwork: "hardhat",
|
||||
networks: {
|
||||
sepolia: {
|
||||
url: RPC_URL_SEPOLIA,
|
||||
accounts: [PRIVATE_KEY_SEPOLIA],
|
||||
chainID: 11155111,
|
||||
},
|
||||
ganache: {
|
||||
url: RPC_URL_GANACHE,
|
||||
accounts: [PRIVATE_KEY_GANACHE],
|
||||
chainID: 5777,
|
||||
},
|
||||
},
|
||||
solidity: "0.8.24",
|
||||
etherscan: {
|
||||
apiKey: ETHERSCAN_API_KEY,
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
task("accounts", "Prints the list of accounts", async (taskArgs, hre) => {
|
||||
const accounts = await hre.ethers.getSigners();
|
||||
|
||||
|
||||
@@ -27,4 +27,4 @@
|
||||
"solidity-coverage": "^0.8.0",
|
||||
"typechain": "^8.3.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -11,6 +11,9 @@ async function main() {
|
||||
console.log("Deployed contract to: " + simpleStorage.address);
|
||||
}
|
||||
|
||||
// Auto verify contract in etherscan
|
||||
//async function verify(contractAddress, args) {}
|
||||
|
||||
// main
|
||||
main()
|
||||
.then(() => process.getMaxListeners(0))
|
||||
|
||||
Reference in New Issue
Block a user