Skip to content

EVM activity#31

Open
ivpusic wants to merge 1 commit intosim/evm-stablecoinsfrom
sim/evm-activity
Open

EVM activity#31
ivpusic wants to merge 1 commit intosim/evm-stablecoinsfrom
sim/evm-activity

Conversation

@ivpusic
Copy link
Member

@ivpusic ivpusic commented Mar 11, 2026

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.

This was referenced Mar 11, 2026
@cursor
Copy link

cursor bot commented Mar 12, 2026

PR Summary

Medium Risk
Adds a new Sim API surface in the CLI and modifies the installer to run interactive prompts, which could affect automation/non-interactive installs and user workflows.

Overview
Adds a new dune sim evm activity <address> command that calls /v1/evm/activity/{address} and supports filtering (--chain-ids, --token-address, --activity-type, --asset-type) plus pagination (--limit, --offset) with table or JSON output.

Extends sim evm to register the new subcommand and adds integration-style tests covering text/JSON output, filters, and pagination.

Updates install.sh to optionally run an interactive post-install flow (when /dev/tty is available) that offers to install the Dune AI skill via npx and optionally runs dune auth; otherwise it prints non-interactive tips.

Written by Cursor Bugbot for commit bdefbb5. 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 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.

Create PR

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"
}
Copy link

Choose a reason for hiding this comment

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

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.

Fix in Cursor Fix in Web

esac

echo "" >&2
log "Dune CLI ${dune_version} installed successfully!"
Copy link

Choose a reason for hiding this comment

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

Is this suppose to be in this PR?

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