--- name: eth-anchor description: > Anchor a Merkle root (root_hex) to Ethereum using a minimal calldata transaction, emit PROOF.json + tx metadata, with plan/apply/rollback and verification. Consumes merkle-forest ROOT.txt (or explicit ROOT_HEX). Triggers: 'eth anchor', 'anchor root on ethereum', 'calldata tx', 'proof on chain'. version: 1.0.0 --- # ETH Anchor (Calldata TX) This skill anchors a **root_hex** to Ethereum by sending a small transaction with the root embedded in **data** (calldata). It outputs a proof receipt linking **ROOT.txt → tx hash → chain**. ## Requirements - `cast` (Foundry) **or** `ethers`-compatible RPC with `curl` is possible; v1 uses `cast`. - RPC URL for the target network. - A funded private key (hot key) OR hardware wallet workflow (not implemented in v1). ## Quick Start ```bash cd ~/.claude/skills/eth-anchor # inputs export ROOT_FILE="$HOME/.claude/skills/merkle-forest/outputs/runs//ROOT.txt" # or: export ROOT_HEX="..." # chain export ETH_RPC_URL="https://..." export CHAIN_ID=1 # 1 mainnet, 11155111 sepolia, etc export TO_ADDRESS="0x0000000000000000000000000000000000000000" # burn/null is fine for data-only tx # signer export ETH_PRIVATE_KEY="0x..." # ensure funded # safety export DRY_RUN=1 export REQUIRE_CONFIRM=1 export CONFIRM_PHRASE="I UNDERSTAND THIS WILL SEND AN ETH TRANSACTION" ./scripts/00_preflight.sh ./scripts/10_plan.sh export DRY_RUN=0 ./scripts/11_apply.sh ./scripts/90_verify.sh ./scripts/99_report.sh ``` ## Inputs | Parameter | Required | Default | Description | |---|---:|---|---| | ROOT_FILE | No | (empty) | Path to ROOT.txt from merkle-forest | | ROOT_HEX | No | (empty) | Explicit root hex (overrides ROOT_FILE) | | ETH_RPC_URL | Yes | (none) | RPC endpoint | | CHAIN_ID | No | 1 | Chain id | | TO_ADDRESS | No | 0x000…000 | Recipient (data-only tx) | | GAS_LIMIT | No | 60000 | Gas limit | | VALUE_WEI | No | 0 | Value to send (normally 0) | | ETH_PRIVATE_KEY | Yes | (none) | Hot key for signing (v1) | | DRY_RUN | No | 1 | Apply refuses unless DRY_RUN=0 | | REQUIRE_CONFIRM | No | 1 | Require confirmation phrase | | CONFIRM_PHRASE | No | I UNDERSTAND THIS WILL SEND AN ETH TRANSACTION | Safety phrase | ## Outputs (per run) `outputs/runs/