Skip to content

feat: add --tokens flag to list deployment-specific tokens#2549

Open
hardyjosh wants to merge 1 commit intointeractive-strategy-builderfrom
list-tokens
Open

feat: add --tokens flag to list deployment-specific tokens#2549
hardyjosh wants to merge 1 commit intointeractive-strategy-builderfrom
list-tokens

Conversation

@hardyjosh
Copy link
Copy Markdown
Contributor

@hardyjosh hardyjosh commented Apr 14, 2026

Motivation

Non-interactive strategy-builder users need the valid token addresses for a deployment to populate --select-token KEY=<address> flags. The webapp resolves this dynamically by reading the registry's token-list; CLI users currently have no equivalent.

Inlining the full token list in --describe output was considered and rejected: a registry can have hundreds of tokens and the list is typically only needed for the one deployment the caller is working with.

Solution

Add a --tokens flag that scopes to a single strategy + deployment and emits a markdown table of the tokens the registry has registered for that deployment.

raindex strategy-builder --tokens \
  --registry <url> --strategy <key> --deployment <key>

Output:

# Available tokens — `fixed-limit` / `base`

14 tokens. Use any address as the value of a `--select-token KEY=<address>` flag.

| Symbol | Name | Address | Decimals |
|--------|------|---------|----------|
| `wtIAU` | Wrapped iShares Gold Trust ST0x | `0x1E46...` | 18 |
...

Any ERC20 address is accepted for --select-token; the list is a curated convenience subset. --describe links to this command so agents fetch scoped lists on demand.

Checks

  • made this PR as small as possible
  • unit-tested any new functionality
  • linked any relevant issues or PRs
  • included screenshots (if this involves a front-end change)

Copy link
Copy Markdown
Contributor Author

hardyjosh commented Apr 14, 2026

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

This stack of pull requests is managed by Graphite. Learn more about stacking.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 14, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 21e46ac9-987d-4473-bce8-3fcfb80e6b70

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • ✅ Review completed - (🔄 Check again to review again)
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch list-tokens

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@hardyjosh hardyjosh marked this pull request as ready for review April 15, 2026 12:48
@hardyjosh hardyjosh force-pushed the interactive-strategy-builder branch from 5b81496 to 09b6e85 Compare April 15, 2026 15:46
@hardyjosh
Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 15, 2026

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@hardyjosh hardyjosh force-pushed the interactive-strategy-builder branch from 09b6e85 to 9a36b8f Compare April 15, 2026 20:50
@hardyjosh
Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 15, 2026

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

`raindex strategy-builder --tokens --strategy <key> --deployment <key>
--registry <url>` emits a markdown table of all tokens registered for
that specific deployment (symbol, name, address, decimals).

This avoids bloating --describe output with potentially hundreds of
tokens per deployment. --describe will reference this command so an
agent only fetches the token list for the deployment it actually needs.
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