Skip to content

feat: implement chop 🔪#22

Open
colinnielsen wants to merge 235 commits intoevmts:mainfrom
colinnielsen:phase-1-6-implementation
Open

feat: implement chop 🔪#22
colinnielsen wants to merge 235 commits intoevmts:mainfrom
colinnielsen:phase-1-6-implementation

Conversation

@colinnielsen
Copy link

@colinnielsen colinnielsen commented Feb 25, 2026

Summary

Complete TypeScript/Effect implementation of the chop Ethereum CLI, TUI, and MCP server — 55 tasks across 6 phases:

  • Phase 1: CLI pure commands — ABI encoding/decoding, crypto hashing (keccak, sig), conversions (hex/dec/wei/utf8/rlp/bytes32), address utils (checksum, create, create2), bytecode disassembly
  • Phase 2: EVM + state + local devnet — in-process EVM via voltaire-effect, JSON-RPC server, mining modes, prefunded accounts
  • Phase 3: Full Anvil compatibility — snapshot/revert, forking, impersonation, time manipulation, all anvil_/evm_ methods
  • Phase 4: TUI with 8 views — dashboard, blocks, transactions, accounts, contracts, logs, storage, state inspector
  • Phase 5: MCP server — 25 tools, 6 resource templates, 4 prompts, SKILL.md/AGENTS.md for Claude Code discovery
  • Phase 6: Polish — README, VHS demo tapes, golden file tests, performance benchmarks, npm publishing setup

Stats

  • 3,759 tests passing (188 test files)
  • Typecheck clean, lint clean
  • npm pack: 277kB compressed, 1.5MB unpacked, 36 files

Test plan

  • bun run test — 3,759 tests pass
  • bun run typecheck — clean
  • bun run lint — clean (exit 0)
  • Performance benchmarks pass (CLI startup, ABI encode/decode, keccak, eth_call, package size)
  • npm pack --dry-run produces valid tarball

colinnielsen and others added 30 commits February 24, 2026 22:49
- package.json with effect, @effect/cli, @effect/platform, voltaire-effect
- tsconfig.json with strict mode, ES2022, ESM, bundler resolution, path aliases
- vitest.config.ts with forks pool, @effect/vitest, path aliases, v8 coverage
- tsup.config.ts with ESM output, node22 target, splitting, treeshake
- biome.json with tabs, double quotes, no semicolons, 120 line width
- bin/chop.ts stub entry point using NodeRuntime.runMain
- src/shared/types.ts re-exporting voltaire-effect branded types
- src/shared/errors.ts with ChopError base class (Data.TaggedError)
- src/shared/errors.test.ts with 3 passing @effect/vitest tests
- src/index.ts public API re-exports

All validation gates pass:
  bun run typecheck ✅
  bun run lint ✅
  bun run test ✅ (3/3 passing)
  bun run build ✅ (dist/bin/chop.js + dist/src/index.js)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add src/cli/version.ts extracting VERSION from package.json using
createRequire, and src/cli/errors.ts with CliError tagged error type
following the error hierarchy from docs/engineering.md.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Create src/cli/index.ts with root 'chop' command using @effect/cli.
- --json/-j global flag for JSON output mode
- --rpc-url/-r global flag for RPC endpoint URL
- --help, --version, --completions built-in via Command.run
- No-args prints 'TUI not yet implemented' stub
- Nonexistent subcommand exits 1 with error message
Update bin/chop.ts to use the CLI runner.
Export CLI module from src/index.ts.
Add src/cli/index entry to tsup.config.ts.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- version.test.ts: VERSION matches package.json, valid semver, non-empty
- errors.test.ts: CliError _tag, message, cause, catchTag pattern
- cli.test.ts: E2E tests for --help, --version, no-args, --json, -j,
  --rpc-url, -r, and nonexistent subcommand exit codes

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
All acceptance criteria met:
- chop --help exits 0, prints categorized help
- chop --version exits 0, prints version string
- chop nonexistent exits 1 with error message
- 22 tests passing

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add four new CLI commands for ABI operations:
- `chop abi-encode <sig> [args...]` — encode values by ABI types
- `chop abi-decode <sig> <data>` — decode ABI-encoded hex data
- `chop calldata <sig> [args...]` — encode full calldata (selector + args)
- `chop calldata-decode <sig> <data>` — decode function calldata

All commands support --json output and use voltaire-effect primitives.
Includes parseSignature, coerceArgValue, formatValue utilities.
Error types: InvalidSignatureError, ArgumentCountError, HexDecodeError.

46 tests covering unit, integration, round-trip, and E2E scenarios.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1. parseSignature: replace regex with balanced-paren parser to handle
   tuple types like foo((uint256,address))
2. Error handling: replace per-command catchTags with unified
   handleCommandErrors using tapError + catchAll for voltaire errors
3. coerceArgValue: return Effect instead of throwing synchronously;
   wrap Hex.toBytes/BigInt in Effect.try with AbiError
4. encodeParameters: wrap in safeEncodeParameters Effect.try
5. decodeParameters: wrap in safeDecodeParameters Effect.try
6. Fix double-printing: use tapError (print once) instead of
   Console.error + Effect.fail pattern
7. coerceArgValue: add array type support (address[], uint256[], etc.)
8. Add E2E tests for --packed flag (2 tests)
9. Export toParams from abi.ts, import in test (remove duplication)
10. Replace let result with ternary expression
11. buildAbiItem: use descriptive param names (arg0, out0) not type

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Extract core logic from Command.make callbacks into standalone exported
handler functions (abiEncodeHandler, calldataHandler, abiDecodeHandler,
calldataDecodeHandler). This separates business logic from CLI wiring,
improving testability and enabling in-process coverage.

Also exports validateHexData, validateArgCount, and buildAbiItem.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add 134 new tests (79 → 213) covering boundary conditions, error cases,
and edge cases across all modules:

- shared/types: 16 tests for re-exports, Hex edge cases (empty bytes,
  uppercase, mixed case, large arrays)
- shared/errors: 9 new tests for ChopError (unicode messages, empty
  messages, cause chaining, long messages, catchAll)
- cli/errors: 6 new tests for CliError (empty messages, special chars,
  non-Error causes, object causes, catchAll)
- cli/commands/abi: 103 new tests including:
  - parseSignature boundary: whitespace, underscored names, invalid
    names (numbers, dots, hyphens), trailing garbage, many params,
    nested tuples, empty outputs
  - coerceArgValue boundary: uint256 max/zero, int256 min, zero/max
    address, empty bytes, unicode strings, checksummed addresses,
    bool edge cases, float rejection, fixed arrays, empty arrays
  - formatValue boundary: empty arrays, nested arrays, null/undefined,
    zero bigint, negative bigint, max uint256
  - validateHexData: valid hex, empty hex, uppercase, odd-length,
    missing prefix, invalid chars, spaces
  - validateArgCount: matching counts, zero counts, mismatch both ways,
    singular/plural messages
  - buildAbiItem: simple/complex structures, outputs, empty name
  - Handler functions (in-process): abiEncodeHandler, calldataHandler,
    abiDecodeHandler, calldataDecodeHandler with success and error paths
  - E2E edge cases: zero-arg encode, zero values, string types,
    excess args, no-name calldata, output type decode, hex validation

Coverage: 54.2% → 86.54% (all modules, target ≥ 80%)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add 99 new tests across all modules:

- shared/types.ts: Address validation (isValid, equals, ZERO_ADDRESS),
  Hash module (ZERO, SIZE, fromHex, equals), Selector/Bytes32/Rlp API
  presence, Hex extended edge cases (large buffers, leading zeros,
  round-trips)

- shared/errors.ts: ChopError structural equality, Effect pipeline
  patterns (mapError, flatMap, tap, orElse, multiple catchTags),
  special cause types (number, array, nested errors, newlines, tabs)

- cli/errors.ts: CliError structural equality, edge case messages
  (unicode, long messages, newlines, null cause, nested errors),
  Effect pipeline patterns (mapError, tapError, orElse)

- cli/commands/abi.ts: Handler-level tests for abiEncodeHandler
  (max uint256, zero address, multiple types, packed encoding,
  error paths), calldataHandler (approve/balanceOf selectors,
  excess args, underscored names), abiDecodeHandler (multiple
  values, round-trips, output type priority, max uint256),
  calldataDecodeHandler (round-trips for approve/totalSupply/
  setBool, result shape, mismatched selector), handler round-trip
  consistency, abiCommands export, error structural equality

Coverage: 86.54% → 89.08% (stmts), 87.5% → 93.75% (funcs)
All 312 tests pass. No flaky tests (verified with double run).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Implement 3 address utility CLI commands:
- `chop to-check-sum-address <addr>` — EIP-55 checksum conversion
- `chop compute-address --deployer <addr> --nonce <n>` — CREATE address
- `chop create2 --deployer <addr> --salt <hex> --init-code <hex>` — CREATE2

Each command supports --json output, exits 1 with descriptive errors on
invalid input, and uses Data.TaggedError for error types. Handler logic
is separated from CLI wiring for testability (43 tests: unit + E2E).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
… fix CREATE2 test vectors

- Extract jsonOption, validateHexData, handleCommandErrors to shared cli/shared.ts
  (previously duplicated across address.ts, abi.ts, index.ts)
- validateHexData is now parameterized by error constructor for reuse
- Use addressCommands/abiCommands arrays in index.ts (eliminates dead exports)
- Assert exact EIP-1014 test vector addresses in CREATE2 tests instead of regex

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Implement 4 crypto CLI commands using voltaire-effect primitives:
- `chop keccak <data>` — keccak256 hash (hex or UTF-8 input)
- `chop sig <signature>` — 4-byte function selector
- `chop sig-event <signature>` — event topic (full keccak256)
- `chop hash-message <message>` — EIP-191 signed message hash

All commands support --json output. 45 tests (unit + E2E).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…, shared helper

1. Add error case tests for keccakHandler (invalid hex '0xZZZZ',
   odd-length hex '0xabc') and E2E test verifying exit code 1 on
   bad input. Satisfies acceptance criterion evmts#6.

2. Add explicit return type annotation to hashMessageHandler:
   Effect.Effect<string, CryptoError, KeccakService> with
   catchAllDefect for error mapping consistency with other handlers.

3. Extract duplicated runCli test helper from 4 test files
   (crypto, abi, address, cli) into shared src/cli/test-helpers.ts.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Implement all data conversion CLI commands:
- from-wei/to-wei: Wei ↔ ether (or gwei/szabo/finney/etc)
- to-hex/to-dec: Decimal ↔ hexadecimal
- to-base: Arbitrary base conversion (2-36)
- from-utf8/to-utf8: UTF-8 string ↔ hex
- to-bytes32: Pad/convert to 32-byte hex
- from-rlp/to-rlp: RLP encode/decode
- shl/shr: Bitwise shift left/right

All handlers are pure data transformations with no RPC dependency.
Uses pure BigInt arithmetic for wei conversions (no floating point).
109 tests (unit + E2E) all passing.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…s, dedup

- Fix toBaseHandler: replace Number.parseInt() with BigInt-native
  digit-by-digit parsing to prevent silent precision loss for values
  larger than 2^53 (Number.MAX_SAFE_INTEGER)
- Fix toDecHandler: handle bare '0x' (empty hex) by returning '0'
  instead of crashing with SyntaxError
- Fix negative hex formatting: use `-0xff` instead of `0x-ff` in
  toHexHandler, shlHandler, shrHandler via shared formatBigIntHex helper
- Extract outputResult helper to eliminate 12x duplicated if/else
  JSON output pattern across all command handlers
- Add missing tests: large value (>2^53) and 256-bit round-trip for
  toBaseHandler, bare '0x' for toDecHandler, negative number formatting
  for toHexHandler

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add 188 new tests covering boundary conditions, error cases, and
edge cases across all CLI command modules. Creates new test file for
cli/shared.ts and extends existing test files with thorough coverage.

Coverage: 82.49% statements (target: 80%+), 706 total tests passing.

New tests include:
- shared/types.ts: Hash, Selector, Bytes32, Rlp actual computation tests
- cli/shared.ts: validateHexData (15 tests), handleCommandErrors (4 tests)
- abi.ts: parseSignature edge cases, coerceArgValue, formatValue, validateArgCount
- address.ts: checksum, compute-address, create2 boundary conditions
- convert.ts: all unit conversions, precision, RLP, shift bounds
- crypto.ts: keccak edge cases, selectors, events, unicode, hash-message

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add in-process tests that directly invoke Command.handler() for crypto
and address commands, covering the Command.make blocks that were only
exercised through subprocess E2E tests (which don't contribute to v8
in-process coverage).

Coverage improvements:
- crypto.ts: 61.98% → 88.42%
- address.ts: 75.51% → 91.83%
- Overall: 82.49% → 86.81%

All 733 tests pass. All modules now exceed 80% coverage threshold.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add 53 new tests covering Command.make handler blocks for all CLI
commands, improving statement coverage from 86.81% to 94.14%.

- convert.test.ts: Add in-process handler tests for all 12 convert
  commands (fromWei, toWei, toHex, toDec, toBase, fromUtf8, toUtf8,
  toBytes32, fromRlp, toRlp, shl, shr) with plain/JSON output paths
  and error paths. Add toRlpHandler invalid hex data error path tests.
- abi.test.ts: Add in-process handler tests for abiEncodeCommand,
  calldataCommand, abiDecodeCommand, calldataDecodeCommand covering
  both JSON and non-JSON output branches and error paths.

Coverage improvements:
  abi.ts:     88.57% → 98.88%
  convert.ts: 82.92% → 92.44%
  Overall:    86.81% → 94.14%

All 786 tests pass consistently (verified twice, no flakiness).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add 157 new tests targeting uncovered code paths across all command modules,
bringing overall statement coverage from 94.14% to 98.45%.

- crypto.ts (88% → 100%): error paths in sigHandler, sigEventHandler,
  hashMessageHandler via vi.mock + Layer.succeed mocking
- address.ts (91% → 100%): calculateCreateAddress/calculateCreate2Address
  catchAll error paths via vi.mock with mockImplementationOnce
- convert.ts (92% → 96%): boundary conditions for toWei/fromWei, toBytes32
  UTF-8/numeric overflow, parseBigIntBase error paths, shl/shr edge cases
- abi.ts (98% → 100%): safeEncodeParameters overflow errors, coerceArgValue
  edge cases (arrays, bools, tuples, bytes), parseSignature edge cases,
  formatValue nested arrays, calldataDecodeHandler mismatched selectors

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ules

Add ~130 new tests covering boundary conditions, error paths, and edge
cases across abi, address, convert, and crypto command modules. Brings
overall statement coverage to 98.76%.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The previous monkey-patch tests tried to reassign getter-only ESM module
exports (Hex.toBytes, Rlp.encode) which throws 'Cannot set property'.
Replace with tests that trigger the same error paths using natural invalid
input (non-hex strings, invalid types, malformed hex characters).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…te-event

Implements T1.7 with three new commands:
- `chop disassemble <bytecode>` — parse EVM bytecode into opcode listing with PC offsets
- `chop 4byte <selector>` — look up 4-byte function selector via openchain.xyz API
- `chop 4byte-event <topic>` — look up 32-byte event topic via openchain.xyz API

All commands support --json flag. 82 tests covering unit, in-process, and E2E.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…test errors

Fix 16 typecheck errors and 30 lint errors across test files:
- Auto-fix template literal and import sorting lint issues
- Narrow union types before property access in abi, address, convert tests
- Remove unused variable declarations in address and crypto tests
- Add type assertions for branded types in types.test.ts
- Fix Effect type mismatches in mock implementations
- All 1179 tests passing, 98.85% coverage on src/cli/

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Domain errors for EVM WASM integration using Data.TaggedError.
WasmLoadError for binary loading failures, WasmExecutionError
for runtime EVM execution errors. Both support catchTag discrimination.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Context.Tag-based service for EVM bytecode execution via guillotine-mini
WASM module. Includes EvmWasmLive (Layer.scoped with acquireRelease)
and EvmWasmTest (pure TypeScript mini EVM supporting PUSH1, MSTORE,
MLOAD, RETURN, STOP, SLOAD, BALANCE) as a test double.

Acceptance tests verify:
- PUSH1+MSTORE+RETURN returns correct 32-byte padded output
- SLOAD yields to host, resumes with provided storage value
- BALANCE yields to host, resumes with provided balance
- Cleanup called on scope close (acquireRelease lifecycle)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
colinnielsen and others added 30 commits February 24, 2026 22:49
Scrollable block table showing number, hash, timestamp, tx count, gas,
and base fee. Detail view on Enter shows full header fields and tx list.
Mine via m key. Pure reducer exported for testing.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Allows the 'm' key to be dispatched as a ViewKey action to active views,
enabling the blocks view mine-block functionality.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Wire up blocks view as tab 4 with mine-on-m, data refresh, and
view switching. Mine triggers refreshBlocks + refreshDashboard.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sort imports alphabetically, replace template literal with string
literal, and use optional chaining instead of non-null assertions
in test files.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Remove dead `mineRequested` state from BlocksViewState (mine is
  side-effected by App.ts via action.key check, not reducer state)
- Add Gas Limit column to list table header and row rendering
- Show both relative + absolute timestamp in list view rows
- Remove stale comment about VIEW_KEYS in test (m is already there)
- Break long row-rendering line across multiple lines for readability
- Update tests to match new reducer behavior (m returns state unchanged)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- chain-coverage2: txHandler, receiptHandler, parseBlockId edge cases,
  blockHandler not-found, logsHandler with filters, findBlockHandler
  binary search, error types (35 tests)
- ens-coverage2: namehashHandler edge cases (unicode, deep nesting,
  known vectors), resolveNameHandler/lookupAddressHandler against
  local devnet (23 tests)
- node-coverage: formatBanner variants, startNodeServer local mode
  with custom options (11 tests)
- rpc-coverage2: callHandler with/without signatures, estimateHandler,
  sendHandler value branches, rpcGenericHandler param parsing,
  error types (30 tests)
- shared-coverage: hexToDecimal non-string branch, validateHexData
  error/success paths (16 tests)
- debug-coverage: all conditional spread branches, serialization
  format validation, empty block tracing (14 tests)
- evm-coverage: nodeConfig override branches, snapshot/revert cycle,
  time manipulation edge cases (16 tests)

Coverage: 95.7% stmts, 96.68% branches, 96.43% funcs
Key improvements: debug.ts 72→100%, evm.ts 83→100%, shared.ts 93→100%

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…as limit

Implements the Settings view (Tab 7) with form-style key-value layout across
4 sections: Node Configuration, Mining, Gas, and Fork. Mining mode is
toggleable (auto/manual/interval cycle) and block gas limit is editable
inline. Editable settings take effect immediately on the local devnet.

Follows the established 3-layer pattern:
- settings-format.ts: pure formatting functions (19 tests)
- settings-data.ts: Effect data fetching + mutations (14 tests)
- Settings.ts: view component with pure reducer (24 tests)

Adds 'space' to VIEW_KEYS for inline toggle support.
Wires Settings into App.ts tab 6 with refresh and side-effect handling.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add missing Fork Block field to SETTINGS_FIELDS and view
- Fix rpcUrl/forkUrl duplication: remove redundant rpcUrl from
  SettingsViewData, keep forkUrl sourced from nodeConfig.rpcUrl,
  add dedicated forkBlock field derived from genesis block number
- Add catchAll fallback test for getSettingsData with broken node mock
- Remove unused addCommas re-export from settings-format.ts
- Strengthen color assertions in settings-format.test.ts with exact
  DRACULA constant comparisons instead of toBeTruthy()
- Add formatForkBlock formatter + tests

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Pure formatting layer for the Transactions TUI view: formatStatus,
formatTxType, formatTo, formatCalldata, formatGasPrice. Re-exports
shared formatters from dashboard-format. 19 tests.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Effect-based data layer for the Transactions TUI view. Walks blocks
from head backwards, fetches PoolTransaction + TransactionReceipt
per tx hash. Includes filterTransactions for case-insensitive
substring matching. 19 tests.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Scrollable transactions table with detail pane and filter mode.
Pure transactionsReduce() for testable state management.
Columns: Hash, Block, From, To, Value, Gas Price, Status, Type.
Detail shows full calldata, logs, contract address. 25 tests.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Integrate Transactions view as tab index 5 (key "6"). Adds imports,
view creation, currentView union case, removeCurrentView case,
IMPLEMENTED_TABS update, switchToView case, refreshTransactions,
ViewKey handler, and isInputMode check for filter passthrough.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Pure formatting utilities for the Contracts TUI view:
- formatCodeSize: human-readable byte sizes
- formatPc: PC offset as 0x-prefixed hex
- formatDisassemblyLine: instruction formatting
- formatBytecodeHex: hex dump with line offsets
- formatStorageValue: storage value pass-through
- formatSelector: 4-byte selector with resolved name

20 tests covering all formatting functions.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Pure Effect data fetching for the Contracts TUI view:
- getContractsData: enumerate contracts via dumpState
- getContractDetail: disassemble bytecode, extract selectors, read storage
- extractSelectors: PUSH4+EQ pattern scan for function dispatch

13 tests covering selector extraction, contract enumeration,
and detail loading with disassembly/selectors/storage.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Split-pane Contracts view component (tab 3) with 4 view modes:
- list: scrollable contract list with address + code size
- disassembly: disassembled opcodes with PC offsets + selectors
- bytecode: raw hex dump with line offsets
- storage: slot browser (first 10 entries)

Pure contractsReduce reducer handles:
- j/k: navigate list or scroll detail
- Enter: select contract → disassembly view
- d: toggle disassembly ↔ bytecode
- s: switch to/from storage view
- Escape: back to list

32 reducer tests covering navigation, view toggling,
scrolling, and key routing integration.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add 'd' and 's' to VIEW_KEYS in state.ts for Contracts key dispatch
- Add tab 2 to IMPLEMENTED_TABS
- Create refreshContracts() data fetcher
- Wire Contracts view into view switching + keyboard routing
- Load contract detail on Enter (disassembly, selectors, storage)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
All acceptance criteria met:
- Contract list with addresses and code sizes ✓
- Disassembly view ✓
- Selector list with resolved names ✓
- Storage browser ✓
- deploy contract → appears in list (data test) ✓
- select → disassembly visible (reducer test) ✓
- press d → toggles view (reducer test) ✓
- press s → switches to storage (reducer test) ✓
- 65 tests across 3 test files, all passing

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add 34 tests across 4 new test files targeting previously uncovered lines:

- evm/wasm-coverage: REVERT opcode (non-trace), BALANCE without callback,
  unsupported opcode error path
- rpc/server-500: 500 error handler via mocked handleRequest defect
- procedures/eth-coverage: ethGetBlockByHash with full tx objects,
  ethFeeHistory error recovery and edge cases
- cli/commands/cli-commands-coverage: baseFee, findBlock, ENS resolve/lookup,
  send, and rpcGeneric command body paths (JSON + formatted)

Also excludes test helper scripts (test-server.ts, test-helpers.ts) from
coverage metrics as they are infrastructure, not library code.

Overall coverage: 97.29% statements, all modules ≥ 80%.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Cover previously-uncovered error branches and edge cases:
- convert: RLP encode/decode edge cases (empty byte strings, long payloads, odd-length hex)
- fork-config: ForkRpcError catch branches for request and batch failures
- fork-state: ForkRpcError→ForkDataError→defect path for account and storage fetches
- procedures: ethFeeHistory GenesisError/BlockNotFoundError branches, anvilNodeInfo falsy rpcUrl
- handlers: getLogs receipt-not-found continue branch, traceBlock TransactionNotFoundError catch

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…setStorageValue

Data layer for the State Inspector view (Tab 8). Uses hostAdapter.dumpState()
to build account tree nodes with balance, nonce, code size, and storage slots.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Pure synchronous formatting for tree indicators (▾/▸), indentation,
code size, hex/decimal toggle, storage slot lines, balance/nonce display.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ndering

Tree browser for accounts → storage. Features: expand/collapse (Enter/h/l),
hex/decimal toggle (x), edit storage values (e), search (/). Pure reducer
and buildFlatTree are exported for unit testing.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add State Inspector as tab 8 with data refresh and edit side effects
- Add h, l, x, e to VIEW_KEYS in state.ts for tree navigation
- Update state.test.ts for new ViewKey expectations
- Check off T4.9 in tasks.md

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add dashboard-view.test.ts (15 tests) for 8/8 TUI view coverage
- Fix 118 typecheck errors across 21 files:
  - Replace DOM `Response`/`RequestInit` with custom FetchInit/FetchResponse
  - Fix biome auto-fix artifacts (revert `?.` to `!` where needed)
  - Fix exactOptionalPropertyTypes in setStorageAt, rpc-handlers
  - Fix unused variables, implicit any types, possibly undefined
  - Add TextDecoder declare class for ens.ts
- Fix all lint errors (organizeImports, useYield, noUnusedImports)
- All 184 test files, 3710 tests passing
- Typecheck: 0 errors
- Lint: 0 errors

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Implements the full MCP integration layer: stdio server entry point,
25 tools spanning ABI/address/crypto/conversion/contract/chain/bytecode/devnet,
6 resource templates (account balance, storage, block, tx, node status/accounts),
4 prompts (analyze-contract, debug-tx, inspect-storage, setup-test-env),
and skill/agent files for Claude Code discovery.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
… npm prep

- Rewrite README.md for TypeScript/Effect version
- Add 5 VHS demo tape files in demos/
- Add golden file tests (cli-help, cli-abi-encode) with test/update scripts
- Add performance benchmarks (startup, ABI, keccak, eth_call, package size)
- Update package.json with keywords, repository, prepublishOnly
- 3759 tests passing, typecheck clean, lint clean

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant