Skip to content

0mynona0/staketaxcsv

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

staketaxcsv

  • Python repo 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):
    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>
    

Install

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

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.7%
  • Shell 0.3%