-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
2,571 additions
and
2,184 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
pragma solidity ^0.4.23; | ||
pragma solidity ^0.4.24; | ||
|
||
import './Will.sol'; | ||
import './Wallet.sol'; | ||
|
This file was deleted.
Oops, something went wrong.
49 changes: 49 additions & 0 deletions
49
installed_contracts/zeppelin-solidity/contracts/lifecycle/Pausable.sol
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
pragma solidity ^0.4.24; | ||
|
||
|
||
import "../ownership/Ownable.sol"; | ||
|
||
|
||
/** | ||
* @title Pausable | ||
* @dev Base contract which allows children to implement an emergency stop mechanism. | ||
*/ | ||
contract Pausable is Ownable { | ||
event Pause(); | ||
event Unpause(); | ||
|
||
bool public paused = false; | ||
|
||
|
||
/** | ||
* @dev Modifier to make a function callable only when the contract is not paused. | ||
*/ | ||
modifier whenNotPaused() { | ||
require(!paused); | ||
_; | ||
} | ||
|
||
/** | ||
* @dev Modifier to make a function callable only when the contract is paused. | ||
*/ | ||
modifier whenPaused() { | ||
require(paused); | ||
_; | ||
} | ||
|
||
/** | ||
* @dev called by the owner to pause, triggers stopped state | ||
*/ | ||
function pause() onlyOwner whenNotPaused public { | ||
paused = true; | ||
emit Pause(); | ||
} | ||
|
||
/** | ||
* @dev called by the owner to unpause, returns to normal state | ||
*/ | ||
function unpause() onlyOwner whenPaused public { | ||
paused = false; | ||
emit Unpause(); | ||
} | ||
} |
52 changes: 52 additions & 0 deletions
52
installed_contracts/zeppelin-solidity/contracts/math/SafeMath.sol
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
pragma solidity ^0.4.24; | ||
|
||
|
||
/** | ||
* @title SafeMath | ||
* @dev Math operations with safety checks that throw on error | ||
*/ | ||
library SafeMath { | ||
|
||
/** | ||
* @dev Multiplies two numbers, throws on overflow. | ||
*/ | ||
function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { | ||
// Gas optimization: this is cheaper than asserting 'a' not being zero, but the | ||
// benefit is lost if 'b' is also tested. | ||
// See: https://github.com/OpenZeppelin/openzeppelin-solidity/pull/522 | ||
if (a == 0) { | ||
return 0; | ||
} | ||
|
||
c = a * b; | ||
assert(c / a == b); | ||
return c; | ||
} | ||
|
||
/** | ||
* @dev Integer division of two numbers, truncating the quotient. | ||
*/ | ||
function div(uint256 a, uint256 b) internal pure returns (uint256) { | ||
// assert(b > 0); // Solidity automatically throws when dividing by 0 | ||
// uint256 c = a / b; | ||
// assert(a == b * c + a % b); // There is no case in which this doesn't hold | ||
return a / b; | ||
} | ||
|
||
/** | ||
* @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). | ||
*/ | ||
function sub(uint256 a, uint256 b) internal pure returns (uint256) { | ||
assert(b <= a); | ||
return a - b; | ||
} | ||
|
||
/** | ||
* @dev Adds two numbers, throws on overflow. | ||
*/ | ||
function add(uint256 a, uint256 b) internal pure returns (uint256 c) { | ||
c = a + b; | ||
assert(c >= a); | ||
return c; | ||
} | ||
} |
64 changes: 64 additions & 0 deletions
64
installed_contracts/zeppelin-solidity/contracts/ownership/Ownable.sol
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
pragma solidity ^0.4.24; | ||
|
||
|
||
/** | ||
* @title Ownable | ||
* @dev The Ownable contract has an owner address, and provides basic authorization control | ||
* functions, this simplifies the implementation of "user permissions". | ||
*/ | ||
contract Ownable { | ||
address public owner; | ||
|
||
|
||
event OwnershipRenounced(address indexed previousOwner); | ||
event OwnershipTransferred( | ||
address indexed previousOwner, | ||
address indexed newOwner | ||
); | ||
|
||
|
||
/** | ||
* @dev The Ownable constructor sets the original `owner` of the contract to the sender | ||
* account. | ||
*/ | ||
constructor() public { | ||
owner = msg.sender; | ||
} | ||
|
||
/** | ||
* @dev Throws if called by any account other than the owner. | ||
*/ | ||
modifier onlyOwner() { | ||
require(msg.sender == owner); | ||
_; | ||
} | ||
|
||
/** | ||
* @dev Allows the current owner to relinquish control of the contract. | ||
* @notice Renouncing to ownership will leave the contract without an owner. | ||
* It will not be possible to call the functions with the `onlyOwner` | ||
* modifier anymore. | ||
*/ | ||
function renounceOwnership() public onlyOwner { | ||
emit OwnershipRenounced(owner); | ||
owner = address(0); | ||
} | ||
|
||
/** | ||
* @dev Allows the current owner to transfer control of the contract to a newOwner. | ||
* @param _newOwner The address to transfer ownership to. | ||
*/ | ||
function transferOwnership(address _newOwner) public onlyOwner { | ||
_transferOwnership(_newOwner); | ||
} | ||
|
||
/** | ||
* @dev Transfers control of the contract to a newOwner. | ||
* @param _newOwner The address to transfer ownership to. | ||
*/ | ||
function _transferOwnership(address _newOwner) internal { | ||
require(_newOwner != address(0)); | ||
emit OwnershipTransferred(owner, _newOwner); | ||
owner = _newOwner; | ||
} | ||
} |
Oops, something went wrong.