윈도우 Geth 설치 및 간단한 설정

in #geth8 years ago

[1] 윈도우 Geth 설치
https://geth.ethereum.org/downloads/
에서 윈도우용 Geth 설치 파일을 다운로드 한다.

설치파일을 실행하여 적당한 위치에 설치한다.

[2] geth 초기화
geth -datadir C:\zoid\Geth\dev_data init C:\zoid\Geth\dev_data\genesis.json

[3] geth 시작
geth -networkid 1185 -nodiscover -maxpeers 0 -datadir C:\zoid\Geth\dev_data console 2>> C:\zoid\Geth\dev_data\geth.log

[4] 기본적인 EOA 생성
> personal.newAccount("pass0")
"0x3a98a5ff23ba40406f248792261b2d9ed31d3597"
> personal.newAccount("pass1")
"0x3d9d67dd2eff05dce02fb1a37084e709ddbfcccb"

[5] 잔고 확인
>eth.getBalance(eth.coinbase)
또는
>eth.getBalance(eth.accounts[0])

[6] 송금을 위한 계정 unlock
>personal.unlockAccount(eth.accounts[0])
>personal.unlockAccount(eth.accounts[0], "pass0") : 패스워드 함께
>personal.unlockAccount(eth.accounts[0], "pass0", 0) : unlock시간, 0인경우 Geth 종료시까지

[7] 송금
>eth.sendTransaction({from:eth.accounts[0], to:eth.accounts[1], value:web3.toWei(5,"ether")})

[8] 송금을 확정하기 위해
>miner.start(1)
>miner.stop()

[9] Geth 기동시 HTTP-RPC 활성화
geth --networkid 1185 --nodiscover --maxpeers 0 --datadir C:\zoid\Geth\dev_data --rpc --rpcaddr "0.0.0.0" --rpcport 8545 --rpccorsdomain "*" --rpcapi "admin,db,eth,debug,miner,net,shh,txpool,personal,web3" console 2>> C:\zoid\Geth\dev_data\geth.log

Coin Marketplace

STEEM 0.04
TRX 0.32
JST 0.078
BTC 61758.62
ETH 1632.18
USDT 1.00
SBD 0.40