Make view and pure functions virtual (#2473)
Co-authored-by: Francisco Giordano <frangio.1@gmail.com>
This commit is contained in:
@ -36,7 +36,7 @@ abstract contract Pausable is Context {
|
||||
/**
|
||||
* @dev Returns true if the contract is paused, and false otherwise.
|
||||
*/
|
||||
function paused() public view returns (bool) {
|
||||
function paused() public view virtual returns (bool) {
|
||||
return _paused;
|
||||
}
|
||||
|
||||
@ -48,7 +48,7 @@ abstract contract Pausable is Context {
|
||||
* - The contract must not be paused.
|
||||
*/
|
||||
modifier whenNotPaused() {
|
||||
require(!_paused, "Pausable: paused");
|
||||
require(!paused(), "Pausable: paused");
|
||||
_;
|
||||
}
|
||||
|
||||
@ -60,7 +60,7 @@ abstract contract Pausable is Context {
|
||||
* - The contract must be paused.
|
||||
*/
|
||||
modifier whenPaused() {
|
||||
require(_paused, "Pausable: not paused");
|
||||
require(paused(), "Pausable: not paused");
|
||||
_;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user