Contracts 2.0.0 were linted with solhint
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
pragma solidity ^0.4.10;
|
||||
|
||||
// solhint-disable
|
||||
|
||||
/// @title Multisignature wallet - Allows multiple parties to agree on transactions before execution.
|
||||
/// @author Stefan George - <stefan.george@consensys.net>
|
||||
contract MultiSigWallet {
|
||||
|
@@ -20,6 +20,8 @@ pragma solidity ^0.4.10;
|
||||
|
||||
import "./MultiSigWallet.sol";
|
||||
|
||||
// solhint-disable
|
||||
|
||||
/// @title Multisignature wallet with time lock- Allows multiple parties to execute a transaction after a time lock has passed.
|
||||
/// @author Amir Bandeali - <amir@0xProject.com>
|
||||
contract MultiSigWalletWithTimeLock is MultiSigWallet {
|
||||
|
@@ -22,6 +22,7 @@ pragma experimental ABIEncoderV2;
|
||||
import "../../utils/Ownable/Ownable.sol";
|
||||
import "./mixins/MAuthorizable.sol";
|
||||
|
||||
|
||||
contract MixinAuthorizable is
|
||||
Ownable,
|
||||
MAuthorizable
|
||||
|
@@ -18,15 +18,18 @@
|
||||
|
||||
pragma solidity ^0.4.23;
|
||||
|
||||
|
||||
// @dev Interface of the asset proxy's assetData.
|
||||
// The asset proxies take an ABI encoded `bytes assetData` as argument.
|
||||
// This argument is ABI encoded as one of the methods of this interface.
|
||||
interface IAssetData {
|
||||
|
||||
|
||||
// solhint-disable-next-line func-name-mixedcase
|
||||
function ERC20Token(address tokenContract)
|
||||
external
|
||||
pure;
|
||||
|
||||
// solhint-disable-next-line func-name-mixedcase
|
||||
function ERC721Token(
|
||||
address tokenContract,
|
||||
uint256 tokenId,
|
||||
|
@@ -21,6 +21,7 @@ pragma experimental ABIEncoderV2;
|
||||
|
||||
import "./IAuthorizable.sol";
|
||||
|
||||
|
||||
contract IAssetProxy is
|
||||
IAuthorizable
|
||||
{
|
||||
|
@@ -21,6 +21,7 @@ pragma experimental ABIEncoderV2;
|
||||
|
||||
import "../../../utils/Ownable/IOwnable.sol";
|
||||
|
||||
|
||||
contract IAuthorizable is
|
||||
IOwnable
|
||||
{
|
||||
|
@@ -18,6 +18,7 @@
|
||||
|
||||
pragma solidity ^0.4.24;
|
||||
|
||||
|
||||
/// @dev This contract documents the revert reasons used in the AssetProxy contracts.
|
||||
/// This contract is intended to serve as a reference, but is not actually used for efficiency reasons.
|
||||
contract LibAssetProxyErrors {
|
||||
|
@@ -21,6 +21,7 @@ pragma experimental ABIEncoderV2;
|
||||
|
||||
import "../interfaces/IAuthorizable.sol";
|
||||
|
||||
|
||||
contract MAuthorizable is
|
||||
IAuthorizable
|
||||
{
|
||||
|
@@ -21,6 +21,7 @@ pragma solidity ^0.4.10;
|
||||
import "../../multisig/MultiSigWalletWithTimeLock.sol";
|
||||
import "../../utils/LibBytes/LibBytes.sol";
|
||||
|
||||
|
||||
contract AssetProxyOwner is
|
||||
MultiSigWalletWithTimeLock
|
||||
{
|
||||
|
@@ -27,6 +27,7 @@ import "./MixinAssetProxyDispatcher.sol";
|
||||
import "./MixinTransactions.sol";
|
||||
import "./MixinMatchOrders.sol";
|
||||
|
||||
|
||||
contract Exchange is
|
||||
MixinExchangeCore,
|
||||
MixinMatchOrders,
|
||||
|
@@ -23,6 +23,7 @@ import "../../utils/LibBytes/LibBytes.sol";
|
||||
import "./mixins/MAssetProxyDispatcher.sol";
|
||||
import "../AssetProxy/interfaces/IAssetProxy.sol";
|
||||
|
||||
|
||||
contract MixinAssetProxyDispatcher is
|
||||
Ownable,
|
||||
MAssetProxyDispatcher
|
||||
|
@@ -28,6 +28,7 @@ import "./mixins/MSignatureValidator.sol";
|
||||
import "./mixins/MTransactions.sol";
|
||||
import "./mixins/MAssetProxyDispatcher.sol";
|
||||
|
||||
|
||||
contract MixinExchangeCore is
|
||||
LibConstants,
|
||||
LibMath,
|
||||
|
@@ -23,6 +23,7 @@ import "./mixins/MMatchOrders.sol";
|
||||
import "./mixins/MTransactions.sol";
|
||||
import "./mixins/MAssetProxyDispatcher.sol";
|
||||
|
||||
|
||||
contract MixinMatchOrders is
|
||||
LibConstants,
|
||||
LibMath,
|
||||
|
@@ -24,6 +24,7 @@ import "./mixins/MTransactions.sol";
|
||||
import "./interfaces/IWallet.sol";
|
||||
import "./interfaces/IValidator.sol";
|
||||
|
||||
|
||||
contract MixinSignatureValidator is
|
||||
MSignatureValidator,
|
||||
MTransactions
|
||||
|
@@ -22,6 +22,7 @@ import "./mixins/MSignatureValidator.sol";
|
||||
import "./mixins/MTransactions.sol";
|
||||
import "./libs/LibEIP712.sol";
|
||||
|
||||
|
||||
contract MixinTransactions is
|
||||
LibEIP712,
|
||||
MSignatureValidator,
|
||||
|
@@ -24,6 +24,7 @@ import "./libs/LibOrder.sol";
|
||||
import "./libs/LibFillResults.sol";
|
||||
import "./mixins/MExchangeCore.sol";
|
||||
|
||||
|
||||
contract MixinWrapperFunctions is
|
||||
LibMath,
|
||||
LibFillResults,
|
||||
|
@@ -18,6 +18,7 @@
|
||||
|
||||
pragma solidity ^0.4.24;
|
||||
|
||||
|
||||
contract IAssetProxyDispatcher {
|
||||
|
||||
/// @dev Registers an asset proxy to its asset proxy id.
|
||||
|
@@ -26,6 +26,7 @@ import "./ITransactions.sol";
|
||||
import "./IAssetProxyDispatcher.sol";
|
||||
import "./IWrapperFunctions.sol";
|
||||
|
||||
|
||||
contract IExchange is
|
||||
IExchangeCore,
|
||||
IMatchOrders,
|
||||
|
@@ -22,6 +22,7 @@ pragma experimental ABIEncoderV2;
|
||||
import "../libs/LibOrder.sol";
|
||||
import "../libs/LibFillResults.sol";
|
||||
|
||||
|
||||
contract IExchangeCore {
|
||||
|
||||
/// @dev Cancels all orders created by makerAddress with a salt less than or equal to the targetOrderEpoch
|
||||
|
@@ -21,6 +21,7 @@ pragma experimental ABIEncoderV2;
|
||||
import "../libs/LibOrder.sol";
|
||||
import "../libs/LibFillResults.sol";
|
||||
|
||||
|
||||
contract IMatchOrders {
|
||||
|
||||
/// @dev Match two complementary orders that have a profitable spread.
|
||||
|
@@ -18,6 +18,7 @@
|
||||
|
||||
pragma solidity ^0.4.24;
|
||||
|
||||
|
||||
contract ISignatureValidator {
|
||||
|
||||
/// @dev Approves a hash on-chain using any valid signature type.
|
||||
|
@@ -17,6 +17,7 @@
|
||||
*/
|
||||
pragma solidity ^0.4.24;
|
||||
|
||||
|
||||
contract ITransactions {
|
||||
|
||||
/// @dev Executes an exchange method call in the context of signer.
|
||||
|
@@ -18,6 +18,7 @@
|
||||
|
||||
pragma solidity ^0.4.23;
|
||||
|
||||
|
||||
contract IValidator {
|
||||
|
||||
/// @dev Verifies that a signature is valid.
|
||||
|
@@ -18,6 +18,7 @@
|
||||
|
||||
pragma solidity ^0.4.24;
|
||||
|
||||
|
||||
contract IWallet {
|
||||
|
||||
/// @dev Verifies that a signature is valid.
|
||||
|
@@ -22,6 +22,7 @@ pragma experimental ABIEncoderV2;
|
||||
import "../libs/LibOrder.sol";
|
||||
import "../libs/LibFillResults.sol";
|
||||
|
||||
|
||||
contract IWrapperFunctions {
|
||||
/// @dev Fills the input order. Reverts if exact takerAssetFillAmount not filled.
|
||||
/// @param order LibOrder.Order struct containing order specifications.
|
||||
|
@@ -18,11 +18,13 @@
|
||||
|
||||
pragma solidity ^0.4.24;
|
||||
|
||||
|
||||
contract LibConstants {
|
||||
|
||||
// Asset data for ZRX token. Used for fee transfers.
|
||||
// @TODO: Hardcode constant when we deploy. Currently
|
||||
// not constant to make testing easier.
|
||||
// solhint-disable-next-line var-name-mixedcase
|
||||
bytes public ZRX_ASSET_DATA;
|
||||
|
||||
// @TODO: Remove when we deploy.
|
||||
|
@@ -18,6 +18,7 @@
|
||||
|
||||
pragma solidity ^0.4.24;
|
||||
|
||||
|
||||
contract LibEIP712 {
|
||||
// EIP191 header for EIP712 prefix
|
||||
string constant EIP191_HEADER = "\x19\x01";
|
||||
@@ -38,6 +39,7 @@ contract LibEIP712 {
|
||||
));
|
||||
|
||||
// Hash of the EIP712 Domain Separator data
|
||||
// solhint-disable-next-line var-name-mixedcase
|
||||
bytes32 public EIP712_DOMAIN_HASH;
|
||||
|
||||
constructor ()
|
||||
|
@@ -18,6 +18,7 @@
|
||||
|
||||
pragma solidity ^0.4.24;
|
||||
|
||||
|
||||
/// @dev This contract documents the revert reasons used in the Exchange contract.
|
||||
/// This contract is intended to serve as a reference, but is not actually used for efficiency reasons.
|
||||
contract LibExchangeErrors {
|
||||
|
@@ -20,6 +20,7 @@ pragma solidity ^0.4.24;
|
||||
|
||||
import "../../../utils/SafeMath/SafeMath.sol";
|
||||
|
||||
|
||||
contract LibFillResults is
|
||||
SafeMath
|
||||
{
|
||||
|
@@ -20,6 +20,7 @@ pragma solidity ^0.4.24;
|
||||
|
||||
import "../../../utils/SafeMath/SafeMath.sol";
|
||||
|
||||
|
||||
contract LibMath is
|
||||
SafeMath
|
||||
{
|
||||
|
@@ -20,6 +20,7 @@ pragma solidity ^0.4.24;
|
||||
|
||||
import "./LibEIP712.sol";
|
||||
|
||||
|
||||
contract LibOrder is
|
||||
LibEIP712
|
||||
{
|
||||
@@ -115,17 +116,20 @@ contract LibOrder is
|
||||
// ));
|
||||
assembly {
|
||||
// Backup
|
||||
// solhint-disable-next-line space-after-comma
|
||||
let temp1 := mload(sub(order, 32))
|
||||
let temp2 := mload(add(order, 320))
|
||||
let temp3 := mload(add(order, 352))
|
||||
|
||||
// Hash in place
|
||||
// solhint-disable-next-line space-after-comma
|
||||
mstore(sub(order, 32), schemaHash)
|
||||
mstore(add(order, 320), makerAssetDataHash)
|
||||
mstore(add(order, 352), takerAssetDataHash)
|
||||
result := keccak256(sub(order, 32), 416)
|
||||
|
||||
// Restore
|
||||
// solhint-disable-next-line space-after-comma
|
||||
mstore(sub(order, 32), temp1)
|
||||
mstore(add(order, 320), temp2)
|
||||
mstore(add(order, 352), temp3)
|
||||
|
@@ -21,6 +21,7 @@ pragma experimental ABIEncoderV2;
|
||||
|
||||
import "../interfaces/IAssetProxyDispatcher.sol";
|
||||
|
||||
|
||||
contract MAssetProxyDispatcher is
|
||||
IAssetProxyDispatcher
|
||||
{
|
||||
|
@@ -23,6 +23,7 @@ import "../libs/LibOrder.sol";
|
||||
import "../libs/LibFillResults.sol";
|
||||
import "../interfaces/IExchangeCore.sol";
|
||||
|
||||
|
||||
contract MExchangeCore is
|
||||
IExchangeCore
|
||||
{
|
||||
|
@@ -22,6 +22,7 @@ import "../libs/LibOrder.sol";
|
||||
import "../libs/LibFillResults.sol";
|
||||
import "../interfaces/IMatchOrders.sol";
|
||||
|
||||
|
||||
contract MMatchOrders is
|
||||
IMatchOrders
|
||||
{
|
||||
|
@@ -20,6 +20,7 @@ pragma solidity ^0.4.24;
|
||||
|
||||
import "../interfaces/ISignatureValidator.sol";
|
||||
|
||||
|
||||
contract MSignatureValidator is
|
||||
ISignatureValidator
|
||||
{
|
||||
|
@@ -19,6 +19,7 @@ pragma solidity ^0.4.24;
|
||||
|
||||
import "../interfaces/ITransactions.sol";
|
||||
|
||||
|
||||
contract MTransactions is
|
||||
ITransactions
|
||||
{
|
||||
|
@@ -22,6 +22,7 @@ pragma experimental ABIEncoderV2;
|
||||
import "../Mintable/Mintable.sol";
|
||||
import "../../utils/Ownable/Ownable.sol";
|
||||
|
||||
|
||||
contract DummyERC20Token is Mintable, Ownable {
|
||||
string public name;
|
||||
string public symbol;
|
||||
|
@@ -27,6 +27,7 @@ pragma solidity ^0.4.24;
|
||||
|
||||
import "../../tokens/ERC721Token/IERC721Receiver.sol";
|
||||
|
||||
|
||||
contract DummyERC721Receiver is
|
||||
IERC721Receiver
|
||||
{
|
||||
|
@@ -22,6 +22,7 @@ pragma experimental ABIEncoderV2;
|
||||
import "../../tokens/ERC721Token/ERC721Token.sol";
|
||||
import "../../utils/Ownable/Ownable.sol";
|
||||
|
||||
|
||||
contract DummyERC721Token is
|
||||
Ownable,
|
||||
ERC721Token
|
||||
|
@@ -22,9 +22,11 @@ pragma experimental ABIEncoderV2;
|
||||
import "../../protocol/Exchange/interfaces/IExchange.sol";
|
||||
import "../../protocol/Exchange/libs/LibOrder.sol";
|
||||
|
||||
|
||||
contract ExchangeWrapper {
|
||||
|
||||
// Exchange contract.
|
||||
// solhint-disable-next-line var-name-mixedcase
|
||||
IExchange EXCHANGE;
|
||||
|
||||
constructor (address _exchange)
|
||||
|
@@ -22,6 +22,7 @@ pragma experimental ABIEncoderV2;
|
||||
import "../../tokens/UnlimitedAllowanceToken/UnlimitedAllowanceToken.sol";
|
||||
import "../../utils/SafeMath/SafeMath.sol";
|
||||
|
||||
|
||||
/*
|
||||
* Mintable
|
||||
* Base contract that creates a mintable UnlimitedAllowanceToken
|
||||
|
@@ -21,6 +21,7 @@ pragma experimental ABIEncoderV2;
|
||||
|
||||
import "../../protocol/Exchange/MixinAssetProxyDispatcher.sol";
|
||||
|
||||
|
||||
contract TestAssetProxyDispatcher is MixinAssetProxyDispatcher {
|
||||
function publicDispatchTransferFrom(
|
||||
bytes memory assetData,
|
||||
|
@@ -20,6 +20,7 @@ pragma solidity ^0.4.24;
|
||||
|
||||
import "../../protocol/AssetProxyOwner/AssetProxyOwner.sol";
|
||||
|
||||
|
||||
contract TestAssetProxyOwner is
|
||||
AssetProxyOwner
|
||||
{
|
||||
|
@@ -21,6 +21,7 @@ pragma experimental ABIEncoderV2;
|
||||
|
||||
import "../../utils/LibBytes/LibBytes.sol";
|
||||
|
||||
|
||||
contract TestLibBytes {
|
||||
|
||||
using LibBytes for bytes;
|
||||
|
@@ -23,6 +23,7 @@ import "../../protocol/Exchange/libs/LibMath.sol";
|
||||
import "../../protocol/Exchange/libs/LibOrder.sol";
|
||||
import "../../protocol/Exchange/libs/LibFillResults.sol";
|
||||
|
||||
|
||||
contract TestLibs is
|
||||
LibMath,
|
||||
LibOrder,
|
||||
|
@@ -22,6 +22,7 @@ pragma experimental ABIEncoderV2;
|
||||
import "../../protocol/Exchange/MixinSignatureValidator.sol";
|
||||
import "../../protocol/Exchange/MixinTransactions.sol";
|
||||
|
||||
|
||||
contract TestSignatureValidator is
|
||||
MixinSignatureValidator,
|
||||
MixinTransactions
|
||||
|
@@ -20,11 +20,13 @@ pragma solidity ^0.4.24;
|
||||
|
||||
import "../../protocol/Exchange/interfaces/IValidator.sol";
|
||||
|
||||
|
||||
contract TestValidator is
|
||||
IValidator
|
||||
{
|
||||
|
||||
// The single valid signer for this wallet.
|
||||
// solhint-disable-next-line var-name-mixedcase
|
||||
address VALID_SIGNER;
|
||||
|
||||
/// @dev constructs a new `TestValidator` with a single valid signer.
|
||||
|
@@ -21,6 +21,7 @@ pragma solidity ^0.4.24;
|
||||
import "../../protocol/Exchange/interfaces/IWallet.sol";
|
||||
import "../../utils/LibBytes/LibBytes.sol";
|
||||
|
||||
|
||||
contract TestWallet is
|
||||
IWallet
|
||||
{
|
||||
@@ -29,6 +30,7 @@ contract TestWallet is
|
||||
string constant LENGTH_65_REQUIRED = "LENGTH_65_REQUIRED";
|
||||
|
||||
// The owner of this wallet.
|
||||
// solhint-disable-next-line var-name-mixedcase
|
||||
address WALLET_OWNER;
|
||||
|
||||
/// @dev constructs a new `TestWallet` with a single owner.
|
||||
|
@@ -23,6 +23,7 @@ import "../../protocol/Exchange/interfaces/IExchange.sol";
|
||||
import "../../protocol/Exchange/libs/LibOrder.sol";
|
||||
import "../../utils/Ownable/Ownable.sol";
|
||||
|
||||
|
||||
contract Whitelist is
|
||||
Ownable
|
||||
{
|
||||
@@ -35,15 +36,19 @@ contract Whitelist is
|
||||
mapping (address => bool) public isWhitelisted;
|
||||
|
||||
// Exchange contract.
|
||||
// solhint-disable-next-line var-name-mixedcase
|
||||
IExchange EXCHANGE;
|
||||
|
||||
byte constant VALIDATOR_SIGNATURE_BYTE = "\x06";
|
||||
// solhint-disable-next-line var-name-mixedcase
|
||||
bytes TX_ORIGIN_SIGNATURE;
|
||||
|
||||
constructor (address _exchange)
|
||||
public
|
||||
{
|
||||
// solhint-disable-next-line var-name-mixedcase
|
||||
EXCHANGE = IExchange(_exchange);
|
||||
// solhint-disable-next-line var-name-mixedcase
|
||||
TX_ORIGIN_SIGNATURE = abi.encodePacked(address(this), VALIDATOR_SIGNATURE_BYTE);
|
||||
}
|
||||
|
||||
|
@@ -21,6 +21,7 @@ pragma experimental ABIEncoderV2;
|
||||
|
||||
import "./IERC20Token.sol";
|
||||
|
||||
|
||||
contract ERC20Token is IERC20Token {
|
||||
|
||||
string constant INSUFFICIENT_BALANCE = "ERC20_INSUFFICIENT_BALANCE";
|
||||
|
@@ -19,6 +19,7 @@
|
||||
pragma solidity ^0.4.24;
|
||||
pragma experimental ABIEncoderV2;
|
||||
|
||||
|
||||
contract IERC20Token {
|
||||
|
||||
/// @notice send `value` token to `to` from `msg.sender`
|
||||
|
@@ -29,6 +29,7 @@ import "./IERC721Token.sol";
|
||||
import "./IERC721Receiver.sol";
|
||||
import "../../utils/SafeMath/SafeMath.sol";
|
||||
|
||||
|
||||
/**
|
||||
* @title ERC721 Non-Fungible Token Standard basic implementation
|
||||
* @dev see https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md
|
||||
|
@@ -25,6 +25,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
pragma solidity ^0.4.24;
|
||||
|
||||
|
||||
/**
|
||||
* @title ERC721 token receiver interface
|
||||
* @dev Interface for any contract that wants to support safeTransfers
|
||||
|
@@ -25,6 +25,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
pragma solidity ^0.4.24;
|
||||
|
||||
|
||||
/**
|
||||
* @title ERC721 Non-Fungible Token Standard basic interface
|
||||
* @dev see https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md
|
||||
|
@@ -21,6 +21,7 @@ pragma experimental ABIEncoderV2;
|
||||
|
||||
import "../ERC20Token/ERC20Token.sol";
|
||||
|
||||
|
||||
contract UnlimitedAllowanceToken is ERC20Token {
|
||||
|
||||
uint256 constant MAX_UINT = 2**256 - 1;
|
||||
|
@@ -15,6 +15,7 @@
|
||||
|
||||
pragma solidity ^0.4.18;
|
||||
|
||||
|
||||
contract WETH9 {
|
||||
string public name = "Wrapped Ether";
|
||||
string public symbol = "WETH";
|
||||
|
@@ -20,6 +20,8 @@ pragma solidity ^0.4.11;
|
||||
|
||||
import { UnlimitedAllowanceToken_v1 as UnlimitedAllowanceToken } from "../../../1.0.0/UnlimitedAllowanceToken/UnlimitedAllowanceToken_v1.sol";
|
||||
|
||||
|
||||
|
||||
contract ZRXToken is UnlimitedAllowanceToken {
|
||||
|
||||
uint8 constant public decimals = 18;
|
||||
|
@@ -18,6 +18,7 @@
|
||||
|
||||
pragma solidity ^0.4.24;
|
||||
|
||||
|
||||
library LibBytes {
|
||||
|
||||
using LibBytes for bytes;
|
||||
|
@@ -10,6 +10,7 @@ pragma experimental ABIEncoderV2;
|
||||
|
||||
import "./IOwnable.sol";
|
||||
|
||||
|
||||
contract Ownable is IOwnable {
|
||||
address public owner;
|
||||
|
||||
|
@@ -1,6 +1,7 @@
|
||||
pragma solidity ^0.4.24;
|
||||
pragma experimental ABIEncoderV2;
|
||||
|
||||
|
||||
contract SafeMath {
|
||||
function safeMul(uint a, uint b)
|
||||
internal
|
||||
|
Reference in New Issue
Block a user