forked from compound-finance/comet
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7521336
commit d196a86
Showing
9 changed files
with
170 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
// SPDX-License-Identifier: BUSL-1.1 | ||
pragma solidity 0.8.15; | ||
|
||
/** | ||
* @dev Interface for interacting with Governor bravo. | ||
* Note Not a comprehensive interface | ||
*/ | ||
interface IGovernorTestnet { | ||
enum ProposalState { | ||
Pending, | ||
Active, | ||
Canceled, | ||
Defeated, | ||
Succeeded, | ||
Queued, | ||
Expired, | ||
Executed | ||
} | ||
|
||
struct Proposal { | ||
uint id; | ||
address proposer; | ||
uint eta; | ||
uint startBlock; | ||
uint endBlock; | ||
uint forVotes; | ||
uint againstVotes; | ||
uint abstainVotes; | ||
bool canceled; | ||
bool executed; | ||
} | ||
|
||
event ProposalCreated( | ||
uint256 proposalId, | ||
address proposer, | ||
address[] targets, | ||
uint256[] values, | ||
string[] signatures, | ||
bytes[] calldatas, | ||
uint256 startBlock, | ||
uint256 endBlock, | ||
string description | ||
); | ||
Check warning Code scanning / Semgrep OSS Semgrep Finding: compound.solidity.lack-of-indexed-parameter Warning
Event parameters with type 'address' should be indexed
|
||
event ProposalCanceled(uint256 proposalId); | ||
event ProposalQueued(uint256 proposalId, uint256 eta); | ||
event ProposalExecuted(uint256 proposalId); | ||
|
||
function MIN_VOTING_PERIOD() external view returns (uint256); | ||
function MIN_VOTING_DELAY() external view returns (uint256); | ||
function MIN_PROPOSAL_THRESHOLD() external view returns (uint256); | ||
|
||
function comp() external view returns (address); // for testnet only | ||
function proposalEta(uint256) external view returns (uint256); | ||
function proposalCount() external view returns (uint256); | ||
function proposals(uint256 proposalId) external view returns (Proposal memory); | ||
function votingDelay() external view returns (uint256); | ||
function votingPeriod() external view returns (uint256); | ||
function state(uint256 proposalId) external view returns (ProposalState); | ||
function propose( | ||
address[] memory targets, | ||
uint256[] memory values, | ||
string[] memory signatures, | ||
bytes[] memory calldatas, | ||
string memory description | ||
) external returns (uint256 proposalId); // for testnet only | ||
function queue(uint256 proposalId) external; | ||
function execute(uint256 proposalId) external; | ||
function castVote(uint256 proposalId, uint8 support) external returns (uint256 balance); | ||
function getActions(uint proposalId) external view returns ( | ||
address[] memory targets, | ||
uint[] memory values, | ||
string[] memory signatures, | ||
bytes[] memory calldatas | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters