Repository navigation
feat: add pool configuration limits and default settings - #748
Merged
ritaifeoluwa merged 2 commits intoNov 23, 2026
Merged
Conversation
- Add MAX_REWARD_RATE constant and validation in factory - Add set_default_config and get_default_config functions in factory - Add set_default_multiplier and get_default_multiplier functions in farming-pool - Add InvalidConfig error type to FactoryError - Add DefaultPoolConfig storage type - Add DefaultMultiplier storage key Closes SmartDropLabs#682, Closes SmartDropLabs#683, Closes SmartDropLabs#685, Closes SmartDropLabs#686
👷 Deploy request for sdcontracts pending review.Visit the deploys page to approve it
|
|
@balisdev 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! 🚀 |
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.
Description
This PR addresses issues #682, #683, #685, and #686 by implementing pool configuration limits validation and default settings functionality.
Changes
Issue #683 - Factory: Pool Configuration Limits
MAX_REWARD_RATEconstant (10,000) to prevent invalid configurationscreate_pool_innerto check if reward_rate exceeds the limitInvalidConfigerror type toFactoryErrorenumIssue #686 - Factory: Default Pool Configuration
DefaultPoolConfigstorage type with fields for default configurationDefaultPoolConfigstorage keyset_default_configfunction (admin-only) to store default configurationget_default_configfunction to retrieve stored default configurationcreate_poolrequirementsIssue #682 - Farming Pool: Multiplier Limits Query
get_multiplier_limitsfunction already exists and returns(1u32, MAX_GLOBAL_MULTIPLIER)Issue #685 - Farming Pool: Default Multiplier
DefaultMultiplierstorage keyset_default_multiplierfunction (admin-only) to store default multiplierget_default_multiplierfunction to retrieve stored default multiplierTesting
wasm32v1-nonetargetImpact
Closes #682, Closes #683, Closes #685, Closes #686