Skip to content

Sim evm stablecoins#30

Open
ivpusic wants to merge 1 commit intosim/evm-balancefrom
sim/evm-stablecoins
Open

Sim evm stablecoins#30
ivpusic wants to merge 1 commit intosim/evm-balancefrom
sim/evm-stablecoins

Conversation

@ivpusic
Copy link
Member

@ivpusic ivpusic commented Mar 11, 2026

Add dune sim evm stablecoins <address> for querying stablecoin balances across EVM chains with --chain-ids, --filters, --exclude-spam, --historical-prices flags. Reuses balancesResponse types from the balances command.

This was referenced Mar 11, 2026
@cursor
Copy link

cursor bot commented Mar 12, 2026

PR Summary

Low Risk
Low risk: adds a new CLI subcommand that calls a new Sim API endpoint and reuses existing balance parsing/printing paths, with minimal impact on existing commands.

Overview
Adds a new dune sim evm stablecoins <address> subcommand to query stablecoin balances (with optional chain/metadata/filter/pagination flags) and display USD-valued results.

The command calls GET /v1/evm/balances/<address>/stablecoins, supports -o json passthrough or a text table output, and includes basic integration tests for both formats.

Written by Cursor Bugbot for commit dba06ea. Configure here.

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is ON. A cloud agent has been kicked off to fix the reported issue.

Comment @cursor review or bugbot run to trigger another review on this PR

}
return nil
}
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Duplicated run logic between stablecoins and balances commands

Low Severity

runStablecoins is a near-verbatim copy of runBalances — the only differences are the API endpoint path and the omission of the asset-class flag. The flag definitions in NewStablecoinsCmd are similarly duplicated. A shared helper accepting the endpoint path (and optionally registering extra flags) would eliminate ~60 lines of duplication and ensure future bug fixes (e.g., to table rendering or param building) are applied consistently.

Fix in Cursor Fix in Web

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree, can we dedupe some of it ?

}
return nil
}
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree, can we dedupe some of it ?

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