Last active
January 1, 2018 14:57
-
-
Save lagenorhynque/938733def77cf332609f69dd6b03f953 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // アカウント作成 | |
| personal.newAccount("sample") | |
| personal.newAccount("sample2") // sample2がそのアカウントのパスフレーズになる | |
| // 残高確認 | |
| web3.fromWei(eth.getBalance(eth.accounts[0])) | |
| // マイニング: eth.accounts[0]に報酬が入る | |
| miner.start() | |
| miner.stop() // DAGを作ってるログが出たら、終わるまで待つ必要があるぽい | |
| // 送金 | |
| personal.unlockAccount(eth.accounts[0], "sample") | |
| eth.sendTransaction({from: eth.accounts[0], to: eth.accounts[1], value: web3.toWei(1, "ether")}) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "config": { | |
| "chainId": 123, | |
| "homesteadBlock": 123, | |
| "eip155Block": 123, | |
| "eip158Block": 123 | |
| }, | |
| "difficulty": "200", | |
| "gasLimit": "2100000", | |
| "alloc": { | |
| "7df9a875a174b3bc565e6424a0050ebc1b2d1d82": { "balance": "300000" }, | |
| "f41c74c9ae680c1aa78f42e5647a62f353b7bdde": { "balance": "400000" } | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # init | |
| geth --datadir eth_private_net/ init eth_private_net/genesis.json | |
| # start console | |
| geth --datadir eth_private_net/ --rpc --rpcaddr "localhost" --rpcport "8545" --rpccorsdomain "*" --rpcapi="eth,net,web3,personal" --targetgaslimit "20000000" console | |
| # start Ethereum Wallet | |
| /Applications/Ethereum\ Wallet.app/Contents/MacOS/Ethereum\ Wallet --rpc http://localhost:8545 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment