Conversation
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
bdefbb5 to
edf0ab9
Compare
6ad5208 to
33a9461
Compare
2e4f6b8 to
cf71047
Compare
cb6c0c7 to
dd037e5
Compare
cf71047 to
bd39336
Compare
dd037e5 to
5098e51
Compare
bd39336 to
17d42fd
Compare
5098e51 to
3ab91b3
Compare
17d42fd to
0076e71
Compare
3ab91b3 to
70c87a1
Compare
0076e71 to
4c6112c
Compare
4c6112c to
e37ab31
Compare
70c87a1 to
bf236d9
Compare
e37ab31 to
a7f191f
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.