Instantly share code, notes, and snippets.

Embed
What would you like to do?
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