This repository features a collection of Python scripts designed to facilitate interaction with the Optimism (OP) Layer 2 network. Utilizing the web3.py library, these tools enable you to easily read on-chain data, track network statistics, and serve as a foundation for building more complex dApps or automation scripts.
This toolset provides a solid starting point for data processing, analysis, and automation tasks on Optimism L2.
(Located inside the scripts/ folder)
- Function: Establishes a connection to the Optimism Mainnet RPC endpoint.
- Capabilities: Retrieves the network's latest block number.
- Capabilities: Checks the native ETH balance for a specific Optimism address (currently set to a known Optimism system contract).
Ensure you have the following installed on your system:
- Python 3.8+
- pip (Python Package Installer)
- Git
Download the repository to your local machine:
git clone [https://github.com/your-username/Optimism-Python-Tools.git](https://github.com/your-username/Optimism-Python-Tools.git)
cd Optimism-Python-Tools