Skip to content

Add a read-only view exposing the current settlement state #298

Description

@mikewheeleer

Expose settlement through a read view

Description

There is no O(1) read view for the settlement state, forcing callers to reconstruct it. This issue adds a bounded, read-only view.

Requirements and context

  • Repository scope: Agentpay-Org/Agentpay-contracts only.
  • Add a read-only entrypoint returning the settlement state without mutating storage.
  • Return a sensible default (not a panic) when settlement is unset.
  • Reuse stored values rather than recomputing where possible.

Suggested execution

  • Fork the repo and create a branch
  • git checkout -b feature/settlement-01-view
  • Implement changes
    • Write code in: the relevant module.
    • Write comprehensive tests in: cover the new behaviour and edge cases.
  • Test and commit

Test and commit

  • Run cargo fmt, cargo clippy --all-targets -- -D warnings, and cargo test.
  • Cover edge cases: unset state, boundary values.
  • Include the full test output in the PR description.

Example commit message

feat(settlement): add read view

Guidelines

  • Minimum 95 percent test coverage for impacted modules.
  • Clear, reviewer-focused documentation.
  • Timeframe: 96 hours.

Community & contribution rewards

  • 💬 Join the AgentPay community on Discord: https://discord.gg/eXvRKkgcv
  • ⭐ This is a GrantFox OSS / Official Campaign task and may be rewarded. When your PR is merged you'll be prompted to rate the project — a 5-star rating is much appreciated.

Activity

  1. thlpkee20-wq commented on Jul 28, 2026

    @thlpkee20-wq
    Contributor

    Please consider assigning this issue to me, as I’m prepared to contribute wherever it’s needed, whether that involves protocol logic, interface creation, service-layer development, visual implementation, or cross-component coordination.

  2. mikewheeleer commented on Jul 28, 2026

    @mikewheeleer
    ContributorAuthor

    🎉 Assigned to you, @thlpkee20-wq! Thanks for applying — this is part of the Stellar Wave Program. Join our Telegram group to coordinate and get support: https://t.me/+OhR36aTevMYwYzI9

    Happy building! 🚀

  3. grantfox-oss commented on Jul 28, 2026

    @grantfox-oss

    🎉 This issue has been marked as completed on GrantFox as part of the Official Campaign | FWC26 campaign!

    @thlpkee20-wq's PR #322 was approved and merged by @mikewheeleer.

    🏆 @thlpkee20-wq: You earned 35 FoxPoints for this contribution! Your current tier: Explorer (363 total points). Track your full progress on GrantFox.

    👏 Great work, @thlpkee20-wq! Keep contributing to Agentpay-Org.

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

Metadata

Metadata

Assignees

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions