Expose events through a read view
Description
There is no O(1) read view for the events 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 events state without mutating storage.
- Return a sensible default (not a panic) when events is unset.
- Reuse stored values rather than recomputing where possible.
Suggested execution
- Fork the repo and create a branch
git checkout -b feature/events-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(events): 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.
Expose events through a read view
Description
There is no O(1) read view for the events state, forcing callers to reconstruct it. This issue adds a bounded, read-only view.
Requirements and context
Suggested execution
git checkout -b feature/events-01-viewTest and commit
cargo fmt,cargo clippy --all-targets -- -D warnings, andcargo test.Example commit message
feat(events): add read viewGuidelines
Community & contribution rewards