-
Notifications
You must be signed in to change notification settings - Fork 13
/
IFunding.sol
96 lines (81 loc) · 2.21 KB
/
IFunding.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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
// SPDX-License-Identifier: MIT
//slither-disable-next-line solc-version
pragma solidity 0.8.16;
/**
* @title Ajna Grant Coordination Fund Extraordinary Proposal flow.
*/
interface IFunding {
/*********************/
/*** Custom Errors ***/
/*********************/
/**
* @notice Voter has already voted on a proposal in the screening stage in a quarter.
*/
error AlreadyVoted();
/**
* @notice User submitted a proposal with invalid paramteres.
* @dev A proposal is invalid if it has a mismatch in the number of targets, values, or calldatas.
* @dev It is also invalid if it's calldata selector doesn't equal transfer().
*/
error InvalidProposal();
/**
* @notice User attempted to submit a duplicate proposal.
*/
error ProposalAlreadyExists();
/**
* @notice Provided proposalId isn't present in either funding mechanisms storage mappings.
*/
error ProposalNotFound();
/**
* @notice Proposal didn't meet requirements for execcution.
*/
error ProposalNotSuccessful();
/*********************/
/*** Custom Events ***/
/*********************/
/**
* @dev Emitted when a proposal is executed.
*/
event ProposalExecuted(uint256 proposalId);
/**
* @dev Emitted when a proposal is created.
*/
event ProposalCreated(
uint256 proposalId,
address proposer,
address[] targets,
uint256[] values,
string[] signatures,
bytes[] calldatas,
uint256 startBlock,
uint256 endBlock,
string description
);
/**
* @dev Emitted when votes are cast on a proposal.
*/
event VoteCast(address indexed voter, uint256 proposalId, uint8 support, uint256 weight, string reason);
/***************/
/*** Structs ***/
/***************/
/**
* @notice Enum listing available proposal types.
*/
enum FundingMechanism {
Standard,
Extraordinary
}
/**
* @dev Enum listing a proposal's lifecycle.
*/
enum ProposalState {
Pending,
Active,
Canceled,
Defeated,
Succeeded,
Queued,
Expired,
Executed
}
}