Skip to content

Instantly share code, notes, and snippets.

@stuckatsixpm
Last active May 26, 2022 01:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save stuckatsixpm/3c79ed98d0bce808c727e0c254b0be85 to your computer and use it in GitHub Desktop.
Save stuckatsixpm/3c79ed98d0bce808c727e0c254b0be85 to your computer and use it in GitHub Desktop.
WAXTax Tutorial

This is a basic usage tutorial for WAXTax. These instructions are written for Windows. Mac instructions will eventually be added.
It is assumed you have downloaded and installed Python 3.8 or higher. If you need Python, you can get it here: https://www.python.org/

Downloading WAXTax

If you're familiar with Git, you can use the command-line or GitHub Desktop to download this repository and skip the rest of this step.
To download WAXtax, visit the GitHub repository in your browser. image

Click the green Code button and download the zip folder, which will be called "waxtax-main". Extract it somewhere on your computer.

Installing WAXTax

This step only needs to be done once after you download WAXtax. The exception is if you move or delete the waxtax-main folder, in which case you will need to follow these instructions again.
Inside the extracted folder, there will be another folder called waxtax-main. Go into that folder, and you should see the following files: image

Hold shift, and right-click the background of the folder. You will see a variety of options depending on what programs you have installed. Find the Open Powershell window here option and click it. image

This will open a powershell window that will look similar to the following: image

Next, use the command pip install poetry. This installs the framework Python uses to manage the packages WAXtax relies on. After this command finishes, use poetry install. This should install the project, downloading required packages from the Python Package index.

Leave the powershell window open (you'll need it later) but WAXTax has now been successfully installed!

Using WAXTax

Back in the waxtax-main folder, look for a file called config.yaml. Open it in your preferred plain text editor (If unsure, the Windows notepad application is a safe choice).

The file will look like this: image

Edit the configuration file to suit your wallets and required date range. If you do a large number of transactions involving the transfer of WAX each month (10000+ transactions), I recommend exporting your transactions one month at a time. This may be applicable to you if you are a creator, as payouts from drops each count as an individual transaction.

It is vital to preserve the formatting and indentation of the config file.

accounts - list of accounts to check
contract - token contract, only supports eosio.token:transfer (WAX Transfers) at the moment
date-range - start and end date in UTC+00 timezone, "YYYY-MM-DDTHH:MM:SS" <- Note the quotation marks
currency - currency code to convert WAX price to. Case insensitive. See the list of supported codes here
export-folder - Name of folder to store exported transactions in. This export folder will be created inside the waxtax-main folder. endpoints - API endpoints to try to get transactions from. Caution! Different endpoints may produce different results, based on how up-to-date the API is. In general, most users can ignore this option. and just leave it as is.

Note: If you run WAXtax multiple times with the same export-folder, it will overwrite the previously exported CSVs. Either change the export-folder name between runs or relocate the export CSVs.

After you've finished altering the config.yaml file, save it, and close notepad (or whatever program you were using to edit it). Return to the powershell window you opened before. If you closed it, or you're using WAXtax for a second time, remember you can open the powershell window at the correct location by holding shift and right-clicking the background in the waxtax-main folder (the one containing config.yaml), and clicking "Open Powershell window here".

To run WAXtax and download your transactions, use poetry run python waxtax. This will download your transactions and process them into CSV files, which can be opened with Excel or any spreadsheet editor.
image
The files can be found in the folder you specified in the export-folder setting. In this case, we called it transaction_csvs so that's the folder that was created:
image

The CSVs in the folder will contain your transactions with the following columns:

  • timestamp - timestamp in UTC
  • block - Block Number
  • contract - Smart Contract and action, should always be "eosio.token - transfer"
  • from - the sender account
  • to - the recipient account
  • memo - the memo for the transaction if there was one
  • wax - the WAX value of the transaction
  • wax_historical - the historical WAX value in your fiat currency on the date of the transaction
  • value_at_date - the fiat currency value of the transaction
  • trx_id - the ID of the transaction
  • data - raw data from the transaction, in JSON format (v1.1.0+)

That's all!

I hope the tutorial was helpful! If you have any feedback, please contact me on Discord or Twitter!
If you encounter any problems, open an issue or ask for help in the SixPM Software Discord.

If you want to support SixPM Software's free projects, you can donate WAX to sixpm using the memo donation or buy stuckatsixpm a coffee.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment