Skip to content

Instantly share code, notes, and snippets.

@fzeoli fzeoli/buidler.config.js
Last active May 15, 2019

What would you like to do?
task("balance", "Prints an account's balance")
.addParam("account", "The account's address")
.setAction(async taskArgs => {
const account = web3.utils.toChecksumAddress(taskArgs.account);
const balance = await web3.eth.getBalance(account);
console.log(web3.utils.fromWei(balance, "ether"), "ETH");
module.exports = {};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.