Sponsored:   Ubex.com - Additional 17% of tokens are available for purchase! Trading on exchanges already started.
Contract Overview
Balance: 138.938555751314205196 Ether
Ether Value: $40,436.68 (@ $291.04/ETH)
Transactions: 6028 txns
 Latest 25 txns from a total Of 6028 transactions
(+1 PendingTxn)

TxHash Age From To Value [TxFee]
0xef9ea9cbd2e7e00a8656eedc5076653193fa3c849e580dd427532a0fb99b482e(pending)0x58b50543fdace2e6c98d94fb5f8474ce2acae239  IN  0x37304b0ab297f13f5520c523102797121182fb5b0 Ether(pending)
0x839c8211e87bcaa322964df66404f53f753ed0e781ad93c1c712266d6d63f5053 mins ago0x58b50543fdace2e6c98d94fb5f8474ce2acae239  IN   0x37304b0ab297f13f5520c523102797121182fb5b0 Ether0.0000726354
0xcb98610fc77842a07b881b60fe6a49e7e3756eba90972a383a776d0015d0dfec29 mins ago0x13fb97da9d2407da6dbc2d6c175b51d0f5d9d903  IN   0x37304b0ab297f13f5520c523102797121182fb5b0 Ether0.000232440592
0x15d6a777da2c33b9ef8af207e62a29296d88b5a6fc3cf73ab84d8ed269c93f572 hrs 4 mins ago0x58b50543fdace2e6c98d94fb5f8474ce2acae239  IN   0x37304b0ab297f13f5520c523102797121182fb5b0 Ether0.0002158515
0x42eb306ce67e8d8ffb1ba013429f5d344bdcd805f06958622cd1098b30c6fa152 hrs 10 mins ago0x77bed8137d3c1640d0f45e5cd1be92291d22f7d3  IN   0x37304b0ab297f13f5520c523102797121182fb5b0 Ether0.0000725202
0x4b356ff0377046021e5c1306aed51defb03a47cd64b412a03af9573db55b3f1c2 hrs 10 mins ago0x77bed8137d3c1640d0f45e5cd1be92291d22f7d3  IN   0x37304b0ab297f13f5520c523102797121182fb5b0 Ether0.000071991
0x6be56dc0d4f46bdd22e02234112cc2999326828cba7f61db436c8fc6289274674 hrs 8 mins ago0x7594c04858fa87fbfb241702a29b2c636066d68e  IN   0x37304b0ab297f13f5520c523102797121182fb5b0 Ether0.000380072
0x357ced0f508f62f9bd21d175eaa8eba6715c69722623df73b2acf7570d652b644 hrs 23 mins ago0x7594c04858fa87fbfb241702a29b2c636066d68e  IN   0x37304b0ab297f13f5520c523102797121182fb5b0 Ether0.0001754384
0xa5f75dc08dc9ca0b42a428f71eb864c6946af6d2175bc7c34e47db2a4abf312b4 hrs 23 mins ago0x7594c04858fa87fbfb241702a29b2c636066d68e  IN   0x37304b0ab297f13f5520c523102797121182fb5b0 Ether0.0000645648
0xdc0db273d4d6f34d165e20184f92c427fbab8da91ac984a4618b07f8d6d4c4df4 hrs 24 mins ago0x7594c04858fa87fbfb241702a29b2c636066d68e  IN   0x37304b0ab297f13f5520c523102797121182fb5b0 Ether0.0000646064
0x97a0b9f165834a1ddae901792a802c8ba7cb6f909c4699a8687e01f8e14cb54a4 hrs 24 mins ago0x58b50543fdace2e6c98d94fb5f8474ce2acae239  IN   0x37304b0ab297f13f5520c523102797121182fb5b0 Ether0.0002301392
0xe4c62d0d948a93c5b7847f9a545b7f8f9fd7ce8947cb09abd5d2ba028759a39f4 hrs 25 mins ago0x7594c04858fa87fbfb241702a29b2c636066d68e  IN   0x37304b0ab297f13f5520c523102797121182fb5b0 Ether0.0000645648
0x3def6077d0fc13c90993e11ddf36e2695e374d7554cbc8aa297b41b6e084bb165 hrs 53 mins ago0x58b50543fdace2e6c98d94fb5f8474ce2acae239  IN   0x37304b0ab297f13f5520c523102797121182fb5b0 Ether0.000215733
0x03c423e474e86b63780f0a74ce18f3fd5f57dd768d0710157873a84fd9f7995c6 hrs 35 mins ago0x230c9a8f235d88bbc8f9b589e17b4a4adbb286fc  IN   0x37304b0ab297f13f5520c523102797121182fb5b0 Ether0.00094431
0x4bd4f188db0027a6fd79db08e85093681074f31baae151a51eaaac9a8c971e818 hrs 47 mins ago0x58b50543fdace2e6c98d94fb5f8474ce2acae239  IN   0x37304b0ab297f13f5520c523102797121182fb5b0 Ether0.000288058
0x7319f0e6bea1f21e5b854afd9ed867fce2d920508399f1130800996d20a6cf339 hrs 22 mins ago0xe2fbb2f9f2f541fe6dc496cff727b217994b2b31  IN   0x37304b0ab297f13f5520c523102797121182fb5b0 Ether0.0003311195
0x532db464e841637bdd2c53429b703247a22b914203652f56a2756fe3049085849 hrs 31 mins ago0xe2fbb2f9f2f541fe6dc496cff727b217994b2b31  IN   0x37304b0ab297f13f5520c523102797121182fb5b0 Ether0.0000968472
0x7f5428e87797145f11a1e8c9a1a38abadd4fe69d82d7e091eed17e835d76598b10 hrs 40 mins ago0x77bed8137d3c1640d0f45e5cd1be92291d22f7d3  IN   0x37304b0ab297f13f5520c523102797121182fb5b0 Ether0.0003311195
0x9591f477e2f9b7b2c3b1be851ce42c245ce20b423f62fc1968efd040ed4f9a8d10 hrs 42 mins ago0x77bed8137d3c1640d0f45e5cd1be92291d22f7d3  IN   0x37304b0ab297f13f5520c523102797121182fb5b0 Ether0.0003310919
0xa5230e94df3de0c32b7fa5540baa95df4c821fa9b3f8f1861c53954a9f39ac3c10 hrs 46 mins ago0x77bed8137d3c1640d0f45e5cd1be92291d22f7d3  IN   0x37304b0ab297f13f5520c523102797121182fb5b0 Ether0.0005187348
0xf4e07c3941921a39a6693c0f484e61b09d8f0d09f2e748b41cca8ebd1dab246a10 hrs 56 mins ago0xe802ab704a8477c55d296ce13bd0939ff902ee54  IN   0x37304b0ab297f13f5520c523102797121182fb5b0 Ether0.001414426
0x44ab16bab3820e250bfb03a9171424c0194c8a43bb0a2fc0cc98322014f225f210 hrs 57 mins ago0xe802ab704a8477c55d296ce13bd0939ff902ee54  IN   0x37304b0ab297f13f5520c523102797121182fb5b0 Ether0.001873209
0xd0f53b3eea43801a3ad5177637354b7ebe2143b1d7dcddabc070efead556cbcd10 hrs 57 mins ago0xe802ab704a8477c55d296ce13bd0939ff902ee54  IN   0x37304b0ab297f13f5520c523102797121182fb5b0 Ether0.001873183
0x995ae608dc6ca64125e68e1612e98c26442991b1a9a100de55c546b94407926910 hrs 57 mins ago0xe802ab704a8477c55d296ce13bd0939ff902ee54  IN   0x37304b0ab297f13f5520c523102797121182fb5b0 Ether0.001873183
0x671c5402b814f8ca07a4441aa6a64bcc3e6af5a8d1237389acdeafedff69f26e10 hrs 57 mins ago0xe802ab704a8477c55d296ce13bd0939ff902ee54  IN   0x37304b0ab297f13f5520c523102797121182fb5b0 Ether0.001409967
[ Download CSV Export  ] 
 Internal Transactions as a result of Contract Execution
 Latest 25 Internal Txns, Click here to View More View All
ParentTxHash Block Age From To Value
0xe5676b5177937065711a1003b5b83542581277e09da9da8733d8199428208454616765123 hrs 17 mins ago0x37304b0ab297f13f5520c523102797121182fb5b0x3a5dda278571d8d2250348891344c518141a51630.21 Ether
0x624517e1dcb512dc4b68a449b69bb2287a36ee524154f29d36bdddfd6df90bd561652971 day 9 hrs ago0x37304b0ab297f13f5520c523102797121182fb5b0x4dcb3381694b4efa444560935a783069e10d374d0.1 Ether
0x2cafbffab27f251b037586c8b4cb5c26fb6e2d6823b5cd274245ce49c948a23661641171 day 13 hrs ago0x37304b0ab297f13f5520c523102797121182fb5b0x3a5dda278571d8d2250348891344c518141a51630.390000000000000001 Ether
0x03dc846b8b6b975ed4ed0d7f7777d81239ebb95a527895113220ed411d4c79a361632291 day 17 hrs ago0x37304b0ab297f13f5520c523102797121182fb5b0xe2fbb2f9f2f541fe6dc496cff727b217994b2b310.1 Ether
0xbe429a840b19e1bedc8a462e25f1cf640eca8e95a2cc516c10c2fba0b7cba89961622261 day 21 hrs ago0x37304b0ab297f13f5520c523102797121182fb5b0xe05df1a8c662fdc6d83ef38707925a8c60124a510.5 Ether
0xd8e602155534f9f43158154d79b8401d07d01ef76750abf412a6d4deb67e417d61565752 days 20 hrs ago0x37304b0ab297f13f5520c523102797121182fb5b0x230c9a8f235d88bbc8f9b589e17b4a4adbb286fc0.05 Ether
0x063097152f43b1cc53099f76aad3982be6e2f80bf3d54cda50f8fba4ccf8187861239888 days 8 hrs ago0x37304b0ab297f13f5520c523102797121182fb5b0x230c9a8f235d88bbc8f9b589e17b4a4adbb286fc0.005 Ether
0x300dcff5c80a6f5acddc328826d3e08326413d31fa5094503b4bcd064d8e5e8b61239888 days 8 hrs ago0x37304b0ab297f13f5520c523102797121182fb5b0x230c9a8f235d88bbc8f9b589e17b4a4adbb286fc0.005 Ether
0x553c786afb9640aa24ca140d678646646515257e88050649ef858c3a5cba21fb61187859 days 5 hrs ago0x37304b0ab297f13f5520c523102797121182fb5b0x590b296c9947e776372a2bd9c553dc857392d1950.009302325581395348 Ether
0xdca6b8fa1c8a005560c95af3c9cecac8bf854e89746639fc9efdbdddd466da4061184649 days 7 hrs ago0x37304b0ab297f13f5520c523102797121182fb5b0x4dcb3381694b4efa444560935a783069e10d374d0.25 Ether
0x831c59a3581acaaa9444fb76b0f6087fca6ac34aae64aefc99e0723171c32999611345710 days 3 hrs ago0x37304b0ab297f13f5520c523102797121182fb5b0xe05df1a8c662fdc6d83ef38707925a8c60124a510.1 Ether
0x66f85470340f7e6ba6dce15946e2377a72ddd0e04239428ff63a639c3fec6cdd611123210 days 12 hrs ago0x37304b0ab297f13f5520c523102797121182fb5b0xfec8054a38e78627d44144f325ae701dd51065cc0.6 Ether
0x049de497c9e7e009418b6079401262210e0c0831b04e627848a89382ab0493fc609563713 days 3 hrs ago0x37304b0ab297f13f5520c523102797121182fb5b0x834c1ca8e6459e44ab7d6d1aa118a98faff3b50b0.197857142857142857 Ether
0xf9e3933537903577892f5e9c806e4262c7265c6526cf922db882ddc9be5432d0609276813 days 15 hrs ago0x37304b0ab297f13f5520c523102797121182fb5b0xc9f122e77923cc7a19bf1a7d68409997cbfcffa80.199999999999999999 Ether
0xb58751975ae49484dc20e0e9b42e6f6d49030839495c2c2a497ccf9c7c9407e9608844214 days 8 hrs ago0x37304b0ab297f13f5520c523102797121182fb5b0xe05df1a8c662fdc6d83ef38707925a8c60124a510.85 Ether
0x51bfd62f39c7c5525a833fdf61ea45fc1784f778846312a3f9c723a95c090d5c608831114 days 9 hrs ago0x37304b0ab297f13f5520c523102797121182fb5b0xe05df1a8c662fdc6d83ef38707925a8c60124a511 Ether
0x5ca2153a874b53b8d8c0485839ad0e9feef06520e0ae38677448dfeb6ed5d5ac607501516 days 14 hrs ago0x37304b0ab297f13f5520c523102797121182fb5b0x3a77bc5a1bea6b80aaeb57fd5924cc6c7cbecdaa0.781004653742176425 Ether
0x74f40c1fffe617991daf2e8e001c4db6afbd60be3fccfd12070d4d5188819f79605750419 days 14 hrs ago0x37304b0ab297f13f5520c523102797121182fb5b0xfec8054a38e78627d44144f325ae701dd51065cc0.15 Ether
0x4b82b5147007f105774113799cdc3d0b27e0243d755a37f07da48c6bb2fe53de604669721 days 9 hrs ago0x37304b0ab297f13f5520c523102797121182fb5b0x74485a3a2cbead9f56f1e9fc0b94ab718cfd524c0.004000000000000001 Ether
0x0a69cccac8a34cf8365281e3be0986e6c82ea818e91f2c5916ce7409a4c16e35603006024 days 5 hrs ago0x37304b0ab297f13f5520c523102797121182fb5b0x834c1ca8e6459e44ab7d6d1aa118a98faff3b50b0.05 Ether
0x67d8dc382c3bc07aed3d7bb218e5cd254e0c8c1ee5702c0c86c89717b6792a42602828024 days 12 hrs ago0x37304b0ab297f13f5520c523102797121182fb5b0xb799cc9abea6c529152175f39cb26d6db14b1f100.01 Ether
0xb821e970e30c775f8f494976f670e28d13c6ed6050ff7a4d3935984601abc5ff602274225 days 11 hrs ago0x37304b0ab297f13f5520c523102797121182fb5b0x0ff2c89199bfced913cb3f98ffda6668feabb07e0.75 Ether
0xbb50a9e3e73bbcbb7c61b1679b886df9a9db3bddc9dcaa091808c4c2b6149a52602079425 days 18 hrs ago0x37304b0ab297f13f5520c523102797121182fb5b0x12806d299e8bd86670d559754d8910606692e1180.001 Ether
0x67dff68b9cee27fc82be1fa2fcdd1e335e12eb4d5172dba26035f9c78abd9707602075225 days 19 hrs ago0x37304b0ab297f13f5520c523102797121182fb5b0x1c6df8e61a1e53eaad0e4f7fc95ab4761b53fdb30.74 Ether
0x9f2f66e8636f2eb9c10661a55b63c1fb899cbd0132eb2a5de781e1552dd8dc01601980825 days 23 hrs ago0x37304b0ab297f13f5520c523102797121182fb5b0xa5db996dc54bc8942ed6209dd516842650896ab20.7 Ether
[ Download CSV Export  ] 
Warning: The compiled contract might be susceptible to EventStructWrongData (very low-severity), NestedArrayFunctionCallDecoder (medium-severity) Solidity compiler bugs.

Contract Source Code Verified (Exact match)
Contract Name: SportCrypt
Compiler Version: v0.4.18+commit.9cf6e910
Optimization Enabled: Yes
Runs (Optimiser):  200



  Contract Source Code   Find Similiar Contracts

pragma solidity ^0.4.18;

contract SportCrypt {
    address private owner;
    mapping(address => bool) private admins;

    function SportCrypt() public {
        owner = msg.sender;
    }

    modifier onlyOwner() {
        require(msg.sender == owner);
        _;
    }

    function changeOwner(address newOwner) external onlyOwner {
        owner = newOwner;
    }

    function addAdmin(address addr) external onlyOwner {
        admins[addr] = true;
    }

    function removeAdmin(address addr) external onlyOwner {
        admins[addr] = false;
    }


    // Events

    event LogBalanceChange(address indexed account, uint oldAmount, uint newAmount);
    event LogDeposit(address indexed account);
    event LogWithdraw(address indexed account);
    event LogTrade(address indexed takerAccount, address indexed makerAccount, uint indexed matchId, uint orderHash, uint8 orderDirection, uint8 price, uint longAmount, int newLongPosition, uint shortAmount, int newShortPosition);
    event LogTradeError(address indexed takerAccount, address indexed makerAccount, uint indexed matchId, uint orderHash, uint16 status);
    event LogOrderCancel(address indexed account, uint indexed matchId, uint orderHash);
    event LogFinalizeMatch(uint indexed matchId, uint8 finalPrice);
    event LogClaim(address indexed account, uint indexed matchId, uint amount);


    // Storage

    struct Match {
        mapping(address => int) positions;
        uint64 firstTradeTimestamp;
        bool finalized;
        uint8 finalPrice;
    }

    mapping(address => uint) private balances;
    mapping(uint => Match) private matches;
    mapping(uint => uint) private filledAmounts;


    // Memory

    uint constant MAX_SANE_AMOUNT = 2**128;

    enum Status {
        OK,
        MATCH_FINALIZED,
        ORDER_EXPIRED,
        ORDER_MALFORMED,
        ORDER_BAD_SIG,
        AMOUNT_MALFORMED,
        SELF_TRADE,
        ZERO_VALUE_TRADE
    }

    struct Order {
        uint orderHash;
        uint matchId;
        uint amount;
        uint expiry;
        address addr;
        uint8 price;
        uint8 direction;
    }

    // [0]: match hash
    // [1]: amount
    // [2]: 5-byte expiry, 5-byte nonce, 1-byte price, 1-byte direction, 20-byte address

    function parseOrder(uint[3] memory rawOrder) private constant returns(Order memory o) {
        o.orderHash = uint(keccak256(this, rawOrder));

        o.matchId = rawOrder[0];
        o.amount = rawOrder[1];

        uint packed = rawOrder[2];
        o.expiry = packed >> (8*27);
        o.addr = address(packed & 0x00ffffffffffffffffffffffffffffffffffffffff);
        o.price = uint8((packed >> (8*21)) & 0xff);
        o.direction = uint8((packed >> (8*20)) & 0xff);
    }

    function validateOrderParams(Order memory o) private pure returns(bool) {
        if (o.amount > MAX_SANE_AMOUNT) return false;
        if (o.price == 0 || o.price > 99) return false;
        if (o.direction > 1) return false;
        return true;
    }

    function validateOrderSig(Order memory o, bytes32 r, bytes32 s, uint8 v) private pure returns(bool) {
        if (ecrecover(keccak256("\x19Ethereum Signed Message:\n32", o.orderHash), v, r, s) != o.addr) return false;
        return true;
    }

    struct Trade {
        Status status;
        address longAddr;
        address shortAddr;
        int newLongPosition;
        int newShortPosition;
        int longBalanceDelta;
        int shortBalanceDelta;
        uint shortAmount;
        uint longAmount;
    }


    // User methods

    function() external payable {
        revert();
    }

    function deposit() external payable {
        if (msg.value > 0) {
            uint origAmount = balances[msg.sender];
            uint newAmount = safeAdd(origAmount, msg.value);
            balances[msg.sender] = newAmount;

            LogDeposit(msg.sender);
            LogBalanceChange(msg.sender, origAmount, newAmount);
        }
    }

    function withdraw(uint amount) external {
        uint origAmount = balances[msg.sender];
        uint amountToWithdraw = minu256(origAmount, amount);

        if (amountToWithdraw > 0) {
            uint newAmount = origAmount - amountToWithdraw;
            balances[msg.sender] = newAmount;

            LogWithdraw(msg.sender);
            LogBalanceChange(msg.sender, origAmount, newAmount);

            msg.sender.transfer(amountToWithdraw);
        }
    }

    function cancelOrder(uint[3] order, bytes32 r, bytes32 s, uint8 v) external {
        Order memory o = parseOrder(order);

        // Don't bother validating order params.
        require(validateOrderSig(o, r, s, v));
        require(o.addr == msg.sender);

        if (block.timestamp < o.expiry) {
            filledAmounts[o.orderHash] = o.amount;
            LogOrderCancel(msg.sender, o.matchId, o.orderHash);
        }
    }

    function trade(uint amount, uint[3] order, bytes32 r, bytes32 s, uint8 v) external {
        Order memory o = parseOrder(order);

        if (!validateOrderParams(o)) {
            LogTradeError(msg.sender, o.addr, o.matchId, o.orderHash, uint16(Status.ORDER_MALFORMED));
            return;
        }

        if (!validateOrderSig(o, r, s, v)) {
            LogTradeError(msg.sender, o.addr, o.matchId, o.orderHash, uint16(Status.ORDER_BAD_SIG));
            return;
        }

        Trade memory t = tradeCore(amount, o);

        if (t.status != Status.OK) {
            LogTradeError(msg.sender, o.addr, o.matchId, o.orderHash, uint16(t.status));
            return;
        }

        // Modify storage to reflect trade:

        var m = matches[o.matchId];

        if (m.firstTradeTimestamp == 0) {
            assert(block.timestamp > 0);
            m.firstTradeTimestamp = uint64(block.timestamp);
        }

        m.positions[t.longAddr] = t.newLongPosition;
        m.positions[t.shortAddr] = t.newShortPosition;

        adjustBalance(t.longAddr, t.longBalanceDelta);
        adjustBalance(t.shortAddr, t.shortBalanceDelta);

        filledAmounts[o.orderHash] += (o.direction == 0 ? t.shortAmount : t.longAmount);

        LogTrade(msg.sender, o.addr, o.matchId, o.orderHash, o.direction, o.price, t.longAmount, t.newLongPosition, t.shortAmount, t.newShortPosition);
    }

    function claim(uint matchId, uint8 finalPrice, bytes32 r, bytes32 s, uint8 v) external {
        var m = matches[matchId];

        if (m.finalized) {
            require(m.finalPrice == finalPrice);
        } else {
            uint messageHash = uint(keccak256(this, matchId, finalPrice));
            address signer = ecrecover(keccak256("\x19Ethereum Signed Message:\n32", messageHash), v, r, s);
            require(admins[signer]);
            require(finalPrice <= 100);

            m.finalized = true;
            m.finalPrice = finalPrice;
            LogFinalizeMatch(matchId, finalPrice);
        }

        // NOTE: final prices other than 0 and 100 may leave very small amounts of unrecoverable dust in the contract due to rounding.

        int delta = 0;
        int senderPosition = m.positions[msg.sender];

        if (senderPosition > 0) {
            delta = priceDivide(senderPosition, finalPrice);
        } else if (senderPosition < 0) {
            delta = priceDivide(-senderPosition, 100 - finalPrice);
        } else {
            return;
        }

        assert(delta >= 0);

        m.positions[msg.sender] = 0;
        adjustBalance(msg.sender, delta);

        LogClaim(msg.sender, matchId, uint(delta));
    }

    function recoverFunds(uint matchId) external {
        var m = matches[matchId];

        if (m.finalized || m.firstTradeTimestamp == 0) {
            return;
        }

        uint recoveryTimestamp = uint(m.firstTradeTimestamp) + ((matchId & 0xFF) * 7 * 86400);

        if (uint(block.timestamp) > recoveryTimestamp) {
            uint8 finalPrice = uint8((matchId & 0xFF00) >> 8);
            require(finalPrice <= 100);

            m.finalized = true;
            m.finalPrice = finalPrice;
            LogFinalizeMatch(matchId, finalPrice);
        }
    }


    // Private utilities

    function adjustBalance(address addr, int delta) private {
        uint origAmount = balances[addr];
        uint newAmount = delta >= 0 ? safeAdd(origAmount, uint(delta)) : safeSub(origAmount, uint(-delta));
        balances[addr] = newAmount;

        LogBalanceChange(addr, origAmount, newAmount);
    }

    function priceDivide(int amount, uint8 price) private pure returns(int) {
        assert(amount >= 0);
        return int(safeMul(uint(amount), price) / 100);
    }

    function computeEffectiveBalance(uint balance, int position, uint8 price, bool isLong) private pure returns(uint) {
        uint effectiveBalance = balance;

        if (isLong) {
            if (position < 0) effectiveBalance += uint(priceDivide(-position, price));
        } else {
            if (position > 0) effectiveBalance += uint(priceDivide(position, 100 - price));
        }

        return effectiveBalance;
    }

    function computePriceWeightedAmounts(uint longAmount, uint shortAmount, uint price) private pure returns(uint, uint) {
        uint totalLongAmount;
        uint totalShortAmount;

        totalLongAmount = longAmount + (safeMul(longAmount, 100 - price) / price);
        totalShortAmount = shortAmount + (safeMul(shortAmount, price) / (100 - price));

        if (totalLongAmount > totalShortAmount) {
            return (totalShortAmount - shortAmount, shortAmount);
        } else {
            return (longAmount, totalLongAmount - longAmount);
        }
    }

    function computeExposureDelta(int longBalanceDelta, int shortBalanceDelta, int oldLongPosition, int newLongPosition, int oldShortPosition, int newShortPosition) private pure returns(int) {
        int positionDelta = 0;
        if (newLongPosition > 0) positionDelta += newLongPosition - max256(0, oldLongPosition);
        if (oldShortPosition > 0) positionDelta -= oldShortPosition - max256(0, newShortPosition);

        return positionDelta + longBalanceDelta + shortBalanceDelta;
    }

    function tradeCore(uint amount, Order memory o) private constant returns(Trade t) {
        var m = matches[o.matchId];

        if (block.timestamp >= o.expiry) {
            t.status = Status.ORDER_EXPIRED;
            return;
        }

        if (m.finalized) {
            t.status = Status.MATCH_FINALIZED;
            return;
        }

        if (msg.sender == o.addr) {
            t.status = Status.SELF_TRADE;
            return;
        }

        if (amount > MAX_SANE_AMOUNT) {
            t.status = Status.AMOUNT_MALFORMED;
            return;
        }

        t.status = Status.OK;


        uint longAmount;
        uint shortAmount;

        if (o.direction == 0) {
            // maker short, taker long
            t.longAddr = msg.sender;
            longAmount = amount;

            t.shortAddr = o.addr;
            shortAmount = safeSub(o.amount, filledAmounts[o.orderHash]);
        } else {
            // maker long, taker short 
            t.longAddr = o.addr;
            longAmount = safeSub(o.amount, filledAmounts[o.orderHash]);

            t.shortAddr = msg.sender;
            shortAmount = amount;
        }

        int oldLongPosition = m.positions[t.longAddr];
        int oldShortPosition = m.positions[t.shortAddr];

        longAmount = minu256(longAmount, computeEffectiveBalance(balances[t.longAddr], oldLongPosition, o.price, true));
        shortAmount = minu256(shortAmount, computeEffectiveBalance(balances[t.shortAddr], oldShortPosition, o.price, false));

        (longAmount, shortAmount) = computePriceWeightedAmounts(longAmount, shortAmount, o.price);

        if (longAmount == 0 || shortAmount == 0) {
            t.status = Status.ZERO_VALUE_TRADE;
            return;
        }


        int newLongPosition = oldLongPosition + (int(longAmount) + int(shortAmount));
        int newShortPosition = oldShortPosition - (int(longAmount) + int(shortAmount));


        t.longBalanceDelta = 0;
        t.shortBalanceDelta = 0;

        if (oldLongPosition < 0) t.longBalanceDelta += priceDivide(-oldLongPosition + min256(0, newLongPosition), 100 - o.price);
        if (newLongPosition > 0) t.longBalanceDelta -= priceDivide(newLongPosition - max256(0, oldLongPosition), o.price);

        if (oldShortPosition > 0) t.shortBalanceDelta += priceDivide(oldShortPosition - max256(0, newShortPosition), o.price);
        if (newShortPosition < 0) t.shortBalanceDelta -= priceDivide(-newShortPosition + min256(0, oldShortPosition), 100 - o.price);

        int exposureDelta = computeExposureDelta(t.longBalanceDelta, t.shortBalanceDelta, oldLongPosition, newLongPosition, oldShortPosition, newShortPosition);

        if (exposureDelta != 0) {
            if (exposureDelta == 1) {
                newLongPosition--;
                newShortPosition++;
            } else if (exposureDelta == -1) {
                t.longBalanceDelta++; // one left-over wei: arbitrarily give it to long
            } else {
                assert(false);
            }

            exposureDelta = computeExposureDelta(t.longBalanceDelta, t.shortBalanceDelta, oldLongPosition, newLongPosition, oldShortPosition, newShortPosition);
            assert(exposureDelta == 0);
        }


        t.newLongPosition = newLongPosition;
        t.newShortPosition = newShortPosition;
        t.shortAmount = shortAmount;
        t.longAmount = longAmount;
    }


    // External views

    function getOwner() external view returns(address) {
        return owner;
    }

    function isAdmin(address addr) external view returns(bool) {
        return admins[addr];
    }

    function getBalance(address addr) external view returns(uint) {
        return balances[addr];
    }

    function getMatchInfo(uint matchId) external view returns(uint64, bool, uint8) {
        var m = matches[matchId];
        return (m.firstTradeTimestamp, m.finalized, m.finalPrice);
    }

    function getPosition(uint matchId, address addr) external view returns(int) {
        return matches[matchId].positions[addr];
    }

    function getFilledAmount(uint orderHash) external view returns(uint) {
        return filledAmounts[orderHash];
    }

    function checkMatchBatch(address myAddr, uint[16] matchIds) external view returns(int[16] myPosition, bool[16] finalized, uint8[16] finalPrice) {
        for (uint i = 0; i < 16; i++) {
            if (matchIds[i] == 0) break;

            var m = matches[matchIds[i]];

            myPosition[i] = m.positions[myAddr];
            finalized[i] = m.finalized;
            finalPrice[i] = m.finalPrice;
        }
    }

    function checkOrderBatch(uint[48] input) external view returns(uint16[16] status, uint[16] amount) {
        for (uint i = 0; i < 16; i++) {
            uint[3] memory rawOrder;
            rawOrder[0] = input[(i*3)];
            rawOrder[1] = input[(i*3) + 1];
            rawOrder[2] = input[(i*3) + 2];

            if (rawOrder[0] == 0) break;

            Order memory o = parseOrder(rawOrder);

            if (!validateOrderParams(o)) {
                status[i] = uint16(Status.ORDER_MALFORMED);
                amount[i] = 0;
                continue;
            }

            // Not validating order signatures or timestamps: should be done by clients

            var m = matches[o.matchId];

            if (m.finalized) {
                status[i] = uint16(Status.MATCH_FINALIZED);
                amount[i] = 0;
                continue;
            }

            uint longAmount;
            uint shortAmount;

            if (o.direction == 0) {
                shortAmount = safeSub(o.amount, filledAmounts[o.orderHash]);
                longAmount = safeMul(shortAmount, 100);
                shortAmount = minu256(shortAmount, computeEffectiveBalance(balances[o.addr], m.positions[o.addr], o.price, false));
                (longAmount, shortAmount) = computePriceWeightedAmounts(longAmount, shortAmount, o.price);
                status[i] = uint16(Status.OK);
                amount[i] = shortAmount;
            } else {
                longAmount = safeSub(o.amount, filledAmounts[o.orderHash]);
                shortAmount = safeMul(longAmount, 100);
                longAmount = minu256(longAmount, computeEffectiveBalance(balances[o.addr], m.positions[o.addr], o.price, true));
                (longAmount, shortAmount) = computePriceWeightedAmounts(longAmount, shortAmount, o.price);
                status[i] = uint16(Status.OK);
                amount[i] = longAmount;
            }
        }
    }


    // Math utilities

    function safeMul(uint a, uint b) private pure returns(uint) {
        uint c = a * b;
        assert(a == 0 || c / a == b);
        return c;
    }

    function safeSub(uint a, uint b) private pure returns(uint) {
        assert(b <= a);
        return a - b;
    }

    function safeAdd(uint a, uint b) private pure returns(uint) {
        uint c = a + b;
        assert(c >= a && c >= b);
        return c;
    }

    function minu256(uint a, uint b) private pure returns(uint) {
        return a < b ? a : b;
    }

    function max256(int a, int b) private pure returns(int) {
        return a >= b ? a : b;
    }

    function min256(int a, int b) private pure returns(int) {
        return a < b ? a : b;
    }
}

    Contract ABI  
[{"constant":false,"inputs":[{"name":"addr","type":"address"}],"name":"removeAdmin","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"addr","type":"address"}],"name":"isAdmin","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"amount","type":"uint256"}],"name":"withdraw","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"myAddr","type":"address"},{"name":"matchIds","type":"uint256[16]"}],"name":"checkMatchBatch","outputs":[{"name":"myPosition","type":"int256[16]"},{"name":"finalized","type":"bool[16]"},{"name":"finalPrice","type":"uint8[16]"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"matchId","type":"uint256"}],"name":"recoverFunds","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"matchId","type":"uint256"}],"name":"getMatchInfo","outputs":[{"name":"","type":"uint64"},{"name":"","type":"bool"},{"name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"matchId","type":"uint256"},{"name":"finalPrice","type":"uint8"},{"name":"r","type":"bytes32"},{"name":"s","type":"bytes32"},{"name":"v","type":"uint8"}],"name":"claim","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"addr","type":"address"}],"name":"addAdmin","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"order","type":"uint256[3]"},{"name":"r","type":"bytes32"},{"name":"s","type":"bytes32"},{"name":"v","type":"uint8"}],"name":"cancelOrder","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"getOwner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"newOwner","type":"address"}],"name":"changeOwner","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"orderHash","type":"uint256"}],"name":"getFilledAmount","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"amount","type":"uint256"},{"name":"order","type":"uint256[3]"},{"name":"r","type":"bytes32"},{"name":"s","type":"bytes32"},{"name":"v","type":"uint8"}],"name":"trade","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"input","type":"uint256[48]"}],"name":"checkOrderBatch","outputs":[{"name":"status","type":"uint16[16]"},{"name":"amount","type":"uint256[16]"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"deposit","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":true,"inputs":[{"name":"matchId","type":"uint256"},{"name":"addr","type":"address"}],"name":"getPosition","outputs":[{"name":"","type":"int256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"addr","type":"address"}],"name":"getBalance","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"inputs":[],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"payable":true,"stateMutability":"payable","type":"fallback"},{"anonymous":false,"inputs":[{"indexed":true,"name":"account","type":"address"},{"indexed":false,"name":"oldAmount","type":"uint256"},{"indexed":false,"name":"newAmount","type":"uint256"}],"name":"LogBalanceChange","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"account","type":"address"}],"name":"LogDeposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"account","type":"address"}],"name":"LogWithdraw","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"takerAccount","type":"address"},{"indexed":true,"name":"makerAccount","type":"address"},{"indexed":true,"name":"matchId","type":"uint256"},{"indexed":false,"name":"orderHash","type":"uint256"},{"indexed":false,"name":"orderDirection","type":"uint8"},{"indexed":false,"name":"price","type":"uint8"},{"indexed":false,"name":"longAmount","type":"uint256"},{"indexed":false,"name":"newLongPosition","type":"int256"},{"indexed":false,"name":"shortAmount","type":"uint256"},{"indexed":false,"name":"newShortPosition","type":"int256"}],"name":"LogTrade","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"takerAccount","type":"address"},{"indexed":true,"name":"makerAccount","type":"address"},{"indexed":true,"name":"matchId","type":"uint256"},{"indexed":false,"name":"orderHash","type":"uint256"},{"indexed":false,"name":"status","type":"uint16"}],"name":"LogTradeError","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"account","type":"address"},{"indexed":true,"name":"matchId","type":"uint256"},{"indexed":false,"name":"orderHash","type":"uint256"}],"name":"LogOrderCancel","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"matchId","type":"uint256"},{"indexed":false,"name":"finalPrice","type":"uint8"}],"name":"LogFinalizeMatch","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"account","type":"address"},{"indexed":true,"name":"matchId","type":"uint256"},{"indexed":false,"name":"amount","type":"uint256"}],"name":"LogClaim","type":"event"}]

  Contract Creation Code Switch To Opcodes View
6060604052341561000f57600080fd5b60008054600160a060020a033316600160a060020a0319909116179055611d398061003b6000396000f3006060604052600436106100f05763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416631785f53c81146100f557806324d7806c146101165780632e1a7d4d146101495780633448ec4a1461015f5780634ab358c7146102115780634b561a1614610227578063641bbdfe1461026f57806370480275146102995780638671b894146102b8578063893d20e8146102d9578063a6f9dae114610308578063ab47f1bf14610327578063b15a36471461034f578063cb1579ec14610373578063d0e30db0146103ed578063d29f541d146103f5578063f8b2cb4f14610417575b600080fd5b341561010057600080fd5b610114600160a060020a0360043516610436565b005b341561012157600080fd5b610135600160a060020a0360043516610472565b604051901515815260200160405180910390f35b341561015457600080fd5b610114600435610494565b341561016a57600080fd5b610180600160a060020a0360043516602461058e565b604051808461020080838360005b838110156101a657808201518382015260200161018e565b5050505090500183601060200280838360005b838110156101d15780820151838201526020016101b9565b5050505090500182601060200280838360005b838110156101fc5780820151838201526020016101e4565b50505050905001935050505060405180910390f35b341561021c57600080fd5b61011460043561069b565b341561023257600080fd5b61023d60043561079f565b60405167ffffffffffffffff9093168352901515602083015260ff166040808301919091526060909101905180910390f35b341561027a57600080fd5b61011460043560ff6024358116906044359060643590608435166107df565b34156102a457600080fd5b610114600160a060020a0360043516610ac0565b34156102c357600080fd5b610114600460643560843560ff60a43516610b02565b34156102e457600080fd5b6102ec610bdf565b604051600160a060020a03909116815260200160405180910390f35b341561031357600080fd5b610114600160a060020a0360043516610bee565b341561033257600080fd5b61033d600435610c38565b60405190815260200160405180910390f35b341561035a57600080fd5b610114600435602460843560a43560ff60c43516610c4a565b341561037e57600080fd5b6103886004610f87565b604051808361020080838360005b838110156103ae578082015183820152602001610396565b5050505090500182601060200280838360005b838110156103d95780820151838201526020016103c1565b505050509050019250505060405180910390f35b610114611286565b341561040057600080fd5b61033d600435600160a060020a036024351661134c565b341561042257600080fd5b61033d600160a060020a0360043516611374565b60005433600160a060020a0390811691161461045157600080fd5b600160a060020a03166000908152600160205260409020805460ff19169055565b600160a060020a03811660009081526001602052604090205460ff165b919050565b600160a060020a03331660009081526002602052604081205490806104b9838561138f565b915060008211156105885750600160a060020a033316600081815260026020526040908190208385039081905591907faf66eb1ff59a99165e990351acac53ab2fbc78bf79381392dd75b57ed2b8c40c905160405180910390a233600160a060020a03167fd0a6f018d0e9629a13bfeb9c60fd1bd8422531c157615dd2b75f0416f9255d98848360405191825260208201526040908101905180910390a2600160a060020a03331682156108fc0283604051600060405180830381858888f19350505050151561058857600080fd5b50505050565b610596611c07565b61059e611c2f565b6105a6611c2f565b6000805b6010821015610692578582601081106105bf57fe5b602002013515156105cf57610692565b600360008784601081106105df57fe5b60200201358152602001908152602001600020905080600001600088600160a060020a0316600160a060020a0316815260200190815260200160002054858360108110151561062a57fe5b6020020152600181015468010000000000000000900460ff1684836010811061064f57fe5b9115156020909202015260018101546901000000000000000000900460ff1683836010811061067a57fe5b60ff90921660209290920201526001909101906105aa565b50509250925092565b60008181526003602052604081206001810154909190819068010000000000000000900460ff16806106d95750600183015467ffffffffffffffff16155b156106e357610588565b600183015467ffffffffffffffff1662093a8060ff8616020191504282901115610588575061010061ff00841604606460ff8216111561072257600080fd5b6001830180546801000000000000000068ff0000000000000000199091161769ff0000000000000000001916690100000000000000000060ff841602179055837f7f2609eb806286dc6666e93a10aa26fd1ed386ef551226eab624fa2989e18f1d8260405160ff909116815260200160405180910390a250505050565b60009081526003602052604090206001015467ffffffffffffffff81169160ff680100000000000000008304811692690100000000000000000090041690565b6000858152600360205260408120600181015490919081908190819068010000000000000000900460ff161561083757600185015460ff8a81166901000000000000000000909204161461083257600080fd5b6109f4565b308a8a604051600160a060020a03939093166c01000000000000000000000000028352601483019190915260ff167f010000000000000000000000000000000000000000000000000000000000000002603482015260350160405190819003902093506001846040517f19457468657265756d205369676e6564204d6573736167653a0a3332000000008152601c810191909152603c016040518091039020878a8a6040516000815260200160405260006040516020015260405193845260ff90921660208085019190915260408085019290925260608401929092526080909201915160208103908084039060008661646e5a03f1151561093857600080fd5b505060206040510351600160a060020a03811660009081526001602052604090205490935060ff16151561096b57600080fd5b606460ff8a16111561097c57600080fd5b6001850180546801000000000000000068ff0000000000000000199091161769ff0000000000000000001916690100000000000000000060ff8c1602179055897f7f2609eb806286dc6666e93a10aa26fd1ed386ef551226eab624fa2989e18f1d8a60405160ff909116815260200160405180910390a25b5050600160a060020a03331660009081526020849052604081205481811315610a2857610a21818a6113a7565b9150610a46565b6000811215610a4157610a21816000038a6064036113a7565b610ab4565b6000821215610a5157fe5b33600160a060020a038116600090815260208790526040812055610a7590836113d3565b8933600160a060020a03167f9a4772cd5c0946aaea956f025c3bd64f5b4464abfaa006dbfc1ffe104b89ef2f8460405190815260200160405180910390a35b50505050505050505050565b60005433600160a060020a03908116911614610adb57600080fd5b600160a060020a03166000908152600160208190526040909120805460ff19169091179055565b610b0a611c58565b610b30856003606060405190810160405291908282606080828437506114739350505050565b9050610b3e8185858561156e565b1515610b4957600080fd5b33600160a060020a03168160800151600160a060020a031614610b6b57600080fd5b8060600151421015610bd85780604001516004600083518152602001908152602001600020819055508060200151600160a060020a0333167f30935e4be65589802d673b5be2728667a369b55b560f059108e2121907c6d6f9835160405190815260200160405180910390a35b5050505050565b600054600160a060020a031690565b60005433600160a060020a03908116911614610c0957600080fd5b6000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b60009081526004602052604090205490565b610c52611c58565b610c5a611c94565b6000610c82876003606060405190810160405291908282606080828437506114739350505050565b9250610c8d83611648565b1515610cf95782602001518360800151600160a060020a031633600160a060020a03167fff786f2db0e226ba2ad212d9b57fa5c209c8c5cb0692bf0486e30b8b2e17fe95866000015160035b60405191825261ffff1660208201526040908101905180910390a4610f7d565b610d058387878761156e565b1515610d555782602001518360800151600160a060020a031633600160a060020a03167fff786f2db0e226ba2ad212d9b57fa5c209c8c5cb0692bf0486e30b8b2e17fe9586600001516004610cd9565b610d5f88846116b7565b9150600082516007811115610d7057fe5b14610dc55782602001518360800151600160a060020a031633600160a060020a03167fff786f2db0e226ba2ad212d9b57fa5c209c8c5cb0692bf0486e30b8b2e17fe95866000015186516007811115610cd957fe5b60036000846020015181526020810191909152604001600020600181015490915067ffffffffffffffff161515610e205760004211610e0057fe5b60018101805467ffffffffffffffff19164267ffffffffffffffff161790555b81606001518160006020850151600160a060020a0316815260208101919091526040016000205560808201518160006040850151600160a060020a0316600160a060020a0316815260200190815260200160002081905550610e8a82602001518360a001516113d3565b610e9c82604001518360c001516113d3565b8260c0015160ff1615610eb457816101000151610eba565b8160e001515b600460008551815260208082019290925260400160002080549092019091558301518360800151600160a060020a031633600160a060020a03167fd5db3fe23370479a78dc47612ce8be2c8c0ae30d3f255129af35fe3f852b965686600001518760c001518860a0015188610100015189606001518a60e001518b6080015160405196875260ff9586166020880152939094166040808701919091526060860192909252608085015260a084019290925260c083015260e0909101905180910390a45b5050505050505050565b610f8f611c2f565b610f97611c07565b6000610fa1611cf3565b610fa9611c58565b60008060008095505b601086101561127b57886003870260308110610fca57fe5b60200201358552886003870260010160308110610fe357fe5b6020020135856001602002015288600260038802016030811061100257fe5b60200201356040860152845115156110195761127b565b61102285611473565b935061102d84611648565b15156110685760035b88876010811061104257fe5b61ffff9092166020929092020152600087876010811061105e57fe5b6020020152611270565b600360008560200151815260200190815260200160002092508260010160089054906101000a900460ff161561109f576001611036565b8360c0015160ff16151561118e576110cf8460400151600460008751815260200190815260200160002054611aa9565b90506110dc816064611abb565b915061114c81611147600260008860800151600160a060020a0316600160a060020a03168152602001908152602001600020548660000160008960800151600160a060020a0316600160a060020a03168152602001908152602001600020548860a001516000611adf565b61138f565b905061116082828660a0015160ff16611b26565b9092509050600088876010811061117357fe5b61ffff90921660209290920201528087876010811061105e57fe5b6111b08460400151600460008751815260200190815260200160002054611aa9565b91506111bd826064611abb565b905061122882611147600260008860800151600160a060020a0316600160a060020a03168152602001908152602001600020548660000160008960800151600160a060020a0316600160a060020a03168152602001908152602001600020548860a001516001611adf565b915061123c82828660a0015160ff16611b26565b9092509050600088876010811061124f57fe5b61ffff90921660209290920201528187876010811061126a57fe5b60200201525b600190950194610fb2565b505050505050915091565b600080600034111561134857600160a060020a03331660009081526002602052604090205491506112b78234611b8c565b600160a060020a03331660008181526002602052604090819020839055919250907fd3f6be9fd42ca63d7d8f466cf84e429063ac713c319d5fd9edfa0232fc5f684d905160405180910390a233600160a060020a03167fd0a6f018d0e9629a13bfeb9c60fd1bd8422531c157615dd2b75f0416f9255d98838360405191825260208201526040908101905180910390a25b5050565b6000918252600360209081526040808420600160a060020a0393909316845291905290205490565b600160a060020a031660009081526002602052604090205490565b600081831061139e57816113a0565b825b9392505050565b6000808312156113b357fe5b60646113c2848460ff16611abb565b8115156113cb57fe5b049392505050565b600160a060020a0382166000908152600260205260408120549080831215611407576114028284600003611aa9565b611411565b6114118284611b8c565b600160a060020a03851660008181526002602052604090819020839055919250907fd0a6f018d0e9629a13bfeb9c60fd1bd8422531c157615dd2b75f0416f9255d9890849084905191825260208201526040908101905180910390a250505050565b61147b611c58565b600030836040516c01000000000000000000000000600160a060020a0384160281526014810182606080838360005b838110156114c25780820151838201526020016114aa565b50505050905001925050506040519081900390208252825160208301528260016020020151604083015282600260200201517b0100000000000000000000000000000000000000000000000000000081046060840152600160a060020a038116608084015260ff75010000000000000000000000000000000000000000008204811660a0850152740100000000000000000000000000000000000000009091041660c083015250919050565b60008460800151600160a060020a0316600186516040517f19457468657265756d205369676e6564204d6573736167653a0a3332000000008152601c810191909152603c0160405180910390208487876040516000815260200160405260006040516020015260405193845260ff90921660208085019190915260408085019290925260608401929092526080909201915160208103908084039060008661646e5a03f1151561161d57600080fd5b505060206040510351600160a060020a03161461163c57506000611640565b5060015b949350505050565b60007001000000000000000000000000000000008260400151111561166f5750600061048f565b8160a0015160ff16158061168a575060638260a0015160ff16115b156116975750600061048f565b60018260c0015160ff1611156116af5750600061048f565b506001919050565b6116bf611c94565b600080600080600080600080600360008b602001518152602001908152602001600020975089606001514210611708578860025b9081600781111561170057fe5b905250611a9b565b600188015468010000000000000000900460ff1615611729578860016116f3565b8960800151600160a060020a031633600160a060020a0316141561174f578860066116f3565b7001000000000000000000000000000000008b1115611770578860056116f3565b6000895260c08a015160ff1615156117d357600160a060020a03331660208a01528a965060808a0151600160a060020a03166040808b01919091526117cc908b0151600460008d51815260200190815260200160002054611aa9565b955061181d565b8960800151600160a060020a031660208a015261180860408b0151600460008d51815260200190815260200160002054611aa9565b600160a060020a03331660408b015296508a95505b87600060208b0151600160a060020a0316600160a060020a031681526020019081526020016000205494508760000160008a60400151600160a060020a0316600160a060020a031681526020019081526020016000205493506118b487611147600260008d60200151600160a060020a0316600160a060020a0316815260200190815260200160002054888e60a001516001611adf565b96506118f486611147600260008d60400151600160a060020a0316600160a060020a0316815260200190815260200160002054878e60a001516000611adf565b955061190887878c60a0015160ff16611b26565b9097509550861580611918575085155b15611925578860076116f3565b600060a08a0181905260c08a0181905287870186810194508503925085121561197457611968611956600085611ba6565b86600003018b60a001516064036113a7565b8960a001818151019052505b60008313156119a35761199761198b600087611bb5565b84038b60a001516113a7565b8960a001818151039052505b60008413156119d2576119c66119ba600084611bb5565b85038b60a001516113a7565b8960c001818151019052505b6000821215611a07576119fb6119e9600086611ba6565b83600003018b60a001516064036113a7565b8960c001818151039052505b611a1d8960a001518a60c0015187868887611bc5565b90508015611a7d578060011415611a41576000199092019160019190910190611a5d565b806000191415611a5b578860a00180516001019052611a5d565bfe5b611a738960a001518a60c0015187868887611bc5565b90508015611a7d57fe5b606089018390526080890182905260e0890186905261010089018790525b505050505050505092915050565b600082821115611ab557fe5b50900390565b6000828202831580611ad75750828482811515611ad457fe5b04145b15156113a057fe5b6000848215611b05576000851215611b0057611afe85600003856113a7565b015b611b1d565b6000851315611b1d57611b1b85856064036113a7565b015b95945050505050565b60008060008084611b3a8887606403611abb565b811515611b4357fe5b048701915084606403611b568787611abb565b811515611b5f57fe5b048601905080821115611b79578581038693509350611b82565b86878303935093505b5050935093915050565b6000828201838110801590611ad75750828110156113a057fe5b600081831261139e57816113a0565b60008183121561139e57816113a0565b60008080851315611bdf57611bdb600087611bb5565b8503015b6000841315611bf857611bf3600084611bb5565b840390035b90960190940195945050505050565b6102006040519081016040526010815b6000815260200190600190039081611c175790505090565b6102006040519081016040526010815b600081526000199091019060200181611c3f5790505090565b60e06040519081016040908152600080835260208301819052908201819052606082018190526080820181905260a0820181905260c082015290565b61012060405190810160405280600081526020016000600160a060020a031681526020016000600160a060020a031681526020016000815260200160008152602001600081526020016000815260200160008152602001600081525090565b606060405190810160405260008152600260208201611c175600a165627a7a723058208924aeca67b69b681cf7fee4578e4f8e783c9a28478db3f6fb4a129908d9435e0029

   Swarm Source:
bzzr://8924aeca67b69b681cf7fee4578e4f8e783c9a28478db3f6fb4a129908d9435e

 

View All
Block Age txn Difficulty GasUsed Reward
View All
Block Age UncleNumber Difficulty GasUsed Reward
Make sure to use the "downvote" button for any spammy posts, and the "upvote" for interesting conversations.