Ethereum local testnet deployment
Preparation
Install geth
with your OS’ package manager.
The geth
and puppeth
executable will be used.
Steps
- Modify
networkname
as you wish inMakefile
networkname
must be all losercase letters or-
- Init a genesis config using
puppeth
:make init
For more info or configuration, please refer to any
puppeth
tutorial blog. - Export the genesis into
.json
s (Manage existing genesis
->Export genesis configurations
inpuppeth
) - Init genesis block using
geth
:make geth-init
- 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)
- Run (and mine) it:
make run
- Switch your MetaMask to
Localhost 8545
RPC server. No error should appear. - 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")})
- Done. RPC server is
http://localhost:8545
.