Skip to content

refactor(multisig): harden auth and precondition guards in multisig_approve (#354) - #421

Open
Awosdot wants to merge 1 commit into
Goldii-locks:mainfrom
Awosdot:feature/issue-354-harden-multisig-approve-guards
Open

refactor(multisig): harden auth and precondition guards in multisig_approve (#354)#421
Awosdot wants to merge 1 commit into
Goldii-locks:mainfrom
Awosdot:feature/issue-354-harden-multisig-approve-guards

Conversation

@Awosdot

@Awosdot Awosdot commented Aug 28, 2026

Copy link
Copy Markdown

Summary of Changes

  • Guard Clause Ordering: Refactored multisig_approve to place caller authorization (signer.require_auth()) and proposal precondition checks at the top of the function prior to loading or mutating proposal storage and approval bitmaps.
  • State Integrity & Gas Optimization: Guaranteed immediate early returns with typed errors (Error::Unauthorized, Error::InvalidProposalState, etc.) on invalid calls while ensuring 0 ledger mutations occur.
  • Unit Testing: Added unit tests verifying typed error responses for unauthorized callers and invalid proposal states, as well as confirming state non-mutation.

Closes #354

…_approve (closes Goldii-locks#354)

Reorder multisig_approve so the signer-membership check runs before any
job/token ledger reads (job meta load, cross-contract balance call),
matching the guard ordering used elsewhere in the hardening series.
Add dedicated tests asserting unauthorized and empty-balance rejections
leave the proposal's approval bitmap unmutated.
@drips-wave

drips-wave Bot commented Aug 28, 2026

Copy link
Copy Markdown

@Awosdot 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.

Harden caller authorization and precondition guards in multisig_approve

1 participant