xellos00 / 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 Akash (AKT), Algorand (ALGO), Archway (ARCH), Cosmos (ATOM), Agoric (BLD), Bitsong (BTSG), Sentinel (DVPN), dYdX (DYDX), Dymension (DYM), Evmos (EVMOS), Fetch.ai (FET), Chihuahua (HUAHUA), IoTex (IOTX), Injective (INJ), Juno (JUNO), Kujira (KUJI), KYVE Network (KYVE), Terra Classic (LUNC), Terra 2.0 (LUNA), Osmosis (OSMO), Solana (SOL), Stargaze (STARS), Stride (STRD), and Celestia (TIA).
  • CSV codebase for https://stake.tax
  • Contributions/PRs highly encouraged, such as support for new txs, blockchains, or CSV formats. Examples:

Install

  1. Install python 3.9 (one way)

  2. Install pip packages

    pip3 install -r requirements.txt
    

Usage

  • Load environment variables (add to ~/.bash_profile or ~/.bashrc to avoid doing every time):

    set -o allexport
    source sample.env
    set +o allexport
    
  • Usage as CLI

    • See PYTHONPATH issues if encountering import errors.
    • Same arguments apply for report_algo.py (ALGO), ..., report_*.py:
    cd src
    
    # Create default CSV
    python3 staketaxcsv/report_osmo.py <wallet_address>
    
    # Create all CSV formats (i.e. koinly, cointracking, etc.)
    python3 staketaxcsv/report_osmo.py <wallet_address> --format all
    
    # Show CSV result for single transaction (great for development/debugging)
    python3 staketaxcsv/report_osmo.py <wallet_address> --txid <txid>
    
    # Show CSV result for single transaction in debug mode (great for development/debugging)
    python3 staketaxcsv/report_osmo.py <wallet_address> --txid <txid> --debug
    
    # Create historical balances CSV
    python3 staketaxcsv/report_osmo.py <wallet_address> --historical
  • Usage as staketaxcsv module: see Usage as staketaxcsv module

Contributing Code

  • See Tests for running unit tests.
  • See Linting to see code style feedback.
  • See Docker to alternatively install/run in docker container.

Reference

See README_reference.md:

About

python repo to create blockchain CSVs

License:MIT License


Languages

Language:Python 100.0%Language:Dockerfile 0.0%