Skip to Content
Ethereum Cookbook
book

Ethereum Cookbook

by Manoj P R
August 2018
Intermediate to advanced
404 pages
11h 19m
English
Packt Publishing
Content preview from Ethereum Cookbook

How to do it...

  1. Create a directory to save your blockchain data:
$ mkdir datadir
  1. Create an account and save it to the directory:
$ geth account new --datadir datadir

You will be asked to enter a password for the account. An address will be displayed once the account is created. The key file for this account will be stored in the /datadir/keystore/ location.

  1. Create a genesis.json file with the following contents:
{     "config": {         "chainId": 1100,         "homesteadBlock": 0,         "eip155Block": 0,         "eip158Block": 0,         "byzantiumBlock": 0     },     "difficulty": "400",     "gasLimit": "2000000",     "alloc": {         "87db8fceb028cd4ded9d03f49b89124a1589cab0": {             "balance": "100000000000000000000000"         }     } }

Various parameters in the genesis files are explained here. ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Building Ethereum Dapps

Building Ethereum Dapps

Roberto Infante
Ethereum For Dummies

Ethereum For Dummies

Michael G. Solomon

Publisher Resources

ISBN: 9781789133998Supplemental Content