From 7501c83ad7baea7800400c49bf89b8b5db1eb6ed Mon Sep 17 00:00:00 2001 From: Jaycen Horton Date: Wed, 22 Aug 2018 19:49:33 -0700 Subject: [PATCH] Add require "reason string" for paused contracts --- contracts/lifecycle/Pausable.sol | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/contracts/lifecycle/Pausable.sol b/contracts/lifecycle/Pausable.sol index d39bbff080f..5f59f0c6268 100644 --- a/contracts/lifecycle/Pausable.sol +++ b/contracts/lifecycle/Pausable.sol @@ -19,7 +19,7 @@ contract Pausable is Ownable { * @dev Modifier to make a function callable only when the contract is not paused. */ modifier whenNotPaused() { - require(!paused); + require(!paused, "You cannot use this function when the contract is paused"); _; } @@ -27,7 +27,7 @@ contract Pausable is Ownable { * @dev Modifier to make a function callable only when the contract is paused. */ modifier whenPaused() { - require(paused); + require(paused, "You cannot use this function when the contract is un-paused"); _; }