Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ pragma solidity ^0.8.0;
// Interfaces
import {IOptimismGovernor} from './IOptimismGovernor.sol';
import { ISemver } from "interfaces/universal/ISemver.sol";
import { IProposalTypesConfigurator } from './IProposalTypesConfigurator.sol';

/// @title IProposalValidator
/// @notice Interface for the ProposalValidator contract.
Expand All @@ -22,6 +21,7 @@ interface IProposalValidator is ISemver {
error ProposalValidator_ExceedsDistributionThreshold();
error ProposalValidator_InvalidOptionsLength();
error ProposalValidator_AttestationRevoked();
error ProposalValidator_AttestationExpired();
error ProposalValidator_InvalidAttestationSchema();
error ProposalValidator_InvalidCriteriaValue();
error ProposalValidator_InvalidAgainstThreshold();
Expand All @@ -30,21 +30,24 @@ interface IProposalValidator is ISemver {
error ProposalValidator_ProposalIdMismatch();
error ProposalValidator_InvalidProposer();
error ProposalValidator_InvalidProposal();
error ProposalValidator_InvalidVotingModule();
error ProposalValidator_InvalidTotalBudget();
error ProposalValidator_AttestationCreatedAfterLastVotingCycle();

event ProposalSubmitted(
bytes32 indexed proposalHash,
uint256 indexed proposalId,
address indexed proposer,
string description,
ProposalType proposalType
);

event ProposalApproved(
bytes32 indexed proposalHash,
uint256 indexed proposalId,
address indexed approver
);

event ProposalMovedToVote(
bytes32 indexed proposalHash,
uint256 indexed proposalId,
address indexed executor
);

Expand All @@ -60,11 +63,11 @@ interface IProposalValidator is ISemver {
event ProposalTypeDataSet(
ProposalType proposalType,
uint256 requiredApprovals,
uint8 proposalVotingModule
uint8 idInConfigurator
);

event ProposalVotingModuleData(
bytes32 indexed proposalHash,
uint256 indexed proposalId,
bytes encodedVotingModuleData
);

Expand All @@ -83,7 +86,7 @@ interface IProposalValidator is ISemver {

struct ProposalTypeData {
uint256 requiredApprovals;
uint8 proposalVotingModule;
uint8 idInConfigurator;
}

struct VotingCycleData {
Expand All @@ -106,16 +109,16 @@ interface IProposalValidator is ISemver {
string memory _proposalDescription,
bytes32 _attestationUid,
ProposalType _proposalType,
uint256 _votingCycle
) external returns (bytes32 proposalHash_);
uint256 _latestVotingCycle
) external returns (uint256 proposalId_);

function submitCouncilMemberElectionsProposal(
uint128 _criteriaValue,
string[] memory _optionDescriptions,
string memory _proposalDescription,
bytes32 _attestationUid,
uint256 _votingCycle
) external returns (bytes32 proposalHash_);
) external returns (uint256 proposalId_);

function submitFundingProposal(
uint128 _criteriaValue,
Expand All @@ -125,22 +128,20 @@ interface IProposalValidator is ISemver {
string memory _description,
ProposalType _proposalType,
uint256 _votingCycle
) external returns (bytes32 proposalHash_);

function approveProposal(bytes32 _proposalHash, bytes32 _attestationUid) external;
) external returns (uint256 proposalId_);

function canApproveProposal(bytes32 _attestationUid, address _delegate) external view returns (bool canApprove_);
function approveProposal(uint256 _proposalId, bytes32 _attestationUid) external;

function moveToVoteProtocolOrGovernorUpgradeProposal(
uint248 _againstThreshold,
string memory _proposalDescription
) external returns (bytes32 proposalHash_);
) external returns (uint256 proposalId_);

function moveToVoteCouncilMemberElectionsProposal(
uint128 _criteriaValue,
string[] memory _optionsDescriptions,
string memory _proposalDescription
) external returns (bytes32 proposalHash_);
) external returns (uint256 proposalId_);

function moveToVoteFundingProposal(
uint128 _criteriaValue,
Expand All @@ -149,7 +150,7 @@ interface IProposalValidator is ISemver {
uint256[] memory _optionsAmounts,
string memory _description,
ProposalType _proposalType
) external returns (bytes32 proposalHash_);
) external returns (uint256 proposalId_);

function setVotingCycleData(
uint256 _cycleNumber,
Expand All @@ -167,7 +168,6 @@ interface IProposalValidator is ISemver {

function initialize(
address _owner,
IProposalTypesConfigurator _proposalTypesConfigurator,
uint256 _cycleNumber,
uint256 _startingTimestamp,
uint256 _duration,
Expand Down Expand Up @@ -195,9 +195,7 @@ interface IProposalValidator is ISemver {

function OPTIMISTIC_MODULE_PERCENT_DIVISOR() external view returns (uint256);

function proposalTypesConfigurator() external view returns (IProposalTypesConfigurator);

function proposalTypesData(ProposalType) external view returns (uint256 requiredApprovals, uint8 proposalVotingModule);
function proposalTypesData(ProposalType) external view returns (uint256 requiredApprovals, uint8 idInConfigurator);

function votingCycles(uint256) external view returns (
uint256 startingTimestamp,
Expand All @@ -207,8 +205,8 @@ interface IProposalValidator is ISemver {
);

function __constructor__(
IOptimismGovernor _governor,
bytes32 _approvedProposerAttestationSchemaUid,
bytes32 _topDelegatesAttestationSchemaUid,
IOptimismGovernor _governor
bytes32 _topDelegatesAttestationSchemaUid
) external;
}
Loading