Sponsored Link:   DocTailor - Legal Self Customisable Smart Contract Platform - Bridging the Gap Between Business & Cryptocurrency Holders - Join Now!
  Latest 25 txns from a total Of 1591 transactions View All

TxHash Age From To Value [TxFee]
0x1ac98b23a2e4741017714ddf91eeab7d5699818514411882c922d3109079f69f4 hrs 57 mins ago0xf7f2b1ddaec760a60f9fb4de54bdcf5a8f9db926  IN   0x37304b0ab297f13f5520c523102797121182fb5b0 Ether0.000046088
0xee7ab7fc2d05e05c364d7ea2de2b2541dc04238a5bcbe69645281e66e83e1b4d5 hrs 6 mins ago0xf7f2b1ddaec760a60f9fb4de54bdcf5a8f9db926  IN   0x37304b0ab297f13f5520c523102797121182fb5b0.01 Ether0.000045291
0xe9f3921b425a159f1c063ac1941c66e8b2ca5f12e02d161656b8f42e2636dd428 hrs 40 mins ago0x14f3310f600f7a719ba365f15d330ff7502f792c  IN   0x37304b0ab297f13f5520c523102797121182fb5b0 Ether0.0000175242
0xcf49b75989fdcb80c878bed89445a68951c5bdde68b5a0b9e18c738dd428532b9 hrs 15 mins ago0x45670d4e4be23f4bc2d7dd7606bd7c8411a8aaa8  IN   0x37304b0ab297f13f5520c523102797121182fb5b0 Ether0.0000201895
0x219662ddaf49ae9a44a1d0316740f4afe4eeb698860879eb2b16a9442552edee10 hrs 51 mins ago0x45670d4e4be23f4bc2d7dd7606bd7c8411a8aaa8  IN   0x37304b0ab297f13f5520c523102797121182fb5b0 Ether0.000040353
0x44415f583c722e8b359de5a24bc9c91c291cd917742d6e814160341d7af4f40010 hrs 52 mins ago0x45670d4e4be23f4bc2d7dd7606bd7c8411a8aaa8  IN   0x37304b0ab297f13f5520c523102797121182fb5b0 Ether0.000040353
0xc7092dd5ad6fc7e8d3c2e6599c6f18dbe16b42810b88a190c136d7647f95d7c010 hrs 53 mins ago0x45670d4e4be23f4bc2d7dd7606bd7c8411a8aaa8  IN   0x37304b0ab297f13f5520c523102797121182fb5b0 Ether0.000040353
0x1d23f0be0a7a35f5a21374e259568403a75e893d5af1903eae0f9f3dd2b9c02811 hrs 25 mins ago0xfcb503e67696365b5a4e9c59b8c0bac08f92b76b  IN   0x37304b0ab297f13f5520c523102797121182fb5b0 Ether0.00157748
0x66452f27f4a108c08b2bdec4004d45c63b9cbf9fcea6d438e97d42bb28276d6611 hrs 39 mins ago0xfcb503e67696365b5a4e9c59b8c0bac08f92b76b  IN   0x37304b0ab297f13f5520c523102797121182fb5b0 Ether0.000236622
0x56a84c2481358640fb2e27e223725ad1408073824980c16f63808ec8a84206e511 hrs 50 mins ago0xfcb503e67696365b5a4e9c59b8c0bac08f92b76b  IN   0x37304b0ab297f13f5520c523102797121182fb5b0 Ether0.000076216
0xae05ce4608fd480d149d9348f6543074d296e0fdaa993c40c97324eb36d453e511 hrs 54 mins ago0xfcb503e67696365b5a4e9c59b8c0bac08f92b76b  IN   0x37304b0ab297f13f5520c523102797121182fb5b0 Ether0.000288206
0x6608debd619c56b51a385b80215fb01c02cc0d04ea3e1345a699215d45ef889c12 hrs 5 mins ago0xfcb503e67696365b5a4e9c59b8c0bac08f92b76b  IN   0x37304b0ab297f13f5520c523102797121182fb5b0 Ether0.000432303
0xaf52297183ba8edb22f13c529e5439f3803ca6004e6f4aa8ce67eb3d01b12e8412 hrs 30 mins ago0xfcb503e67696365b5a4e9c59b8c0bac08f92b76b  IN   0x37304b0ab297f13f5520c523102797121182fb5b0 Ether0.000121059
0x5fbe6046c520bf98ea2edae24eb47e97ea8077c4aa400beb430b7db9379f1a7814 hrs 33 mins ago0xfcb503e67696365b5a4e9c59b8c0bac08f92b76b  IN   0x37304b0ab297f13f5520c523102797121182fb5b0 Ether0.000121059
0xd08416e7a35765c215cc8cf3f33656dbc86dd5b8d7720f88996e768ed7503fbb14 hrs 51 mins ago0x6595393e47abba4eb57b394c5856ac2b525cf923  IN   0x37304b0ab297f13f5520c523102797121182fb5b0.0045 Ether0.000060582
0x45363e09d0e39870a7ede9ee961c4b8d4a72b7b1d17ab27e381083604719222314 hrs 53 mins ago0xc4a8da23210c06d3242ae95bf5050d5263c35d46  IN   0x37304b0ab297f13f5520c523102797121182fb5b0.014 Ether0.000090582
0xec0313d7d4413c1bd538d75794f0537ab5ab1dd2f0e50e4be16636e08886aced15 hrs 14 mins ago0xfcb503e67696365b5a4e9c59b8c0bac08f92b76b  IN   0x37304b0ab297f13f5520c523102797121182fb5b0 Ether0.000236784
0xf32946c04ca4e53d48bb8fa40e9c128cfd4bf898ac5908dc8aad2ee28b84c4de19 hrs 26 mins ago0xfcb503e67696365b5a4e9c59b8c0bac08f92b76b  IN   0x37304b0ab297f13f5520c523102797121182fb5b0 Ether0.000315248
0x117b5bb5c812a54d7dc09f35e592764268eb72184031177acfaab750e774da9c19 hrs 28 mins ago0xfcb503e67696365b5a4e9c59b8c0bac08f92b76b  IN   0x37304b0ab297f13f5520c523102797121182fb5b0 Ether0.000315504
0xdb7243405e0a50ec2d22488efa6c9c5dcd8d3c9de2f44d991d0834d21287353d19 hrs 36 mins ago0xfcb503e67696365b5a4e9c59b8c0bac08f92b76b  IN   0x37304b0ab297f13f5520c523102797121182fb5b0 Ether0.00031812
0x2efdc9536f02c8ffc090abaf6c93129f46e17072eae6461d940120a82537890219 hrs 37 mins ago0xfcb503e67696365b5a4e9c59b8c0bac08f92b76b  IN   0x37304b0ab297f13f5520c523102797121182fb5b0 Ether0.000576404
0x385a4aa1bb21c083dec8cdae6c3373f2a30e388c347057ce2eb270e8505e01a019 hrs 39 mins ago0xfcb503e67696365b5a4e9c59b8c0bac08f92b76b  IN   0x37304b0ab297f13f5520c523102797121182fb5b0 Ether0.000576156
0xd4e01ca3d42b2258e24b057f4664fe6043a5df090c1ebd5cd68483fa896c675819 hrs 42 mins ago0xfcb503e67696365b5a4e9c59b8c0bac08f92b76b  IN   0x37304b0ab297f13f5520c523102797121182fb5b0 Ether0.000576156
0x49606058ff22ff6cb3d8e580a3d19b7b2d0b137d66871435d788850d5e307e0e22 hrs 8 mins ago0xfcb503e67696365b5a4e9c59b8c0bac08f92b76b  IN   0x37304b0ab297f13f5520c523102797121182fb5b0 Ether0.000058654
0x07fbdcd58e3728c7e84a765ac148453162307870b56c08779576e83e2ce4255b23 hrs 53 mins ago0xfcb503e67696365b5a4e9c59b8c0bac08f92b76b  IN   0x37304b0ab297f13f5520c523102797121182fb5b0 Ether0.000144103
[ 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
0x1ac98b23a2e4741017714ddf91eeab7d5699818514411882c922d3109079f69f54832754 hrs 57 mins ago0x37304b0ab297f13f5520c523102797121182fb5b0xf7f2b1ddaec760a60f9fb4de54bdcf5a8f9db9260.01 Ether
0x56a84c2481358640fb2e27e223725ad1408073824980c16f63808ec8a84206e5548159311 hrs 50 mins ago0x37304b0ab297f13f5520c523102797121182fb5b0xfcb503e67696365b5a4e9c59b8c0bac08f92b76b0.5 Ether
0xb9b9574bdf1a541347ece513ff02662ac8e90db92ac94ee7c572e31aa3f9913c54757171 day 11 hrs ago0x37304b0ab297f13f5520c523102797121182fb5b0xfcb503e67696365b5a4e9c59b8c0bac08f92b76b1 Ether
0x4948248f79f171312c8f3c5a2c7ac388d78573c89cc1d78b8d2387c9fc2e399c54755081 day 12 hrs ago0x37304b0ab297f13f5520c523102797121182fb5b0xfcb503e67696365b5a4e9c59b8c0bac08f92b76b0.5 Ether
0x00e6640bf991009d464485064a4aab3747fb004c4255675d9586765669e1dc3554738511 day 19 hrs ago0x37304b0ab297f13f5520c523102797121182fb5b0xfcb503e67696365b5a4e9c59b8c0bac08f92b76b0.5 Ether
0xa70336f6c1cfcc0a8276767c012865bec315ff33005af6e0355662e7be16d74254635453 days 14 hrs ago0x37304b0ab297f13f5520c523102797121182fb5b0xfcb503e67696365b5a4e9c59b8c0bac08f92b76b0.1 Ether
0xfae84846071a0be3bbafd9eeceb0edf966983fae0e57f08a2e4a199f9b5967a054575364 days 15 hrs ago0x37304b0ab297f13f5520c523102797121182fb5b0xfcb503e67696365b5a4e9c59b8c0bac08f92b76b0.2 Ether
0x7fc3acff5b8570a0ea0c2aa7b9af05b0033a31f9488e28ba682028187599736754524095 days 12 hrs ago0x37304b0ab297f13f5520c523102797121182fb5b0xfcb503e67696365b5a4e9c59b8c0bac08f92b76b0.5 Ether
0xec3859b7bda0990f685c47f48d0e06087b54864e0be6c53da3eac5ab6fb1d58854436916 days 23 hrs ago0x37304b0ab297f13f5520c523102797121182fb5b0x0422203efdc382b00689c9202c99a14750d3c29f0.0005 Ether
0x171b3c62f81b2d200e1636c47d0a6ecf0784f9786f3f75f5879f3b93e6da3d8154436916 days 23 hrs ago0x37304b0ab297f13f5520c523102797121182fb5b0x840aa1449f3c9462d0c23fe86ef761675dec29330.017543859649122807 Ether
0x1b8a495f35cee7da62c0befe366932ea4c7c2003e07550ae87f17b4f1a7ab08f54436606 days 23 hrs ago0x37304b0ab297f13f5520c523102797121182fb5b0xc4a8da23210c06d3242ae95bf5050d5263c35d460.0141 Ether
0x1c8dbdb7eae7ed1b0e0a744aadc5279303e298327e9daf73ea4e20dcbb91325a54354848 days 8 hrs ago0x37304b0ab297f13f5520c523102797121182fb5b0x88c9f74d656c3bff23641eb8b02f85a60c3b0abc0.42 Ether
0xdca4e72c9c101f76da270518a9c0cfba1c12d803c578840e182871d7ac6b6eee54284639 days 13 hrs ago0x37304b0ab297f13f5520c523102797121182fb5b0xfcb503e67696365b5a4e9c59b8c0bac08f92b76b0.5 Ether
0x73502cb7f7e3cb8a928aaefa2067b1c3b9096bcb5b3d0a5325a90ace23a05f1954283459 days 14 hrs ago0x37304b0ab297f13f5520c523102797121182fb5b0xfcb503e67696365b5a4e9c59b8c0bac08f92b76b0.5 Ether
0x6b740629db1de778787090bce82a48cffce881f4e348ebc74901e4333ee7789e54279739 days 15 hrs ago0x37304b0ab297f13f5520c523102797121182fb5b0xfcb503e67696365b5a4e9c59b8c0bac08f92b76b0.7 Ether
0xdb1bd333dad1b529ebe3bb499814f7a3373aab97a6cec30f125ad3f70ba4e56454279259 days 15 hrs ago0x37304b0ab297f13f5520c523102797121182fb5b0xfcb503e67696365b5a4e9c59b8c0bac08f92b76b0.5 Ether
0xd69ff27a530b3e4ca8a47afd23f125f039102b3b389815d603bc5bcb65dcf70e54278629 days 16 hrs ago0x37304b0ab297f13f5520c523102797121182fb5b0x88c9f74d656c3bff23641eb8b02f85a60c3b0abc0.055666666666666667 Ether
0xa8c879357b0257a9e556730f99aff7e4eccd5f51840c7e30b246e1d07bdaf25354265689 days 21 hrs ago0x37304b0ab297f13f5520c523102797121182fb5b0xfcb503e67696365b5a4e9c59b8c0bac08f92b76b0.6 Ether
0xde0bf9920ddaf243efd5258b7e23aa78dcbd961420a5362c87be36c48118fb8254265389 days 21 hrs ago0x37304b0ab297f13f5520c523102797121182fb5b0xfcb503e67696365b5a4e9c59b8c0bac08f92b76b0.5 Ether
0xeeaedcc9ba010edbe64bcf6d8271011228deff2e1db0b86da80ba6cc05438c77541897011 days 3 hrs ago0x37304b0ab297f13f5520c523102797121182fb5b0x88c9f74d656c3bff23641eb8b02f85a60c3b0abc2.5 Ether
0xd71b7080522a0ab3c3b59ee8919f18ed63392ded92fa0a4d3fe88798c10b8c40541741511 days 9 hrs ago0x37304b0ab297f13f5520c523102797121182fb5b0xfcb503e67696365b5a4e9c59b8c0bac08f92b76b1 Ether
0x10a61bb2b23a4095be475e5cdca3da105d030d91b55516da97328146c8a9f605541688711 days 12 hrs ago0x37304b0ab297f13f5520c523102797121182fb5b0xfcb503e67696365b5a4e9c59b8c0bac08f92b76b0.05 Ether
0xf9f1a96fcee2866215241a188392f71713ab4483bba0b2dfb63777d5a1b07900541500511 days 19 hrs ago0x37304b0ab297f13f5520c523102797121182fb5b0xfcb503e67696365b5a4e9c59b8c0bac08f92b76b2 Ether
0x2a1b40f633f686fab48a9f0a3ef1716463609d3d28ccf30934b4a390a4515003541497211 days 19 hrs ago0x37304b0ab297f13f5520c523102797121182fb5b0xfcb503e67696365b5a4e9c59b8c0bac08f92b76b1 Ether
0x1c8771e13dbd64993744c2a9ea57252a438a6fe73477e37a9723589d1f1af300541072512 days 12 hrs ago0x37304b0ab297f13f5520c523102797121182fb5b0xfcb503e67696365b5a4e9c59b8c0bac08f92b76b1 Ether
[ Download CSV Export  ] 
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.