Skip to content

feat: add sync command for config-driven multi-contract ABI syncing#34

Merged
satoshai-dev merged 1 commit intomainfrom
feat/sync-command
Feb 26, 2026
Merged

feat: add sync command for config-driven multi-contract ABI syncing#34
satoshai-dev merged 1 commit intomainfrom
feat/sync-command

Conversation

@satoshai-dev
Copy link
Copy Markdown
Owner

@satoshai-dev satoshai-dev commented Feb 26, 2026

Summary

Closes #17.

  • Add abi-cli sync command that reads abi.config.json or abi.config.ts to declaratively fetch and write ABIs for multiple contracts
  • Support per-contract network overrides, partial failure handling with summary report, and jiti-powered TypeScript config loading
  • Export loadConfig, validateConfig, AbiConfig, and ContractEntry from the programmatic API

Changes

File What
src/config.ts New — types, validation, config file discovery & loading (jiti for .ts)
src/commands/sync.ts New — syncCommand with --config/-c flag
src/cli.ts Register sync subcommand
src/index.ts Export config types and functions
package.json Add jiti dependency
tests/unit/config.test.ts 15 tests for validateConfig and loadConfig
tests/unit/sync.test.ts 7 tests for sync command behavior
README.md Document sync command, config schema, flags, programmatic API
.changeset/add-sync-command.md Minor changeset

Test plan

  • pnpm test — 60/60 tests pass (6 test files)
  • pnpm build — clean ESM, CJS, DTS output
  • pnpm typecheck — no type errors
  • Manual: create abi.config.json in repo root, run node dist/cli.js sync, verify files written to outDir

🤖 Generated with Claude Code

)

Add `abi-cli sync` that reads abi.config.json or abi.config.ts to
declaratively fetch and write ABIs for multiple contracts. Supports
per-contract network overrides, partial failure handling with summary
report, and jiti-powered TypeScript config loading.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@satoshai-dev satoshai-dev merged commit 3d24056 into main Feb 26, 2026
1 check passed
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.

feat: config file support for multi-contract sync

1 participant