-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathIProposalExecutionEngine.sol
38 lines (33 loc) · 1.56 KB
/
IProposalExecutionEngine.sol
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
// SPDX-License-Identifier: Beta Software
pragma solidity ^0.8;
import "../tokens/IERC721.sol";
// Upgradeable proposals logic contract interface.
interface IProposalExecutionEngine {
struct ExecuteProposalParams {
uint256 proposalId;
bytes proposalData;
bytes progressData;
bytes extraData;
uint256 flags;
IERC721[] preciousTokens;
uint256[] preciousTokenIds;
}
function initialize(address oldImpl, bytes memory initData) external;
/// @notice Execute a proposal.
/// @dev Must be delegatecalled into by PartyGovernance.
/// If the proposal is incomplete, continues its next step (if possible).
/// If another proposal is incomplete, this will fail. Only one
/// incomplete proposal is allowed at a time.
/// @param params The data needed to execute the proposal.
/// @return nextProgressData Bytes to be passed into the next `execute()` call,
/// if the proposal execution is incomplete. Otherwise, empty bytes
/// to indicate the proposal is complete.
function executeProposal(ExecuteProposalParams memory params)
external returns (bytes memory nextProgressData);
/// @notice Forcibly cancel an incomplete proposal.
/// @param proposalId The ID of the proposal to cancel.
/// @dev This is intended to be a last resort as it can leave a party in a
/// broken step. Whenever possible, proposals should be allowed to
/// complete their entire lifecycle.
function cancelProposal(uint256 proposalId) external;
}