Skip to content

feat(settings): Smart Contract Event Log Explorer#448

Open
naninu123 wants to merge 1 commit into
Stellar-split:mainfrom
naninu123:feat/405-event-log-explorer
Open

feat(settings): Smart Contract Event Log Explorer#448
naninu123 wants to merge 1 commit into
Stellar-split:mainfrom
naninu123:feat/405-event-log-explorer

Conversation

@naninu123

Copy link
Copy Markdown

Summary

Adds a Soroban contract event log explorer at /settings/contract-events for inspecting StellarSplit contract events via RPC getEvents.

Closes #405

Implementation

Piece Path
Config src/lib/config.tscontractId / RPC_URL from env
Decode + fetch src/lib/contractEvents.ts — XDR/JSON decode, block-range validation, getEvents
API src/app/api/contract-events/route.ts — cursor, type, from/to ledger query params
Row UI src/components/settings/ContractEventRow.tsx — topics/value with syntax-ish mono + hex fallback tooltip
Page src/app/settings/contract-events/page.tsx — type chips, range inputs, cursor prev/next, SWR 15s revalidate
Tests src/lib/__tests__/contractEvents.test.ts

Acceptance criteria

  • Explorer at /settings/contract-events loads events for configured NEXT_PUBLIC_CONTRACT_ID (empty config shows guidance, no crash)
  • Cursor-based pagination (query cursor + prev stack / next from RPC cursor)
  • Event type filter chips (all / contract / system / diagnostic) re-query without full reload
  • Undecodable XDR → hex display + tooltip (no component crash)
  • Block range validates fromLedger <= toLedger and max 1000 ledgers with inline errors
  • Unit tests green (vitest on contractEvents)

Notes

  • Deps: @stellar/stellar-sdk, swr
  • Full next build not run on this agent host (3.7 GiB RAM; build OOMs). Lint on new files clean; 10/10 unit tests pass. Please run CI npm test / npm run build on GH Actions.

Test plan

  1. Set NEXT_PUBLIC_CONTRACT_ID + NEXT_PUBLIC_RPC_URL in .env.local
  2. npm run dev → open /settings/contract-events
  3. Confirm list / type chips / range validation / next-prev pagination
  4. npx vitest run src/lib/__tests__/contractEvents.test.ts

Implements /settings/contract-events with RPC getEvents API route,
XDR/JSON decode, type filters, cursor pagination, and ledger range
validation. Closes Stellar-split#405.
@vercel

vercel Bot commented Jul 26, 2026

Copy link
Copy Markdown

@naninu123 is attempting to deploy a commit to the kingsman-99's projects Team on Vercel.

A member of the Team first needs to authorize it.

@drips-wave

drips-wave Bot commented Jul 26, 2026

Copy link
Copy Markdown

@naninu123 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

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.

Smart Contract Event Log Explorer

1 participant