An open API service indexing awesome lists of open source software.

https://github.com/shawntabrizi/ethbalance

Ethereum and Web3.js “Hello World”: Get the ETH Balance of an Ethereum Address
https://github.com/shawntabrizi/ethbalance

ethereum web3js

Last synced: 12 months ago
JSON representation

Ethereum and Web3.js “Hello World”: Get the ETH Balance of an Ethereum Address

Awesome Lists containing this project

README

          

# ETH-Balance
### Ethereum and Web3.js “Hello World”: Get the ETH Balance of an Ethereum Address
#### Using just 41 lines of HTML + JS, we create a Web3.JS application which can get the ETH Balance of an Ethereum Address

Read my Blog Post here: http://shawntabrizi.com/ethereum/ethereum-web3-js-hello-world-get-eth-balance-ethereum-address/

Read my correction to my original sample here: http://shawntabrizi.com/ethereum/correcting-ethereum-web3-js-hello-world/

Try it out here: http://shawntabrizi.com/ethbalance/

Using Web3.js: https://github.com/ethereum/web3.js

Using Infura.io: https://infura.io/

## How To Use

This project relies on an Ethereum provider to access data from the main network.

This app will first try to access any injected Web3 provider like that included with [Metamask](https://metamask.io/) or the [Brave browser](https://brave.com/).

Do note though, that if you want to use the injected Web3 provider, you [must host this page on a local webserver](https://ethereum.stackexchange.com/questions/46399/unable-to-connect-to-metamask-using-web3), not just open the html file on your local filesystem.

Otherwise, you can provide an HTTP Web3 provider using a free API key generated by [Infura](https://infura.io/) or similar services. You will need to replace `` in this project.

## Check out other simple Web3.js samples
https://github.com/shawntabrizi/ERC-20-Token-Balance

https://github.com/shawntabrizi/ETH-Balance-Graph