Skip to content

envoylabs/staketaxcsv

 
 

Repository files navigation

staketaxcsv

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

Usage

  • Same arguments apply for report_terra.py (LUNA), report_sol.py (SOL), report_atom.py (ATOM), report_osmo.py (OSMO):

    # 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_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>
    
    # Show CSV result for single transaction in debug mode (great for development/debugging)
    python3 report_terra.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

  • Code style follows pep8. This can be tested with pycodestyle.

  • Providing a sample txid will expedite a pull request (email [email protected], 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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 99.6%
  • Other 0.4%