OLI-Converters is a Python-based tool designed to process smart contract data from various Blockscout instances and convert it to the Open Labels Initiative (OLI) format. This project aims to standardize and enrich blockchain contract data, making it more accessible and useful for researchers, developers, and analysts.
- Fetches contract data from multiple Blockscout APIs
- Processes and standardizes contract information
- Converts data to OLI format
- Supports concurrent processing for improved performance
- Handles various blockchain networks including Optimism, Polygon zkEVM, Arbitrum, and more
-
Clone the repository:
git clone https://github.com/Aghostraa/OLI-Converters.git cd OLI-Converters
-
Create a virtual environment:
python -m venv .venv
-
Activate the virtual environment:
- On Windows:
.venv\Scripts\activate
- On macOS and Linux:
source .venv/bin/activate
- On Windows:
-
Install the required dependencies:
pip install -r requirements.txt
-
Prepare your input CSV file with contract addresses and origin keys.
-
Update the
csv_file_path
variable in themain()
function ofmain.py
to point to your input file. -
Run the main script:
python main.py
-
The script will process the contracts and save the results in
processed_contracts.json
.
main.py
: The main script containing all the logic for fetching, processing, and converting contract data.processed_contracts.json
: Output file containing the processed contract data in OLI format.requirements.txt
: List of Python dependencies required for the project..gitignore
: Specifies intentionally untracked files to ignore.
The script supports multiple blockchain networks. You can modify the BLOCKSCOUT_APIS
and CHAIN_ID_MAP
dictionaries in main.py
to add or remove supported networks.
Contributions to OLI-Converters are welcome! Please feel free to submit a Pull Request.
[Specify your license here, e.g., MIT, GPL, etc.]
[Your Name or GitHub username] GitHub: @Aghostraa
- Blockscout for providing the API services
- Open Labels Initiative for the standardized format