2023-05-26 15:01:45 +03:00
|
|
|
pragma solidity ^0.6.12;
|
2023-05-27 14:27:19 +03:00
|
|
|
pragma experimental ABIEncoderV2;
|
|
|
|
|
|
|
|
struct Proposal {
|
|
|
|
// Creator of the proposal
|
|
|
|
address proposer;
|
|
|
|
// target addresses for the call to be made
|
|
|
|
address target;
|
|
|
|
// The block at which voting begins
|
|
|
|
uint256 startTime;
|
|
|
|
// The block at which voting ends: votes must be cast prior to this block
|
|
|
|
uint256 endTime;
|
|
|
|
// Current number of votes in favor of this proposal
|
|
|
|
uint256 forVotes;
|
|
|
|
// Current number of votes in opposition to this proposal
|
|
|
|
uint256 againstVotes;
|
|
|
|
// Flag marking whether the proposal has been executed
|
|
|
|
bool executed;
|
|
|
|
// Flag marking whether the proposal voting time has been extended
|
|
|
|
// Voting time can be extended once, if the proposal outcome has changed during CLOSING_PERIOD
|
|
|
|
bool extended;
|
|
|
|
}
|
2023-05-26 15:01:45 +03:00
|
|
|
|
|
|
|
interface IGovernance {
|
2023-05-27 14:27:19 +03:00
|
|
|
function proposals(uint256 index) external view returns (Proposal memory);
|
|
|
|
|
2023-06-01 22:38:49 +03:00
|
|
|
function proposalCount() external view returns (uint256);
|
|
|
|
|
2023-05-26 15:01:45 +03:00
|
|
|
function lockedBalance(address account) external view returns (uint256);
|
|
|
|
|
|
|
|
function propose(address target, string memory description) external returns (uint256);
|
|
|
|
|
|
|
|
function castVote(uint256 proposalId, bool support) external;
|
|
|
|
|
|
|
|
function lock(address owner, uint256 amount, uint256 deadline, uint8 v, bytes32 r, bytes32 s) external;
|
|
|
|
|
|
|
|
function lockWithApproval(uint256 amount) external;
|
|
|
|
|
|
|
|
function unlock(uint256 amount) external;
|
|
|
|
|
|
|
|
function execute(uint256 proposalId) external payable;
|
|
|
|
}
|