Skip to content

feat(cli): add --chains comma list for balances#81

Open
yashh-d wants to merge 1 commit into0xPolygon:mainfrom
yashh-d:feat/balances-chains
Open

feat(cli): add --chains comma list for balances#81
yashh-d wants to merge 1 commit into0xPolygon:mainfrom
yashh-d:feat/balances-chains

Conversation

@yashh-d
Copy link
Copy Markdown

@yashh-d yashh-d commented Apr 15, 2026

Summary

Adds --chains polygon,base,... to polygon-agent balances so agents can query the same wallet across multiple chains in one JSON response (parallel Sequence indexer calls, max 20 chains).

cc @JamesLawton for review when you have a moment.

Behavior

  • 2+ chains: multiChain: true and chains: [{ chainId, chain, balances }, ...]
  • 1 chain via --chains: same flat JSON as --chain (backward compatible)
  • Default / --chain: unchanged
  • TTY + 2+ chains: prints multi-chain JSON (Ink stays single-chain)

Docs

README + root/package/connector-ui SKILL.md updates.

How to test

pnpm polygon-agent balances --chains polygon,base,arbitrum | cat

Note: Assignees could not be set from this account (permission); please assign James in the PR sidebar if needed.

yashh-d added a commit to yashh-d/polygon-agent-cli that referenced this pull request Apr 15, 2026
- polygon-agent withdraw: POOL/UNDERLYING path + Pool.withdraw; ERC-4626 redeem (max or underlying via convertToShares)
- Document in README, skills, polygon-defi; CHANGELOG Unreleased
- fix: strip trailing slash in getExplorerUrl for explorer links

Note: branch includes feat/balances-chains base if PR 0xPolygon#81 is not merged yet; happy to rebase after.
Made-with: Cursor
@yashh-d yashh-d force-pushed the feat/balances-chains branch 2 times, most recently from 0439703 to 563e6a1 Compare April 15, 2026 02:58
- Parallel Sequence indexer fan-out per chain (max 20)
- JSON shape: multiChain + chains[] when 2+ chains; flat unchanged otherwise
- Document in README and agent skills (incl. connector-ui copies)
@yashh-d yashh-d force-pushed the feat/balances-chains branch from 563e6a1 to 0a4f50c Compare April 15, 2026 15:09
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