원클릭으로
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