Geth コンソール基礎知識
2415 ワード
gethの起動コマンド
geth --networkid "10" --nodiscover --datadir ~/geth/private_net/ --rpc --rpcaddr "localhost" --rpcport "8545" --rpccorsdomain "*" --rpcapi "eth,net,web3,personal" --targetgaslimit "20000000" console 2>> ~/geth/private_net/error.log
アカウント作成
personal.newAccount("password")
コインベースアカウントの確認
eth.counbase
コインベースアカウントの変更
miner.setEtherbase(eth.accounts[?])
genesisブロックの確認
eth.getBlock(0)
マイニングの開始、確認、停止
miner.start(1)
eth.mining
miner.stop()
コインベースの残高確認
eth.getBalance(eth.accounts[0])
web3.fromWei(eth.getBalance(eth.accounts[0], "either")
送金
(eth.accountがロックされてるので送金不可)
eth.sendTransaction({from: eth.accounts[0], to: eth.accounts[1], value: web3.toWei(5, "ether")})
PASSWORDアンロック
personal.unlockAccount(eth.accounts[0])
送金が成功したトランザクション
eth.getTransaction("address")
トランザクション内のblockNumberに残高が存在する
web3.fromWei(eth.getBalance(eth.accounts[1], 58), "ether")
レシート
eth.getTransactionReceipt("address")
Author And Source
この問題について(Geth コンソール基礎知識), 我々は、より多くの情報をここで見つけました https://qiita.com/onagaway/items/b363631e8bed89767a81著者帰属:元の著者の情報は、元のURLに含まれています。著作権は原作者に属する。
Content is automatically searched and collected through network algorithms . If there is a violation . Please contact us . We will adjust (correct author information ,or delete content ) as soon as possible .