{"fileName":"/contracts/interactive/DaoSpecialProposal.sol","name":"DaoSpecialProposal","abi":[{"constant":true,"inputs":[],"name":"resolver","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_configKey","type":"bytes32"}],"name":"getAddressConfig","outputs":[{"name":"_configValue","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_doc","type":"bytes32"},{"name":"_uintConfigs","type":"uint256[]"},{"name":"_addressConfigs","type":"address[]"},{"name":"_bytesConfigs","type":"bytes32[]"}],"name":"createSpecialProposal","outputs":[{"name":"_success","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"key","outputs":[{"name":"","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_key","type":"bytes32"}],"name":"get_contract","outputs":[{"name":"_contract","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_proposalId","type":"bytes32"}],"name":"startSpecialProposalVoting","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"currentTimeInQuarter","outputs":[{"name":"_currentT","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"isMainPhase","outputs":[{"name":"_isMainPhase","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"isLockingPhase","outputs":[{"name":"_isLockingPhase","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"currentQuarterNumber","outputs":[{"name":"_quarterNumber","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_user","type":"address"}],"name":"isParticipant","outputs":[{"name":"_is","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_configKey","type":"bytes32"}],"name":"getBytesConfig","outputs":[{"name":"_configValue","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_configKey","type":"bytes32"}],"name":"getUintConfig","outputs":[{"name":"_configValue","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"isDaoNotReplaced","outputs":[{"name":"_isNotReplaced","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"CONTRACT_ADDRESS","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_proposalId","type":"bytes32"}],"name":"isProposalPaused","outputs":[{"name":"_isPausedOrStopped","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_user","type":"address"}],"name":"isModerator","outputs":[{"name":"_is","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"inputs":[{"name":"_resolver","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_specialProposalId","type":"bytes32"}],"name":"StartSpecialProposal","type":"event"}],"bin":false,"opcodes":false,"source":"pragma solidity ^0.4.25;\n\nimport \"./../common/DaoCommon.sol\";\n\ncontract DaoSpecialProposal is DaoCommon {\n\n    event StartSpecialProposal(bytes32 indexed _specialProposalId);\n\n    constructor(address _resolver) public {\n        require(init(CONTRACT_DAO_SPECIAL_PROPOSAL, _resolver));\n    }\n\n    /**\n    @notice Function to create a Special Proposal (can only be created by the founders)\n    @param _doc hash of the IPFS doc of the special proposal details\n    @param _uintConfigs Array of the new UINT256 configs\n    @param _addressConfigs Array of the new Address configs\n    @param _bytesConfigs Array of the new Bytes32 configs\n    @return {\n      \"_success\": \"true if created special successfully\"\n    }\n    */\n    function createSpecialProposal(\n        bytes32 _doc,\n        uint256[] _uintConfigs,\n        address[] _addressConfigs,\n        bytes32[] _bytesConfigs\n    )\n        external\n        if_founder()\n        returns (bool _success)\n    {\n        require(isMainPhase());\n        address _proposer = msg.sender;\n        daoSpecialStorage().addSpecialProposal(\n            _doc,\n            _proposer,\n            _uintConfigs,\n            _addressConfigs,\n            _bytesConfigs\n        );\n        _success = true;\n    }\n\n    /**\n    @notice Function to set start of voting round for special proposal\n    @param _proposalId ID of the special proposal\n    */\n    function startSpecialProposalVoting(\n        bytes32 _proposalId\n    )\n        public\n    {\n        require(isMainPhase());\n        require(daoSpecialStorage().readProposalProposer(_proposalId) == msg.sender);\n        require(daoSpecialStorage().readVotingTime(_proposalId) == 0); // voting hasnt started yet\n        require(getTimeLeftInQuarter(now) > getUintConfig(CONFIG_SPECIAL_PROPOSAL_PHASE_TOTAL));\n        daoSpecialStorage().setVotingTime(_proposalId, now);\n\n        emit StartSpecialProposal(_proposalId);\n    }\n}\n","abiDocs":[{"constant":true,"inputs":[],"name":"resolver","payable":false,"stateMutability":"view","type":"function","signature":"resolver()","signatureHash":"04f3bcec"},{"constant":true,"inputs":[{"name":"_configKey","type":"bytes32"}],"name":"getAddressConfig","payable":false,"stateMutability":"view","type":"function","signature":"getAddressConfig(bytes32)","signatureHash":"1d8ccd04"},{"constant":false,"inputs":[{"name":"_doc","type":"bytes32","description":"hash of the IPFS doc of the special proposal details"},{"name":"_uintConfigs","type":"uint256[]","description":"Array of the new UINT256 configs"},{"name":"_addressConfigs","type":"address[]","description":"Array of the new Address configs"},{"name":"_bytesConfigs","type":"bytes32[]","description":"Array of the new Bytes32 configs"}],"name":"createSpecialProposal","outputs":[{"name":"_success","type":"bool","description":"true if created special successfully"}],"payable":false,"stateMutability":"nonpayable","type":"function","return":"{ \"_success\": \"true if created special successfully\" }","notice":"Function to create a Special Proposal (can only be created by the founders)","signature":"createSpecialProposal(bytes32,uint256[],address[],bytes32[])","signatureHash":"25505bfa"},{"constant":true,"inputs":[],"name":"key","payable":false,"stateMutability":"view","type":"function","signature":"key()","signatureHash":"3943380c"},{"constant":true,"inputs":[{"name":"_key","type":"bytes32","description":"the resolver key to look up"}],"name":"get_contract","outputs":[{"name":"_contract","type":"address","description":"the address of the contract"}],"payable":false,"stateMutability":"view","type":"function","details":"Get the address of a contract","return":"_contract the address of the contract","signature":"get_contract(bytes32)","signatureHash":"3f83acff"},{"constant":false,"inputs":[{"name":"_proposalId","type":"bytes32","description":"ID of the special proposal"}],"name":"startSpecialProposalVoting","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function","notice":"Function to set start of voting round for special proposal","signature":"startSpecialProposalVoting(bytes32)","signatureHash":"517f4a80"},{"constant":true,"inputs":[],"name":"currentTimeInQuarter","outputs":[{"name":"_currentT","type":"uint256","description":"the current relative time in the quarter"}],"payable":false,"stateMutability":"view","type":"function","details":"For example: the currentTimeInQuarter of the first second of any quarter is 1","return":"_currentT the current relative time in the quarter","notice":"Get the current relative time in the quarter","signature":"currentTimeInQuarter()","signatureHash":"560a25ea"},{"constant":true,"inputs":[],"name":"isMainPhase","outputs":[{"name":"_isMainPhase","type":"bool","description":"true if it is in a main phase"}],"payable":false,"stateMutability":"view","type":"function","details":"The main phase is where all the governance activities could take plase. If the DAO is replaced, there can never be any more main phase.","return":"_isMainPhase true if it is in a main phase","notice":"Check if it is currently in a main phase.","signature":"isMainPhase()","signatureHash":"68533060"},{"constant":true,"inputs":[],"name":"isLockingPhase","outputs":[{"name":"_isLockingPhase","type":"bool","description":"true if it is in the locking phase"}],"payable":false,"stateMutability":"view","type":"function","details":"No governance activities can happen in the locking phase. The locking phase is from t=0 to t=CONFIG_LOCKING_PHASE_DURATION-1","return":"_isLockingPhase true if it is in the locking phase","notice":"Check if it is currently in the locking phase","signature":"isLockingPhase()","signatureHash":"7d6fed80"},{"constant":true,"inputs":[],"name":"currentQuarterNumber","outputs":[{"name":"_quarterNumber","type":"uint256","description":"the current quarter index"}],"payable":false,"stateMutability":"view","type":"function","details":"Quarter indexes starts from 1","return":"_quarterNumber the current quarter index","notice":"Get the current quarter index","signature":"currentQuarterNumber()","signatureHash":"7f6a26b6"},{"constant":true,"inputs":[{"name":"_user","type":"address"}],"name":"isParticipant","payable":false,"stateMutability":"view","type":"function","notice":"Check if a user is a participant in the current quarter","signature":"isParticipant(address)","signatureHash":"929066f5"},{"constant":true,"inputs":[{"name":"_configKey","type":"bytes32"}],"name":"getBytesConfig","payable":false,"stateMutability":"view","type":"function","signature":"getBytesConfig(bytes32)","signatureHash":"93ddad08"},{"constant":true,"inputs":[{"name":"_configKey","type":"bytes32"}],"name":"getUintConfig","payable":false,"stateMutability":"view","type":"function","signature":"getUintConfig(bytes32)","signatureHash":"b1e2b9dd"},{"constant":true,"inputs":[],"name":"isDaoNotReplaced","outputs":[{"name":"_isNotReplaced","type":"bool","description":"true if it is not replaced, false if it has already been replaced"}],"payable":false,"stateMutability":"view","type":"function","return":"_isNotReplaced true if it is not replaced, false if it has already been replaced","notice":"Check if the DAO contracts have been replaced by a new set of contracts","signature":"isDaoNotReplaced()","signatureHash":"d70d9358"},{"constant":true,"inputs":[],"name":"CONTRACT_ADDRESS","payable":false,"stateMutability":"view","type":"function","signature":"CONTRACT_ADDRESS()","signatureHash":"db4ecbc1"},{"constant":true,"inputs":[{"name":"_proposalId","type":"bytes32"}],"name":"isProposalPaused","outputs":[{"name":"_isPausedOrStopped","type":"bool","description":"true if the proposal is paused(or stopped)"}],"payable":false,"stateMutability":"view","type":"function","details":"If a proposal is paused/stopped (by the PRLs): proposer cannot call for voting, a current on-going voting round can still pass, but no funding can be withdrawn.A paused proposal can still be unpausedIf a proposal is stopped, this function also returns true","return":"_isPausedOrStopped true if the proposal is paused(or stopped)","notice":"Check if a proposal is currently paused/stopped","signature":"isProposalPaused(bytes32)","signatureHash":"f94f0f33"},{"constant":true,"inputs":[{"name":"_user","type":"address"}],"name":"isModerator","payable":false,"stateMutability":"view","type":"function","notice":"Check if a user is a moderator in the current quarter","signature":"isModerator(address)","signatureHash":"fa6f3936"},{"inputs":[{"name":"_resolver","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_specialProposalId","type":"bytes32"}],"name":"StartSpecialProposal","type":"event","signature":"StartSpecialProposal(bytes32)","signatureHash":"9d3e9e65"}]}
