Skip to content

feat: Soroban event parser with decoded arguments and topic filtering #150

Description

@dotunv

Overview

Add a Soroban event parser that decodes emitted contract events into human-readable, typed output, including argument decoding and topic filtering.

Motivation

The Transaction Inspector decodes Soroban contract operations but does not decode the events emitted during execution. Events carry crucial state-change signals (e.g., a mint or a transfer). Developers need to decode these events to understand what a contract actually did, rather than reading raw XDR.

Proposed Design

  1. Add a decoder that parses Soroban event topics and data into typed values (Bool, I32, U64, I128, U128, Bytes, String, ContractId, Vec, Map, Address)
  2. Extract events from a transaction's result and render them with a readable contract/event signature
  3. Surface events in the Transaction Inspector result view, grouped by contract
  4. Add topic-based filtering (e.g., filter by contract ID or event name)
  5. Support resolving well-known event topics to friendly names via a small mapping
  6. Handle unknown/unresolvable topics gracefully by showing raw hex
  7. Provide a GET /api/inspector/:txHash/events endpoint returning decoded events as JSON

Acceptance Criteria

  • Soroban events are decoded from transaction results
  • Common scalar and container types are decoded correctly (incl. nested Vec/Map)
  • Events are rendered grouped by emitting contract
  • Users can filter events by contract ID or event name
  • Well-known topics map to friendly names; unknown topics fall back to raw hex
  • GET /api/inspector/:txHash/events returns decoded JSON events
  • Malformed event data does not crash the inspector (graceful fallback to raw)
  • Tests cover: scalar decode, container decode, unknown topic fallback, filter, API response

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Stellar WaveIssues in the Stellar wave programbackendBackend / API workblockchainStellar / blockchain workenhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions