Skip to content

added pause status integration#211

Open
Harbduls wants to merge 2 commits into
Core-Foundry:mainfrom
Harbduls:feat/contracts-pause
Open

added pause status integration#211
Harbduls wants to merge 2 commits into
Core-Foundry:mainfrom
Harbduls:feat/contracts-pause

Conversation

@Harbduls

Copy link
Copy Markdown
Contributor

Closes #133

Summary of Changes

1. Backend Changes (Listener)

  • Added a new endpoint /api/status :

    • Queries each configured smart contract for its pause status using get_paused_status()
    • Uses simulation to call the contract, no actual transaction needed
    • Returns timestamp and contracts array with address , paused , and optional error
  • Updated config system :

    • Added stellarNetworkPassphrase to Config type
    • Added a default value and env var support for STELLAR_NETWORK_PASSPHRASE
  • Updated events server :

    • Added stellarNetworkPassphrase and contractAddresses to EventsServerOptions
    • Implemented getContractPauseStatus and buildStatusResponse functions
  • Updated tests :

    • Updated events-server.test.ts to mock all the new Stellar SDK functions
    • Added the new required fields to all createEventsServer test calls

2. Frontend Changes (Dashboard)

  • New status API types and function in eventsApi.ts :

    • ContractStatus and StatusResponse interfaces
    • fetchStatus to get contract statuses
  • New UI section :

    • Added a "Contract Status" section at the top of EventExplorerPage
    • Shows each configured contract with its active/paused status
    • Uses styling consistent with the existing theme
  • Updated Event Explorer components :

    • EventExplorerPage : fetches contract status and passes to table
    • EventExplorerTable : receives contract status and passes to each card
    • EventExplorerCard : shows a "Paused" badge if the event's contract is currently paused

3. Documentation

  • Updated API.md : added complete documentation for /api/status
  • Updated listener's .env.example : added the new env variable
  • Added CSS styles for contract status UI

@drips-wave

drips-wave Bot commented Jun 24, 2026

Copy link
Copy Markdown

@Harbduls 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.

[Contracts] Add Contract Pause Status Dashboard Integration

1 participant