Add svm balances command with SimClient wiring#38
Add svm balances command with SimClient wiring#38ivpusic wants to merge 1 commit intosim/evm-defi-positionsfrom
Conversation
|
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.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
PR SummaryLow Risk Overview Wires SVM subcommands to a small Written by Cursor Bugbot for commit 1b64179. Configure here. |
| return "0.00" | ||
| } | ||
| return fmt.Sprintf("%.2f", v) | ||
| } |
There was a problem hiding this comment.
Duplicated formatUSD utility across EVM and SVM packages
Low Severity
The formatUSD function in cmd/sim/svm/balances.go is an exact copy of the one in cmd/sim/evm/balances.go. This utility has no package-specific type dependencies and could live in the shared output package to avoid duplicated logic and the risk of the two copies diverging over time.
| formatUSD(b.PriceUSD), | ||
| formatUSD(b.ValueUSD), | ||
| } | ||
| } |
There was a problem hiding this comment.
Display uses optional Balance field instead of required Amount
Low Severity
The text table displays b.Balance (tagged json:"balance,omitempty") in the BALANCE column, but this field is optional per its struct definition. The required Amount field (no omitempty) is never displayed. If the API omits balance for any entry, that table cell will be blank with no fallback to Amount.
1b64179 to
d5e475f
Compare
2208ba0 to
234d2c4
Compare
d5e475f to
9de6e43
Compare
04fc294 to
c682cc0
Compare
9de6e43 to
3e08956
Compare
3e08956 to
a2dc2be
Compare
c682cc0 to
2879e1f
Compare



Add
dune sim svm balances <address>for querying SVM token balances across Solana/Eclipse chains with USD valuations. Supports --chains, --limit, --offset flags, text table and JSON output.