Skip to content
ThatOtherZach edited this page Oct 19, 2017 · 8 revisions

Web3 By Example Wiki

Node.js with Web3 javascript example scripts for getting basic information (transactions, balances, ether, and tokens) from the Ethereum blockchain.

This is just a basic wiki for the scripts and how they work, feel free to add edits when and where needed.

Set Up

I used a Ubuntu server to test these, you will need either a similiar setup or you can use your own machine. I don't want (nor am I able to) describe how to get your system ready only that you will need to install the following:

It is also a fantastic idea to have the Web3 documentation open so you can get more information on functions and other things that may be useful; you can find that here: http://web3js.readthedocs.io/en/1.0/getting-started.

Running Scripts

I'm going to assume you know at least the basics of what Ethereum is and what terms like Address, transaction hash/ID, and tokens means. If not, you may want to read up on that before anything else. I've left place holder text in place of where you will need real Ethereum value; you can either use your own or just grab a random one from a block explorer like etherscan.io.

To execute you simply use the console in run node example-script.js and the results will be printed in the console.

In addition each script has a github repo wiki page here. In there you'll find an explanation of what's happening, this was done so the really noobish among us (myself included) can see what exactly is happening.