Commit 4c6575bf by Matt Condon Committed by Nicolás Venturo

fix: solium linting errors (#1113)

* fix: solium linting errors, fixes #1092

* fix: remove uppercase requirement
parent 2f6c8b05
......@@ -4,6 +4,7 @@
"rules": {
"quotes": ["error", "double"],
"no-empty-blocks": "off",
"uppercase": "off",
"indentation": ["error", 2],
"max-len": ["warning", 79],
"no-constant": ["error"],
......
......@@ -13,10 +13,9 @@ import "../token/ERC20/MintableToken.sol";
*/
contract SampleCrowdsaleToken is MintableToken {
// solium-disable-next-line uppercase
string public constant name = "Sample Crowdsale Token";
string public constant symbol = "SCT"; // solium-disable-line uppercase
uint8 public constant decimals = 18; // solium-disable-line uppercase
string public constant symbol = "SCT";
uint8 public constant decimals = 18;
}
......
......@@ -12,9 +12,9 @@ import "../token/ERC20/StandardToken.sol";
*/
contract SimpleToken is StandardToken {
string public constant name = "SimpleToken"; // solium-disable-line uppercase
string public constant symbol = "SIM"; // solium-disable-line uppercase
uint8 public constant decimals = 18; // solium-disable-line uppercase
string public constant name = "SimpleToken";
string public constant symbol = "SIM";
uint8 public constant decimals = 18;
uint256 public constant INITIAL_SUPPLY = 10000 * (10 ** uint256(decimals));
......
......@@ -9,6 +9,7 @@ import "./ERC165.sol";
* @dev Implements ERC165 using a lookup table.
*/
contract SupportsInterfaceWithLookup is ERC165 {
bytes4 public constant InterfaceId_ERC165 = 0x01ffc9a7;
/**
* 0x01ffc9a7 ===
......
......@@ -4,7 +4,15 @@ import "./ERC721Receiver.sol";
contract ERC721Holder is ERC721Receiver {
function onERC721Received(address, address, uint256, bytes) public returns(bytes4) {
function onERC721Received(
address,
address,
uint256,
bytes
)
public
returns(bytes4)
{
return ERC721_RECEIVED;
}
}
......@@ -147,7 +147,8 @@ contract ERC721Token is SupportsInterfaceWithLookup, ERC721BasicToken, ERC721 {
uint256 lastToken = ownedTokens[_from][lastTokenIndex];
ownedTokens[_from][tokenIndex] = lastToken;
ownedTokens[_from].length--; // This also deletes the contents at the last position of the array
ownedTokens[_from].length--;
// ^ This also deletes the contents at the last position of the array
// Note that this will handle single-element arrays. In that case, both tokenIndex and lastTokenIndex are going to
// be zero. Then we can make sure that we will remove _tokenId from the ownedTokens list since we are first swapping
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment