Expose staking
Description
Callers can't read staking state. This issue adds a read-only view.
Requirements and context
- Repository scope: Agentpay-Org/Agentpay-contracts only.
- Add a read-only view returning the current staking state without mutating storage.
- Return a sane default before init.
- Cover values and pre-init default in tests.
Suggested execution
- Fork the repo and create a branch
git checkout -b feature/staking-91-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: values after set, default before init.
- Include the full test output in the PR description.
Example commit message
feat(staking): add read-only 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 staking
Description
Callers can't read staking state. This issue adds a read-only view.
Requirements and context
Suggested execution
git checkout -b feature/staking-91-viewTest and commit
cargo fmt,cargo clippy --all-targets -- -D warnings, andcargo test.Example commit message
feat(staking): add read-only viewGuidelines
Community & contribution rewards