Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
O
openzeppelin-contracts-upgradeable
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
俞永鹏
openzeppelin-contracts-upgradeable
Commits
27a6a15d
Commit
27a6a15d
authored
May 18, 2018
by
Francisco Giordano
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add explicit initializers
parent
32e93579
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
2 deletions
+10
-2
Pausable.sol
contracts/lifecycle/Pausable.sol
+5
-1
PausableToken.sol
contracts/token/ERC20/PausableToken.sol
+5
-1
No files found.
contracts/lifecycle/Pausable.sol
View file @
27a6a15d
...
@@ -8,13 +8,17 @@ import "../ownership/Ownable.sol";
...
@@ -8,13 +8,17 @@ import "../ownership/Ownable.sol";
* @title Pausable
* @title Pausable
* @dev Base contract which allows children to implement an emergency stop mechanism.
* @dev Base contract which allows children to implement an emergency stop mechanism.
*/
*/
contract Pausable is Ownable {
contract Pausable is
Migratable,
Ownable {
event Pause();
event Pause();
event Unpause();
event Unpause();
bool public paused = false;
bool public paused = false;
function initialize(address _sender) isInitializer("Pausable", "1.9.0-beta") {
Ownable.initialize(_sender);
}
/**
/**
* @dev Modifier to make a function callable only when the contract is not paused.
* @dev Modifier to make a function callable only when the contract is not paused.
*/
*/
...
...
contracts/token/ERC20/PausableToken.sol
View file @
27a6a15d
...
@@ -8,7 +8,11 @@ import "../../lifecycle/Pausable.sol";
...
@@ -8,7 +8,11 @@ import "../../lifecycle/Pausable.sol";
* @title Pausable token
* @title Pausable token
* @dev StandardToken modified with pausable transfers.
* @dev StandardToken modified with pausable transfers.
**/
**/
contract PausableToken is StandardToken, Pausable {
contract PausableToken is Migratable, StandardToken, Pausable {
function initialize(address _sender) isInitializer("PausableToken", "1.9.0-beta") {
Pausable.initialize(_sender);
}
function transfer(address _to, uint256 _value) public whenNotPaused returns (bool) {
function transfer(address _to, uint256 _value) public whenNotPaused returns (bool) {
return super.transfer(_to, _value);
return super.transfer(_to, _value);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment