playground

The world is a playground.

2018-06-22から1日間の記事一覧

Web3.js でEthereum の残高を取得

web3.eth.getBalance を使用します。 サンプルコード web3.eth.getBalance(walletAddress, (error, balance) => { console.log(balance); ); ここで取得できる balance の単位は wei なので、ether 単位で表示したい場合は、次のようにします。 var ethBalan…