Skip to content

feat(ContractEventFeed): Export JSON button, hover copy on topic tags, fromLedger prop for historical queries #368

Description

@k-deejah

Problem

1. ContractEventFeed does not support exporting events to JSON — developers analysing contract behaviour often need to export event data for offline analysis. A "Export JSON" button should download all currently loaded events as a .json file.

2. ContractEventFeed topic tags have no copy button — each topic tag in EventRow is a small pill. Developers who need to copy topic values to use in queries have to manually select text from the tiny pills. A hover-reveal copy button on each topic tag would improve the developer experience.

3. ContractEventFeed does not support setting a custom start ledger for fetching events — the feed always fetches from the most recent events. Adding a fromLedger?: number prop (passed through to getEvents) would allow developers to inspect historical events.

Solution

  1. Add an "Export JSON" button to the card header that calls URL.createObjectURL(new Blob([JSON.stringify(events, null, 2)])) and triggers a download.
  2. Add a hover-reveal copy button on each topic tag in EventRow.
  3. Add fromLedger?: number prop to ContractEventFeed passed to getEvents in the load function.

Acceptance Criteria

  • "Export JSON" button downloads events as a .json file
  • Topic tags have a hover copy button
  • fromLedger prop filters events from that ledger forward
  • npm run build passes

Note for Contributors: Write a clear PR description. Include a screenshot of the topic tag copy button and confirm the exported JSON is valid.

Metadata

Metadata

Assignees

Labels

Stellar WaveIssues in the Stellar wave programenhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions