Initial Commit
This commit is contained in:
@@ -1,6 +1,36 @@
|
||||
require("@nomicfoundation/hardhat-toolbox");
|
||||
require("@nomiclabs/hardhat-ethers");
|
||||
require("dotenv").config();
|
||||
|
||||
const RPC_URL_SEPOLIA = process.env.SEPOLIA_RPC_URL;
|
||||
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;
|
||||
|
||||
/** @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",
|
||||
};
|
||||
|
||||
|
||||
task("accounts", "Prints the list of accounts", async (taskArgs, hre) => {
|
||||
const accounts = await hre.ethers.getSigners();
|
||||
|
||||
for (const account of accounts) {
|
||||
console.log(account.address);
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user