Browse Source

Float pragmas, clean up comments

maurelian 6 years ago
parent
commit
d091794a5d

+ 1 - 0
.solhint.json

@@ -4,6 +4,7 @@
       "avoid-throw": false,
       "avoid-suicide": "error",
       "avoid-sha3": "warn",
+      "compiler-fixed": false,
       "indent": ["warn", 4],
       "max-line-length": 150,
       "var-name-mixedcase": false,

+ 1 - 9
contracts/eip20/EIP20.sol

@@ -3,7 +3,7 @@ Implements EIP20 token standard: https://github.com/ethereum/EIPs/issues/20
 .*/
 
 
-pragma solidity 0.4.18;
+pragma solidity ^0.4.18;
 
 import "./EIP20Interface.sol";
 
@@ -37,11 +37,6 @@ contract EIP20 is EIP20Interface {
     }
 
     function transfer(address _to, uint256 _value) public returns (bool success) {
-        //Default assumes totalSupply can't be over max (2^256 - 1).
-        //If your token leaves out totalSupply and can issue more tokens as time goes on, 
-        // you need to check if it doesn't wrap.
-        //Replace the if with this one instead.
-        //require(balances[msg.sender] >= _value && balances[_to] + _value > balances[_to]);
         require(balances[msg.sender] >= _value);
         balances[msg.sender] -= _value;
         balances[_to] += _value;
@@ -50,9 +45,6 @@ contract EIP20 is EIP20Interface {
     }
 
     function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) {
-        //same as above. Replace this line with the following if you want to protect against wrapping uints.
-        // solhint-disable-next-line
-        //require(balances[_from] >= _value && allowed[_from][msg.sender] >= _value && balances[_to] + _value > balances[_to]);
         uint256 allowance = allowed[_from][msg.sender];
         require(balances[_from] >= _value && allowance >= _value);
         balances[_to] += _value;

+ 1 - 1
contracts/eip20/EIP20Factory.sol

@@ -1,6 +1,6 @@
 import "./EIP20.sol";
 
-pragma solidity 0.4.18;
+pragma solidity ^0.4.18;
 
 
 contract EIP20Factory {

+ 1 - 1
contracts/eip20/EIP20Interface.sol

@@ -1,6 +1,6 @@
 // Abstract contract for the full ERC 20 Token standard
 // https://github.com/ethereum/EIPs/issues/20
-pragma solidity 0.4.18;
+pragma solidity ^0.4.18;
 
 
 contract EIP20Interface {

+ 1 - 1
package.json

@@ -39,7 +39,7 @@
     "eslint": "4.13.1",
     "eslint-config-airbnb": "16.1.0",
     "eslint-plugin-import": "2.8.0",
-    "eslint-plugin-jsx-a11y": "6.0.3",
+    "eslint-plugin-jsx-a11y": "^6.0.3",
     "eslint-plugin-mocha": "4.11.0",
     "eslint-plugin-node": "5.1.0",
     "eslint-plugin-react": "7.5.1",