This Python script connects to the Ethereum blockchain using the web3.py library and retrieves the date of the latest Ethereum block.
- Clone this repository to your local machine.
- Install the required Python libraries by running
pip install -r requirements.txt
in your terminal. - Create a new
.env
file in the root directory of the project and add your Ethereum node's HTTP endpoint URL asSECRET_KEY
. - Run the script using
python main.py
in your terminal.
The script will connect to the Ethereum node, retrieve the latest block number, and print the date of that block to the console.
This project is licensed under the MIT License - see the LICENSE file for details.