DaoRewardsManager | inputs | 0 | address | _resolver | |
| 1 | address | _dgxAddress |
StartNewQuarter fc764255| inputs | 0 | uint256 | _quarterNumber |
ADDRESS_DGX_TOKEN 0d12144bCONTRACT_ADDRESS db4ecbc1calculateGlobalRewardsBeforeNewQuarter 7bf4a98dFunction called by the founder after transfering the DGX fees into the DAO at the beginning of the quarter
This function needs to do lots of calculation, so it might not fit into one transaction As such, it could be done in multiple transactions, each time passing _operations which is the number of operations we want to calculate. When the value of _done is finally true, that's when the calculation is done. Only after this function runs, any other activities in the DAO could happen. Basically, if there were M participants and N moderators in the previous quarter, it takes M+N "operations". In summary, the function populates the DaoQuarterInfo of this quarter. The bulk of the calculation is to go through every participant in the previous quarter to calculate their effectiveDGDBalance and sum them to get the totalEffectiveDGDLastQuarter
| inputs | 0 | uint256 | _operations |
claimRewards 372500abFunction for users to claim the claimable DGX rewards
Will revert if _claimableDGX < MINIMUM_TRANSFER_AMOUNT of DGX. Can only be called after calculateGlobalRewardsBeforeNewQuarter() has been called in the current quarter This cannot be called once the current version of Dao contracts have been migrated to newer version
currentQuarterNumber 7f6a26b6Get the current quarter index
Quarter indexes starts from 1
| outputs | 0 | uint256 | _quarterNumber | the current quarter index |
currentTimeInQuarter 560a25eaGet the current relative time in the quarter
For example: the currentTimeInQuarter of the first second of any quarter is 1
| outputs | 0 | uint256 | _currentT | the current relative time in the quarter |
getUintConfig b1e2b9dd| inputs | 0 | bytes32 | _configKey |
get_contract 3f83acffGet the address of a contract
| inputs | 0 | bytes32 | _key | the resolver key to look up |
| outputs | 0 | address | _contract | the address of the contract |
isDaoNotReplaced d70d9358Check if the DAO contracts have been replaced by a new set of contracts
| outputs | 0 | bool | _isNotReplaced | true if it is not replaced, false if it has already been replaced |
isLockingPhase 7d6fed80Check if it is currently in the locking phase
No governance activities can happen in the locking phase. The locking phase is from t=0 to t=CONFIG_LOCKING_PHASE_DURATION-1
| outputs | 0 | bool | _isLockingPhase | true if it is in the locking phase |
isMainPhase 68533060Check if it is currently in a main phase.
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.
| outputs | 0 | bool | _isMainPhase | true if it is in a main phase |
key 3943380cmoveDGXsToNewDao 3f5a7583Function to transfer the claimableDGXs to the new DaoRewardsManager
This is done during the migrateToNewDao procedure
| inputs | 0 | address | _newDaoRewardsManager | Address of the new daoRewardsManager contract |
resolver 04f3bcecupdateRewardsAndReputationBeforeNewQuarter 49da49bcFunction to update DGX rewards of user. This is only called during locking/withdrawing DGDs, or continuing participation for new quarter
| inputs | 0 | address | _user | Address of the DAO participant |