Skip to content

Promote analytics events to mainnet#715

Merged
joaoazevedo merged 1 commit into
env/mainnetfrom
main
Dec 16, 2025
Merged

Promote analytics events to mainnet#715
joaoazevedo merged 1 commit into
env/mainnetfrom
main

Conversation

@joaoazevedo

@joaoazevedo joaoazevedo commented Dec 16, 2025

Copy link
Copy Markdown
Contributor

Note

Integrates Vercel Analytics to track canonical/interchain token deployments (including remote registrations) and token transfers, and skips flaky network-dependent tests.

  • Analytics (Vercel):
    • New utilities: Add ~/lib/utils/analytics with trackTokenDeployment, trackRemoteTokenDeployments, and trackTokenTransfer.
    • Deployment tracking:
      • Canonical: Track main registration and per-destination remote creations in useDeployAndRegisterRemoteCanonicalTokenMutation.
      • Interchain: Track main creation and per-destination remote creations in useDeployAndRegisterRemoteInterchainTokenMutation.
      • Remote registrations: Track per-chain remote token registrations in RegisterRemoteTokens.
    • Transfer tracking: Track interchain transfers in useInterchainTokenServiceTransferMutation and useInterchainTransferMutation.
  • Tests:
    • Mark network-dependent specs as skipped in packages/api/src/axelarscan/client.spec.ts and packages/api/src/deposit-address/client.spec.ts.

Written by Cursor Bugbot for commit 3897c54. This will update automatically on new commits. Configure here.

@changeset-bot

changeset-bot Bot commented Dec 16, 2025

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 3897c54

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@vercel

vercel Bot commented Dec 16, 2025

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
axelar-maestro-mainnet (staging) Ready Ready Preview, Comment Dec 16, 2025 1:18pm
axelar-registry Ready Ready Preview, Comment Dec 16, 2025 1:18pm
axelar-ui Ready Ready Preview, Comment Dec 16, 2025 1:18pm
axelarjs-maestro-testnet Ready Ready Preview, Comment Dec 16, 2025 1:18pm

Comment thread packages/api/src/axelarscan/client.spec.ts
@greptile-apps

greptile-apps Bot commented Dec 16, 2025

Copy link
Copy Markdown

Greptile Overview

Greptile Summary

Promotes analytics event tracking from testnet to mainnet, adding Vercel Analytics integration for token deployments and transfers.

  • Added new analytics.ts utility with functions to track token deployment/registration and transfer events
  • Integrated analytics tracking into canonical and interchain token deployment flows after successful database recording
  • Added transfer analytics tracking in both ITS and direct interchain transfer hooks after transaction submission
  • Skipped four flaky API tests that depend on external testnet services

Key observations:

  • Analytics events for token transfers are tracked immediately after transaction submission (before confirmation), which may result in tracking failed transactions
  • All deployment analytics are tracked after database recording, providing better accuracy
  • Test skipping is appropriate for mainnet promotion as these tests rely on testnet infrastructure

Confidence Score: 4/5

  • Safe to merge with one consideration about transfer event tracking timing
  • The code is well-structured and analytics tracking is properly integrated. The main consideration is that token transfer events are tracked immediately after transaction submission rather than after confirmation, which could lead to tracking transactions that later fail. However, this is a minor issue for analytics purposes and doesn't affect core functionality.
  • Consider the timing of analytics tracking in useInterchainTokenServiceTransferMutation.ts and useInterchainTransferMutation.ts - events are tracked before transaction confirmation

Important Files Changed

File Analysis

Filename Score Overview
apps/maestro/src/lib/utils/analytics.ts 5/5 New analytics utility file with functions to track token deployment, registration, and transfer events via Vercel Analytics
apps/maestro/src/features/RegisterRemoteTokens/RegisterRemoteTokens.tsx 5/5 Added analytics tracking for remote token deployments across three different transaction flows (EVM, Sui, Stellar)
apps/maestro/src/features/SendInterchainToken/hooks/useInterchainTokenServiceTransferMutation.ts 5/5 Added analytics tracking for token transfers via ITS after successful transaction submission
apps/maestro/src/features/SendInterchainToken/hooks/useInterchainTransferMutation.ts 5/5 Added analytics tracking for interchain token transfers after successful transaction submission

Sequence Diagram

sequenceDiagram
    participant User
    participant UI
    participant Hook
    participant Contract
    participant Analytics
    participant Database

    Note over User,Database: Token Deployment Flow
    User->>UI: Deploy/Register Token
    UI->>Hook: Call deployment mutation
    Hook->>Contract: Execute deployment transaction
    Contract-->>Hook: Return tx hash
    Hook->>Database: Record deployment
    Database-->>Hook: Success
    Hook->>Analytics: Track token deployment event
    Hook->>Analytics: Track remote token deployments
    Analytics-->>Hook: Events tracked
    Hook->>UI: Update status (deployed)

    Note over User,Database: Token Transfer Flow
    User->>UI: Initiate token transfer
    UI->>Hook: Call transfer mutation
    Hook->>Contract: Execute transfer transaction
    Contract-->>Hook: Return tx hash
    Hook->>Analytics: Track token transfer event
    Analytics-->>Hook: Event tracked
    Hook->>UI: Update status (submitted)
Loading

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

8 files reviewed, 2 comments

Edit Code Review Agent Settings | Greptile

@joaoazevedo joaoazevedo merged commit 6392bb4 into env/mainnet Dec 16, 2025
8 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