Skip to content

feat: add get_protocol_params view function - #158

Open
favvy994 wants to merge 1 commit into
stellar-vortex-protocol:mainfrom
favvy994:feature/53-get-protocol-params-view
Open

feat: add get_protocol_params view function#158
favvy994 wants to merge 1 commit into
stellar-vortex-protocol:mainfrom
favvy994:feature/53-get-protocol-params-view

Conversation

@favvy994

Copy link
Copy Markdown

Summary

Adds a get_protocol_params() read-only view that returns all four effective protocol values as a named ProtocolParams struct. Integrators no longer need to read source code to know the current constants.

Ships independently of any configurability work — simply returns the existing compile-time constants.

Changes

  • New ProtocolParams contracttype struct: {min_bond, fill_window, intent_expiry, protocol_fee_bps}
  • New get_protocol_params() view function

Validation

  • 56 tests pass (cargo test), including one new test asserting returned values match constants
  • cargo fmt and cargo clippy -- -D warnings clean

Closes #53

Closes stellar-vortex-protocol#53

Adds get_protocol_params() — a read-only view that returns all four
effective protocol values (MIN_BOND, FILL_WINDOW, INTENT_EXPIRY,
PROTOCOL_FEE_BPS) as a named ProtocolParams struct.

Integrators can call this instead of reading source constants, and the
struct type ensures field names are always visible at the call site.

Adds ProtocolParams{min_bond, fill_window, intent_expiry, protocol_fee_bps}
contracttype struct and a test asserting the returned values match
the current constants.
@drips-wave

drips-wave Bot commented Jul 26, 2026

Copy link
Copy Markdown

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

Add a view function exposing current protocol parameters

1 participant