- To get started create a virtual environment and install dependencies
python3 -m venv env
#activating virtual env
source env/bin/activate
pip3 install -r requirements.txt
- Download the pkl file from https://www.kaggle.com/datasets/xblock/ethereum-phishing-transaction-network?resource=download into your filesystem and set maingraph_path to the file location
-
To create your own subgraph
- Set the is_subgraph variable to FALSE at the top of the file
- Set the subgraph_save_path to your desired path output
- Set the nodes variable to the desired number of randomly sampled fraud and normal nodes to sample from the main graph
- Run the below snippet
python3.10 main.py
-
To amplify your subgraph with usd_values
- Set the subgraph_path to the path output of the subgraph_save_path from the previous step
- Set the is_subgraph variable to TRUE at the top of the file
- Run the below snippet (this will take around 5-6 hours) and you will need to set your own transpose api key in get_tx_hash_v2.py
python3.10 main.py
-
If you would ever like to not load the data and only modify the node features, set the skip_loading variable to TRUE
- Download the zipped subgraph here —>
- This subgraph was created from 200 fraudulent and 200 normal nodes and amplified with usd_values
- Set the subgraph_path to the file location of the unzipped pkl file from above
- Set the is_subgraph variable to TRUE at the top of the file
- Set the preload_path to the file above
- Run the below snippet
python3.10 main.py
- To run stats on a subgraph, set the create_overview_images variable to TRUE
The current configuration of the repo will load our preloaded JSON feature file and add them to the subgraph dataset and then display statistics of the subgraph.
- Run the below snippet
python3.10 main.py