feat(skills): unified EVM multi-chain skill (salvages #25291 + #2010 + folds in base/) - #25299
Merged
Conversation
Adds a comprehensive EVM blockchain skill with 14 commands: - stats, wallet, tx, token, activity, gas, price (core queries) - compare: gas + prices across all 8 chains simultaneously - whale: scan recent blocks for large transfers (configurable min USD) - multichain: scan same wallet across all 8 chains in parallel - allowance: check dangerous ERC-20 approvals (Permit2, Uniswap, 1inch...) - decode: decode tx input data via 4byte.directory - ens: resolve ENS names <-> addresses (bidirectional) - contract: inspect contracts (proxy detection, ERC-20/721, bytecode size) Chains: Ethereum, BNB Chain, Base, Arbitrum One, Polygon, Optimism, Avalanche, zkSync Era Zero external dependencies. Python stdlib only (urllib, json, argparse, threading). Co-authored-by: Mibayy <mibay@clawhub.io>
…2010 Salvages the closed PR #2010 (Mibayy's EVM multi-chain skill) and folds the existing optional-skills/blockchain/base/ skill into it, so we ship one unified EVM skill instead of two overlapping ones. Pulled in from base/: - 8 missing Base-specific tokens (AERO, DEGEN, TOSHI, BRETT, WELL, cbETH, cbBTC, wstETH, rETH) added to KNOWN_TOKENS['base'] — base/ had 11, evm/ only had 3 (USDC/DAI/WETH). - L1 data-fee pitfall note for rollups (Base, Arbitrum, Optimism, zkSync). - Batch-size chunking in rpc_batch (Base RPC caps batches at 10 calls per JSON-RPC request; adding more known tokens tripped that limit and broke 'wallet --chain base' with a 'list index out of range' error). Ported the chunking pattern from base/_rpc_batch_chunk. Latent bugs found and fixed while smoke-testing the merge: - cmd_multichain and cmd_allowance both iterated KNOWN_TOKENS[chain] with 'for contract, (symbol, _name) in known.items()' — but the dict shape is {symbol: contract_str}, not {addr: (sym, name)}. This raised 'too many values to unpack (expected 2)' on every non-zero balance. Now iterates as 'for symbol, contract in known.items()'. - Input validation: added is_valid_address / is_valid_txhash / require_address / require_txhash helpers and wired them into cmd_wallet, cmd_tx, cmd_token, cmd_activity, cmd_allowance, cmd_decode, cmd_contract, cmd_multichain. Fails fast with exit 2 on malformed input instead of burning an RPC round-trip on garbage. Documentation: - SKILL.md now flags that this skill supersedes optional-skills/blockchain/base. - Pitfalls expanded for ENS (single-endpoint dependency on ensideas.com), tx decoding (single-endpoint dependency on 4byte.directory), and rollup L1 fees. - Regenerated website/docs/user-guide/skills/optional/blockchain/ blockchain-evm.md and removed the old blockchain-base.md page; catalog updated. Removed: - optional-skills/blockchain/base/SKILL.md - optional-skills/blockchain/base/scripts/base_client.py - website/docs/user-guide/skills/optional/blockchain/blockchain-base.md Smoke-tested live against Base mainnet: stats, price, token, wallet (vitalik.eth — 3.12 ETH + 13.88 USDC + 4.23 DAI + 0.06 WETH on Base) and allowance (ethereum, 7 unlimited approvals to Uniswap/Permit2). Original PR #2010 author: Mibayy. Original base/ skill author: youssefea.
Contributor
🔎 Lint report:
|
| Rule | Count |
|---|---|
invalid-parameter-default |
1 |
First entries
optional-skills/blockchain/base/scripts/base_client.py:99: [invalid-parameter-default] invalid-parameter-default: Default value of type `None` is not assignable to annotated parameter type `list[Unknown]`
Unchanged: 4349 pre-existing issues carried over.
Diagnostics are surfaced as warnings — this check never fails the build.
- description ≤60 chars (was 346) - platforms: [linux, macos, windows] — script is pure stdlib (urllib, json, argparse), no POSIX-only primitives - author: credit @Mibayy + @youssefea + @ethernet8023 + Hermes Agent (was just Mibayy) - regenerated auto-gen docs page
1 task
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Salvages #25291 onto current
main. The original branch was based on a commit predating thevideo_generationsubsystem on main, so a direct merge would have silently deleted 15 production files (agent/video_gen_*.py,tools/video_generation_tool.py,plugins/video_gen/{fal,xai}/, and corresponding tests).This PR is the blockchain-only slice — two cherry-picked commits, original authorship preserved:
2c78b34a5— @Mibayy, original EVM multi-chain skill from closed PR feat: add EVM multi-chain skill (8 chains, 14 commands) #201056d97104a— @ethernet8023, consolidation commit: foldsoptional-skills/blockchain/base/intoevm/, ports the Base token list + L1 fee note + batch-size chunking, fixes two latent bugs in feat: add EVM multi-chain skill (8 chains, 14 commands) #2010 (dict-unpack crash incmd_multichain/cmd_allowance, missing address/tx-hash validation)Diff vs main
optional-skills/blockchain/evm/— new (210 LOC SKILL.md + 1508 LOCevm_client.py)optional-skills/blockchain/base/— removed (superseded)website/docs/user-guide/skills/optional/blockchain/blockchain-{base,evm}.md— autogen swapwebsite/docs/reference/optional-skills-catalog.md— catalog row updatedValidation
py_compilecleanwallet bad-address→error: invalid address 'bad-address': expected 0x-prefixed 40-hex-char address, exit 2 (validation works as documented)--helplists all 14 subcommandsCredit
optional-skills/blockchain/evm/— original work by @Mibayy in feat: add EVM multi-chain skill (8 chains, 14 commands) #2010optional-skills/blockchain/base/— original work by @youssefea (token list + L1-fee documentation now part of the unified EVM skill)Closes / Supersedes