convert Pausable to initializers
This commit is contained in:
@ -1,5 +1,6 @@
|
||||
pragma solidity ^0.4.24;
|
||||
|
||||
import "../Initializable.sol";
|
||||
import "../access/roles/PauserRole.sol";
|
||||
|
||||
|
||||
@ -7,12 +8,15 @@ import "../access/roles/PauserRole.sol";
|
||||
* @title Pausable
|
||||
* @dev Base contract which allows children to implement an emergency stop mechanism.
|
||||
*/
|
||||
contract Pausable is PauserRole {
|
||||
contract Pausable is Initializable, PauserRole {
|
||||
event Paused();
|
||||
event Unpaused();
|
||||
|
||||
bool private _paused = false;
|
||||
|
||||
function initialize() public initializer {
|
||||
PauserRole.initialize();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return true if the contract is paused, false otherwise.
|
||||
|
||||
@ -1,16 +1,19 @@
|
||||
pragma solidity ^0.4.24;
|
||||
|
||||
|
||||
import "../Initializable.sol";
|
||||
import "../lifecycle/Pausable.sol";
|
||||
import "./PauserRoleMock.sol";
|
||||
|
||||
|
||||
// mock class using Pausable
|
||||
contract PausableMock is Pausable, PauserRoleMock {
|
||||
contract PausableMock is Initializable, Pausable, PauserRoleMock {
|
||||
bool public drasticMeasureTaken;
|
||||
uint256 public count;
|
||||
|
||||
constructor() public {
|
||||
Pausable.initialize();
|
||||
|
||||
drasticMeasureTaken = false;
|
||||
count = 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user