-
Notifications
You must be signed in to change notification settings - Fork 46
Open
Labels
onlydust-waveContribute to awesome OSS repos during OnlyDust's open source weekContribute to awesome OSS repos during OnlyDust's open source week
Description
Description
Implement the logic to execute a passed proposal. This function will iterate through the proposal's defined actions and execute them, such as calling the Treasury contract to transfer funds.
Acceptance Criteria:
- The execute_proposal function is implemented.
- The function includes the following checks (reverting if any fail):
- The proposal's state must be Succeeded (i.e., voting has ended, quorum was met, and the passing threshold was reached).
- The proposal must not have been executed already (check is_executed flag).
- The function sets the is_executed flag to true to prevent re-entrancy and double execution.
- The function iterates through the actions array stored in the Proposal struct.
- For each action, it makes an external contract call using call_contract_syscall with the specified target address, function selector, and calldata.
- A ProposalExecuted event is emitted with the proposal_id.
Metadata
Metadata
Assignees
Labels
onlydust-waveContribute to awesome OSS repos during OnlyDust's open source weekContribute to awesome OSS repos during OnlyDust's open source week