c29r3 / staketaxcsv

python repo to create blockchain CSVs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

staketaxcsv

  • Python repository to create blockchain CSVs for Algorand (ALGO), Cosmos (ATOM), Agoric (BLD), Bitsong (BTSG), Sentinel (DVPN), Evmos (EVMOS), Fetch.ai (FET), Chihuahua (HUAHUA), IoTex (IOTX), Juno (JUNO), Terra Classic (LUNC), Terra 2.0 (LUNA), Osmosis (OSMO), Solana (SOL), and Stargaze (STARS) blockchains.
  • CSV codebase for https://stake.tax
  • Contributions/PRs highly encouraged, such as support for new txs, blockchains, or CSV formats. Examples:
    • Add cosmo-based-blockchain CSV (i.e. Agoric): commit
    • Add new CSV format (i.e. coinledger): commit

Usage

  • Same arguments apply for report_algo.py (ALGO), report_atom.py (ATOM), etc:

    # Load environment variables from sample.env (add to ~/.bash_profile or ~/.bashrc to avoid doing every time)
    set -o allexport
    source sample.env
    set +o allexport
    
    cd src
    
    # Create default CSV
    python3 report_atom.py <wallet_address>
    
    # Create all CSV formats (i.e. koinly, cointracking, etc.)
    python3 report_atom.py <wallet_address> --format all
    
    # Show CSV result for single transaction (great for development/debugging)
    python3 report_atom.py <wallet_address> --txid <txid>
    
    # Show CSV result for single transaction in debug mode (great for development/debugging)
    python3 report_atom.py <wallet_address> --txid <txid> --debug

Install

  1. Install python 3.9 (one way)

  2. Install pip packages

    pip3 install -r requirements.txt

Docker

See Docker to alternatively install/run in docker container.

Contributing Code

  • See Linting to see code style feedback.

  • 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_osmo.py <wallet_address> --txid <txid>

Reference

See README_reference.md:

About

python repo to create blockchain CSVs

License:MIT License


Languages

Language:Python 99.8%Language:Shell 0.1%Language:Dockerfile 0.1%