ワンクリックで
get-block-number
Get the latest block number for a blockchain using Web3.py and JSON-RPC environment variables
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Get the latest block number for a blockchain using Web3.py and JSON-RPC environment variables
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Add support for a new ERC-4626 vault protocol. Use when the user wants to integrate a new vault protocol like IPOR, Plutus, Morpho, etc. Requires vault smart contract address, protocol name, and protocol slug as inputs.
Audit curator feeder YAML files for stale Twitter, LinkedIn, RSS and website error markers, decide whether each error is real, then clear false positives, repoint renamed handles/links, or tombstone dead entities — leaving a dated audit comment on every entry touched.
Add a new stablecoin or staked/derivative stablecoin to feed metadata, classification sets, rich metadata YAML and logos. Use when the user wants a stablecoin symbol (e.g. a vault denomination token) to be recognised by is_stablecoin_like() and shown on the site.
Add a new vault curator to feed metadata and curator detection. Use when the user wants to add a verified curator, protocol-managed curator, or curator alias discovered from vault data.
Identify missing vault curators from vault databases and suggest curator feeder YAML entries
Check all stablecoin YAML files for Twitter activity and domain availability, adding a checks section to each file
| name | get-block-number |
| description | Get the latest block number for a blockchain using Web3.py and JSON-RPC environment variables |
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.
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
from eth_defi.provider.multi_provider import create_multi_provider_web3
# Replace {CHAIN} with the uppercase chain name
json_rpc_url = os.environ.get("JSON_RPC_{CHAIN}")
if not json_rpc_url:
raise ValueError("JSON_RPC_{CHAIN} environment variable not set")
web3 = create_multi_provider_web3(json_rpc_url)
block_number = web3.eth.block_number
print(f"Latest block number: {block_number}")
Run the script with:
source .local-test.env && poetry run python <script_path>
Return the block number to the user in a clear format, e.g.:
Chain: Ethereum
Latest block number: 19,234,567