Skip to content

feat(contract): add multi-sig guardian validation for payout#871

Open
DavidAkere204 wants to merge 1 commit into
Fracverse:masterfrom
DavidAkere204:feat/multi-sig-guardian-validation
Open

feat(contract): add multi-sig guardian validation for payout#871
DavidAkere204 wants to merge 1 commit into
Fracverse:masterfrom
DavidAkere204:feat/multi-sig-guardian-validation

Conversation

@DavidAkere204

Copy link
Copy Markdown
  • Add guardians list and guardian_threshold fields to Plan struct
  • Add GuardianApprovals(Address) variant to DataKey for per-plan storage
  • Add approve_payout() function: validates caller is a listed guardian, prevents duplicate approvals, persists approvals, emits guardian/approved event
  • Update trigger_payout() to reject with GuardianThresholdNotMet when approvals count < guardian_threshold (skipped when threshold is 0)
  • Add NotAGuardian, AlreadyApproved, GuardianThresholdNotMet errors
  • Update create_plan() to accept guardians and guardian_threshold params
  • Add 4 new tests: 2-of-3 approval flow, duplicate rejection, non-guardian rejection, and zero-guardian passthrough

Closes #840

- Add guardians list and guardian_threshold fields to Plan struct
- Add GuardianApprovals(Address) variant to DataKey for per-plan storage
- Add approve_payout() function: validates caller is a listed guardian,
  prevents duplicate approvals, persists approvals, emits guardian/approved event
- Update trigger_payout() to reject with GuardianThresholdNotMet when
  approvals count < guardian_threshold (skipped when threshold is 0)
- Add NotAGuardian, AlreadyApproved, GuardianThresholdNotMet errors
- Update create_plan() to accept guardians and guardian_threshold params
- Add 4 new tests: 2-of-3 approval flow, duplicate rejection, non-guardian
  rejection, and zero-guardian passthrough

Closes Fracverse#840
@drips-wave

drips-wave Bot commented Jun 27, 2026

Copy link
Copy Markdown

@DavidAkere204 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

@ONEONUORA

Copy link
Copy Markdown
Contributor

@DavidAkere204
Run cargo fmt --all -- --check

and clippy

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.

[Contracts] Implement Multi-Signature Guardian Approval Thresholds

2 participants