Created
September 12, 2018 21:37
-
-
Save cwhinfrey/0dc3e4750919bbbbb8f6cd8b7ea4dcc4 to your computer and use it in GitHub Desktop.
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
contract Futarchy is IForwarder, AragonApp { | |
// FutarchyOracleFactory comes from Gnosis https://github.com/gnosis/pm-contracts/blob/v1.0.0/contracts/Oracles/FutarchyOracleFactory.sol | |
// BoundsOracle - Calculates the upper and lower bounds for creating a new FutarchyOracle | |
// PriceFeedOracle - Is used to resolve all futarchy decision markets | |
function initialize( | |
FutarchyOracleFactory _futarchyOracleFactory, | |
BoundsOracle _boundsOracle, | |
PriceFeedOracle _priceFeedOracle, | |
uint256 _decisionTime, | |
uint256 _decisionFunctionTime | |
) | |
onlyInit external; | |
// Creates a new FutarchyOracle for the decision through FutarchyOracleFactory | |
function newDecision(bytes _executionScript, string _metadata) auth(CREATE_DECISIONS_ROLE) external returns (uint256 decisionId); | |
// Gets decision metadata | |
function getDecisionMetadata(uint256 _decisionId) public view returns (string); | |
// Returns is futarchy markets are still running | |
function isDecisionOpen(Vote storage vote) internal view returns (bool); | |
// Executes the execution script once all markets for the decision have been resolved | |
function executeDecision(uint256 _decisionId) isInitialized external; | |
// IForwarder | |
function isForwarder() public pure returns (bool); | |
function forward(bytes _evmScript) public; | |
function canForward(address _sender, bytes _evmCallScript) public view returns (bool); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment