Created
January 28, 2021 12:27
-
-
Save cgcardona/337a2c3d17d47060ceafd5e451e7cfd8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
thank you very much