Add maintenance-pool config getters and configurable MAX_SPONSORS - #208
Merged
chonilius merged 2 commits intoAug 28, 2026
Merged
Conversation
- maintenance-pool: add get_admin/get_treasury/get_fee_bps view functions, mirroring escrow's implementation (MergeFi#93). - escrow/milestones: accept max_sponsors as an optional initialize parameter, stored in instance storage alongside Admin/Treasury/FeeBps and defaulting to the existing MAX_SPONSORS constant (20) when omitted, so the sponsor cap is a per-deployment configuration choice instead of requiring a contract redeploy to change (MergeFi#96). Add get_max_sponsors to both contracts for symmetry with the other stored config getters. Closes MergeFi#93, closes MergeFi#96 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|
@Godbrand0 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! 🚀 |
|
@Godbrand0 is attempting to deploy a commit to the chonilius' projects Team on Vercel. A member of the Team first needs to authorize it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
maintenance-poolhad no way to read back the configuredadmin,treasury, orfee_bpson-chain. Addsget_admin/get_treasury/get_fee_bps, mirroringescrow's existing implementation.MAX_SPONSORSwas a compile-time constant in bothescrowandmilestones, forcing a full redeploy to tune the sponsor cap per deployment.initializenow accepts an optionalmax_sponsors: Option<u32>parameter, stored in instance storage alongsideAdmin/Treasury/FeeBps, defaulting to the existingMAX_SPONSORSconstant (20) when omitted. Also addsget_max_sponsorsto both contracts for symmetry with the other stored-config getters.Test plan
cargo test --workspace— all existing tests pass with call sites updated for the newinitializeparameterget_admin/get_treasury/get_fee_bpsonmaintenance-pool(both happy path and pre-initializeNotInitializedpath)get_max_sponsorsdefaults to the constant whenmax_sponsorsis omitted, and a custommax_sponsorsis honored and enforced inescrow/milestonesCloses #93
Closes #96
🤖 Generated with Claude Code