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 SummaryMedium Risk Overview Extends Updates Written by Cursor Bugbot for commit bdefbb5. Configure here. |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix prepared a fix for the issue found in the latest run.
- ✅ Fixed: Hardcoded "ETH" symbol wrong for non-Ethereum chains
- Replaced hardcoded 'ETH' with a chain ID-based lookup function that returns the correct native symbol for each supported EVM chain.
Or push these changes by commenting:
@cursor push e8d1e8622c
Preview (e8d1e8622c)
diff --git a/cmd/sim/evm/activity.go b/cmd/sim/evm/activity.go
--- a/cmd/sim/evm/activity.go
+++ b/cmd/sim/evm/activity.go
@@ -180,11 +180,37 @@
}
// Native transfers may not have token_metadata.
if a.AssetType == "native" {
- return "ETH"
+ return nativeSymbolForChain(a.ChainID)
}
return ""
}
+// nativeSymbolForChain returns the native token symbol for a given chain ID.
+func nativeSymbolForChain(chainID int64) string {
+ switch chainID {
+ case 1, 10, 42161, 8453:
+ return "ETH"
+ case 56:
+ return "BNB"
+ case 137, 80002:
+ return "MATIC"
+ case 43114:
+ return "AVAX"
+ case 250:
+ return "FTM"
+ case 100:
+ return "xDAI"
+ case 25:
+ return "CRO"
+ case 1284, 1285, 1287:
+ return "GLMR"
+ case 42220:
+ return "CELO"
+ default:
+ return "NATIVE"
+ }
+}
+
// truncateHash shortens a hex hash for table display.
func truncateHash(hash string) string {
if len(hash) <= 14 {Comment @cursor review or bugbot run to trigger another review on this PR
| // Native transfers may not have token_metadata. | ||
| if a.AssetType == "native" { | ||
| return "ETH" | ||
| } |
There was a problem hiding this comment.
Hardcoded "ETH" symbol wrong for non-Ethereum chains
Medium Severity
The activitySymbol fallback for AssetType == "native" always returns "ETH", but the activity command supports querying any EVM chain via --chain-ids. For chains like BSC (BNB), Polygon (MATIC/POL), or Avalanche (AVAX), native transfers without token_metadata will incorrectly display "ETH" as the symbol in the text table output.
| esac | ||
|
|
||
| echo "" >&2 | ||
| log "Dune CLI ${dune_version} installed successfully!" |
bdefbb5 to
edf0ab9
Compare




Add
dune sim evm activity <address>for on-chain activity feeds (transfers, swaps, approvals, contract calls) with --chain-ids, --activity-type, --asset-type, --token-address filters. Text table and JSON output.