Browse Source

Improve Pausable docs

Nicolás Venturo 5 years ago
parent
commit
c20e620a06
1 changed files with 16 additions and 0 deletions
  1. 16 0
      contracts/utils/Pausable.sol

+ 16 - 0
contracts/utils/Pausable.sol

@@ -40,6 +40,10 @@ contract Pausable is Context {
 
     /**
      * @dev Modifier to make a function callable only when the contract is not paused.
+     *
+     * Requirements:
+     *
+     * - The contract must not be paused.
      */
     modifier whenNotPaused() {
         require(!_paused, "Pausable: paused");
@@ -48,6 +52,10 @@ contract Pausable is Context {
 
     /**
      * @dev Modifier to make a function callable only when the contract is paused.
+     *
+     * Requirements:
+     *
+     * - The contract must be paused.
      */
     modifier whenPaused() {
         require(_paused, "Pausable: not paused");
@@ -56,6 +64,10 @@ contract Pausable is Context {
 
     /**
      * @dev Triggers stopped state.
+     *
+     * Requirements:
+     *
+     * - The contract must not be paused.
      */
     function _pause() internal virtual whenNotPaused {
         _paused = true;
@@ -64,6 +76,10 @@ contract Pausable is Context {
 
     /**
      * @dev Returns to normal state.
+     *
+     * Requirements:
+     *
+     * - The contract must be paused.
      */
     function _unpause() internal virtual whenPaused {
         _paused = false;