Skip to content

Add a protocol status function exposing the global trading paused state as a readable contract entry #792

Description

@Chucks1093

Summary

The server needs to read the global trading paused state from the contract to expose it via the GET /protocol/status endpoint. A get_protocol_status view function that returns globalTradingPaused, protocolFeeBps, treasuryAddress, and lockupDurationSeconds should be added.

Scope

  • Add get_protocol_status() as a read-only view function requiring no authentication
  • Return global_trading_paused, protocol_fee_bps, treasury_address, lockup_duration_seconds, and min_investment_amount from persistent config storage
  • Bump the TTL of all read config entries during the call
  • Return sensible defaults for any config entry that has not yet been set
  • This function must not panic under any circumstances

Acceptance Criteria

  • global_trading_paused returned correctly when set and defaults to false when not set
  • protocol_fee_bps and treasury_address returned correctly
  • lockup_duration_seconds and min_investment_amount returned correctly
  • TTL bumped on all read entries
  • Function never panics regardless of storage state

ETA: 24 hours


Coordinate on Telegram

Activity

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

Metadata

Metadata

Assignees

Labels

Stellar WaveIssues in the Stellar wave program

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions