Latest 25 transactions from a total of 422889 transactions

TxHash Age From To Value [TxFee]
0x13a7accf3eb4c30e67ab8e2671afc8b3ae0c432cc7c9f72b9d166ae25e59e0c1 11 secs ago0x8a37b79e54d69e833d79cac3647c877ef72830e1  IN   0x54a298ee9fccbf0ad8e55bc641d3086b81a48c410 Ether0.000290274
0xd3f5fd01c6c7949c325da520e4edd6c7b3b48142b4fc4b9da05b2e83733338a6 41 secs ago0x8a37b79e54d69e833d79cac3647c877ef72830e1  IN   0x54a298ee9fccbf0ad8e55bc641d3086b81a48c410 Ether0.00024839
0xde08d3bc77faab8bfa4d66a03b44f4a6d1078681d5452cdf91d8f9cf557744d0 56 secs ago0x8a37b79e54d69e833d79cac3647c877ef72830e1  IN   0x54a298ee9fccbf0ad8e55bc641d3086b81a48c410 Ether0.000362778
0x5d6650ebb329b0d260556bfb0def101cf914610a856631a5a30082b151e9e4f41 min ago0x8a37b79e54d69e833d79cac3647c877ef72830e1  IN   0x54a298ee9fccbf0ad8e55bc641d3086b81a48c410 Ether0.000259528
0x7391bc44c53fa8e6040405fd3e51e16aea6aa5a88d8dc1aa101ef100287ce96f1 min ago0x8a37b79e54d69e833d79cac3647c877ef72830e1  IN   0x54a298ee9fccbf0ad8e55bc641d3086b81a48c410 Ether0.000296837
0x0fd5b43d44db0c4d53cb2953978779fc922faf00f49e3bf3df95b72ae4643f021 min ago0x8a37b79e54d69e833d79cac3647c877ef72830e1  IN   0x54a298ee9fccbf0ad8e55bc641d3086b81a48c410 Ether0.000258213
0xde78926764e74becb5403afa07b9d2ddd3a18b5ece865bee66559a8d631d840b1 min ago0x8a37b79e54d69e833d79cac3647c877ef72830e1  IN   0x54a298ee9fccbf0ad8e55bc641d3086b81a48c410 Ether0.000245351
0xa62fa2ab3cc481d3554a11928100549ec2f65e8a0c02ad8740349ae7f117351b2 mins ago0x8a37b79e54d69e833d79cac3647c877ef72830e1  IN   0x54a298ee9fccbf0ad8e55bc641d3086b81a48c410 Ether0.000259454
0xaf8340f202f4c0b4e34ec3980c136022b8a1256b55edd11c461045a95e2bdac92 mins ago0x8a37b79e54d69e833d79cac3647c877ef72830e1  IN   0x54a298ee9fccbf0ad8e55bc641d3086b81a48c410 Ether0.000291427
0x547049ab0df13a69068accb243c9db40eb2bf3aa2779209bd9ee0b874de864892 mins ago0x8a37b79e54d69e833d79cac3647c877ef72830e1  IN   0x54a298ee9fccbf0ad8e55bc641d3086b81a48c410 Ether0.000253372
0x2f0783655d9a5669247bda815aca38eb5f2e66cb25d476a6010e1fa7061428a22 mins ago0x8a37b79e54d69e833d79cac3647c877ef72830e1  IN   0x54a298ee9fccbf0ad8e55bc641d3086b81a48c410 Ether0.000268386
0xe3134eb3a89708242fa7f52094a06d5b24b86ac837d69bbe820de8b3e641bc1f3 mins ago0x8a37b79e54d69e833d79cac3647c877ef72830e1  IN   0x54a298ee9fccbf0ad8e55bc641d3086b81a48c410 Ether0.000358884
0x18a460f5bd61b292ed0ffffe168495b6b2086ed8a02fa4334ae91f53973705cd3 mins ago0x8a37b79e54d69e833d79cac3647c877ef72830e1  IN   0x54a298ee9fccbf0ad8e55bc641d3086b81a48c410 Ether0.00032692
0xd869ee529f9fd025710a45b75f58f9d04e0f9c741accfc1bd80b55d6485fbebd3 mins ago0x8a37b79e54d69e833d79cac3647c877ef72830e1  IN   0x54a298ee9fccbf0ad8e55bc641d3086b81a48c410 Ether0.00025037
0x4640b57fc387b64401240e757e2c524bcb06110e7ec48b9b102b0c5b4050c3a73 mins ago0x8a37b79e54d69e833d79cac3647c877ef72830e1  IN   0x54a298ee9fccbf0ad8e55bc641d3086b81a48c410 Ether0.000292813
0xf2ad41579dc821c8d1630450adcfa5377beda61570130219ccc5b957509cf55f4 mins ago0x8a37b79e54d69e833d79cac3647c877ef72830e1  IN   0x54a298ee9fccbf0ad8e55bc641d3086b81a48c410 Ether0.000245233
0x8cb56ed67b7a931b71ed58906dd5709d3d75c148ab8ad80df2e7be165783e7584 mins ago0x8a37b79e54d69e833d79cac3647c877ef72830e1  IN   0x54a298ee9fccbf0ad8e55bc641d3086b81a48c410 Ether0.000095455
0xf2910ecd1f934ef91ff0967125d49739ac693bf04902f308a96e85ff31a49da14 mins ago0x8a37b79e54d69e833d79cac3647c877ef72830e1  IN   0x54a298ee9fccbf0ad8e55bc641d3086b81a48c410 Ether0.000259481
0x80879a2e8b7e90503b6034b3d58429cb35fabf50e666152c5640826d2e8c07555 mins ago0x8a37b79e54d69e833d79cac3647c877ef72830e1  IN   0x54a298ee9fccbf0ad8e55bc641d3086b81a48c410 Ether0.000225589
0x7c3109a82347fa9df1fdd1aa85f29f455915513efbc89ab29172d495b3ae90395 mins ago0x8a37b79e54d69e833d79cac3647c877ef72830e1  IN   0x54a298ee9fccbf0ad8e55bc641d3086b81a48c410 Ether0.000269307
0x6a3d99594cd7daeac50376729be1e9558efafa96c1a449a340d839db95b91b265 mins ago0x8a37b79e54d69e833d79cac3647c877ef72830e1  IN   0x54a298ee9fccbf0ad8e55bc641d3086b81a48c410 Ether0.000095391
0x19e80be10438d48e9d17b26312a3d890fdf801edff9d7dad9d63010767fad4125 mins ago0x8a37b79e54d69e833d79cac3647c877ef72830e1  IN   0x54a298ee9fccbf0ad8e55bc641d3086b81a48c410 Ether0.000259528
0x4b663252b0934a05fe3a428681dea8671c52018204d7e9443da6de8ba47595066 mins ago0x8a37b79e54d69e833d79cac3647c877ef72830e1  IN   0x54a298ee9fccbf0ad8e55bc641d3086b81a48c410 Ether0.000305483
0xa3a12cdd3844c891e32014facecd8fe38f88b1212deb4587994c47177db5fcee6 mins ago0x8a37b79e54d69e833d79cac3647c877ef72830e1  IN   0x54a298ee9fccbf0ad8e55bc641d3086b81a48c410 Ether0.000264463
0x3b58e7923d0a246030f7dfa562e3f834efde208ae43bb44eae5cf1445f6a0dfe6 mins ago0x8a37b79e54d69e833d79cac3647c877ef72830e1  IN   0x54a298ee9fccbf0ad8e55bc641d3086b81a48c410 Ether0.000244366
[ Download CSV Export  ] 
 Internal Transactions as a result of Contract Execution
 Latest 12 Internal Transactions

ParentTxHash Block Age From To Value
0xaba8cccf5c4374073f6c8cf465a13cab02e59828b4d2730918de68afc66f4e47314717361 days 7 hrs ago0x54a298ee9fccbf0ad8e55bc641d3086b81a48c410x51d76762717365d3f9e90c3c402d20e9f767224a0.0095 Ether
0x997d9059d6d03e8d8b2b4d13ea6ca0ba339b69e82ad802a1868683105cd4bf97313694263 days 1 hr ago0x54a298ee9fccbf0ad8e55bc641d3086b81a48c410xb3a606023af26db665e6727bbd6bb11165bda73b0.475 Ether
0x7e80942205eee4b83c4aba63c3cf793a826c38dcb2cd2ca1c65cd0b1fe82ea27312984764 days 7 hrs ago0x54a298ee9fccbf0ad8e55bc641d3086b81a48c410x51d76762717365d3f9e90c3c402d20e9f767224a0.95 Ether
0xdc444b456ab789cdc5f1152d9c10d5a8aa30c7a60155f9dc0dcc75f31768a64a312982764 days 7 hrs ago0x54a298ee9fccbf0ad8e55bc641d3086b81a48c410xb3a606023af26db665e6727bbd6bb11165bda73b0.00095 Ether
0x605b3fffff53abffa1288d270b5fde2ab1d1c191ebf04229dc04b2d326fa777c311817666 days 8 hrs ago0x54a298ee9fccbf0ad8e55bc641d3086b81a48c410xb3a606023af26db665e6727bbd6bb11165bda73b0.00095 Ether
0x30552083012e4824e3818e393a89a528ac6fa4c61c8ed56ab630bfe9824bf7f4310255669 days 1 hr ago0x54a298ee9fccbf0ad8e55bc641d3086b81a48c410xf003600b1499a88ee364a37bae0fffee5dc94b4a0.0475 Ether
0x529eea593d0748b4c24c9ee8cd883339e6e5f3afb7a99592486f207cf971df74310250069 days 1 hr ago0x54a298ee9fccbf0ad8e55bc641d3086b81a48c410x34de17561a0dee78b1b85adfe2e41408549222090.04655 Ether
0xd60018f400921a4283c71e3353ff684d41bd1f72494ebd68de3e86797fc8d67f310211969 days 3 hrs ago0x54a298ee9fccbf0ad8e55bc641d3086b81a48c410x4e30dba9762aba125f5ab81647edebff9f9df7a70.003655631822678013 Ether
0x212ef31f74f82a41dcae83a3d3922499cf104ad1bfd9977a400f164f21867b44310211769 days 3 hrs ago0x54a298ee9fccbf0ad8e55bc641d3086b81a48c410x4e30dba9762aba125f5ab81647edebff9f9df7a70.072816988521986643 Ether
0x17051ab91d6887a1c84fdca431988318e2952246dc683031123672401cb81706309082271 days 2 hrs ago0x54a298ee9fccbf0ad8e55bc641d3086b81a48c410xf003600b1499a88ee364a37bae0fffee5dc94b4a0.0475 Ether
0x180f4963c46f10875cce1e67e202c384cdc1d0f50604a0e2d2ec0ab3e9c45955309037471 days 4 hrs ago0x54a298ee9fccbf0ad8e55bc641d3086b81a48c410x4e30dba9762aba125f5ab81647edebff9f9df7a70.007417059063217566 Ether
0x97ef014291e2759af9798caf315723898e69eceb6183e122d3ebed421f707851309007571 days 5 hrs ago0x54a298ee9fccbf0ad8e55bc641d3086b81a48c410x4e30dba9762aba125f5ab81647edebff9f9df7a70.114979797531080029 Ether
[ Download CSV Export  ] 
Warning: The Compiled Contract might be susceptible to ExpExponentCleanup (medium/high-severity), EventStructWrongData (very low-severity) SolidityCompiler Bugs.

Contract Source Code Verified (Exact Match)
Contract Name: ExchangePure
Compiler Text: v0.4.24+commit.e67f0147
Optimization Enabled: Yes
Runs (Optimiser):  200



  Contract Source Code   Find Similiar Contracts

pragma solidity ^0.4.22;

pragma solidity ^0.4.24;


/**
 * @title ERC20 interface
 * @dev see https://github.com/ethereum/EIPs/issues/20
 */
contract ERC20 {
  function totalSupply() public view returns (uint256);

  function balanceOf(address _who) public view returns (uint256);

  function allowance(address _owner, address _spender)
    public view returns (uint256);

  function transfer(address _to, uint256 _value) public returns (bool);

  function approve(address _spender, uint256 _value)
    public returns (bool);

  function transferFrom(address _from, address _to, uint256 _value)
    public returns (bool);

  event Transfer(
    address indexed from,
    address indexed to,
    uint256 value
  );

  event Approval(
    address indexed owner,
    address indexed spender,
    uint256 value
  );
}

pragma solidity ^0.4.24;


/**
 * @title SafeMath
 * @dev Math operations with safety checks that revert on error
 */
library SafeMath {

  /**
  * @dev Multiplies two numbers, reverts on overflow.
  */
  function mul(uint256 _a, uint256 _b) internal pure returns (uint256) {
    // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
    // benefit is lost if 'b' is also tested.
    // See: https://github.com/OpenZeppelin/openzeppelin-solidity/pull/522
    if (_a == 0) {
      return 0;
    }

    uint256 c = _a * _b;
    require(c / _a == _b);

    return c;
  }

  /**
  * @dev Integer division of two numbers truncating the quotient, reverts on division by zero.
  */
  function div(uint256 _a, uint256 _b) internal pure returns (uint256) {
    require(_b > 0); // Solidity only automatically asserts when dividing by 0
    uint256 c = _a / _b;
    // assert(_a == _b * c + _a % _b); // There is no case in which this doesn't hold

    return c;
  }

  /**
  * @dev Subtracts two numbers, reverts on overflow (i.e. if subtrahend is greater than minuend).
  */
  function sub(uint256 _a, uint256 _b) internal pure returns (uint256) {
    require(_b <= _a);
    uint256 c = _a - _b;

    return c;
  }

  /**
  * @dev Adds two numbers, reverts on overflow.
  */
  function add(uint256 _a, uint256 _b) internal pure returns (uint256) {
    uint256 c = _a + _b;
    require(c >= _a);

    return c;
  }

  /**
  * @dev Divides two numbers and returns the remainder (unsigned integer modulo),
  * reverts when dividing by zero.
  */
  function mod(uint256 a, uint256 b) internal pure returns (uint256) {
    require(b != 0);
    return a % b;
  }
}

// https://github.com/AtlantPlatform/rbt-solidity

pragma solidity ^0.4.11;

library RedBlackTree {

    struct Item {
        bool red;
        uint64 parent;
        uint64 left;
        uint64 right;
        uint value;
    }

    struct Tree {
        uint64 root;
        mapping(uint64 => Item) items;
    }

    function getItem(Tree storage tree, uint64 id) public constant returns (uint64 parent, uint64 left, uint64 right, uint value, bool red) {
        require(id != 0);
        parent = tree.items[id].parent;
        left = tree.items[id].left;
        right = tree.items[id].right;
        value = tree.items[id].value;
        red = tree.items[id].red;
    }

    function find(Tree storage tree, uint value) public constant returns (uint64 parentId) {
        uint64 id = tree.root;
        parentId = id;
        while (id != 0) {
            if (value == tree.items[id].value) {
                return;
            }
            
            parentId = id;
            if (value < tree.items[id].value) {
                id = tree.items[id].left;
            } else {
                id = tree.items[id].right;
            }
        }
    }

    function insert(Tree storage tree, uint64 id, uint value) internal {
        uint64 parent = find(tree, value);
        placeAfter(tree, parent, id, value);
    }

    function placeAfter(Tree storage tree, uint64 parent, uint64 id, uint value) internal {
        Item memory item;        
        item.value = value;
        item.parent = parent;
        item.red = true;
        if (parent != 0) {
            if (value < tree.items[parent].value) {
                tree.items[parent].left = id;
            } else {
                tree.items[parent].right = id;
            }
        } else {
            tree.root = id;
        }        
        tree.items[id] = item;
        insert1(tree, id);
    }

    function insert1(Tree storage tree, uint64 n) private {
        uint64 p = tree.items[n].parent;
        if (p == 0) {
            tree.items[n].red = false;
        } else {
            if (tree.items[p].red) {
                uint64 g = grandparent(tree, n);
                uint64 u = uncle(tree, n);
                if (u != 0 && tree.items[u].red) {
                    tree.items[p].red = false;
                    tree.items[u].red = false;
                    tree.items[g].red = true;
                    insert1(tree, g);
                } else {
                    if ((n == tree.items[p].right) && (p == tree.items[g].left)) {
                        rotateLeft(tree, p);
                        n = tree.items[n].left;
                    } else if ((n == tree.items[p].left) && (p == tree.items[g].right)) {
                        rotateRight(tree, p);
                        n = tree.items[n].right; 
                    }

                    insert2(tree, n);
                }
            }
        }
    }

    function insert2(Tree storage tree, uint64 n) internal {
        uint64 p = tree.items[n].parent;
        uint64 g = grandparent(tree, n);

        tree.items[p].red = false;
        tree.items[g].red = true;

        if ((n == tree.items[p].left) && (p == tree.items[g].left)) {
            rotateRight(tree, g);
        } else {
            rotateLeft(tree, g);
        }
    }

    function remove(Tree storage tree, uint64 n) internal {
        uint64 successor;
        uint64 nRight = tree.items[n].right;
        uint64 nLeft = tree.items[n].left;
        if (nRight != 0 && nLeft != 0) {
            successor = nRight;
            while (tree.items[successor].left != 0) {
                successor = tree.items[successor].left;
            }
            uint64 sParent = tree.items[successor].parent;
            if (sParent != n) {
                tree.items[sParent].left = tree.items[successor].right;
                tree.items[successor].right = nRight;
                tree.items[sParent].parent = successor;
            }
            tree.items[successor].left = nLeft;
            if (nLeft != 0) {
                tree.items[nLeft].parent = successor;
            }
        } else if (nRight != 0) {
            successor = nRight;
        } else {
            successor = nLeft;
        }
        
        uint64 p = tree.items[n].parent;
        tree.items[successor].parent = p;

        if (p != 0) {
            if (n == tree.items[p].left) {
                tree.items[p].left = successor; 
            } else {
                tree.items[p].right = successor;
            }
        } else {
            tree.root = successor;
        }

        if (!tree.items[n].red) {
            if (tree.items[successor].red) {
                tree.items[successor].red = false;
            } else {
                delete1(tree, successor);
            }
        }
        delete tree.items[n];
        delete tree.items[0];
    }

    function delete1(Tree storage tree, uint64 n) private {
        uint64 p = tree.items[n].parent;
        if (p != 0) {
            uint64 s = sibling(tree, n);
            if (tree.items[s].red) {
                tree.items[p].red = true;
                tree.items[s].red = false;
                if (n == tree.items[p].left) {
                    rotateLeft(tree, p);
                } else {
                    rotateRight(tree, p);
                }
            }
            delete2(tree, n);
        }
    }

    function delete2(Tree storage tree, uint64 n) private {
        uint64 s = sibling(tree, n);
        uint64 p = tree.items[n].parent;
        uint64 sLeft = tree.items[s].left;
        uint64 sRight = tree.items[s].right;
        if (!tree.items[p].red && 
            !tree.items[s].red && 
            !tree.items[sLeft].red && 
            !tree.items[sRight].red) 
        {
            tree.items[s].red = true;
            delete1(tree, p);
        } else {
             if (tree.items[p].red && 
                !tree.items[s].red && 
                !tree.items[sLeft].red && 
                !tree.items[sRight].red) 
            {
                tree.items[s].red = true;
                tree.items[p].red = false;
            } else {
                if (!tree.items[s].red) {
                    if (n == tree.items[p].left && 
                        !tree.items[sRight].red &&
                        tree.items[sLeft].red) 
                    {
                        tree.items[s].red = true;
                        tree.items[sLeft].red = false;
                        rotateRight(tree, s);
                    } else if (n == tree.items[p].right && 
                        !tree.items[sLeft].red &&
                        tree.items[sRight].red) 
                    {
                        tree.items[s].red = true;
                        tree.items[sRight].red = false;
                        rotateLeft(tree, s);
                    }
                }

                tree.items[s].red = tree.items[p].red;
                tree.items[p].red = false;

                if (n == tree.items[p].left) {
                    tree.items[sRight].red = false;
                    rotateLeft(tree, p);
                } else {
                    tree.items[sLeft].red = false;
                    rotateRight(tree, p);
                }
            }
        }
    }

    function grandparent(Tree storage tree, uint64 n) private returns (uint64) {
        return tree.items[tree.items[n].parent].parent;
    }

    function uncle(Tree storage tree, uint64 n) private returns (uint64) {
        uint64 g = grandparent(tree, n);
        if (g == 0)
            return 0;
        
        if (tree.items[n].parent == tree.items[g].left)
            return tree.items[g].right;
        return tree.items[g].left;
    }

    function sibling(Tree storage tree, uint64 n) private returns (uint64) {
        uint64 p = tree.items[n].parent;
        if (n == tree.items[p].left) {
            return tree.items[p].right;
        } else {
            return tree.items[p].left;
        }
    }

    function rotateRight(Tree storage tree, uint64 n) private {
        uint64 pivot = tree.items[n].left;
        uint64 p = tree.items[n].parent;
        tree.items[pivot].parent = p;
        if (p != 0) {
            if (tree.items[p].left == n) {
                tree.items[p].left = pivot;
            } else {
                tree.items[p].right = pivot;
            }
        } else {
            tree.root = pivot;
        }

        tree.items[n].left = tree.items[pivot].right;
        if (tree.items[pivot].right != 0) {
            tree.items[tree.items[pivot].right].parent = n;
        }

        tree.items[n].parent = pivot;
        tree.items[pivot].right = n;
    }

    function rotateLeft(Tree storage tree, uint64 n) private {
        uint64 pivot = tree.items[n].right;
        uint64 p = tree.items[n].parent;
        tree.items[pivot].parent = p;
        if (p != 0) {
            if (tree.items[p].left == n) {
                tree.items[p].left = pivot;
            } else {
                tree.items[p].right = pivot;
            }
        } else {
            tree.root = pivot;
        }

        tree.items[n].right = tree.items[pivot].left;
        if (tree.items[pivot].left != 0) {
            tree.items[tree.items[pivot].left].parent = n;
        }

        tree.items[n].parent = pivot;
        tree.items[pivot].left = n;
    }
}

contract ExchangePure {
	using SafeMath for uint;
	using RedBlackTree for RedBlackTree.Tree;

	enum Fee {
		Maker,
		Taker,
		Withdrawal
	}

	struct Balance {
		uint available;
		uint reserved;
	}

	struct Order {
    address user;
    uint amount;
    uint price;
    bool sell;
    uint timestamp;
    uint64 next;
    uint64 prev;
  }

  struct Market {
  	mapping (uint64 => Order) orderbook;
  	mapping (uint => uint64) lastIdForPrice;
  	RedBlackTree.Tree priceTree;
    uint64 bid;
    uint64 ask;
    uint64 first;
    uint64 last;
  }

  uint64 private lastId;
  address private owner;
  address private feeCollector;
  mapping (address => mapping (address => Balance)) private balances;
  mapping (uint => uint) public fees;
  mapping (address => Market) private markets;

  event Deposit(address indexed token, address indexed user, uint amount, uint balance);
	event Withdraw(address indexed token, address indexed user, uint amount, uint balance);
	event NewOrder(address indexed user, address indexed market, uint64 indexed id, uint price, uint amount, uint timestamp, bool sell);
	event Ask(address indexed token, uint price);
  event Bid(address indexed token, uint price);
  event Trade(address indexed token, uint64 indexed bid, uint64 indexed ask, uint price, uint amount, uint timestamp, bool sell);

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

	constructor() public {
		owner = msg.sender;
		feeCollector = msg.sender;
	}

	function changeFeeCollector(address _feeCollector) public ownerOnly {
		feeCollector = _feeCollector;
	}

	function changeFee(uint _type, uint _value) public {
		if (_value > 50 finney) _value = 50 finney;
		fees[_type] = _value;
	}

	function changeOwner(address _owner) public ownerOnly {
		owner = _owner;
	}

	function deposit(address _token, uint _amount) public payable {
		if (_token == 0) {
			require(msg.value == _amount);
			balances[0][msg.sender].available = balances[0][msg.sender].available.add(msg.value);
    } else {
			require(msg.value == 0);
			balances[_token][msg.sender].available = balances[_token][msg.sender].available.add(_amount);
			require(ERC20(_token).transferFrom(msg.sender, this, _amount));
    }
    emit Deposit(_token, msg.sender, _amount, balances[_token][msg.sender].available);
	}

	function withdraw(address _token, uint _amount) public {
		require(balances[_token][msg.sender].available >= _amount);
    balances[_token][msg.sender].available = balances[_token][msg.sender].available.sub(_amount);
    uint fee = (fees[uint(Fee.Withdrawal)].mul(_amount)).div(1 ether);
    balances[_token][feeCollector].available = balances[_token][feeCollector].available.add(fee);
    if (_token == 0) {
      require(msg.sender.send(_amount.sub(fee)));
    } else {
      require(ERC20(_token).transfer(msg.sender, _amount.sub(fee)));
    }
    emit Withdraw(_token, msg.sender, _amount, balances[_token][msg.sender].available);
	}

	function getBalance(address _token, address _user) public view returns(uint available, uint reserved) {
		available = balances[_token][_user].available;
    reserved = balances[_token][_user].reserved;
	}

	function createOrder(address _marketAddress, uint _amount, uint _price, bool _sell) public {
		require(_marketAddress != 0);

		Market storage market = markets[_marketAddress];
		Order memory order;
		order.user = msg.sender;
		order.amount = _amount;
		order.price = _price;
		order.sell = _sell;
		order.timestamp = now;

		uint64 orderId = ++lastId;

		if (order.sell) {
			balances[_marketAddress][msg.sender].available = balances[_marketAddress][msg.sender].available.sub(_amount);
			balances[_marketAddress][msg.sender].reserved = balances[_marketAddress][msg.sender].reserved.add(_amount);
			matchBuyOrders(_marketAddress, market, order, orderId);
		} else {
			uint etherAmount = (_price.mul(_amount)).div(1 ether);
			balances[0][msg.sender].available = balances[0][msg.sender].available.sub(etherAmount);
			balances[0][msg.sender].reserved = balances[0][msg.sender].reserved.add(etherAmount);
			matchSellOrders(_marketAddress, market, order, orderId);
		}

		if (order.amount != 0) {
			uint64 parentId = market.lastIdForPrice[order.price] != 0 ? market.lastIdForPrice[order.price] : market.priceTree.find(order.price);
			Order storage parent = market.orderbook[parentId];
			Order storage parentPrev = market.orderbook[parent.prev];
			Order storage parentNext = market.orderbook[parent.next];
		
			if (parentId != 0) {
				if (_price >= parent.price) {
					order.next = parent.next;
					order.prev = parentId;
					parent.next = orderId;
					parentNext.prev = orderId;
				} else {
					order.next = parentId;
					order.prev = parent.prev;
					parent.prev = orderId;
					parentPrev.next = orderId;
				}
			} else {
				order.next = 0;
				order.prev = 0;
			}

			if ((order.sell && market.bid == 0) || (order.sell && order.price < market.orderbook[market.bid].price)) {
				market.bid = orderId;
				emit Bid(_marketAddress, _price);
			}

			if ((!order.sell && market.ask == 0) || (!order.sell && order.price >= market.orderbook[market.ask].price)) {
				market.ask = orderId;
				emit Ask(_marketAddress, _price);
			}

			market.priceTree.placeAfter(parentId, orderId, order.price);
			market.orderbook[orderId] = order;
			market.lastIdForPrice[order.price] = orderId;
			emit NewOrder(msg.sender, _marketAddress, orderId, order.price, order.amount, now, order.sell);
		}
	}

	function matchSellOrders(address _marketAddress, Market storage market, Order memory order, uint64 orderId) private {
		uint64 matchedId = market.bid;

		while (matchedId != 0 && order.amount != 0 && order.price >= market.orderbook[matchedId].price) {
			Order storage matchedOrder = market.orderbook[matchedId];

			uint tradeAmountInTokens;
			if (order.amount >= matchedOrder.amount) {
				tradeAmountInTokens = matchedOrder.amount;
			} else {
				tradeAmountInTokens = order.amount;
			}
			uint tradeAmountInEther = (tradeAmountInTokens.mul(matchedOrder.price)).div(1 ether);
			uint overpaid = ((tradeAmountInTokens.mul(order.price)).div(1 ether)).sub(tradeAmountInEther);
			order.amount = order.amount.sub(tradeAmountInTokens);
			matchedOrder.amount = matchedOrder.amount.sub(tradeAmountInTokens);

			trade(_marketAddress, 0, matchedOrder.user, order.user, tradeAmountInTokens, tradeAmountInEther, overpaid);

			emit Trade(_marketAddress, orderId, matchedId, matchedOrder.price, tradeAmountInTokens, now, order.sell);

			if (matchedOrder.amount != 0) {
				break;
			}

			Order memory removed = remove(_marketAddress, matchedId);

			matchedId = removed.next;
		}
	}

	function matchBuyOrders(address _marketAddress, Market storage market, Order memory order, uint64 orderId) private {
		uint64 matchedId = market.ask;

		while (matchedId != 0 && order.amount != 0 && order.price <= market.orderbook[matchedId].price) {
			Order storage matchedOrder = market.orderbook[matchedId];

			uint tradeAmountInTokens;
			if (order.amount >= matchedOrder.amount) {
				tradeAmountInTokens = matchedOrder.amount;
			} else {
				tradeAmountInTokens = order.amount;
			}
			uint tradeAmountInEther = (tradeAmountInTokens.mul(matchedOrder.price)).div(1 ether);
			order.amount = order.amount.sub(tradeAmountInTokens);
			matchedOrder.amount = matchedOrder.amount.sub(tradeAmountInTokens);

			trade(0, _marketAddress, matchedOrder.user, order.user, tradeAmountInEther, tradeAmountInTokens, 0);

			emit Trade(_marketAddress, orderId, matchedId, matchedOrder.price, tradeAmountInTokens, now, order.sell);

			if (matchedOrder.amount != 0) {
				break;
			}

			Order memory removed = remove(_marketAddress, matchedId);
			matchedId = removed.prev;
		}
	}

	function trade(address token1, address token2, address user1, address user2, uint amount1, uint amount2, uint overpaid) private {
		uint makerFee = (fees[uint(Fee.Maker)].mul(amount2)).div(1 ether);
		uint takerFee = (fees[uint(Fee.Taker)].mul(amount1)).div(1 ether);
		balances[token1][user1].reserved = balances[token1][user1].reserved.sub(amount1);
		balances[token2][user1].available = balances[token2][user1].available.add(amount2.sub(makerFee));
		balances[token2][user2].reserved = balances[token2][user2].reserved.sub(amount2).sub(overpaid);
		balances[token1][user2].available = balances[token1][user2].available.add(amount1.sub(takerFee));
		balances[token2][user2].available = balances[token2][user2].available.add(overpaid);
		balances[token1][feeCollector].available = balances[token1][feeCollector].available.add(takerFee);
		balances[token2][feeCollector].available = balances[token2][feeCollector].available.add(makerFee);
	}

	function cancelOrder(address _marketAddress, uint64 _orderId) public {
		require(_marketAddress != 0);
		Market storage market = markets[_marketAddress];
		Order storage order = market.orderbook[_orderId];
		require(order.user == msg.sender);

		if (order.sell) {
			balances[_marketAddress][msg.sender].available = balances[_marketAddress][msg.sender].available.add(order.amount);
			balances[_marketAddress][msg.sender].reserved = balances[_marketAddress][msg.sender].reserved.sub(order.amount);
		} else {
			uint etherAmount = (order.price.mul(order.amount)).div(1 ether);
			balances[0][msg.sender].available = balances[0][msg.sender].available.add(etherAmount);
			balances[0][msg.sender].reserved = balances[0][msg.sender].reserved.sub(etherAmount);
		}

		remove(_marketAddress, _orderId);
	}

	function remove(address _marketAddress, uint64 _orderId) private returns (Order) {
		Market storage market = markets[_marketAddress];
		Order memory order = market.orderbook[_orderId];
		if (market.bid == _orderId) {
			if (market.orderbook[order.prev].price == order.price) {
				market.bid = order.prev;
	    	emit Bid(_marketAddress, market.orderbook[order.prev].price);
			} else {
				market.bid = order.next;
	    	emit Bid(_marketAddress, market.orderbook[order.next].price);
			}
		}
		if (market.ask == _orderId) {
	    market.ask = order.prev;
	    emit Ask(_marketAddress, market.orderbook[order.prev].price);
		}
		market.orderbook[order.next].prev = order.prev;
		market.orderbook[order.prev].next = order.next;
		if (market.lastIdForPrice[order.price] == _orderId) {
			if (market.orderbook[order.prev].price == order.price) {
				market.lastIdForPrice[order.price] = order.prev;
			} else {
				delete market.lastIdForPrice[order.price];
			}
		}
		market.priceTree.remove(_orderId);
		delete market.orderbook[_orderId];
		return order;
	}

	function getOrder(address _marketAddress, uint64 _orderId) public view returns (address user, uint amount, uint price, uint64 next, uint64 prev, bool sell) {
		require(_marketAddress != 0);
		Order memory order = markets[_marketAddress].orderbook[_orderId];
		user = order.user;
		amount = order.amount;
		price = order.price;
		next = order.next;
		prev = order.prev;
		sell = order.sell;
	}

	function getMarketInfo(address _marketAddress) public view returns (uint64 bid, uint64 ask) {
		require(_marketAddress != 0);
		Market memory market = markets[_marketAddress];
		bid = market.bid;
		ask = market.ask;
	}

	function getLastOrderIdForMarketPrice(address _marketAddress, uint _price) public view returns (uint64 id) {
		id = markets[_marketAddress].lastIdForPrice[_price];
	}
}

    Contract ABI  
[{"constant":true,"inputs":[{"name":"_marketAddress","type":"address"}],"name":"getMarketInfo","outputs":[{"name":"bid","type":"uint64"},{"name":"ask","type":"uint64"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_token","type":"address"},{"name":"_amount","type":"uint256"}],"name":"deposit","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"fees","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_feeCollector","type":"address"}],"name":"changeFeeCollector","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_marketAddress","type":"address"},{"name":"_amount","type":"uint256"},{"name":"_price","type":"uint256"},{"name":"_sell","type":"bool"}],"name":"createOrder","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_marketAddress","type":"address"},{"name":"_orderId","type":"uint64"}],"name":"getOrder","outputs":[{"name":"user","type":"address"},{"name":"amount","type":"uint256"},{"name":"price","type":"uint256"},{"name":"next","type":"uint64"},{"name":"prev","type":"uint64"},{"name":"sell","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_owner","type":"address"}],"name":"changeOwner","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_marketAddress","type":"address"},{"name":"_price","type":"uint256"}],"name":"getLastOrderIdForMarketPrice","outputs":[{"name":"id","type":"uint64"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_marketAddress","type":"address"},{"name":"_orderId","type":"uint64"}],"name":"cancelOrder","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_token","type":"address"},{"name":"_user","type":"address"}],"name":"getBalance","outputs":[{"name":"available","type":"uint256"},{"name":"reserved","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_type","type":"uint256"},{"name":"_value","type":"uint256"}],"name":"changeFee","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_token","type":"address"},{"name":"_amount","type":"uint256"}],"name":"withdraw","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"inputs":[],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"name":"token","type":"address"},{"indexed":true,"name":"user","type":"address"},{"indexed":false,"name":"amount","type":"uint256"},{"indexed":false,"name":"balance","type":"uint256"}],"name":"Deposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"token","type":"address"},{"indexed":true,"name":"user","type":"address"},{"indexed":false,"name":"amount","type":"uint256"},{"indexed":false,"name":"balance","type":"uint256"}],"name":"Withdraw","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"user","type":"address"},{"indexed":true,"name":"market","type":"address"},{"indexed":true,"name":"id","type":"uint64"},{"indexed":false,"name":"price","type":"uint256"},{"indexed":false,"name":"amount","type":"uint256"},{"indexed":false,"name":"timestamp","type":"uint256"},{"indexed":false,"name":"sell","type":"bool"}],"name":"NewOrder","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"token","type":"address"},{"indexed":false,"name":"price","type":"uint256"}],"name":"Ask","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"token","type":"address"},{"indexed":false,"name":"price","type":"uint256"}],"name":"Bid","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"token","type":"address"},{"indexed":true,"name":"bid","type":"uint64"},{"indexed":true,"name":"ask","type":"uint64"},{"indexed":false,"name":"price","type":"uint256"},{"indexed":false,"name":"amount","type":"uint256"},{"indexed":false,"name":"timestamp","type":"uint256"},{"indexed":false,"name":"sell","type":"bool"}],"name":"Trade","type":"event"}]

  Contract Creation Code Switch To Opcodes View
608060405234801561001057600080fd5b50600080547fffffffff0000000000000000000000000000000000000000ffffffffffffffff163368010000000000000000810291909117825560018054600160a060020a031916909117905561332390819061006d90396000f3006080604052600436106100a05763ffffffff60e060020a6000350416630cf85bcc81146100a557806347e7ef24146100ec5780634acc79ed146101055780639245290d1461012f5780639956b43614610150578063a4d91c9a1461017c578063a6f9dae1146101f1578063cb10580514610212578063d4ba166614610252578063d4fac45d1461027f578063e3ca2d65146102bf578063f3fef3a3146102da575b600080fd5b3480156100b157600080fd5b506100c6600160a060020a03600435166102fe565b604080516001604060020a03938416815291909216602082015281519081900390910190f35b610103600160a060020a03600435166024356103be565b005b34801561011157600080fd5b5061011d60043561058c565b60408051918252519081900360200190f35b34801561013b57600080fd5b50610103600160a060020a036004351661059e565b34801561015c57600080fd5b50610103600160a060020a036004351660243560443560643515156105eb565b34801561018857600080fd5b506101a9600160a060020a03600435166001604060020a0360243516610d2d565b60408051600160a060020a0390971687526020870195909552858501939093526001604060020a039182166060860152166080840152151560a0830152519081900360c00190f35b3480156101fd57600080fd5b50610103600160a060020a0360043516610df7565b34801561021e57600080fd5b50610236600160a060020a0360043516602435610e56565b604080516001604060020a039092168252519081900360200190f35b34801561025e57600080fd5b50610103600160a060020a03600435166001604060020a0360243516610e8a565b34801561028b57600080fd5b506102a6600160a060020a0360043581169060243516611045565b6040805192835260208301919091528051918290030190f35b3480156102cb57600080fd5b50610103600435602435611078565b3480156102e657600080fd5b50610103600160a060020a03600435166024356110a3565b600080610309613205565b600160a060020a038416151561031e57600080fd5b505050600160a060020a0316600090815260046020818152604092839020835160c08101855260028201546001604060020a0390811660a0830190815282529190930154808216928401839052604060020a81048216948401859052700100000000000000000000000000000000810482166060850152780100000000000000000000000000000000000000000000000090041660809092019190915291565b600160a060020a0382161515610429573481146103da57600080fd5b3360009081526000805160206132b88339815191526020526040902054610407903463ffffffff61131c16565b3360009081526000805160206132b88339815191526020526040902055610529565b341561043457600080fd5b600160a060020a0382166000908152600260209081526040808320338452909152902054610468908263ffffffff61131c16565b600160a060020a0383166000818152600260209081526040808320338085529083528184209590955580517f23b872dd0000000000000000000000000000000000000000000000000000000081526004810195909552306024860152604485018690525192936323b872dd9360648083019491928390030190829087803b1580156104f257600080fd5b505af1158015610506573d6000803e3d6000fd5b505050506040513d602081101561051c57600080fd5b5051151561052957600080fd5b600160a060020a038216600081815260026020908152604080832033808552908352928190205481518681529283015280519293927fdcbc1c05240f31ff3ad067ef1ee35ce4997762752e3a095284754544f4c709d79281900390910190a35050565b60036020526000908152604090205481565b600054604060020a9004600160a060020a031633146105bc57600080fd5b6001805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b60006105f561323b565b60008080808080600160a060020a038c16151561061157600080fd5b600160a060020a038c166000908152600460209081526040808320338b52918a018e905289018c90528a15801560608b01524260808b0152825467ffffffffffffffff19811660016001604060020a03928316019182161790935590995090965061071657600160a060020a038c1660009081526002602090815260408083203384529091529020546106aa908c63ffffffff61133916565b600160a060020a038d1660009081526002602090815260408083203384529091529020908155600101546106de908c61131c565b600160a060020a038d1660009081526002602090815260408083203384529091529020600101556107118c898989611350565b6107c7565b61073e670de0b6b3a76400006107328c8e63ffffffff61152416565b9063ffffffff61155216565b3360009081526000805160206132b8833981519152602052604090205490955061076e908663ffffffff61133916565b3360009081526000805160206132b8833981519152602052604090209081556001015461079b908661131c565b3360009081526000805160206132b883398151915260205260409020600101556107c78c898989611575565b602087015115610d1f57604080880151600090815260018a0160205220546001604060020a03161515610888578760020173147e7f491ddabc0488edb47f8700633dbaad1fd163eb9d50e4909189604001516040518363ffffffff1660e060020a028152600401808381526020018281526020019250505060206040518083038186803b15801561085757600080fd5b505af415801561086b573d6000803e3d6000fd5b505050506040513d602081101561088157600080fd5b50516108a6565b604080880151600090815260018a0160205220546001604060020a03165b6001604060020a03808216600081815260208c905260408082206005810154604060020a8104861684528284209516835291209397509550909350909150156109b25760028301548a1061095457600580840180546001604060020a0380821660a08c015287811660c08c0152891667ffffffffffffffff1990911681179091559082018054604060020a9092026fffffffffffffffff0000000000000000199092169190911790556109ad565b6001604060020a0380851660a089015260058085018054604060020a808204851660c08d0152938a169384026fffffffffffffffff0000000000000000199091161790558301805467ffffffffffffffff191690911790555b6109c1565b600060a0880181905260c08801525b866060015180156109dd575060048801546001604060020a0316155b80610a17575086606001518015610a17575060048801546001604060020a0316600090815260208990526040908190206002015490880151105b15610a7c576004880180546001604060020a03881667ffffffffffffffff19909116179055604080518b81529051600160a060020a038e16917fe684a55f31b79eca403df938249029212a5925ec6be8012e099b45bc1019e5d2919081900360200190a25b8660600151158015610aa057506004880154604060020a90046001604060020a0316155b80610ae357508660600151158015610ae357506004880154604060020a90046001604060020a031660009081526020899052604090819020600201549088015110155b15610b56576004880180546001604060020a038816604060020a026fffffffffffffffff000000000000000019909116179055604080518b81529051600160a060020a038e16917f32eb218d63024a6bd54a3e6467c1545c355c44c2e1c17940b1a0ed1555ffeffe919081900360200190a25b6040870151610b739060028a01908690899063ffffffff61177a16565b86886000016000886001604060020a03166001604060020a0316815260200190815260200160002060008201518160000160006101000a815481600160a060020a030219169083600160a060020a03160217905550602082015181600101556040820151816002015560608201518160030160006101000a81548160ff0219169083151502179055506080820151816004015560a08201518160050160006101000a8154816001604060020a0302191690836001604060020a0316021790555060c08201518160050160086101000a8154816001604060020a0302191690836001604060020a03160217905550905050858860010160008960400151815260200190815260200160002060006101000a8154816001604060020a0302191690836001604060020a03160217905550856001604060020a03168c600160a060020a031633600160a060020a03167ff5a4026cc8202624d31de8fb5fd91611f38f46e72d1e39dfae4852c53059fcde8a604001518b60200151428d60600151604051808581526020018481526020018381526020018215151515815260200194505050505060405180910390a45b505050505050505050505050565b600080600080600080610d3e61323b565b600160a060020a0389161515610d5357600080fd5b50505050600160a060020a0394851660009081526004602081815260408084206001604060020a039889168552825292839020835160e0810185528154909916808a526001820154928a018390526002820154948a01859052600382015460ff16151560608b018190529382015460808b015260059091015480891660a08b01819052604060020a90910490981660c0909901899052989097929695509193509150565b600054604060020a9004600160a060020a03163314610e1557600080fd5b60008054600160a060020a03909216604060020a027fffffffff0000000000000000000000000000000000000000ffffffffffffffff909216919091179055565b600160a060020a0390911660009081526004602090815260408083209383526001909301905220546001604060020a031690565b60008080600160a060020a0385161515610ea357600080fd5b600160a060020a0380861660009081526004602090815260408083206001604060020a03891684529182905290912080549195509350163314610ee557600080fd5b600382015460ff1615610f8e576001820154600160a060020a0386166000908152600260209081526040808320338452909152902054610f2a9163ffffffff61131c16565b600160a060020a03861660009081526002602090815260408083203384529091529020908155600183810154910154610f6291611339565b600160a060020a0386166000908152600260209081526040808320338452909152902060010155611033565b610fb5670de0b6b3a76400006107328460010154856002015461152490919063ffffffff16565b3360009081526000805160206132b88339815191526020526040902054909150610fe5908263ffffffff61131c16565b3360009081526000805160206132b883398151915260205260409020908155600101546110129082611339565b3360009081526000805160206132b883398151915260205260409020600101555b61103d8585611922565b505050505050565b600160a060020a039182166000908152600260209081526040808320939094168252919091522080546001909101549091565b66b1a2bc2ec50000811115611091575066b1a2bc2ec500005b60009182526003602052604090912055565b600160a060020a03821660009081526002602090815260408083203384529091528120548211156110d357600080fd5b600160a060020a0383166000908152600260209081526040808320338452909152902054611107908363ffffffff61133916565b600160a060020a038416600090815260026020818152604080842033855290915282209290925561116391670de0b6b3a7640000916107329186916003915b81526020019081526020016000205461152490919063ffffffff16565b600160a060020a0380851660009081526002602090815260408083206001549094168352929052205490915061119f908263ffffffff61131c16565b600160a060020a03808516600081815260026020908152604080832060015490951683529390529190912091909155151561120f57336108fc6111e8848463ffffffff61133916565b6040518115909202916000818181858888f19350505050151561120a57600080fd5b6112b8565b600160a060020a03831663a9059cbb3361122f858563ffffffff61133916565b6040518363ffffffff1660e060020a0281526004018083600160a060020a0316600160a060020a0316815260200182815260200192505050602060405180830381600087803b15801561128157600080fd5b505af1158015611295573d6000803e3d6000fd5b505050506040513d60208110156112ab57600080fd5b505115156112b857600080fd5b600160a060020a038316600081815260026020908152604080832033808552908352928190205481518781529283015280519293927ff341246adaac6f497bc2a656f546ab9e182111d630394f0c57c710a59a2cb5679281900390910190a3505050565b60008282018381101561132e57600080fd5b8091505b5092915050565b6000808383111561134957600080fd5b5050900390565b60008060008061135e61323b565b6004880154604060020a90046001604060020a031694505b6001604060020a038516158015906113915750602087015115155b80156113bd57506001604060020a03851660009081526020899052604090819020600201549088015111155b15611519576001604060020a038516600090815260208981526040909120600181015491890151909550106113f85783600101549250611400565b866020015192505b611423670de0b6b3a764000061073286600201548661152490919063ffffffff16565b602088015190925061143b908463ffffffff61133916565b60208801526001840154611455908463ffffffff61133916565b600185015583548751611479916000918c91600160a060020a031690868885611d39565b846001604060020a0316866001604060020a03168a600160a060020a03167f55b32d6233426fc7f87c6cbb2710d14d738b3277d7c879d5ca2f2aa19b508d80876002015487428d60600151604051808581526020018481526020018381526020018215151515815260200194505050505060405180910390a460018401541561150157611519565b61150b8986611922565b90508060c001519450611376565b505050505050505050565b6000808315156115375760009150611332565b5082820282848281151561154757fe5b041461132e57600080fd5b60008080831161156157600080fd5b828481151561156c57fe5b04949350505050565b600080600080600061158561323b565b60048901546001604060020a031695505b6001604060020a038616158015906115b15750602088015115155b80156115dd57506001604060020a038616600090815260208a9052604090819020600201549089015110155b1561176e576001604060020a038616600090815260208a815260409091206001810154918a0151909650106116185784600101549350611620565b876020015193505b611643670de0b6b3a764000061073287600201548761152490919063ffffffff16565b92506116788361166c670de0b6b3a76400006107328c604001518961152490919063ffffffff16565b9063ffffffff61133916565b6020890151909250611690908563ffffffff61133916565b602089015260018501546116aa908563ffffffff61133916565b6001860155845488516116ce918c91600091600160a060020a031690888888611d39565b856001604060020a0316876001604060020a03168b600160a060020a03167f55b32d6233426fc7f87c6cbb2710d14d738b3277d7c879d5ca2f2aa19b508d80886002015488428e60600151604051808581526020018481526020018381526020018215151515815260200194505050505060405180910390a46001850154156117565761176e565b6117608a87611922565b90508060a001519550611596565b50505050505050505050565b611782613277565b608081018290526001604060020a038416602082018190526001825215611853576001604060020a038416600090815260018087016020526040909120015482101561180f576001604060020a03808516600090815260018701602052604090208054918516604860020a0270ffffffffffffffff0000000000000000001990921691909117905561184e565b6001604060020a03808516600090815260018701602052604090208054918516608860020a026000805160206132d88339815191529092169190911790555b61186e565b845467ffffffffffffffff19166001604060020a0384161785555b6001604060020a0380841660009081526001808801602090815260409283902085518154928701519487015160608801518716608860020a026000805160206132d8833981519152918816604860020a0270ffffffffffffffff00000000000000000019979098166101000268ffffffffffffffff001993151560ff19909616959095179290921693909317949094169490941716919091178255608083015191015561191b8584612002565b5050505050565b61192a61323b565b600061193461323b565b5050600160a060020a0380841660009081526004602081815260408084206001604060020a0380891680875282855295839020835160e08101855281549098168852600181015494880194909452600284015492870192909252600383015460ff161515606087015282840154608087015260059092015480821660a0870152604060020a9004811660c08601529181015490939291161415611aed5760408082015160c08301516001604060020a03166000908152602085905291909120600201541415611a775760c081015160048301805467ffffffffffffffff19166001604060020a039092169182179055600090815260208381526040918290206002015482519081529151600160a060020a038816927fe684a55f31b79eca403df938249029212a5925ec6be8012e099b45bc1019e5d292908290030190a2611aed565b60a081015160048301805467ffffffffffffffff19166001604060020a039092169182179055600090815260208381526040918290206002015482519081529151600160a060020a038816927fe684a55f31b79eca403df938249029212a5925ec6be8012e099b45bc1019e5d292908290030190a25b60048201546001604060020a03858116604060020a909204161415611b905760c08101516004830180546fffffffffffffffff00000000000000001916604060020a6001604060020a03909316928302179055600090815260208381526040918290206002015482519081529151600160a060020a038816927f32eb218d63024a6bd54a3e6467c1545c355c44c2e1c17940b1a0ed1555ffeffe92908290030190a25b60c08101805160a0830180516001604060020a03908116600090815260208781526040808320600590810180546fffffffffffffffff00000000000000001916604060020a98871698909802979097179096559351955183168252838220909401805467ffffffffffffffff191695831695909517909455818501518452600186019092529091205485821691161415611cae5760408082015160c08301516001604060020a03166000908152602085905291909120600201541415611c8b5760c081015160408083015160009081526001850160205220805467ffffffffffffffff19166001604060020a03909216919091179055611cae565b60408082015160009081526001840160205220805467ffffffffffffffff191690555b611cc1600283018563ffffffff61224d16565b6001604060020a0384166000908152602083905260408120805473ffffffffffffffffffffffffffffffffffffffff19168155600181018290556002810182905560038101805460ff19169055600481019190915560050180546fffffffffffffffffffffffffffffffff1916905591505092915050565b600080611d55670de0b6b3a76400006107328660038580611146565b9150611d72670de0b6b3a764000061073287600360006001611146565b600160a060020a03808b166000908152600260209081526040808320938c1683529290522060010154909150611dae908663ffffffff61133916565b600160a060020a03808b166000908152600260209081526040808320938c1683529290522060010155611e1c611dea858463ffffffff61133916565b600160a060020a03808b166000908152600260209081526040808320938d16835292905220549063ffffffff61131c16565b600160a060020a0389811660009081526002602090815260408083208c851684529091528082209390935590881681522060010154611e6190849061166c9087611339565b600160a060020a03808a166000908152600260209081526040808320938b1683529290522060010155611ecf611e9d868363ffffffff61133916565b600160a060020a03808c166000908152600260209081526040808320938c16835292905220549063ffffffff61131c16565b600160a060020a03808b1660009081526002602081815260408084208c861680865290835281852096909655938d16835290815282822093825292909252902054611f20908463ffffffff61131c16565b600160a060020a03808a1660009081526002602081815260408084208c861685528252808420959095558d841683529081528382206001549093168252919091522054611f73908263ffffffff61131c16565b600160a060020a03808b1660009081526002602081815260408084206001805487168652908352818520969096558d8516845291815281832094549093168252929091522054611fc9908363ffffffff61131c16565b600160a060020a039889166000908152600260209081526040808320600154909c1683529a905298909820979097555050505050505050565b6001604060020a03808216600090815260018401602052604081205461010090049091169080821515612056576001604060020a03841660009081526001860160205260409020805460ff1916905561191b565b6001604060020a038316600090815260018601602052604090205460ff161561191b57612083858561263e565b915061208f8585612671565b90506001604060020a038116158015906120c357506001604060020a038116600090815260018601602052604090205460ff165b1561211d576001604060020a03808416600090815260018088016020526040808320805460ff199081169091558585168452818420805482169055938616835290912080549092161790556121188583612002565b61191b565b6001604060020a038381166000908152600187016020526040902054608860020a9004811690851614801561217757506001604060020a038281166000908152600187016020526040902054604860020a90048116908416145b156121b257612186858461272e565b6001604060020a039384166000908152600186016020526040902054604860020a900490931692612243565b6001604060020a038381166000908152600187016020526040902054604860020a9004811690851614801561220c57506001604060020a038281166000908152600187016020526040902054608860020a90048116908416145b156122435761221b8584612961565b6001604060020a039384166000908152600186016020526040902054608860020a9004909316925b61191b8585612b94565b6001604060020a0380821660009081526001840160205260408120549091608860020a8204811691604860020a9004168280831580159061229657506001604060020a03831615155b1561242a578394505b6001604060020a038086166000908152600189016020526040902054604860020a900416156122f4576001604060020a039485166000908152600188016020526040902054604860020a90049094169361229f565b6001604060020a038086166000908152600189016020526040902054610100900481169250861682146123a8576001604060020a03858116600081815260018a0160205260408082208054878616845291909220805470ffffffffffffffff0000000000000000001916608860020a928390048616604860020a0217815582546000805160206132d883398151915216948916909102939093179055815468ffffffffffffffff0019166101009091021790555b6001604060020a0385811660009081526001890160205260409020805470ffffffffffffffff0000000000000000001916604860020a92861692830217905515612425576001604060020a038084166000908152600189016020526040902080549187166101000268ffffffffffffffff00199092169190911790555b612445565b6001604060020a0384161561244157839450612445565b8294505b506001604060020a0385811660009081526001880160205260408082205487841683529120805468ffffffffffffffff0019166101009283900490931691820292909217909155801561254b576001604060020a038181166000908152600189016020526040902054604860020a900481169087161415612507576001604060020a03808216600090815260018901602052604090208054918716604860020a0270ffffffffffffffff00000000000000000019909216919091179055612546565b6001604060020a03808216600090815260018901602052604090208054918716608860020a026000805160206132d88339815191529092169190911790555b612566565b865467ffffffffffffffff19166001604060020a0386161787555b6001604060020a038616600090815260018801602052604090205460ff1615156125de576001604060020a038516600090815260018801602052604090205460ff16156125d4576001604060020a03851660009081526001880160205260409020805460ff191690556125de565b6125de8786612c65565b5050506001604060020a03909216600090815260019384016020526040808220805478ffffffffffffffffffffffffffffffffffffffffffffffffff19908116825590860183905582805290822080549091168155909301929092555050565b6001604060020a038082166000908152600184016020526040808220546101009081900484168352912054041692915050565b60008061267e848461263e565b90506001604060020a03811615156126995760009150611332565b6001604060020a03808216600090815260018601602052604080822054868416835291205461010090048216604860020a9091049091161415612701576001604060020a038082166000908152600186016020526040902054608860020a9004169150611332565b6001604060020a038082166000908152600186016020526040902054604860020a90041691505092915050565b6001604060020a03818116600090815260018401602052604080822054608860020a8104841680845291909220805468ffffffffffffffff0019166101009384900490941692830293909317909255801561283c576001604060020a038181166000908152600186016020526040902054604860020a9004811690841614156127f8576001604060020a03808216600090815260018601602052604090208054918416604860020a0270ffffffffffffffff00000000000000000019909216919091179055612837565b6001604060020a03808216600090815260018601602052604090208054918416608860020a026000805160206132d88339815191529092169190911790555b612857565b835467ffffffffffffffff19166001604060020a0383161784555b6001604060020a0382811660008181526001870160205260408082208054888616845291832080546000805160206132d883398151915216604860020a938490048716608860020a021790559290915290540416156128f8576001604060020a03808316600090815260018601602052604080822054604860020a900483168252902080549185166101000268ffffffffffffffff00199092169190911790555b506001604060020a0391821660008181526001949094016020526040808520805468ffffffffffffffff00191661010094909516938402949094179093559083529120805470ffffffffffffffff0000000000000000001916604860020a909202919091179055565b6001604060020a03818116600090815260018401602052604080822054604860020a8104841680845291909220805468ffffffffffffffff00191661010093849004909416928302939093179092558015612a6f576001604060020a038181166000908152600186016020526040902054604860020a900481169084161415612a2b576001604060020a03808216600090815260018601602052604090208054918416604860020a0270ffffffffffffffff00000000000000000019909216919091179055612a6a565b6001604060020a03808216600090815260018601602052604090208054918416608860020a026000805160206132d88339815191529092169190911790555b612a8a565b835467ffffffffffffffff19166001604060020a0383161784555b6001604060020a03828116600081815260018701602052604080822080548886168452918320805470ffffffffffffffff0000000000000000001916608860020a938490048716604860020a02179055929091529054041615612b2f576001604060020a03808316600090815260018601602052604080822054608860020a900483168252902080549185166101000268ffffffffffffffff00199092169190911790555b506001604060020a0391821660008181526001949094016020526040808520805468ffffffffffffffff0019166101009490951693840294909417909355908352912080546000805160206132d883398151915216608860020a909202919091179055565b6001604060020a038082166000908152600184016020526040812054610100900490911690612bc3848461263e565b6001604060020a03808416600081815260018089016020526040808320805460ff19908116825586881685529184208054909216909217905591905254919250848116604860020a90920416148015612c4157506001604060020a038181166000908152600186016020526040902054604860020a90048116908316145b15612c5557612c508482612961565b612c5f565b612c5f848261272e565b50505050565b6001604060020a0380821660009081526001840160205260408120546101009004909116908115612c5f57612c9a8484612d33565b6001604060020a038116600090815260018601602052604090205490915060ff1615612d29576001604060020a03828116600081815260018781016020526040808320805460ff1990811690931781558686168452908320805490921690915591905254604860020a900481169084161415612d1f57612d1a848361272e565b612d29565b612d298483612961565b612c5f8484612dc7565b6001604060020a03808216600081815260018501602052604080822054610100900484168083529082205491939092604860020a909204161415612d9c576001604060020a038082166000908152600186016020526040902054608860020a9004169150611332565b6001604060020a038082166000908152600186016020526040902054604860020a9004169150611332565b600080600080612dd78686612d33565b6001604060020a03808716600090815260018901602052604080822054838516835281832054610100909104841680845291909220549397509550604860020a810482169450608860020a900416915060ff16158015612e5257506001604060020a038416600090815260018701602052604090205460ff16155b8015612e7957506001604060020a038216600090815260018701602052604090205460ff16155b8015612ea057506001604060020a038116600090815260018701602052604090205460ff16155b15612edb576001604060020a038416600090815260018781016020526040909120805460ff19169091179055612ed68684612c65565b61103d565b6001604060020a038316600090815260018701602052604090205460ff168015612f2057506001604060020a038416600090815260018701602052604090205460ff16155b8015612f4757506001604060020a038216600090815260018701602052604090205460ff16155b8015612f6e57506001604060020a038116600090815260018701602052604090205460ff16155b15612fb1576001604060020a03808516600090815260018881016020526040808320805460ff19908116909317905592861682529190208054909116905561103d565b6001604060020a038416600090815260018701602052604090205460ff161515613156576001604060020a038381166000908152600188016020526040902054604860020a9004811690861614801561302557506001604060020a038116600090815260018701602052604090205460ff16155b801561304b57506001604060020a038216600090815260018701602052604090205460ff165b15613098576001604060020a03808516600090815260018881016020526040808320805460ff1990811690931790559285168252919020805490911690556130938685612961565b613156565b6001604060020a038381166000908152600188016020526040902054608860020a900481169086161480156130e857506001604060020a038216600090815260018701602052604090205460ff16155b801561310e57506001604060020a038116600090815260018701602052604090205460ff165b15613156576001604060020a03808516600090815260018881016020526040808320805460ff199081169093179055928416825291902080549091169055613156868561272e565b6001604060020a03808416600081815260018901602052604080822080548986168452918320805460ff909316151560ff199384161790559290915281541690819055868216604860020a90910490911614156131d9576001604060020a03811660009081526001870160205260409020805460ff19169055612ed6868461272e565b6001604060020a03821660009081526001870160205260409020805460ff1916905561103d8684612961565b60a0604051908101604052806132196132a5565b8152600060208201819052604082018190526060820181905260809091015290565b6040805160e081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c081019190915290565b6040805160a08101825260008082526020820181905291810182905260608101829052608081019190915290565b604080516020810190915260008152905600ac33ff75c19e70fe83507db0d683fd3465c996598dc972688b7ace676c89077bffffffffffffff0000000000000000ffffffffffffffffffffffffffffffffffa165627a7a72305820d4541f5121b3466cb2d5e6a8ee17eeac0873935e83c28ca6ed191b59c920e2020029

   Library Used
RedBlackTree : 0x147e7f491ddabc0488edb47f8700633dbaad1fd1

   Swarm Source:
bzzr://d4541f5121b3466cb2d5e6a8ee17eeac0873935e83c28ca6ed191b59c920e202

 

View All
Block Age transaction Difficulty GasUsed Reward
View All
Block Age UncleNumber Difficulty GasUsed Reward