Skip to content

Commit

Permalink
Fix bug and remove duplicate Safe math
Browse files Browse the repository at this point in the history
  • Loading branch information
victorwiebe committed May 29, 2018
1 parent 39f62cc commit b5d5011
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 20 deletions.
19 changes: 0 additions & 19 deletions EIP20Interface.sol
Expand Up @@ -2,25 +2,6 @@
// https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md
pragma solidity ^0.4.19;

library SafeMath {
function add(uint a, uint b) internal pure returns (uint c) {
c = a + b;
require(c >= a);
}
function sub(uint a, uint b) internal pure returns (uint c) {
require(b <= a);
c = a - b;
}
function mul(uint a, uint b) internal pure returns (uint c) {
c = a * b;
require(a == 0 || c / a == b);
}
function div(uint a, uint b) internal pure returns (uint c) {
require(b > 0);
c = a / b;
}
}

contract EIP20Interface {
uint256 public totalSupply;
function balanceOf(address _owner) public view returns (uint256 balance);
Expand Down
2 changes: 1 addition & 1 deletion Svandis.sol
Expand Up @@ -49,7 +49,7 @@ contract Svandis is EIP20Interface {
balances[_to] = balances[_to].add(_value);
balances[_from] = balances[_from].sub(_value);
if (allowance < MAX_UINT256) {
allowed[_from][msg.sender].sub(_value);
allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_value);
}
emit Transfer(_from, _to, _value);
return true;
Expand Down

0 comments on commit b5d5011

Please sign in to comment.