Contract Overview |  DEx.top
Balance: 1,757.80703823 Ether
Ether Value: $362,407.08 (@ $206.17/ETH)
Transactions: 209139 txns
Misc:
Address Watch: Add To Watch List
Contract Creator: 0xfd2d91100c786fcb1f3e8103ca1880a869828b1fat txn 0xf15b58d2485737417accb789282092040a0dbd3d7201170803d1f955553ce8e8
Token Balance:
 Latest 25 txns From a total of 209139 Transactions

TxHash Age From To Value [TxFee]
0xb12201ba71eef4964a640f201ae753ee7c4d550e43a758f30b8963588d8069702 mins ago0xfd2d91100c786fcb1f3e8103ca1880a869828b1f  IN   DEx.top0 Ether0.00279550116
0x53c101113144b67c9cfc9f33dbc672a9d5a7cde12cfe576facf16c519a0310942 mins ago0xe51231daa306acf16eac34a864564ca36b262a1f  IN   DEx.top0 Ether0.0007083903
0xd2705c15e326d381701c070286529be741c806d1fb460f09b15a044531e731e53 mins ago0xe51231daa306acf16eac34a864564ca36b262a1f  IN   DEx.top0 Ether0.0003872704
0xfff7f2fa0ed939c64a22632457f83b2e5dc89d2e9bb5b6b3dd1069f21c30d1a53 mins ago0xfd2d91100c786fcb1f3e8103ca1880a869828b1f  IN   DEx.top0 Ether0.002799441
0x1209e88a1e073f8ddb2bdf585d9c9cdd0255b514f752ced7fbc47b72e35a841a7 mins ago0xfd2d91100c786fcb1f3e8103ca1880a869828b1f  IN   DEx.top0 Ether0.00280075428
0xa195d6b53d31184e0845be131ca338d5f93b79057d387dd829cdc01b07d213bc7 mins ago0xfd2d91100c786fcb1f3e8103ca1880a869828b1f  IN   DEx.top0 Ether0.00279681444
0x8ad01d183e96d95e68883cdd240855394ba67146803a6b3b29f64830f940c6c67 mins ago0xfd2d91100c786fcb1f3e8103ca1880a869828b1f  IN   DEx.top0 Ether0.00722297844
0xec94aef7dbcf8aedf653ff3d85a897d3009da6093f7b8e9208ef7f7fffd8da598 mins ago0xfd2d91100c786fcb1f3e8103ca1880a869828b1f  IN   DEx.top0 Ether0.00279812772
0xac950f174f0e58ffab5f91a807cb7fcb5adf38f20099b9db0bddbe5219a59e7011 mins ago0xfd2d91100c786fcb1f3e8103ca1880a869828b1f  IN   DEx.top0 Ether0.002254252324
0x72faa9d6d0a5a52a2233c4b4d43cc5994dcbadb61f4a4846123a7b9d18b52fbc13 mins ago0xfd2d91100c786fcb1f3e8103ca1880a869828b1f  IN   DEx.top0 Ether0.002113654995
0x4920e0ae24c5fede553ecd3f73f1b5e1d9a4ac585bd6e41705e6bdac19c01d2014 mins ago0xfd2d91100c786fcb1f3e8103ca1880a869828b1f  IN   DEx.top0 Ether0.002116633875
0x24ca655bc32ba22ba3efcc3170062a4fef0004f1954951665d9b3340d2c3af4f15 mins ago0xfd2d91100c786fcb1f3e8103ca1880a869828b1f  IN   DEx.top0 Ether0.00198007245
0x7c84b2a8c5805f0fb5df22b4e2972c697d95c7ac12d18ab101f7b8a638529b0816 mins ago0xfd2d91100c786fcb1f3e8103ca1880a869828b1f  IN   DEx.top0 Ether0.001981930242
0xfae52c98fe0b4360874bbfd137eee352214d95a2af8ed34ac9a059ccf9da3a2e17 mins ago0xfd2d91100c786fcb1f3e8103ca1880a869828b1f  IN   DEx.top0 Ether0.00198007245
0x8db6cb7e23021ffcc470b1a8af2351f4ca63b7f239875408723254c339605af518 mins ago0xfd2d91100c786fcb1f3e8103ca1880a869828b1f  IN   DEx.top0 Ether0.001981001346
0x873efaf408aeecae9ef63b67a35d3e0770b394ee5b9873668774ee4cbdf70f0f19 mins ago0xfd2d91100c786fcb1f3e8103ca1880a869828b1f  IN   DEx.top0 Ether0.001982859138
0x13fff13e2a5c6d13869e13163d413b96823345af0bef822dacec153a8b85167019 mins ago0xfd2d91100c786fcb1f3e8103ca1880a869828b1f  IN   DEx.top0 Ether0.00198007245
0xc7661573fac761fc8be68896a9e84e69718c9ee31464c6f2e08f299b72206df121 mins ago0xfd2d91100c786fcb1f3e8103ca1880a869828b1f  IN   DEx.top0 Ether0.001981001346
0xcd81ae51113d06f17ab53b8adadc551136adbf51a2b4a94e31cc133f39ab84a423 mins ago0xfd2d91100c786fcb1f3e8103ca1880a869828b1f  IN   DEx.top0 Ether0.001982859138
0x956b7caf9d1ca6c63d73fb3349631d99a1ca38f6eeb1fa37b096403fb80772ae23 mins ago0xfd2d91100c786fcb1f3e8103ca1880a869828b1f  IN   DEx.top0 Ether0.001981001346
0x3fbb5426ec438d058a90852c4b4c2e13fc28f403ec77dcf6b0abed06b0f2151424 mins ago0xfd2d91100c786fcb1f3e8103ca1880a869828b1f  IN   DEx.top0 Ether0.00198007245
0x892e309a563f7cdae8a5763377cc430b2469245f5b6c3030fbb5efab352cd64a25 mins ago0xfd2d91100c786fcb1f3e8103ca1880a869828b1f  IN   DEx.top0 Ether0.001567441359
0x1b049c0f36c012ab6bc95c6f17af9b9d35b2cd3f7b897bf4a9dde3e3d50c600d25 mins ago0xfd2d91100c786fcb1f3e8103ca1880a869828b1f  IN   DEx.top0 Ether0.001569651471
0xd05955d2f5760451f1a65e1e7e7ff4b1df69cf3f41ea72a9ae49fec33cbb5f4727 mins ago0xfd2d91100c786fcb1f3e8103ca1880a869828b1f  IN   DEx.top0 Ether0.001569651471
0xb0f6c4d7a7705e677c7d290d8eb2cd14ac4d90bf7e8e686771e3afb77ef21a7627 mins ago0xfd2d91100c786fcb1f3e8103ca1880a869828b1f  IN   DEx.top0 Ether0.001572598287
[ Download CSV Export  ] 
 Internal Transactions as a result of Contract Execution
 Latest 25 Internal Txns, Click Here To View More View All
ParentTxHash Block Age From To Value
0x131c34fb4818c0f178d4ba3597c1fa5dc9e2ec8815ce9174fa933c6ac41b0494654894751 mins ago0x7600977eb9effa627d6bd0da2e5be35e115663410xbbc6ae46ba6758084585b5ac738c61cff928cc441.63987522 Ether
0x46f89d7a1a8d20d68e01b34fac25b9ff124bde50f614febccd32eccff380256265469768 hrs 36 mins ago0x7600977eb9effa627d6bd0da2e5be35e115663410x381e1b6cdf90cb3868e4e36c5d236d9e9f02f5b80.648 Ether
0x60dbf680f2b9adb38d41d76b5da6ab380c12d0f130aa7734620bd79e38f4a1ac654314723 hrs 47 mins ago0x7600977eb9effa627d6bd0da2e5be35e115663410xfc8830479a77076274e75289bf6c1ce454d0102f0.19980386 Ether
0xdca78bbecda62d8cf2c4de173d9594a1c00f71cbe93352b15def75c0567b211c65427001 day 1 hr ago0x7600977eb9effa627d6bd0da2e5be35e115663410x2bde5d7733a578c3ff1c79c25b990917b316d0840.68363113 Ether
0xcc3888cb42475ae734e2b1e2e9ab37576cf5921cfaa9ed2e2c9d67493c8f578365425611 day 2 hrs ago0x7600977eb9effa627d6bd0da2e5be35e115663410xe8b29afa31479149f0b19a7e5fcd5e9dba0a985c0.01000001 Ether
0x5fcb69e36d2d96596fd6559da8e00300dc6b770e29a52890c5a2a5c8ec08af1765421121 day 3 hrs ago0x7600977eb9effa627d6bd0da2e5be35e115663410xe51231daa306acf16eac34a864564ca36b262a1f0.29971008 Ether
0x59b130945ff236152a73950fcbd63fa4ba15a1b74ea8cd522ba3093b0110588f65416641 day 5 hrs ago0x7600977eb9effa627d6bd0da2e5be35e115663410x6e83e4954e0617647137b7d3c85671bbbf7f331d0.45906315 Ether
0xaa84d6b9bd5ef2761cf2f7ee22aa0616021aa03c3879c902bcdd12fcb1de872465413811 day 6 hrs ago0x7600977eb9effa627d6bd0da2e5be35e115663410xd0436c2ca32266698c285f6b1236fd4210153e3a0.021 Ether
0x8a521c429dd96628fe141d29016e547f747d8d908b5cda5e547e0ef4df081f6d65405421 day 10 hrs ago0x7600977eb9effa627d6bd0da2e5be35e115663410xe51231daa306acf16eac34a864564ca36b262a1f0.67170654 Ether
0xb7d48bf24ccc79c80bff139e514a3b6cfc12dcad939046e4cae449f0aa51ca7d65389161 day 16 hrs ago0x7600977eb9effa627d6bd0da2e5be35e115663410x8203cd2aaf210477209b56209a8bfa5ae288d33d0.01108148 Ether
0xbd34d8230e0d79a2734ff0cd85608d7982538ee7837d152eeb881ac43eaddc7165389011 day 16 hrs ago0x7600977eb9effa627d6bd0da2e5be35e115663410x5968e58f59321fff3e24ff2fb7075fed1b9dc3df0.01178148 Ether
0x00f2cfb20a86b375f7d0cdc2471a3d49cc52d54602056b053d773aa53f71cfa065388901 day 16 hrs ago0x7600977eb9effa627d6bd0da2e5be35e115663410xf0e2fd977e251a28bd569e792852f58f8dd92aa80.02127748 Ether
0xee8bc34c87981b7201d20e2359daed321a3fc2b47fdb7c5b75abe25da2295a0865388861 day 16 hrs ago0x7600977eb9effa627d6bd0da2e5be35e115663410xe8024f9528ed37dcd7935c7864e5cfc125a4f8c00.01205113 Ether
0xa0a3bca518adc90e717e78c2ed8cf8dd0d3ed6490c3037588f3eaa57086158ae65388661 day 16 hrs ago0x7600977eb9effa627d6bd0da2e5be35e115663410x9d0d5cbb2df9b7894e88623eec3908e75be5d5fc0.01072403 Ether
0x16c61c66938c21a68d58bf71a6bde85bb2c181d6c374418c5b01e69c4d0f2a2765388621 day 16 hrs ago0x7600977eb9effa627d6bd0da2e5be35e115663410x2db6377d0ca98dead1d8aec7d05884424a5206f30.0122963 Ether
0x140df98a923c68f311465f1676a3611ed9b8954a719831eec32f773b3bd148f865388581 day 16 hrs ago0x7600977eb9effa627d6bd0da2e5be35e115663410x98a43fc1da85695b682fd9fbfa80224f2942fe330.01009177 Ether
0x724e22d2ac688c9a75680ee212ea0ab7af815eb952b4def7683aef7a360dec0965388491 day 16 hrs ago0x7600977eb9effa627d6bd0da2e5be35e115663410x0ed056d5da78bd7927c1abf089b2e29355173ce00.0114423 Ether
0xeebcd767becce989c4ff95890a5e0a117ec38cdef51afce6ecb49e1504e51e4c65388461 day 16 hrs ago0x7600977eb9effa627d6bd0da2e5be35e115663410xe51231daa306acf16eac34a864564ca36b262a1f1.35461675 Ether
0xb7a934651ebdd725b12e6e4ee502e2eebb0fca8d8192b70a295add69987c97c665386121 day 17 hrs ago0x7600977eb9effa627d6bd0da2e5be35e115663410xbe21448c497294eb7a1476902b6ac819ca222a760.01199044 Ether
0xf40322dad85235e344438ca72837e8dc9783675d770465a9d3e514c47a2f616f65385341 day 18 hrs ago0x7600977eb9effa627d6bd0da2e5be35e115663410x35818953ae60644438405c3dbbfe82dae160e73d0.01277924 Ether
0xebc19fae6f7218d9823e993ac2a99db428ef64c73c306bd7355fcc89f3f2ee5b65385311 day 18 hrs ago0x7600977eb9effa627d6bd0da2e5be35e115663410x5f3cb915d66d337e57beaffc2b4c9af826e319f40.01201424 Ether
0x707943776e0a4b5c634e7d1ceb7c30e7695cec54169ea06727edf1ca8bb3056e65385311 day 18 hrs ago0x7600977eb9effa627d6bd0da2e5be35e115663410x27a7ac243107b9391e00a8d178d859f1c3ddb44c0.01135724 Ether
0xb307c2c7abc383c420b494c40342fa93ee6ee4f50d884b61f4bc851321ee843365385311 day 18 hrs ago0x7600977eb9effa627d6bd0da2e5be35e115663410xfefd9c94cd36e3b19eee813d54b58bac00416ac70.01276924 Ether
0x55b627fd1390b1c9e0550d0b597eda77560976d8a9b4d156cc9342e750de1a9165385281 day 18 hrs ago0x7600977eb9effa627d6bd0da2e5be35e115663410xd0fe91f2e9c92b3abe4bc0dd49990de5080e977e0.01161924 Ether
0x52d37719cd731341d9a7649c6c4f9446fd240cdc796d4dc8c08d029ecc0211da65385261 day 18 hrs ago0x7600977eb9effa627d6bd0da2e5be35e115663410xfd7b67bc3f81572dc9437194b6116490d57f3d7f0.01225924 Ether
[ Download CSV Export  ] 
Warning: The Compiled Contract might be susceptible to ExpExponentCleanup (medium/high-severity), EventStructWrongData (very low-severity), NestedArrayFunctionCallDecoder (medium-severity) SolidityCompiler Bugs.

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



  Contract Source Code   Find Similiar Contracts

// 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 Switch To Opcodes View
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

 

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