Fixes #5
This commit is contained in:
parent
7f2bc5ad00
commit
a35c36ee47
|
@ -3,7 +3,6 @@ pragma solidity ^0.8.18;
|
|||
|
||||
import { TokenController } from "@vacp2p/minime/contracts/TokenController.sol";
|
||||
import { MiniMeToken } from "@vacp2p/minime/contracts/MiniMeToken.sol";
|
||||
import "./SafeMath.sol";
|
||||
import "./Owned.sol";
|
||||
|
||||
/*
|
||||
|
@ -31,8 +30,6 @@ import "./Owned.sol";
|
|||
/// logic for transferring control of the token to the network when the offering
|
||||
/// asks it to do so.
|
||||
contract SNTPlaceHolder is TokenController, Owned {
|
||||
using SafeMath for uint256;
|
||||
|
||||
MiniMeToken public snt;
|
||||
|
||||
constructor(address _owner, address payable _snt) {
|
||||
|
|
|
@ -1,47 +0,0 @@
|
|||
// SPDX-License-Identifier: GPL-3.0
|
||||
pragma solidity ^0.8.18;
|
||||
|
||||
/**
|
||||
* Math operations with safety checks
|
||||
*/
|
||||
library SafeMath {
|
||||
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
|
||||
uint256 c = a * b;
|
||||
assert(a == 0 || c / a == b);
|
||||
return c;
|
||||
}
|
||||
|
||||
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 c;
|
||||
}
|
||||
|
||||
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
|
||||
assert(b <= a);
|
||||
return a - b;
|
||||
}
|
||||
|
||||
function add(uint256 a, uint256 b) internal pure returns (uint256) {
|
||||
uint256 c = a + b;
|
||||
assert(c >= a);
|
||||
return c;
|
||||
}
|
||||
|
||||
function max64(uint64 a, uint64 b) internal pure returns (uint64) {
|
||||
return a >= b ? a : b;
|
||||
}
|
||||
|
||||
function min64(uint64 a, uint64 b) internal pure returns (uint64) {
|
||||
return a < b ? a : b;
|
||||
}
|
||||
|
||||
function max256(uint256 a, uint256 b) internal pure returns (uint256) {
|
||||
return a >= b ? a : b;
|
||||
}
|
||||
|
||||
function min256(uint256 a, uint256 b) internal pure returns (uint256) {
|
||||
return a < b ? a : b;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue