While the wallet allows to deploy and run code, the developer’s way is the command-line. Let’s see how to reproduce the above steps with it.

Installation

The first step is to install an Ethereum command-line client. There’s one official such client for Go, C++ and Python. geth is the client for Go, and has no dependencies. Let’s install it via Homebrew:

brew tap ethereum/ethereum brew install ethereum

Remember that Ethereum is a network made out of nodes. geth is able to run such a node locally. It also has a lot of other capabilities, including mining. To run the node, many parameters are available, such as the network itself, the directory where data is stored, etc. To easily capture them, be sure to have the wallet launched, and run a ps -ef | grep geth .

~/Library/Application Support/Ethereum Wallet/binaries/Geth/unpacked/geth --rinkeby --syncmode fast \ --cache 1024 --ipcpath ~/Library/Ethereum/geth.ipc

Yep, that’s right. The Ethereum wallet package has a geth binary and runs it underneath. Just copy-paste the the parameters list, and the new standalone get with them.

geth --rinkeby --syncmode fast --cache 1024 --ipcpath ~/Library/Ethereum/geth.ipc

At this point, the log should display synch data such as:

Imported new chain segment blocks=1 txs=10 mgas=0.655 elapsed=7.089ms mgasps=92.422 number=1441983 hash=d8656c…759081

To interact with the local node, geth also offers a JavaScript console. In another tab, run get attach . The output is the following:

Welcome to the Geth JavaScript console! instance: Geth/v1.7.3-stable/darwin-amd64/go1.9.2 coinbase: 0x364d73b70f429a9a8d3964b54334dd9a4f7c0c6d at block: 1441934 (Tue, 19 Dec 2017 14:13:09 CET) datadir: ~/Library/Ethereum/rinkeby modules: admin:1.0 clique:1.0 debug:1.0 eth:1.0 miner:1.0 net:1.0 personal:1.0 rpc:1.0 txpool:1.0 web3:1.0 >

Running geth and get attach commands in different tabs is equivalent to simply run geth console (and the list of parameters).

The console offers a whole API dedicated to interacting with the Ethereum blockchain.