Skip to content

feat(skills): unified EVM multi-chain skill (salvages #25291 + #2010 + folds in base/) - #25299

Merged
teknium1 merged 3 commits into
mainfrom
hermes/hermes-1ea54e9e
May 14, 2026
Merged

feat(skills): unified EVM multi-chain skill (salvages #25291 + #2010 + folds in base/)#25299
teknium1 merged 3 commits into
mainfrom
hermes/hermes-1ea54e9e

Conversation

@teknium1

Copy link
Copy Markdown
Contributor

Salvages #25291 onto current main. The original branch was based on a commit predating the video_generation subsystem 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:

Diff vs main

  • optional-skills/blockchain/evm/ — new (210 LOC SKILL.md + 1508 LOC evm_client.py)
  • optional-skills/blockchain/base/ — removed (superseded)
  • website/docs/user-guide/skills/optional/blockchain/blockchain-{base,evm}.md — autogen swap
  • website/docs/reference/optional-skills-catalog.md — catalog row updated
  • No video_gen files touched.
 optional-skills/blockchain/base/SKILL.md                              |  232 ---
 optional-skills/blockchain/base/scripts/base_client.py                | 1008 -------
 optional-skills/blockchain/evm/SKILL.md                               |  210 +++
 optional-skills/blockchain/evm/scripts/evm_client.py                  | 1508 ++++++
 website/docs/reference/optional-skills-catalog.md                     |    2 +-
 website/docs/user-guide/skills/optional/blockchain/blockchain-base.md |  249 ---
 website/docs/user-guide/skills/optional/blockchain/blockchain-evm.md  |  226 +++
 7 files changed, 1945 insertions(+), 1490 deletions(-)

Validation

  • py_compile clean
  • wallet bad-addresserror: invalid address 'bad-address': expected 0x-prefixed 40-hex-char address, exit 2 (validation works as documented)
  • --help lists all 14 subcommands

Credit

Closes / Supersedes

Mibayy and others added 2 commits May 13, 2026 17:11
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.
@github-actions

github-actions Bot commented May 14, 2026

Copy link
Copy Markdown
Contributor

🔎 Lint report: hermes/hermes-1ea54e9e vs origin/main

ruff

Total: 0 on HEAD, 0 on base (➖ 0)

🆕 New issues: none

✅ Fixed issues: none

Unchanged: 0 pre-existing issues carried over.

ty (type checker)

Total: 8270 on HEAD, 8271 on base (✅ -1)

🆕 New issues: none

✅ Fixed issues (1):

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
@teknium1
teknium1 merged commit 66c7096 into main May 14, 2026
16 of 17 checks passed
@teknium1
teknium1 deleted the hermes/hermes-1ea54e9e branch May 14, 2026 00:18
@alt-glitch alt-glitch added type/feature New feature or request P3 Low — cosmetic, nice to have labels May 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P3 Low — cosmetic, nice to have type/feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants