Skip to content

EVM activity#31

Merged
ivpusic merged 1 commit intomainfrom
sim/evm-activity
Mar 13, 2026
Merged

EVM activity#31
ivpusic merged 1 commit intomainfrom
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

@ivpusic ivpusic force-pushed the sim/evm-stablecoins branch from 6ad5208 to 33a9461 Compare March 12, 2026 15:39
@ivpusic ivpusic force-pushed the sim/evm-activity branch 2 times, most recently from 2e4f6b8 to cf71047 Compare March 12, 2026 16:07
@ivpusic ivpusic force-pushed the sim/evm-stablecoins branch 2 times, most recently from cb6c0c7 to dd037e5 Compare March 12, 2026 16:10
@ivpusic ivpusic force-pushed the sim/evm-stablecoins branch from dd037e5 to 5098e51 Compare March 13, 2026 10:41
@ivpusic ivpusic force-pushed the sim/evm-stablecoins branch from 5098e51 to 3ab91b3 Compare March 13, 2026 10:45
@ivpusic ivpusic force-pushed the sim/evm-stablecoins branch from 3ab91b3 to 70c87a1 Compare March 13, 2026 10:53
@ivpusic ivpusic changed the base branch from sim/evm-stablecoins to graphite-base/31 March 13, 2026 10:56
@ivpusic ivpusic changed the base branch from graphite-base/31 to main March 13, 2026 10:56
@ivpusic ivpusic merged commit 7b613d5 into main Mar 13, 2026
2 checks passed
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