Contract 0x8d8812b72d1e4ffCeC158D25f56748b7d67c1e78

 
 
Txn Hash
Method
Block
From
To
Value
0x488789751f4c1634eb7fdd1209c2c1c8ac128ec22ecb715b36a68067352b08c8Submit Ring76709402019-04-30 20:37:431306 days 6 hrs ago0x5552dcfba48c94544beaaf26470df9898e050ac2 IN  Loopring: Old Contract0 Ether0.00164584.95
0xbfb866c0f45cc76fe4111178ebe7f0b1dc99d927c7b007e1ff4f8fac42bd8538Submit Ring76629032019-04-29 14:35:531307 days 12 hrs ago0x5552dcfba48c94544beaaf26470df9898e050ac2 IN  Loopring: Old Contract0 Ether0.001721954.95
0x91c1df5d0a1f3b7a229b52084010e3f5bca82a89de10194257678e2b2fdeb0bdSubmit Ring76286742019-04-24 6:50:581312 days 19 hrs ago0x5552dcfba48c94544beaaf26470df9898e050ac2 IN  Loopring: Old Contract0 Ether0.002792347.6909474
0x72d3eebca52311b94dca63741e8d8b12f967c207ad775f95ac38f568ba80e044Submit Ring76148492019-04-22 3:03:411314 days 23 hrs ago0x5552dcfba48c94544beaaf26470df9898e050ac2 IN  Loopring: Old Contract0 Ether0.0050402813.85981575
0xdbb581e72165460a0a83fc078b82248521bd566eb6079e282dbc5786cb3e122dSubmit Ring75586922019-04-13 9:08:271323 days 17 hrs ago0xceffcd35b1aa65327f6686d54f575c48a64f4d66 IN  Loopring: Old Contract0 Ether0.0009762613
0x14e36fc9a2878ee62f67ecdd14ecc0ed22e89bd5c2d92681c6925598c6014ebdSubmit Ring74623342019-03-29 8:29:271338 days 18 hrs ago0x5552dcfba48c94544beaaf26470df9898e050ac2 IN  Loopring: Old Contract0 Ether0.002024515.92395461
0x929bc50df3edcac23727571206096805903242a682810c6508e8a70523df9998Cancel Order74104462019-03-21 5:59:391346 days 20 hrs ago0x9ea134edf277c83224c27f842fda14d67090352c IN  Loopring: Old Contract0 Ether0.0019160421
0xfc3a3d8c57eb2310f97602b9585cfad20021830f0265645e7310550ae2ea290aCancel Order74104252019-03-21 5:55:261346 days 20 hrs ago0x9ea134edf277c83224c27f842fda14d67090352c IN  Loopring: Old Contract0 Ether0.0012833521
0x22d21c5c17eaba33f68c0d5e0b4aa72ff98142ee7220a68d386505c7291ae978Cancel Order74104232019-03-21 5:54:531346 days 20 hrs ago0x9ea134edf277c83224c27f842fda14d67090352c IN  Loopring: Old Contract0 Ether0.0019133521
0xc17327f702bcef1b9f55de42e5c34c3e6e4805e9449201837722d0bca759dd9bSubmit Ring72771462019-02-28 3:36:491367 days 23 hrs ago0x5552dcfba48c94544beaaf26470df9898e050ac2 IN  Loopring: Old Contract0 Ether0.0064990116.36853525
0x0befc92dee8d553b898f03de9a0ff14218aa66c0ae83de351ba904d4e4b0ba54Submit Ring72771432019-02-28 3:35:531367 days 23 hrs ago0x5552dcfba48c94544beaaf26470df9898e050ac2 IN  Loopring: Old Contract0 Ether0.0063697816.1654585
0xd175ca362aceaa30562b2d9b58284e297c990dccd74fee1a93e58480b907ee01Submit Ring72771392019-02-28 3:33:291367 days 23 hrs ago0x5552dcfba48c94544beaaf26470df9898e050ac2 IN  Loopring: Old Contract0 Ether0.0062637115.89627299
0x93953a239c8c3412bfaef0450247cdcb6494f4708565ca73f29d126099751a22Submit Ring72771372019-02-28 3:32:481367 days 23 hrs ago0x5552dcfba48c94544beaaf26470df9898e050ac2 IN  Loopring: Old Contract0 Ether0.0067702317.18172022
0x06e3338c16c9df464661070fe35580ee43c1a5cb363e2d17275fa789f52696d1Submit Ring72762392019-02-27 22:31:401368 days 4 hrs ago0x5552dcfba48c94544beaaf26470df9898e050ac2 IN  Loopring: Old Contract0 Ether0.003250468.1866771
0x19ae204c072b1d307eb0e22e7d1d947b3056a1d2e56f06c7618a490b96655e17Submit Ring72762372019-02-27 22:31:231368 days 4 hrs ago0x5552dcfba48c94544beaaf26470df9898e050ac2 IN  Loopring: Old Contract0 Ether0.00329788.36928829
0x49262bc8832cb63d3390daba0ee1989160bc7312663626bea35c1483428ea5c4Submit Ring72762312019-02-27 22:28:321368 days 4 hrs ago0x5552dcfba48c94544beaaf26470df9898e050ac2 IN  Loopring: Old Contract0 Ether0.0039654210.06358619
0x6ee96ef4abb82ea3b6da4bf4c55b39f50f4829c328dad8c7dd27b7bbc46b5cb9Submit Ring72762242019-02-27 22:26:171368 days 4 hrs ago0x5552dcfba48c94544beaaf26470df9898e050ac2 IN  Loopring: Old Contract0 Ether0.0040245810.13639587
0x6469dff0c188bbbec255f4ceee75875203d9f0b1f92b847bb91bfa8510ceaed0Submit Ring72753282019-02-27 17:25:351368 days 9 hrs ago0x5552dcfba48c94544beaaf26470df9898e050ac2 IN  Loopring: Old Contract0 Ether0.004071410.33255704
0x72621a5e729beaf1a8158ec9b5525ab1e4a639ed1a3f239597e58c4e6c9950a9Submit Ring72753142019-02-27 17:20:061368 days 9 hrs ago0x5552dcfba48c94544beaaf26470df9898e050ac2 IN  Loopring: Old Contract0 Ether0.0043484110.95199784
0x22ec80e7e72a4ecc38504e759371073de3e08917e6d691a270cdf00d5b3e43ecSubmit Ring72753092019-02-27 17:19:091368 days 9 hrs ago0x5552dcfba48c94544beaaf26470df9898e050ac2 IN  Loopring: Old Contract0 Ether0.003173768.05447423
0x6525b604cc9b083c35193bdeca985b05e8926e9c88ba24747fff2654850cc353Submit Ring72753042019-02-27 17:17:151368 days 9 hrs ago0x5552dcfba48c94544beaaf26470df9898e050ac2 IN  Loopring: Old Contract0 Ether0.002683486.81023763
0x8007dff567e047c57fbffcd05c80b90ab5aa8a4034f22b2ec1388129eba4c3a0Submit Ring72743752019-02-27 12:13:571368 days 14 hrs ago0x5552dcfba48c94544beaaf26470df9898e050ac2 IN  Loopring: Old Contract0 Ether0.002806617.1227193
0x65bceea6fd59ebe445b25d8212c6d91649f8645c60eee7ff9a0a7c2576e6b2e9Submit Ring72743562019-02-27 12:08:171368 days 14 hrs ago0x5552dcfba48c94544beaaf26470df9898e050ac2 IN  Loopring: Old Contract0 Ether0.002601096.60115384
0xbc4ca157605c14d6a8d326451784f2efe74d07ba7da9b0b74ecbdfc3f7779620Submit Ring72743512019-02-27 12:06:391368 days 14 hrs ago0x5552dcfba48c94544beaaf26470df9898e050ac2 IN  Loopring: Old Contract0 Ether0.002796137.04240211
0x9f14fdc73031724bfb3c8bd1fddfb255a022fa421c50b5d9102a43671deab54bSubmit Ring72743452019-02-27 12:04:241368 days 14 hrs ago0x5552dcfba48c94544beaaf26470df9898e050ac2 IN  Loopring: Old Contract0 Ether0.002938997.45869016
[ Download CSV Export 

OVERVIEW

This is Loopring Protocol's old implementation contract.

 

 

View more zero value Internal Transactions in Advanced View mode
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
LoopringProtocolImpl

Compiler Version
v0.4.21+commit.dfe3193c

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity)

/**
 *Submitted for verification at Etherscan.io on 2018-05-01
*/

/*
  Copyright 2017 Loopring Project Ltd (Loopring Foundation).
  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at
  http://www.apache.org/licenses/LICENSE-2.0
  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
*/
pragma solidity 0.4.21;
/// @title Utility Functions for uint
/// @author Daniel Wang - <[email protected]>
library MathUint {
    function mul(
        uint a,
        uint b
        )
        internal
        pure
        returns (uint c)
    {
        c = a * b;
        require(a == 0 || c / a == b);
    }
    function sub(
        uint a,
        uint b
        )
        internal
        pure
        returns (uint)
    {
        require(b <= a);
        return a - b;
    }
    function add(
        uint a,
        uint b
        )
        internal
        pure
        returns (uint c)
    {
        c = a + b;
        require(c >= a);
    }
    function tolerantSub(
        uint a,
        uint b
        )
        internal
        pure
        returns (uint c)
    {
        return (a >= b) ? a - b : 0;
    }
    /// @dev calculate the square of Coefficient of Variation (CV)
    /// https://en.wikipedia.org/wiki/Coefficient_of_variation
    function cvsquare(
        uint[] arr,
        uint scale
        )
        internal
        pure
        returns (uint)
    {
        uint len = arr.length;
        require(len > 1);
        require(scale > 0);
        uint avg = 0;
        for (uint i = 0; i < len; i++) {
            avg = add(avg, arr[i]);
        }
        avg = avg / len;
        if (avg == 0) {
            return 0;
        }
        uint cvs = 0;
        uint s;
        uint item;
        for (i = 0; i < len; i++) {
            item = arr[i];
            s = item > avg ? item - avg : avg - item;
            cvs = add(cvs, mul(s, s));
        }
        return ((mul(mul(cvs, scale), scale) / avg) / avg) / (len - 1);
    }
}
/*
  Copyright 2017 Loopring Project Ltd (Loopring Foundation).
  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at
  http://www.apache.org/licenses/LICENSE-2.0
  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
*/
/// @title Utility Functions for address
/// @author Daniel Wang - <[email protected]>
library AddressUtil {
    function isContract(
        address addr
        )
        internal
        view
        returns (bool)
    {
        if (addr == 0x0) {
            return false;
        } else {
            uint size;
            assembly { size := extcodesize(addr) }
            return size > 0;
        }
    }
}
/*
  Copyright 2017 Loopring Project Ltd (Loopring Foundation).
  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at
  http://www.apache.org/licenses/LICENSE-2.0
  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
*/
/*
  Copyright 2017 Loopring Project Ltd (Loopring Foundation).
  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at
  http://www.apache.org/licenses/LICENSE-2.0
  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
*/
/// @title ERC20 Token Interface
/// @dev see https://github.com/ethereum/EIPs/issues/20
/// @author Daniel Wang - <[email protected]>
contract ERC20 {
    function balanceOf(
        address who
        )
        view
        public
        returns (uint256);
    function allowance(
        address owner,
        address spender
        )
        view
        public
        returns (uint256);
    function transfer(
        address to,
        uint256 value
        )
        public
        returns (bool);
    function transferFrom(
        address from,
        address to,
        uint256 value
        )
        public
        returns (bool);
    function approve(
        address spender,
        uint256 value
        )
        public
        returns (bool);
}
/*
  Copyright 2017 Loopring Project Ltd (Loopring Foundation).
  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at
  http://www.apache.org/licenses/LICENSE-2.0
  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
*/
/// @title Loopring Token Exchange Protocol Contract Interface
/// @author Daniel Wang - <[email protected]>
/// @author Kongliang Zhong - <[email protected]>
contract LoopringProtocol {
    uint8   public constant MARGIN_SPLIT_PERCENTAGE_BASE = 100;
    /// @dev Event to emit if a ring is successfully mined.
    /// _amountsList is an array of:
    /// [_amountS, _amountB, _lrcReward, _lrcFee, splitS, splitB].
    event RingMined(
        uint            _ringIndex,
        bytes32 indexed _ringHash,
        address         _miner,
        address         _feeRecipient,
        bytes32[]       _orderInfoList
    );
    event OrderCancelled(
        bytes32 indexed _orderHash,
        uint            _amountCancelled
    );
    event AllOrdersCancelled(
        address indexed _address,
        uint            _cutoff
    );
    event OrdersCancelled(
        address indexed _address,
        address         _token1,
        address         _token2,
        uint            _cutoff
    );
    /// @dev Cancel a order. cancel amount(amountS or amountB) can be specified
    ///      in orderValues.
    /// @param addresses          owner, tokenS, tokenB, wallet, authAddr
    /// @param orderValues        amountS, amountB, validSince (second),
    ///                           validUntil (second), lrcFee, and cancelAmount.
    /// @param buyNoMoreThanAmountB -
    ///                           This indicates when a order should be considered
    ///                           as 'completely filled'.
    /// @param marginSplitPercentage -
    ///                           Percentage of margin split to share with miner.
    /// @param v                  Order ECDSA signature parameter v.
    /// @param r                  Order ECDSA signature parameters r.
    /// @param s                  Order ECDSA signature parameters s.
    function cancelOrder(
        address[5] addresses,
        uint[6]    orderValues,
        bool       buyNoMoreThanAmountB,
        uint8      marginSplitPercentage,
        uint8      v,
        bytes32    r,
        bytes32    s
        )
        external;
    /// @dev   Set a cutoff timestamp to invalidate all orders whose timestamp
    ///        is smaller than or equal to the new value of the address's cutoff
    ///        timestamp, for a specific trading pair.
    /// @param cutoff The cutoff timestamp, will default to `block.timestamp`
    ///        if it is 0.
    function cancelAllOrdersByTradingPair(
        address token1,
        address token2,
        uint cutoff
        )
        external;
    /// @dev   Set a cutoff timestamp to invalidate all orders whose timestamp
    ///        is smaller than or equal to the new value of the address's cutoff
    ///        timestamp.
    /// @param cutoff The cutoff timestamp, will default to `block.timestamp`
    ///        if it is 0.
    function cancelAllOrders(
        uint cutoff
        )
        external;
    /// @dev Submit a order-ring for validation and settlement.
    /// @param addressList  List of each order's owner, tokenS, wallet, authAddr.
    ///                     Note that next order's `tokenS` equals this order's
    ///                     `tokenB`.
    /// @param uintArgsList List of uint-type arguments in this order:
    ///                     amountS, amountB, validSince (second),
    ///                     validUntil (second), lrcFee, and rateAmountS.
    /// @param uint8ArgsList -
    ///                     List of unit8-type arguments, in this order:
    ///                     marginSplitPercentageList.
    /// @param buyNoMoreThanAmountBList -
    ///                     This indicates when a order should be considered
    /// @param vList        List of v for each order. This list is 1-larger than
    ///                     the previous lists, with the last element being the
    ///                     v value of the ring signature.
    /// @param rList        List of r for each order. This list is 1-larger than
    ///                     the previous lists, with the last element being the
    ///                     r value of the ring signature.
    /// @param sList        List of s for each order. This list is 1-larger than
    ///                     the previous lists, with the last element being the
    ///                     s value of the ring signature.
    /// @param feeRecipient Miner address.
    /// @param feeSelections -
    ///                     Bits to indicate fee selections. `1` represents margin
    ///                     split and `0` represents LRC as fee.
    function submitRing(
        address[4][]    addressList,
        uint[6][]       uintArgsList,
        uint8[1][]      uint8ArgsList,
        bool[]          buyNoMoreThanAmountBList,
        uint8[]         vList,
        bytes32[]       rList,
        bytes32[]       sList,
        address         feeRecipient,
        uint16          feeSelections
        )
        public;
}
/*
  Copyright 2017 Loopring Project Ltd (Loopring Foundation).
  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at
  http://www.apache.org/licenses/LICENSE-2.0
  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
*/
/// @title Token Register Contract
/// @dev This contract maintains a list of tokens the Protocol supports.
/// @author Kongliang Zhong - <[email protected]>,
/// @author Daniel Wang - <[email protected]>.
contract TokenRegistry {
    event TokenRegistered(
        address indexed addr,
        string          symbol
    );
    event TokenUnregistered(
        address indexed addr,
        string          symbol
    );
    function registerToken(
        address addr,
        string  symbol
        )
        external;
    function unregisterToken(
        address addr,
        string  symbol
        )
        external;
    function areAllTokensRegistered(
        address[] addressList
        )
        external
        view
        returns (bool);
    function getAddressBySymbol(
        string symbol
        )
        external
        view
        returns (address);
    function isTokenRegisteredBySymbol(
        string symbol
        )
        public
        view
        returns (bool);
    function isTokenRegistered(
        address addr
        )
        public
        view
        returns (bool);
    function getTokens(
        uint start,
        uint count
        )
        public
        view
        returns (address[] addressList);
}
/*
  Copyright 2017 Loopring Project Ltd (Loopring Foundation).
  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at
  http://www.apache.org/licenses/LICENSE-2.0
  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
*/
/// @title TokenTransferDelegate
/// @dev Acts as a middle man to transfer ERC20 tokens on behalf of different
/// versions of Loopring protocol to avoid ERC20 re-authorization.
/// @author Daniel Wang - <[email protected]>.
contract TokenTransferDelegate {
    event AddressAuthorized(
        address indexed addr,
        uint32          number
    );
    event AddressDeauthorized(
        address indexed addr,
        uint32          number
    );
    // The following map is used to keep trace of order fill and cancellation
    // history.
    mapping (bytes32 => uint) public cancelledOrFilled;
    // This map is used to keep trace of order's cancellation history.
    mapping (bytes32 => uint) public cancelled;
    // A map from address to its cutoff timestamp.
    mapping (address => uint) public cutoffs;
    // A map from address to its trading-pair cutoff timestamp.
    mapping (address => mapping (bytes20 => uint)) public tradingPairCutoffs;
    /// @dev Add a Loopring protocol address.
    /// @param addr A loopring protocol address.
    function authorizeAddress(
        address addr
        )
        external;
    /// @dev Remove a Loopring protocol address.
    /// @param addr A loopring protocol address.
    function deauthorizeAddress(
        address addr
        )
        external;
    function getLatestAuthorizedAddresses(
        uint max
        )
        external
        view
        returns (address[] addresses);
    /// @dev Invoke ERC20 transferFrom method.
    /// @param token Address of token to transfer.
    /// @param from Address to transfer token from.
    /// @param to Address to transfer token to.
    /// @param value Amount of token to transfer.
    function transferToken(
        address token,
        address from,
        address to,
        uint    value
        )
        external;
    function batchTransferToken(
        address lrcTokenAddress,
        address miner,
        address minerFeeRecipient,
        uint8 walletSplitPercentage,
        bytes32[] batch
        )
        external;
    function isAddressAuthorized(
        address addr
        )
        public
        view
        returns (bool);
    function addCancelled(bytes32 orderHash, uint cancelAmount)
        external;
    function addCancelledOrFilled(bytes32 orderHash, uint cancelOrFillAmount)
        public;
    function batchAddCancelledOrFilled(bytes32[] batch)
        public;
    function setCutoffs(uint t)
        external;
    function setTradingPairCutoffs(bytes20 tokenPair, uint t)
        external;
    function checkCutoffsBatch(address[] owners, bytes20[] tradingPairs, uint[] validSince)
        external
        view;
    function suspend() external;
    function resume() external;
    function kill() external;
}
/// @title An Implementation of LoopringProtocol.
/// @author Daniel Wang - <[email protected]>,
/// @author Kongliang Zhong - <[email protected]>
///
/// Recognized contributing developers from the community:
///     https://github.com/Brechtpd
///     https://github.com/rainydio
///     https://github.com/BenjaminPrice
///     https://github.com/jonasshen
///     https://github.com/Hephyrius
contract LoopringProtocolImpl is LoopringProtocol {
    using AddressUtil   for address;
    using MathUint      for uint;
    address public constant lrcTokenAddress             = 0xEF68e7C694F40c8202821eDF525dE3782458639f;
    address public constant tokenRegistryAddress        = 0xAbe12e3548fDb334D11fcc962c413d91Ef12233F;
    address public constant delegateAddress             = 0x17233e07c67d086464fD408148c3ABB56245FA64;
    uint64  public  ringIndex                   = 0;
    uint8   public constant walletSplitPercentage       = 20;
    // Exchange rate (rate) is the amount to sell or sold divided by the amount
    // to buy or bought.
    //
    // Rate ratio is the ratio between executed rate and an order's original
    // rate.
    //
    // To require all orders' rate ratios to have coefficient ofvariation (CV)
    // smaller than 2.5%, for an example , rateRatioCVSThreshold should be:
    //     `(0.025 * RATE_RATIO_SCALE)^2` or 62500.
    uint    public constant rateRatioCVSThreshold        = 62500;
    uint    public constant MAX_RING_SIZE       = 16;
    uint    public constant RATE_RATIO_SCALE    = 10000;
    /// @param orderHash    The order's hash
    /// @param feeSelection -
    ///                     A miner-supplied value indicating if LRC (value = 0)
    ///                     or margin split is choosen by the miner (value = 1).
    ///                     We may support more fee model in the future.
    /// @param rateS        Sell Exchange rate provided by miner.
    /// @param rateB        Buy Exchange rate provided by miner.
    /// @param fillAmountS  Amount of tokenS to sell, calculated by protocol.
    /// @param lrcReward    The amount of LRC paid by miner to order owner in
    ///                     exchange for margin split.
    /// @param lrcFeeState  The amount of LR paid by order owner to miner.
    /// @param splitS      TokenS paid to miner.
    /// @param splitB      TokenB paid to miner.
    struct OrderState {
        address owner;
        address tokenS;
        address tokenB;
        address wallet;
        address authAddr;
        uint    validSince;
        uint    validUntil;
        uint    amountS;
        uint    amountB;
        uint    lrcFee;
        bool    buyNoMoreThanAmountB;
        bool    marginSplitAsFee;
        bytes32 orderHash;
        uint8   marginSplitPercentage;
        uint    rateS;
        uint    rateB;
        uint    fillAmountS;
        uint    lrcReward;
        uint    lrcFeeState;
        uint    splitS;
        uint    splitB;
    }
    /// @dev A struct to capture parameters passed to submitRing method and
    ///      various of other variables used across the submitRing core logics.
    struct RingParams {
        uint8[]       vList;
        bytes32[]     rList;
        bytes32[]     sList;
        address       feeRecipient;
        uint16        feeSelections;
        uint          ringSize;         // computed
        bytes32       ringHash;         // computed
    }
    /// @dev Disable default function.
    function ()
        payable
        public
    {
        revert();
    }
    function cancelOrder(
        address[5] addresses,
        uint[6]    orderValues,
        bool       buyNoMoreThanAmountB,
        uint8      marginSplitPercentage,
        uint8      v,
        bytes32    r,
        bytes32    s
        )
        external
    {
        uint cancelAmount = orderValues[5];
        require(cancelAmount > 0); // "amount to cancel is zero");
        OrderState memory order = OrderState(
            addresses[0],
            addresses[1],
            addresses[2],
            addresses[3],
            addresses[4],
            orderValues[2],
            orderValues[3],
            orderValues[0],
            orderValues[1],
            orderValues[4],
            buyNoMoreThanAmountB,
            false,
            0x0,
            marginSplitPercentage,
            0,
            0,
            0,
            0,
            0,
            0,
            0
        );
        require(msg.sender == order.owner); // "cancelOrder not submitted by order owner");
        bytes32 orderHash = calculateOrderHash(order);
        verifySignature(
            order.owner,
            orderHash,
            v,
            r,
            s
        );
        TokenTransferDelegate delegate = TokenTransferDelegate(delegateAddress);
        delegate.addCancelled(orderHash, cancelAmount);
        delegate.addCancelledOrFilled(orderHash, cancelAmount);
        emit OrderCancelled(orderHash, cancelAmount);
    }
    function cancelAllOrdersByTradingPair(
        address token1,
        address token2,
        uint    cutoff
        )
        external
    {
        uint t = (cutoff == 0 || cutoff >= block.timestamp) ? block.timestamp : cutoff;
        bytes20 tokenPair = bytes20(token1) ^ bytes20(token2);
        TokenTransferDelegate delegate = TokenTransferDelegate(delegateAddress);
        require(delegate.tradingPairCutoffs(msg.sender, tokenPair) < t);
        // "attempted to set cutoff to a smaller value"
        delegate.setTradingPairCutoffs(tokenPair, t);
        emit OrdersCancelled(
            msg.sender,
            token1,
            token2,
            t
        );
    }
    function cancelAllOrders(
        uint cutoff
        )
        external
    {
        uint t = (cutoff == 0 || cutoff >= block.timestamp) ? block.timestamp : cutoff;
        TokenTransferDelegate delegate = TokenTransferDelegate(delegateAddress);
        require(delegate.cutoffs(msg.sender) < t); // "attempted to set cutoff to a smaller value"
        delegate.setCutoffs(t);
        emit AllOrdersCancelled(msg.sender, t);
    }
    function submitRing(
        address[4][]  addressList,
        uint[6][]     uintArgsList,
        uint8[1][]    uint8ArgsList,
        bool[]        buyNoMoreThanAmountBList,
        uint8[]       vList,
        bytes32[]     rList,
        bytes32[]     sList,
        address       feeRecipient,
        uint16        feeSelections
        )
        public
    {
        // Check if the highest bit of ringIndex is '1'.
        require((ringIndex >> 63) == 0); // "attempted to re-ent submitRing function");
        // Set the highest bit of ringIndex to '1'.
        uint64 _ringIndex = ringIndex;
        ringIndex |= (1 << 63);
        RingParams memory params = RingParams(
            vList,
            rList,
            sList,
            feeRecipient,
            feeSelections,
            addressList.length,
            0x0 // ringHash
        );
        verifyInputDataIntegrity(
            params,
            addressList,
            uintArgsList,
            uint8ArgsList,
            buyNoMoreThanAmountBList
        );
        // Assemble input data into structs so we can pass them to other functions.
        // This method also calculates ringHash, therefore it must be called before
        // calling `verifyRingSignatures`.
        TokenTransferDelegate delegate = TokenTransferDelegate(delegateAddress);
        OrderState[] memory orders = assembleOrders(
            params,
            delegate,
            addressList,
            uintArgsList,
            uint8ArgsList,
            buyNoMoreThanAmountBList
        );
        verifyRingSignatures(params, orders);
        verifyTokensRegistered(params, orders);
        handleRing(_ringIndex, params, orders, delegate);
        ringIndex = _ringIndex + 1;
    }
    /// @dev Validate a ring.
    function verifyRingHasNoSubRing(
        uint          ringSize,
        OrderState[]  orders
        )
        private
        pure
    {
        // Check the ring has no sub-ring.
        for (uint i = 0; i < ringSize - 1; i++) {
            address tokenS = orders[i].tokenS;
            for (uint j = i + 1; j < ringSize; j++) {
                require(tokenS != orders[j].tokenS); // "found sub-ring");
            }
        }
    }
    /// @dev Verify the ringHash has been signed with each order's auth private
    ///      keys as well as the miner's private key.
    function verifyRingSignatures(
        RingParams params,
        OrderState[] orders
        )
        private
        pure
    {
        uint j;
        for (uint i = 0; i < params.ringSize; i++) {
            j = i + params.ringSize;
            verifySignature(
                orders[i].authAddr,
                params.ringHash,
                params.vList[j],
                params.rList[j],
                params.sList[j]
            );
        }
    }
    function verifyTokensRegistered(
        RingParams params,
        OrderState[] orders
        )
        private
        view
    {
        // Extract the token addresses
        address[] memory tokens = new address[](params.ringSize);
        for (uint i = 0; i < params.ringSize; i++) {
            tokens[i] = orders[i].tokenS;
        }
        // Test all token addresses at once
        require(
            TokenRegistry(tokenRegistryAddress).areAllTokensRegistered(tokens)
        ); // "token not registered");
    }
    function handleRing(
        uint64       _ringIndex,
        RingParams   params,
        OrderState[] orders,
        TokenTransferDelegate delegate
        )
        private
    {
        address _lrcTokenAddress = lrcTokenAddress;
        // Do the hard work.
        verifyRingHasNoSubRing(params.ringSize, orders);
        // Exchange rates calculation are performed by ring-miners as solidity
        // cannot get power-of-1/n operation, therefore we have to verify
        // these rates are correct.
        verifyMinerSuppliedFillRates(params.ringSize, orders);
        // Scale down each order independently by substracting amount-filled and
        // amount-cancelled. Order owner's current balance and allowance are
        // not taken into consideration in these operations.
        scaleRingBasedOnHistoricalRecords(delegate, params.ringSize, orders);
        // Based on the already verified exchange rate provided by ring-miners,
        // we can furthur scale down orders based on token balance and allowance,
        // then find the smallest order of the ring, then calculate each order's
        // `fillAmountS`.
        calculateRingFillAmount(params.ringSize, orders);
        // Calculate each order's `lrcFee` and `lrcRewrard` and splict how much
        // of `fillAmountS` shall be paid to matching order or miner as margin
        // split.
        calculateRingFees(
            delegate,
            params.ringSize,
            orders,
            _lrcTokenAddress
        );
        /// Make transfers.
        bytes32[] memory orderInfoList = settleRing(
            delegate,
            params.ringSize,
            orders,
            params.feeRecipient,
            _lrcTokenAddress
        );
        emit RingMined(
            _ringIndex,
            params.ringHash,
            tx.origin,
            params.feeRecipient,
            orderInfoList
        );
    }
    function settleRing(
        TokenTransferDelegate delegate,
        uint          ringSize,
        OrderState[]  orders,
        address       feeRecipient,
        address       _lrcTokenAddress
        )
        private
        returns (bytes32[] memory orderInfoList)
    {
        bytes32[] memory batch = new bytes32[](ringSize * 7); // ringSize * (owner + tokenS + 4 amounts + wallet)
        bytes32[] memory historyBatch = new bytes32[](ringSize * 2); // ringSize * (orderhash, fillAmount)
        orderInfoList = new bytes32[](ringSize * 7);
        uint p = 0;
        uint q = 0;
        uint r = 0;
        uint prevSplitB = orders[ringSize - 1].splitB;
        for (uint i = 0; i < ringSize; i++) {
            OrderState memory state = orders[i];
            uint nextFillAmountS = orders[(i + 1) % ringSize].fillAmountS;
            // Store owner and tokenS of every order
            batch[p++] = bytes32(state.owner);
            batch[p++] = bytes32(state.tokenS);
            // Store all amounts
            batch[p++] = bytes32(state.fillAmountS.sub(prevSplitB));
            batch[p++] = bytes32(prevSplitB.add(state.splitS));
            batch[p++] = bytes32(state.lrcReward);
            batch[p++] = bytes32(state.lrcFeeState);
            batch[p++] = bytes32(state.wallet);
            historyBatch[r++] = state.orderHash;
            historyBatch[r++] = bytes32(
                state.buyNoMoreThanAmountB ? nextFillAmountS : state.fillAmountS);
            orderInfoList[q++] = bytes32(state.orderHash);
            orderInfoList[q++] = bytes32(state.owner);
            orderInfoList[q++] = bytes32(state.tokenS);
            orderInfoList[q++] = bytes32(state.fillAmountS);
            orderInfoList[q++] = bytes32(state.lrcReward);
            orderInfoList[q++] = bytes32(
                state.lrcFeeState > 0 ? int(state.lrcFeeState) : -int(state.lrcReward)
            );
            orderInfoList[q++] = bytes32(
                state.splitS > 0 ? int(state.splitS) : -int(state.splitB)
            );
            prevSplitB = state.splitB;
        }
        // Update fill records
        delegate.batchAddCancelledOrFilled(historyBatch);
        // Do all transactions
        delegate.batchTransferToken(
            _lrcTokenAddress,
            tx.origin,
            feeRecipient,
            walletSplitPercentage,
            batch
        );
    }
    /// @dev Verify miner has calculte the rates correctly.
    function verifyMinerSuppliedFillRates(
        uint         ringSize,
        OrderState[] orders
        )
        private
        pure
    {
        uint[] memory rateRatios = new uint[](ringSize);
        uint _rateRatioScale = RATE_RATIO_SCALE;
        for (uint i = 0; i < ringSize; i++) {
            uint s1b0 = orders[i].rateS.mul(orders[i].amountB);
            uint s0b1 = orders[i].amountS.mul(orders[i].rateB);
            require(s1b0 <= s0b1); // "miner supplied exchange rate provides invalid discount");
            rateRatios[i] = _rateRatioScale.mul(s1b0) / s0b1;
        }
        uint cvs = MathUint.cvsquare(rateRatios, _rateRatioScale);
        require(cvs <= rateRatioCVSThreshold);
        // "miner supplied exchange rate is not evenly discounted");
    }
    /// @dev Calculate each order's fee or LRC reward.
    function calculateRingFees(
        TokenTransferDelegate delegate,
        uint            ringSize,
        OrderState[]    orders,
        address         _lrcTokenAddress
        )
        private
        view
    {
        bool checkedMinerLrcSpendable = false;
        uint minerLrcSpendable = 0;
        uint8 _marginSplitPercentageBase = MARGIN_SPLIT_PERCENTAGE_BASE;
        uint nextFillAmountS;
        for (uint i = 0; i < ringSize; i++) {
            OrderState memory state = orders[i];
            uint lrcReceiable = 0;
            if (state.lrcFeeState == 0) {
                // When an order's LRC fee is 0 or smaller than the specified fee,
                // we help miner automatically select margin-split.
                state.marginSplitAsFee = true;
                state.marginSplitPercentage = _marginSplitPercentageBase;
            } else {
                uint lrcSpendable = getSpendable(
                    delegate,
                    _lrcTokenAddress,
                    state.owner
                );
                // If the order is selling LRC, we need to calculate how much LRC
                // is left that can be used as fee.
                if (state.tokenS == _lrcTokenAddress) {
                    lrcSpendable = lrcSpendable.sub(state.fillAmountS);
                }
                // If the order is buyign LRC, it will has more to pay as fee.
                if (state.tokenB == _lrcTokenAddress) {
                    nextFillAmountS = orders[(i + 1) % ringSize].fillAmountS;
                    lrcReceiable = nextFillAmountS;
                }
                uint lrcTotal = lrcSpendable.add(lrcReceiable);
                // If order doesn't have enough LRC, set margin split to 100%.
                if (lrcTotal < state.lrcFeeState) {
                    state.lrcFeeState = lrcTotal;
                    state.marginSplitPercentage = _marginSplitPercentageBase;
                }
                if (state.lrcFeeState == 0) {
                    state.marginSplitAsFee = true;
                }
            }
            if (!state.marginSplitAsFee) {
                if (lrcReceiable > 0) {
                    if (lrcReceiable >= state.lrcFeeState) {
                        state.splitB = state.lrcFeeState;
                        state.lrcFeeState = 0;
                    } else {
                        state.splitB = lrcReceiable;
                        state.lrcFeeState = state.lrcFeeState.sub(lrcReceiable);
                    }
                }
            } else {
                // Only check the available miner balance when absolutely needed
                if (!checkedMinerLrcSpendable && minerLrcSpendable < state.lrcFeeState) {
                    checkedMinerLrcSpendable = true;
                    minerLrcSpendable = getSpendable(delegate, _lrcTokenAddress, tx.origin);
                }
                // Only calculate split when miner has enough LRC;
                // otherwise all splits are 0.
                if (minerLrcSpendable >= state.lrcFeeState) {
                    nextFillAmountS = orders[(i + 1) % ringSize].fillAmountS;
                    uint split;
                    if (state.buyNoMoreThanAmountB) {
                        split = (nextFillAmountS.mul(
                            state.amountS
                        ) / state.amountB).sub(
                            state.fillAmountS
                        );
                    } else {
                        split = nextFillAmountS.sub(
                            state.fillAmountS.mul(
                                state.amountB
                            ) / state.amountS
                        );
                    }
                    if (state.marginSplitPercentage != _marginSplitPercentageBase) {
                        split = split.mul(
                            state.marginSplitPercentage
                        ) / _marginSplitPercentageBase;
                    }
                    if (state.buyNoMoreThanAmountB) {
                        state.splitS = split;
                    } else {
                        state.splitB = split;
                    }
                    // This implicits order with smaller index in the ring will
                    // be paid LRC reward first, so the orders in the ring does
                    // mater.
                    if (split > 0) {
                        minerLrcSpendable = minerLrcSpendable.sub(state.lrcFeeState);
                        state.lrcReward = state.lrcFeeState;
                    }
                }
                state.lrcFeeState = 0;
            }
        }
    }
    /// @dev Calculate each order's fill amount.
    function calculateRingFillAmount(
        uint          ringSize,
        OrderState[]  orders
        )
        private
        pure
    {
        uint smallestIdx = 0;
        uint i;
        uint j;
        for (i = 0; i < ringSize; i++) {
            j = (i + 1) % ringSize;
            smallestIdx = calculateOrderFillAmount(
                orders[i],
                orders[j],
                i,
                j,
                smallestIdx
            );
        }
        for (i = 0; i < smallestIdx; i++) {
            calculateOrderFillAmount(
                orders[i],
                orders[(i + 1) % ringSize],
                0,               // Not needed
                0,               // Not needed
                0                // Not needed
            );
        }
    }
    /// @return The smallest order's index.
    function calculateOrderFillAmount(
        OrderState state,
        OrderState next,
        uint       i,
        uint       j,
        uint       smallestIdx
        )
        private
        pure
        returns (uint newSmallestIdx)
    {
        // Default to the same smallest index
        newSmallestIdx = smallestIdx;
        uint fillAmountB = state.fillAmountS.mul(
            state.rateB
        ) / state.rateS;
        if (state.buyNoMoreThanAmountB) {
            if (fillAmountB > state.amountB) {
                fillAmountB = state.amountB;
                state.fillAmountS = fillAmountB.mul(
                    state.rateS
                ) / state.rateB;
                require(state.fillAmountS > 0);
                newSmallestIdx = i;
            }
            state.lrcFeeState = state.lrcFee.mul(
                fillAmountB
            ) / state.amountB;
        } else {
            state.lrcFeeState = state.lrcFee.mul(
                state.fillAmountS
            ) / state.amountS;
        }
        if (fillAmountB <= next.fillAmountS) {
            next.fillAmountS = fillAmountB;
        } else {
            newSmallestIdx = j;
        }
    }
    /// @dev Scale down all orders based on historical fill or cancellation
    ///      stats but key the order's original exchange rate.
    function scaleRingBasedOnHistoricalRecords(
        TokenTransferDelegate delegate,
        uint ringSize,
        OrderState[] orders
        )
        private
        view
    {
        for (uint i = 0; i < ringSize; i++) {
            OrderState memory state = orders[i];
            uint amount;
            if (state.buyNoMoreThanAmountB) {
                amount = state.amountB.tolerantSub(
                    delegate.cancelledOrFilled(state.orderHash)
                );
                state.amountS = amount.mul(state.amountS) / state.amountB;
                state.lrcFee = amount.mul(state.lrcFee) / state.amountB;
                state.amountB = amount;
            } else {
                amount = state.amountS.tolerantSub(
                    delegate.cancelledOrFilled(state.orderHash)
                );
                state.amountB = amount.mul(state.amountB) / state.amountS;
                state.lrcFee = amount.mul(state.lrcFee) / state.amountS;
                state.amountS = amount;
            }
            require(state.amountS > 0); // "amountS is zero");
            require(state.amountB > 0); // "amountB is zero");
            uint availableAmountS = getSpendable(delegate, state.tokenS, state.owner);
            require(availableAmountS > 0); // "order spendable amountS is zero");
            state.fillAmountS = (
                state.amountS < availableAmountS ?
                state.amountS : availableAmountS
            );
            require(state.fillAmountS > 0);
        }
    }
    /// @return Amount of ERC20 token that can be spent by this contract.
    function getSpendable(
        TokenTransferDelegate delegate,
        address tokenAddress,
        address tokenOwner
        )
        private
        view
        returns (uint)
    {
        ERC20 token = ERC20(tokenAddress);
        uint allowance = token.allowance(
            tokenOwner,
            address(delegate)
        );
        uint balance = token.balanceOf(tokenOwner);
        return (allowance < balance ? allowance : balance);
    }
    /// @dev verify input data's basic integrity.
    function verifyInputDataIntegrity(
        RingParams params,
        address[4][]  addressList,
        uint[6][]     uintArgsList,
        uint8[1][]    uint8ArgsList,
        bool[]        buyNoMoreThanAmountBList
        )
        private
        pure
    {
        require(params.feeRecipient != 0x0);
        require(params.ringSize == addressList.length);
        require(params.ringSize == uintArgsList.length);
        require(params.ringSize == uint8ArgsList.length);
        require(params.ringSize == buyNoMoreThanAmountBList.length);
        // Validate ring-mining related arguments.
        for (uint i = 0; i < params.ringSize; i++) {
            require(uintArgsList[i][5] > 0); // "order rateAmountS is zero");
        }
        //Check ring size
        require(params.ringSize > 1 && params.ringSize <= MAX_RING_SIZE); // "invalid ring size");
        uint sigSize = params.ringSize << 1;
        require(sigSize == params.vList.length);
        require(sigSize == params.rList.length);
        require(sigSize == params.sList.length);
    }
    /// @dev        assmble order parameters into Order struct.
    /// @return     A list of orders.
    function assembleOrders(
        RingParams params,
        TokenTransferDelegate delegate,
        address[4][]  addressList,
        uint[6][]     uintArgsList,
        uint8[1][]    uint8ArgsList,
        bool[]        buyNoMoreThanAmountBList
        )
        private
        view
        returns (OrderState[] memory orders)
    {
        orders = new OrderState[](params.ringSize);
        for (uint i = 0; i < params.ringSize; i++) {
            uint[6] memory uintArgs = uintArgsList[i];
            bool marginSplitAsFee = (params.feeSelections & (uint16(1) << i)) > 0;
            orders[i] = OrderState(
                addressList[i][0],
                addressList[i][1],
                addressList[(i + 1) % params.ringSize][1],
                addressList[i][2],
                addressList[i][3],
                uintArgs[2],
                uintArgs[3],
                uintArgs[0],
                uintArgs[1],
                uintArgs[4],
                buyNoMoreThanAmountBList[i],
                marginSplitAsFee,
                bytes32(0),
                uint8ArgsList[i][0],
                uintArgs[5],
                uintArgs[1],
                0,   // fillAmountS
                0,   // lrcReward
                0,   // lrcFee
                0,   // splitS
                0    // splitB
            );
            validateOrder(orders[i]);
            bytes32 orderHash = calculateOrderHash(orders[i]);
            orders[i].orderHash = orderHash;
            verifySignature(
                orders[i].owner,
                orderHash,
                params.vList[i],
                params.rList[i],
                params.sList[i]
            );
            params.ringHash ^= orderHash;
        }
        validateOrdersCutoffs(orders, delegate);
        params.ringHash = keccak256(
            params.ringHash,
            params.feeRecipient,
            params.feeSelections
        );
    }
    /// @dev validate order's parameters are OK.
    function validateOrder(
        OrderState order
        )
        private
        view
    {
        require(order.owner != 0x0); // invalid order owner
        require(order.tokenS != 0x0); // invalid order tokenS
        require(order.tokenB != 0x0); // invalid order tokenB
        require(order.amountS != 0); // invalid order amountS
        require(order.amountB != 0); // invalid order amountB
        require(order.marginSplitPercentage <= MARGIN_SPLIT_PERCENTAGE_BASE);
        // invalid order marginSplitPercentage
        require(order.validSince <= block.timestamp); // order is too early to match
        require(order.validUntil > block.timestamp); // order is expired
    }
    function validateOrdersCutoffs(OrderState[] orders, TokenTransferDelegate delegate)
        private
        view
    {
        address[] memory owners = new address[](orders.length);
        bytes20[] memory tradingPairs = new bytes20[](orders.length);
        uint[] memory validSinceTimes = new uint[](orders.length);
        for (uint i = 0; i < orders.length; i++) {
            owners[i] = orders[i].owner;
            tradingPairs[i] = bytes20(orders[i].tokenS) ^ bytes20(orders[i].tokenB);
            validSinceTimes[i] = orders[i].validSince;
        }
        delegate.checkCutoffsBatch(owners, tradingPairs, validSinceTimes);
    }
    /// @dev Get the Keccak-256 hash of order with specified parameters.
    function calculateOrderHash(
        OrderState order
        )
        private
        pure
        returns (bytes32)
    {
        return keccak256(
            delegateAddress,
            order.owner,
            order.tokenS,
            order.tokenB,
            order.wallet,
            order.authAddr,
            order.amountS,
            order.amountB,
            order.validSince,
            order.validUntil,
            order.lrcFee,
            order.buyNoMoreThanAmountB,
            order.marginSplitPercentage
        );
    }
    /// @dev Verify signer's signature.
    function verifySignature(
        address signer,
        bytes32 hash,
        uint8   v,
        bytes32 r,
        bytes32 s
        )
        private
        pure
    {
        require(
            signer == ecrecover(
                keccak256("\x19Ethereum Signed Message:\n32", hash),
                v,
                r,
                s
            )
        ); // "invalid signature");
    }
    function getTradingPairCutoffs(
        address orderOwner,
        address token1,
        address token2
        )
        public
        view
        returns (uint)
    {
        bytes20 tokenPair = bytes20(token1) ^ bytes20(token2);
        TokenTransferDelegate delegate = TokenTransferDelegate(delegateAddress);
        return delegate.tradingPairCutoffs(orderOwner, tokenPair);
    }
}

Contract Security Audit

Contract ABI

[{"constant":true,"inputs":[],"name":"MARGIN_SPLIT_PERCENTAGE_BASE","outputs":[{"name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"ringIndex","outputs":[{"name":"","type":"uint64"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"RATE_RATIO_SCALE","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"lrcTokenAddress","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"tokenRegistryAddress","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"delegateAddress","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"orderOwner","type":"address"},{"name":"token1","type":"address"},{"name":"token2","type":"address"}],"name":"getTradingPairCutoffs","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"token1","type":"address"},{"name":"token2","type":"address"},{"name":"cutoff","type":"uint256"}],"name":"cancelAllOrdersByTradingPair","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"addresses","type":"address[5]"},{"name":"orderValues","type":"uint256[6]"},{"name":"buyNoMoreThanAmountB","type":"bool"},{"name":"marginSplitPercentage","type":"uint8"},{"name":"v","type":"uint8"},{"name":"r","type":"bytes32"},{"name":"s","type":"bytes32"}],"name":"cancelOrder","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"MAX_RING_SIZE","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"cutoff","type":"uint256"}],"name":"cancelAllOrders","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"rateRatioCVSThreshold","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"addressList","type":"address[4][]"},{"name":"uintArgsList","type":"uint256[6][]"},{"name":"uint8ArgsList","type":"uint8[1][]"},{"name":"buyNoMoreThanAmountBList","type":"bool[]"},{"name":"vList","type":"uint8[]"},{"name":"rList","type":"bytes32[]"},{"name":"sList","type":"bytes32[]"},{"name":"feeRecipient","type":"address"},{"name":"feeSelections","type":"uint16"}],"name":"submitRing","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"walletSplitPercentage","outputs":[{"name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"payable":true,"stateMutability":"payable","type":"fallback"},{"anonymous":false,"inputs":[{"indexed":false,"name":"_ringIndex","type":"uint256"},{"indexed":true,"name":"_ringHash","type":"bytes32"},{"indexed":false,"name":"_miner","type":"address"},{"indexed":false,"name":"_feeRecipient","type":"address"},{"indexed":false,"name":"_orderInfoList","type":"bytes32[]"}],"name":"RingMined","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_orderHash","type":"bytes32"},{"indexed":false,"name":"_amountCancelled","type":"uint256"}],"name":"OrderCancelled","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_address","type":"address"},{"indexed":false,"name":"_cutoff","type":"uint256"}],"name":"AllOrdersCancelled","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_address","type":"address"},{"indexed":false,"name":"_token1","type":"address"},{"indexed":false,"name":"_token2","type":"address"},{"indexed":false,"name":"_cutoff","type":"uint256"}],"name":"OrdersCancelled","type":"event"}]

60606040526000805467ffffffffffffffff19169055341561002057600080fd5b612ba68061002f6000396000f3006060604052600436106100b65763ffffffff60e060020a6000350416632db237bb81146100bb57806341ffbc1f146100e45780634a63864b146101145780634c0a6532146101395780635be2aca0146101685780636d96a2aa1461017b57806370c55e1f1461018e5780638865cbd6146101b95780638c59f7ca146101e3578063a37641ff14610216578063bd545f5314610229578063df565ca21461023f578063e78aadb214610252578063f829d1a0146104c8575b600080fd5b34156100c657600080fd5b6100ce6104db565b60405160ff909116815260200160405180910390f35b34156100ef57600080fd5b6100f76104e0565b60405167ffffffffffffffff909116815260200160405180910390f35b341561011f57600080fd5b6101276104f0565b60405190815260200160405180910390f35b341561014457600080fd5b61014c6104f6565b604051600160a060020a03909116815260200160405180910390f35b341561017357600080fd5b61014c61050e565b341561018657600080fd5b61014c610526565b341561019957600080fd5b610127600160a060020a036004358116906024358116906044351661053e565b34156101c457600080fd5b6101e1600160a060020a03600435811690602435166044356105e4565b005b34156101ee57600080fd5b6101e1600460a461016435151560ff610184358116906101a435166101c4356101e435610779565b341561022157600080fd5b6101276109ba565b341561023457600080fd5b6101e16004356109bf565b341561024a57600080fd5b610127610af5565b341561025d57600080fd5b6101e160046024813581810190830135806020818102016040519081016040528181529291906000602085015b828210156102c657608080830286019060049060405190810160405291908282608080828437505050918352505060019091019060200161028a565b505050505091908035906020019082018035906020019080806020026020016040519081016040528181529291906000602085015b828210156103375760c08083028601906006906040519081016040529190828260c08082843750505091835250506001909101906020016102fb565b505050505091908035906020019082018035906020019080806020026020016040519081016040528181529291906000602085015b828210156103a857602080830286019060019060405190810160405291908282602080828437505050918352505060019091019060200161036c565b5050505050919080359060200190820180359060200190808060200260200160405190810160405280939291908181526020018383602002808284378201915050505050509190803590602001908201803590602001908080602002602001604051908101604052809392919081815260200183836020028082843782019150505050505091908035906020019082018035906020019080806020026020016040519081016040528093929190818152602001838360200280828437820191505050505050919080359060200190820180359060200190808060200260200160405190810160405280939291908181526020018383602002808284375094965050508335600160a060020a0316936020013561ffff169250610afb915050565b34156104d357600080fd5b6100ce610c30565b606481565b60005467ffffffffffffffff1681565b61271081565b73ef68e7c694f40c8202821edf525de3782458639f81565b73abe12e3548fdb334d11fcc962c413d91ef12233f81565b7317233e07c67d086464fd408148c3abb56245fa6481565b60006c01000000000000000000000000838102908302187317233e07c67d086464fd408148c3abb56245fa648063b8d641a3878460405160e060020a63ffffffff8516028152600160a060020a0390921660048301526bffffffffffffffffffffffff19166024820152604401602060405180830381600087803b15156105c457600080fd5b5af115156105d157600080fd5b5050506040518051979650505050505050565b600080808315806105f55750428410155b6105ff5783610601565b425b925050506c01000000000000000000000000848102908402187317233e07c67d086464fd408148c3abb56245fa64828163b8d641a3338560405160e060020a63ffffffff8516028152600160a060020a0390921660048301526bffffffffffffffffffffffff19166024820152604401602060405180830381600087803b151561068a57600080fd5b5af1151561069757600080fd5b505050604051805190501015156106ad57600080fd5b80600160a060020a0316634b99f0c5838560405160e060020a63ffffffff85160281526bffffffffffffffffffffffff1990921660048301526024820152604401600060405180830381600087803b151561070757600080fd5b5af1151561071457600080fd5b50505033600160a060020a03167fa28167ee3483d28d6ed569bccaba7f8525dae3ee816b82eca0b809b830e8df87878786604051600160a060020a039384168152919092166020820152604080820192909252606001905180910390a2505050505050565b6000610783612a19565b60a0880135915060008080841161079957600080fd5b6102a06040519081016040908152600160a060020a038d35811683526020808f01358216908401528d8201358116918301919091526060808e01358216908301526080808e01359091169082015260a081018b60026020908102919091013582526060808e0135838301528d356040840152908d0135908201526080808d0135908201528a151560a0820152600060c0820181905260e0820181905260ff8b1661010083015261012082018190526101408201819052610160820181905261018082018190526101a082018190526101c082018190526101e09091015292508251600160a060020a031633600160a060020a031614151561089957600080fd5b6108a283610c35565b91506108b2835183898989610d4f565b507317233e07c67d086464fd408148c3abb56245fa648063c955b514838660405160e060020a63ffffffff851602815260048101929092526024820152604401600060405180830381600087803b151561090b57600080fd5b5af1151561091857600080fd5b50505080600160a060020a03166326fed988838660405160e060020a63ffffffff851602815260048101929092526024820152604401600060405180830381600087803b151561096757600080fd5b5af1151561097457600080fd5b508391507f3e1003227205ab9eb9b1652e25b2f6fc548ff55e94bf76a42aca90501c6c4e3590508560405190815260200160405180910390a25050505050505050505050565b601081565b6000808215806109cf5750428310155b6109d957826109db565b425b91507317233e07c67d086464fd408148c3abb56245fa649050818163de794c1e3360405160e060020a63ffffffff8416028152600160a060020a039091166004820152602401602060405180830381600087803b1515610a3a57600080fd5b5af11515610a4757600080fd5b50505060405180519050101515610a5d57600080fd5b80600160a060020a031663fd902d1e8360405160e060020a63ffffffff84160281526004810191909152602401600060405180830381600087803b1515610aa357600080fd5b5af11515610ab057600080fd5b50505033600160a060020a03167f83a782ac7424737a1190d4668474e765f07d603de0485a081dbc343ac1b020998360405190815260200160405180910390a2505050565b61f42481565b6000610b05612af1565b6000610b0f612b41565b60005467800000000000000067ffffffffffffffff918216041615610b3357600080fd5b6000805467ffffffffffffffff19811667ffffffffffffffff918216678000000000000000811790921617909155935060e0604051908101604052808a815260200189815260200188815260200187600160a060020a031681526020018661ffff1681526020018e51815260006020909101529250610bb5838e8e8e8e610e07565b7317233e07c67d086464fd408148c3abb56245fa649150610bda83838f8f8f8f610f17565b9050610be683826112cb565b610bf08382611355565b610bfc8484838561148d565b50506000805467ffffffffffffffff191660019390930167ffffffffffffffff169290921790915550505050505050505050565b601481565b60007317233e07c67d086464fd408148c3abb56245fa64825183602001518460400151856060015186608001518760e001518861010001518960a001518a60c001518b61012001518c61014001518d6101a001516040516c01000000000000000000000000600160a060020a039e8f16810282529c8e168d0260148201529a8d168c0260288c0152988c168b02603c8b0152968b168a0260508a01529490991690970260648701526078860191909152609885015260b884019490945260d883019490945260f88201929092527f0100000000000000000000000000000000000000000000000000000000000000921515830261011882015260ff90911690910261011982015261011a0160405180910390209050919050565b6001846040517f19457468657265756d205369676e6564204d6573736167653a0a3332000000008152601c810191909152603c0160405180910390208484846040516000815260200160405260405193845260ff9092166020808501919091526040808501929092526060840192909252608090920191516020810390808403906000865af11515610de057600080fd5b505060206040510351600160a060020a03868116911614610e0057600080fd5b5050505050565b6000808660600151600160a060020a03161515610e2357600080fd5b85518760a0015114610e3457600080fd5b84518760a0015114610e4557600080fd5b83518760a0015114610e5657600080fd5b82518760a0015114610e6757600080fd5b600091505b8660a00151821015610ea9576000858381518110610e8657fe5b9060200190602002015160a0015111610e9e57600080fd5b600190910190610e6c565b60018760a00151118015610ec2575060108760a0015111155b1515610ecd57600080fd5b60018760a001519060020a0290508660000151518114610eec57600080fd5b8660200151518114610efd57600080fd5b8660400151518114610f0e57600080fd5b50505050505050565b610f1f612b41565b6000610f29612b53565b6000808a60a00151604051805910610f3e5750595b908082528060200260200182016040528015610f7457816020015b610f61612a19565b815260200190600190039081610f595790505b509450600093505b8a60a0015184101561123f57878481518110610f9457fe5b9060200190602002015192506000600285900a60808d01511661ffff161191506102a0604051908101604052808a8681518110610fcd57fe5b9060200190602002015151600160a060020a031681526020018a8681518110610ff257fe5b9060200190602002015160200151600160a060020a031681526020018a8d60a001518760010181151561102157fe5b068151811061102c57fe5b9060200190602002015160200151600160a060020a031681526020018a868151811061105457fe5b9060200190602002015160400151600160a060020a031681526020018a868151811061107c57fe5b9060200190602002015160600151600160a060020a0316815260200160408501518152602001606085015181526020018451815260200184600160200201518152602001608085015181526020018786815181106110d657fe5b906020019060200201511515815283151560208201526000604082015260600188868151811061110257fe5b906020019060200201515160ff16815260200160a085015181526020018460016020020151815260200160008152602001600081526020016000815260200160008152602001600081525085858151811061115957fe5b6020908102909101015261118185858151811061117257fe5b906020019060200201516115c0565b61119f85858151811061119057fe5b90602001906020020151610c35565b9050808585815181106111ae57fe5b9060200190602002015161018001526112288585815181106111cc57fe5b9060200190602002015151828d5187815181106111e557fe5b906020019060200201518e6020015188815181106111ff57fe5b906020019060200201518f60400151898151811061121957fe5b90602001906020020151610d4f565b808b60c00181815118905250600190930192610f7c565b611249858b611663565b8a60c001518b606001518c60800151604051928352600160a060020a03919091166c0100000000000000000000000002602083015261ffff167e0100000000000000000000000000000000000000000000000000000000000002603482015260360160405190819003902060c0909b019a909a52509198975050505050505050565b6000805b8360a0015181101561134f578360a00151810191506113478382815181106112f357fe5b90602001906020020151608001518560c001518651858151811061131357fe5b906020019060200201518760200151868151811061132d57fe5b906020019060200201518860400151878151811061121957fe5b6001016112cf565b50505050565b61135d612b41565b60008360a001516040518059106113715750595b90808252806020026020018201604052509150600090505b8360a001518110156113da578281815181106113a157fe5b90602001906020020151602001518282815181106113bb57fe5b600160a060020a03909216602092830290910190910152600101611389565b73abe12e3548fdb334d11fcc962c413d91ef12233f6316066e69836040518263ffffffff1660e060020a0281526004018080602001828103825283818151815260200191508051906020019060200280838360005b8381101561144757808201518382015260200161142f565b5050505090500192505050602060405180830381600087803b151561146b57600080fd5b5af1151561147857600080fd5b50505060405180519050151561134f57600080fd5b6000611497612b41565b73ef68e7c694f40c8202821edf525de3782458639f91506114bc8560a0015185611908565b6114ca8560a0015185611987565b6114d9838660a0015186611ac5565b6114e78560a0015185611d2e565b6114f7838660a001518685611df0565b61150c838660a0015186886060015186612134565b90508460c001517f4d2a4adf7c5f6cf35d97aecc1919897bf86299dccd9b5e19b2b38ebebf07add0873260608901518560405167ffffffffffffffff85168152600160a060020a0380851660208301528316604082015260806060820181815290820183818151815260200191508051906020019060200280838360005b838110156115a257808201518382015260200161158a565b505050509050019550505050505060405180910390a2505050505050565b8051600160a060020a031615156115d657600080fd5b8060200151600160a060020a031615156115ef57600080fd5b8060400151600160a060020a0316151561160857600080fd5b8060e00151151561161857600080fd5b806101000151151561162957600080fd5b60646101a082015160ff16111561163f57600080fd5b428160a00151111561165057600080fd5b428160c001511161166057600080fd5b50565b61166b612b41565b611673612b41565b61167b612b41565b6000855160405180591061168c5750595b9080825280602002602001820160405250935085516040518059106116ae5750595b9080825280602002602001820160405250925085516040518059106116d05750595b90808252806020026020018201604052509150600090505b85518110156117df578581815181106116fd57fe5b906020019060200201515184828151811061171457fe5b600160a060020a0390921660209283029091019091015285818151811061173757fe5b90602001906020020151604001516c010000000000000000000000000286828151811061176057fe5b90602001906020020151602001516c01000000000000000000000000021883828151811061178a57fe5b6bffffffffffffffffffffffff199092166020928302909101909101528581815181106117b357fe5b9060200190602002015160a001518282815181106117cd57fe5b602090810290910101526001016116e8565b84600160a060020a031662a16cab8585856040518463ffffffff1660e060020a02815260040180806020018060200180602001848103845287818151815260200191508051906020019060200280838360005b8381101561184a578082015183820152602001611832565b50505050905001848103835286818151815260200191508051906020019060200280838360005b83811015611889578082015183820152602001611871565b50505050905001848103825285818151815260200191508051906020019060200280838360005b838110156118c85780820151838201526020016118b0565b505050509050019650505050505050600060405180830381600087803b15156118f057600080fd5b5af115156118fd57600080fd5b505050505050505050565b600080805b60018503831015610e005783838151811061192457fe5b9060200190602002015160200151915050600182015b8481101561197c5783818151811061194e57fe5b9060200190602002015160200151600160a060020a038381169116141561197457600080fd5b60010161193a565b60019092019161190d565b61198f612b41565b6000806000806000876040518059106119a55750595b908082528060200260200182016040525095506127109450600093505b87841015611aa057611a0f8785815181106119d957fe5b9060200190602002015161010001518886815181106119f457fe5b906020019060200201516101c001519063ffffffff61267f16565b9250611a55878581518110611a2057fe5b906020019060200201516101e00151888681518110611a3b57fe5b9060200190602002015160e001519063ffffffff61267f16565b915081831115611a6457600080fd5b81611a75868563ffffffff61267f16565b811515611a7e57fe5b04868581518110611a8b57fe5b602090810290910101526001909301926119c2565b611aaa86866126aa565b905061f424811115611abb57600080fd5b5050505050505050565b6000611acf612a19565b600080600093505b85841015610f0e57848481518110611aeb57fe5b90602001906020020151925082610140015115611bde57611b7987600160a060020a0316635511f31985610180015160405160e060020a63ffffffff84160281526004810191909152602401602060405180830381600087803b1515611b5057600080fd5b5af11515611b5d57600080fd5b505050604051805190508461010001519063ffffffff6127d216565b9150826101000151611b968460e00151849063ffffffff61267f16565b811515611b9f57fe5b0460e0840152610100830151611bc1846101200151849063ffffffff61267f16565b811515611bca57fe5b046101208401526101008301829052611cb4565b611c5487600160a060020a0316635511f31985610180015160405160e060020a63ffffffff84160281526004810191909152602401602060405180830381600087803b1515611c2c57600080fd5b5af11515611c3957600080fd5b505050604051805190508460e001519063ffffffff6127d216565b91508260e00151611c71846101000151849063ffffffff61267f16565b811515611c7a57fe5b0461010084015260e0830151611c9c846101200151849063ffffffff61267f16565b811515611ca557fe5b0461012084015260e083018290525b60008360e0015111611cc557600080fd5b600083610100015111611cd757600080fd5b611ce787846020015185516127ee565b905060008111611cf657600080fd5b808360e0015110611d075780611d0d565b8260e001515b61020084019081526000905111611d2357600080fd5b600190930192611ad7565b600080805b84821015611d90578482600101811515611d4957fe5b069050611d83848381518110611d5b57fe5b90602001906020020151858381518110611d7157fe5b906020019060200201518484876128e1565b9250600190910190611d33565b600091505b82821015610e0057611de4848381518110611dac57fe5b90602001906020020151858785600101811515611dc557fe5b0681518110611dd057fe5b9060200190602002015160008060006128e1565b50600190910190611d95565b6000806000806000611e00612a19565b600080600080600099506000985060649750600095505b8c861015612124578b8681518110611e2b57fe5b906020019060200201519450600093508461024001511515611e5e57600161016086015260ff88166101a0860152611f37565b611e6a8e8c87516127ee565b92508a600160a060020a03168560200151600160a060020a03161415611ea357611ea0856102000151849063ffffffff6129fa16565b92505b8a600160a060020a03168560400151600160a060020a03161415611ef0578b8d87600101811515611ed057fe5b0681518110611edb57fe5b90602001906020020151610200015196508693505b611f00838563ffffffff612a0916565b9150846102400151821015611f2257610240850182905260ff88166101a08601525b8461024001511515611f375760016101608601525b8461016001511515611f9b576000841115611f96578461024001518410611f71578461024001516102808601526000610240860152611f96565b6102808501849052611f8f846102408701519063ffffffff6129fa16565b6102408601525b612119565b89158015611fad575084610240015189105b15611fc45760019950611fc18e8c326127ee565b98505b8461024001518910612110578b8d87600101811515611fdf57fe5b0681518110611fea57fe5b9060200190602002015161020001519650846101400151156120475761204085610200015186610100015161202a8860e001518b9063ffffffff61267f16565b81151561203357fe5b049063ffffffff6129fa16565b9050612085565b6120828560e0015161206a8761010001518861020001519063ffffffff61267f16565b81151561207357fe5b8991900463ffffffff6129fa16565b90505b8760ff16856101a0015160ff16146120c1578760ff166120b4866101a00151839060ff1663ffffffff61267f16565b8115156120bd57fe5b0490505b846101400151156120d95761026085018190526120e2565b61028085018190525b6000811115612110576121018561024001518a9063ffffffff6129fa16565b98508461024001516102208601525b60006102408601525b600190950194611e17565b5050505050505050505050505050565b61213c612b41565b612144612b41565b61214c612b41565b600080600080600061215c612a19565b60008d60070260405180591061216f5750595b908082528060200260200182016040525098508d6002026040518059106121935750595b908082528060200260200182016040525097508d6007026040518059106121b75750595b908082528060200260200182016040525099506000965060009550600094508c60018f03815181106121e557fe5b9060200190602002015161028001519350600092505b8d83101561250c578c838151811061220f57fe5b9060200190602002015191508c8e8460010181151561222a57fe5b068151811061223557fe5b90602001906020020151610200015190508151600160a060020a031660010289888060010199508151811061226657fe5b6020908102909101810191909152820151600160a060020a031660010289888060010199508151811061229557fe5b602090810290910101526122b5846102008401519063ffffffff6129fa16565b60018801978a90815181106122c657fe5b602090810290910101526122e6610260830151859063ffffffff612a0916565b60018801978a90815181106122f757fe5b6020908102909101015261022082015160018801978a908151811061231857fe5b6020908102909101015261024082015160018801978a908151811061233957fe5b602090810290910101526060820151600160a060020a031660010289888060010199508151811061236657fe5b60209081029091010152610180820151600186019589908151811061238757fe5b602090810290910101526101408201516123a6578161020001516123a8565b805b60018601958990815181106123b957fe5b6020908102909101015261018082015160018701968b90815181106123da57fe5b602090810290910101528151600160a060020a03166001028a878060010198508151811061240457fe5b6020908102909101810191909152820151600160a060020a03166001028a878060010198508151811061243357fe5b6020908102909101015261020082015160018701968b908151811061245457fe5b6020908102909101015261022082015160018701968b908151811061247557fe5b6020908102909101015260006102408301511161249a578161022001516000036124a1565b8161024001515b60018701968b90815181106124b257fe5b602090810290910101526000610260830151116124d7578161028001516000036124de565b8161026001515b60018701968b90815181106124ef57fe5b6020908102909101015261028082015193506001909201916121fb565b8e600160a060020a03166373964787896040518263ffffffff1660e060020a0281526004018080602001828103825283818151815260200191508051906020019060200280838360005b8381101561256e578082015183820152602001612556565b5050505090500192505050600060405180830381600087803b151561259257600080fd5b5af1151561259f57600080fd5b5050508e600160a060020a0316634390a4f88c328f60148e60405160e060020a63ffffffff8816028152600160a060020a03808716600483019081528682166024840152908516604483015260ff8416606483015260a060848301908152909160a40183818151815260200191508051906020019060200280838360005b8381101561263557808201518382015260200161261d565b505050509050019650505050505050600060405180830381600087803b151561265d57600080fd5b5af1151561266a57600080fd5b50505050505050505050505095945050505050565b818102821580612699575081838281151561269657fe5b04145b15156126a457600080fd5b92915050565b600080600080600080600088519550600186116126c657600080fd5b600088116126d357600080fd5b60009450600093505b8584101561271057612703858a86815181106126f457fe5b90602001906020020151612a09565b94506001909301926126dc565b858581151561271b57fe5b04945084151561272e57600096506127c6565b60009250600093505b8584101561278c5788848151811061274b57fe5b9060200190602002015190508481116127665780850361276a565b8481035b915061277f8361277a848561267f565b612a09565b6001909401939250612737565b6001860385866127a561279f878d61267f565b8c61267f565b8115156127ae57fe5b048115156127b857fe5b048115156127c257fe5b0496505b50505050505092915050565b6000818310156127e35760006127e7565b8183035b9392505050565b6000828180600160a060020a03831663dd62ed3e868960405160e060020a63ffffffff8516028152600160a060020a03928316600482015291166024820152604401602060405180830381600087803b151561284957600080fd5b5af1151561285657600080fd5b5050506040518051925050600160a060020a0383166370a082318660405160e060020a63ffffffff8416028152600160a060020a039091166004820152602401602060405180830381600087803b15156128af57600080fd5b5af115156128bc57600080fd5b50505060405180519150508082106128d457806128d6565b815b979650505050505050565b8060006101c0870151612905886101e001518961020001519063ffffffff61267f16565b81151561290e57fe5b049050866101400151156129a257866101000151811115612971578661010001519050866101e0015161294d886101c00151839063ffffffff61267f16565b81151561295657fe5b046102008801908152600090511161296d57600080fd5b8491505b86610100015161298d828961012001519063ffffffff61267f16565b81151561299657fe5b046102408801526129d3565b8660e001516129c28861020001518961012001519063ffffffff61267f16565b8115156129cb57fe5b046102408801525b85610200015181116129ec5761020086018190526129f0565b8391505b5095945050505050565b6000828211156127e357600080fd5b818101828110156126a457600080fd5b6102a0604051908101604052806000600160a060020a031681526020016000600160a060020a031681526020016000600160a060020a031681526020016000600160a060020a031681526020016000600160a060020a03168152602001600081526020016000815260200160008152602001600081526020016000815260200160001515815260200160001515815260200160008019168152602001600060ff168152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081525090565b60e060405190810160405280612b05612b41565b8152602001612b12612b41565b8152602001612b1f612b41565b8152600060208201819052604082018190526060820181905260809091015290565b60206040519081016040526000815290565b60c06040519081016040526006815b6000815260200190600190039081612b6257905050905600a165627a7a72305820676652ba6775128bdad4ad0d8124da2e15596385bc71249f17b2db28e4f70c670029

Swarm Source

bzzr://676652ba6775128bdad4ad0d8124da2e15596385bc71249f17b2db28e4f70c67
Block Transaction Difficulty Gas Used Reward
Block Uncle Number Difficulty Gas Used Reward
Loading
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.