This Python script interacts with the Etherscan API to fetch information about Gnosis Safe addresses created by a specified factory contract.
- Python 3
- Requests library
- dotenv library
-
Install the required dependencies:
pip install requests python-dotenv
-
Create a
.env
file in the root directory of the project and add your Etherscan API key:etherscan_key=YOUR_API_KEY_HERE
Run the script with:
python main.py
The script will output the number of Gnosis Safe addresses created by the specified factory contract.
- I want to add pagination to go back in history on the factory, since etherscan stops at 1000 results by default. Wasn't important for this version, but I'll include it in future ones.
- Gonna add command line args to make it more utility, and do the same for the function so it can be included in other libraries.