Contract 0xed06d46FFB309128C4458A270C99c824dc127f5D

 
 
Txn Hash
Method
Block
From
To
Value
0xe809e18df490347598aed96d3b288364360709d30a9ccb110a8244d7f6bdf20a0x6060604054462422018-04-15 17:38:461583 days 7 hrs ago0xe03793e63776cf69fe42414ed03bb924d4d9157e IN  Create: EnclavesDEX0 Ether0.‍005735542
[ Download CSV Export 
View more zero value Internal Transactions in Advanced View mode
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
EnclavesDEX

Compiler Version
v0.4.21+commit.dfe3193c

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity)

/**
 *Submitted for verification at Etherscan.io on 2018-04-16
*/

pragma solidity ^0.4.18;

// File: contracts/EtherDeltaI.sol

contract EtherDeltaI {

  uint public feeMake; //percentage times (1 ether)
  uint public feeTake; //percentage times (1 ether)

  mapping (address => mapping (address => uint)) public tokens; //mapping of token addresses to mapping of account balances (token=0 means Ether)
  mapping (address => mapping (bytes32 => bool)) public orders; //mapping of user accounts to mapping of order hashes to booleans (true = submitted by user, equivalent to offchain signature)
  mapping (address => mapping (bytes32 => uint)) public orderFills; //mapping of user accounts to mapping of order hashes to uints (amount of order that has been filled)

  function deposit() payable;

  function withdraw(uint amount);

  function depositToken(address token, uint amount);

  function withdrawToken(address token, uint amount);

  function balanceOf(address token, address user) constant returns (uint);

  function order(address tokenGet, uint amountGet, address tokenGive, uint amountGive, uint expires, uint nonce);

  function trade(address tokenGet, uint amountGet, address tokenGive, uint amountGive, uint expires, uint nonce, address user, uint8 v, bytes32 r, bytes32 s, uint amount);

  function testTrade(address tokenGet, uint amountGet, address tokenGive, uint amountGive, uint expires, uint nonce, address user, uint8 v, bytes32 r, bytes32 s, uint amount, address sender) constant returns(bool);

  function availableVolume(address tokenGet, uint amountGet, address tokenGive, uint amountGive, uint expires, uint nonce, address user, uint8 v, bytes32 r, bytes32 s) constant returns(uint);

  function amountFilled(address tokenGet, uint amountGet, address tokenGive, uint amountGive, uint expires, uint nonce, address user, uint8 v, bytes32 r, bytes32 s) constant returns(uint);

  function cancelOrder(address tokenGet, uint amountGet, address tokenGive, uint amountGive, uint expires, uint nonce, uint8 v, bytes32 r, bytes32 s);

}

// File: contracts/KindMath.sol

/**
 * @title KindMath
 * @dev Math operations with safety checks that fail
 */
library KindMath {
  function mul(uint256 a, uint256 b) internal pure returns (uint256) {
    uint256 c = a * b;
    require(a == 0 || c / a == b);
    return c;
  }

  function div(uint256 a, uint256 b) internal pure returns (uint256) {
    // assert(b > 0); // Solidity automatically throws when dividing by 0
    uint256 c = a / b;
    // assert(a == b * c + a % b); // There is no case in which this doesn't hold
    return c;
  }

  function sub(uint256 a, uint256 b) internal pure returns (uint256) {
    require(b <= a);
    return a - b;
  }

  function add(uint256 a, uint256 b) internal pure returns (uint256) {
    uint256 c = a + b;
    require(c >= a);
    return c;
  }
}

// File: contracts/KeyValueStorage.sol

contract KeyValueStorage {

  mapping(address => mapping(bytes32 => uint256)) _uintStorage;
  mapping(address => mapping(bytes32 => address)) _addressStorage;
  mapping(address => mapping(bytes32 => bool)) _boolStorage;
  mapping(address => mapping(bytes32 => bytes32)) _bytes32Storage;

  /**** Get Methods ***********/

  function getAddress(bytes32 key) public view returns (address) {
      return _addressStorage[msg.sender][key];
  }

  function getUint(bytes32 key) public view returns (uint) {
      return _uintStorage[msg.sender][key];
  }

  function getBool(bytes32 key) public view returns (bool) {
      return _boolStorage[msg.sender][key];
  }

  function getBytes32(bytes32 key) public view returns (bytes32) {
      return _bytes32Storage[msg.sender][key];
  }

  /**** Set Methods ***********/

  function setAddress(bytes32 key, address value) public {
      _addressStorage[msg.sender][key] = value;
  }

  function setUint(bytes32 key, uint value) public {
      _uintStorage[msg.sender][key] = value;
  }

  function setBool(bytes32 key, bool value) public {
      _boolStorage[msg.sender][key] = value;
  }

  function setBytes32(bytes32 key, bytes32 value) public {
      _bytes32Storage[msg.sender][key] = value;
  }

  /**** Delete Methods ***********/

  function deleteAddress(bytes32 key) public {
      delete _addressStorage[msg.sender][key];
  }

  function deleteUint(bytes32 key) public {
      delete _uintStorage[msg.sender][key];
  }

  function deleteBool(bytes32 key) public {
      delete _boolStorage[msg.sender][key];
  }

  function deleteBytes32(bytes32 key) public {
      delete _bytes32Storage[msg.sender][key];
  }

}

// File: contracts/StorageStateful.sol

contract StorageStateful {
  KeyValueStorage public keyValueStorage;
}

// File: contracts/TokenI.sol

contract Token {
  /// @return total amount of tokens
  function totalSupply() public returns (uint256);

  /// @param _owner The address from which the balance will be retrieved
  /// @return The balance
  function balanceOf(address _owner) public returns (uint256);

  /// @notice send `_value` token to `_to` from `msg.sender`
  /// @param _to The address of the recipient
  /// @param _value The amount of token to be transferred
  /// @return Whether the transfer was successful or not
  function transfer(address _to, uint256 _value) public returns (bool);

  /// @notice send `_value` token to `_to` from `_from` on the condition it is approved by `_from`
  /// @param _from The address of the sender
  /// @param _to The address of the recipient
  /// @param _value The amount of token to be transferred
  /// @return Whether the transfer was successful or not
  function transferFrom(address _from, address _to, uint256 _value) public returns (bool);

  /// @notice `msg.sender` approves `_addr` to spend `_value` tokens
  /// @param _spender The address of the account able to transfer the tokens
  /// @param _value The amount of wei to be approved for transfer
  /// @return Whether the approval was successful or not
  function approve(address _spender, uint256 _value) public returns (bool);

  /// @param _owner The address of the account owning tokens
  /// @param _spender The address of the account able to transfer the tokens
  /// @return Amount of remaining tokens allowed to spent
  function allowance(address _owner, address _spender) public returns (uint256);

  event Transfer(address indexed _from, address indexed _to, uint256 _value);
  event Approval(address indexed _owner, address indexed _spender, uint256 _value);

  uint256 public decimals;
  string public name;
}

// File: contracts/EnclavesDEX.sol

contract EnclavesDEX is StorageStateful {
  using KindMath for uint256;

  address public admin; //the admin address
  address public feeAccount; //the account that will receive fees

  struct EtherDeltaInfo {
    uint256 feeMake;
    uint256 feeTake;
  }

  EtherDeltaInfo public etherDeltaInfo;

  uint256 public feeTake; //percentage times 1 ether
  uint256 public feeAmountThreshold; //gasPrice amount under which no fees are charged

  address public etherDelta;

  bool public useEIP712 = true;
  bytes32 public tradeABIHash;
  bytes32 public withdrawABIHash;

  bool freezeTrading;
  bool depositTokenLock;

  mapping (address => mapping (uint256 => bool)) nonceCheck;

  mapping (address => mapping (address => uint256)) public tokens; //mapping of token addresses to mapping of account balances (token=0 means Ether)
  mapping (address => mapping (bytes32 => bool)) public orders; //mapping of user accounts to mapping of order hashes to booleans (true = submitted by user, equivalent to offchain signature)
  mapping (address => mapping (bytes32 => uint256)) public orderFills; //mapping of user accounts to mapping of order hashes to uints (amount of order that has been filled)

  //Unused here - used in Proxy
  address internal implementation;
  address public proposedImplementation;
  uint256 public proposedTimestamp;

  event Order(address indexed tokenGet, uint256 amountGet, address indexed tokenGive, uint256 amountGive, uint256 expires, uint256 nonce, address indexed user);
  event Cancel(address indexed tokenGet, uint256 amountGet, address indexed tokenGive, uint256 amountGive, uint256 expires, uint256 nonce, address indexed user, uint8 v, bytes32 r, bytes32 s);
  event Trade(address tokenGet, uint256 amountGet, address tokenGive, uint256 amountGive, address indexed get, address indexed give, uint8 exchange);
  event Deposit(address indexed token, address indexed user, uint256 amount, uint256 balance);
  event Withdraw(address indexed token, address indexed user, uint256 amount, uint256 balance);
  event WithdrawPreSigned(address indexed feeToken, uint256 feeValue, address indexed feeReceiver);
  event Rebalance(address indexed dex, address indexed token, uint256 amount);

  modifier onlyAdmin {
    require(msg.sender == admin);
    _;
  }

  modifier onlyEtherDelta {
    require(msg.sender == etherDelta);
    _;
  }

  modifier markTokenDeposit {
    depositTokenLock = true;
    _;
    depositTokenLock = false;
  }

  modifier inTokenDeposit {
    require(depositTokenLock);
    _;
  }

  modifier notFrozen {
    require(!freezeTrading);
    _;
  }

  function setEtherDeltaFees() public onlyAdmin {
    etherDeltaInfo.feeMake = EtherDeltaI(etherDelta).feeMake();
    etherDeltaInfo.feeTake = EtherDeltaI(etherDelta).feeTake();
  }

  function() public payable onlyEtherDelta {
  }

  function setTradeABIHash(bytes32 _tradeABIHash) public onlyAdmin {
    tradeABIHash = _tradeABIHash;
  }

  function setWithdrawABIHash(bytes32 _withdrawABIHash) public onlyAdmin {
    withdrawABIHash = _withdrawABIHash;
  }

  function setUseEIP712(bool _useEIP712) public onlyAdmin {
    useEIP712 = _useEIP712;
  }

  function changeAdmin(address _admin) public onlyAdmin {
    admin = _admin;
  }

  function changeFeeAccount(address _feeAccount) public onlyAdmin {
    require(_feeAccount != address(0));
    feeAccount = _feeAccount;
  }

  function changeFeeTake(uint256 _feeTake) public onlyAdmin {
    feeTake = _feeTake;
  }

  function changeFeeAmountThreshold(uint256 _feeAmountThreshold) public onlyAdmin {
    feeAmountThreshold = _feeAmountThreshold;
  }

  function changeFreezeTrading(bool _freezeTrading) public onlyAdmin {
    freezeTrading = _freezeTrading;
  }

  function deposit() public payable {
    if (msg.value > 0) {
      tokens[address(0)][msg.sender] = tokens[address(0)][msg.sender].add(msg.value);
      Deposit(address(0), msg.sender, msg.value, tokens[address(0)][msg.sender]);
    }
  }

  function depositEther(uint256 _amount) internal {
    //Will throw if not enough ether sent
    uint256 refund = msg.value.sub(_amount);
    if (_amount != 0) {
      tokens[address(0)][msg.sender] = tokens[address(0)][msg.sender].add(_amount);
      Deposit(address(0), msg.sender, _amount, tokens[address(0)][msg.sender]);
    }
    if (refund > 0) {
      msg.sender.transfer(refund);
    }
  }

  function depositToken(address _token, uint256 _amount) public markTokenDeposit {
    require(_token != address(0));
    require(Token(_token).transferFrom(msg.sender, address(this), _amount));
    tokens[_token][msg.sender] = tokens[_token][msg.sender].add(_amount);
    Deposit(_token, msg.sender, _amount, tokens[_token][msg.sender]);
  }

  function depositBoth(address _token, uint256 _amount) public payable {
    depositToken(_token, _amount);
    deposit();
  }

  function processDeposits(address _token, uint256 _amount) internal {
    //Always need to deal with possible non-zero msg.value
    uint256 etherAmount = 0;
    if ((_token == address(0)) && (tokens[address(0)][msg.sender] < _amount)) {
      etherAmount = _amount.sub(tokens[address(0)][msg.sender]);
    }
    depositEther(etherAmount);
    //Only pull tokens if needed
    if ((_token != address(0)) && (tokens[_token][msg.sender] < _amount)) {
      depositToken(_token, _amount.sub(tokens[_token][msg.sender]));
    }
  }

  function withdraw(uint256 _amount) public {
    withdrawUser(_amount, msg.sender);
  }

  function withdrawUser(uint256 _amount, address _user) internal {
    tokens[address(0)][_user] = tokens[address(0)][_user].sub(_amount);
    if (this.balance < _amount) {
      rebalanceEnclaves(address(0), _amount);
    }
    _user.transfer(_amount);
    Withdraw(address(0), _user, _amount, tokens[address(0)][_user]);
  }

  function withdrawToken(address _token, uint256 _amount) public {
    withdrawTokenUser(_token, _amount, msg.sender);
  }

  function withdrawTokenUser(address _token, uint256 _amount, address _user) internal {
    require(_token != 0);
    tokens[_token][_user] = tokens[_token][_user].sub(_amount);
    if (Token(_token).balanceOf(address(this)) < _amount) {
      rebalanceEnclaves(_token, _amount);
    }
    require(Token(_token).transfer(_user, _amount));
    Withdraw(_token, _user, _amount, tokens[_token][_user]);
  }

  function withdrawTokenMulti(address[] _tokens, uint256[] _amounts) public {
    require(_tokens.length == _amounts.length);
    for (uint256 i = 0; i < _tokens.length; i++) {
      withdrawToken(_tokens[i], _amounts[i]);
    }
  }

  function withdrawBoth(address _token, uint256 _tokenAmount, uint256 _ethAmount) public {
    withdrawToken(_token, _tokenAmount);
    withdraw(_ethAmount);
  }

  function tokenFallback(address /* _from */, uint256 /* _value */, bytes /* _data */) public view inTokenDeposit {
    //Having this function allows ERC23 tokens to be deposited via the usual approve / transferFrom methods
    //It should only be called whilst a depositToken is occurring
  }

  function balanceOf(address _token, address _user) public view returns (uint256) {
    return tokens[_token][_user];
  }

  function order(address _tokenGet, uint256 _amountGet, address _tokenGive, uint256 _amountGive, uint256 _expires, uint256 _nonce) public {
    bytes32 orderHash = keccak256(address(this), _tokenGet, _amountGet, _tokenGive, _amountGive, _expires, _nonce);
    orders[msg.sender][orderHash] = true;
    Order(_tokenGet, _amountGet, _tokenGive, _amountGive, _expires, _nonce, msg.sender);
  }

  function rebalanceEtherDelta(address _token, uint256 _amount) internal {
    uint256 enclavesBalance;
    if (_token == address(0)) {
      enclavesBalance = this.balance;
      if (enclavesBalance < _amount) {
        _amount = enclavesBalance;
      }
      EtherDeltaI(etherDelta).deposit.value(_amount)();
    } else {
      enclavesBalance = Token(_token).balanceOf(address(this));
      if (enclavesBalance < _amount) {
        _amount = enclavesBalance;
      }
      Token(_token).approve(etherDelta, _amount);
      EtherDeltaI(etherDelta).depositToken(_token, _amount);
    }
    Rebalance(etherDelta, _token, _amount);
  }

  function rebalanceEnclaves(address _token, uint256 _amount) internal {
    uint256 edBalance = EtherDeltaI(etherDelta).balanceOf(_token, address(this));
    if (edBalance < _amount) {
      _amount = edBalance;
    }
    if (_token == address(0)) {
      EtherDeltaI(etherDelta).withdraw(_amount);
    } else {
      EtherDeltaI(etherDelta).withdrawToken(_token, _amount);
    }
    Rebalance(address(this), _token, _amount);
  }

  function tradeEtherDelta(address _tokenGet, uint256 _amountGet, address _tokenGive, uint256 _amountGive, uint256 _expires, uint256 _nonce, address _user, uint8 _v, bytes32 _r, bytes32 _s, uint256 _amount, bool _withdraw) public notFrozen payable returns (uint256) {
    _amount = availableVolumeEtherDelta(_tokenGet, _amountGet, _tokenGive, _amountGive, _expires, _nonce, _user, _amount);
    require(_amount > 0);
    _tradeEtherDelta(_tokenGet, _amountGet, _tokenGive, _amountGive, _expires, _nonce, _user, _v, _r, _s, _amount);
    if (_withdraw) {
      if (_tokenGive == address(0)) {
        withdraw(_amountGive.mul(_amount) / _amountGet);
      } else {
        withdrawToken(_tokenGive, _amountGive.mul(_amount) / _amountGet);
      }
    }
    return _amount;
  }

  //amount is denominated in tokenGet
  function _tradeEtherDelta(address _tokenGet, uint256 _amountGet, address _tokenGive, uint256 _amountGive, uint256 _expires, uint256 _nonce, address _user, uint8 _v, bytes32 _r, bytes32 _s, uint256 _amount) internal {
    uint256 cost = _amount.add(_amount.mul(etherDeltaInfo.feeTake) / 1 ether);
    processDeposits(_tokenGet, cost);
    tokens[_tokenGet][msg.sender] = tokens[_tokenGet][msg.sender].sub(cost);
    if (EtherDeltaI(etherDelta).balanceOf(_tokenGet, address(this)) < cost) {
      rebalanceEtherDelta(_tokenGet, cost);
    }
    EtherDeltaI(etherDelta).trade(_tokenGet, _amountGet, _tokenGive, _amountGive, _expires, _nonce, _user, _v, _r, _s, _amount);
    //Reuse cost to avoid "CompilerError: Stack too deep, try removing local variables."
    cost = _amountGive.mul(_amount) / _amountGet;
    tokens[_tokenGive][msg.sender] = tokens[_tokenGive][msg.sender].add(cost);
    Trade(_tokenGet, _amount, _tokenGive, cost, _user, msg.sender, 1);
  }

  function trade(address _tokenGet, uint256 _amountGet, address _tokenGive, uint256 _amountGive, uint256 _expires, uint256 _nonce, address _user, uint8 _v, bytes32 _r, bytes32 _s, uint256 _amount, bool _withdraw) public notFrozen payable returns (uint256) {
    uint256 availableVolume;
    //Reuse _r to avoid "CompilerError: Stack too deep, try removing local variables."
    (availableVolume, _r) = availableVolumeEnclaves(_tokenGet, _amountGet, _tokenGive, _amountGive, _expires, _nonce, _user, _v, _r, _s);
    _amount = (availableVolume < _amount) ? availableVolume : _amount;
    require(_amount > 0);
    _trade(_tokenGet, _amountGet, _tokenGive, _amountGive, _user, _amount, _r);
    if (_withdraw) {
      if (_tokenGive == address(0)) {
        withdraw(_amountGive.mul(_amount) / _amountGet);
      } else {
        withdrawToken(_tokenGive, _amountGive.mul(_amount) / _amountGet);
      }
    }
    return _amount;
  }

  //_amount is denominated in tokenGet
  function _trade(address _tokenGet, uint256 _amountGet, address _tokenGive, uint256 _amountGive, address _user, uint256 _amount, bytes32 _orderHash) internal {
    uint256 ethAmount = (_tokenGet == address(0)) ? _amount : _amountGive.mul(_amount) / _amountGet;
    uint256 feeTakeXfer = (ethAmount <= feeAmountThreshold) ? 0 : _amount.mul(feeTake) / (1 ether);
    uint256 cost = _amount.add(feeTakeXfer);
    processDeposits(_tokenGet, cost);
    tokens[_tokenGet][msg.sender] = tokens[_tokenGet][msg.sender].sub(cost);
    //
    tokens[_tokenGet][_user] = tokens[_tokenGet][_user].add(_amount);
    if (feeTakeXfer > 0) {
      tokens[_tokenGet][feeAccount] = tokens[_tokenGet][feeAccount].add(feeTakeXfer);
    }
    tokens[_tokenGive][_user] = tokens[_tokenGive][_user].sub(_amountGive.mul(_amount) / _amountGet);
    //
    //Reuse cost to avoid "CompilerError: Stack too deep, try removing local variables."
    cost = _amountGive.mul(_amount) / _amountGet;
    tokens[_tokenGive][msg.sender] = tokens[_tokenGive][msg.sender].add(cost);
    orderFills[_user][_orderHash] = orderFills[_user][_orderHash].add(_amount);
    Trade(_tokenGet, _amount, _tokenGive, cost, _user, msg.sender, 0);
  }

  function checkSig(bytes32 _abiHash, bytes32 _hash, uint8 _v, bytes32 _r, bytes32 _s, address _user) public view returns(bool) {
    if (useEIP712) {
      return (ecrecover(keccak256(_abiHash, _hash), _v, _r, _s) == _user);
    } else {
      return (ecrecover(keccak256("\x19Ethereum Signed Message:\n32", _hash), _v, _r, _s) == _user);
    }
  }

  function availableVolumeEnclaves(address _tokenGet, uint256 _amountGet, address _tokenGive, uint256 _amountGive, uint256 _expires, uint256 _nonce, address _user, uint8 _v, bytes32 _r, bytes32 _s) public view returns (uint256, bytes32) {
    bytes32 orderHash = keccak256(address(this), _tokenGet, _amountGet, _tokenGive, _amountGive, _expires, _nonce);
    if (!(
      (orders[_user][orderHash] || checkSig(tradeABIHash, orderHash, _v, _r, _s, _user)) &&
      block.number <= _expires
    )) return (0, orderHash);
    //Reuse amountGet/Give to avoid "CompilerError: Stack too deep, try removing local variables."
    _amountGive = tokens[_tokenGive][_user].mul(_amountGet) / _amountGive;
    _amountGet = _amountGet.sub(orderFills[_user][orderHash]);
    _amountGet = (_amountGive < _amountGet) ? _amountGive : _amountGet;
    return (_amountGet, orderHash);
  }

  function availableVolumeEtherDelta(address _tokenGet, uint256 _amountGet, address _tokenGive, uint256 _amountGive, uint256 _expires, uint256 _nonce, address _user, uint256 _amount) public view returns (uint256) {
    if (block.number > _expires) {
      return 0;
    }
    bytes32 orderHash = sha256(etherDelta, _tokenGet, _amountGet, _tokenGive, _amountGive, _expires, _nonce);
    //Reuse amountGet/Give to avoid "CompilerError: Stack too deep, try removing local variables."
    _amountGive = EtherDeltaI(etherDelta).tokens(_tokenGive, _user).mul(_amountGet) / _amountGive;
    _amountGet = _amountGet.sub(EtherDeltaI(etherDelta).orderFills(_user, orderHash));
    if (_amountGet > _amountGive) {
      _amountGet = _amountGive;
    }
    if (_amountGet > _amount) {
      _amountGet = _amount;
    }
    return _amountGet;
  }

  function amountFilled(address _tokenGet, uint256 _amountGet, address _tokenGive, uint256 _amountGive, uint256 _expires, uint256 _nonce, address _user) public view returns(uint256) {
    bytes32 hash = keccak256(address(this), _tokenGet, _amountGet, _tokenGive, _amountGive, _expires, _nonce);
    return orderFills[_user][hash];
  }

  function cancelOrder(address _tokenGet, uint256 _amountGet, address _tokenGive, uint256 _amountGive, uint256 _expires, uint256 _nonce, uint8 _v, bytes32 _r, bytes32 _s) public {
    bytes32 hash = keccak256(address(this), _tokenGet, _amountGet, _tokenGive, _amountGive, _expires, _nonce);
    require(orders[msg.sender][hash] || checkSig(tradeABIHash, hash, _v, _r, _s, msg.sender));
    orderFills[msg.sender][hash] = _amountGet;
    Cancel(_tokenGet, _amountGet, _tokenGive, _amountGive, _expires, _nonce, msg.sender, _v, _r, _s);
  }

  function withdrawPreSigned(address _token, uint256 _value, address _feeToken, uint256 _feeValue, uint256 _nonce, address _user, uint8 _v, bytes32 _r, bytes32 _s) public {
    require(nonceCheck[_user][_nonce] == false);
    bytes32 hash = keccak256(address(this), _token, _value, _feeToken, _feeValue, _nonce);
    require(checkSig(withdrawABIHash, hash, _v, _r, _s, _user));
    nonceCheck[_user][_nonce] = true;
    //Debit fee to sender
    tokens[_feeToken][_user] = tokens[_feeToken][_user].sub(_feeValue);
    tokens[_feeToken][msg.sender] = tokens[_feeToken][msg.sender].add(_feeValue);
    if (_token == address(0)) {
      withdrawUser(_value, _user);
    } else {
      withdrawTokenUser(_token, _value, _user);
    }
    WithdrawPreSigned(_feeToken, _feeValue, msg.sender);
  }

}

Contract Security Audit

Contract ABI

[{"constant":false,"inputs":[{"name":"_tokenGet","type":"address"},{"name":"_amountGet","type":"uint256"},{"name":"_tokenGive","type":"address"},{"name":"_amountGive","type":"uint256"},{"name":"_expires","type":"uint256"},{"name":"_nonce","type":"uint256"},{"name":"_user","type":"address"},{"name":"_v","type":"uint8"},{"name":"_r","type":"bytes32"},{"name":"_s","type":"bytes32"},{"name":"_amount","type":"uint256"},{"name":"_withdraw","type":"bool"}],"name":"tradeEtherDelta","outputs":[{"name":"","type":"uint256"}],"payable":true,"stateMutability":"payable","type":"function"},{"constant":false,"inputs":[{"name":"_tokenGet","type":"address"},{"name":"_amountGet","type":"uint256"},{"name":"_tokenGive","type":"address"},{"name":"_amountGive","type":"uint256"},{"name":"_expires","type":"uint256"},{"name":"_nonce","type":"uint256"}],"name":"order","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"},{"name":"","type":"bytes32"}],"name":"orderFills","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"etherDeltaInfo","outputs":[{"name":"feeMake","type":"uint256"},{"name":"feeTake","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_useEIP712","type":"bool"}],"name":"setUseEIP712","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_tokenGet","type":"address"},{"name":"_amountGet","type":"uint256"},{"name":"_tokenGive","type":"address"},{"name":"_amountGive","type":"uint256"},{"name":"_expires","type":"uint256"},{"name":"_nonce","type":"uint256"},{"name":"_v","type":"uint8"},{"name":"_r","type":"bytes32"},{"name":"_s","type":"bytes32"}],"name":"cancelOrder","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_tokenGet","type":"address"},{"name":"_amountGet","type":"uint256"},{"name":"_tokenGive","type":"address"},{"name":"_amountGive","type":"uint256"},{"name":"_expires","type":"uint256"},{"name":"_nonce","type":"uint256"},{"name":"_user","type":"address"}],"name":"amountFilled","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_amount","type":"uint256"}],"name":"withdraw","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_tradeABIHash","type":"bytes32"}],"name":"setTradeABIHash","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_tokenGet","type":"address"},{"name":"_amountGet","type":"uint256"},{"name":"_tokenGive","type":"address"},{"name":"_amountGive","type":"uint256"},{"name":"_expires","type":"uint256"},{"name":"_nonce","type":"uint256"},{"name":"_user","type":"address"},{"name":"_amount","type":"uint256"}],"name":"availableVolumeEtherDelta","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_token","type":"address"},{"name":"_amount","type":"uint256"}],"name":"depositToken","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"proposedTimestamp","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_token","type":"address"},{"name":"_value","type":"uint256"},{"name":"_feeToken","type":"address"},{"name":"_feeValue","type":"uint256"},{"name":"_nonce","type":"uint256"},{"name":"_user","type":"address"},{"name":"_v","type":"uint8"},{"name":"_r","type":"bytes32"},{"name":"_s","type":"bytes32"}],"name":"withdrawPreSigned","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_token","type":"address"},{"name":"_amount","type":"uint256"}],"name":"depositBoth","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"},{"name":"","type":"address"}],"name":"tokens","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_freezeTrading","type":"bool"}],"name":"changeFreezeTrading","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"feeAmountThreshold","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"useEIP712","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"keyValueStorage","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"feeAccount","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_feeAccount","type":"address"}],"name":"changeFeeAccount","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_feeTake","type":"uint256"}],"name":"changeFeeTake","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"tradeABIHash","outputs":[{"name":"","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_admin","type":"address"}],"name":"changeAdmin","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_token","type":"address"},{"name":"_tokenAmount","type":"uint256"},{"name":"_ethAmount","type":"uint256"}],"name":"withdrawBoth","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_tokenGet","type":"address"},{"name":"_amountGet","type":"uint256"},{"name":"_tokenGive","type":"address"},{"name":"_amountGive","type":"uint256"},{"name":"_expires","type":"uint256"},{"name":"_nonce","type":"uint256"},{"name":"_user","type":"address"},{"name":"_v","type":"uint8"},{"name":"_r","type":"bytes32"},{"name":"_s","type":"bytes32"}],"name":"availableVolumeEnclaves","outputs":[{"name":"","type":"uint256"},{"name":"","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_tokenGet","type":"address"},{"name":"_amountGet","type":"uint256"},{"name":"_tokenGive","type":"address"},{"name":"_amountGive","type":"uint256"},{"name":"_expires","type":"uint256"},{"name":"_nonce","type":"uint256"},{"name":"_user","type":"address"},{"name":"_v","type":"uint8"},{"name":"_r","type":"bytes32"},{"name":"_s","type":"bytes32"},{"name":"_amount","type":"uint256"},{"name":"_withdraw","type":"bool"}],"name":"trade","outputs":[{"name":"","type":"uint256"}],"payable":true,"stateMutability":"payable","type":"function"},{"constant":false,"inputs":[{"name":"_token","type":"address"},{"name":"_amount","type":"uint256"}],"name":"withdrawToken","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"proposedImplementation","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"},{"name":"","type":"bytes32"}],"name":"orders","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_feeAmountThreshold","type":"uint256"}],"name":"changeFeeAmountThreshold","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"},{"name":"","type":"uint256"},{"name":"","type":"bytes"}],"name":"tokenFallback","outputs":[],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"feeTake","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"deposit","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":true,"inputs":[],"name":"etherDelta","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"setEtherDeltaFees","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_withdrawABIHash","type":"bytes32"}],"name":"setWithdrawABIHash","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_tokens","type":"address[]"},{"name":"_amounts","type":"uint256[]"}],"name":"withdrawTokenMulti","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_token","type":"address"},{"name":"_user","type":"address"}],"name":"balanceOf","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"admin","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_abiHash","type":"bytes32"},{"name":"_hash","type":"bytes32"},{"name":"_v","type":"uint8"},{"name":"_r","type":"bytes32"},{"name":"_s","type":"bytes32"},{"name":"_user","type":"address"}],"name":"checkSig","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"withdrawABIHash","outputs":[{"name":"","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"payable":true,"stateMutability":"payable","type":"fallback"},{"anonymous":false,"inputs":[{"indexed":true,"name":"tokenGet","type":"address"},{"indexed":false,"name":"amountGet","type":"uint256"},{"indexed":true,"name":"tokenGive","type":"address"},{"indexed":false,"name":"amountGive","type":"uint256"},{"indexed":false,"name":"expires","type":"uint256"},{"indexed":false,"name":"nonce","type":"uint256"},{"indexed":true,"name":"user","type":"address"}],"name":"Order","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"tokenGet","type":"address"},{"indexed":false,"name":"amountGet","type":"uint256"},{"indexed":true,"name":"tokenGive","type":"address"},{"indexed":false,"name":"amountGive","type":"uint256"},{"indexed":false,"name":"expires","type":"uint256"},{"indexed":false,"name":"nonce","type":"uint256"},{"indexed":true,"name":"user","type":"address"},{"indexed":false,"name":"v","type":"uint8"},{"indexed":false,"name":"r","type":"bytes32"},{"indexed":false,"name":"s","type":"bytes32"}],"name":"Cancel","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"tokenGet","type":"address"},{"indexed":false,"name":"amountGet","type":"uint256"},{"indexed":false,"name":"tokenGive","type":"address"},{"indexed":false,"name":"amountGive","type":"uint256"},{"indexed":true,"name":"get","type":"address"},{"indexed":true,"name":"give","type":"address"},{"indexed":false,"name":"exchange","type":"uint8"}],"name":"Trade","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"token","type":"address"},{"indexed":true,"name":"user","type":"address"},{"indexed":false,"name":"amount","type":"uint256"},{"indexed":false,"name":"balance","type":"uint256"}],"name":"Deposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"token","type":"address"},{"indexed":true,"name":"user","type":"address"},{"indexed":false,"name":"amount","type":"uint256"},{"indexed":false,"name":"balance","type":"uint256"}],"name":"Withdraw","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"feeToken","type":"address"},{"indexed":false,"name":"feeValue","type":"uint256"},{"indexed":true,"name":"feeReceiver","type":"address"}],"name":"WithdrawPreSigned","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"dex","type":"address"},{"indexed":true,"name":"token","type":"address"},{"indexed":false,"name":"amount","type":"uint256"}],"name":"Rebalance","type":"event"}]

60606040526007805460a060020a60ff02191674010000000000000000000000000000000000000000179055341561003657600080fd5b612903806100456000396000f3006060604052600436106101ea5763ffffffff60e060020a60003504166304f1e4e281146102075780630b9276661461026157806319774d43146102935780631bff4786146102b5578063251d3589146102e0578063278b8c0e146102f85780632d804ca2146103375780632e1a7d4d14610372578063302307961461038857806331f6eac81461039e578063338b5dea146103dc5780633cf52ffb146103fe5780634b41cb60146104115780634b56cd2714610455578063508493bc1461046c57806351731f211461049157806355ce76e6146104a95780635bd948b1146104bc5780635d4d061e146104e357806365e17c9d1461051257806371ffcb16146105255780638823a9c0146105445780638e1e2add1461055a5780638f2839701461056d57806391feea931461058c578063969283e2146105b15780639b788752146105fa5780639e281a9814610642578063bb057c5e14610664578063bb5f462914610677578063bfcabcbf14610699578063c0ee0b8a146106af578063c281309e14610714578063d0e30db014610727578063d67a10e31461072f578063e68a655c14610742578063e7d854af14610755578063f700ead91461076b578063f7888aec146107fa578063f851a4401461081f578063fa043b0f14610832578063fe26f16f14610863575b60075433600160a060020a0390811691161461020557600080fd5b005b61024f600160a060020a0360043581169060243590604435811690606435906084359060a4359060c4351660ff60e43516610104356101243561014435610164351515610876565b60405190815260200160405180910390f35b341561026c57600080fd5b610205600160a060020a03600435811690602435906044351660643560843560a43561092e565b341561029e57600080fd5b61024f600160a060020a0360043516602435610a2d565b34156102c057600080fd5b6102c8610a4a565b60405191825260208201526040908101905180910390f35b34156102eb57600080fd5b6102056004351515610a53565b341561030357600080fd5b610205600160a060020a03600435811690602435906044351660643560843560a43560ff60c4351660e43561010435610aae565b341561034257600080fd5b61024f600160a060020a0360043581169060243590604435811690606435906084359060a4359060c43516610c0e565b341561037d57600080fd5b610205600435610cab565b341561039357600080fd5b610205600435610cb8565b34156103a957600080fd5b61024f600160a060020a0360043581169060243590604435811690606435906084359060a4359060c4351660e435610cd8565b34156103e757600080fd5b610205600160a060020a0360043516602435610eb4565b341561040957600080fd5b61024f61100c565b341561041c57600080fd5b610205600160a060020a0360043581169060243590604435811690606435906084359060a4351660ff60c4351660e43561010435611012565b610205600160a060020a03600435166024356111ec565b341561047757600080fd5b61024f600160a060020a0360043581169060243516611202565b341561049c57600080fd5b610205600435151561121f565b34156104b457600080fd5b61024f61124d565b34156104c757600080fd5b6104cf611253565b604051901515815260200160405180910390f35b34156104ee57600080fd5b6104f6611274565b604051600160a060020a03909116815260200160405180910390f35b341561051d57600080fd5b6104f6611283565b341561053057600080fd5b610205600160a060020a0360043516611292565b341561054f57600080fd5b6102056004356112f1565b341561056557600080fd5b61024f611311565b341561057857600080fd5b610205600160a060020a0360043516611317565b341561059757600080fd5b610205600160a060020a0360043516602435604435611361565b34156105bc57600080fd5b6102c8600160a060020a0360043581169060243590604435811690606435906084359060a4359060c4351660ff60e435166101043561012435611379565b61024f600160a060020a0360043581169060243590604435811690606435906084359060a4359060c4351660ff60e435166101043561012435610144356101643515156114e7565b341561064d57600080fd5b610205600160a060020a0360043516602435611595565b341561066f57600080fd5b6104f66115a0565b341561068257600080fd5b6104cf600160a060020a03600435166024356115af565b34156106a457600080fd5b6102056004356115cf565b34156106ba57600080fd5b61020560048035600160a060020a03169060248035919060649060443590810190830135806020601f820181900481020160405190810160405281815292919060208401838380828437509496506115ef95505050505050565b341561071f57600080fd5b61024f611605565b61020561160b565b341561073a57600080fd5b6104f66116b3565b341561074d57600080fd5b6102056116c2565b341561076057600080fd5b61020560043561178f565b341561077657600080fd5b6102056004602481358181019083013580602081810201604051908101604052809392919081815260200183836020028082843782019150505050505091908035906020019082018035906020019080806020026020016040519081016040528093929190818152602001838360200280828437509496506117af95505050505050565b341561080557600080fd5b61024f600160a060020a0360043581169060243516611808565b341561082a57600080fd5b6104f6611833565b341561083d57600080fd5b6104cf60043560243560ff60443516606435608435600160a060020a0360a43516611842565b341561086e57600080fd5b61024f6119a1565b600a5460009060ff161561088957600080fd5b6108998d8d8d8d8d8d8d8a610cd8565b9250600083116108a857600080fd5b6108bb8d8d8d8d8d8d8d8d8d8d8d6119a7565b811561091d57600160a060020a038b1615156108f9576108f48c6108e58c8663ffffffff611c9016565b8115156108ee57fe5b04610cab565b61091d565b61091d8b8d61090e8d8763ffffffff611c9016565b81151561091757fe5b04611595565b50909b9a5050505050505050505050565b6000308787878787876040516c01000000000000000000000000600160a060020a0398891681028252968816870260148201526028810195909552929095169093026048830152605c820192909252607c810192909252609c82015260bc01604051908190039020600160a060020a033381166000818152600d6020908152604080832086845290915290819020805460ff1916600117905592935091878216918a16907f3f7f2eda73683c21a15f9435af1028c93185b5f1fa38270762dc32be606b3e85908a90899089908990518085815260200184815260200183815260200182815260200194505050505060405180910390a450505050505050565b600e60209081526000928352604080842090915290825290205481565b60035460045482565b60015433600160a060020a03908116911614610a6e57600080fd5b60078054911515740100000000000000000000000000000000000000000274ff000000000000000000000000000000000000000019909216919091179055565b6000308a8a8a8a8a8a6040516c01000000000000000000000000600160a060020a0398891681028252968816870260148201526028810195909552929095169093026048830152605c820192909252607c810192909252609c82015260bc01604051908190039020600160a060020a0333166000908152600d6020908152604080832084845290915290205490915060ff1680610b565750610b566008548286868633611842565b1515610b6157600080fd5b600160a060020a033381166000818152600e60209081526040808320868452909152908190208c905590918a811691908d16907f1e0b760c386003e9cb9bcf4fcf3997886042859d9b6ed6320e804597fcdb28b0908d908c908c908c908c908c908c90519687526020870195909552604080870194909452606086019290925260ff16608085015260a084015260c083019190915260e0909101905180910390a450505050505050505050565b600080308989898989896040516c01000000000000000000000000600160a060020a0398891681028252968816870260148201526028810195909552929095169093026048830152605c820192909252607c810192909252609c82015260bc01604051908190039020600160a060020a0384166000908152600e602090815260408083208484529091529020549250905050979650505050505050565b610cb58133611cbe565b50565b60015433600160a060020a03908116911614610cd357600080fd5b600855565b60008085431115610cec5760009150610ea7565b600754600290600160a060020a03168b8b8b8b8b8b6040516c01000000000000000000000000600160a060020a0398891681028252968816870260148201526028810195909552929095169093026048830152605c820192909252607c810192909252609c82015260bc016020604051808303816000865af11515610d7057600080fd5b50506040518051600754909250889150610dfe908b90600160a060020a031663508493bc8c8960405160e060020a63ffffffff8516028152600160a060020a03928316600482015291166024820152604401602060405180830381600087803b1515610ddb57600080fd5b5af11515610de857600080fd5b505050604051805191905063ffffffff611c9016565b811515610e0757fe5b6007549190049750610e8990600160a060020a03166319774d43868460405160e060020a63ffffffff8516028152600160a060020a0390921660048301526024820152604401602060405180830381600087803b1515610e6657600080fd5b5af11515610e7357600080fd5b50505060405180518b915063ffffffff611dca16565b985086891115610e97578698505b82891115610ea3578298505b8891505b5098975050505050505050565b600a805461ff001916610100179055600160a060020a0382161515610ed857600080fd5b81600160a060020a03166323b872dd33308460405160e060020a63ffffffff8616028152600160a060020a0393841660048201529190921660248201526044810191909152606401602060405180830381600087803b1515610f3957600080fd5b5af11515610f4657600080fd5b505050604051805190501515610f5b57600080fd5b600160a060020a038083166000908152600c602090815260408083203390941683529290522054610f92908263ffffffff611ddf16565b600160a060020a038381166000818152600c60209081526040808320339095168084529490915290819020849055919290917fdcbc1c05240f31ff3ad067ef1ee35ce4997762752e3a095284754544f4c709d79185915191825260208201526040908101905180910390a35050600a805461ff0019169055565b60115481565b600160a060020a0384166000908152600b6020908152604080832088845290915281205460ff161561104357600080fd5b308a8a8a8a8a6040516c01000000000000000000000000600160a060020a0397881681028252958716860260148201526028810194909452919094169092026048820152605c810192909252607c820152609c01604051809103902090506110b1600954828686868a611842565b15156110bc57600080fd5b600160a060020a038086166000818152600b602090815260408083208b84528252808320805460ff19166001179055938c168252600c8152838220928252919091522054611110908863ffffffff611dca16565b600160a060020a038981166000908152600c602090815260408083208a8516845290915280822093909355339091168152205461114d9088611ddf565b600160a060020a03808a166000908152600c6020908152604080832033851684529091529020919091558a16151561118e576111898986611cbe565b611199565b6111998a8a87611df1565b33600160a060020a031688600160a060020a03167f8b47986acfb878e86b02f0a5ddbb807908f8a7b61c412ad3b3b855fd057aecc68960405190815260200160405180910390a350505050505050505050565b6111f68282610eb4565b6111fe61160b565b5050565b600c60209081526000928352604080842090915290825290205481565b60015433600160a060020a0390811691161461123a57600080fd5b600a805460ff1916911515919091179055565b60065481565b60075474010000000000000000000000000000000000000000900460ff1681565b600054600160a060020a031681565b600254600160a060020a031681565b60015433600160a060020a039081169116146112ad57600080fd5b600160a060020a03811615156112c257600080fd5b6002805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b60015433600160a060020a0390811691161461130c57600080fd5b600555565b60085481565b60015433600160a060020a0390811691161461133257600080fd5b6001805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b61136b8383611595565b61137481610cab565b505050565b6000806000308d8d8d8d8d8d6040516c01000000000000000000000000600160a060020a0398891681028252968816870260148201526028810195909552929095169093026048830152605c820192909252607c810192909252609c82015260bc01604051908190039020600160a060020a0388166000908152600d6020908152604080832084845290915290205490915060ff16806114245750611424600854828888888c611842565b80156114305750884311155b151561144257600092509050806114d7565b600160a060020a03808c166000908152600c60209081526040808320938b16835292905220548a9061147a908e63ffffffff611c9016565b81151561148357fe5b600160a060020a0389166000908152600e602090815260408083208684529091529020549190049a506114bd908d9063ffffffff611dca16565b9b508b8a106114cc578b6114ce565b895b9b508b81925092505b509a509a98505050505050505050565b600a54600090819060ff16156114fc57600080fd5b61150e8e8e8e8e8e8e8e8e8e8e611379565b9650905083811061151f5783611521565b805b93506000841161153057600080fd5b61153f8e8e8e8e8c898c611fb5565b821561158357600160a060020a038c16151561156e576115698d6108e58d8763ffffffff611c9016565b611583565b6115838c8e61090e8e8863ffffffff611c9016565b50919c9b505050505050505050505050565b6111fe828233611df1565b601054600160a060020a031681565b600d60209081526000928352604080842090915290825290205460ff1681565b60015433600160a060020a039081169116146115ea57600080fd5b600655565b600a54610100900460ff16151561137457600080fd5b60055481565b60003411156116b15733600160a060020a031660009081526000805160206128b8833981519152602052604090205461164a903463ffffffff611ddf16565b600160a060020a03331660008181526000805160206128b88339815191526020526040808220849055919290917fdcbc1c05240f31ff3ad067ef1ee35ce4997762752e3a095284754544f4c709d79134915191825260208201526040908101905180910390a35b565b600754600160a060020a031681565b60015433600160a060020a039081169116146116dd57600080fd5b600754600160a060020a031663577863946040518163ffffffff1660e060020a028152600401602060405180830381600087803b151561171c57600080fd5b5af1151561172957600080fd5b505050604051805160035550600754600160a060020a031663c281309e6040518163ffffffff1660e060020a028152600401602060405180830381600087803b151561177457600080fd5b5af1151561178157600080fd5b505050604051805160045550565b60015433600160a060020a039081169116146117aa57600080fd5b600955565b600081518351146117bf57600080fd5b5060005b8251811015611374576118008382815181106117db57fe5b906020019060200201518383815181106117f157fe5b90602001906020020151611595565b6001016117c3565b600160a060020a039182166000908152600c6020908152604080832093909416825291909152205490565b600154600160a060020a031681565b60075460009074010000000000000000000000000000000000000000900460ff16156118fc5781600160a060020a03166001888860405191825260208201526040908101905180910390208787876040516000815260200160405260405193845260ff9092166020808501919091526040808501929092526060840192909252608090920191516020810390808403906000865af115156118e257600080fd5b505060206040510351600160a060020a0316149050611997565b81600160a060020a03166001876040517f19457468657265756d205369676e6564204d6573736167653a0a3332000000008152601c810191909152603c0160405180910390208787876040516000815260200160405260405193845260ff9092166020808501919091526040808501929092526060840192909252608090920191516020810390808403906000865af115156118e257600080fd5b9695505050505050565b60095481565b60006119e5670de0b6b3a76400006119cd60036001015485611c9090919063ffffffff16565b8115156119d657fe5b8491900463ffffffff611ddf16565b90506119f18c8261230a565b600160a060020a03808d166000908152600c602090815260408083203390941683529290522054611a28908263ffffffff611dca16565b600160a060020a03808e166000908152600c6020908152604080832033851684529091529081902092909255600754839291169063f7888aec908f9030905160e060020a63ffffffff8516028152600160a060020a03928316600482015291166024820152604401602060405180830381600087803b1515611aa957600080fd5b5af11515611ab657600080fd5b505050604051805190501015611ad057611ad08c82612416565b600754600160a060020a0316630a19b14a8d8d8d8d8d8d8d8d8d8d8d60405160e060020a63ffffffff8e16028152600160a060020a039b8c166004820152602481019a909a52978a1660448a01526064890196909652608488019490945260a487019290925290951660c485015260ff90941660e484015261010483019390935261012482019290925261014481019190915261016401600060405180830381600087803b1515611b8057600080fd5b5af11515611b8d57600080fd5b508c9150611ba390508a8463ffffffff611c9016565b811515611bac57fe5b600160a060020a03808d166000908152600c6020908152604080832033909416835292905220549190049150611be8908263ffffffff611ddf16565b600160a060020a03808c166000908152600c6020908152604080832033851680855292529182902093909355908816907f7b6c917cd708d6f749ab415a0f1aa5ced6110d03141d28e5b75e216ecb4e79f7908f9086908f90879060019051600160a060020a039586168152602081019490945291909316604080840191909152606083019390935260ff16608082015260a001905180910390a3505050505050505050505050565b6000828202831580611cac5750828482811515611ca957fe5b04145b1515611cb757600080fd5b9392505050565b600160a060020a03811660009081526000805160206128b88339815191526020526040902054611cf4908363ffffffff611dca16565b600160a060020a0382811660009081526000805160206128b8833981519152602052604090209190915530163182901015611d3457611d34600083612627565b600160a060020a03811682156108fc0283604051600060405180830381858888f193505050501515611d6557600080fd5b600160a060020a03811660008181526000805160206128b88339815191526020526040808220547ff341246adaac6f497bc2a656f546ab9e182111d630394f0c57c710a59a2cb567918691905191825260208201526040908101905180910390a35050565b600082821115611dd957600080fd5b50900390565b600082820183811015611cb757600080fd5b600160a060020a0383161515611e0657600080fd5b600160a060020a038084166000908152600c6020908152604080832093851683529290522054611e3c908363ffffffff611dca16565b600160a060020a038085166000818152600c602090815260408083209487168352939052829020929092558391906370a082319030905160e060020a63ffffffff8416028152600160a060020a039091166004820152602401602060405180830381600087803b1515611eae57600080fd5b5af11515611ebb57600080fd5b505050604051805190501015611ed557611ed58383612627565b82600160a060020a031663a9059cbb828460405160e060020a63ffffffff8516028152600160a060020a0390921660048301526024820152604401602060405180830381600087803b1515611f2957600080fd5b5af11515611f3657600080fd5b505050604051805190501515611f4b57600080fd5b600160a060020a038381166000818152600c602090815260408083209486168084529490915290819020547ff341246adaac6f497bc2a656f546ab9e182111d630394f0c57c710a59a2cb567918691905191825260208201526040908101905180910390a3505050565b60008080600160a060020a038a1615611fe85788611fd9888763ffffffff611c9016565b811515611fe257fe5b04611fea565b845b925060065483111561202357670de0b6b3a764000061201460055487611c9090919063ffffffff16565b81151561201d57fe5b04612026565b60005b9150612038858363ffffffff611ddf16565b90506120448a8261230a565b600160a060020a03808b166000908152600c60209081526040808320339094168352929052205461207b908263ffffffff611dca16565b600160a060020a038b81166000908152600c60209081526040808320338516845290915280822093909355908816815220546120b79086611ddf565b600160a060020a03808c166000908152600c60209081526040808320938b1683529290529081209190915582111561214c57600160a060020a03808b166000908152600c6020908152604080832060025490941683529290522054612122908363ffffffff611ddf16565b600160a060020a03808c166000908152600c60209081526040808320600254909416835292905220555b61219d89612160898863ffffffff611c9016565b81151561216957fe5b600160a060020a03808c166000908152600c60209081526040808320938d168352929052205491900463ffffffff611dca16565b600160a060020a03808a166000908152600c60209081526040808320938b1683529290522055886121d4888763ffffffff611c9016565b8115156121dd57fe5b600160a060020a03808b166000908152600c6020908152604080832033909416835292905220549190049150612219908263ffffffff611ddf16565b600160a060020a03808a166000908152600c6020908152604080832033851684528252808320949094559189168152600e82528281208782529091522054612267908663ffffffff611ddf16565b600160a060020a038088166000818152600e602090815260408083208a845290915280822094909455339092169290917f7b6c917cd708d6f749ab415a0f1aa5ced6110d03141d28e5b75e216ecb4e79f7918e918a918e91889151600160a060020a039586168152602081019490945291909316604080840191909152606083019390935260ff16608082015260a001905180910390a350505050505050505050565b6000600160a060020a038316158015612348575033600160a060020a031660009081526000805160206128b883398151915260205260409020548290105b156123875733600160a060020a031660009081526000805160206128b8833981519152602052604090205461238490839063ffffffff611dca16565b90505b612390816127c6565b600160a060020a038316158015906123ce5750600160a060020a038084166000908152600c6020908152604080832033909416835292905220548290105b1561137457600160a060020a038084166000908152600c60209081526040808320339094168352929052205461137490849061241190859063ffffffff611dca16565b610eb4565b6000600160a060020a03831615156124955750600160a060020a0330163181811015612440578091505b600754600160a060020a031663d0e30db0836040518263ffffffff1660e060020a0281526004016000604051808303818588803b151561247f57600080fd5b5af1151561248c57600080fd5b505050506125df565b82600160a060020a03166370a082313060405160e060020a63ffffffff8416028152600160a060020a039091166004820152602401602060405180830381600087803b15156124e357600080fd5b5af115156124f057600080fd5b505050604051805191505081811015612507578091505b600754600160a060020a038085169163095ea7b391168460405160e060020a63ffffffff8516028152600160a060020a0390921660048301526024820152604401602060405180830381600087803b151561256157600080fd5b5af1151561256e57600080fd5b50505060405180515050600754600160a060020a031663338b5dea848460405160e060020a63ffffffff8516028152600160a060020a0390921660048301526024820152604401600060405180830381600087803b15156125ce57600080fd5b5af115156125db57600080fd5b5050505b600754600160a060020a0380851691167fb0850b8e0f9e8315dde3c9f9f31138283e6bbe16cd29e8552eb1dcdf9fac9e3b8460405190815260200160405180910390a3505050565b600754600090600160a060020a031663f7888aec843060405160e060020a63ffffffff8516028152600160a060020a03928316600482015291166024820152604401602060405180830381600087803b151561268257600080fd5b5af1151561268f57600080fd5b5050506040518051915050818110156126a6578091505b600160a060020a038316151561271357600754600160a060020a0316632e1a7d4d8360405160e060020a63ffffffff84160281526004810191909152602401600060405180830381600087803b15156126fe57600080fd5b5af1151561270b57600080fd5b50505061277a565b600754600160a060020a0316639e281a98848460405160e060020a63ffffffff8516028152600160a060020a0390921660048301526024820152604401600060405180830381600087803b151561276957600080fd5b5af1151561277657600080fd5b5050505b82600160a060020a031630600160a060020a03167fb0850b8e0f9e8315dde3c9f9f31138283e6bbe16cd29e8552eb1dcdf9fac9e3b8460405190815260200160405180910390a3505050565b60006127d8348363ffffffff611dca16565b9050811561287d5733600160a060020a031660009081526000805160206128b88339815191526020526040902054612816908363ffffffff611ddf16565b600160a060020a03331660008181526000805160206128b88339815191526020526040808220849055919290917fdcbc1c05240f31ff3ad067ef1ee35ce4997762752e3a095284754544f4c709d79186915191825260208201526040908101905180910390a35b60008111156111fe57600160a060020a03331681156108fc0282604051600060405180830381858888f1935050505015156111fe57600080fd0013649b2456f1b42fef0f0040b3aaeabcd21a76a0f3f5defd4f583839455116e8a165627a7a723058209c5ed813e303cd4688c7eab250a0fc6c64fa2da55047f9a4236617108fab7d1a0029

Swarm Source

bzzr://9c5ed813e303cd4688c7eab250a0fc6c64fa2da55047f9a4236617108fab7d1a
Block Transaction Difficulty Gas Used Reward
Block Uncle Number Difficulty Gas Used Reward
Loading
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.