LoginSignup
0
0

More than 5 years have passed since last update.

zcashd で ZCash マイニングの税計算を行う

Posted at

今までは Insight や ethscan などの web サービスを使って仮想通貨の税計算を行うのにチャレンジしましたが,

BitZeny のマイニングの集計を行う
https://qiita.com/syoyo/items/5a00688f7f6bcf83aa2f

ZCash プールマイニングで得られた報酬履歴を zchain でスキャンし課税計算に使う(進捗 95%)
https://qiita.com/syoyo/items/07e6f6360eaf6db94e17

最近では ZCash の取りあつかいは日本では風当たりが強いため, zcashd を立てるようにして ZCash はローカルウォレット管理するようにしました.

ローカルウォレットですと, zcash-cli や JSON API で取引履歴を簡単に追うことができるので, マイニングの税計算も楽になることがわかりました.
(マイニングしたものをすぐにウォレットに移動すると仮定)

トランザクションをリストアップする.

listtransactions を使います.

デフォルトでは(直近の?) 10 トランザクションしか取得しないので, トランザクション数に応じて count, skip を調整しましょう.

以下のような感じで JSON が取れます.

[
  {
    "account": "",
    "address": "xxxxxx",
    "category": "receive",
    "amount": 0.00,
    "vout": 1,
    "confirmations": 0,
    "blockhash": "000000000",
    "blockindex": xx,
    "blocktime": xxxxxxx,
    "expiryheight": 0,
    "txid": "xxxxxxxxxxxxx",
    "walletconflicts": [
    ],
    "time": xxxx,
    "timereceived": xxxxx,
    "vjoinsplit": [
    ],
    "size": 0
  },
...

あとはこれを python なりで処理にかけて完成ですね!
amount, time, category あたりを見ればよさそうです.

TODO

他の coind で試す.

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