get-block-number
Installation
SKILL.md
Get latest block number
This skill retrieves the latest block number from a blockchain using the configured JSON-RPC environment variables and Web3.py.
ALWAYS USE SCRIPT. NEVER RELY ON THE HISTORICAL INFORMATION OR GUESS.
Required inputs
- Chain name: The blockchain to query (e.g., Ethereum, Arbitrum, Base, Polygon)
Running the script
Generate and run a Python script to fetch the block number. Run it Python commadn line inline, don't write a new file.
import os
from web3 import Web3