LoginSignup
1
1

More than 5 years have passed since last update.

すべての ETH を送金して残高を 0 に(Ethereum, イーサリウム, エサリウム)

Last updated at Posted at 2016-02-28

以下を実行したらできました。

$ from=0x... # 送金元アドレス
$ to=0x...   # 送金先アドレス
$ gas=21000  # gasの量
$ gasprice=50000000000 # gasの値段, この変数の代わりに eth.gasprice としても良いようです
$ geth --exec "eth.sendTransaction({from:'$from',to:'$to',value:eth.getBalance('$from')-$gas*eth.gasprice,gas:$gas,gasPrice:$gasprice})" console

この方法を用いた理由

あるアドレスにある ethereum をすべて別のアドレスに移したいことがありました。しかし、gas や tax の計算が面倒でした。コマンドラインから実行するだけにしました。

参考にしたページ

1
1
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
1
1