-
Notifications
You must be signed in to change notification settings - Fork 1
/
geth_commands.txt
33 lines (29 loc) · 1.06 KB
/
geth_commands.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
Init
====
geth --datadir=./datadir init genesis.json
Start :
======
geth --port 3500 --networkid 42 --nodiscover --datadir="datadir" --rpc --rpcport 8545 --rpcaddr 0.0.0.0 --rpccorsdomain "*" --rpcapi "eth,net,personal,web3"
Attach:
======
geth attach ipc:\\.\pipe\geth.ipc
Commands:
========
personal.newAccount("123456789")
personal.newAccount("987654321")
personal.listAccounts
miner.start(1)
eth.mining
personal.unlockAccount(eth.accounts[0], "123456789", 86400)
web3.fromWei(web3.eth.getBalance(eth.accounts[0]),'ether').toString(10)
miner.setEtherbase(eth.accounts[0])
eth.getBalance(eth.accounts[0])
eth.blockNumber
web3.fromWei(eth.getBalance(eth.coinbase), "ether")
web3.fromWei(eth.getBalance(eth.accounts[1]), "ether")
miner.stop()
eth.getTransactionCount(eth.accounts[0])
eth.sendTransaction({from: eth.accounts[0], to: eth.accounts[1], value: web3.toWei(2, "ether"), nonce:1})
eth.getTransactionReceipt('0xc3e62d137e74e19f167d44778f857bd7dea8b8786bacc8bb67296a611db6e71c')
txpool.status
until ordinary exclude inhale slight enact broom vendor motor clerk hobby build