nykma / ethereum-local-testnet

Ethereum local testnet deployment script

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Ethereum local testnet deployment

Preparation

Install geth with your OS’ package manager.

The geth and puppeth executable will be used.

Steps

  1. Modify networkname as you wish in Makefile

    networkname must be all losercase letters or -

  2. Init a genesis config using puppeth:
    make init
        

    For more info or configuration, please refer to any puppeth tutorial blog.

  3. Export the genesis into .json s (Manage existing genesis -> Export genesis configurations in puppeth)
  4. Init genesis block using geth:
    make geth-init
        
  5. Create a genesis wallet account (also works as the first miner):
    make create-account
        

    Make sure no password is given. (Simply press enter when prompting password)

  6. Run (and mine) it:
    make run
        
  7. Switch your MetaMask to Localhost 8545 RPC server. No error should appear.
  8. Use console to transfer some coin to your existed wallet account:
    make console
        
    eth.sendTransaction({from: eth.coinbase, to: '0xMYWALLETHASH', value: web3.toWei(10, "ether")})
        
  9. Done. RPC server is http://localhost:8545.

Reference

About

Ethereum local testnet deployment script


Languages

Language:Makefile 100.0%