Contract 0x7600977eb9effa627d6bd0da2e5be35e11566341

Dex  

 

Contract Overview

DEx.top
Balance:
226.91472162 Ether

EtherValue:
$33,524.38 (@ $147.74/ETH)

Token:
TxHash Block Age From To Value [TxFee]
0x5a807e8db69e9f14053000c3f833e9eaa9a71e93d3d265ed9d10c826cca0495272336821 day 7 hrs ago0x6d11d27c247e090f26a3cb9c81e5915b40893bf7  IN   DEx.top0 Ether0.00027559614
0xcb2b2af93278729d5a0047ce81e779cab9e03771096d97e997a16c2c63569b5572336791 day 7 hrs ago0xfd2d91100c786fcb1f3e8103ca1880a869828b1f  IN   DEx.top0 Ether0.00024880398
0x65cb79f6cab2d276bd14bfa052bbe6b48396c1f76d4090b048aad3b51832486a72236043 days 17 hrs ago0xcc2e120112b68c64c059c0e3a802439207024551  IN   DEx.top0 Ether0.0003167935
0x6673c642d4fe0b9715a7648966909abb0c090f71ff49538ee19a14a073e1fac072236013 days 17 hrs ago0xfd2d91100c786fcb1f3e8103ca1880a869828b1f  IN   DEx.top0 Ether0.00047433732
0x809516ac9958eaa9846a43dd7417701421ea9931be0775efeb9b40c053fdce3472232873 days 19 hrs ago0xe3a54c104d4afe88a7ffda2a2d7c21296921c60e  IN   DEx.top0 Ether0.0003167935
0x456e1c9959ff9aaf82ad4e25acf8983e514cc268bf2c63ff01ab75315a0159f472232833 days 19 hrs ago0xfd2d91100c786fcb1f3e8103ca1880a869828b1f  IN   DEx.top0 Ether0.00047433732
0xdc6eac8f046299356a66b86e30001eea8578938df653ebc855ec7163c253be2572232683 days 19 hrs ago0xfd2d91100c786fcb1f3e8103ca1880a869828b1f  IN   DEx.top0 Ether0.00061160843
0xe24a013290f2f8f578bd7f2a8689dbdfffbb5c296e239762a3e35ff0c68b4d3072232543 days 19 hrs ago0x4a22dd5fb8230426e43ce822cc840c52aeabe53b  IN   DEx.top0.018 Ether0.0006675584
0xafb9bfc14b5d379541402bd006ceff842eebf2260c96293732670af95b1ea39972153875 days 16 hrs ago0xfd2d91100c786fcb1f3e8103ca1880a869828b1f  IN   DEx.top0 Ether0.000497194623
0x96cc0167f90c71b9cb31864670bc861b2fb4c9362e79bfa3c68143c748d9721372153735 days 17 hrs ago0x425b3d68ed95b0ab7ed36985044c83319cc8de80  IN   DEx.top0.1 Ether0.000417224
0xe7d70b53e0b6c64be02d30b0051a162a984d005078b642f9cd9b48b826a66b8b72153435 days 17 hrs ago0xed1cb1cf6f76f0aa4b20f282611c9dbf02944f9c  IN   DEx.top0 Ether0.000762399432
0x892c198b859f7537b363dd8a05d55408f2583f85e421823a627deccf6993b1b172153405 days 17 hrs ago0xfd2d91100c786fcb1f3e8103ca1880a869828b1f  IN   DEx.top0 Ether0.000567093888
0xc0dd524b937e3459816c94cd4b59cf480fd85276f6450f77480108e4ae0b9fc472152765 days 17 hrs ago0xfd2d91100c786fcb1f3e8103ca1880a869828b1f  IN   DEx.top0 Ether0.00159147675
0x780fafc1194f9d958072d431c9c41cc614f8b5f7a9cc32aed6606eabfe76556e72152515 days 17 hrs ago0xfd2d91100c786fcb1f3e8103ca1880a869828b1f  IN   DEx.top0 Ether0.00061160843
0xaa2bbe06759b794e82df2c9243ce46046c88226f4b53819fede5dc908df4132572152365 days 17 hrs ago0x425b3d68ed95b0ab7ed36985044c83319cc8de80  IN   DEx.top0.1 Ether0.000667575088
0x20d6f2ba535bae07cf3c9150277339cca2f8c0a9c16fc861aea59a5923b5dac972136816 days 2 hrs ago0xfd2d91100c786fcb1f3e8103ca1880a869828b1f  IN   DEx.top0 Ether0.00045395843
0xdeca0f37f48d32817c3888b0f5b76c7e3bd8628dd36f7af81599d8eec1900b1572136676 days 2 hrs ago0x853dd39d83f45cf68cfdba40db10af9b427c2a0c  IN   DEx.top0.15 Ether0.000417224
0x9356a5c74080877646f3f72d99fae365e7bf0b6b2186322c5d67c69328e85d01718777311 days 19 hrs ago0x6d11d27c247e090f26a3cb9c81e5915b40893bf7  IN   DEx.top0 Ether0.00036035207
0x502b7dbc6936294dca7d3843a47c5c35c69c95094566eafb459d4e8371bb613d718777011 days 19 hrs ago0xfd2d91100c786fcb1f3e8103ca1880a869828b1f  IN   DEx.top0 Ether0.000340727716
0xf7fef62c3b88087de4be8d2b920fc10563759c641a4f03a01c9ff372939b8f97718479112 days 9 hrs ago0x6d11d27c247e090f26a3cb9c81e5915b40893bf7  IN   DEx.top0 Ether0.00051045707
0xe824cfb3cb1bacef855b343ede2dea180bbfb57a4b59d565335cf6b6f1af9137718478912 days 9 hrs ago0xfd2d91100c786fcb1f3e8103ca1880a869828b1f  IN   DEx.top0 Ether0.000435522848
0x789f5877c20bddec72091b1379832dad4d99ce56f3e42c13297bf13d23ce3f03718474612 days 10 hrs ago0xfd2d91100c786fcb1f3e8103ca1880a869828b1f  IN   DEx.top0 Ether0.00045395843
0x346748ced0272d6e66ba808dcd6ced74b841a81eefdea52402f5c93fae618c68718473312 days 10 hrs ago0x9bd3fd9af7e15e6a13d6103628907dd55bf31b77  IN   DEx.top0 Ether0.0003196374
0x894b5d0b9493153810f63b14abda9ab2da73c507bc999f35076e07b25b125097718466812 days 10 hrs ago0xfd2d91100c786fcb1f3e8103ca1880a869828b1f  IN   DEx.top0 Ether0.00061160843
0xe17a34a8b2e10dd2d595b65793d3d7ff304f8fd2c5e456fbbf1b4150b7ca234a718465512 days 10 hrs ago0x9bd3fd9af7e15e6a13d6103628907dd55bf31b77  IN   DEx.top0 Ether0.0003196374
[ Download CSV Export 

Latest 25 Internal Transaction, Click here to view more Internal Transactions as a result of Contract Execution

Parent TxHash Block Age From To Value
0x65cb79f6cab2d276bd14bfa052bbe6b48396c1f76d4090b048aad3b51832486a72236043 days 17 hrs ago0x7600977eb9effa627d6bd0da2e5be35e115663410xd7130657840d8ad464c58329db6fe0e1c14e5ab00.11485083 Ether
0x809516ac9958eaa9846a43dd7417701421ea9931be0775efeb9b40c053fdce3472232873 days 19 hrs ago0x7600977eb9effa627d6bd0da2e5be35e115663410x4a22dd5fb8230426e43ce822cc840c52aeabe53b0.018 Ether
0xce1d7ea6abd6c52263f4581b54c9b201c97a1b3711a019ecf2fb140b0fe7878d715409618 days 16 hrs ago0x7600977eb9effa627d6bd0da2e5be35e115663410x7baf1fab3efaf086d676642654cf4b290a3b98481.00000001 Ether
0xeed7282fe0476abf6df0695ff5d242b6cbb829e74f68c46df5c03bb4a5359593715372318 days 18 hrs ago0x7600977eb9effa627d6bd0da2e5be35e115663410x6427fc587266813b6993ae4c8de672640cb3b43f3.83004551 Ether
0x5f95a34009cfd1c22bdaac8733df6ed83903e5a689591b1e1eb7185810fc6ac8713902121 days 18 hrs ago0x7600977eb9effa627d6bd0da2e5be35e115663410xb23e21f5de0956ccde757d187c869af4f1d83a251 Ether
0xd65fbfc9b71af986b736a36e7bd27c7d840158c8291a95317f82fa8e29914df2713897221 days 18 hrs ago0x7600977eb9effa627d6bd0da2e5be35e115663410x4dcc12b1a2d06233481bafc8b30e874c3956648e13.5 Ether
0x1c83ce829353309c92b40a846c3b8231ab7a38dc8077a6c6309bc61a3377f686712540824 days 11 hrs ago0x7600977eb9effa627d6bd0da2e5be35e115663410x9e9aede219c3074c9ad1e85bfa52fcf5f3cfd66e37.97031685 Ether
0x2cd84c8a021dfc4b1fc158d24af4038392d320f2cb27729fb383a4611abcbcbc712342424 days 20 hrs ago0x7600977eb9effa627d6bd0da2e5be35e115663410x30de4409073ed51204128b9d10e33f611f2cfb700.44926005 Ether
0x5107cce851adc16253f314ce100ba8999272d67349cf927c92cd46e18db72548711418026 days 16 hrs ago0x7600977eb9effa627d6bd0da2e5be35e115663410x30de4409073ed51204128b9d10e33f611f2cfb700.53763537 Ether
0x02fcdc50c32e5a84fa279b9c86bb7ede566a042609f0bbf08f175502746b4738708735331 days 17 hrs ago0x7600977eb9effa627d6bd0da2e5be35e115663410x5325832cdf994b19407dadc9cb1a6d6e22ee0a230.08081093 Ether
0xd22b031a247b6afdef9764d2baa8f4a933295dba892e2c3dd88eb84af95db802708558532 days 43 mins ago0x7600977eb9effa627d6bd0da2e5be35e115663410xacf026f6720c800014d0b71ed52c0f4a887378eb13.11554868 Ether
0xdfe42727950f15964f4ba49691d01c5bd98f17d97cbd8101e13af0f27868aee4707943533 days 3 hrs ago0x7600977eb9effa627d6bd0da2e5be35e115663410x1a33f12d44d50ce4c2cda00869733d06d3c4b80d0.01 Ether
0x70e75856fd517b483aa1a1c2edbf21753bb9385024f7c8742ad3f07bbff5ff30707795833 days 9 hrs ago0x7600977eb9effa627d6bd0da2e5be35e115663410x61c4d204eb980767876723a85ba1c77394a354230.1 Ether
0x8d538076ad1a8a422fb89be00537495ae1d7f01967efc6371ec383583790ab3e707022034 days 18 hrs ago0x7600977eb9effa627d6bd0da2e5be35e115663410x1a33f12d44d50ce4c2cda00869733d06d3c4b80d208.47706438 Ether
0x3aa8ab18749a79a1475b6b47e3288749a9b367e0c504968cf4744a94637efb8e705601737 days 7 hrs ago0x7600977eb9effa627d6bd0da2e5be35e115663410x4106720c250c58f8b87f570142681e177bc61c361.3 Ether
0x75844c40c4d1af3ed4717ef8b956da2c0ee019e9bc2384722b6978153ea6ff7a705390937 days 16 hrs ago0x7600977eb9effa627d6bd0da2e5be35e115663410x483d42105b2af8fa35f73f95bf5893a621971ce40.18316095 Ether
0x5995ee984bbd1e9fde4cd0784e330f2d58297ce93f5a89aa1cf5658b0a8608ed703898840 days 8 hrs ago0x7600977eb9effa627d6bd0da2e5be35e115663410x777551ef1c6e0bed1e33b46fef3c83ccb8c827b20.95 Ether
0x2917fb2ffbddb273153d4f9479db5230e0a90baaec4430b6e47055275846f9f1703680440 days 18 hrs ago0x7600977eb9effa627d6bd0da2e5be35e115663410x22513b45e064af8533e5fc7b84841f68fbcc2e761.14225681 Ether
0x04ad7a814ff0e9c894ac4fcae254cb50fc98b92e32182ba5a9b78c3fe2cbe3a4703668440 days 18 hrs ago0x7600977eb9effa627d6bd0da2e5be35e115663410x88809fc3912174b9bb8c7f4114cb4d9b59f07a386.73089677 Ether
0xbd776e6db57a5bc530cc2dc999399eb87576216e12998b7c1151a3506d20ac06702424143 days 4 mins ago0x7600977eb9effa627d6bd0da2e5be35e115663410x4dcc12b1a2d06233481bafc8b30e874c3956648e0.02 Ether
0x0d6264d3c411919a2b6df66fadec550a44fd5ede405cfabac45081cb20da704b702057143 days 15 hrs ago0x7600977eb9effa627d6bd0da2e5be35e115663410x7fb25521f58e99bc0e135aa983ad8ebc56c70232100.21749307 Ether
0x8f71e26cac325479fd8ad1c01639fd5726f2c7aaad0025c9c78806d11b01d765702026243 days 17 hrs ago0x7600977eb9effa627d6bd0da2e5be35e115663410xb23e21f5de0956ccde757d187c869af4f1d83a250.03 Ether
0xac55ced976b7a7c7e5460e36f4628d9ba939e8b71138435b5b9d0e72e2da2895699820447 days 15 hrs ago0x7600977eb9effa627d6bd0da2e5be35e115663410x9d30f9d302989ca1df6e4db8361fc2535997cfb70.01 Ether
0x17542d3e69a72a5b9110e50736e0b1e426ecc0ed2bd58a567882a99b45fc8bf8697588051 days 10 hrs ago0x7600977eb9effa627d6bd0da2e5be35e115663410x3679b3fff2033d60684c51bc54ee1e371c62a77b0.52126084 Ether
0xc3ff8da4e95abe089fe92c323f5150af236efbb7fd925ad0aa7c73b9478f449d696744652 days 20 hrs ago0x7600977eb9effa627d6bd0da2e5be35e115663410x3bbb237d0953df3f44cd5b5c09462c6220a569b82.02765347 Ether
[ Download CSV Export 
Warning: The compiled contract might be susceptible to ExpExponentCleanup (medium/high-severity), EventStructWrongData (very low-severity), NestedArrayFunctionCallDecoder (medium-severity) Solidity Compiler Bugs.

Contract Source Code Verified (Exact Match)
Contract Name: Dex2
Compiler Version: v0.4.21+commit.dfe3193c
Optimization Enabled: Yes
Runs (Optimizer):  2000000


Contract Source Code
// DEx.top - Instant Trading on Chain
//
// Author: DEx.top Team

pragma solidity 0.4.21;
pragma experimental "v0.5.0";

interface Token {
  function transfer(address to, uint256 value) external returns (bool success);
  function transferFrom(address from, address to, uint256 value) external returns (bool success);
}

contract Dex2 {
  //------------------------------ Struct Definitions: ---------------------------------------------

  struct TokenInfo {
    string  symbol;       // e.g., "ETH", "ADX"
    address tokenAddr;    // ERC20 token address
    uint64  scaleFactor;  // <original token amount> = <scaleFactor> x <DEx amountE8> / 1e8
    uint    minDeposit;   // mininum deposit (original token amount) allowed for this token
  }

  struct TraderInfo {
    address withdrawAddr;
    uint8   feeRebatePercent;  // range: [0, 100]
  }

  struct TokenAccount {
    uint64 balanceE8;          // available amount for trading
    uint64 pendingWithdrawE8;  // the amount to be transferred out from this contract to the trader
  }

  struct Order {
    uint32 pairId;  // <cashId>(16) <stockId>(16)
    uint8  action;  // 0 means BUY; 1 means SELL
    uint8  ioc;     // 0 means a regular order; 1 means an immediate-or-cancel (IOC) order
    uint64 priceE8;
    uint64 amountE8;
    uint64 expireTimeSec;
  }

  struct Deposit {
    address traderAddr;
    uint16  tokenCode;
    uint64  pendingAmountE8;   // amount to be confirmed for trading purpose
  }

  struct DealInfo {
    uint16 stockCode;          // stock token code
    uint16 cashCode;           // cash token code
    uint64 stockDealAmountE8;
    uint64 cashDealAmountE8;
  }

  struct ExeStatus {
    uint64 logicTimeSec;       // logic timestamp for checking order expiration
    uint64 lastOperationIndex; // index of the last executed operation
  }

  //----------------- Constants: -------------------------------------------------------------------

  uint constant MAX_UINT256 = 2**256 - 1;
  uint16 constant MAX_FEE_RATE_E4 = 60;  // upper limit of fee rate is 0.6% (60 / 1e4)

  // <original ETH amount in Wei> = <DEx amountE8> * <ETH_SCALE_FACTOR> / 1e8
  uint64 constant ETH_SCALE_FACTOR = 10**18;

  uint8 constant ACTIVE = 0;
  uint8 constant CLOSED = 2;

  bytes32 constant HASHTYPES =
      keccak256('string title', 'address market_address', 'uint64 nonce', 'uint64 expire_time_sec',
                'uint64 amount_e8', 'uint64 price_e8', 'uint8 immediate_or_cancel', 'uint8 action',
                'uint16 cash_token_code', 'uint16 stock_token_code');

  //----------------- States that cannot be changed once set: --------------------------------------

  address public admin;                         // admin address, and it cannot be changed
  mapping (uint16 => TokenInfo) public tokens;  // mapping of token code to token information

  //----------------- Other states: ----------------------------------------------------------------

  uint8 public marketStatus;        // market status: 0 - Active; 1 - Suspended; 2 - Closed

  uint16 public makerFeeRateE4;     // maker fee rate (* 10**4)
  uint16 public takerFeeRateE4;     // taker fee rate (* 10**4)
  uint16 public withdrawFeeRateE4;  // withdraw fee rate (* 10**4)

  uint64 public lastDepositIndex;   // index of the last deposit operation

  ExeStatus public exeStatus;       // status of operation execution

  mapping (address => TraderInfo) public traders;     // mapping of trade address to trader information
  mapping (uint176 => TokenAccount) public accounts;  // mapping of trader token key to its account information
  mapping (uint224 => Order) public orders;           // mapping of order key to order information
  mapping (uint64  => Deposit) public deposits;       // mapping of deposit index to deposit information

  //------------------------------ Dex2 Events: ----------------------------------------------------

  event DeployMarketEvent();
  event ChangeMarketStatusEvent(uint8 status);
  event SetTokenInfoEvent(uint16 tokenCode, string symbol, address tokenAddr, uint64 scaleFactor, uint minDeposit);
  event SetWithdrawAddrEvent(address trader, address withdrawAddr);

  event DepositEvent(address trader, uint16 tokenCode, string symbol, uint64 amountE8, uint64 depositIndex);
  event WithdrawEvent(address trader, uint16 tokenCode, string symbol, uint64 amountE8, uint64 lastOpIndex);
  event TransferFeeEvent(uint16 tokenCode, uint64 amountE8, address toAddr);

  // `balanceE8` is the total balance after this deposit confirmation
  event ConfirmDepositEvent(address trader, uint16 tokenCode, uint64 balanceE8);
  // `amountE8` is the post-fee initiated withdraw amount
  // `pendingWithdrawE8` is the total pending withdraw amount after this withdraw initiation
  event InitiateWithdrawEvent(address trader, uint16 tokenCode, uint64 amountE8, uint64 pendingWithdrawE8);
  event MatchOrdersEvent(address trader1, uint64 nonce1, address trader2, uint64 nonce2);
  event HardCancelOrderEvent(address trader, uint64 nonce);
  event SetFeeRatesEvent(uint16 makerFeeRateE4, uint16 takerFeeRateE4, uint16 withdrawFeeRateE4);
  event SetFeeRebatePercentEvent(address trader, uint8 feeRebatePercent);

  //------------------------------ Contract Initialization: ----------------------------------------

  function Dex2(address admin_) public {
    admin = admin_;
    setTokenInfo(0 /*tokenCode*/, "ETH", 0 /*tokenAddr*/, ETH_SCALE_FACTOR, 0 /*minDeposit*/);
    emit DeployMarketEvent();
  }

  //------------------------------ External Functions: ---------------------------------------------

  function() external {
    revert();
  }

  // Change the market status of DEX.
  function changeMarketStatus(uint8 status_) external {
    if (msg.sender != admin) revert();
    if (marketStatus == CLOSED) revert();  // closed is forever

    marketStatus = status_;
    emit ChangeMarketStatusEvent(status_);
  }

  // Each trader can specify a withdraw address (but cannot change it later). Once a trader's
  // withdraw address is set, following withdrawals of this trader will go to the withdraw address
  // instead of the trader's address.
  function setWithdrawAddr(address withdrawAddr) external {
    if (withdrawAddr == 0) revert();
    if (traders[msg.sender].withdrawAddr != 0) revert();  // cannot change withdrawAddr once set
    traders[msg.sender].withdrawAddr = withdrawAddr;
    emit SetWithdrawAddrEvent(msg.sender, withdrawAddr);
  }

  // Deposit ETH from msg.sender for the given trader.
  function depositEth(address traderAddr) external payable {
    if (marketStatus != ACTIVE) revert();
    if (traderAddr == 0) revert();
    if (msg.value < tokens[0].minDeposit) revert();
    if (msg.data.length != 4 + 32) revert();  // length condition of param count

    uint64 pendingAmountE8 = uint64(msg.value / (ETH_SCALE_FACTOR / 10**8));  // msg.value is in Wei
    if (pendingAmountE8 == 0) revert();

    uint64 depositIndex = ++lastDepositIndex;
    setDeposits(depositIndex, traderAddr, 0, pendingAmountE8);
    emit DepositEvent(traderAddr, 0, "ETH", pendingAmountE8, depositIndex);
  }

  // Deposit token (other than ETH) from msg.sender for a specified trader.
  //
  // After the deposit has been confirmed enough times on the blockchain, it will be added to the
  // trader's token account for trading.
  function depositToken(address traderAddr, uint16 tokenCode, uint originalAmount) external {
    if (marketStatus != ACTIVE) revert();
    if (traderAddr == 0) revert();
    if (tokenCode == 0) revert();  // this function does not handle ETH
    if (msg.data.length != 4 + 32 + 32 + 32) revert();  // length condition of param count

    TokenInfo memory tokenInfo = tokens[tokenCode];
    if (originalAmount < tokenInfo.minDeposit) revert();
    if (tokenInfo.scaleFactor == 0) revert();  // unsupported token

    // Need to make approval by calling Token(address).approve() in advance for ERC-20 Tokens.
    if (!Token(tokenInfo.tokenAddr).transferFrom(msg.sender, this, originalAmount)) revert();

    if (originalAmount > MAX_UINT256 / 10**8) revert();  // avoid overflow
    uint amountE8 = originalAmount * 10**8 / uint(tokenInfo.scaleFactor);
    if (amountE8 >= 2**64 || amountE8 == 0) revert();

    uint64 depositIndex = ++lastDepositIndex;
    setDeposits(depositIndex, traderAddr, tokenCode, uint64(amountE8));
    emit DepositEvent(traderAddr, tokenCode, tokens[tokenCode].symbol, uint64(amountE8), depositIndex);
  }

  // Withdraw ETH from the contract.
  function withdrawEth(address traderAddr) external {
    if (traderAddr == 0) revert();
    if (msg.data.length != 4 + 32) revert();  // length condition of param count

    uint176 accountKey = uint176(traderAddr);
    uint amountE8 = accounts[accountKey].pendingWithdrawE8;
    if (amountE8 == 0) return;

    // Write back to storage before making the transfer.
    accounts[accountKey].pendingWithdrawE8 = 0;

    uint truncatedWei = amountE8 * (ETH_SCALE_FACTOR / 10**8);
    address withdrawAddr = traders[traderAddr].withdrawAddr;
    if (withdrawAddr == 0) withdrawAddr = traderAddr;
    withdrawAddr.transfer(truncatedWei);
    emit WithdrawEvent(traderAddr, 0, "ETH", uint64(amountE8), exeStatus.lastOperationIndex);
  }

  // Withdraw token (other than ETH) from the contract.
  function withdrawToken(address traderAddr, uint16 tokenCode) external {
    if (traderAddr == 0) revert();
    if (tokenCode == 0) revert();  // this function does not handle ETH
    if (msg.data.length != 4 + 32 + 32) revert();  // length condition of param count

    TokenInfo memory tokenInfo = tokens[tokenCode];
    if (tokenInfo.scaleFactor == 0) revert();  // unsupported token

    uint176 accountKey = uint176(tokenCode) << 160 | uint176(traderAddr);
    uint amountE8 = accounts[accountKey].pendingWithdrawE8;
    if (amountE8 == 0) return;

    // Write back to storage before making the transfer.
    accounts[accountKey].pendingWithdrawE8 = 0;

    uint truncatedAmount = amountE8 * uint(tokenInfo.scaleFactor) / 10**8;
    address withdrawAddr = traders[traderAddr].withdrawAddr;
    if (withdrawAddr == 0) withdrawAddr = traderAddr;
    if (!Token(tokenInfo.tokenAddr).transfer(withdrawAddr, truncatedAmount)) revert();
    emit WithdrawEvent(traderAddr, tokenCode, tokens[tokenCode].symbol, uint64(amountE8),
                       exeStatus.lastOperationIndex);
  }

  // Transfer the collected fee out of the contract.
  function transferFee(uint16 tokenCode, uint64 amountE8, address toAddr) external {
    if (msg.sender != admin) revert();
    if (toAddr == 0) revert();
    if (msg.data.length != 4 + 32 + 32 + 32) revert();

    TokenAccount memory feeAccount = accounts[uint176(tokenCode) << 160];
    uint64 withdrawE8 = feeAccount.pendingWithdrawE8;
    if (amountE8 < withdrawE8) {
      withdrawE8 = amountE8;
    }
    feeAccount.pendingWithdrawE8 -= withdrawE8;
    accounts[uint176(tokenCode) << 160] = feeAccount;

    TokenInfo memory tokenInfo = tokens[tokenCode];
    uint originalAmount = uint(withdrawE8) * uint(tokenInfo.scaleFactor) / 10**8;
    if (tokenCode == 0) {  // ETH
      toAddr.transfer(originalAmount);
    } else {
      if (!Token(tokenInfo.tokenAddr).transfer(toAddr, originalAmount)) revert();
    }
    emit TransferFeeEvent(tokenCode, withdrawE8, toAddr);
  }

  // Replay the trading sequence from the off-chain ledger exactly onto the on-chain ledger.
  function exeSequence(uint header, uint[] body) external {
    if (msg.sender != admin) revert();

    uint64 nextOperationIndex = uint64(header);
    if (nextOperationIndex != exeStatus.lastOperationIndex + 1) revert();  // check sequence index

    uint64 newLogicTimeSec = uint64(header >> 64);
    if (newLogicTimeSec < exeStatus.logicTimeSec) revert();

    for (uint i = 0; i < body.length; nextOperationIndex++) {
      uint bits = body[i];
      uint opcode = bits & 0xFFFF;
      bits >>= 16;
      if ((opcode >> 8) != 0xDE) revert();  // check the magic number

      // ConfirmDeposit: <depositIndex>(64)
      if (opcode == 0xDE01) {
        confirmDeposit(uint64(bits));
        i += 1;
        continue;
      }

      // InitiateWithdraw: <amountE8>(64) <tokenCode>(16) <traderAddr>(160)
      if (opcode == 0xDE02) {
        initiateWithdraw(uint176(bits), uint64(bits >> 176));
        i += 1;
        continue;
      }

      //-------- The rest operation types are allowed only when the market is active ---------
      if (marketStatus != ACTIVE) revert();

      // MatchOrders
      if (opcode == 0xDE03) {
        uint8 v1 = uint8(bits);
        bits >>= 8;            // bits is now the key of the maker order

        Order memory makerOrder;
        if (v1 == 0) {         // order already in storage
          if (i + 1 >= body.length) revert();  // at least 1 body element left
          makerOrder = orders[uint224(bits)];
          i += 1;
        } else {
          if (orders[uint224(bits)].pairId != 0) revert();  // order must not be already in storage
          if (i + 4 >= body.length) revert();  // at least 4 body elements left
          makerOrder = parseNewOrder(uint224(bits) /*makerOrderKey*/, v1, body, i);
          i += 4;
        }

        uint8 v2 = uint8(body[i]);
        uint224 takerOrderKey = uint224(body[i] >> 8);
        Order memory takerOrder;
        if (v2 == 0) {         // order already in storage
          takerOrder = orders[takerOrderKey];
          i += 1;
        } else {
          if (orders[takerOrderKey].pairId != 0) revert();  // order must not be already in storage
          if (i + 3 >= body.length) revert();  // at least 3 body elements left
          takerOrder = parseNewOrder(takerOrderKey, v2, body, i);
          i += 4;
        }

        matchOrder(uint224(bits) /*makerOrderKey*/, makerOrder, takerOrderKey, takerOrder);
        continue;
      }

      // HardCancelOrder: <nonce>(64) <traderAddr>(160)
      if (opcode == 0xDE04) {
        hardCancelOrder(uint224(bits) /*orderKey*/);
        i += 1;
        continue;
      }

      // SetFeeRates: <withdrawFeeRateE4>(16) <takerFeeRateE4>(16) <makerFeeRateE4>(16)
      if (opcode == 0xDE05) {
        setFeeRates(uint16(bits), uint16(bits >> 16), uint16(bits >> 32));
        i += 1;
        continue;
      }

      // SetFeeRebatePercent: <rebatePercent>(8) <traderAddr>(160)
      if (opcode == 0xDE06) {
        setFeeRebatePercent(address(bits) /*traderAddr*/, uint8(bits >> 160) /*rebatePercent*/);
        i += 1;
        continue;
      }
    } // for loop

    setExeStatus(newLogicTimeSec, nextOperationIndex - 1);
  } // function exeSequence

  //------------------------------ Public Functions: -----------------------------------------------

  // Set information of a token.
  function setTokenInfo(uint16 tokenCode, string symbol, address tokenAddr, uint64 scaleFactor,
                        uint minDeposit) public {
    if (msg.sender != admin) revert();
    if (marketStatus != ACTIVE) revert();
    if (scaleFactor == 0) revert();

    TokenInfo memory info = tokens[tokenCode];
    if (info.scaleFactor != 0) {  // this token already exists
      // For an existing token only the minDeposit field can be updated.
      tokens[tokenCode].minDeposit = minDeposit;
      emit SetTokenInfoEvent(tokenCode, info.symbol, info.tokenAddr, info.scaleFactor, minDeposit);
      return;
    }

    tokens[tokenCode].symbol = symbol;
    tokens[tokenCode].tokenAddr = tokenAddr;
    tokens[tokenCode].scaleFactor = scaleFactor;
    tokens[tokenCode].minDeposit = minDeposit;
    emit SetTokenInfoEvent(tokenCode, symbol, tokenAddr, scaleFactor, minDeposit);
  }

  //------------------------------ Private Functions: ----------------------------------------------

  function setDeposits(uint64 depositIndex, address traderAddr, uint16 tokenCode, uint64 amountE8) private {
    deposits[depositIndex].traderAddr = traderAddr;
    deposits[depositIndex].tokenCode = tokenCode;
    deposits[depositIndex].pendingAmountE8 = amountE8;
  }

  function setExeStatus(uint64 logicTimeSec, uint64 lastOperationIndex) private {
    exeStatus.logicTimeSec = logicTimeSec;
    exeStatus.lastOperationIndex = lastOperationIndex;
  }

  function confirmDeposit(uint64 depositIndex) private {
    Deposit memory deposit = deposits[depositIndex];
    uint176 accountKey = (uint176(deposit.tokenCode) << 160) | uint176(deposit.traderAddr);
    TokenAccount memory account = accounts[accountKey];

    // Check that pending amount is non-zero and no overflow would happen.
    if (account.balanceE8 + deposit.pendingAmountE8 <= account.balanceE8) revert();
    account.balanceE8 += deposit.pendingAmountE8;

    deposits[depositIndex].pendingAmountE8 = 0;
    accounts[accountKey].balanceE8 += deposit.pendingAmountE8;
    emit ConfirmDepositEvent(deposit.traderAddr, deposit.tokenCode, account.balanceE8);
  }

  function initiateWithdraw(uint176 tokenAccountKey, uint64 amountE8) private {
    uint64 balanceE8 = accounts[tokenAccountKey].balanceE8;
    uint64 pendingWithdrawE8 = accounts[tokenAccountKey].pendingWithdrawE8;

    if (balanceE8 < amountE8 || amountE8 == 0) revert();
    balanceE8 -= amountE8;

    uint64 feeE8 = calcFeeE8(amountE8, withdrawFeeRateE4, address(tokenAccountKey));
    amountE8 -= feeE8;

    if (pendingWithdrawE8 + amountE8 < amountE8) revert();  // check overflow
    pendingWithdrawE8 += amountE8;

    accounts[tokenAccountKey].balanceE8 = balanceE8;
    accounts[tokenAccountKey].pendingWithdrawE8 = pendingWithdrawE8;

    // Note that the fee account has a dummy trader address of 0.
    if (accounts[tokenAccountKey & (0xffff << 160)].pendingWithdrawE8 + feeE8 >= feeE8) {  // no overflow
      accounts[tokenAccountKey & (0xffff << 160)].pendingWithdrawE8 += feeE8;
    }

    emit InitiateWithdrawEvent(address(tokenAccountKey), uint16(tokenAccountKey >> 160) /*tokenCode*/,
                               amountE8, pendingWithdrawE8);
  }

  function getDealInfo(uint32 pairId, uint64 priceE8, uint64 amount1E8, uint64 amount2E8)
      private pure returns (DealInfo deal) {
    deal.stockCode = uint16(pairId);
    deal.cashCode = uint16(pairId >> 16);
    if (deal.stockCode == deal.cashCode) revert();  // we disallow homogeneous trading

    deal.stockDealAmountE8 = amount1E8 < amount2E8 ? amount1E8 : amount2E8;

    uint cashDealAmountE8 = uint(priceE8) * uint(deal.stockDealAmountE8) / 10**8;
    if (cashDealAmountE8 >= 2**64) revert();
    deal.cashDealAmountE8 = uint64(cashDealAmountE8);
  }

  function calcFeeE8(uint64 amountE8, uint feeRateE4, address traderAddr)
      private view returns (uint64) {
    uint feeE8 = uint(amountE8) * feeRateE4 / 10000;
    feeE8 -= feeE8 * uint(traders[traderAddr].feeRebatePercent) / 100;
    return uint64(feeE8);
  }

  function settleAccounts(DealInfo deal, address traderAddr, uint feeRateE4, bool isBuyer) private {
    uint16 giveTokenCode = isBuyer ? deal.cashCode : deal.stockCode;
    uint16 getTokenCode = isBuyer ? deal.stockCode : deal.cashCode;

    uint64 giveAmountE8 = isBuyer ? deal.cashDealAmountE8 : deal.stockDealAmountE8;
    uint64 getAmountE8 = isBuyer ? deal.stockDealAmountE8 : deal.cashDealAmountE8;

    uint176 giveAccountKey = uint176(giveTokenCode) << 160 | uint176(traderAddr);
    uint176 getAccountKey = uint176(getTokenCode) << 160 | uint176(traderAddr);

    uint64 feeE8 = calcFeeE8(getAmountE8, feeRateE4, traderAddr);
    getAmountE8 -= feeE8;

    // Check overflow.
    if (accounts[giveAccountKey].balanceE8 < giveAmountE8) revert();
    if (accounts[getAccountKey].balanceE8 + getAmountE8 < getAmountE8) revert();

    // Write storage.
    accounts[giveAccountKey].balanceE8 -= giveAmountE8;
    accounts[getAccountKey].balanceE8 += getAmountE8;

    if (accounts[uint176(getTokenCode) << 160].pendingWithdrawE8 + feeE8 >= feeE8) {  // no overflow
      accounts[uint176(getTokenCode) << 160].pendingWithdrawE8 += feeE8;
    }
  }

  function setOrders(uint224 orderKey, uint32 pairId, uint8 action, uint8 ioc,
                     uint64 priceE8, uint64 amountE8, uint64 expireTimeSec) private {
    orders[orderKey].pairId = pairId;
    orders[orderKey].action = action;
    orders[orderKey].ioc = ioc;
    orders[orderKey].priceE8 = priceE8;
    orders[orderKey].amountE8 = amountE8;
    orders[orderKey].expireTimeSec = expireTimeSec;
  }

  function matchOrder(uint224 makerOrderKey, Order makerOrder,
                      uint224 takerOrderKey, Order takerOrder) private {
    // Check trading conditions.
    if (marketStatus != ACTIVE) revert();
    if (makerOrderKey == takerOrderKey) revert();  // the two orders must not have the same key
    if (makerOrder.pairId != takerOrder.pairId) revert();
    if (makerOrder.action == takerOrder.action) revert();
    if (makerOrder.priceE8 == 0 || takerOrder.priceE8 == 0) revert();
    if (makerOrder.action == 0 && makerOrder.priceE8 < takerOrder.priceE8) revert();
    if (takerOrder.action == 0 && takerOrder.priceE8 < makerOrder.priceE8) revert();
    if (makerOrder.amountE8 == 0 || takerOrder.amountE8 == 0) revert();
    if (makerOrder.expireTimeSec <= exeStatus.logicTimeSec) revert();
    if (takerOrder.expireTimeSec <= exeStatus.logicTimeSec) revert();

    DealInfo memory deal = getDealInfo(
        makerOrder.pairId, makerOrder.priceE8, makerOrder.amountE8, takerOrder.amountE8);

    // Update accounts.
    settleAccounts(deal, address(makerOrderKey), makerFeeRateE4, (makerOrder.action == 0));
    settleAccounts(deal, address(takerOrderKey), takerFeeRateE4, (takerOrder.action == 0));

    // Update orders.
    if (makerOrder.ioc == 1) {  // IOC order
      makerOrder.amountE8 = 0;
    } else {
      makerOrder.amountE8 -= deal.stockDealAmountE8;
    }
    if (takerOrder.ioc == 1) {  // IOC order
      takerOrder.amountE8 = 0;
    } else {
      takerOrder.amountE8 -= deal.stockDealAmountE8;
    }

    // Write orders back to storage.
    setOrders(makerOrderKey, makerOrder.pairId, makerOrder.action, makerOrder.ioc,
              makerOrder.priceE8, makerOrder.amountE8, makerOrder.expireTimeSec);
    setOrders(takerOrderKey, takerOrder.pairId, takerOrder.action, takerOrder.ioc,
              takerOrder.priceE8, takerOrder.amountE8, takerOrder.expireTimeSec);

    emit MatchOrdersEvent(address(makerOrderKey), uint64(makerOrderKey >> 160) /*nonce*/,
                          address(takerOrderKey), uint64(takerOrderKey >> 160) /*nonce*/);
  }

  function hardCancelOrder(uint224 orderKey) private {
    orders[orderKey].pairId = 0xFFFFFFFF;
    orders[orderKey].amountE8 = 0;
    emit HardCancelOrderEvent(address(orderKey) /*traderAddr*/, uint64(orderKey >> 160) /*nonce*/);
  }

  function setFeeRates(uint16 makerE4, uint16 takerE4, uint16 withdrawE4) private {
    if (makerE4 > MAX_FEE_RATE_E4) revert();
    if (takerE4 > MAX_FEE_RATE_E4) revert();
    if (withdrawE4 > MAX_FEE_RATE_E4) revert();

    makerFeeRateE4 = makerE4;
    takerFeeRateE4 = takerE4;
    withdrawFeeRateE4 = withdrawE4;
    emit SetFeeRatesEvent(makerE4, takerE4, withdrawE4);
  }

  function setFeeRebatePercent(address traderAddr, uint8 feeRebatePercent) private {
    if (feeRebatePercent > 100) revert();

    traders[traderAddr].feeRebatePercent = feeRebatePercent;
    emit SetFeeRebatePercentEvent(traderAddr, feeRebatePercent);
  }

  function parseNewOrder(uint224 orderKey, uint8 v, uint[] body, uint i) private view returns (Order) {
    // bits: <expireTimeSec>(64) <amountE8>(64) <priceE8>(64) <ioc>(8) <action>(8) <pairId>(32)
    uint240 bits = uint240(body[i + 1]);
    uint64 nonce = uint64(orderKey >> 160);
    address traderAddr = address(orderKey);
    if (traderAddr == 0) revert();  // check zero addr early since `ecrecover` returns 0 on error

    // verify the signature of the trader
    bytes32 hash1 = keccak256("\x19Ethereum Signed Message:\n70DEx2 Order: ", address(this), nonce, bits);
    if (traderAddr != ecrecover(hash1, v, bytes32(body[i + 2]), bytes32(body[i + 3]))) {
      bytes32 hashValues = keccak256("DEx2 Order", address(this), nonce, bits);
      bytes32 hash2 = keccak256(HASHTYPES, hashValues);
      if (traderAddr != ecrecover(hash2, v, bytes32(body[i + 2]), bytes32(body[i + 3]))) revert();
    }

    Order memory order;
    order.pairId = uint32(bits); bits >>= 32;
    order.action = uint8(bits); bits >>= 8;
    order.ioc = uint8(bits); bits >>= 8;
    order.priceE8 = uint64(bits); bits >>= 64;
    order.amountE8 = uint64(bits); bits >>= 64;
    order.expireTimeSec = uint64(bits);
    return order;
  }

}  // contract

Contract ABI
[{"constant":true,"inputs":[],"name":"makerFeeRateE4","outputs":[{"name":"","type":"uint16"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"traderAddr","type":"address"}],"name":"withdrawEth","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"traderAddr","type":"address"},{"name":"tokenCode","type":"uint16"}],"name":"withdrawToken","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint224"}],"name":"orders","outputs":[{"name":"pairId","type":"uint32"},{"name":"action","type":"uint8"},{"name":"ioc","type":"uint8"},{"name":"priceE8","type":"uint64"},{"name":"amountE8","type":"uint64"},{"name":"expireTimeSec","type":"uint64"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"tokenCode","type":"uint16"},{"name":"symbol","type":"string"},{"name":"tokenAddr","type":"address"},{"name":"scaleFactor","type":"uint64"},{"name":"minDeposit","type":"uint256"}],"name":"setTokenInfo","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"traderAddr","type":"address"},{"name":"tokenCode","type":"uint16"},{"name":"originalAmount","type":"uint256"}],"name":"depositToken","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"header","type":"uint256"},{"name":"body","type":"uint256[]"}],"name":"exeSequence","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"withdrawAddr","type":"address"}],"name":"setWithdrawAddr","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint64"}],"name":"deposits","outputs":[{"name":"traderAddr","type":"address"},{"name":"tokenCode","type":"uint16"},{"name":"pendingAmountE8","type":"uint64"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"traders","outputs":[{"name":"withdrawAddr","type":"address"},{"name":"feeRebatePercent","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"withdrawFeeRateE4","outputs":[{"name":"","type":"uint16"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"lastDepositIndex","outputs":[{"name":"","type":"uint64"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint176"}],"name":"accounts","outputs":[{"name":"balanceE8","type":"uint64"},{"name":"pendingWithdrawE8","type":"uint64"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"tokenCode","type":"uint16"},{"name":"amountE8","type":"uint64"},{"name":"toAddr","type":"address"}],"name":"transferFee","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"traderAddr","type":"address"}],"name":"depositEth","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":false,"inputs":[{"name":"status_","type":"uint8"}],"name":"changeMarketStatus","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"exeStatus","outputs":[{"name":"logicTimeSec","type":"uint64"},{"name":"lastOperationIndex","type":"uint64"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"takerFeeRateE4","outputs":[{"name":"","type":"uint16"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"marketStatus","outputs":[{"name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint16"}],"name":"tokens","outputs":[{"name":"symbol","type":"string"},{"name":"tokenAddr","type":"address"},{"name":"scaleFactor","type":"uint64"},{"name":"minDeposit","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"admin","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"inputs":[{"name":"admin_","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"payable":false,"stateMutability":"nonpayable","type":"fallback"},{"anonymous":false,"inputs":[],"name":"DeployMarketEvent","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"status","type":"uint8"}],"name":"ChangeMarketStatusEvent","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"tokenCode","type":"uint16"},{"indexed":false,"name":"symbol","type":"string"},{"indexed":false,"name":"tokenAddr","type":"address"},{"indexed":false,"name":"scaleFactor","type":"uint64"},{"indexed":false,"name":"minDeposit","type":"uint256"}],"name":"SetTokenInfoEvent","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"trader","type":"address"},{"indexed":false,"name":"withdrawAddr","type":"address"}],"name":"SetWithdrawAddrEvent","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"trader","type":"address"},{"indexed":false,"name":"tokenCode","type":"uint16"},{"indexed":false,"name":"symbol","type":"string"},{"indexed":false,"name":"amountE8","type":"uint64"},{"indexed":false,"name":"depositIndex","type":"uint64"}],"name":"DepositEvent","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"trader","type":"address"},{"indexed":false,"name":"tokenCode","type":"uint16"},{"indexed":false,"name":"symbol","type":"string"},{"indexed":false,"name":"amountE8","type":"uint64"},{"indexed":false,"name":"lastOpIndex","type":"uint64"}],"name":"WithdrawEvent","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"tokenCode","type":"uint16"},{"indexed":false,"name":"amountE8","type":"uint64"},{"indexed":false,"name":"toAddr","type":"address"}],"name":"TransferFeeEvent","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"trader","type":"address"},{"indexed":false,"name":"tokenCode","type":"uint16"},{"indexed":false,"name":"balanceE8","type":"uint64"}],"name":"ConfirmDepositEvent","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"trader","type":"address"},{"indexed":false,"name":"tokenCode","type":"uint16"},{"indexed":false,"name":"amountE8","type":"uint64"},{"indexed":false,"name":"pendingWithdrawE8","type":"uint64"}],"name":"InitiateWithdrawEvent","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"trader1","type":"address"},{"indexed":false,"name":"nonce1","type":"uint64"},{"indexed":false,"name":"trader2","type":"address"},{"indexed":false,"name":"nonce2","type":"uint64"}],"name":"MatchOrdersEvent","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"trader","type":"address"},{"indexed":false,"name":"nonce","type":"uint64"}],"name":"HardCancelOrderEvent","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"makerFeeRateE4","type":"uint16"},{"indexed":false,"name":"takerFeeRateE4","type":"uint16"},{"indexed":false,"name":"withdrawFeeRateE4","type":"uint16"}],"name":"SetFeeRatesEvent","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"trader","type":"address"},{"indexed":false,"name":"feeRebatePercent","type":"uint8"}],"name":"SetFeeRebatePercentEvent","type":"event"}]

Contract Creation Code
606060405234156200001057600080fd5b604051602080620044a18339810160405280805160008054600160a060020a031916600160a060020a0383161781559092506200009c915060408051908101604052600381527f455448000000000000000000000000000000000000000000000000000000000060208201526000670de0b6b3a76400008164010000000062000daf620000cf82021704565b7f952493ade1cfcaff3cb0c4047809f43900ee65d5a62a58579ab2c9ea192b8bbb60405160405180910390a1506200056f565b620000d962000487565b60005433600160a060020a03908116911614620000f557600080fd5b60025460ff16156200010657600080fd5b6001604060020a03831615156200011c57600080fd5b61ffff86166000908152600160205260409081902090608090519081016040529081600082018054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015620001da5780601f10620001ae57610100808354040283529160200191620001da565b820191906000526020600020905b815481529060010190602001808311620001bc57829003601f168201915b50505091835250506001820154600160a060020a03811660208301527401000000000000000000000000000000000000000090046001604060020a03166040808301919091526002909201546060909101529091508101516001604060020a0316156200032a5761ffff8616600090815260016020526040902060020182905560008051602062004481833981519152868251836020015184604001518660405161ffff86168152600160a060020a03841660408201526001604060020a03831660608201526080810182905260a06020820181815290820186818151815260200191508051906020019080838360005b83811015620002e5578082015183820152602001620002cb565b50505050905090810190601f168015620003135780820380516001836020036101000a031916815260200191505b50965050505050505060405180910390a16200047f565b61ffff8616600090815260016020526040902085805162000350929160200190620004b8565b5061ffff86166000908152600160208190526040918290209081018054600160a060020a031916600160a060020a0388161760a060020a60e060020a031916740100000000000000000000000000000000000000006001604060020a038816021790556002018390556000805160206200448183398151915290879087908790879087905161ffff86168152600160a060020a03841660408201526001604060020a03831660608201526080810182905260a06020820181815290820186818151815260200191508051906020019080838360005b838110156200043f57808201518382015260200162000425565b50505050905090810190601f1680156200046d5780820380516001836020036101000a031916815260200191505b50965050505050505060405180910390a15b505050505050565b6080604051908101604052806200049d6200053d565b81526000602082018190526040820181905260609091015290565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10620004fb57805160ff19168380011785556200052b565b828001600101855582156200052b579182015b828111156200052b5782518255916020019190600101906200050e565b50620005399291506200054f565b5090565b60206040519081016040526000815290565b6200056c91905b8082111562000539576000815560010162000556565b90565b613f02806200057f6000396000f30060606040526004361061011c5763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166308195e10811461012c57806325e16063146101565780632f5e80c31461018457806337cb2162146101b757806353d142a71461023b578063624bd6c4146102c2578063722ded24146102f85780637511ef651461031a5780638c32a2b11461034657806392a88fa2146103ae578063951506d31461040c578063a1b8c40f1461041f578063a45df8351461044f578063acfb208b146104a2578063ad9d4ba3146104e2578063b8f6e7ff14610503578063dd87c9f01461051c578063e056f2ff1461052f578063e0e081d714610542578063f3c20de01461056b578063f851a44014610632575b341561012757600080fd5b600080fd5b341561013757600080fd5b61013f61066e565b60405161ffff909116815260200160405180910390f35b341561016157600080fd5b61018273ffffffffffffffffffffffffffffffffffffffff6004351661067d565b005b341561018f57600080fd5b61018273ffffffffffffffffffffffffffffffffffffffff6004351661ffff60243516610893565b34156101c257600080fd5b6101eb7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff60043516610d34565b60405163ffffffff909616865260ff94851660208701529290931660408086019190915267ffffffffffffffff918216606086015292811660808501521660a083015260c0909101905180910390f35b341561024657600080fd5b6101826004803561ffff169060446024803590810190830135806020601f820181900481020160405190810160405281815292919060208401838380828437509496505073ffffffffffffffffffffffffffffffffffffffff8535169467ffffffffffffffff6020820135169450604001359250610daf915050565b34156102cd57600080fd5b61018273ffffffffffffffffffffffffffffffffffffffff6004351661ffff602435166044356111ea565b341561030357600080fd5b610182600480359060248035908101910135611634565b341561032557600080fd5b61018273ffffffffffffffffffffffffffffffffffffffff60043516611b33565b341561035157600080fd5b61036667ffffffffffffffff60043516611c34565b60405173ffffffffffffffffffffffffffffffffffffffff909316835261ffff909116602083015267ffffffffffffffff166040808301919091526060909101905180910390f35b34156103b957600080fd5b6103da73ffffffffffffffffffffffffffffffffffffffff60043516611c9f565b60405173ffffffffffffffffffffffffffffffffffffffff909216825260ff1660208201526040908101905180910390f35b341561041757600080fd5b61013f611ce4565b341561042a57600080fd5b610432611cf7565b60405167ffffffffffffffff909116815260200160405180910390f35b341561045a57600080fd5b61047d75ffffffffffffffffffffffffffffffffffffffffffff60043516611d12565b60405167ffffffffffffffff9283168152911660208201526040908101905180910390f35b34156104ad57600080fd5b61018261ffff6004351667ffffffffffffffff6024351673ffffffffffffffffffffffffffffffffffffffff60443516611d3e565b61018273ffffffffffffffffffffffffffffffffffffffff600435166121ce565b341561050e57600080fd5b61018260ff60043516612373565b341561052757600080fd5b61047d612414565b341561053a57600080fd5b61013f612434565b341561054d57600080fd5b610555612445565b60405160ff909116815260200160405180910390f35b341561057657600080fd5b61058561ffff6004351661244e565b60405173ffffffffffffffffffffffffffffffffffffffff8416602082015267ffffffffffffffff831660408201526060810182905260808082528190810186818151815260200191508051906020019080838360005b838110156105f45780820151838201526020016105dc565b50505050905090810190601f1680156106215780820380516001836020036101000a031916815260200191505b509550505050505060405180910390f35b341561063d57600080fd5b61064561254b565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390f35b600254610100900461ffff1681565b600080808073ffffffffffffffffffffffffffffffffffffffff851615156106a457600080fd5b602436146106b157600080fd5b73ffffffffffffffffffffffffffffffffffffffff851660008181526005602052604090205490945068010000000000000000900467ffffffffffffffff1692508215156106fe5761088c565b505075ffffffffffffffffffffffffffffffffffffffffffff8216600090815260056020908152604080832080547fffffffffffffffffffffffffffffffff0000000000000000ffffffffffffffff16905573ffffffffffffffffffffffffffffffffffffffff86811684526004909252909120546402540be400830291168015156107875750835b73ffffffffffffffffffffffffffffffffffffffff811682156108fc0283604051600060405180830381858888f1935050505015156107c557600080fd5b6003547f7f6ff3208fa63e2d1f8034ca4710e5b59108a20cd613da81bb6dbbf9fe53ec70908690600090869068010000000000000000900467ffffffffffffffff1660405173ffffffffffffffffffffffffffffffffffffffff909416845261ffff909216602084015267ffffffffffffffff908116606084015216608082015260a060408083018290526003918301919091527f455448000000000000000000000000000000000000000000000000000000000060c083015260e0909101905180910390a15b5050505050565b61089b613d67565b600080808073ffffffffffffffffffffffffffffffffffffffff871615156108c257600080fd5b61ffff861615156108d257600080fd5b604436146108df57600080fd5b61ffff86166000908152600160205260409081902090608090519081016040529081600082018054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156109995780601f1061096e57610100808354040283529160200191610999565b820191906000526020600020905b81548152906001019060200180831161097c57829003601f168201915b5050509183525050600182015473ffffffffffffffffffffffffffffffffffffffff8116602083015274010000000000000000000000000000000000000000900467ffffffffffffffff1660408083019190915260029092015460609091015290955085015167ffffffffffffffff161515610a1457600080fd5b7401000000000000000000000000000000000000000061ffff87160273ffffffffffffffffffffffffffffffffffffffff88161775ffffffffffffffffffffffffffffffffffffffffffff811660009081526005602052604090205490945067ffffffffffffffff68010000000000000000909104169250821515610a9857610d2b565b75ffffffffffffffffffffffffffffffffffffffffffff84166000908152600560205260409081902080547fffffffffffffffffffffffffffffffff0000000000000000ffffffffffffffff1690556305f5e1009086015167ffffffffffffffff168402811515610b0557fe5b73ffffffffffffffffffffffffffffffffffffffff808a16600090815260046020526040902054929091049350169050801515610b3f5750855b846020015173ffffffffffffffffffffffffffffffffffffffff1663a9059cbb82846040517c010000000000000000000000000000000000000000000000000000000063ffffffff851602815273ffffffffffffffffffffffffffffffffffffffff90921660048301526024820152604401602060405180830381600087803b1515610bca57600080fd5b5af11515610bd757600080fd5b505050604051805190501515610bec57600080fd5b61ffff8616600090815260016020526040908190206003547f7f6ff3208fa63e2d1f8034ca4710e5b59108a20cd613da81bb6dbbf9fe53ec70928a928a929091889168010000000000000000900467ffffffffffffffff16905173ffffffffffffffffffffffffffffffffffffffff8616815261ffff8516602082015267ffffffffffffffff80841660608301528216608082015260a060408201818152855460027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff61010060018416150201909116049183018290529060c083019086908015610d185780601f10610ced57610100808354040283529160200191610d18565b820191906000526020600020905b815481529060010190602001808311610cfb57829003601f168201915b5050965050505050505060405180910390a15b50505050505050565b60066020526000908152604090205463ffffffff81169060ff64010000000082048116916501000000000081049091169067ffffffffffffffff660100000000000082048116916e01000000000000000000000000000081048216917601000000000000000000000000000000000000000000009091041686565b610db7613d67565b6000543373ffffffffffffffffffffffffffffffffffffffff908116911614610ddf57600080fd5b60025460ff1615610def57600080fd5b67ffffffffffffffff83161515610e0557600080fd5b61ffff86166000908152600160205260409081902090608090519081016040529081600082018054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610ebf5780601f10610e9457610100808354040283529160200191610ebf565b820191906000526020600020905b815481529060010190602001808311610ea257829003601f168201915b5050509183525050600182015473ffffffffffffffffffffffffffffffffffffffff8116602083015274010000000000000000000000000000000000000000900467ffffffffffffffff1660408083019190915260029092015460609091015290915081015167ffffffffffffffff16156110385761ffff861660009081526001602052604090206002018290557f2bea0a0811f66be0b32925ea51a110967af6f7ea608abc41d6a2d2a8daa061bf868251836020015184604001518660405161ffff8616815273ffffffffffffffffffffffffffffffffffffffff8416604082015267ffffffffffffffff831660608201526080810182905260a06020820181815290820186818151815260200191508051906020019080838360005b83811015610ff5578082015183820152602001610fdd565b50505050905090810190601f1680156110225780820380516001836020036101000a031916815260200191505b50965050505050505060405180910390a16111e2565b61ffff8616600090815260016020526040902085805161105c929160200190613d96565b5061ffff861660009081526001602081905260409182902090810180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff8816177fffffffff0000000000000000ffffffffffffffffffffffffffffffffffffffff167401000000000000000000000000000000000000000067ffffffffffffffff8816021790556002018390557f2bea0a0811f66be0b32925ea51a110967af6f7ea608abc41d6a2d2a8daa061bf90879087908790879087905161ffff8616815273ffffffffffffffffffffffffffffffffffffffff8416604082015267ffffffffffffffff831660608201526080810182905260a06020820181815290820186818151815260200191508051906020019080838360005b838110156111a357808201518382015260200161118b565b50505050905090810190601f1680156111d05780820380516001836020036101000a031916815260200191505b50965050505050505060405180910390a15b505050505050565b6111f2613d67565b600254600090819060ff161561120757600080fd5b73ffffffffffffffffffffffffffffffffffffffff8616151561122957600080fd5b61ffff8516151561123957600080fd5b6064361461124657600080fd5b61ffff85166000908152600160205260409081902090608090519081016040529081600082018054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156113005780601f106112d557610100808354040283529160200191611300565b820191906000526020600020905b8154815290600101906020018083116112e357829003601f168201915b5050509183525050600182015473ffffffffffffffffffffffffffffffffffffffff8116602083015274010000000000000000000000000000000000000000900467ffffffffffffffff16604082015260029091015460609182015290935083015184101561136e57600080fd5b826040015167ffffffffffffffff16151561138857600080fd5b826020015173ffffffffffffffffffffffffffffffffffffffff166323b872dd3330876040517c010000000000000000000000000000000000000000000000000000000063ffffffff861602815273ffffffffffffffffffffffffffffffffffffffff93841660048201529190921660248201526044810191909152606401602060405180830381600087803b151561142057600080fd5b5af1151561142d57600080fd5b50505060405180519050151561144257600080fd5b7c2af31dc4611873bf3f70834acdae9f0f4f534f5d60585a5f1c1a3ced1b84111561146c57600080fd5b826040015167ffffffffffffffff16846305f5e1000281151561148b57fe5b04915068010000000000000000821015806114a4575081155b156114ae57600080fd5b50600280547fffffffffffffffffffffffffffffffffff0000000000000000ffffffffffffff81166701000000000000009182900467ffffffffffffffff9081166001019081169092021790915561150881878785612567565b61ffff8516600090815260016020526040908190207f6d0d137345b2370af2f5ac7f9b3f4b13a25f0d552b2f16754f201310456076069188918891869086905173ffffffffffffffffffffffffffffffffffffffff8616815261ffff8516602082015267ffffffffffffffff80841660608301528216608082015260a060408201818152855460027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff61010060018416150201909116049183018290529060c08301908690801561161a5780601f106115ef5761010080835404028352916020019161161a565b820191906000526020600020905b8154815290600101906020018083116115fd57829003601f168201915b5050965050505050505060405180910390a1505050505050565b600080600080600080611645613e14565b600080611650613e14565b6000543373ffffffffffffffffffffffffffffffffffffffff90811691161461167857600080fd5b6003548d9a5068010000000000000000900467ffffffffffffffff9081166001018116908b16146116a857600080fd5b600354680100000000000000008e04995067ffffffffffffffff908116908a1610156116d357600080fd5b600097505b8a881015611b17578b8b898181106116ec57fe5b620100006020909102929092013591820498505061ffff16955060de61010087041461171757600080fd5b8561de0114156117355761172a8761264a565b600188019750611b0c565b8561de0214156117625761172a8776010000000000000000000000000000000000000000000081046128fa565b60025460ff161561177257600080fd5b8561de031415611aad57610100870496945060ff8516151561186b57600188018b901061179e57600080fd5b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8716600090815260066020526040908190209060c090519081016040908152915463ffffffff8116825260ff640100000000820481166020840152650100000000008204169282019290925267ffffffffffffffff66010000000000008304811660608301526e01000000000000000000000000000083048116608083015276010000000000000000000000000000000000000000000090920490911660a08201526001989098019793506118fd565b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff871660009081526006602052604090205463ffffffff16156118a957600080fd5b600488018b90106118b957600080fd5b6118f487868e8e808060200260200160405190810160405280939291908181526020018383602002808284378201915050505050508b612b8e565b93506004880197505b8b8b8981811061190957fe5b90506020020135925060088c8c8a818110151561192257fe5b905060200201359060020a900491508260ff1660001415611a0a577bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8216600090815260066020526040908190209060c090519081016040908152915463ffffffff8116825260ff640100000000820481166020840152650100000000008204169282019290925267ffffffffffffffff66010000000000008304811660608301526e01000000000000000000000000000083048116608083015276010000000000000000000000000000000000000000000090920490911660a0820152600198909801979050611a9c565b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff821660009081526006602052604090205463ffffffff1615611a4857600080fd5b600388018b9010611a5857600080fd5b611a9382848e8e808060200260200160405190810160405280939291908181526020018383602002808284378201915050505050508b612b8e565b90506004880197505b611aa88785848461314f565b611b0c565b8561de041415611ac05761172a876134d5565b8561de051415611ae15761172a8762010000810464010000000082046135cb565b8561de061415611b0c5761172a877401000000000000000000000000000000000000000081046136eb565b6001909901986116d8565b611b248960018c036137be565b50505050505050505050505050565b73ffffffffffffffffffffffffffffffffffffffff81161515611b5557600080fd5b73ffffffffffffffffffffffffffffffffffffffff3381166000908152600460205260409020541615611b8757600080fd5b3373ffffffffffffffffffffffffffffffffffffffff8181166000908152600460205260409081902080547fffffffffffffffffffffffff000000000000000000000000000000000000000016928516929092179091557f22ada3a1fa47ed4b75208e6ca30c33e1e69acbd292775a3dba6e7d03b80c10cb919083905173ffffffffffffffffffffffffffffffffffffffff9283168152911660208201526040908101905180910390a150565b60076020526000908152604090205473ffffffffffffffffffffffffffffffffffffffff81169074010000000000000000000000000000000000000000810461ffff1690760100000000000000000000000000000000000000000000900467ffffffffffffffff1683565b60046020526000908152604090205473ffffffffffffffffffffffffffffffffffffffff81169074010000000000000000000000000000000000000000900460ff1682565b60025465010000000000900461ffff1681565b600254670100000000000000900467ffffffffffffffff1681565b60056020526000908152604090205467ffffffffffffffff808216916801000000000000000090041682565b611d46613e49565b6000611d50613d67565b600080543373ffffffffffffffffffffffffffffffffffffffff908116911614611d7957600080fd5b73ffffffffffffffffffffffffffffffffffffffff85161515611d9b57600080fd5b60643614611da857600080fd5b7401000000000000000000000000000000000000000061ffff88160275ffffffffffffffffffffffffffffffffffffffffffff1660009081526005602052604090819020908051908101604052905467ffffffffffffffff80821683526801000000000000000090910416602082019081529094505192508267ffffffffffffffff168667ffffffffffffffff161015611e40578592505b82846020018181510367ffffffffffffffff1690525075ffffffffffffffffffffffffffffffffffffffffffff61ffff881674010000000000000000000000000000000000000000021660009081526005602052604090208490815181547fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000001667ffffffffffffffff919091161781556020820151815467ffffffffffffffff9190911668010000000000000000027fffffffffffffffffffffffffffffffff0000000000000000ffffffffffffffff9091161790555061ffff87166000908152600160205260409081902090608090519081016040529081600082018054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015611fd15780601f10611fa657610100808354040283529160200191611fd1565b820191906000526020600020905b815481529060010190602001808311611fb457829003601f168201915b5050509183525050600182015473ffffffffffffffffffffffffffffffffffffffff8116602083015274010000000000000000000000000000000000000000900467ffffffffffffffff166040808301919091526002909201546060909101529092506305f5e1009083015167ffffffffffffffff168467ffffffffffffffff160281151561205c57fe5b04905061ffff871615156120ad5773ffffffffffffffffffffffffffffffffffffffff851681156108fc0282604051600060405180830381858888f1935050505015156120a857600080fd5b61215a565b816020015173ffffffffffffffffffffffffffffffffffffffff1663a9059cbb86836040517c010000000000000000000000000000000000000000000000000000000063ffffffff851602815273ffffffffffffffffffffffffffffffffffffffff90921660048301526024820152604401602060405180830381600087803b151561213857600080fd5b5af1151561214557600080fd5b50505060405180519050151561215a57600080fd5b7f637919f9a52c9374f773e049e9e260818d5c13c1942b60c45eb4d0e7ca71218787848760405161ffff909316835267ffffffffffffffff909116602083015273ffffffffffffffffffffffffffffffffffffffff166040808301919091526060909101905180910390a150505050505050565b600254600090819060ff16156121e357600080fd5b73ffffffffffffffffffffffffffffffffffffffff8316151561220557600080fd5b6000805260016020527fa6eef7e35abe7026729641147f7915573c7e97b47efa546f5f6e3230263bcb4b5434101561223c57600080fd5b6024361461224957600080fd5b6402540be4003404915067ffffffffffffffff8216151561226957600080fd5b50600280547fffffffffffffffffffffffffffffffffff0000000000000000ffffffffffffff81166701000000000000009182900467ffffffffffffffff908116600101908116909202179091556122c48184600085612567565b7f6d0d137345b2370af2f5ac7f9b3f4b13a25f0d552b2f16754f20131045607606836000848460405173ffffffffffffffffffffffffffffffffffffffff909416845261ffff909216602084015267ffffffffffffffff908116606084015216608082015260a060408083018290526003918301919091527f455448000000000000000000000000000000000000000000000000000000000060c083015260e0909101905180910390a1505050565b6000543373ffffffffffffffffffffffffffffffffffffffff90811691161461239b57600080fd5b6002805460ff1614156123ad57600080fd5b600280547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660ff83161790557f8853484ae4a06c3395f689a3fa189b683f6542d0f6af1c3aa07b25e219cd08da8160405160ff909116815260200160405180910390a150565b60035467ffffffffffffffff808216916801000000000000000090041682565b6002546301000000900461ffff1681565b60025460ff1681565b6001602052806000526040600020600091509050806000018054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156124fa5780601f106124cf576101008083540402835291602001916124fa565b820191906000526020600020905b8154815290600101906020018083116124dd57829003601f168201915b505050506001830154600290930154919273ffffffffffffffffffffffffffffffffffffffff8116927401000000000000000000000000000000000000000090910467ffffffffffffffff16915084565b60005473ffffffffffffffffffffffffffffffffffffffff1681565b67ffffffffffffffff9384166000908152600760205260409020805491909416760100000000000000000000000000000000000000000000027fffff0000000000000000ffffffffffffffffffffffffffffffffffffffffffff61ffff90931674010000000000000000000000000000000000000000027fffffffffffffffffffff0000ffffffffffffffffffffffffffffffffffffffff73ffffffffffffffffffffffffffffffffffffffff9095167fffffffffffffffffffffffff000000000000000000000000000000000000000090931692909217939093161716179055565b612652613e60565b600061265c613e49565b67ffffffffffffffff84166000908152600760205260409081902090606090519081016040908152915473ffffffffffffffffffffffffffffffffffffffff8116825274010000000000000000000000000000000000000000810461ffff166020830152760100000000000000000000000000000000000000000000900467ffffffffffffffff16918101919091529250825173ffffffffffffffffffffffffffffffffffffffff1660a0846020015161ffff1675ffffffffffffffffffffffffffffffffffffffffffff169060020a02179150600560008375ffffffffffffffffffffffffffffffffffffffffffff1675ffffffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060408051908101604052905467ffffffffffffffff8082168352680100000000000000009091041660208201529050805167ffffffffffffffff16836040015182510167ffffffffffffffff16116127ca57600080fd5b82604001518181815167ffffffffffffffff9101811690915285166000908152600760205260409081902080547fffff0000000000000000ffffffffffffffffffffffffffffffffffffffffffff169055840190505175ffffffffffffffffffffffffffffffffffffffffffff8316600090815260056020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000811667ffffffffffffffff91821693909301169190911790557f5c70f6625b9efb544c7deb2881a25ef395af15b7dbd129b2353a92a48681e6b683518460200151835160405173ffffffffffffffffffffffffffffffffffffffff909316835261ffff909116602083015267ffffffffffffffff166040808301919091526060909101905180910390a150505050565b75ffffffffffffffffffffffffffffffffffffffffffff821660009081526005602052604081205467ffffffffffffffff8082169268010000000000000000909204811691908416831080612957575067ffffffffffffffff8416155b1561296157600080fd5b600254928490039261298290859065010000000000900461ffff168761382c565b905080840393508367ffffffffffffffff1684830167ffffffffffffffff1610156129ac57600080fd5b75ffffffffffffffffffffffffffffffffffffffffffff851660009081526005602052604080822080547fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000001667ffffffffffffffff878116919091177fffffffffffffffffffffffffffffffff0000000000000000ffffffffffffffff166801000000000000000096890180831688029190911790925575ffff000000000000000000000000000000000000000089168452919092205491938382169204811683011610612ae35775ffff000000000000000000000000000000000000000085166000908152600560205260409020805467ffffffffffffffff6801000000000000000080830482168501909116027fffffffffffffffffffffffffffffffff0000000000000000ffffffffffffffff9091161790555b7feec77ff572621cf4b96c534f6afb74c1879d42e7470cb3d41cce416ab31ca95a857401000000000000000000000000000000000000000075ffffffffffffffffffffffffffffffffffffffffffff821604868560405173ffffffffffffffffffffffffffffffffffffffff909416845261ffff909216602084015267ffffffffffffffff908116604080850191909152911660608301526080909101905180910390a15050505050565b612b96613e14565b600080600080600080612ba7613e14565b898960010181518110612bb657fe5b906020019060200201519650740100000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8d160495508b945073ffffffffffffffffffffffffffffffffffffffff85161515612c1f57600080fd5b3086886040517f19457468657265756d205369676e6564204d6573736167653a0a37304445783281527f204f726465723a20000000000000000000000000000000000000000000000000602082015273ffffffffffffffffffffffffffffffffffffffff939093166c0100000000000000000000000002602884015267ffffffffffffffff91909116780100000000000000000000000000000000000000000000000002603c8301527dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1662010000026044820152606201604051809103902093506001848c8c8c60020181518110612d1257fe5b906020019060200201518d60038e0181518110612d2b57fe5b906020019060200201516040516000815260200160405260405193845260ff909216602080850191909152604080850192909252606084019290925260809092019151602081039080840390855afa1515612d8557600080fd5b50506020604051035173ffffffffffffffffffffffffffffffffffffffff8681169116146130bb573086886040517f44457832204f7264657200000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff939093166c0100000000000000000000000002600a84015267ffffffffffffffff91909116780100000000000000000000000000000000000000000000000002601e8301527dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1662010000026026820152604401604051809103902092506040517f737472696e67207469746c65000000000000000000000000000000000000000081527f61646472657373206d61726b65745f6164647265737300000000000000000000600c8201527f75696e743634206e6f6e6365000000000000000000000000000000000000000060228201527f75696e743634206578706972655f74696d655f73656300000000000000000000602e8201527f75696e74363420616d6f756e745f65380000000000000000000000000000000060448201527f75696e7436342070726963655f6538000000000000000000000000000000000060548201527f75696e743820696d6d6564696174655f6f725f63616e63656c0000000000000060638201527f75696e743820616374696f6e0000000000000000000000000000000000000000607c8201527f75696e74313620636173685f746f6b656e5f636f64650000000000000000000060888201527f75696e7431362073746f636b5f746f6b656e5f636f6465000000000000000000609e82015260b501604051809103902083604051918252602082015260409081019051809103902091506001828c8c8c6002018151811061301b57fe5b906020019060200201518d60038e018151811061303457fe5b906020019060200201516040516000815260200160405260405193845260ff909216602080850191909152604080850192909252606084019290925260809092019151602081039080840390855afa151561308e57600080fd5b50506020604051035173ffffffffffffffffffffffffffffffffffffffff8681169116146130bb57600080fd5b63ffffffff871681526401000000007dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9788160460ff8181166020840152610100918916829004908116604084015288160467ffffffffffffffff81811660608401526801000000000000000091891682900480821660808501529098160490961660a087015250939998505050505050505050565b613157613e80565b60025460ff161561316757600080fd5b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff16857bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1614156131b057600080fd5b815163ffffffff16845163ffffffff16146131ca57600080fd5b816020015160ff16846020015160ff1614156131e557600080fd5b836060015167ffffffffffffffff16158061320c5750816060015167ffffffffffffffff16155b1561321657600080fd5b836020015160ff161580156132465750816060015167ffffffffffffffff16846060015167ffffffffffffffff16105b1561325057600080fd5b816020015160ff161580156132805750836060015167ffffffffffffffff16826060015167ffffffffffffffff16105b1561328a57600080fd5b836080015167ffffffffffffffff1615806132b15750816080015167ffffffffffffffff16155b156132bb57600080fd5b60035467ffffffffffffffff1660a085015167ffffffffffffffff16116132e157600080fd5b60035467ffffffffffffffff1660a083015167ffffffffffffffff161161330757600080fd5b6133208451856060015186608001518560800151613895565b6002549091506133459082908790610100900461ffff16602088015160ff161561395b565b60025461336990829085906301000000900461ffff16602086015160ff161561395b565b836040015160ff166001141561338557600060808501526133a0565b8060400151846080018181510367ffffffffffffffff169052505b816040015160ff16600114156133bc57600060808301526133d7565b8060400151826080018181510367ffffffffffffffff169052505b6133fb85855186602001518760400151886060015189608001518a60a00151613bea565b61341f83835184602001518560400151866060015187608001518860a00151613bea565b7ff9f438e06428b6123b3c14646c5933b422676f1822e7b82e19f6d1333ebf640c85740100000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff80831682900491879182160460405173ffffffffffffffffffffffffffffffffffffffff948516815267ffffffffffffffff938416602082015291909316604080830191909152929091166060820152608001905180910390a15050505050565b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff81166000818152600660205260409081902080547fffffffffffffffffffff0000000000000000ffffffffffffffffffffffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000090911663ffffffff171690557f2ba90bac5da1e0e1c1f7387d9bb5d469e6a4d002c6e1ff5608cd9c40764b9c7791839174010000000000000000000000000000000000000000909104905173ffffffffffffffffffffffffffffffffffffffff909216825267ffffffffffffffff1660208201526040908101905180910390a150565b603c61ffff841611156135dd57600080fd5b603c61ffff831611156135ef57600080fd5b603c61ffff8216111561360157600080fd5b600280547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000ff1661010061ffff86811691909102919091177fffffffffffffffffffffffffffffffffffffffffffffffffffffff0000ffffff16630100000085831602177fffffffffffffffffffffffffffffffffffffffffffffffffff0000ffffffffff1665010000000000918416919091021790557f4791147decc4394f7fd13853909dcce56c68c0f1643bc82bb183c4bf3b1c801c83838360405161ffff938416815291831660208301529091166040808301919091526060909101905180910390a1505050565b60648160ff1611156136fc57600080fd5b73ffffffffffffffffffffffffffffffffffffffff82166000908152600460205260409081902080547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff167401000000000000000000000000000000000000000060ff8516021790557f2129162b34d9f289e001ee201157cb73c7a3286a81706d9c3c99a1b54d10cce290839083905173ffffffffffffffffffffffffffffffffffffffff909216825260ff1660208201526040908101905180910390a15050565b6003805467ffffffffffffffff92831668010000000000000000027fffffffffffffffffffffffffffffffff0000000000000000ffffffffffffffff949093167fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000009091161792909216179055565b60008061271067ffffffffffffffff8616850273ffffffffffffffffffffffffffffffffffffffff8516600090815260046020526040902054919004915060649074010000000000000000000000000000000000000000900460ff168202049003949350505050565b61389d613e80565b61ffff80861682526201000063ffffffff87160416602082019081526000905161ffff16825161ffff1614156138d257600080fd5b8267ffffffffffffffff168467ffffffffffffffff16106138f357826138f5565b835b67ffffffffffffffff16604083019081526305f5e100905167ffffffffffffffff168667ffffffffffffffff160281151561392c57fe5b04905068010000000000000000811061394457600080fd5b67ffffffffffffffff166060820152949350505050565b600080600080600080600087613972578a51613978565b8a602001515b965087613989578a6020015161398c565b8a515b95508761399d578a604001516139a3565b8a606001515b9450876139b4578a606001516139ba565b8a604001515b935073ffffffffffffffffffffffffffffffffffffffff8a1661ffff888116740100000000000000000000000000000000000000009081028317955090881602179150613a08848a8c61382c565b75ffffffffffffffffffffffffffffffffffffffffffff8416600090815260056020526040902054948190039490915067ffffffffffffffff80871691161015613a5157600080fd5b75ffffffffffffffffffffffffffffffffffffffffffff821660009081526005602052604090205467ffffffffffffffff8086169181168601161015613a9657600080fd5b75ffffffffffffffffffffffffffffffffffffffffffff808416600090815260056020526040808220805467ffffffffffffffff8082168b900381167fffffffffffffffffffffffffffffffffffffffffffffffff000000000000000092831617909255868516845282842080548084168b01841692169190911790557401000000000000000000000000000000000000000061ffff8b16029093168252902054828216680100000000000000009091048216830190911610613bdd577401000000000000000000000000000000000000000061ffff87160275ffffffffffffffffffffffffffffffffffffffffffff166000908152600560205260409020805467ffffffffffffffff6801000000000000000080830482168501909116027fffffffffffffffffffffffffffffffff0000000000000000ffffffffffffffff9091161790555b5050505050505050505050565b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff96909616600090815260066020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000001663ffffffff96909616959095177fffffffffffffffffffffffffffffffffffffffffffffffffffffff00ffffffff1664010000000060ff95861602177fffffffffffffffffffffffffffffffffffffffffffffffffffff00ffffffffff16650100000000009390941692909202929092177fffffffffffffffffffffffffffffffffffff0000000000000000ffffffffffff16660100000000000067ffffffffffffffff93841602177fffffffffffffffffffff0000000000000000ffffffffffffffffffffffffffff166e01000000000000000000000000000091831691909102177fffff0000000000000000ffffffffffffffffffffffffffffffffffffffffffff167601000000000000000000000000000000000000000000009190931602919091179055565b608060405190810160405280613d7b613ea7565b81526000602082018190526040820181905260609091015290565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10613dd757805160ff1916838001178555613e04565b82800160010185558215613e04579182015b82811115613e04578251825591602001919060010190613de9565b50613e10929150613eb9565b5090565b60c06040519081016040908152600080835260208301819052908201819052606082018190526080820181905260a082015290565b604080519081016040526000808252602082015290565b606060405190810160409081526000808352602083018190529082015290565b60806040519081016040908152600080835260208301819052908201819052606082015290565b60206040519081016040526000815290565b613ed391905b80821115613e105760008155600101613ebf565b905600a165627a7a7230582004e32dfb6d8842c11f41fb7729b1721fa43f9ca06f10f6542dce47298468b03600292bea0a0811f66be0b32925ea51a110967af6f7ea608abc41d6a2d2a8daa061bf000000000000000000000000fd2d91100c786fcb1f3e8103ca1880a869828b1f


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

-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 000000000000000000000000fd2d91100c786fcb1f3e8103ca1880a869828b1f


   Swarm Source:
bzzr://04e32dfb6d8842c11f41fb7729b1721fa43f9ca06f10f6542dce47298468b036
Block Age transaction Difficulty GasUsed Reward
Block Age Uncle Number Difficulty GasUsed Reward
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.