Skip to content

Instantly share code, notes, and snippets.

@Jesserc
Forked from cgcardona/hardhat.config.js
Created October 28, 2022 11:32
Show Gist options
  • Select an option

  • Save Jesserc/983103c1a1c863b4c999ee451b3f59b6 to your computer and use it in GitHub Desktop.

Select an option

Save Jesserc/983103c1a1c863b4c999ee451b3f59b6 to your computer and use it in GitHub Desktop.
require("@nomiclabs/hardhat-waffle");
require("@nomiclabs/hardhat-ethers");
// This is a sample Hardhat task. To learn how to create your own go to
// https://hardhat.org/guides/create-task.html
task("accounts", "Prints the list of accounts", async () => {
const accounts = await ethers.getSigners();
for (const account of accounts) {
console.log(account.address);
}
});
task("balances", "Prints the list of AVAX account balances", async () => {
const accounts = await ethers.getSigners();
for (const account of accounts) {
balance = await ethers.provider.getBalance(account.address);
console.log(account.address, "has balance", balance.toString());
}
});
/**
* @type import('hardhat/config').HardhatUserConfig
*/
module.exports = {
solidity: {
compilers: [
{
version: "0.5.16"
},
{
version: "0.6.2"
},
{
version: "0.6.4"
},
{
version: "0.7.0"
},
{
version: "0.8.0"
}
]
},
networks: {
hardhat: {
gasPrice: 470000000000,
chainId: 43112,
},
avash: {
url: 'http://localhost:9650/ext/bc/C/rpc',
gasPrice: 470000000000,
chainId: 43112,
accounts: ["0x56289e99c94b6912bfc12adc093c9b51124f0dc54ac7a766b2bc5ccf558d8027",
]
},
fuji: {
url: 'https://api.avax-test.network/ext/bc/C/rpc',
gasPrice: 470000000000,
chainId: 43113,
accounts: [
]
},
mainnet: {
url: 'https://api.avax.network/ext/bc/C/rpc',
gasPrice: 470000000000,
chainId: 43114,
accounts: [
]
}
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment