This Python script helps crypto accountants manage data efficiently. The primary functionality is a script that retrieves and classes all the transactions given a wallet address in the Starknet blockchain.
-
Python Version
Ensure you have Python 3.8 or later installed.
You can check your Python version with:python --version
-
API Key
You’ll need aPROJECT_IDassociated with your BlastAPI account.
-
Clone the Repository
git clone <repository_url> cd <repository_folder>
-
Install Dependencies
[OPTIONAL] First create a virtual environment in the cloned repository folder:
python3 -m venv env
Activate the environment:
For MacOS/Linux
source env/bin/activateFor Windows
.\env\Scripts\activate
Use the
requirements.txtfile to install the necessary packages:pip install -r requirements.txt
-
Set Up Environment Variables
-
A
.env.templatefile is provided. -
Rename it to
.env: -
Open the
.envfile in a text editor and replace<PROJECT_ID>with your actual project ID from BlastAPI:PROJECT_ID=<your_project_id> -
Add one or multiple wallet addresses in the config.py file (in WALLET_ADDRESSES) to create a .csv file for each of them.
-
To use the script, simply run the following command in your terminal:
python run.pyIf your wallet address is 0xabc123...:
WALLET_ADDRESSES = ["0xabc123..."] in config.py
A CSV file will be generated with all the transactions for the given wallet address.