Repository navigation
Extract the repeated fees check into a shared helper #295
Copy link
Copy link
Labels
GRANTFOX OSSGrantFox open-source campaign taskGrantFox open-source campaign taskMAYBE REWARDEDMay be rewarded under the GrantFox campaignMay be rewarded under the GrantFox campaignOFFICIAL CAMPAIGNOfficial GrantFox campaign issueOfficial GrantFox campaign issueOfficial Campaign | FWC26GrantFox FWC26 official campaignGrantFox FWC26 official campaignarea:feesfeesfeespriority:mediumMedium priorityMedium prioritystack:rustRustRuststack:sorobanSoroban smart contractSoroban smart contracttype:refactorRefactor without behavior changeRefactor without behavior change
Description
Deduplicate fees checks
Description
Multiple entrypoints repeat the same fees precondition inline. This issue extracts a shared helper.
Requirements and context
- Repository scope: Agentpay-Org/Agentpay-contracts only.
- Extract the repeated fees check into a private helper and route entrypoints through it.
- Behaviour unchanged; same rejections and typed codes.
- No ABI change.
Suggested execution
- Fork the repo and create a branch
git checkout -b refactor/fees-01-helper- 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, andcargo test. - Cover edge cases: each existing rejection still fires identically.
- Include the full test output in the PR description.
Example commit message
refactor(fees): extract shared check helper
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.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
GRANTFOX OSSGrantFox open-source campaign taskGrantFox open-source campaign taskMAYBE REWARDEDMay be rewarded under the GrantFox campaignMay be rewarded under the GrantFox campaignOFFICIAL CAMPAIGNOfficial GrantFox campaign issueOfficial GrantFox campaign issueOfficial Campaign | FWC26GrantFox FWC26 official campaignGrantFox FWC26 official campaignarea:feesfeesfeespriority:mediumMedium priorityMedium prioritystack:rustRustRuststack:sorobanSoroban smart contractSoroban smart contracttype:refactorRefactor without behavior changeRefactor without behavior change
Activity
Jagadeeshftw commentedon Jul 28, 2026
Hi, I’d love to take on this issue! With my expertise in Rust, Stellar, and smart contract development, I can implement a clean and efficient solution.
🚀 Why Me?
⏱ Timeline
I estimate completing this within 24 hours. Let me know if I can proceed!
grantfox-oss commentedon Jul 28, 2026
🦊 GrantFox — @Jagadeeshftw has been assigned to this issue as part of the Official Campaign | FWC26 campaign!
Next steps:
Closes #295)Good luck! Track your progress on GrantFox.
mikewheeleer commentedon Jul 28, 2026
🎉 You're assigned, @Jagadeeshftw! Part of the Stellar Wave Program — join our Telegram to coordinate: https://t.me/+OhR36aTevMYwYzI9 🚀
grantfox-oss commentedon Jul 29, 2026
🎉 This issue has been marked as completed on GrantFox as part of the Official Campaign | FWC26 campaign!
@Jagadeeshftw's PR #434 was approved and merged by @mikewheeleer.
🏆 @Jagadeeshftw: You earned 45 FoxPoints for this contribution! Your current tier: Specialist (3,806 total points). Track your full progress on GrantFox.
👏 Great work, @Jagadeeshftw! Keep contributing to Agentpay-Org.