11
14

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Geth コンソールコマンド一覧

Last updated at Posted at 2018-02-14

Gethのコンソールコマンド一覧です。
引数は適宜ご自身で切り替えてください。

アカウント関連

  • アカウントの作成
> personal.newAccount("passphrase")
  • アカウントの確認
> eth.accounts
  • インデックス指定でのアカウントの確認
> eth.accounts[index]
  • コインベースのアカウントの確認 ※コインベース: ブロック生成のマイニング報酬を得るアカウント
> eth.coinbase
  • コインベースアカウントの変更
> miner.setEtherbase(eth.accounts[index])
  • 残高確認 (wei)
> eth.getBalance(eth.accounts[index])
  • 残高確認 (ether) ※単位はether以外にも変更可能。
> personal.unlockAccount(eth.accounts[index])

マイニング関連

  • マイニングの開始 ※引数はマイニング処理を実行するスレッド数。
> miner.start(num_of_threads)
  • マイニングの停止
> miner.stop()
  • マイニング中か確認
> eth.mining
  • マイニングHashrateの確認
> miner.hashrate
  • ブロックの内容確認
eth.getBlock(blockNumber)

トランザクション関連

  • アカウントのロック解除 ※送金前に必要。
> web3.fromWei(eth.getBalance(eth.accounts[index]), "ether")
  • 送金
eth.sendTransaction({from: eth.accounts[source_index], to: eth.accounts[destination_index], value: web3.toWei(amount, "ether")})
  • トランザクションの確認
eth.getTransaction("transaction_address")
  • トランザクションの実行結果(レシート)の確認
eth.getTransactionReceipt("transaction_address")
参考記事

Ethereum Geth コンソールコマンド一覧

11
14
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
11
14

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?