Sponsored:   Ubex.com - World roadshow: Seoul Sep 17-19, Singapore Sep 19-20, Dubai 18-23. Meet us!.
 Latest 25 txns From a total of 17130 Transactions

TxHash Age From To Value [TxFee]
0xa61d4f76f7b32af0e1bd30ecd48e7eb006a5e2a27f561dd9c578fc16fc2ef166277 days 9 hrs ago0xc27bc9c79c0f8e3902941b457310fbebfa318416  IN   0x3aa927a97594c3ab7d7bf0d47c71c3877d1de4a10 Ether0.000497805
0x1563638522f4bc3148379eba5dacfcdec57575bb0a2ffe7173f1b9da44b5b353277 days 16 hrs ago0x0ee17833dfcca5693ed0e1d01e2122f361d613ad  IN   0x3aa927a97594c3ab7d7bf0d47c71c3877d1de4a10 Ether0.000078309
0x3b1ee50b8950a2e000a7eb87f941882120560e1af70c585a6164f0a6052abdc5278 days 2 hrs ago0x31b4aab9b8a5fc3b056346a1349d99b430003928  IN   0x3aa927a97594c3ab7d7bf0d47c71c3877d1de4a10 Ether0.001275318
0x6f69b07a9d6c441fd21d92c9b5a3f0b66effa5baa8f3ef52f4288add41622449278 days 4 hrs ago0x00be16b62218aaf6f147d805a047b22d63b2df71  IN   0x3aa927a97594c3ab7d7bf0d47c71c3877d1de4a10 Ether0.001335411
0x67d87fcf76ff8d53b5786b4b5266a9b112aef50453bd306fadef587ccc18ff73278 days 4 hrs ago0x00be16b62218aaf6f147d805a047b22d63b2df71  IN   0x3aa927a97594c3ab7d7bf0d47c71c3877d1de4a10 Ether0.001290408
0x5921386906e7a18a4fcbdcdcbfd034620757e57bc42dd1de7f650b8dc7baa40e278 days 4 hrs ago0x00be16b62218aaf6f147d805a047b22d63b2df71  IN   0x3aa927a97594c3ab7d7bf0d47c71c3877d1de4a10 Ether0.001132908
0xe8ea25d858303621fdda8c978d09122bd51720ac41743143807757147b439e67278 days 4 hrs ago0x00be16b62218aaf6f147d805a047b22d63b2df71  IN   0x3aa927a97594c3ab7d7bf0d47c71c3877d1de4a10 Ether0.001132908
0x510636dd79011e881741753779fbc57c8d435b5802e8982b097ec4bff91c9082278 days 4 hrs ago0x00be16b62218aaf6f147d805a047b22d63b2df71  IN   0x3aa927a97594c3ab7d7bf0d47c71c3877d1de4a10 Ether0.001320984
0xe078678f80c7432fdb837960a52f8d9a74c92a01af2a1f52123004e145703a10278 days 4 hrs ago0x00be16b62218aaf6f147d805a047b22d63b2df71  IN   0x3aa927a97594c3ab7d7bf0d47c71c3877d1de4a10 Ether0.001320984
0xb7b849bc2bf61fdde9d167db62c61eb233e2a4df274a3b827622ef0f7f97bf42278 days 4 hrs ago0x00be16b62218aaf6f147d805a047b22d63b2df71  IN   0x3aa927a97594c3ab7d7bf0d47c71c3877d1de4a10 Ether0.001379133
0xb74044db1881eb9011ea28d98e78ec2a3c8967c786a816051419e3719b1dd94d278 days 4 hrs ago0x00be16b62218aaf6f147d805a047b22d63b2df71  IN   0x3aa927a97594c3ab7d7bf0d47c71c3877d1de4a10 Ether0.001335537
0xa8c989901d567d8f99e08dd5c2e6f1faa6d7ed149f3a6bafd07e6b71dc6923e6278 days 4 hrs ago0x00be16b62218aaf6f147d805a047b22d63b2df71  IN   0x3aa927a97594c3ab7d7bf0d47c71c3877d1de4a10 Ether0.00127596
0xfd8f03b6eb798592a38015bfb13b4529636c6550e15272daf733b50f3fd67335278 days 4 hrs ago0x00be16b62218aaf6f147d805a047b22d63b2df71  IN   0x3aa927a97594c3ab7d7bf0d47c71c3877d1de4a10 Ether0.001379133
0x3d3307cb93c16cd5246e5442d5982bea6b892161a08ba8e86284236627d92b81278 days 4 hrs ago0x00be16b62218aaf6f147d805a047b22d63b2df71  IN   0x3aa927a97594c3ab7d7bf0d47c71c3877d1de4a10 Ether0.001176609
0x064e7149e12aa946026c0c1e6622c993350df4c89791b70df78ca86dbaa465af278 days 4 hrs ago0x00be16b62218aaf6f147d805a047b22d63b2df71  IN   0x3aa927a97594c3ab7d7bf0d47c71c3877d1de4a10 Ether0.001176609
0x056ec1b9c6f0718d9510ef9b7b935ec83b60a44f80be4bb63a3bfaf64cd9d8a6278 days 4 hrs ago0x00be16b62218aaf6f147d805a047b22d63b2df71  IN   0x3aa927a97594c3ab7d7bf0d47c71c3877d1de4a10 Ether0.00111846
0x9d57969233e821ffc7eecff69fbef7cd2e6b34a95594af9fc5119a7c83ae1851278 days 4 hrs ago0x00be16b62218aaf6f147d805a047b22d63b2df71  IN   0x3aa927a97594c3ab7d7bf0d47c71c3877d1de4a10 Ether0.001176609
0x265ab9f74434e3c92a1bf2f77cd530471ee260f1b67a1ae0d793bfdf6058feff278 days 4 hrs ago0x00be16b62218aaf6f147d805a047b22d63b2df71  IN   0x3aa927a97594c3ab7d7bf0d47c71c3877d1de4a10 Ether0.001290408
0xb64b2c2a84f0c0d2634fa54eb3102fe756971a68eea1b8933a5559a9680a22d2278 days 4 hrs ago0x00be16b62218aaf6f147d805a047b22d63b2df71  IN   0x3aa927a97594c3ab7d7bf0d47c71c3877d1de4a10 Ether0.001536633
0x520bbf431aab7da5b03a6e74d4458f2137d78bc8c8c7ee08a15ffbef86c950cb278 days 4 hrs ago0x00be16b62218aaf6f147d805a047b22d63b2df71  IN   0x3aa927a97594c3ab7d7bf0d47c71c3877d1de4a10 Ether0.00116361
0x4a1499672aa7ff9052b149b258efade165a22832cd589c544b6a15fe4d4ee4ae278 days 4 hrs ago0x00be16b62218aaf6f147d805a047b22d63b2df71  IN   0x3aa927a97594c3ab7d7bf0d47c71c3877d1de4a10 Ether0.00116361
0x0361cbd5b544fca634c81ff0684422eeb9b797f2ccadc7688679a15acf78f378278 days 4 hrs ago0x00be16b62218aaf6f147d805a047b22d63b2df71  IN   0x3aa927a97594c3ab7d7bf0d47c71c3877d1de4a10 Ether0.001334109
0xc43bd3fb782bfe35daf6372f814fc1b319a4b435a32bda998932bd24d7f31f6d278 days 4 hrs ago0x00be16b62218aaf6f147d805a047b22d63b2df71  IN   0x3aa927a97594c3ab7d7bf0d47c71c3877d1de4a10 Ether0.001176609
0xa80d2fa649b22d74664e8c371feec7e8f2d3ad3bff9853181375c12da302dcec278 days 4 hrs ago0x00be16b62218aaf6f147d805a047b22d63b2df71  IN   0x3aa927a97594c3ab7d7bf0d47c71c3877d1de4a10 Ether0.001379133
0x8489b9c497ac513ddcb22157adf296ea9a2529f5beac0290aad8811f51c4f02d278 days 4 hrs ago0x00be16b62218aaf6f147d805a047b22d63b2df71  IN   0x3aa927a97594c3ab7d7bf0d47c71c3877d1de4a10 Ether0.001176609
[ Download CSV Export  ] 
 Internal Transactions as a result of Contract Execution
View All
ParentTxHash Block Age From To Value
Warning: The Compiled Contract might be susceptible to ExpExponentCleanup (medium/high-severity), NestedArrayFunctionCallDecoder (medium-severity), ZeroFunctionSelector (very low-severity) SolidityCompiler Bugs.

Contract Source Code Verified (Exact Match)
Contract Name: MatchingMarket
Compiler Text: v0.4.15+commit.bbb8e64f
Optimization Enabled: Yes
Runs (Optimiser):  200



  Contract Source Code   Find Similiar Contracts

pragma solidity ^0.4.13;

contract ERC20 {
    function totalSupply() constant returns (uint supply);
    function balanceOf( address who ) constant returns (uint value);
    function allowance( address owner, address spender ) constant returns (uint _allowance);

    function transfer( address to, uint value) returns (bool ok);
    function transferFrom( address from, address to, uint value) returns (bool ok);
    function approve( address spender, uint value ) returns (bool ok);

    event Transfer( address indexed from, address indexed to, uint value);
    event Approval( address indexed owner, address indexed spender, uint value);
}

contract DSMath {
    
    /*
    standard uint256 functions
     */

    function add(uint256 x, uint256 y) constant internal returns (uint256 z) {
        assert((z = x + y) >= x);
    }

    function sub(uint256 x, uint256 y) constant internal returns (uint256 z) {
        assert((z = x - y) <= x);
    }

    function mul(uint256 x, uint256 y) constant internal returns (uint256 z) {
        z = x * y;
        assert(x == 0 || z / x == y);
    }

    function div(uint256 x, uint256 y) constant internal returns (uint256 z) {
        z = x / y;
    }

    function min(uint256 x, uint256 y) constant internal returns (uint256 z) {
        return x <= y ? x : y;
    }
    function max(uint256 x, uint256 y) constant internal returns (uint256 z) {
        return x >= y ? x : y;
    }

    /*
    uint128 functions (h is for half)
     */


    function hadd(uint128 x, uint128 y) constant internal returns (uint128 z) {
        assert((z = x + y) >= x);
    }

    function hsub(uint128 x, uint128 y) constant internal returns (uint128 z) {
        assert((z = x - y) <= x);
    }

    function hmul(uint128 x, uint128 y) constant internal returns (uint128 z) {
        z = x * y;
        assert(x == 0 || z / x == y);
    }

    function hdiv(uint128 x, uint128 y) constant internal returns (uint128 z) {
        z = x / y;
    }

    function hmin(uint128 x, uint128 y) constant internal returns (uint128 z) {
        return x <= y ? x : y;
    }
    function hmax(uint128 x, uint128 y) constant internal returns (uint128 z) {
        return x >= y ? x : y;
    }


    /*
    int256 functions
     */

    function imin(int256 x, int256 y) constant internal returns (int256 z) {
        return x <= y ? x : y;
    }
    function imax(int256 x, int256 y) constant internal returns (int256 z) {
        return x >= y ? x : y;
    }

    /*
    WAD math
     */

    uint128 constant WAD = 10 ** 18;

    function wadd(uint128 x, uint128 y) constant internal returns (uint128) {
        return hadd(x, y);
    }

    function wsub(uint128 x, uint128 y) constant internal returns (uint128) {
        return hsub(x, y);
    }

    function wmul(uint128 x, uint128 y) constant internal returns (uint128 z) {
        z = cast((uint256(x) * y + WAD / 2) / WAD);
    }

    function wdiv(uint128 x, uint128 y) constant internal returns (uint128 z) {
        z = cast((uint256(x) * WAD + y / 2) / y);
    }

    function wmin(uint128 x, uint128 y) constant internal returns (uint128) {
        return hmin(x, y);
    }
    function wmax(uint128 x, uint128 y) constant internal returns (uint128) {
        return hmax(x, y);
    }

    /*
    RAY math
     */

    uint128 constant RAY = 10 ** 27;

    function radd(uint128 x, uint128 y) constant internal returns (uint128) {
        return hadd(x, y);
    }

    function rsub(uint128 x, uint128 y) constant internal returns (uint128) {
        return hsub(x, y);
    }

    function rmul(uint128 x, uint128 y) constant internal returns (uint128 z) {
        z = cast((uint256(x) * y + RAY / 2) / RAY);
    }

    function rdiv(uint128 x, uint128 y) constant internal returns (uint128 z) {
        z = cast((uint256(x) * RAY + y / 2) / y);
    }

    function rpow(uint128 x, uint64 n) constant internal returns (uint128 z) {
        // This famous algorithm is called "exponentiation by squaring"
        // and calculates x^n with x as fixed-point and n as regular unsigned.
        //
        // It's O(log n), instead of O(n) for naive repeated multiplication.
        //
        // These facts are why it works:
        //
        //  If n is even, then x^n = (x^2)^(n/2).
        //  If n is odd,  then x^n = x * x^(n-1),
        //   and applying the equation for even x gives
        //    x^n = x * (x^2)^((n-1) / 2).
        //
        //  Also, EVM division is flooring and
        //    floor[(n-1) / 2] = floor[n / 2].

        z = n % 2 != 0 ? x : RAY;

        for (n /= 2; n != 0; n /= 2) {
            x = rmul(x, x);

            if (n % 2 != 0) {
                z = rmul(z, x);
            }
        }
    }

    function rmin(uint128 x, uint128 y) constant internal returns (uint128) {
        return hmin(x, y);
    }
    function rmax(uint128 x, uint128 y) constant internal returns (uint128) {
        return hmax(x, y);
    }

    function cast(uint256 x) constant internal returns (uint128 z) {
        assert((z = uint128(x)) == x);
    }

}

contract DSNote {
    event LogNote(
        bytes4   indexed  sig,
        address  indexed  guy,
        bytes32  indexed  foo,
        bytes32  indexed  bar,
        uint              wad,
        bytes             fax
    ) anonymous;

    modifier note {
        bytes32 foo;
        bytes32 bar;

        assembly {
            foo := calldataload(4)
            bar := calldataload(36)
        }

        LogNote(msg.sig, msg.sender, foo, bar, msg.value, msg.data);

        _;
    }
}

contract DSAuthority {
    function canCall(
        address src, address dst, bytes4 sig
    ) constant returns (bool);
}

contract DSAuthEvents {
    event LogSetAuthority (address indexed authority);
    event LogSetOwner     (address indexed owner);
}

contract DSAuth is DSAuthEvents {
    DSAuthority  public  authority;
    address      public  owner;

    function DSAuth() {
        owner = msg.sender;
        LogSetOwner(msg.sender);
    }

    function setOwner(address owner_)
        auth
    {
        owner = owner_;
        LogSetOwner(owner);
    }

    function setAuthority(DSAuthority authority_)
        auth
    {
        authority = authority_;
        LogSetAuthority(authority);
    }

    modifier auth {
        assert(isAuthorized(msg.sender, msg.sig));
        _;
    }

    function isAuthorized(address src, bytes4 sig) internal returns (bool) {
        if (src == address(this)) {
            return true;
        } else if (src == owner) {
            return true;
        } else if (authority == DSAuthority(0)) {
            return false;
        } else {
            return authority.canCall(src, this, sig);
        }
    }

    function assert(bool x) internal {
        if (!x) revert();
    }
}

contract EventfulMarket {
    event LogItemUpdate(uint id);
    event LogTrade(uint pay_amt, address indexed pay_gem,
                   uint buy_amt, address indexed buy_gem);

    event LogMake(
        bytes32  indexed  id,
        bytes32  indexed  pair,
        address  indexed  maker,
        ERC20             pay_gem,
        ERC20             buy_gem,
        uint128           pay_amt,
        uint128           buy_amt,
        uint64            timestamp
    );

    event LogBump(
        bytes32  indexed  id,
        bytes32  indexed  pair,
        address  indexed  maker,
        ERC20             pay_gem,
        ERC20             buy_gem,
        uint128           pay_amt,
        uint128           buy_amt,
        uint64            timestamp
    );

    event LogTake(
        bytes32           id,
        bytes32  indexed  pair,
        address  indexed  maker,
        ERC20             pay_gem,
        ERC20             buy_gem,
        address  indexed  taker,
        uint128           take_amt,
        uint128           give_amt,
        uint64            timestamp
    );

    event LogKill(
        bytes32  indexed  id,
        bytes32  indexed  pair,
        address  indexed  maker,
        ERC20             pay_gem,
        ERC20             buy_gem,
        uint128           pay_amt,
        uint128           buy_amt,
        uint64            timestamp
    );
}

contract SimpleMarket is EventfulMarket, DSMath {

    uint public last_offer_id;

    mapping (uint => OfferInfo) public offers;

    bool locked;

    struct OfferInfo {
        uint     pay_amt;
        ERC20    pay_gem;
        uint     buy_amt;
        ERC20    buy_gem;
        address  owner;
        bool     active;
        uint64   timestamp;
    }

    modifier can_buy(uint id) {
        require(isActive(id));
        _;
    }

    modifier can_cancel(uint id) {
        require(isActive(id));
        require(getOwner(id) == msg.sender);
        _;
    }

    modifier can_offer {
        _;
    }

    modifier synchronized {
        assert(!locked);
        locked = true;
        _;
        locked = false;
    }

    function isActive(uint id) constant returns (bool active) {
        return offers[id].active;
    }

    function getOwner(uint id) constant returns (address owner) {
        return offers[id].owner;
    }

    function getOffer(uint id) constant returns (uint, ERC20, uint, ERC20) {
      var offer = offers[id];
      return (offer.pay_amt, offer.pay_gem,
              offer.buy_amt, offer.buy_gem);
    }

    // ---- Public entrypoints ---- //

    function bump(bytes32 id_)
        can_buy(uint256(id_))
    {
        var id = uint256(id_);
        LogBump(
            id_,
            sha3(offers[id].pay_gem, offers[id].buy_gem),
            offers[id].owner,
            offers[id].pay_gem,
            offers[id].buy_gem,
            uint128(offers[id].pay_amt),
            uint128(offers[id].buy_amt),
            offers[id].timestamp
        );
    }

    // Accept given `quantity` of an offer. Transfers funds from caller to
    // offer maker, and from market to caller.
    function buy(uint id, uint quantity)
        can_buy(id)
        synchronized
        returns (bool)
    {
        OfferInfo memory offer = offers[id];
        uint spend = mul(quantity, offer.buy_amt) / offer.pay_amt;

        require(uint128(spend) == spend);
        require(uint128(quantity) == quantity);

        // For backwards semantic compatibility.
        if (quantity == 0 || spend == 0 ||
            quantity > offer.pay_amt || spend > offer.buy_amt)
        {
            return false;
        }

        offers[id].pay_amt = sub(offer.pay_amt, quantity);
        offers[id].buy_amt = sub(offer.buy_amt, spend);
        assert( offer.buy_gem.transferFrom(msg.sender, offer.owner, spend) );
        assert( offer.pay_gem.transfer(msg.sender, quantity) );

        LogItemUpdate(id);
        LogTake(
            bytes32(id),
            sha3(offer.pay_gem, offer.buy_gem),
            offer.owner,
            offer.pay_gem,
            offer.buy_gem,
            msg.sender,
            uint128(quantity),
            uint128(spend),
            uint64(now)
        );
        LogTrade(quantity, offer.pay_gem, spend, offer.buy_gem);

        if (offers[id].pay_amt == 0) {
          delete offers[id];
        }

        return true;
    }

    // Cancel an offer. Refunds offer maker.
    function cancel(uint id)
        can_cancel(id)
        synchronized
        returns (bool success)
    {
        // read-only offer. Modify an offer by directly accessing offers[id]
        OfferInfo memory offer = offers[id];
        delete offers[id];

        assert( offer.pay_gem.transfer(offer.owner, offer.pay_amt) );

        LogItemUpdate(id);
        LogKill(
            bytes32(id),
            sha3(offer.pay_gem, offer.buy_gem),
            offer.owner,
            offer.pay_gem,
            offer.buy_gem,
            uint128(offer.pay_amt),
            uint128(offer.buy_amt),
            uint64(now)
        );

        success = true;
    }

    function kill(bytes32 id) {
        assert(cancel(uint256(id)));
    }

    function make(
        ERC20    pay_gem,
        ERC20    buy_gem,
        uint128  pay_amt,
        uint128  buy_amt
    ) returns (bytes32 id) {
        return bytes32(offer(pay_amt, pay_gem, buy_amt, buy_gem));
    }

    // Make a new offer. Takes funds from the caller into market escrow.
    function offer(uint pay_amt, ERC20 pay_gem, uint buy_amt, ERC20 buy_gem)
        can_offer
        synchronized
        returns (uint id)
    {
        require(uint128(pay_amt) == pay_amt);
        require(uint128(buy_amt) == buy_amt);
        require(pay_amt > 0);
        require(pay_gem != ERC20(0x0));
        require(buy_amt > 0);
        require(buy_gem != ERC20(0x0));
        require(pay_gem != buy_gem);

        OfferInfo memory info;
        info.pay_amt = pay_amt;
        info.pay_gem = pay_gem;
        info.buy_amt = buy_amt;
        info.buy_gem = buy_gem;
        info.owner = msg.sender;
        info.active = true;
        info.timestamp = uint64(now);
        id = _next_id();
        offers[id] = info;

        assert( pay_gem.transferFrom(msg.sender, this, pay_amt) );

        LogItemUpdate(id);
        LogMake(
            bytes32(id),
            sha3(pay_gem, buy_gem),
            msg.sender,
            pay_gem,
            buy_gem,
            uint128(pay_amt),
            uint128(buy_amt),
            uint64(now)
        );
    }

    function take(bytes32 id, uint128 maxTakeAmount) {
        assert(buy(uint256(id), maxTakeAmount));
    }

    function _next_id() internal returns (uint) {
        last_offer_id++; return last_offer_id;
    }
}

// Simple Market with a market lifetime. When the close_time has been reached,
// offers can only be cancelled (offer and buy will throw).
contract ExpiringMarket is DSAuth, SimpleMarket {
    uint64 public close_time;
    bool public stopped;

    // after close_time has been reached, no new offers are allowed
    modifier can_offer {
        assert(!isClosed());
        _;
    }

    // after close, no new buys are allowed
    modifier can_buy(uint id) {
        require(isActive(id));
        require(!isClosed());
        _;
    }

    // after close, anyone can cancel an offer
    modifier can_cancel(uint id) {
        require(isActive(id));
        require(isClosed() || (msg.sender == getOwner(id)));
        _;
    }

    function ExpiringMarket(uint64 _close_time) {
        close_time = _close_time;
    }

    function isClosed() constant returns (bool closed) {
        return stopped || getTime() > close_time;
    }

    function getTime() returns (uint64) {
        return uint64(now);
    }

    function stop() auth {
        stopped = true;
    }
}

contract MatchingEvents {
    event LogBuyEnabled(bool isEnabled);
    event LogMinSell(address pay_gem, uint min_amount);
    event LogMatchingEnabled(bool isEnabled);
    event LogUnsortedOffer(uint id);
    event LogSortedOffer(uint id);
    event LogAddTokenPairWhitelist(ERC20 baseToken, ERC20 quoteToken);
    event LogRemTokenPairWhitelist(ERC20 baseToken, ERC20 quoteToken);
}

contract MatchingMarket is MatchingEvents, ExpiringMarket, DSNote {
    bool public buyEnabled = true;      //buy enabled
    bool public matchingEnabled = true; //true: enable matching,
                                         //false: revert to expiring market
    struct sortInfo {
        uint next;  //points to id of next higher offer
        uint prev;  //points to id of previous lower offer
    }
    mapping(uint => sortInfo) public _rank;                     //doubly linked lists of sorted offer ids
    mapping(address => mapping(address => uint)) public _best;  //id of the highest offer for a token pair
    mapping(address => mapping(address => uint)) public _span;  //number of offers stored for token pair in sorted orderbook
    mapping(address => uint) public _dust;                      //minimum sell amount for a token to avoid dust offers
    mapping(uint => uint) public _near;         //next unsorted offer id
    mapping(bytes32 => bool) public _menu;      //whitelist tracking which token pairs can be traded
    uint _head;                                 //first unsorted offer id

    //check if token pair is enabled
    modifier isWhitelist(ERC20 buy_gem, ERC20 pay_gem) {
        require(_menu[sha3(buy_gem, pay_gem)] || _menu[sha3(pay_gem, buy_gem)]);
        _;
    }

    function MatchingMarket(uint64 close_time) ExpiringMarket(close_time) {
    }

    // ---- Public entrypoints ---- //

    function make(
        ERC20    pay_gem,
        ERC20    buy_gem,
        uint128  pay_amt,
        uint128  buy_amt
    )
    returns (bytes32) {
        return bytes32(offer(pay_amt, pay_gem, buy_amt, buy_gem));
    }

    function take(bytes32 id, uint128 maxTakeAmount) {
        assert(buy(uint256(id), maxTakeAmount));
    }

    function kill(bytes32 id) {
        assert(cancel(uint256(id)));
    }

    // Make a new offer. Takes funds from the caller into market escrow.
    //
    // If matching is enabled:
    //     * creates new offer without putting it in
    //       the sorted list.
    //     * available to authorized contracts only!
    //     * keepers should call insert(id,pos)
    //       to put offer in the sorted list.
    //
    // If matching is disabled:
    //     * calls expiring market's offer().
    //     * available to everyone without authorization.
    //     * no sorting is done.
    //
    function offer(
        uint pay_amt,    //maker (ask) sell how much
        ERC20 pay_gem,   //maker (ask) sell which token
        uint buy_amt,    //taker (ask) buy how much
        ERC20 buy_gem    //taker (ask) buy which token
    )
    isWhitelist(pay_gem, buy_gem)
    /* NOT synchronized!!! */
    returns (uint)
    {
        var fn = matchingEnabled ? _offeru : super.offer;
        return fn(pay_amt, pay_gem, buy_amt, buy_gem);
    }

    // Make a new offer. Takes funds from the caller into market escrow.
    function offer(
        uint pay_amt,    //maker (ask) sell how much
        ERC20 pay_gem,   //maker (ask) sell which token
        uint buy_amt,    //maker (ask) buy how much
        ERC20 buy_gem,   //maker (ask) buy which token
        uint pos         //position to insert offer, 0 should be used if unknown
    )
    isWhitelist(pay_gem, buy_gem)
    /*NOT synchronized!!! */
    can_offer
    returns (uint)
    {
        return offer(pay_amt, pay_gem, buy_amt, buy_gem, pos, false);
    }

    function offer(
        uint pay_amt,    //maker (ask) sell how much
        ERC20 pay_gem,   //maker (ask) sell which token
        uint buy_amt,    //maker (ask) buy how much
        ERC20 buy_gem,   //maker (ask) buy which token
        uint pos,        //position to insert offer, 0 should be used if unknown
        bool rounding    //match "close enough" orders?
    )
    isWhitelist(pay_gem, buy_gem)
    /*NOT synchronized!!! */
    can_offer
    returns (uint)
    {
        require(_dust[pay_gem] <= pay_amt);

        if (matchingEnabled) {
          return _matcho(pay_amt, pay_gem, buy_amt, buy_gem, pos, rounding);
        }
        return super.offer(pay_amt, pay_gem, buy_amt, buy_gem);
    }

    //Transfers funds from caller to offer maker, and from market to caller.
    function buy(uint id, uint amount)
    /*NOT synchronized!!! */
    can_buy(id)
    returns (bool)
    {
        var fn = matchingEnabled ? _buys : super.buy;
        return fn(id, amount);
    }

    // Cancel an offer. Refunds offer maker.
    function cancel(uint id)
    /*NOT synchronized!!! */
    can_cancel(id)
    returns (bool success)
    {
        if (matchingEnabled) {
            if (isOfferSorted(id)) {
                assert(_unsort(id));
            } else {
                assert(_hide(id));
            }
        }
        return super.cancel(id);    //delete the offer.
    }

    //insert offer into the sorted list
    //keepers need to use this function
    function insert(
        uint id,   //maker (ask) id
        uint pos   //position to insert into
    )
    returns (bool)
    {
        address buy_gem = address(offers[id].buy_gem);
        address pay_gem = address(offers[id].pay_gem);

        require(!isOfferSorted(id));    //make sure offers[id] is not yet sorted
        require(isActive(id));          //make sure offers[id] is active
        require(pos == 0 || isActive(pos));

        require(_hide(id));             //remove offer from unsorted offers list
        _sort(id, pos);                 //put offer into the sorted offers list
        return true;
    }

    //returns true if token is succesfully added to whitelist
    //  Function is used to add a token pair to the whitelist
    //  All incoming offers are checked against the whitelist.
    function addTokenPairWhitelist(
        ERC20 baseToken,
        ERC20 quoteToken
    )
    public
    auth
    note
    returns (bool)
    {
        require(!isTokenPairWhitelisted(baseToken, quoteToken));
        require(address(baseToken) != 0x0 && address(quoteToken) != 0x0);

        _menu[sha3(baseToken, quoteToken)] = true;
        LogAddTokenPairWhitelist(baseToken, quoteToken);
        return true;
    }

    //returns true if token is successfully removed from whitelist
    //  Function is used to remove a token pair from the whitelist.
    //  All incoming offers are checked against the whitelist.
    function remTokenPairWhitelist(
        ERC20 baseToken,
        ERC20 quoteToken
    )
    public
    auth
    note
    returns (bool)
    {
        require(isTokenPairWhitelisted(baseToken, quoteToken));

        delete _menu[sha3(baseToken, quoteToken)];
        delete _menu[sha3(quoteToken, baseToken)];
        LogRemTokenPairWhitelist(baseToken, quoteToken);
        return true;
    }

    function isTokenPairWhitelisted(
        ERC20 baseToken,
        ERC20 quoteToken
    )
    public
    constant
    returns (bool)
    {
        return (_menu[sha3(baseToken, quoteToken)] || _menu[sha3(quoteToken, baseToken)]);
    }

    //set the minimum sell amount for a token
    //    Function is used to avoid "dust offers" that have
    //    very small amount of tokens to sell, and it would
    //    cost more gas to accept the offer, than the value
    //    of tokens received.
    function setMinSell(
        ERC20 pay_gem,     //token to assign minimum sell amount to
        uint dust          //maker (ask) minimum sell amount
    )
    auth
    note
    returns (bool)
    {
        _dust[pay_gem] = dust;
        LogMinSell(pay_gem, dust);
        return true;
    }

    //returns the minimum sell amount for an offer
    function getMinSell(
        ERC20 pay_gem      //token for which minimum sell amount is queried
    )
    constant
    returns (uint) {
        return _dust[pay_gem];
    }

    //set buy functionality enabled/disabled
    function setBuyEnabled(bool buyEnabled_) auth  returns (bool) {
        buyEnabled = buyEnabled_;
        LogBuyEnabled(buyEnabled);
        return true;
    }

    //set matching enabled/disabled
    //    If matchingEnabled true(default), then inserted offers are matched.
    //    Except the ones inserted by contracts, because those end up
    //    in the unsorted list of offers, that must be later sorted by
    //    keepers using insert().
    //    If matchingEnabled is false then MatchingMarket is reverted to ExpiringMarket,
    //    and matching is not done, and sorted lists are disabled.
    function setMatchingEnabled(bool matchingEnabled_) auth  returns (bool) {
        matchingEnabled = matchingEnabled_;
        LogMatchingEnabled(matchingEnabled);
        return true;
    }

    //return the best offer for a token pair
    //      the best offer is the lowest one if it's an ask,
    //      and highest one if it's a bid offer
    function getBestOffer(ERC20 sell_gem, ERC20 buy_gem) constant returns(uint) {
        return _best[sell_gem][buy_gem];
    }

    //return the next worse offer in the sorted list
    //      the worse offer is the higher one if its an ask,
    //      and lower one if its a bid offer
    function getWorseOffer(uint id) constant returns(uint) {
        return _rank[id].prev;
    }

    //return the next better offer in the sorted list
    //      the better offer is in the lower priced one if its an ask,
    //      and next higher priced one if its a bid offer
    function getBetterOffer(uint id) constant returns(uint) {
        return _rank[id].next;
    }

    //return the amount of better offers for a token pair
    function getOfferCount(ERC20 sell_gem, ERC20 buy_gem) constant returns(uint) {
        return _span[sell_gem][buy_gem];
    }

    //get the first unsorted offer that was inserted by a contract
    //      Contracts can't calculate the insertion position of their offer because it is not an O(1) operation.
    //      Their offers get put in the unsorted list of offers.
    //      Keepers can calculate the insertion position offchain and pass it to the insert() function to insert
    //      the unsorted offer into the sorted list. Unsorted offers will not be matched, but can be bought with buy().
    function getFirstUnsortedOffer() constant returns(uint) {
        return _head;
    }

    //get the next unsorted offer
    //      Can be used to cycle through all the unsorted offers.
    function getNextUnsortedOffer(uint id) constant returns(uint) {
        return _near[id];
    }

    function isOfferSorted(uint id) constant returns(bool) {
        address buy_gem = address(offers[id].buy_gem);
        address pay_gem = address(offers[id].pay_gem);
        return (_rank[id].next != 0 || _rank[id].prev != 0 || _best[pay_gem][buy_gem] == id) ? true : false;
    }


    // ---- Internal Functions ---- //


    function _buys(uint id, uint amount)
    internal
    returns (bool)
    {
        require(buyEnabled);

        if (amount == offers[id].pay_amt && isOfferSorted(id)) {
            //offers[id] must be removed from sorted list because all of it is bought
            _unsort(id);
        }
        assert(super.buy(id, amount));
        return true;
    }

    //find the id of the next higher offer after offers[id]
    function _find(uint id)
    internal
    returns (uint)
    {
        require( id > 0 );

        address buy_gem = address(offers[id].buy_gem);
        address pay_gem = address(offers[id].pay_gem);
        uint top = _best[pay_gem][buy_gem];
        uint old_top = 0;

        // Find the larger-than-id order whose successor is less-than-id.
        while (top != 0 && _isLtOrEq(id, top)) {
            old_top = top;
            top = _rank[top].prev;
        }
        return old_top;
    }

    //return true if offers[low] priced less than or equal to offers[high]
    function _isLtOrEq(
        uint low,   //lower priced offer's id
        uint high   //higher priced offer's id
    )
    internal
    returns (bool)
    {
        return mul(offers[low].buy_amt, offers[high].pay_amt)
          >= mul(offers[high].buy_amt, offers[low].pay_amt);
    }

    //these variables are global only because of solidity local variable limit

    //match offers with taker offer, and execute token transactions
    function _matcho(
        uint t_pay_amt,    //taker sell how much
        ERC20 t_pay_gem,   //taker sell which token
        uint t_buy_amt,    //taker buy how much
        ERC20 t_buy_gem,   //taker buy which token
        uint pos,          //position id
        bool rounding      //match "close enough" orders?
    )
    internal
    returns (uint id)
    {
        uint best_maker_id;    //highest maker id
        uint t_buy_amt_old;              //taker buy how much saved
        uint m_buy_amt;        //maker offer wants to buy this much token
        uint m_pay_amt;        //maker offer wants to sell this much token

        require(pos == 0
               || !isActive(pos)
               || t_buy_gem == offers[pos].buy_gem
                  && t_pay_gem == offers[pos].pay_gem);

        // there is at least one offer stored for token pair
        while (_best[t_buy_gem][t_pay_gem] > 0) {
            best_maker_id = _best[t_buy_gem][t_pay_gem];
            m_buy_amt = offers[best_maker_id].buy_amt;
            m_pay_amt = offers[best_maker_id].pay_amt;

            // Ugly hack to work around rounding errors. Based on the idea that
            // the furthest the amounts can stray from their "true" values is 1.
            // Ergo the worst case has t_pay_amt and m_pay_amt at +1 away from
            // their "correct" values and m_buy_amt and t_buy_amt at -1.
            // Since (c - 1) * (d - 1) > (a + 1) * (b + 1) is equivalent to
            // c * d > a * b + a + b + c + d, we write...
            if (mul(m_buy_amt, t_buy_amt) > mul(t_pay_amt, m_pay_amt) +
                (rounding ? m_buy_amt + t_buy_amt + t_pay_amt + m_pay_amt : 0))
            {
                break;
            }
            // ^ The `rounding` parameter is a compromise borne of a couple days
            // of discussion.

            buy(best_maker_id, min(m_pay_amt, t_buy_amt));
            t_buy_amt_old = t_buy_amt;
            t_buy_amt = sub(t_buy_amt, min(m_pay_amt, t_buy_amt));
            t_pay_amt = mul(t_buy_amt, t_pay_amt) / t_buy_amt_old;

            if (t_pay_amt == 0 || t_buy_amt == 0) {
                break;
            }
        }

        if (t_buy_amt > 0 && t_pay_amt > 0) {
            //new offer should be created
            id = super.offer(t_pay_amt, t_pay_gem, t_buy_amt, t_buy_gem);
            //insert offer into the sorted list
            _sort(id, pos);
        }
    }

    // Make a new offer without putting it in the sorted list.
    // Takes funds from the caller into market escrow.
    // ****Available to authorized contracts only!**********
    // Keepers should call insert(id,pos) to put offer in the sorted list.
    function _offeru(
        uint pay_amt,      //maker (ask) sell how much
        ERC20 pay_gem,     //maker (ask) sell which token
        uint buy_amt,      //maker (ask) buy how much
        ERC20 buy_gem      //maker (ask) buy which token
    )
    internal
    /*NOT synchronized!!! */
    returns (uint id)
    {
        id = super.offer(pay_amt, pay_gem, buy_amt, buy_gem);
        _near[id] = _head;
        _head = id;
        LogUnsortedOffer(id);
    }

    //put offer into the sorted list
    function _sort(
        uint id,    //maker (ask) id
        uint pos    //position to insert into
    )
    internal
    {
        require(isActive(id));

        address buy_gem = address(offers[id].buy_gem);
        address pay_gem = address(offers[id].pay_gem);
        uint prev_id; //maker (ask) id

        if (pos == 0
            || !isActive(pos)
            || !_isLtOrEq(id, pos)
            || (_rank[pos].prev != 0 && _isLtOrEq(id, _rank[pos].prev))
        ) {
            //client did not provide valid position, so we have to find it
            pos = _find(id);
        }

        //assert `pos` is in the sorted list or is 0
        require(pos == 0 || _rank[pos].next != 0 || _rank[pos].prev != 0 || _best[pay_gem][buy_gem] == pos);

        if (pos != 0) {
            //offers[id] is not the highest offer
            require(_isLtOrEq(id, pos));
            prev_id = _rank[pos].prev;
            _rank[pos].prev = id;
            _rank[id].next = pos;

        } else {
            //offers[id] is the highest offer
            prev_id = _best[pay_gem][buy_gem];
            _best[pay_gem][buy_gem] = id;
        }

        require(prev_id == 0 || offers[prev_id].pay_gem == offers[id].pay_gem);
        require(prev_id == 0 || offers[prev_id].buy_gem == offers[id].buy_gem);

        if (prev_id != 0) {
            //if lower offer does exist
            require(!_isLtOrEq(id, prev_id));
            _rank[prev_id].next = id;
            _rank[id].prev = prev_id;
        }

        _span[pay_gem][buy_gem]++;
        LogSortedOffer(id);
    }

    // Remove offer from the sorted list (does not cancel offer)
    function _unsort(
        uint id    //id of maker (ask) offer to remove from sorted list
    )
    internal
    returns (bool)
    {
        address buy_gem = address(offers[id].buy_gem);
        address pay_gem = address(offers[id].pay_gem);
        require(_span[pay_gem][buy_gem] > 0);

        //assert id is in the sorted list
        require(_rank[id].next != 0 || _rank[id].prev != 0 || _best[pay_gem][buy_gem] == id);

        if (id != _best[pay_gem][buy_gem]) {
            // offers[id] is not the highest offer
            _rank[_rank[id].next].prev = _rank[id].prev;

        } else {
            //offers[id] is the highest offer
            _best[pay_gem][buy_gem] = _rank[id].prev;
        }

        if (_rank[id].prev != 0) {
            //offers[id] is not the lowest offer
            _rank[_rank[id].prev].next = _rank[id].next;
        }

        _span[pay_gem][buy_gem]--;
        delete _rank[id];
        return true;
    }
    //Hide offer from the unsorted order book (does not cancel offer)
    function _hide(
        uint id     //id of maker offer to remove from unsorted list
    )
    internal
    returns (bool)
    {
        uint uid = _head;               //id of an offer in unsorted offers list 
        uint pre = uid;                 //id of previous offer in unsorted offers list

        require(!isOfferSorted(id));    //make sure offer id is not in sorted offers list

        if (_head == id) {              //check if offer is first offer in unsorted offers list
            _head = _near[id];          //set head to new first unsorted offer
            _near[id] = 0;              //delete order from unsorted order list
            return true;
        }
        while (uid > 0 && uid != id) {  //find offer in unsorted order list
            pre = uid;
            uid = _near[uid];
        }
        if (uid != id) {                //did not find offer id in unsorted offers list
            return false;
        }
        _near[pre] = _near[id];         //set previous unsorted offer to point to offer after offer id
        _near[id] = 0;                  //delete order from unsorted order list
        return true;
    }
}

    Contract ABI  
[{"constant":true,"inputs":[],"name":"matchingEnabled","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"sell_gem","type":"address"},{"name":"buy_gem","type":"address"}],"name":"getBestOffer","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":false,"inputs":[],"name":"stop","outputs":[],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"pay_gem","type":"address"},{"name":"buy_gem","type":"address"},{"name":"pay_amt","type":"uint128"},{"name":"buy_amt","type":"uint128"}],"name":"make","outputs":[{"name":"","type":"bytes32"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"owner_","type":"address"}],"name":"setOwner","outputs":[],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"baseToken","type":"address"},{"name":"quoteToken","type":"address"}],"name":"addTokenPairWhitelist","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"baseToken","type":"address"},{"name":"quoteToken","type":"address"}],"name":"remTokenPairWhitelist","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"pay_amt","type":"uint256"},{"name":"pay_gem","type":"address"},{"name":"buy_amt","type":"uint256"},{"name":"buy_gem","type":"address"},{"name":"pos","type":"uint256"}],"name":"offer","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"id","type":"uint256"},{"name":"pos","type":"uint256"}],"name":"insert","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"last_offer_id","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"matchingEnabled_","type":"bool"}],"name":"setMatchingEnabled","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"id","type":"uint256"}],"name":"cancel","outputs":[{"name":"success","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"id","type":"uint256"}],"name":"getOffer","outputs":[{"name":"","type":"uint256"},{"name":"","type":"address"},{"name":"","type":"uint256"},{"name":"","type":"address"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"id","type":"bytes32"},{"name":"maxTakeAmount","type":"uint128"}],"name":"take","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"pay_gem","type":"address"}],"name":"getMinSell","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":false,"inputs":[],"name":"getTime","outputs":[{"name":"","type":"uint64"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"id","type":"uint256"}],"name":"getNextUnsortedOffer","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"close_time","outputs":[{"name":"","type":"uint64"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"},{"name":"","type":"address"}],"name":"_span","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"},{"name":"","type":"address"}],"name":"_best","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"stopped","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"id_","type":"bytes32"}],"name":"bump","outputs":[],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"authority_","type":"address"}],"name":"setAuthority","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"sell_gem","type":"address"},{"name":"buy_gem","type":"address"}],"name":"getOfferCount","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"id","type":"uint256"}],"name":"isActive","outputs":[{"name":"active","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"offers","outputs":[{"name":"pay_amt","type":"uint256"},{"name":"pay_gem","type":"address"},{"name":"buy_amt","type":"uint256"},{"name":"buy_gem","type":"address"},{"name":"owner","type":"address"},{"name":"active","type":"bool"},{"name":"timestamp","type":"uint64"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"getFirstUnsortedOffer","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"baseToken","type":"address"},{"name":"quoteToken","type":"address"}],"name":"isTokenPairWhitelisted","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"id","type":"uint256"}],"name":"getBetterOffer","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"_dust","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"id","type":"uint256"}],"name":"getWorseOffer","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"","type":"bytes32"}],"name":"_menu","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"_near","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"id","type":"bytes32"}],"name":"kill","outputs":[],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"pay_gem","type":"address"},{"name":"dust","type":"uint256"}],"name":"setMinSell","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"authority","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"isClosed","outputs":[{"name":"closed","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"_rank","outputs":[{"name":"next","type":"uint256"},{"name":"prev","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"id","type":"uint256"}],"name":"getOwner","outputs":[{"name":"owner","type":"address"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"id","type":"uint256"}],"name":"isOfferSorted","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"buyEnabled_","type":"bool"}],"name":"setBuyEnabled","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"id","type":"uint256"},{"name":"amount","type":"uint256"}],"name":"buy","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"pay_amt","type":"uint256"},{"name":"pay_gem","type":"address"},{"name":"buy_amt","type":"uint256"},{"name":"buy_gem","type":"address"},{"name":"pos","type":"uint256"},{"name":"rounding","type":"bool"}],"name":"offer","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"pay_amt","type":"uint256"},{"name":"pay_gem","type":"address"},{"name":"buy_amt","type":"uint256"},{"name":"buy_gem","type":"address"}],"name":"offer","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"buyEnabled","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"inputs":[{"name":"close_time","type":"uint64"}],"payable":false,"type":"constructor"},{"anonymous":true,"inputs":[{"indexed":true,"name":"sig","type":"bytes4"},{"indexed":true,"name":"guy","type":"address"},{"indexed":true,"name":"foo","type":"bytes32"},{"indexed":true,"name":"bar","type":"bytes32"},{"indexed":false,"name":"wad","type":"uint256"},{"indexed":false,"name":"fax","type":"bytes"}],"name":"LogNote","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"id","type":"uint256"}],"name":"LogItemUpdate","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"pay_amt","type":"uint256"},{"indexed":true,"name":"pay_gem","type":"address"},{"indexed":false,"name":"buy_amt","type":"uint256"},{"indexed":true,"name":"buy_gem","type":"address"}],"name":"LogTrade","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"id","type":"bytes32"},{"indexed":true,"name":"pair","type":"bytes32"},{"indexed":true,"name":"maker","type":"address"},{"indexed":false,"name":"pay_gem","type":"address"},{"indexed":false,"name":"buy_gem","type":"address"},{"indexed":false,"name":"pay_amt","type":"uint128"},{"indexed":false,"name":"buy_amt","type":"uint128"},{"indexed":false,"name":"timestamp","type":"uint64"}],"name":"LogMake","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"id","type":"bytes32"},{"indexed":true,"name":"pair","type":"bytes32"},{"indexed":true,"name":"maker","type":"address"},{"indexed":false,"name":"pay_gem","type":"address"},{"indexed":false,"name":"buy_gem","type":"address"},{"indexed":false,"name":"pay_amt","type":"uint128"},{"indexed":false,"name":"buy_amt","type":"uint128"},{"indexed":false,"name":"timestamp","type":"uint64"}],"name":"LogBump","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"id","type":"bytes32"},{"indexed":true,"name":"pair","type":"bytes32"},{"indexed":true,"name":"maker","type":"address"},{"indexed":false,"name":"pay_gem","type":"address"},{"indexed":false,"name":"buy_gem","type":"address"},{"indexed":true,"name":"taker","type":"address"},{"indexed":false,"name":"take_amt","type":"uint128"},{"indexed":false,"name":"give_amt","type":"uint128"},{"indexed":false,"name":"timestamp","type":"uint64"}],"name":"LogTake","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"id","type":"bytes32"},{"indexed":true,"name":"pair","type":"bytes32"},{"indexed":true,"name":"maker","type":"address"},{"indexed":false,"name":"pay_gem","type":"address"},{"indexed":false,"name":"buy_gem","type":"address"},{"indexed":false,"name":"pay_amt","type":"uint128"},{"indexed":false,"name":"buy_amt","type":"uint128"},{"indexed":false,"name":"timestamp","type":"uint64"}],"name":"LogKill","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"authority","type":"address"}],"name":"LogSetAuthority","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"owner","type":"address"}],"name":"LogSetOwner","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"isEnabled","type":"bool"}],"name":"LogBuyEnabled","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"pay_gem","type":"address"},{"indexed":false,"name":"min_amount","type":"uint256"}],"name":"LogMinSell","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"isEnabled","type":"bool"}],"name":"LogMatchingEnabled","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"id","type":"uint256"}],"name":"LogUnsortedOffer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"id","type":"uint256"}],"name":"LogSortedOffer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"baseToken","type":"address"},{"indexed":false,"name":"quoteToken","type":"address"}],"name":"LogAddTokenPairWhitelist","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"baseToken","type":"address"},{"indexed":false,"name":"quoteToken","type":"address"}],"name":"LogRemTokenPairWhitelist","type":"event"}]

  Contract Creation Code Switch To Opcodes View
606060405260048054605860020a60ff0219605060020a60ff02199091166a010000000000000000000017166b010000000000000000000000179055341561004657600080fd5b604051602080613189833981016040528080519150505b805b5b60018054600160a060020a03191633600160a060020a03169081179091557fce241d7ca1f669fee44b6fc00b8eba2df3bb514eed0f6f668f8f89096e81ed9460405160405180910390a25b6004805468ffffffffffffffff00191661010067ffffffffffffffff8416021790555b505b505b6130a8806100e16000396000f300606060405236156102145763ffffffff60e060020a60003504166301492a0b81146102195780630374fc6f1461024057806307da68f514610277578063093f51981461028c57806313af4035146102d557806315e28700146102f65780631aa859d01461032f5780631b33d412146103685780631d834a1b146103a9578063232cae0b146103d65780632aed1905146103fb57806340e58ee5146104275780634579268a14610451578063496064551461049b578063511fa487146104bf578063557ed1ba146104f057806361f54a79146105205780636377ebca14610548578063677170e11461057857806374c1d7d3146105af57806375f12b21146105e6578063779997c31461060d5780637a9e5e4b146106255780637ca9429a1461064657806382afd23b1461067d5780638a72ea6a146106a75780638af82a2e146107115780638d7daf95146107365780638da5cb5b1461076f578063911550f41461079e57806391be90c8146107c6578063943911bc146107f757806396d7a9ed1461081f578063a78d431614610849578063b4f9b6c814610871578063bf7c734e14610889578063bf7e214f146108bf578063c2b6b58c146108ee578063c2d526aa14610915578063c41a360a14610943578063d2b420ce14610975578063d6f154691461099f578063d6febde8146109cb578063e1a6f014146109f8578063f09ea2a614610a3e578063f582d29314610a7c575b600080fd5b341561022457600080fd5b61022c610aa3565b604051901515815260200160405180910390f35b341561024b57600080fd5b610265600160a060020a0360043581169060243516610abb565b60405190815260200160405180910390f35b341561028257600080fd5b61028a610ae8565b005b341561029757600080fd5b610265600160a060020a03600435811690602435166001608060020a0360443581169060643516610b29565b60405190815260200160405180910390f35b34156102e057600080fd5b61028a600160a060020a0360043516610b54565b005b341561030157600080fd5b61022c600160a060020a0360043581169060243516610bc5565b604051901515815260200160405180910390f35b341561033a57600080fd5b61022c600160a060020a0360043581169060243516610d27565b604051901515815260200160405180910390f35b341561037357600080fd5b610265600435600160a060020a036024358116906044359060643516608435610ea3565b60405190815260200160405180910390f35b34156103b457600080fd5b61022c600435602435610f77565b604051901515815260200160405180910390f35b34156103e157600080fd5b61026561100d565b60405190815260200160405180910390f35b341561040657600080fd5b61022c6004351515611013565b604051901515815260200160405180910390f35b341561043257600080fd5b61022c6004356110a5565b604051901515815260200160405180910390f35b341561045c57600080fd5b610467600435611157565b604051938452600160a060020a03928316602085015260408085019290925290911660608301526080909101905180910390f35b34156104a657600080fd5b61028a6004356001608060020a0360243516611195565b005b34156104ca57600080fd5b610265600160a060020a03600435166111b5565b60405190815260200160405180910390f35b34156104fb57600080fd5b6105036111d4565b60405167ffffffffffffffff909116815260200160405180910390f35b341561052b57600080fd5b6102656004356111d9565b60405190815260200160405180910390f35b341561055357600080fd5b6105036111ee565b60405167ffffffffffffffff909116815260200160405180910390f35b341561058357600080fd5b610265600160a060020a0360043581169060243516611203565b60405190815260200160405180910390f35b34156105ba57600080fd5b610265600160a060020a0360043581169060243516611220565b60405190815260200160405180910390f35b34156105f157600080fd5b61022c61123d565b604051901515815260200160405180910390f35b341561061857600080fd5b61028a600435611253565b005b341561063057600080fd5b61028a600160a060020a036004351661139f565b005b341561065157600080fd5b610265600160a060020a0360043581169060243516611410565b60405190815260200160405180910390f35b341561068857600080fd5b61022c60043561143d565b604051901515815260200160405180910390f35b34156106b257600080fd5b6106bd60043561145f565b604051968752600160a060020a03958616602088015260408088019590955292851660608701529316608085015291151560a084015267ffffffffffffffff90911660c083015260e0909101905180910390f35b341561071c57600080fd5b6102656114bc565b60405190815260200160405180910390f35b341561074157600080fd5b61022c600160a060020a03600435811690602435166114c3565b604051901515815260200160405180910390f35b341561077a57600080fd5b610782611563565b604051600160a060020a03909116815260200160405180910390f35b34156107a957600080fd5b610265600435611572565b60405190815260200160405180910390f35b34156107d157600080fd5b610265600160a060020a0360043516611587565b60405190815260200160405180910390f35b341561080257600080fd5b610265600435611599565b60405190815260200160405180910390f35b341561082a57600080fd5b61022c6004356115b1565b604051901515815260200160405180910390f35b341561085457600080fd5b6102656004356115c6565b60405190815260200160405180910390f35b341561087c57600080fd5b61028a6004356115d8565b005b341561089457600080fd5b61022c600160a060020a03600435166024356115ed565b604051901515815260200160405180910390f35b34156108ca57600080fd5b6107826116d4565b604051600160a060020a03909116815260200160405180910390f35b34156108f957600080fd5b61022c6116e3565b604051901515815260200160405180910390f35b341561092057600080fd5b61092b60043561172b565b60405191825260208201526040908101905180910390f35b341561094e57600080fd5b610782600435611744565b604051600160a060020a03909116815260200160405180910390f35b341561098057600080fd5b61022c600435611765565b604051901515815260200160405180910390f35b34156109aa57600080fd5b61022c60043515156117fc565b604051901515815260200160405180910390f35b34156109d657600080fd5b61022c60043560243561188c565b604051901515815260200160405180910390f35b3415610a0357600080fd5b610265600435600160a060020a03602435811690604435906064351660843560a43515156118f9565b60405190815260200160405180910390f35b3415610a4957600080fd5b610265600435600160a060020a036024358116906044359060643516611a20565b60405190815260200160405180910390f35b3415610a8757600080fd5b61022c611b0d565b604051901515815260200160405180910390f35b6004546b010000000000000000000000900460ff1681565b600160a060020a038083166000908152600660209081526040808320938516835292905220545b92915050565b610b06610b0133600035600160e060020a031916611b24565b611c24565b6004805469ff000000000000000000191669010000000000000000001790555b5b565b6000610b49836001608060020a031686846001608060020a031687611a20565b90505b949350505050565b610b72610b0133600035600160e060020a031916611b24565b611c24565b60018054600160a060020a031916600160a060020a038381169190911791829055167fce241d7ca1f669fee44b6fc00b8eba2df3bb514eed0f6f668f8f89096e81ed9460405160405180910390a25b5b50565b6000610be5610b0133600035600160e060020a031916611b24565b611c24565b600435602435808233600160a060020a031660008035600160e060020a0319169034903660405183815260406020820181815290820183905260608201848480828437820191505094505050505060405180910390a4610c4585856114c3565b15610c4f57600080fd5b600160a060020a03851615801590610c6f5750600160a060020a03841615155b1515610c7a57600080fd5b6001600a60008787604051606060020a600160a060020a039384168102825291909216026014820152602801604051908190039020815260208101919091526040908101600020805460ff1916921515929092179091557f4b84ee81b11f5c5a33aaf2f3bdc5a35f23156c1b3cbefdbd00ba84846c19044b908690869051600160a060020a039283168152911660208201526040908101905180910390a1600192505b5b50505b92915050565b6000610d47610b0133600035600160e060020a031916611b24565b611c24565b600435602435808233600160a060020a031660008035600160e060020a0319169034903660405183815260406020820181815290820183905260608201848480828437820191505094505050505060405180910390a4610da785856114c3565b1515610db257600080fd5b600a60008686604051606060020a600160a060020a0393841681028252919092160260148201526028016040519081900390208152602081019190915260409081016000908120805460ff19169055600a918690889051606060020a600160a060020a039384168102825291909216026014820152602801604051908190039020815260208101919091526040908101600020805460ff191690557f80eb6b7f03b2ffa03a2dda3ce0c7db2b44d4bda32c071d3508a817321cd327d6908690869051600160a060020a039283168152911660208201526040908101905180910390a1600192505b5b50505b92915050565b60008483600a60008383604051606060020a600160a060020a039384168102825291909216026014820152602801604051908190039020815260208101919091526040016000205460ff1680610f3c5750600a60008284604051606060020a600160a060020a039384168102825291909216026014820152602801604051908190039020815260208101919091526040016000205460ff165b1515610f4757600080fd5b610f58610f526116e3565b15611c24565b610f67888888888860006118f9565b92505b5b5b505095945050505050565b6000828152600360208190526040822090810154600190910154600160a060020a039182169116610fa785611765565b15610fb157600080fd5b610fba8561143d565b1515610fc557600080fd5b831580610fd65750610fd68461143d565b5b1515610fe257600080fd5b610feb85611c34565b1515610ff657600080fd5b6110008585611cdc565b600192505b505092915050565b60025481565b6000611033610b0133600035600160e060020a031916611b24565b611c24565b600480546bff000000000000000000000019166b010000000000000000000000841515810291909117918290557fea11e00ec1642be9b494019b756440e2c57dbe9e59242c4f9c64ce33fb4f41d99160ff91900416604051901515815260200160405180910390a15060015b5b919050565b6000816110b18161143d565b15156110bc57600080fd5b6110c46116e3565b806110e857506110d381611744565b600160a060020a031633600160a060020a0316145b15156110f357600080fd5b6004546b010000000000000000000000900460ff16156111425761111683611765565b156111315761112c610b0184611f93565b611c24565b611142565b611142610b0184611c34565b611c24565b5b5b61114d8361214d565b91505b5b50919050565b6000818152600360208190526040909120805460018201546002830154938301549193600160a060020a03918216939092909116905b509193509193565b6111b0610b01836001608060020a03841661188c565b611c24565b5b5050565b600160a060020a0381166000908152600860205260409020545b919050565b425b90565b6000818152600960205260409020545b919050565b600454610100900467ffffffffffffffff1681565b600760209081526000928352604080842090915290825290205481565b600660209081526000928352604080842090915290825290205481565b6004546901000000000000000000900460ff1681565b60008161125f8161143d565b151561126a57600080fd5b6112726116e3565b1561127c57600080fd5b600083815260036020819052604091829020600481015460018201549190920154869550600160a060020a039283169391831692169051606060020a600160a060020a039384168102825291909216026014820152602801604051908190039020600084815260036020819052604091829020600181015491810154815460028301546004909301548a957f70a14c213064359ede031fd2a1645a11ce2ec825ffe6ab5cfb5b160c3ef4d0a295600160a060020a03908116959416939160a860020a900467ffffffffffffffff169051600160a060020a0395861681529390941660208401526001608060020a039182166040808501919091529116606083015267ffffffffffffffff909216608082015260a001905180910390a45b5b505050565b6113bd610b0133600035600160e060020a031916611b24565b611c24565b60008054600160a060020a031916600160a060020a038381169190911791829055167f1abebea81bfa2637f28358c371278fb15ede7ea8dd28d2e03b112ff6d936ada460405160405180910390a25b5b50565b600160a060020a038083166000908152600760209081526040808320938516835292905220545b92915050565b60008181526003602052604090206004015460a060020a900460ff165b919050565b6003602081905260009182526040909120805460018201546002830154938301546004909301549193600160a060020a039182169390929082169181169060a060020a810460ff169060a860020a900467ffffffffffffffff1687565b600b545b90565b6000600a60008484604051606060020a600160a060020a039384168102825291909216026014820152602801604051908190039020815260208101919091526040016000205460ff168061155a5750600a60008385604051606060020a600160a060020a039384168102825291909216026014820152602801604051908190039020815260208101919091526040016000205460ff165b90505b92915050565b600154600160a060020a031681565b6000818152600560205260409020545b919050565b60086020526000908152604090205481565b6000818152600560205260409020600101545b919050565b600a6020526000908152604090205460ff1681565b60096020526000908152604090205481565b610bc1610b01826110a5565b611c24565b5b50565b600061160d610b0133600035600160e060020a031916611b24565b611c24565b600435602435808233600160a060020a031660008035600160e060020a0319169034903660405183815260406020820181815290820183905260608201848480828437820191505094505050505060405180910390a4600160a060020a038516600090815260086020526040908190208590557fc28d56449b0bb31e64ee7487e061f57a2e72aea8019d810832f26dda099823d0908690869051600160a060020a03909216825260208201526040908101905180910390a1600192505b5b50505b92915050565b600054600160a060020a031681565b6004546000906901000000000000000000900460ff16806117255750600454610100900467ffffffffffffffff166117196111d4565b67ffffffffffffffff16115b90505b90565b6005602052600090815260409020805460019091015482565b600081815260036020526040902060040154600160a060020a03165b919050565b6000818152600360208181526040808420928301546001909301546005909252832054600160a060020a0392831692909116901515806117b5575060008481526005602052604090206001015415155b806117e45750600160a060020a0380821660009081526006602090815260408083209386168352929052205484145b6117ef5760006117f2565b60015b92505b5050919050565b600061181c610b0133600035600160e060020a031916611b24565b611c24565b600480546aff0000000000000000000019166a0100000000000000000000841515810291909117918290557f7089e4f0bcc948f9f723a361590c32d9c2284da7ab1981b1249ad2edb9f953c19160ff91900416604051901515815260200160405180910390a15060015b5b919050565b600061303e8361189b8161143d565b15156118a657600080fd5b6118ae6116e3565b156118b857600080fd5b6004546b010000000000000000000000900460ff166118d9576124376118dd565b6128c75b91506118ed85858463ffffffff16565b92505b5b505092915050565b60008584600a60008383604051606060020a600160a060020a039384168102825291909216026014820152602801604051908190039020815260208101919091526040016000205460ff16806119925750600a60008284604051606060020a600160a060020a039384168102825291909216026014820152602801604051908190039020815260208101919091526040016000205460ff165b151561199d57600080fd5b6119ae610f526116e3565b15611c24565b600160a060020a038816600090815260086020526040902054899011156119d457600080fd5b6004546b010000000000000000000000900460ff1615611a03576119fc898989898989612937565b9250611a12565b611a0f89898989612ae8565b92505b5b5b50509695505050505050565b600061303e8483600a60008383604051606060020a600160a060020a039384168102825291909216026014820152602801604051908190039020815260208101919091526040016000205460ff1680611abc5750600a60008284604051606060020a600160a060020a039384168102825291909216026014820152602801604051908190039020815260208101919091526040016000205460ff165b1515611ac757600080fd5b6004546b010000000000000000000000900460ff16611ae857612ae8611aec565b612e855b9250611afe888888888763ffffffff16565b93505b5b505050949350505050565b6004546a0100000000000000000000900460ff1681565b600030600160a060020a031683600160a060020a03161415611b4857506001610ae2565b600154600160a060020a0384811691161415611b6657506001610ae2565b600054600160a060020a03161515611b8057506000610ae2565b60008054600160a060020a03169063b7009613908590309086906040516020015260405160e060020a63ffffffff8616028152600160a060020a039384166004820152919092166024820152600160e060020a03199091166044820152606401602060405180830381600087803b1515611bf957600080fd5b6102c65a03f11515611c0a57600080fd5b505050604051805190509050610ae2565b5b5b5b92915050565b801515610bc157600080fd5b5b50565b600b5460009080611c4484611765565b15611c4e57600080fd5b83600b541415611c755760008481526009602052604081208054600b5555600192506117f5565b5b600082118015611c865750838214155b15611ca1575060008181526009602052604090205490611c76565b818414611cb157600092506117f5565b60008481526009602052604080822080548484529183209190915585825255600192505b5050919050565b6000806000611cea8561143d565b1515611cf557600080fd5b600085815260036020819052604090912090810154600190910154600160a060020a039182169450169150831580611d335750611d318461143d565b155b80611d455750611d438585612eee565b155b80611d83575060008481526005602052604090206001015415801590611d835750600084815260056020526040902060010154611d83908690612eee565b5b5b15611d9657611d9385612f40565b93505b831580611db0575060008481526005602052604090205415155b80611dcb575060008481526005602052604090206001015415155b80611dfa5750600160a060020a0380831660009081526006602090815260408083209387168352929052205484145b1515611e0557600080fd5b8315611e4657611e158585612eee565b1515611e2057600080fd5b506000838152600560205260408082206001018054908790558683529120849055611e73565b50600160a060020a0381811660009081526006602090815260408083209386168352929052208054908590555b801580611eaa57506000858152600360205260408082206001908101548484529190922090910154600160a060020a039081169116145b1515611eb557600080fd5b801580611ee75750600085815260036020819052604080832082015484845292200154600160a060020a039081169116145b1515611ef257600080fd5b8015611f2a57611f028582612eee565b15611f0c57600080fd5b60008181526005602052604080822087905586825290206001018190555b600160a060020a0380831660009081526007602090815260408083209387168352929052819020805460010190557f20fb9bad86c18f7e22e8065258790d9416a7d2df8ff05f80f82c46d38b925acd9086905190815260200160405180910390a15b5050505050565b600081815260036020818152604080842092830154600190930154600160a060020a0390811680865260078452828620919094168086529252832054909190839011611fde57600080fd5b60008481526005602052604090205415158061200a575060008481526005602052604090206001015415155b806120395750600160a060020a0380821660009081526006602090815260408083209386168352929052205484145b151561204457600080fd5b600160a060020a03808216600090815260066020908152604080832093861683529290522054841461209457600084815260056020526040808220600180820154915484529190922001556120ca565b600084815260056020908152604080832060010154600160a060020a038086168552600684528285209087168552909252909120555b600084815260056020526040902060010154156120fe57600084815260056020526040808220805460019091015483529120555b600160a060020a038082166000908152600760209081526040808320938616835292815282822080546000190190558682526005905290812081815560019081019190915592505b5050919050565b6000612157613040565b826121618161143d565b151561216c57600080fd5b6121746116e3565b80612198575061218381611744565b600160a060020a031633600160a060020a0316145b15156121a357600080fd5b60045460ff16156121b057fe5b6004805460ff19166001179055600084815260036020526040908190209060e09051908101604090815282548252600180840154600160a060020a0390811660208086019182526002808801548688015260038089015485166060890152600498890154948516608089015260a060020a850460ff16151560a089015260a860020a90940467ffffffffffffffff1660c088015260008c8152918490529481208181559384018054600160a060020a031990811690915594840155908201805490931690925590920180547cffffffffffffffffffffffffffffffffffffffffffffffffffffffffff19169055925051600160a060020a031663a9059cbb8360800151845160006040516020015260405160e060020a63ffffffff8516028152600160a060020a0390921660048301526024820152604401602060405180830381600087803b151561230157600080fd5b6102c65a03f1151561231257600080fd5b50505060405180519050151561232457fe5b7fa2c251311b1a7a475913900a2a73dc9789a21b04bc737e050bbc506dd4eb34888460405190815260200160405180910390a18160800151600160a060020a031682602001518360600151604051606060020a600160a060020a039384168102825291909216026014820152602801604051908190039020857f9577941d28fff863bfbee4694a6a4a56fb09e169619189d2eaa750b5b4819995602086015186606001518751886040015142604051600160a060020a0395861681529390941660208401526001608060020a039182166040808501919091529116606083015267ffffffffffffffff909216608082015260a001905180910390a4600192505b6004805460ff191690555b5b5050919050565b6000612441613040565b60008461244d8161143d565b151561245857600080fd5b6124606116e3565b1561246a57600080fd5b60045460ff161561247757fe5b6004805460ff19166001179055600086815260036020526040908190209060e090519081016040908152825482526001830154600160a060020a039081166020840152600284015491830191909152600383015481166060830152600490920154918216608082015260a060020a820460ff16151560a082015260a860020a90910467ffffffffffffffff1660c08201529250825161251a868560400151612fd7565b81151561252357fe5b0491506001608060020a038216821461253b57600080fd5b6001608060020a038516851461255057600080fd5b84158061255b575081155b806125665750825185115b806125745750826040015182115b1561258257600093506128b2565b61258d835186613000565b60008781526003602052604090819020919091556125ae9084015183613000565b6000878152600360205260409020600201556060830151600160a060020a03166323b872dd3385608001518560006040516020015260405160e060020a63ffffffff8616028152600160a060020a0393841660048201529190921660248201526044810191909152606401602060405180830381600087803b151561263257600080fd5b6102c65a03f1151561264357600080fd5b50505060405180519050151561265557fe5b8260200151600160a060020a031663a9059cbb338760006040516020015260405160e060020a63ffffffff8516028152600160a060020a0390921660048301526024820152604401602060405180830381600087803b15156126b657600080fd5b6102c65a03f115156126c757600080fd5b5050506040518051905015156126d957fe5b7fa2c251311b1a7a475913900a2a73dc9789a21b04bc737e050bbc506dd4eb34888660405190815260200160405180910390a133600160a060020a03168360800151600160a060020a031684602001518560600151604051606060020a600160a060020a0393841681028252919092160260148201526028016040519081900390207f3383e3357c77fd2e3a4b30deea81179bc70a795d053d14d5b7f2f01d0fd4596f89602088015188606001518b8942604051958652600160a060020a039485166020870152929093166040808601919091526001608060020a0391821660608601529216608084015267ffffffffffffffff1660a083015260c0909101905180910390a48260600151600160a060020a03168360200151600160a060020a03167f819e390338feffe95e2de57172d6faf337853dfd15c7a09a32d76f7fd2443875878560405191825260208201526040908101905180910390a360008681526003602052604090205415156128ad5760008681526003602081905260408220828155600181018054600160a060020a03199081169091556002820193909355908101805490921690915560040180547cffffffffffffffffffffffffffffffffffffffffffffffffffffffffff191690555b600193505b6004805460ff191690555b5b50505092915050565b6004546000906a0100000000000000000000900460ff1615156128e957600080fd5b6000838152600360205260409020548214801561290a575061290a83611765565b5b1561291b5761291983611f93565b505b61292d610b018484612437565b611c24565b5060015b92915050565b600080808080861580612950575061294e8761143d565b155b8061299f575060008781526003602081905260409091200154600160a060020a03898116911614801561299f5750600087815260036020526040902060010154600160a060020a038b81169116145b5b15156129ab57600080fd5b5b600160a060020a038089166000908152600660209081526040808320938e168352929052908120541115612aab575050600160a060020a038087166000908152600660209081526040808320938c168352928152828220548083526003909152919020600281015490549193509085612a26576000612a2e565b808b8a840101015b612a388c83612fd7565b01612a43838b612fd7565b1115612a4e57612aab565b612a6184612a5c838c613014565b61188c565b50889250612a7889612a73838c613014565b613000565b985082612a858a8d612fd7565b811515612a8e57fe5b049a508a1580612a9c575088155b15612aa657612aab565b6129ab565b600089118015612abb575060008b115b15612ad857612acc8b8b8b8b612ae8565b9450612ad88588611cdc565b5b5b505050509695505050505050565b6000612af2613040565b612b03610f526116e3565b15611c24565b60045460ff1615612b1057fe5b6004805460ff191660011790556001608060020a0386168614612b3257600080fd5b6001608060020a0384168414612b4757600080fd5b60008611612b5457600080fd5b600160a060020a0385161515612b6957600080fd5b60008411612b7657600080fd5b600160a060020a0383161515612b8b57600080fd5b600160a060020a038581169084161415612ba457600080fd5b858152600160a060020a03808616602083015260408201859052838116606083015233166080820152600160a082015267ffffffffffffffff421660c0820152612bec61302f565b60008181526003602052604090209092508190815181556020820151600182018054600160a060020a031916600160a060020a0392909216919091179055604082015181600201556060820151600382018054600160a060020a031916600160a060020a03929092169190911790556080820151600482018054600160a060020a031916600160a060020a039290921691909117905560a082015160048201805491151560a060020a0274ff00000000000000000000000000000000000000001990921691909117905560c08201516004909101805467ffffffffffffffff9290921660a860020a027fffffff0000000000000000ffffffffffffffffffffffffffffffffffffffffff90921691909117905550600160a060020a0385166323b872dd33308960006040516020015260405160e060020a63ffffffff8616028152600160a060020a0393841660048201529190921660248201526044810191909152606401602060405180830381600087803b1515612d6a57600080fd5b6102c65a03f11515612d7b57600080fd5b505050604051805190501515612d8d57fe5b7fa2c251311b1a7a475913900a2a73dc9789a21b04bc737e050bbc506dd4eb34888260405190815260200160405180910390a133600160a060020a03168584604051606060020a600160a060020a039384168102825291909216026014820152602801604051908190039020837f773ff502687307abfa024ac9f62f9752a0d210dac2ffd9a29e38e12e2ea82c8288878b8a42604051600160a060020a0395861681529390941660208401526001608060020a039182166040808501919091529116606083015267ffffffffffffffff909216608082015260a001905180910390a45b6004805460ff191690555b5b50949350505050565b6000612e9385858585612ae8565b600b80546000838152600960205260409081902091909155908290559091507f8173832a493e0a3989e521458e55bfe9feac9f9b675a94e100b9d5a85f8148629082905190815260200160405180910390a15b949350505050565b6000818152600360205260408082206002015484835290822054612f129190612fd7565b60008481526003602052604080822060020154858352912054612f359190612fd7565b101590505b92915050565b600080808080808611612f5257600080fd5b505050600083815260036020818152604080842092830154600190930154600160a060020a039081168086526006845282862091909416808652925283205490935090915b8115801590612fab5750612fab8683612eee565b5b15612fca575060008181526005602052604090206001015490612f97565b8094505b50505050919050565b818102821580612ff15750818382811515612fee57fe5b04145b1515610ae257fe5b5b92915050565b80820382811115610ae257fe5b5b92915050565b600081831115613024578161155a565b825b90505b92915050565b60028054600101908190555b90565bfe5b60e06040519081016040908152600080835260208301819052908201819052606082018190526080820181905260a0820181905260c0820152905600a165627a7a72305820fa61d624661c5223dd80c3467da790a08b0490c0a0479bf9266be8880dff67810029000000000000000000000000000000000000000000000000000000005b979d84

    Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000000000000000000000000000000000005b979d84

-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 000000000000000000000000000000000000000000000000000000005b979d84


   Swarm Source:
bzzr://fa61d624661c5223dd80c3467da790a08b0490c0a0479bf9266be8880dff6781

 

View All
Block Age transaction Difficulty Reward
View All
Block Age UncleNumber Difficulty GasUsed Reward
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.