From 2b008f4cb6eb0942ab4d71d75d906291c79be31b Mon Sep 17 00:00:00 2001 From: AugustoL Date: Wed, 17 Jan 2018 11:21:25 -0300 Subject: [PATCH] Fix solidity linter errors --- contracts/mocks/ERC827TokenMock.sol | 4 ++-- contracts/mocks/MessageHelper.sol | 8 +++----- contracts/token/ERC827.sol | 16 +++++----------- 3 files changed, 10 insertions(+), 18 deletions(-) diff --git a/contracts/mocks/ERC827TokenMock.sol b/contracts/mocks/ERC827TokenMock.sol index fbba4b5a576..8408d80e09a 100644 --- a/contracts/mocks/ERC827TokenMock.sol +++ b/contracts/mocks/ERC827TokenMock.sol @@ -1,13 +1,13 @@ pragma solidity ^0.4.13; -import '../token/ERC827Token.sol'; +import "../token/ERC827Token.sol"; // mock class using ERC827 Token contract ERC827TokenMock is ERC827Token { - function ERC827TokenMock(address initialAccount, uint256 initialBalance) { + function ERC827TokenMock(address initialAccount, uint256 initialBalance) public { balances[initialAccount] = initialBalance; totalSupply = initialBalance; } diff --git a/contracts/mocks/MessageHelper.sol b/contracts/mocks/MessageHelper.sol index 0b137ee79bc..f990241dab0 100644 --- a/contracts/mocks/MessageHelper.sol +++ b/contracts/mocks/MessageHelper.sol @@ -4,18 +4,16 @@ contract MessageHelper { event Show(bytes32 b32, uint256 number, string text); - function showMessage( - bytes32 message, uint256 number, string text - ) returns (bool) { + function showMessage( bytes32 message, uint256 number, string text ) public returns (bool) { Show(message, number, text); return true; } - function fail() { + function fail() public { require(false); } - function call(address to, bytes data) returns (bool) { + function call(address to, bytes data) public returns (bool) { if (to.call(data)) return true; else diff --git a/contracts/token/ERC827.sol b/contracts/token/ERC827.sol index 6bd217e4f61..f0793e607a0 100644 --- a/contracts/token/ERC827.sol +++ b/contracts/token/ERC827.sol @@ -1,7 +1,9 @@ pragma solidity ^0.4.13; + import "./ERC20.sol"; + /** @title ERC827 interface, an extension of ERC20 token standard @@ -11,16 +13,8 @@ import "./ERC20.sol"; */ contract ERC827 is ERC20 { - function approve( - address _spender, uint256 _value, bytes _data - ) public returns (bool); - - function transfer( - address _to, uint256 _value, bytes _data - ) public returns (bool); - - function transferFrom( - address _from, address _to, uint256 _value, bytes _data - ) public returns (bool); + function approve( address _spender, uint256 _value, bytes _data ) public returns (bool); + function transfer( address _to, uint256 _value, bytes _data ) public returns (bool); + function transferFrom( address _from, address _to, uint256 _value, bytes _data ) public returns (bool); }