This repository has been archived by the owner on Mar 1, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 505
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
1 parent
7f1148d
commit 73ed598
Showing
9 changed files
with
31,816 additions
and
2,013 deletions.
There are no files selected for viewing
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 |
---|---|---|
|
@@ -22,3 +22,5 @@ test-blockchain/data | |
coverage/ | ||
|
||
coverage.json | ||
|
||
.idea |
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 +1 @@ | ||
11.1.0 | ||
16.17.1 |
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 |
---|---|---|
|
@@ -4,6 +4,10 @@ | |
|
||
pragma solidity >=0.5.0 <0.7.0; | ||
|
||
|
||
import {SafeMath} from "openzeppelin-solidity/contracts/math/SafeMath.sol"; | ||
|
||
|
||
/// @title SelfAuthorized - authorizes current contract to perform actions | ||
/// @author Richard Meissner - <[email protected]> | ||
contract SelfAuthorized { | ||
|
@@ -607,71 +611,6 @@ contract ISignatureValidator is ISignatureValidatorConstants { | |
} | ||
|
||
|
||
/** | ||
* @title SafeMath | ||
* @dev Math operations with safety checks that revert on error | ||
* TODO: remove once open zeppelin update to solc 0.5.0 | ||
*/ | ||
library SafeMath { | ||
|
||
/** | ||
* @dev Multiplies two numbers, reverts on overflow. | ||
*/ | ||
function mul(uint256 a, uint256 b) internal pure returns (uint256) { | ||
// Gas optimization: this is cheaper than requiring '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; | ||
} | ||
|
||
uint256 c = a * b; | ||
require(c / a == b); | ||
|
||
return c; | ||
} | ||
|
||
/** | ||
* @dev Integer division of two numbers truncating the quotient, reverts on division by zero. | ||
*/ | ||
function div(uint256 a, uint256 b) internal pure returns (uint256) { | ||
require(b > 0); // Solidity only automatically asserts 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 c; | ||
} | ||
|
||
/** | ||
* @dev Subtracts two numbers, reverts on overflow (i.e. if subtrahend is greater than minuend). | ||
*/ | ||
function sub(uint256 a, uint256 b) internal pure returns (uint256) { | ||
require(b <= a); | ||
uint256 c = a - b; | ||
|
||
return c; | ||
} | ||
|
||
/** | ||
* @dev Adds two numbers, reverts on overflow. | ||
*/ | ||
function add(uint256 a, uint256 b) internal pure returns (uint256) { | ||
uint256 c = a + b; | ||
require(c >= a); | ||
|
||
return c; | ||
} | ||
|
||
/** | ||
* @dev Divides two numbers and returns the remainder (unsigned integer modulo), | ||
* reverts when dividing by zero. | ||
*/ | ||
function mod(uint256 a, uint256 b) internal pure returns (uint256) { | ||
require(b != 0); | ||
return a % b; | ||
} | ||
} | ||
|
||
/// @title Gnosis Safe - A multisignature wallet with support for confirmations using signed messages based on ERC191. | ||
/// @author Stefan George - <[email protected]> | ||
/// @author Richard Meissner - <[email protected]> | ||
|
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
Oops, something went wrong.