Skip to content

Instantly share code, notes, and snippets.

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

Embed
What would you like to do?
usePlugin("@nomiclabs/buidler-web3");
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.