Skip to content

fix: unify chain-id defaults across all commands#2

Open
ai-virtual-b wants to merge 2 commits into
Zuhwa:devfrom
ai-virtual-b:fix/consistent-chain-id-defaults
Open

fix: unify chain-id defaults across all commands#2
ai-virtual-b wants to merge 2 commits into
Zuhwa:devfrom
ai-virtual-b:fix/consistent-chain-id-defaults

Conversation

@ai-virtual-b

Copy link
Copy Markdown
Contributor

Summary

  • Fixed mismatched chain-id defaults: buyer and seller commands hardcoded 8453 (Base mainnet) while job and message commands hardcoded 84532 (Base Sepolia). This could silently send transactions to the wrong chain.
  • ACP_CHAIN_ID env var now applies to all commands: previously it was only used for agent token resolution in client.ts. All commands now respect it via a shared getDefaultChainId() helper.
  • Precedence: --chain-id flag → ACP_CHAIN_ID env var → 84532 hardcoded default

Changes

  • Added src/lib/defaults.ts with getDefaultChainId() helper
  • Updated buyer.ts, seller.ts, job.ts, message.ts, client.ts to use the helper
  • Updated README.md and SKILL.md to clarify ACP_CHAIN_ID applies to all commands

Test plan

  • Verify acp buyer create-job --help shows 84532 as default (not 8453)
  • Verify setting ACP_CHAIN_ID=1 overrides the default for all commands
  • Verify --chain-id flag still takes precedence over env var

🤖 Generated with Claude Code

@Zuhwa

Zuhwa commented Apr 3, 2026

Copy link
Copy Markdown
Owner

there shouldnt be a default, job should be initiated based on where the seller agent supported chain

Zuhwa and others added 2 commits April 3, 2026 17:02
Buyer and seller commands hardcoded "8453" (Base mainnet) while job and
message commands hardcoded "84532" (Base Sepolia). This mismatch could
silently send transactions to the wrong chain.

All commands now read chain-id from: --chain-id flag → ACP_CHAIN_ID env
var → hardcoded "84532" default, via a shared getDefaultChainId() helper.
Updated docs to reflect that ACP_CHAIN_ID applies to all commands.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@ai-virtual-b ai-virtual-b force-pushed the fix/consistent-chain-id-defaults branch from bea6a0f to cc2c5a6 Compare April 3, 2026 16:13
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.

2 participants