Skip to content

Enforce minimum task bounty#730

Open
kitWarse wants to merge 1 commit into
SoroLabs:mainfrom
kitWarse:feat/696-min-bounty-enforcement
Open

Enforce minimum task bounty#730
kitWarse wants to merge 1 commit into
SoroLabs:mainfrom
kitWarse:feat/696-min-bounty-enforcement

Conversation

@kitWarse

Copy link
Copy Markdown

Summary

  • Adds a global, admin-configurable minimum bounty for new task registrations.
  • Enforces the minimum against TaskConfig.gas_balance before a task ID is allocated, so rejected low-bounty registrations do not consume IDs.
  • Keeps backwards compatibility by defaulting the minimum bounty to 0 until an admin configures it.

Issue

Changes

  • Added MinBounty contract storage and public get_min_bounty / set_min_bounty contract methods.
  • Added admin authorization for minimum bounty updates using the configured AdminAddress / proxy admin path.
  • Added BountyBelowMinimum and InvalidBounty contract errors.
  • Updated register to revert when gas_balance is below the configured minimum bounty.
  • Added access-control and registration tests for authorized updates, unauthorized updates, below-minimum rejection, and at-minimum acceptance.

Validation

  • Passed: git diff --check
  • Not run: cargo fmt / contract tests because cargo is not installed or available in PATH in this local environment.

Notes

  • The minimum bounty defaults to 0, so existing deployments preserve current registration behavior until an admin sets a higher threshold.

@drips-wave

drips-wave Bot commented Jun 29, 2026

Copy link
Copy Markdown

@kitWarse 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! 🚀

Learn more about application limits

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Contract: Implement minimum bounty validation

1 participant