idelgado / staketaxcsv

python repo to create blockchain CSVs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

staketaxcsv

  • Python repo to create blockchain CSVs for Terra (LUNA), Solana (SOL), and Cosmos (ATOM).
  • CSV codebase for stake.tax
  • Community contribution and PRs are most welcome, especially to fix/support new types of protocols/transactions.

Install

  1. Install python 3.9 (one way)
  2. Install pip packages pip3 install -r requirements.txt
  3. Edit (~/.bashrc, ~/.zshrc, shell equivalent) so that it loads sample.env in shell:
set -o allexport
source <PATH_TO_SAMPLE_ENV_HERE>/sample.env
set +o allexport
  1. For ATOM only, install gaiad

Usage

  • Same arguments apply for report_terra.py (LUNA), report_sol.py (SOL), report_atom.py (ATOM):
    cd src
    
    # Create default CSV
    python3 report_terra.py <wallet_address>
    
    # Create all CSV formats (i.e. koinly, cointracking, etc.)
    python3 report_terra.py <wallet_address> --format all
    
    # Show CSV result for single transaction (great for development/debugging)
    python3 report_terra.py <wallet_address> --txid <txid>
    

Contributing Code

  • Code style follows pep8. This can be tested with pycodestyle.
  • Providing a sample txid will expedite a pull request (email support@stake.tax, DM @staketax, etc.):
    # For a given txid, your PR (most commonly) should print different output before/after:
    python3 report_terra.py <wallet_address> --txid <txid>
    

Reference

See README_reference.md:

About

python repo to create blockchain CSVs

License:MIT License


Languages

Language:Python 99.6%Language:Shell 0.4%