State Variables
pauseRules
MAX_RULES
Functions
constructor
Constructor that sets the app manager address used for permissions. This is required for upgrades.Name | Type | Description |
---|---|---|
_dataModuleAppManagerAddress | address | address of the owning app manager |
addPauseRule
This function first cleans outdated rules, then checks if new pause rule will exceed the MAX_RULES limit (15) Add the pause rule to the account. Restricted to the ownerName | Type | Description |
---|---|---|
_pauseStart | uint64 | pause window start timestamp |
_pauseStop | uint64 | pause window stop timestamp |
_removePauseRule
Helper function to remove pause ruleName | Type | Description |
---|---|---|
i | uint256 | index of pause rule to remove |
removePauseRule
Function loops through pause rules while there is at least 1 stored rule. Then calls _removePauseRule() for all rules whose end date is less than or equal to block.timestamp. This loop will continue looping through (a maximum of 15 rules) until all rules are “swapped and popped” in order to remove outdated rules, even when not stored in dated order. Remove the pause rule from the account. Restricted to the ownerName | Type | Description |
---|---|---|
_pauseStart | uint64 | pause window start timestamp |
_pauseStop | uint64 | pause window stop timestamp |
cleanOutdatedRules
Function loops through pause rules and calls _removePauseRule() for all rules whose end date is less than or equal to block.timestamp This loop will continue looping through (a maximum of 15 rules) until all rules are “swapped and popped” in order to remove outdated rules, even when not stored in dated order. Cleans up outdated pause rules by removing them from the mappinggetPauseRules
Get the pauseRules data for a given tokenName.Name | Type | Description |
---|---|---|
<none> | PauseRule[] | pauseRules all the pause rules for the token |
isPauseRulesEmpty
return true if pause rules is empty and return false if array contains rules Return a bool for if the PauseRule array is emptyName | Type | Description |
---|---|---|
<none> | bool | true if empty |