ETH Price: $2,101.85 (-10.78%)

Contract

0xbADa5551B2f08d3959329B2fF8D0A7CC8BE26324
 

Overview

ETH Balance

0.00345 ETH

Eth Value

$7.25 (@ $2,101.85/ETH)

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Transfer Multipl...163846662023-01-11 16:08:35782 days ago1673453315IN
0xbADa5551...C8BE26324
0 ETH0.0071957338.29840267
Transfer Multipl...162787892022-12-27 21:32:11797 days ago1672176731IN
0xbADa5551...C8BE26324
0 ETH0.0061428615.32380724
Transfer Multipl...162787562022-12-27 21:25:35797 days ago1672176335IN
0xbADa5551...C8BE26324
0 ETH0.002058213.99227965
Take Multiple On...158777582022-11-01 21:07:35853 days ago1667336855IN
0xbADa5551...C8BE26324
0.008 ETH0.0031057420
Take Multiple On...158777232022-11-01 21:00:23853 days ago1667336423IN
0xbADa5551...C8BE26324
0.001 ETH0.0041821624
Take Multiple On...158776572022-11-01 20:46:59853 days ago1667335619IN
0xbADa5551...C8BE26324
0.009 ETH0.0017732113
Cancel Multiple ...158686592022-10-31 14:32:35854 days ago1667226755IN
0xbADa5551...C8BE26324
0 ETH0.0014385929.03437599
Cancel All Order...158479952022-10-28 17:16:47857 days ago1666977407IN
0xbADa5551...C8BE26324
0 ETH0.0018119239.54948525
Cancel Multiple ...158479872022-10-28 17:15:11857 days ago1666977311IN
0xbADa5551...C8BE26324
0 ETH0.0021946144.2926536
Take Multiple On...158303672022-10-26 6:10:35860 days ago1666764635IN
0xbADa5551...C8BE26324
0.01 ETH0.0016776212.29913151
Match Orders158302532022-10-26 5:47:47860 days ago1666763267IN
0xbADa5551...C8BE26324
0 ETH0.0026963111.81
Take Multiple On...157922852022-10-20 22:26:11865 days ago1666304771IN
0xbADa5551...C8BE26324
0.11 ETH0.0056272832.67804326
Take Multiple On...157846102022-10-19 20:43:23866 days ago1666212203IN
0xbADa5551...C8BE26324
0.01 ETH0.0067980638.3984749
Take Multiple On...157775472022-10-18 21:01:35867 days ago1666126895IN
0xbADa5551...C8BE26324
0.001 ETH0.0058225333.40734973
Take Multiple On...157771842022-10-18 19:48:59867 days ago1666122539IN
0xbADa5551...C8BE26324
0.001 ETH0.005204327.74076287
Take Multiple On...157771552022-10-18 19:43:11867 days ago1666122191IN
0xbADa5551...C8BE26324
0.01 ETH0.0010986829.57114085
Cancel Multiple ...157737752022-10-18 8:23:23868 days ago1666081403IN
0xbADa5551...C8BE26324
0 ETH0.0007225914.58377735
Take Multiple On...157693742022-10-17 17:40:11868 days ago1666028411IN
0xbADa5551...C8BE26324
25 ETH0.0055427129.98446012
Cancel Multiple ...157648322022-10-17 2:24:23869 days ago1665973463IN
0xbADa5551...C8BE26324
0 ETH0.0006422512.96221213
Take Multiple On...157564602022-10-15 22:20:23870 days ago1665872423IN
0xbADa5551...C8BE26324
0.01 ETH0.0026574717.31370081
Take Multiple On...157489362022-10-14 21:08:23871 days ago1665781703IN
0xbADa5551...C8BE26324
40 ETH0.0028332618.15394064
Take Multiple On...157484012022-10-14 19:20:59871 days ago1665775259IN
0xbADa5551...C8BE26324
0.01 ETH0.0036999821.47693592
Take Multiple On...157483802022-10-14 19:16:47871 days ago1665775007IN
0xbADa5551...C8BE26324
0.01 ETH0.0039039122.65027836
Take Multiple On...157481272022-10-14 18:26:11871 days ago1665771971IN
0xbADa5551...C8BE26324
0.0069 ETH0.0006232215.42148367
Take Multiple On...157481272022-10-14 18:26:11871 days ago1665771971IN
0xbADa5551...C8BE26324
0.0069 ETH0.0021033215.42148367
View all transactions

Latest 25 internal transactions (View All)

Advanced mode:
Parent Transaction Hash Block
From
To
164718162023-01-23 20:12:35770 days ago1674504755
0xbADa5551...C8BE26324
0 ETH
164718162023-01-23 20:12:35770 days ago1674504755
0xbADa5551...C8BE26324
0 ETH
164718112023-01-23 20:11:35770 days ago1674504695
0xbADa5551...C8BE26324
0 ETH
163846662023-01-11 16:08:35782 days ago1673453315
0xbADa5551...C8BE26324
0 ETH
163846662023-01-11 16:08:35782 days ago1673453315
0xbADa5551...C8BE26324
0 ETH
163846662023-01-11 16:08:35782 days ago1673453315
0xbADa5551...C8BE26324
0 ETH
163846662023-01-11 16:08:35782 days ago1673453315
0xbADa5551...C8BE26324
0 ETH
163846662023-01-11 16:08:35782 days ago1673453315
0xbADa5551...C8BE26324
0 ETH
163846662023-01-11 16:08:35782 days ago1673453315
0xbADa5551...C8BE26324
0 ETH
163846662023-01-11 16:08:35782 days ago1673453315
0xbADa5551...C8BE26324
0 ETH
162787892022-12-27 21:32:11797 days ago1672176731
0xbADa5551...C8BE26324
0 ETH
162787892022-12-27 21:32:11797 days ago1672176731
0xbADa5551...C8BE26324
0 ETH
162787892022-12-27 21:32:11797 days ago1672176731
0xbADa5551...C8BE26324
0 ETH
162787892022-12-27 21:32:11797 days ago1672176731
0xbADa5551...C8BE26324
0 ETH
162787892022-12-27 21:32:11797 days ago1672176731
0xbADa5551...C8BE26324
0 ETH
162787892022-12-27 21:32:11797 days ago1672176731
0xbADa5551...C8BE26324
0 ETH
162787892022-12-27 21:32:11797 days ago1672176731
0xbADa5551...C8BE26324
0 ETH
162787892022-12-27 21:32:11797 days ago1672176731
0xbADa5551...C8BE26324
0 ETH
162787892022-12-27 21:32:11797 days ago1672176731
0xbADa5551...C8BE26324
0 ETH
162787892022-12-27 21:32:11797 days ago1672176731
0xbADa5551...C8BE26324
0 ETH
162787892022-12-27 21:32:11797 days ago1672176731
0xbADa5551...C8BE26324
0 ETH
162787892022-12-27 21:32:11797 days ago1672176731
0xbADa5551...C8BE26324
0 ETH
162787892022-12-27 21:32:11797 days ago1672176731
0xbADa5551...C8BE26324
0 ETH
162787892022-12-27 21:32:11797 days ago1672176731
0xbADa5551...C8BE26324
0 ETH
162787892022-12-27 21:32:11797 days ago1672176731
0xbADa5551...C8BE26324
0 ETH
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
InfinityExchange

Compiler Version
v0.8.14+commit.80d49f37

Optimization Enabled:
Yes with 99999999 runs

Other Settings:
default evmVersion
File 1 of 13 : InfinityExchange.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.14;

// external imports
import {Ownable} from '@openzeppelin/contracts/access/Ownable.sol';
import {Pausable} from '@openzeppelin/contracts/security/Pausable.sol';
import {ReentrancyGuard} from '@openzeppelin/contracts/security/ReentrancyGuard.sol';
import {IERC165} from '@openzeppelin/contracts/interfaces/IERC165.sol';
import {IERC721} from '@openzeppelin/contracts/token/ERC721/IERC721.sol';
import {IERC20} from '@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol';

// internal imports
import {OrderTypes} from '../libs/OrderTypes.sol';
import {IComplication} from '../interfaces/IComplication.sol';

/**
@title InfinityExchange
@author nneverlander. Twitter @nneverlander
@notice The main NFT exchange contract that holds state and does asset transfers
@dev This contract can be extended via 'complications' - strategies that let the exchange execute various types of orders
      like dutch auctions, reverse dutch auctions, floor price orders, private sales, etc.

NFTNFTNFT...........................................NFTNFTNFT
NFTNFT                                                 NFTNFT
NFT                                                       NFT
.                                                           .
.                                                           .
.                                                           .
.                                                           .
.               NFTNFTNFT            NFTNFTNFT              .
.            NFTNFTNFTNFTNFT      NFTNFTNFTNFTNFT           .
.           NFTNFTNFTNFTNFTNFT   NFTNFTNFTNFTNFTNFT         .
.         NFTNFTNFTNFTNFTNFTNFTNFTNFTNFTNFTNFTNFTNFT        .
.         NFTNFTNFTNFTNFTNFTNFTNFTNFTNFTNFTNFTNFTNFT        .
.         NFTNFTNFTNFTNFTNFTNFTNFTNFTNFTNFTNFTNFTNFT        .
.          NFTNFTNFTNFTNFTNFTN   NFTNFTNFTNFTNFTNFT         .
.            NFTNFTNFTNFTNFT      NFTNFTNFTNFTNFT           .
.               NFTNFTNFT            NFTNFTNFT              .
.                                                           .
.                                                           .
.                                                           .
.                                                           .
NFT                                                       NFT
NFTNFT                                                 NFTNFT
NFTNFTNFT...........................................NFTNFTNFT 

*/
contract InfinityExchange is ReentrancyGuard, Ownable, Pausable {
  /// @dev WETH address of a chain; set at deploy time to the WETH address of the chain that this contract is deployed to
  address public immutable WETH;
  /// @dev This is the address that is used to send auto sniped orders for execution on chain
  address public matchExecutor;
  /// @dev Gas cost for auto sniped orders are paid by the buyers and refunded to this contract in the form of WETH
  uint32 public wethTransferGasUnits = 5e4;
  /// @notice max weth transfer gas units
  uint32 public constant MAX_WETH_TRANSFER_GAS_UNITS = 2e5;
  /// @notice Exchange fee in basis points (250 bps = 2.5%)
  uint32 public protocolFeeBps = 250;
  /// @notice Max exchange fee in basis points (2000 bps = 20%)
  uint32 public constant MAX_PROTOCOL_FEE_BPS = 2000;

  /// @dev Used in division
  uint256 constant PRECISION = 1e4; // precision for division; similar to bps

  /**
   @dev All orders should have a nonce >= to this value. 
        Any orders with nonce value less than this are non-executable. 
        Used for cancelling all outstanding orders.
  */
  mapping(address => uint256) public userMinOrderNonce;

  /// @dev This records already executed or cancelled orders to prevent replay attacks.
  mapping(address => mapping(uint256 => bool)) public isUserOrderNonceExecutedOrCancelled;

  ///@notice admin events
  event ETHWithdrawn(address indexed destination, uint256 amount);
  event ERC20Withdrawn(address indexed destination, address indexed currency, uint256 amount);
  event MatchExecutorUpdated(address indexed matchExecutor);
  event WethTransferGasUnitsUpdated(uint32 wethTransferGasUnits);
  event ProtocolFeeUpdated(uint32 protocolFee);

  /// @notice user events
  event MatchOrderFulfilled(
    bytes32 sellOrderHash,
    bytes32 buyOrderHash,
    address indexed seller,
    address indexed buyer,
    address complication, // address of the complication that defines the execution
    address indexed currency, // token address of the transacting currency
    uint256 amount, // amount spent on the order
    OrderTypes.OrderItem[] nfts // items in the order
  );
  event TakeOrderFulfilled(
    bytes32 orderHash,
    address indexed seller,
    address indexed buyer,
    address complication, // address of the complication that defines the execution
    address indexed currency, // token address of the transacting currency
    uint256 amount, // amount spent on the order
    OrderTypes.OrderItem[] nfts // items in the order
  );
  event CancelAllOrders(address indexed user, uint256 newMinNonce);
  event CancelMultipleOrders(address indexed user, uint256[] orderNonces);

  /**
    @param _weth address of a chain; set at deploy time to the WETH address of the chain that this contract is deployed to
    @param _matchExecutor address of the match executor used by match* functions to auto execute orders 
   */
  constructor(address _weth, address _matchExecutor) {
    WETH = _weth;
    matchExecutor = _matchExecutor;
  }

  // =================================================== USER FUNCTIONS =======================================================

  /**
   @notice Matches orders one to one where each order has 1 NFT. Example: Match 1 specific NFT buy with one specific NFT sell.
   @dev Can execute orders in batches for gas efficiency. Can only be called by the match executor. Buyers refund gas cost incurred by the
        match executor to this contract. Checks whether the given complication can execute the match.
   @param makerOrders1 Maker order 1
   @param makerOrders2 Maker order 2
  */
  function matchOneToOneOrders(
    OrderTypes.MakerOrder[] calldata makerOrders1,
    OrderTypes.MakerOrder[] calldata makerOrders2
  ) external nonReentrant whenNotPaused {
    uint256 startGas = gasleft();
    uint256 numMakerOrders = makerOrders1.length;
    require(msg.sender == matchExecutor, 'only match executor');
    require(numMakerOrders == makerOrders2.length, 'mismatched lengths');

    // the below 3 variables are copied locally once to save on gas
    // an SLOAD costs minimum 100 gas where an MLOAD only costs minimum 3 gas
    // since these values won't change during function execution, we can save on gas by copying them locally once
    // instead of SLOADing once for each loop iteration
    uint32 _protocolFeeBps = protocolFeeBps;
    uint32 _wethTransferGasUnits = wethTransferGasUnits;
    address weth = WETH;
    uint256 sharedCost = (startGas - gasleft()) / numMakerOrders;
    for (uint256 i; i < numMakerOrders; ) {
      uint256 startGasPerOrder = gasleft() + sharedCost;
      _matchOneToOneOrders(
        makerOrders1[i],
        makerOrders2[i],
        startGasPerOrder,
        _protocolFeeBps,
        _wethTransferGasUnits,
        weth
      );
      unchecked {
        ++i;
      }
    }
  }

  /**
   @notice Matches one order to many orders. Example: A buy order with 5 specific NFTs with 5 sell orders with those specific NFTs.
   @dev Can only be called by the match executor. Buyers refund gas cost incurred by the
        match executor to this contract. Checks whether the given complication can execute the match.
   @param makerOrder The one order to match
   @param manyMakerOrders Array of multiple orders to match the one order against
  */
  function matchOneToManyOrders(
    OrderTypes.MakerOrder calldata makerOrder,
    OrderTypes.MakerOrder[] calldata manyMakerOrders
  ) external nonReentrant whenNotPaused {
    uint256 startGas = gasleft();
    require(msg.sender == matchExecutor, 'only match executor');

    (bool canExec, bytes32 makerOrderHash) = IComplication(makerOrder.execParams[0]).canExecMatchOneToMany(
      makerOrder,
      manyMakerOrders
    );
    require(canExec, 'cannot execute');

    bool makerOrderExpired = isUserOrderNonceExecutedOrCancelled[makerOrder.signer][makerOrder.constraints[5]] ||
      makerOrder.constraints[5] < userMinOrderNonce[makerOrder.signer];
    require(!makerOrderExpired, 'maker order expired');

    uint256 ordersLength = manyMakerOrders.length;
    // the below 3 variables are copied locally once to save on gas
    // an SLOAD costs minimum 100 gas where an MLOAD only costs minimum 3 gas
    // since these values won't change during function execution, we can save on gas by copying them locally once
    // instead of SLOADing once for each loop iteration
    uint32 _protocolFeeBps = protocolFeeBps;
    uint32 _wethTransferGasUnits = wethTransferGasUnits;
    address weth = WETH;
    if (makerOrder.isSellOrder) {
      // 20000 for the SSTORE op that updates maker nonce status from zero to a non zero status
      uint256 sharedCost = (startGas + 20000 - gasleft()) / ordersLength;
      for (uint256 i; i < ordersLength; ) {
        uint256 startGasPerOrder = gasleft() + sharedCost;
        _matchOneMakerSellToManyMakerBuys(
          makerOrderHash,
          makerOrder,
          manyMakerOrders[i],
          startGasPerOrder,
          _protocolFeeBps,
          _wethTransferGasUnits,
          weth
        );
        unchecked {
          ++i;
        }
      }
      isUserOrderNonceExecutedOrCancelled[makerOrder.signer][makerOrder.constraints[5]] = true;
    } else {
      // check gas price constraint
      if (makerOrder.constraints[6] > 0) {
        require(tx.gasprice <= makerOrder.constraints[6], 'gas price too high');
      }
      uint256 protocolFee;
      for (uint256 i; i < ordersLength; ) {
        protocolFee =
          protocolFee +
          _matchOneMakerBuyToManyMakerSells(makerOrderHash, manyMakerOrders[i], makerOrder, _protocolFeeBps);
        unchecked {
          ++i;
        }
      }
      isUserOrderNonceExecutedOrCancelled[makerOrder.signer][makerOrder.constraints[5]] = true;
      uint256 gasCost = (startGas - gasleft() + _wethTransferGasUnits) * tx.gasprice;
      // if the execution currency is weth, we can send the protocol fee and gas cost in one transfer to save gas
      // else we need to send the protocol fee separately in the execution currency
      // since the buyer is common across many sell orders, this part can be executed outside the above for loop
      // in contrast to the case where if the one order is a sell order, we need to do this in each for loop
      if (makerOrder.execParams[1] == weth) {
        IERC20(weth).transferFrom(makerOrder.signer, address(this), protocolFee + gasCost);
      } else {
        IERC20(makerOrder.execParams[1]).transferFrom(makerOrder.signer, address(this), protocolFee);
        IERC20(weth).transferFrom(makerOrder.signer, address(this), gasCost);
      }
    }
  }

  /**
   @notice Matches orders one to one where no specific NFTs are specified. 
          Example: A collection wide buy order with any 2 NFTs with a sell order that has any 2 NFTs from that collection.
   @dev Can only be called by the match executor. Buyers refund gas cost incurred by the
        match executor to this contract. Checks whether the given complication can execute the match.
        The constructs param specifies the actual NFTs that will be executed since buys and sells need not specify actual NFTs - only 
        a higher level intent.
   @param sells User signed sell orders
   @param buys User signed buy orders
   @param constructs Intersection of the NFTs in the sells and buys. Constructed by an off chain matching engine.
  */
  function matchOrders(
    OrderTypes.MakerOrder[] calldata sells,
    OrderTypes.MakerOrder[] calldata buys,
    OrderTypes.OrderItem[][] calldata constructs
  ) external nonReentrant whenNotPaused {
    uint256 startGas = gasleft();
    uint256 numSells = sells.length;
    require(msg.sender == matchExecutor, 'only match executor');
    require(numSells == buys.length, 'mismatched lengths');
    require(numSells == constructs.length, 'mismatched lengths');
    // the below 3 variables are copied locally once to save on gas
    // an SLOAD costs minimum 100 gas where an MLOAD only costs minimum 3 gas
    // since these values won't change during function execution, we can save on gas by copying them locally once
    // instead of SLOADing once for each loop iteration
    uint32 _protocolFeeBps = protocolFeeBps;
    uint32 _wethTransferGasUnits = wethTransferGasUnits;
    address weth = WETH;
    uint256 sharedCost = (startGas - gasleft()) / numSells;
    for (uint256 i; i < numSells; ) {
      uint256 startGasPerOrder = gasleft() + sharedCost;
      _matchOrders(sells[i], buys[i], constructs[i], startGasPerOrder, _protocolFeeBps, _wethTransferGasUnits, weth);
      unchecked {
        ++i;
      }
    }
  }

  /**
   @notice Batch buys or sells orders with specific `1` NFTs. Transaction initiated by an end user.
   @param makerOrders The orders to fulfill
  */
  function takeMultipleOneOrders(OrderTypes.MakerOrder[] calldata makerOrders)
    external
    payable
    nonReentrant
    whenNotPaused
  {
    uint256 totalPrice;
    address currency = makerOrders[0].execParams[1];
    if (currency != address(0)) {
      require(msg.value == 0, 'msg has value');
    }
    bool isMakerSeller = makerOrders[0].isSellOrder;
    if (!isMakerSeller) {
      require(currency != address(0), 'offers only in ERC20');
    }
    for (uint256 i; i < makerOrders.length; ) {
      require(currency == makerOrders[i].execParams[1], 'cannot mix currencies');
      require(isMakerSeller == makerOrders[i].isSellOrder, 'cannot mix order sides');
      require(msg.sender != makerOrders[i].signer, 'no dogfooding');

      bool orderExpired = isUserOrderNonceExecutedOrCancelled[makerOrders[i].signer][makerOrders[i].constraints[5]] ||
        makerOrders[i].constraints[5] < userMinOrderNonce[makerOrders[i].signer];
      require(!orderExpired, 'order expired');

      (bool canExec, bytes32 makerOrderHash) = IComplication(makerOrders[i].execParams[0]).canExecTakeOneOrder(
        makerOrders[i]
      );
      require(canExec, 'cannot execute');

      uint256 execPrice = _getCurrentPrice(makerOrders[i]);
      totalPrice = totalPrice + execPrice;
      _execTakeOneOrder(makerOrderHash, makerOrders[i], isMakerSeller, execPrice);
      unchecked {
        ++i;
      }
    }
    // check to ensure that for ETH orders, enough ETH is sent
    // for non ETH orders, IERC20 transferFrom will throw error if insufficient amount is sent
    if (currency == address(0)) {
      require(msg.value >= totalPrice, 'insufficient total price');
      if (msg.value > totalPrice) {
        (bool sent, ) = msg.sender.call{value: msg.value - totalPrice}('');
        require(sent, 'failed returning excess ETH');
      }
    }
  }

  /**
   @notice Batch buys or sells orders where maker orders can have unspecified NFTs. Transaction initiated by an end user.
   @param makerOrders The orders to fulfill
   @param takerNfts The specific NFTs that the taker is willing to take that intersect with the higher level intent of the maker
   Example: If a makerOrder is 'buy any one of these 2 specific NFTs', then the takerNfts would be 'this one specific NFT'.
  */
  function takeOrders(OrderTypes.MakerOrder[] calldata makerOrders, OrderTypes.OrderItem[][] calldata takerNfts)
    external
    payable
    nonReentrant
    whenNotPaused
  {
    require(makerOrders.length == takerNfts.length, 'mismatched lengths');
    uint256 totalPrice;
    address currency = makerOrders[0].execParams[1];
    if (currency != address(0)) {
      require(msg.value == 0, 'msg has value');
    }
    bool isMakerSeller = makerOrders[0].isSellOrder;
    if (!isMakerSeller) {
      require(currency != address(0), 'offers only in ERC20');
    }
    for (uint256 i; i < makerOrders.length; ) {
      require(currency == makerOrders[i].execParams[1], 'cannot mix currencies');
      require(isMakerSeller == makerOrders[i].isSellOrder, 'cannot mix order sides');
      require(msg.sender != makerOrders[i].signer, 'no dogfooding');
      uint256 execPrice = _getCurrentPrice(makerOrders[i]);
      totalPrice = totalPrice + execPrice;
      _takeOrders(makerOrders[i], takerNfts[i], execPrice);
      unchecked {
        ++i;
      }
    }
    // check to ensure that for ETH orders, enough ETH is sent
    // for non ETH orders, IERC20 transferFrom will throw error if insufficient amount is sent
    if (currency == address(0)) {
      require(msg.value >= totalPrice, 'insufficient total price');
      if (msg.value > totalPrice) {
        (bool sent, ) = msg.sender.call{value: msg.value - totalPrice}('');
        require(sent, 'failed returning excess ETH');
      }
    }
  }

  /**
   @notice Helper function (non exchange related) to send multiple NFTs in one go. Only ERC721
   @param to the receiver address
   @param items the specific NFTs to transfer
  */
  function transferMultipleNFTs(address to, OrderTypes.OrderItem[] calldata items) external nonReentrant whenNotPaused {
    require(to != address(0), 'invalid address');
    _transferMultipleNFTs(msg.sender, to, items);
  }

  /**
   * @notice Cancel all pending orders
   * @param minNonce minimum user nonce
   */
  function cancelAllOrders(uint256 minNonce) external {
    require(minNonce > userMinOrderNonce[msg.sender], 'nonce too low');
    require(minNonce < userMinOrderNonce[msg.sender] + 1e5, 'too many');
    userMinOrderNonce[msg.sender] = minNonce;
    emit CancelAllOrders(msg.sender, minNonce);
  }

  /**
   * @notice Cancel multiple orders
   * @param orderNonces array of order nonces
   */
  function cancelMultipleOrders(uint256[] calldata orderNonces) external {
    require(orderNonces.length != 0, 'cannot be empty');
    for (uint256 i; i < orderNonces.length; ) {
      require(orderNonces[i] >= userMinOrderNonce[msg.sender], 'nonce too low');
      require(!isUserOrderNonceExecutedOrCancelled[msg.sender][orderNonces[i]], 'nonce already exec or cancelled');
      isUserOrderNonceExecutedOrCancelled[msg.sender][orderNonces[i]] = true;
      unchecked {
        ++i;
      }
    }
    emit CancelMultipleOrders(msg.sender, orderNonces);
  }

  // ====================================================== VIEW FUNCTIONS ======================================================

  /**
   * @notice Check whether user order nonce is executed or cancelled
   * @param user address of user
   * @param nonce nonce of the order
   * @return whether nonce is valid
   */
  function isNonceValid(address user, uint256 nonce) external view returns (bool) {
    return !isUserOrderNonceExecutedOrCancelled[user][nonce] && nonce >= userMinOrderNonce[user];
  }

  // ====================================================== INTERNAL FUNCTIONS ================================================

  /**
   * @notice Internal helper function to match orders one to one
   * @param makerOrder1 first order
   * @param makerOrder2 second maker order
   * @param startGasPerOrder start gas when this order started execution
   * @param _protocolFeeBps exchange fee
   * @param _wethTransferGasUnits gas units that a WETH transfer will use
   * @param weth WETH address
   */
  function _matchOneToOneOrders(
    OrderTypes.MakerOrder calldata makerOrder1,
    OrderTypes.MakerOrder calldata makerOrder2,
    uint256 startGasPerOrder,
    uint32 _protocolFeeBps,
    uint32 _wethTransferGasUnits,
    address weth
  ) internal {
    OrderTypes.MakerOrder calldata sell;
    OrderTypes.MakerOrder calldata buy;
    if (makerOrder1.isSellOrder) {
      sell = makerOrder1;
      buy = makerOrder2;
    } else {
      sell = makerOrder2;
      buy = makerOrder1;
    }

    (bool canExec, bytes32 sellOrderHash, bytes32 buyOrderHash, uint256 execPrice) = IComplication(
      makerOrder1.execParams[0]
    ).canExecMatchOneToOne(sell, buy);

    require(canExec, 'cannot execute');

    bool sellOrderExpired = isUserOrderNonceExecutedOrCancelled[sell.signer][sell.constraints[5]] ||
      sell.constraints[5] < userMinOrderNonce[sell.signer];
    require(!sellOrderExpired, 'sell order expired');

    bool buyOrderExpired = isUserOrderNonceExecutedOrCancelled[buy.signer][buy.constraints[5]] ||
      buy.constraints[5] < userMinOrderNonce[buy.signer];
    require(!buyOrderExpired, 'buy order expired');

    _execMatchOneToOneOrders(
      sellOrderHash,
      buyOrderHash,
      sell,
      buy,
      startGasPerOrder,
      execPrice,
      _protocolFeeBps,
      _wethTransferGasUnits,
      weth
    );
  }

  /**
   * @notice Internal helper function to match one maker sell order to many maker buys
   * @param sellOrderHash sell order hash
   * @param sell the sell order
   * @param buy the buy order
   * @param startGasPerOrder start gas when this order started execution
   * @param _protocolFeeBps exchange fee
   * @param _wethTransferGasUnits gas units that a WETH transfer will use
   * @param weth WETH address
   */
  function _matchOneMakerSellToManyMakerBuys(
    bytes32 sellOrderHash,
    OrderTypes.MakerOrder calldata sell,
    OrderTypes.MakerOrder calldata buy,
    uint256 startGasPerOrder,
    uint32 _protocolFeeBps,
    uint32 _wethTransferGasUnits,
    address weth
  ) internal {
    (bool verified, bytes32 buyOrderHash) = IComplication(sell.execParams[0]).verifyMatchOneToManyOrders(
      false,
      sell,
      buy
    );
    require(verified, 'order not verified');

    bool buyOrderExpired = isUserOrderNonceExecutedOrCancelled[buy.signer][buy.constraints[5]] ||
      buy.constraints[5] < userMinOrderNonce[buy.signer];
    require(!buyOrderExpired, 'buy order expired');

    _execMatchOneMakerSellToManyMakerBuys(
      sellOrderHash,
      buyOrderHash,
      sell,
      buy,
      startGasPerOrder,
      _getCurrentPrice(buy),
      _protocolFeeBps,
      _wethTransferGasUnits,
      weth
    );
  }

  /**
   * @notice Internal helper function to match one maker buy order to many maker sells
   * @param buyOrderHash buy order hash
   * @param sell the sell order
   * @param buy the buy order
   * @param _protocolFeeBps exchange fee
   */
  function _matchOneMakerBuyToManyMakerSells(
    bytes32 buyOrderHash,
    OrderTypes.MakerOrder calldata sell,
    OrderTypes.MakerOrder calldata buy,
    uint32 _protocolFeeBps
  ) internal returns (uint256) {
    (bool verified, bytes32 sellOrderHash) = IComplication(sell.execParams[0]).verifyMatchOneToManyOrders(
      true,
      sell,
      buy
    );
    require(verified, 'order not verified');

    bool sellOrderExpired = isUserOrderNonceExecutedOrCancelled[sell.signer][sell.constraints[5]] ||
      sell.constraints[5] < userMinOrderNonce[sell.signer];
    require(!sellOrderExpired, 'sell order expired');

    return
      _execMatchOneMakerBuyToManyMakerSells(
        sellOrderHash,
        buyOrderHash,
        sell,
        buy,
        _getCurrentPrice(sell),
        _protocolFeeBps
      );
  }

  /**
   * @notice Internal helper function to match orders specified via a higher level intent
   * @param sell the sell order
   * @param buy the buy order
   * @param constructedNfts the nfts constructed by an off chain matching that are guaranteed to intersect
            with the user specified signed intents (orders)
   * @param startGasPerOrder start gas when this order started execution
   * @param _protocolFeeBps exchange fee
   * @param _wethTransferGasUnits gas units that a WETH transfer will use
   * @param weth WETH address
   */
  function _matchOrders(
    OrderTypes.MakerOrder calldata sell,
    OrderTypes.MakerOrder calldata buy,
    OrderTypes.OrderItem[] calldata constructedNfts,
    uint256 startGasPerOrder,
    uint32 _protocolFeeBps,
    uint32 _wethTransferGasUnits,
    address weth
  ) internal {
    (bool executionValid, bytes32 sellOrderHash, bytes32 buyOrderHash, uint256 execPrice) = IComplication(
      sell.execParams[0]
    ).canExecMatchOrder(sell, buy, constructedNfts);
    require(executionValid, 'cannot execute');

    bool sellOrderExpired = isUserOrderNonceExecutedOrCancelled[sell.signer][sell.constraints[5]] ||
      sell.constraints[5] < userMinOrderNonce[sell.signer];
    require(!sellOrderExpired, 'sell order expired');

    bool buyOrderExpired = isUserOrderNonceExecutedOrCancelled[buy.signer][buy.constraints[5]] ||
      buy.constraints[5] < userMinOrderNonce[buy.signer];
    require(!buyOrderExpired, 'buy order expired');

    _execMatchOrders(
      sellOrderHash,
      buyOrderHash,
      sell,
      buy,
      constructedNfts,
      startGasPerOrder,
      execPrice,
      _protocolFeeBps,
      _wethTransferGasUnits,
      weth
    );
  }

  /**
   * @notice Internal helper function that executes contract state changes and does asset transfers for match one to one orders
   * @dev Updates order nonce states, does asset transfers and emits events. Also refunds gas expenditure to the contract
   * @param sellOrderHash sell order hash
   * @param buyOrderHash buy order hash
   * @param sell the sell order
   * @param buy the buy order
   * @param startGasPerOrder start gas when this order started execution
   * @param execPrice execution price
   * @param _protocolFeeBps exchange fee
   * @param _wethTransferGasUnits gas units that a WETH transfer will use
   * @param weth WETH address
   */
  function _execMatchOneToOneOrders(
    bytes32 sellOrderHash,
    bytes32 buyOrderHash,
    OrderTypes.MakerOrder calldata sell,
    OrderTypes.MakerOrder calldata buy,
    uint256 startGasPerOrder,
    uint256 execPrice,
    uint32 _protocolFeeBps,
    uint32 _wethTransferGasUnits,
    address weth
  ) internal {
    if (buy.constraints[6] > 0) {
      require(tx.gasprice <= buy.constraints[6], 'gas price too high');
    }
    isUserOrderNonceExecutedOrCancelled[sell.signer][sell.constraints[5]] = true;
    isUserOrderNonceExecutedOrCancelled[buy.signer][buy.constraints[5]] = true;
    uint256 protocolFee = (_protocolFeeBps * execPrice) / PRECISION;
    uint256 remainingAmount = execPrice - protocolFee;
    _transferMultipleNFTs(sell.signer, buy.signer, sell.nfts);
    // transfer final amount (post-fees) to seller
    IERC20(buy.execParams[1]).transferFrom(buy.signer, sell.signer, remainingAmount);
    _emitMatchEvent(
      sellOrderHash,
      buyOrderHash,
      sell.signer,
      buy.signer,
      buy.execParams[0],
      buy.execParams[1],
      execPrice,
      buy.nfts
    );
    uint256 gasCost = (startGasPerOrder - gasleft() + _wethTransferGasUnits) * tx.gasprice;
    // if the execution currency is weth, we can send the protocol fee and gas cost in one transfer to save gas
    // else we need to send the protocol fee separately in the execution currency
    if (buy.execParams[1] == weth) {
      IERC20(weth).transferFrom(buy.signer, address(this), protocolFee + gasCost);
    } else {
      IERC20(buy.execParams[1]).transferFrom(buy.signer, address(this), protocolFee);
      IERC20(weth).transferFrom(buy.signer, address(this), gasCost);
    }
  }

  /**
   * @notice Internal helper function that executes contract state changes and does asset transfers for match one sell to many buy orders
   * @dev Updates order nonce states, does asset transfers and emits events. Also refunds gas expenditure to the contract
   * @param sellOrderHash sell order hash
   * @param buyOrderHash buy order hash
   * @param sell the sell order
   * @param buy the buy order
   * @param startGasPerOrder start gas when this order started execution
   * @param execPrice execution price
   * @param _protocolFeeBps exchange fee
   * @param _wethTransferGasUnits gas units that a WETH transfer will use
   * @param weth WETH address
   */
  function _execMatchOneMakerSellToManyMakerBuys(
    bytes32 sellOrderHash,
    bytes32 buyOrderHash,
    OrderTypes.MakerOrder calldata sell,
    OrderTypes.MakerOrder calldata buy,
    uint256 startGasPerOrder,
    uint256 execPrice,
    uint32 _protocolFeeBps,
    uint32 _wethTransferGasUnits,
    address weth
  ) internal {
    if (buy.constraints[6] > 0) {
      require(tx.gasprice <= buy.constraints[6], 'gas price too high');
    }
    isUserOrderNonceExecutedOrCancelled[buy.signer][buy.constraints[5]] = true;
    uint256 protocolFee = (_protocolFeeBps * execPrice) / PRECISION;
    uint256 remainingAmount = execPrice - protocolFee;
    _execMatchOneToManyOrders(sell.signer, buy.signer, buy.nfts, buy.execParams[1], remainingAmount);
    _emitMatchEvent(
      sellOrderHash,
      buyOrderHash,
      sell.signer,
      buy.signer,
      buy.execParams[0],
      buy.execParams[1],
      execPrice,
      buy.nfts
    );
    uint256 gasCost = (startGasPerOrder - gasleft() + _wethTransferGasUnits) * tx.gasprice;
    // if the execution currency is weth, we can send the protocol fee and gas cost in one transfer to save gas
    // else we need to send the protocol fee separately in the execution currency
    if (buy.execParams[1] == weth) {
      IERC20(weth).transferFrom(buy.signer, address(this), protocolFee + gasCost);
    } else {
      IERC20(buy.execParams[1]).transferFrom(buy.signer, address(this), protocolFee);
      IERC20(weth).transferFrom(buy.signer, address(this), gasCost);
    }
  }

  /**
   * @notice Internal helper function that executes contract state changes and does asset transfers for match one buy to many sell orders
   * @dev Updates order nonce states, does asset transfers and emits events. Gas expenditure refund is done in the caller
          since it does not need to be done in a loop
   * @param sellOrderHash sell order hash
   * @param buyOrderHash buy order hash
   * @param sell the sell order
   * @param buy the buy order
   * @param execPrice execution price
   * @param _protocolFeeBps exchange fee
   * @return the protocolFee so that the buyer can pay the protocol fee and gas cost in one go
   */
  function _execMatchOneMakerBuyToManyMakerSells(
    bytes32 sellOrderHash,
    bytes32 buyOrderHash,
    OrderTypes.MakerOrder calldata sell,
    OrderTypes.MakerOrder calldata buy,
    uint256 execPrice,
    uint32 _protocolFeeBps
  ) internal returns (uint256) {
    isUserOrderNonceExecutedOrCancelled[sell.signer][sell.constraints[5]] = true;
    uint256 protocolFee = (_protocolFeeBps * execPrice) / PRECISION;
    uint256 remainingAmount = execPrice - protocolFee;
    _execMatchOneToManyOrders(sell.signer, buy.signer, sell.nfts, buy.execParams[1], remainingAmount);
    _emitMatchEvent(
      sellOrderHash,
      buyOrderHash,
      sell.signer,
      buy.signer,
      buy.execParams[0],
      buy.execParams[1],
      execPrice,
      sell.nfts
    );
    return protocolFee;
  }

  /// @dev This helper purely exists to help reduce contract size a bit and avoid any stack too deep errors
  function _execMatchOneToManyOrders(
    address seller,
    address buyer,
    OrderTypes.OrderItem[] calldata constructedNfts,
    address currency,
    uint256 amount
  ) internal {
    _transferMultipleNFTs(seller, buyer, constructedNfts);
    // transfer final amount (post-fees) to seller
    IERC20(currency).transferFrom(buyer, seller, amount);
  }

  /**
   * @notice Internal helper function that executes contract state changes and does asset transfers for match orders
   * @dev Updates order nonce states, does asset transfers, emits events and does gas refunds
   * @param sellOrderHash sell order hash
   * @param buyOrderHash buy order hash
   * @param sell the sell order
   * @param buy the buy order
   * @param constructedNfts the constructed nfts
   * @param startGasPerOrder gas when this order started execution
   * @param execPrice execution price
   * @param _protocolFeeBps exchange fee
   * @param _wethTransferGasUnits gas units that a WETH transfer will use
   * @param weth WETH address
   */
  function _execMatchOrders(
    bytes32 sellOrderHash,
    bytes32 buyOrderHash,
    OrderTypes.MakerOrder calldata sell,
    OrderTypes.MakerOrder calldata buy,
    OrderTypes.OrderItem[] calldata constructedNfts,
    uint256 startGasPerOrder,
    uint256 execPrice,
    uint32 _protocolFeeBps,
    uint32 _wethTransferGasUnits,
    address weth
  ) internal {
    // checks if maker specified a max gas price
    if (buy.constraints[6] > 0) {
      require(tx.gasprice <= buy.constraints[6], 'gas price too high');
    }
    uint256 protocolFee = (_protocolFeeBps * execPrice) / PRECISION;
    uint256 remainingAmount = execPrice - protocolFee;
    _execMatchOrder(
      sell.signer,
      buy.signer,
      sell.constraints[5],
      buy.constraints[5],
      constructedNfts,
      buy.execParams[1],
      remainingAmount
    );
    _emitMatchEvent(
      sellOrderHash,
      buyOrderHash,
      sell.signer,
      buy.signer,
      buy.execParams[0],
      buy.execParams[1],
      execPrice,
      constructedNfts
    );
    uint256 gasCost = (startGasPerOrder - gasleft() + _wethTransferGasUnits) * tx.gasprice;
    // if the execution currency is weth, we can send the protocol fee and gas cost in one transfer to save gas
    // else we need to send the protocol fee separately in the execution currency
    if (buy.execParams[1] == weth) {
      IERC20(weth).transferFrom(buy.signer, address(this), protocolFee + gasCost);
    } else {
      IERC20(buy.execParams[1]).transferFrom(buy.signer, address(this), protocolFee);
      IERC20(weth).transferFrom(buy.signer, address(this), gasCost);
    }
  }

  /// @dev This helper purely exists to help reduce contract size a bit and avoid any stack too deep errors
  function _execMatchOrder(
    address seller,
    address buyer,
    uint256 sellNonce,
    uint256 buyNonce,
    OrderTypes.OrderItem[] calldata constructedNfts,
    address currency,
    uint256 amount
  ) internal {
    // Update order execution status to true (prevents replay)
    isUserOrderNonceExecutedOrCancelled[seller][sellNonce] = true;
    isUserOrderNonceExecutedOrCancelled[buyer][buyNonce] = true;
    _transferMultipleNFTs(seller, buyer, constructedNfts);
    // transfer final amount (post-fees) to seller
    IERC20(currency).transferFrom(buyer, seller, amount);
  }

  /// @notice Internal helper function to emit match events
  function _emitMatchEvent(
    bytes32 sellOrderHash,
    bytes32 buyOrderHash,
    address seller,
    address buyer,
    address complication,
    address currency,
    uint256 amount,
    OrderTypes.OrderItem[] calldata nfts
  ) internal {
    emit MatchOrderFulfilled(sellOrderHash, buyOrderHash, seller, buyer, complication, currency, amount, nfts);
  }

  /**
   * @notice Internal helper function that executes contract state changes and does asset transfers 
              for simple take orders
   * @dev Updates order nonce state, does asset transfers and emits events
   * @param makerOrderHash maker order hash
   * @param makerOrder the maker order
   * @param isMakerSeller is the maker order a sell order
   * @param execPrice execution price
   */
  function _execTakeOneOrder(
    bytes32 makerOrderHash,
    OrderTypes.MakerOrder calldata makerOrder,
    bool isMakerSeller,
    uint256 execPrice
  ) internal {
    isUserOrderNonceExecutedOrCancelled[makerOrder.signer][makerOrder.constraints[5]] = true;
    if (isMakerSeller) {
      _transferNFTsAndFees(makerOrder.signer, msg.sender, makerOrder.nfts, makerOrder.execParams[1], execPrice);
      _emitTakerEvent(makerOrderHash, makerOrder.signer, msg.sender, makerOrder, execPrice, makerOrder.nfts);
    } else {
      _transferNFTsAndFees(msg.sender, makerOrder.signer, makerOrder.nfts, makerOrder.execParams[1], execPrice);
      _emitTakerEvent(makerOrderHash, msg.sender, makerOrder.signer, makerOrder, execPrice, makerOrder.nfts);
    }
  }

  /**
   * @notice Internal helper function to take orders
   * @dev verifies whether order can be executed
   * @param makerOrder the maker order
   * @param takerItems nfts to be transferred
   * @param execPrice execution price
   */
  function _takeOrders(
    OrderTypes.MakerOrder calldata makerOrder,
    OrderTypes.OrderItem[] calldata takerItems,
    uint256 execPrice
  ) internal {
    bool orderExpired = isUserOrderNonceExecutedOrCancelled[makerOrder.signer][makerOrder.constraints[5]] ||
      makerOrder.constraints[5] < userMinOrderNonce[makerOrder.signer];
    require(!orderExpired, 'order expired');

    (bool executionValid, bytes32 makerOrderHash) = IComplication(makerOrder.execParams[0]).canExecTakeOrder(
      makerOrder,
      takerItems
    );
    require(executionValid, 'cannot execute');
    _execTakeOrders(makerOrderHash, makerOrder, takerItems, makerOrder.isSellOrder, execPrice);
  }

  /**
   * @notice Internal helper function that executes contract state changes and does asset transfers 
              for take orders specifying a higher level intent
   * @dev Updates order nonce state, does asset transfers and emits events
   * @param makerOrderHash maker order hash
   * @param makerOrder the maker order
   * @param takerItems nfts to be transferred
   * @param isMakerSeller is the maker order a sell order
   * @param execPrice execution price
   */
  function _execTakeOrders(
    bytes32 makerOrderHash,
    OrderTypes.MakerOrder calldata makerOrder,
    OrderTypes.OrderItem[] calldata takerItems,
    bool isMakerSeller,
    uint256 execPrice
  ) internal {
    isUserOrderNonceExecutedOrCancelled[makerOrder.signer][makerOrder.constraints[5]] = true;
    if (isMakerSeller) {
      _transferNFTsAndFees(makerOrder.signer, msg.sender, takerItems, makerOrder.execParams[1], execPrice);
      _emitTakerEvent(makerOrderHash, makerOrder.signer, msg.sender, makerOrder, execPrice, takerItems);
    } else {
      _transferNFTsAndFees(msg.sender, makerOrder.signer, takerItems, makerOrder.execParams[1], execPrice);
      _emitTakerEvent(makerOrderHash, msg.sender, makerOrder.signer, makerOrder, execPrice, takerItems);
    }
  }

  /// @notice Internal helper function to emit events for take orders
  function _emitTakerEvent(
    bytes32 orderHash,
    address seller,
    address buyer,
    OrderTypes.MakerOrder calldata order,
    uint256 amount,
    OrderTypes.OrderItem[] calldata nfts
  ) internal {
    emit TakeOrderFulfilled(orderHash, seller, buyer, order.execParams[0], order.execParams[1], amount, nfts);
  }

  /**
   * @notice Transfers NFTs and fees
   * @param seller the seller
   * @param buyer the buyer
   * @param nfts nfts to transfer
   * @param currency currency of the transfer
   * @param amount amount to transfer
   */
  function _transferNFTsAndFees(
    address seller,
    address buyer,
    OrderTypes.OrderItem[] calldata nfts,
    address currency,
    uint256 amount
  ) internal {
    // transfer NFTs
    _transferMultipleNFTs(seller, buyer, nfts);
    // transfer fees
    _transferFees(seller, buyer, currency, amount);
  }

  /**
   * @notice Transfers multiple NFTs in a loop
   * @param from the from address
   * @param to the to address
   * @param nfts nfts to transfer
   */
  function _transferMultipleNFTs(
    address from,
    address to,
    OrderTypes.OrderItem[] calldata nfts
  ) internal {
    for (uint256 i; i < nfts.length; ) {
      _transferNFTs(from, to, nfts[i]);
      unchecked {
        ++i;
      }
    }
  }

  /**
   * @notice Transfer NFTs
   * @dev Only supports ERC721, no ERC1155 or NFTs that conform to both ERC721 and ERC1155
   * @param from address of the sender
   * @param to address of the recipient
   * @param item item to transfer
   */
  function _transferNFTs(
    address from,
    address to,
    OrderTypes.OrderItem calldata item
  ) internal {
    require(
      IERC165(item.collection).supportsInterface(0x80ac58cd) && !IERC165(item.collection).supportsInterface(0xd9b67a26),
      'only erc721'
    );
    _transferERC721s(from, to, item);
  }

  /**
   * @notice Transfer ERC721s
   * @dev requires approvals to be set
   * @param from address of the sender
   * @param to address of the recipient
   * @param item item to transfer
   */
  function _transferERC721s(
    address from,
    address to,
    OrderTypes.OrderItem calldata item
  ) internal {
    for (uint256 i; i < item.tokens.length; ) {
      IERC721(item.collection).transferFrom(from, to, item.tokens[i].tokenId);
      unchecked {
        ++i;
      }
    }
  }

  /**
   * @notice Transfer fees. Fees are always transferred from buyer to the seller and the exchange although seller is 
            the one that actually 'pays' the fees
   * @dev if the currency ETH, no additional transfer is needed to pay exchange fees since reqd functions are 'payable'
   * @param seller the seller
   * @param buyer the buyer
   * @param currency currency of the transfer
   * @param amount amount to transfer
   */
  function _transferFees(
    address seller,
    address buyer,
    address currency,
    uint256 amount
  ) internal {
    // protocol fee
    uint256 protocolFee = (protocolFeeBps * amount) / PRECISION;
    uint256 remainingAmount = amount - protocolFee;
    // ETH
    if (currency == address(0)) {
      // transfer amount to seller
      (bool sent, ) = seller.call{value: remainingAmount}('');
      require(sent, 'failed to send ether to seller');
    } else {
      // transfer final amount (post-fees) to seller
      IERC20(currency).transferFrom(buyer, seller, remainingAmount);
      // send fee to protocol
      IERC20(currency).transferFrom(buyer, address(this), protocolFee);
    }
  }

  // =================================================== UTILS ==================================================================

  /// @dev Gets current order price for orders that vary in price over time (dutch and reverse dutch auctions)
  function _getCurrentPrice(OrderTypes.MakerOrder calldata order) internal view returns (uint256) {
    (uint256 startPrice, uint256 endPrice) = (order.constraints[1], order.constraints[2]);
    if (startPrice == endPrice) {
      return startPrice;
    }

    uint256 duration = order.constraints[4] - order.constraints[3];
    if (duration == 0) {
      return startPrice;
    }

    uint256 elapsedTime = block.timestamp - order.constraints[3];
    unchecked {
      uint256 portionBps = elapsedTime > duration ? PRECISION : ((elapsedTime * PRECISION) / duration);
      if (startPrice > endPrice) {
        uint256 priceDiff = ((startPrice - endPrice) * portionBps) / PRECISION;
        return startPrice - priceDiff;
      } else {
        uint256 priceDiff = ((endPrice - startPrice) * portionBps) / PRECISION;
        return startPrice + priceDiff;
      }
    }
  }

  // ====================================================== ADMIN FUNCTIONS ======================================================

  /// @dev Used for withdrawing exchange fees paid to the contract in ETH
  function withdrawETH(address destination) external onlyOwner {
    uint256 amount = address(this).balance;
    (bool sent, ) = destination.call{value: amount}('');
    require(sent, 'failed');
    emit ETHWithdrawn(destination, amount);
  }

  /// @dev Used for withdrawing exchange fees paid to the contract in ERC20 tokens
  function withdrawTokens(
    address destination,
    address currency,
    uint256 amount
  ) external onlyOwner {
    IERC20(currency).transfer(destination, amount);
    emit ERC20Withdrawn(destination, currency, amount);
  }

  /// @dev Updates auto snipe executor
  function updateMatchExecutor(address _matchExecutor) external onlyOwner {
    require(_matchExecutor != address(0), 'match executor cannot be 0');
    matchExecutor = _matchExecutor;
    emit MatchExecutorUpdated(_matchExecutor);
  }

  /// @dev Updates the gas units required for WETH transfers
  function updateWethTransferGas(uint32 _newWethTransferGasUnits) external onlyOwner {
    require(_newWethTransferGasUnits <= MAX_WETH_TRANSFER_GAS_UNITS);
    wethTransferGasUnits = _newWethTransferGasUnits;
    emit WethTransferGasUnitsUpdated(_newWethTransferGasUnits);
  }

  /// @dev Updates exchange fees
  function updateProtocolFee(uint32 _newProtocolFeeBps) external onlyOwner {
    require(_newProtocolFeeBps <= MAX_PROTOCOL_FEE_BPS, 'protocol fee too high');
    protocolFeeBps = _newProtocolFeeBps;
    emit ProtocolFeeUpdated(_newProtocolFeeBps);
  }

  /// @dev Function to pause the contract
  function pause() external onlyOwner {
    _pause();
  }

  /// @dev Function to unpause the contract
  function unpause() external onlyOwner {
    _unpause();
  }
}

File 2 of 13 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)

pragma solidity ^0.8.0;

import "../utils/Context.sol";

/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * By default, the owner account will be the one that deploys the contract. This
 * can later be changed with {transferOwnership}.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
abstract contract Ownable is Context {
    address private _owner;

    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor() {
        _transferOwnership(_msgSender());
    }

    /**
     * @dev Returns the address of the current owner.
     */
    function owner() public view virtual returns (address) {
        return _owner;
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
        _;
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions anymore. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby removing any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        _transferOwnership(address(0));
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        _transferOwnership(newOwner);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Internal function without access restriction.
     */
    function _transferOwnership(address newOwner) internal virtual {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}

File 3 of 13 : Pausable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (security/Pausable.sol)

pragma solidity ^0.8.0;

import "../utils/Context.sol";

/**
 * @dev Contract module which allows children to implement an emergency stop
 * mechanism that can be triggered by an authorized account.
 *
 * This module is used through inheritance. It will make available the
 * modifiers `whenNotPaused` and `whenPaused`, which can be applied to
 * the functions of your contract. Note that they will not be pausable by
 * simply including this module, only once the modifiers are put in place.
 */
abstract contract Pausable is Context {
    /**
     * @dev Emitted when the pause is triggered by `account`.
     */
    event Paused(address account);

    /**
     * @dev Emitted when the pause is lifted by `account`.
     */
    event Unpaused(address account);

    bool private _paused;

    /**
     * @dev Initializes the contract in unpaused state.
     */
    constructor() {
        _paused = false;
    }

    /**
     * @dev Returns true if the contract is paused, and false otherwise.
     */
    function paused() public view virtual returns (bool) {
        return _paused;
    }

    /**
     * @dev Modifier to make a function callable only when the contract is not paused.
     *
     * Requirements:
     *
     * - The contract must not be paused.
     */
    modifier whenNotPaused() {
        require(!paused(), "Pausable: paused");
        _;
    }

    /**
     * @dev Modifier to make a function callable only when the contract is paused.
     *
     * Requirements:
     *
     * - The contract must be paused.
     */
    modifier whenPaused() {
        require(paused(), "Pausable: not paused");
        _;
    }

    /**
     * @dev Triggers stopped state.
     *
     * Requirements:
     *
     * - The contract must not be paused.
     */
    function _pause() internal virtual whenNotPaused {
        _paused = true;
        emit Paused(_msgSender());
    }

    /**
     * @dev Returns to normal state.
     *
     * Requirements:
     *
     * - The contract must be paused.
     */
    function _unpause() internal virtual whenPaused {
        _paused = false;
        emit Unpaused(_msgSender());
    }
}

File 4 of 13 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol)

pragma solidity ^0.8.0;

/**
 * @dev Contract module that helps prevent reentrant calls to a function.
 *
 * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
 * available, which can be applied to functions to make sure there are no nested
 * (reentrant) calls to them.
 *
 * Note that because there is a single `nonReentrant` guard, functions marked as
 * `nonReentrant` may not call one another. This can be worked around by making
 * those functions `private`, and then adding `external` `nonReentrant` entry
 * points to them.
 *
 * TIP: If you would like to learn more about reentrancy and alternative ways
 * to protect against it, check out our blog post
 * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
 */
abstract contract ReentrancyGuard {
    // Booleans are more expensive than uint256 or any type that takes up a full
    // word because each write operation emits an extra SLOAD to first read the
    // slot's contents, replace the bits taken up by the boolean, and then write
    // back. This is the compiler's defense against contract upgrades and
    // pointer aliasing, and it cannot be disabled.

    // The values being non-zero value makes deployment a bit more expensive,
    // but in exchange the refund on every call to nonReentrant will be lower in
    // amount. Since refunds are capped to a percentage of the total
    // transaction's gas, it is best to keep them low in cases like this one, to
    // increase the likelihood of the full refund coming into effect.
    uint256 private constant _NOT_ENTERED = 1;
    uint256 private constant _ENTERED = 2;

    uint256 private _status;

    constructor() {
        _status = _NOT_ENTERED;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and making it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        // On the first call to nonReentrant, _notEntered will be true
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

        // Any calls to nonReentrant after this point will fail
        _status = _ENTERED;

        _;

        // By storing the original value once again, a refund is triggered (see
        // https://eips.ethereum.org/EIPS/eip-2200)
        _status = _NOT_ENTERED;
    }
}

File 5 of 13 : IERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (interfaces/IERC165.sol)

pragma solidity ^0.8.0;

import "../utils/introspection/IERC165.sol";

File 6 of 13 : IERC721.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721.sol)

pragma solidity ^0.8.0;

import "../../utils/introspection/IERC165.sol";

/**
 * @dev Required interface of an ERC721 compliant contract.
 */
interface IERC721 is IERC165 {
    /**
     * @dev Emitted when `tokenId` token is transferred from `from` to `to`.
     */
    event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);

    /**
     * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.
     */
    event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);

    /**
     * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.
     */
    event ApprovalForAll(address indexed owner, address indexed operator, bool approved);

    /**
     * @dev Returns the number of tokens in ``owner``'s account.
     */
    function balanceOf(address owner) external view returns (uint256 balance);

    /**
     * @dev Returns the owner of the `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function ownerOf(uint256 tokenId) external view returns (address owner);

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients
     * are aware of the ERC721 protocol to prevent tokens from being forever locked.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId
    ) external;

    /**
     * @dev Transfers `tokenId` token from `from` to `to`.
     *
     * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must be owned by `from`.
     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(
        address from,
        address to,
        uint256 tokenId
    ) external;

    /**
     * @dev Gives permission to `to` to transfer `tokenId` token to another account.
     * The approval is cleared when the token is transferred.
     *
     * Only a single account can be approved at a time, so approving the zero address clears previous approvals.
     *
     * Requirements:
     *
     * - The caller must own the token or be an approved operator.
     * - `tokenId` must exist.
     *
     * Emits an {Approval} event.
     */
    function approve(address to, uint256 tokenId) external;

    /**
     * @dev Returns the account approved for `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function getApproved(uint256 tokenId) external view returns (address operator);

    /**
     * @dev Approve or remove `operator` as an operator for the caller.
     * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.
     *
     * Requirements:
     *
     * - The `operator` cannot be the caller.
     *
     * Emits an {ApprovalForAll} event.
     */
    function setApprovalForAll(address operator, bool _approved) external;

    /**
     * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.
     *
     * See {setApprovalForAll}
     */
    function isApprovedForAll(address owner, address operator) external view returns (bool);

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId,
        bytes calldata data
    ) external;
}

File 7 of 13 : SafeERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/utils/SafeERC20.sol)

pragma solidity ^0.8.0;

import "../IERC20.sol";
import "../../../utils/Address.sol";

/**
 * @title SafeERC20
 * @dev Wrappers around ERC20 operations that throw on failure (when the token
 * contract returns false). Tokens that return no value (and instead revert or
 * throw on failure) are also supported, non-reverting calls are assumed to be
 * successful.
 * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,
 * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
 */
library SafeERC20 {
    using Address for address;

    function safeTransfer(
        IERC20 token,
        address to,
        uint256 value
    ) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
    }

    function safeTransferFrom(
        IERC20 token,
        address from,
        address to,
        uint256 value
    ) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));
    }

    /**
     * @dev Deprecated. This function has issues similar to the ones found in
     * {IERC20-approve}, and its usage is discouraged.
     *
     * Whenever possible, use {safeIncreaseAllowance} and
     * {safeDecreaseAllowance} instead.
     */
    function safeApprove(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        // safeApprove should only be called when setting an initial allowance,
        // or when resetting it to zero. To increase and decrease it, use
        // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
        require(
            (value == 0) || (token.allowance(address(this), spender) == 0),
            "SafeERC20: approve from non-zero to non-zero allowance"
        );
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
    }

    function safeIncreaseAllowance(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        uint256 newAllowance = token.allowance(address(this), spender) + value;
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
    }

    function safeDecreaseAllowance(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        unchecked {
            uint256 oldAllowance = token.allowance(address(this), spender);
            require(oldAllowance >= value, "SafeERC20: decreased allowance below zero");
            uint256 newAllowance = oldAllowance - value;
            _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
        }
    }

    /**
     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
     * on the return value: the return value is optional (but if data is returned, it must not be false).
     * @param token The token targeted by the call.
     * @param data The call data (encoded using abi.encode or one of its variants).
     */
    function _callOptionalReturn(IERC20 token, bytes memory data) private {
        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
        // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that
        // the target address contains contract code and also asserts for success in the low-level call.

        bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed");
        if (returndata.length > 0) {
            // Return data is optional
            require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
        }
    }
}

File 8 of 13 : OrderTypes.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.14;

/**
 * @title OrderTypes
 * @author nneverlander. Twitter @nneverlander
 * @notice This library contains the order types used by the main exchange and complications
 */
library OrderTypes {
  /// @dev the tokenId and numTokens (==1 for ERC721)
  struct TokenInfo {
    uint256 tokenId;
    uint256 numTokens;
  }

  /// @dev an order item is a collection address and tokens from that collection
  struct OrderItem {
    address collection;
    TokenInfo[] tokens;
  }

  struct MakerOrder {
    ///@dev is order sell or buy
    bool isSellOrder;
    ///@dev signer of the order (maker address)
    address signer;
    ///@dev Constraints array contains the order constraints. Total constraints: 7. In order:
    // numItems - min (for buy orders) / max (for sell orders) number of items in the order
    // start price in wei
    // end price in wei
    // start time in block.timestamp
    // end time in block.timestamp
    // nonce of the order
    // max tx.gasprice in wei that a user is willing to pay for gas
    uint256[] constraints;
    ///@dev nfts array contains order items where each item is a collection and its tokenIds
    OrderItem[] nfts;
    ///@dev address of complication for trade execution (e.g. InfinityOrderBookComplication), address of the currency (e.g., WETH)
    address[] execParams;
    ///@dev additional parameters like traits for trait orders, private sale buyer for OTC orders etc
    bytes extraParams;
    ///@dev the order signature uint8 v: parameter (27 or 28), bytes32 r, bytes32 s
    bytes sig;
  }
}

File 9 of 13 : IComplication.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.14;

import {OrderTypes} from '../libs/OrderTypes.sol';

/**
 * @title IComplication
 * @author nneverlander. Twitter @nneverlander
 * @notice Complication interface that must be implemented by all complications (execution strategies)
 */
interface IComplication {
  function canExecMatchOneToOne(OrderTypes.MakerOrder calldata makerOrder1, OrderTypes.MakerOrder calldata makerOrder2)
    external
    view
    returns (
      bool,
      bytes32,
      bytes32,
      uint256
    );

  function canExecMatchOneToMany(
    OrderTypes.MakerOrder calldata makerOrder,
    OrderTypes.MakerOrder[] calldata manyMakerOrders
  ) external view returns (bool, bytes32);

  function canExecMatchOrder(
    OrderTypes.MakerOrder calldata sell,
    OrderTypes.MakerOrder calldata buy,
    OrderTypes.OrderItem[] calldata constructedNfts
  )
    external
    view
    returns (
      bool,
      bytes32,
      bytes32,
      uint256
    );

  function canExecTakeOneOrder(OrderTypes.MakerOrder calldata makerOrder) external view returns (bool, bytes32);

  function canExecTakeOrder(OrderTypes.MakerOrder calldata makerOrder, OrderTypes.OrderItem[] calldata takerItems)
    external
    view
    returns (bool, bytes32);

  function verifyMatchOneToManyOrders(
    bool verifySellOrder,
    OrderTypes.MakerOrder calldata sell,
    OrderTypes.MakerOrder calldata buy
  ) external view returns (bool, bytes32);
}

File 10 of 13 : Context.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)

pragma solidity ^0.8.0;

/**
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with meta-transactions the account sending and
 * paying for execution may not be the actual sender (as far as an application
 * is concerned).
 *
 * This contract is only required for intermediate, library-like contracts.
 */
abstract contract Context {
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes calldata) {
        return msg.data;
    }
}

File 11 of 13 : IERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC165 standard, as defined in the
 * https://eips.ethereum.org/EIPS/eip-165[EIP].
 *
 * Implementers can declare support of contract interfaces, which can then be
 * queried by others ({ERC165Checker}).
 *
 * For an implementation, see {ERC165}.
 */
interface IERC165 {
    /**
     * @dev Returns true if this contract implements the interface defined by
     * `interfaceId`. See the corresponding
     * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]
     * to learn more about how these ids are created.
     *
     * This function call must use less than 30 000 gas.
     */
    function supportsInterface(bytes4 interfaceId) external view returns (bool);
}

File 12 of 13 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns the amount of tokens owned by `account`.
     */
    function balanceOf(address account) external view returns (uint256);

    /**
     * @dev Moves `amount` tokens from the caller's account to `to`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address to, uint256 amount) external returns (bool);

    /**
     * @dev Returns the remaining number of tokens that `spender` will be
     * allowed to spend on behalf of `owner` through {transferFrom}. This is
     * zero by default.
     *
     * This value changes when {approve} or {transferFrom} are called.
     */
    function allowance(address owner, address spender) external view returns (uint256);

    /**
     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * IMPORTANT: Beware that changing an allowance with this method brings the risk
     * that someone may use both the old and the new allowance by unfortunate
     * transaction ordering. One possible solution to mitigate this race
     * condition is to first reduce the spender's allowance to 0 and set the
     * desired value afterwards:
     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
     *
     * Emits an {Approval} event.
     */
    function approve(address spender, uint256 amount) external returns (bool);

    /**
     * @dev Moves `amount` tokens from `from` to `to` using the
     * allowance mechanism. `amount` is then deducted from the caller's
     * allowance.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(
        address from,
        address to,
        uint256 amount
    ) external returns (bool);

    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

    /**
     * @dev Emitted when the allowance of a `spender` for an `owner` is set by
     * a call to {approve}. `value` is the new allowance.
     */
    event Approval(address indexed owner, address indexed spender, uint256 value);
}

File 13 of 13 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol)

pragma solidity ^0.8.1;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     *
     * [IMPORTANT]
     * ====
     * You shouldn't rely on `isContract` to protect against flash loan attacks!
     *
     * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
     * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
     * constructor.
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize/address.code.length, which returns 0
        // for contracts in construction, since the code is only stored at the end
        // of the constructor execution.

        return account.code.length > 0;
    }

    /**
     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to
     * `recipient`, forwarding all available gas and reverting on errors.
     *
     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
     * of certain opcodes, possibly making contracts go over the 2300 gas limit
     * imposed by `transfer`, making them unable to receive funds via
     * `transfer`. {sendValue} removes this limitation.
     *
     * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
     *
     * IMPORTANT: because control is transferred to `recipient`, care must be
     * taken to not create reentrancy vulnerabilities. Consider using
     * {ReentrancyGuard} or the
     * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        require(address(this).balance >= amount, "Address: insufficient balance");

        (bool success, ) = recipient.call{value: amount}("");
        require(success, "Address: unable to send value, recipient may have reverted");
    }

    /**
     * @dev Performs a Solidity function call using a low level `call`. A
     * plain `call` is an unsafe replacement for a function call: use this
     * function instead.
     *
     * If `target` reverts with a revert reason, it is bubbled up by this
     * function (like regular Solidity function calls).
     *
     * Returns the raw returned data. To convert to the expected return value,
     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
     *
     * Requirements:
     *
     * - `target` must be a contract.
     * - calling `target` with `data` must not revert.
     *
     * _Available since v3.1._
     */
    function functionCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionCall(target, data, "Address: low-level call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
     * `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, 0, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but also transferring `value` wei to `target`.
     *
     * Requirements:
     *
     * - the calling contract must have an ETH balance of at least `value`.
     * - the called Solidity function must be `payable`.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
    }

    /**
     * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
     * with `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(address(this).balance >= value, "Address: insufficient balance for call");
        require(isContract(target), "Address: call to non-contract");

        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
        return functionStaticCall(target, data, "Address: low-level static call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        require(isContract(target), "Address: static call to non-contract");

        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionDelegateCall(target, data, "Address: low-level delegate call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(isContract(target), "Address: delegate call to non-contract");

        (bool success, bytes memory returndata) = target.delegatecall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason using the provided one.
     *
     * _Available since v4.3._
     */
    function verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal pure returns (bytes memory) {
        if (success) {
            return returndata;
        } else {
            // Look for revert reason and bubble it up if present
            if (returndata.length > 0) {
                // The easiest way to bubble the revert reason is using memory via assembly

                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

Settings
{
  "viaIR": true,
  "optimizer": {
    "enabled": true,
    "runs": 99999999
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "libraries": {}
}

Contract Security Audit

Contract ABI

API
[{"inputs":[{"internalType":"address","name":"_weth","type":"address"},{"internalType":"address","name":"_matchExecutor","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"newMinNonce","type":"uint256"}],"name":"CancelAllOrders","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256[]","name":"orderNonces","type":"uint256[]"}],"name":"CancelMultipleOrders","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"destination","type":"address"},{"indexed":true,"internalType":"address","name":"currency","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"ERC20Withdrawn","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"destination","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"ETHWithdrawn","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"matchExecutor","type":"address"}],"name":"MatchExecutorUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bytes32","name":"sellOrderHash","type":"bytes32"},{"indexed":false,"internalType":"bytes32","name":"buyOrderHash","type":"bytes32"},{"indexed":true,"internalType":"address","name":"seller","type":"address"},{"indexed":true,"internalType":"address","name":"buyer","type":"address"},{"indexed":false,"internalType":"address","name":"complication","type":"address"},{"indexed":true,"internalType":"address","name":"currency","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"components":[{"internalType":"address","name":"collection","type":"address"},{"components":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"numTokens","type":"uint256"}],"internalType":"struct OrderTypes.TokenInfo[]","name":"tokens","type":"tuple[]"}],"indexed":false,"internalType":"struct OrderTypes.OrderItem[]","name":"nfts","type":"tuple[]"}],"name":"MatchOrderFulfilled","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint32","name":"protocolFee","type":"uint32"}],"name":"ProtocolFeeUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bytes32","name":"orderHash","type":"bytes32"},{"indexed":true,"internalType":"address","name":"seller","type":"address"},{"indexed":true,"internalType":"address","name":"buyer","type":"address"},{"indexed":false,"internalType":"address","name":"complication","type":"address"},{"indexed":true,"internalType":"address","name":"currency","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"components":[{"internalType":"address","name":"collection","type":"address"},{"components":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"numTokens","type":"uint256"}],"internalType":"struct OrderTypes.TokenInfo[]","name":"tokens","type":"tuple[]"}],"indexed":false,"internalType":"struct OrderTypes.OrderItem[]","name":"nfts","type":"tuple[]"}],"name":"TakeOrderFulfilled","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint32","name":"wethTransferGasUnits","type":"uint32"}],"name":"WethTransferGasUnitsUpdated","type":"event"},{"inputs":[],"name":"MAX_PROTOCOL_FEE_BPS","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_WETH_TRANSFER_GAS_UNITS","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"WETH","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"minNonce","type":"uint256"}],"name":"cancelAllOrders","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"orderNonces","type":"uint256[]"}],"name":"cancelMultipleOrders","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"},{"internalType":"uint256","name":"nonce","type":"uint256"}],"name":"isNonceValid","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"isUserOrderNonceExecutedOrCancelled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"matchExecutor","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"bool","name":"isSellOrder","type":"bool"},{"internalType":"address","name":"signer","type":"address"},{"internalType":"uint256[]","name":"constraints","type":"uint256[]"},{"components":[{"internalType":"address","name":"collection","type":"address"},{"components":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"numTokens","type":"uint256"}],"internalType":"struct OrderTypes.TokenInfo[]","name":"tokens","type":"tuple[]"}],"internalType":"struct OrderTypes.OrderItem[]","name":"nfts","type":"tuple[]"},{"internalType":"address[]","name":"execParams","type":"address[]"},{"internalType":"bytes","name":"extraParams","type":"bytes"},{"internalType":"bytes","name":"sig","type":"bytes"}],"internalType":"struct OrderTypes.MakerOrder","name":"makerOrder","type":"tuple"},{"components":[{"internalType":"bool","name":"isSellOrder","type":"bool"},{"internalType":"address","name":"signer","type":"address"},{"internalType":"uint256[]","name":"constraints","type":"uint256[]"},{"components":[{"internalType":"address","name":"collection","type":"address"},{"components":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"numTokens","type":"uint256"}],"internalType":"struct OrderTypes.TokenInfo[]","name":"tokens","type":"tuple[]"}],"internalType":"struct OrderTypes.OrderItem[]","name":"nfts","type":"tuple[]"},{"internalType":"address[]","name":"execParams","type":"address[]"},{"internalType":"bytes","name":"extraParams","type":"bytes"},{"internalType":"bytes","name":"sig","type":"bytes"}],"internalType":"struct OrderTypes.MakerOrder[]","name":"manyMakerOrders","type":"tuple[]"}],"name":"matchOneToManyOrders","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"bool","name":"isSellOrder","type":"bool"},{"internalType":"address","name":"signer","type":"address"},{"internalType":"uint256[]","name":"constraints","type":"uint256[]"},{"components":[{"internalType":"address","name":"collection","type":"address"},{"components":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"numTokens","type":"uint256"}],"internalType":"struct OrderTypes.TokenInfo[]","name":"tokens","type":"tuple[]"}],"internalType":"struct OrderTypes.OrderItem[]","name":"nfts","type":"tuple[]"},{"internalType":"address[]","name":"execParams","type":"address[]"},{"internalType":"bytes","name":"extraParams","type":"bytes"},{"internalType":"bytes","name":"sig","type":"bytes"}],"internalType":"struct OrderTypes.MakerOrder[]","name":"makerOrders1","type":"tuple[]"},{"components":[{"internalType":"bool","name":"isSellOrder","type":"bool"},{"internalType":"address","name":"signer","type":"address"},{"internalType":"uint256[]","name":"constraints","type":"uint256[]"},{"components":[{"internalType":"address","name":"collection","type":"address"},{"components":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"numTokens","type":"uint256"}],"internalType":"struct OrderTypes.TokenInfo[]","name":"tokens","type":"tuple[]"}],"internalType":"struct OrderTypes.OrderItem[]","name":"nfts","type":"tuple[]"},{"internalType":"address[]","name":"execParams","type":"address[]"},{"internalType":"bytes","name":"extraParams","type":"bytes"},{"internalType":"bytes","name":"sig","type":"bytes"}],"internalType":"struct OrderTypes.MakerOrder[]","name":"makerOrders2","type":"tuple[]"}],"name":"matchOneToOneOrders","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"bool","name":"isSellOrder","type":"bool"},{"internalType":"address","name":"signer","type":"address"},{"internalType":"uint256[]","name":"constraints","type":"uint256[]"},{"components":[{"internalType":"address","name":"collection","type":"address"},{"components":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"numTokens","type":"uint256"}],"internalType":"struct OrderTypes.TokenInfo[]","name":"tokens","type":"tuple[]"}],"internalType":"struct OrderTypes.OrderItem[]","name":"nfts","type":"tuple[]"},{"internalType":"address[]","name":"execParams","type":"address[]"},{"internalType":"bytes","name":"extraParams","type":"bytes"},{"internalType":"bytes","name":"sig","type":"bytes"}],"internalType":"struct OrderTypes.MakerOrder[]","name":"sells","type":"tuple[]"},{"components":[{"internalType":"bool","name":"isSellOrder","type":"bool"},{"internalType":"address","name":"signer","type":"address"},{"internalType":"uint256[]","name":"constraints","type":"uint256[]"},{"components":[{"internalType":"address","name":"collection","type":"address"},{"components":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"numTokens","type":"uint256"}],"internalType":"struct OrderTypes.TokenInfo[]","name":"tokens","type":"tuple[]"}],"internalType":"struct OrderTypes.OrderItem[]","name":"nfts","type":"tuple[]"},{"internalType":"address[]","name":"execParams","type":"address[]"},{"internalType":"bytes","name":"extraParams","type":"bytes"},{"internalType":"bytes","name":"sig","type":"bytes"}],"internalType":"struct OrderTypes.MakerOrder[]","name":"buys","type":"tuple[]"},{"components":[{"internalType":"address","name":"collection","type":"address"},{"components":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"numTokens","type":"uint256"}],"internalType":"struct OrderTypes.TokenInfo[]","name":"tokens","type":"tuple[]"}],"internalType":"struct OrderTypes.OrderItem[][]","name":"constructs","type":"tuple[][]"}],"name":"matchOrders","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"protocolFeeBps","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"bool","name":"isSellOrder","type":"bool"},{"internalType":"address","name":"signer","type":"address"},{"internalType":"uint256[]","name":"constraints","type":"uint256[]"},{"components":[{"internalType":"address","name":"collection","type":"address"},{"components":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"numTokens","type":"uint256"}],"internalType":"struct OrderTypes.TokenInfo[]","name":"tokens","type":"tuple[]"}],"internalType":"struct OrderTypes.OrderItem[]","name":"nfts","type":"tuple[]"},{"internalType":"address[]","name":"execParams","type":"address[]"},{"internalType":"bytes","name":"extraParams","type":"bytes"},{"internalType":"bytes","name":"sig","type":"bytes"}],"internalType":"struct OrderTypes.MakerOrder[]","name":"makerOrders","type":"tuple[]"}],"name":"takeMultipleOneOrders","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"components":[{"internalType":"bool","name":"isSellOrder","type":"bool"},{"internalType":"address","name":"signer","type":"address"},{"internalType":"uint256[]","name":"constraints","type":"uint256[]"},{"components":[{"internalType":"address","name":"collection","type":"address"},{"components":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"numTokens","type":"uint256"}],"internalType":"struct OrderTypes.TokenInfo[]","name":"tokens","type":"tuple[]"}],"internalType":"struct OrderTypes.OrderItem[]","name":"nfts","type":"tuple[]"},{"internalType":"address[]","name":"execParams","type":"address[]"},{"internalType":"bytes","name":"extraParams","type":"bytes"},{"internalType":"bytes","name":"sig","type":"bytes"}],"internalType":"struct OrderTypes.MakerOrder[]","name":"makerOrders","type":"tuple[]"},{"components":[{"internalType":"address","name":"collection","type":"address"},{"components":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"numTokens","type":"uint256"}],"internalType":"struct OrderTypes.TokenInfo[]","name":"tokens","type":"tuple[]"}],"internalType":"struct OrderTypes.OrderItem[][]","name":"takerNfts","type":"tuple[][]"}],"name":"takeOrders","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"components":[{"internalType":"address","name":"collection","type":"address"},{"components":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"numTokens","type":"uint256"}],"internalType":"struct OrderTypes.TokenInfo[]","name":"tokens","type":"tuple[]"}],"internalType":"struct OrderTypes.OrderItem[]","name":"items","type":"tuple[]"}],"name":"transferMultipleNFTs","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_matchExecutor","type":"address"}],"name":"updateMatchExecutor","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint32","name":"_newProtocolFeeBps","type":"uint32"}],"name":"updateProtocolFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint32","name":"_newWethTransferGasUnits","type":"uint32"}],"name":"updateWethTransferGas","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"userMinOrderNonce","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"wethTransferGasUnits","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"destination","type":"address"}],"name":"withdrawETH","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"destination","type":"address"},{"internalType":"address","name":"currency","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdrawTokens","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60a0346200009b57601f6200514038819003918201601f19168301916001600160401b03831184841017620000a05780849260409485528339810103126200009b57806200005f6020620000576200006694620000b6565b9201620000b6565b90620000cb565b604051614ff9908162000147823960805181818161038401528181610a4301528181610bd101528181611b9c0152611c560152f35b600080fd5b634e487b7160e01b600052604160045260246000fd5b51906001600160a01b03821682036200009b57565b600160005560015460018060a01b0390338282167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e06000604051a36001600160a81b0319163360ff60a01b191617600155600280546080939093526001600160e01b0319909216921691909117640fa0000c3560a41b17905556fe60806040526004361015610013575b600080fd5b60003560e01c80630df4239c14610243578063183f17c41461023a57806331e27e271461023157806335659fb8146102285780633f4ba83a1461021f5780634266581e146102165780635c975abb1461020d5780635e35359e1461020457806363f3c034146101fb578063690d8320146101f25780636d947e4b146101e9578063715018a6146101e0578063723d9836146101d757806378759e13146101ce5780638456cb59146101c55780638aff5573146101bc5780638ca793b2146101b35780638da5cb5b146101aa57806398011ac8146101a15780639d9a0cef14610198578063ad5c46481461018f578063bcb47ece14610186578063bd11257c1461017d578063bd545f5314610174578063cb97a8101461016b578063d19b6da314610162578063ed5fd575146101595763f2fde38b1461015157600080fd5b61000e6120c4565b5061000e612087565b5061000e611fcd565b5061000e611ec6565b5061000e611d6c565b5061000e611ccd565b5061000e611c7a565b5061000e611c0a565b5061000e611b17565b5061000e6119eb565b5061000e611998565b5061000e61187b565b5061000e61175b565b5061000e611652565b5061000e6113a4565b5061000e61117f565b5061000e61106c565b5061000e611030565b5061000e610f27565b5061000e610843565b5061000e61070e565b5061000e6106c9565b5061000e61065f565b5061000e610550565b5061000e61050a565b5061000e61048d565b5061000e61041c565b5061000e61027d565b9181601f8401121561000e5782359167ffffffffffffffff831161000e576020808501948460051b01011161000e57565b503461000e5760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261000e5767ffffffffffffffff60043581811161000e576102ce90369060040161024c565b60249291923582811161000e576102e990369060040161024c565b9260443590811161000e5761030290369060040161024c565b9390916103146002600054141561228c565b600260005560019561032d60ff885460a01c16156122f1565b5a936002549261035473ffffffffffffffffffffffffffffffffffffffff85163314612356565b61035f8588146123bb565b61036a8888146123bb565b63ffffffff808560c01c169460a01c16946103b0886103ab7f0000000000000000000000000000000000000000000000000000000000000000995a90612450565b612467565b9060005b8981106103c7576103c56001600055565b005b8061040b8a8a8f948f8f8a6104038f948f948f94828f8f90826103fd946103f16103f7935a6124db565b9b61255e565b9661255e565b94612d6d565b929091613836565b016103b4565b600091031261000e57565b503461000e5760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261000e57602063ffffffff60025460a01c16604051908152f35b73ffffffffffffffffffffffffffffffffffffffff81160361000e57565b359061048b82610462565b565b503461000e5760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261000e5773ffffffffffffffffffffffffffffffffffffffff6004356104de81610462565b1660005260046020526040600020602435600052602052602060ff604060002054166040519015158152f35b503461000e5760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261000e57602063ffffffff60025460c01c16604051908152f35b503461000e5760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261000e576001546105a43373ffffffffffffffffffffffffffffffffffffffff8316146121b8565b60ff8160a01c1615610601577fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff166001557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa6020604051338152a1005b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f5061757361626c653a206e6f74207061757365640000000000000000000000006044820152fd5b503461000e5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261000e5773ffffffffffffffffffffffffffffffffffffffff6004356106b081610462565b1660005260036020526020604060002054604051908152f35b503461000e5760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261000e57602060ff60015460a01c166040519015158152f35b503461000e5760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261000e5760043561074a81610462565b6024359061075782610462565b7fbfed55bdcd242e3dd0f60ddd7d1e87c67f61c34cd9527b3e6455d841b102536261080360443573ffffffffffffffffffffffffffffffffffffffff80956107a4826001541633146121b8565b1694604051947fa9059cbb000000000000000000000000000000000000000000000000000000008652169384600482015281602482015260208160448160008a5af18015610836575b610808575b506040519081529081906020820190565b0390a3005b6108289060203d811161082f575b61082081836126ef565b810190612d58565b50386107f2565b503d610816565b61083e612bd5565b6107ed565b503461000e577ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc60408136011261000e576004359067ffffffffffffffff9081831161000e5760e090833603011261000e5760243590811161000e576108ad90369060040161024c565b91906108be6002600054141561228c565b60026000556108d560ff60015460a01c16156122f1565b5a926002546108fb73ffffffffffffffffffffffffffffffffffffffff82163314612356565b61093b61092261092261091d61091760848901896004016125ac565b90612600565b612694565b73ffffffffffffffffffffffffffffffffffffffff1690565b946040805180977ff1332a910000000000000000000000000000000000000000000000000000000082528180610979888a8c60040160048501612b0e565b03915afa958615610f1a575b600090600097610ee6575b5061099a90612be2565b610a046109fd6109d56109af60248901612694565b73ffffffffffffffffffffffffffffffffffffffff166000526004602052604060002090565b6109ee6109e860448a018a6004016125ac565b90612614565b35600052602052604060002090565b5460ff1690565b8015610e90575b610a159015612c47565b610a2185600401612cac565b15610b1557826103ab610a36610a3d936124a0565b5a90612450565b926000907f00000000000000000000000000000000000000000000000000000000000000009363ffffffff808560a01c169460c01c16925b818110610ae45750505050505050610ada9150806109ee6109e8610aa16109af6024610aaf9601612694565b9260448101906004016125ac565b60017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00825416179055565b6103c56001600055565b600190610b0f8787878d8d610af98e5a6124db565b91610b05888b8d61255e565b91600401906135e9565b01610a75565b9194610b32610b2c604487969701866004016125ac565b9061262b565b35610e6c575b936000946000915b878310610e315750505073ffffffffffffffffffffffffffffffffffffffff939450610bb291610ba663ffffffff610bab93610b9a610aaf610b876109af60248b01612694565b6109ee6109e860448c018c6004016125ac565b60a01c16915a90612450565b6124db565b3a90612d1b565b90610bcf61091d610bc960848401846004016125ac565b9061263a565b7f0000000000000000000000000000000000000000000000000000000000000000841693168303610cb95791610c17610c789492610c11602460209601612694565b936124db565b6040517f23b872dd00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff909316600484015230602484015260448301529092839190829060009082906064820190565b03925af18015610cac575b610c8e575b50610ada565b610ca59060203d811161082f5761082081836126ef565b5038610c88565b610cb4612bd5565b610c83565b9190610ccb60848401600485016125ac565b610cd49161263a565b610cdd90612694565b73ffffffffffffffffffffffffffffffffffffffff1691610d0060248501612694565b6040517f23b872dd0000000000000000000000000000000000000000000000000000000080825273ffffffffffffffffffffffffffffffffffffffff929092166004820152306024820152604481019690965260209586948590829060649082905a90600091f18015610dc597600093610d8893602493610e24575b610e07575b5001612694565b60405192835273ffffffffffffffffffffffffffffffffffffffff1660048301523060248301526044820193909352938492839182906064820190565b03925af18015610dfa575b610ddc575b5050610ada565b81610df292903d1061082f5761082081836126ef565b503880610dd5565b610e02612bd5565b610dd0565b610e1d90893d8b1161082f5761082081836126ef565b5038610d81565b610e2c612bd5565b610d7c565b909195610e63600191610e5d63ffffffff8760c01c168b610e578c8c600401928961255e565b886136f4565b906124db565b96019190610b40565b610e8b610e82610b2c60448701876004016125ac565b353a1115612cb6565b610b38565b50610a15610ea76109e860448801886004016125ac565b35610edd610eb760248901612694565b73ffffffffffffffffffffffffffffffffffffffff166000526003602052604060002090565b54119050610a0b565b61099a9750610f0d915060403d604011610f13575b610f0581836126ef565b81019061273a565b96610990565b503d610efb565b610f22612bd5565b610985565b503461000e5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261000e57600435610f6381610462565b73ffffffffffffffffffffffffffffffffffffffff610f87816001541633146121b8565b47916000808060405186855af1610f9c613067565b5015610fd2577f94b2de810873337ed265c5f8cf98c9cffefa06b8607f9a2f1fbaebdfbcfbef1c916020916040519485521692a2005b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600660248201527f6661696c656400000000000000000000000000000000000000000000000000006044820152fd5b503461000e5760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261000e5760206040516107d08152f35b503461000e576000807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112611113576001547fffffffffffffffffffffffff000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff8216916110e43384146121b8565b1660015581604051917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08284a3f35b80fd5b60407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc82011261000e5767ffffffffffffffff9160043583811161000e57826111619160040161024c565b9390939260243591821161000e5761117b9160040161024c565b9091565b5061118936611116565b91929060009361119d60028654141561228c565b600285556001916111b560ff845460a01c16156122f1565b6111c08583146123bb565b85946111cc8386612517565b9273ffffffffffffffffffffffffffffffffffffffff6111f761091d610bc9608097888101906125ac565b16958615968715908161134c575b6112176112128585612517565b612cac565b159182159261133d575b508a5b848110611289578b8b8b611243575b5061123e6001600055565b604051f35b61124f81341015613002565b8181341161125e575b50611233565b808061126d6112829434612450565b60405190335af161127c613067565b506130d3565b8181611258565b88906112b66112af61092261091d610bc98d6112a6878d8d61255e565b908101906125ac565b8414612e5d565b6112d66112cf6112ca611212848a8a61255e565b151590565b8514612ec2565b6112fa6112f261092260206112ec858b8b61255e565b01612694565b331415612f27565b61133761131a61131361130e848a8a61255e565b614efd565b809e6124db565b9c61132683898961255e565b611331848b8d612d6d565b916146cc565b01611224565b61134690612df8565b38611221565b6113563415612d93565b611205565b60207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc82011261000e576004359067ffffffffffffffff821161000e5761117b9160040161024c565b506113ae3661135b565b6113bd6002600054141561228c565b60026000556113d460ff60015460a01c16156122f1565b60009173ffffffffffffffffffffffffffffffffffffffff61140961091d610bc96113ff8686612517565b60808101906125ac565b16918215159182611643575b6114226112128383612517565b9182159384611634575b5060005b81811061147357868615611448576103c56001600055565b61145481341015613002565b80341115610ada576000808061126d61146d9434612450565b80610ada565b61156a9661149861149161092261091d610bc96113ff87898b61255e565b8814612e5d565b6114b46114ac6112ca61121285878961255e565b871514612ec2565b6114ca6112f261092260206112ec86888a61255e565b6114fe6109fd6114e36109af60206112ec87898b61255e565b6109ee6109e86114f487898b61255e565b60408101906125ac565b8015611602575b61150f9015612f8c565b604061152b61092261092261091d6109176113ff888a8c61255e565b61153684868861255e565b90825180809c81947f9e0daf5e00000000000000000000000000000000000000000000000000000000835260048301612ff1565b03915afa9788156115f5575b6000906000996115c3575b50600192916115926115bd92612be2565b866115ab6115a461130e86898b61255e565b80936124db565b9a6115b785888a61255e565b90614599565b01611430565b61159299506115bd9150916115e96001949360403d604011610f1357610f0581836126ef565b9a909250509192611581565b6115fd612bd5565b611576565b5061150f6116176109e86114f485878961255e565b3561162b610eb760206112ec87898b61255e565b54119050611505565b61163d90612df8565b3861142c565b61164d3415612d93565b611415565b503461000e5760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261000e57740100000000000000000000000000000000000000007fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff6001546116dd3373ffffffffffffffffffffffffffffffffffffffff8316146121b8565b6116ed60ff8260a01c16156122f1565b16176001557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586020604051338152a1005b7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc602091011261000e5760043563ffffffff8116810361000e5790565b503461000e5761176a3661171e565b61178d73ffffffffffffffffffffffffffffffffffffffff6001541633146121b8565b6107d063ffffffff82161161181d57600280547fffffffff00000000ffffffffffffffffffffffffffffffffffffffffffffffff1660c083901b7bffffffff0000000000000000000000000000000000000000000000001617905560405163ffffffff90911681527f45a5a29d28d3452ca649e48ecb93f018866388cb166efa2f14529862d6c30e1090602090a1005b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f70726f746f636f6c2066656520746f6f206869676800000000000000000000006044820152fd5b503461000e5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261000e576004356118b781610462565b73ffffffffffffffffffffffffffffffffffffffff906118dc826001541633146121b8565b16801561193a57806000917fffffffffffffffffffffffff00000000000000000000000000000000000000006002541617600255604051907f18068b45283315585200a72a30aee7615ec699afcdbe3070b03535c8439c93078383a2f35b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f6d61746368206578656375746f722063616e6e6f7420626520300000000000006044820152fd5b503461000e5760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261000e57602073ffffffffffffffffffffffffffffffffffffffff60015416604051908152f35b503461000e576119fa3661135b565b611a0581151561319d565b60005b818110611a485750611a437ffa0ae5d80fe3763c880a3839fab0294171a6f730d1f82c4cd5392c6f67b4173291604051918291339583613267565b0390a2005b80611a8c611a596001938587612676565b35611a843373ffffffffffffffffffffffffffffffffffffffff166000526003602052604060002090565b541115613138565b611ad6611ad1611acd6109fd611ac23373ffffffffffffffffffffffffffffffffffffffff166000526004602052604060002090565b6109ee86898b612676565b1590565b613202565b611b11610aaf611b063373ffffffffffffffffffffffffffffffffffffffff166000526004602052604060002090565b6109ee848789612676565b01611a08565b503461000e57611b2636611116565b9092611b376002600054141561228c565b6002600055600193611b5060ff865460a01c16156122f1565b5a9160025490611b7773ffffffffffffffffffffffffffffffffffffffff83163314612356565b611b828587146123bb565b63ffffffff808360c01c169260a01c1692611bc3876103ab7f0000000000000000000000000000000000000000000000000000000000000000975a90612450565b9660005b818110611bd8576103c56001600055565b80611c04888888888f968f8f91611bf7818c6103f7611bfe955a6124db565b928c61255e565b90613392565b01611bc7565b503461000e5760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261000e57602060405173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b503461000e5760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261000e57602073ffffffffffffffffffffffffffffffffffffffff60025416604051908152f35b503461000e5760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261000e576020600435611d0b81610462565b73ffffffffffffffffffffffffffffffffffffffff60243591169060008281526004845260408120828252845260ff604082205416159283611d55575b5050506040519015158152f35b604092935081526003845220541115388080611d48565b503461000e5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261000e57600435336000526003602052611db86040600020548211613138565b336000526003602052620186a06040600020547ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe795f8111611eb9575b01811015611e5b5780611e263373ffffffffffffffffffffffffffffffffffffffff166000526003602052604060002090565b5560405190815233907f1e7178d84f0b0825c65795cd62e7972809ad3aac6917843aaec596161b2c0a97908060208101611a43565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600860248201527f746f6f206d616e790000000000000000000000000000000000000000000000006044820152fd5b611ec1612420565b611df3565b503461000e5760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261000e57600435611f0281610462565b60243567ffffffffffffffff811161000e57611f2290369060040161024c565b90611f326002600054141561228c565b6002600055611f4960ff60015460a01c16156122f1565b73ffffffffffffffffffffffffffffffffffffffff831615611f6f57610ada9233614b14565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600f60248201527f696e76616c6964206164647265737300000000000000000000000000000000006044820152fd5b503461000e57611fdc3661171e565b611fff73ffffffffffffffffffffffffffffffffffffffff6001541633146121b8565b63ffffffff81169062030d40821161000e577f70315b78769d300844b16f6da622ba96060a0bcd294a60299e48b5ac10b53efa916020917fffffffffffffffff00000000ffffffffffffffffffffffffffffffffffffffff77ffffffff00000000000000000000000000000000000000006002549260a01b16911617600255604051908152a1005b503461000e5760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261000e57602060405162030d408152f35b503461000e5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261000e5760043561210081610462565b73ffffffffffffffffffffffffffffffffffffffff612124816001541633146121b8565b811615612134576103c59061221d565b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152fd5b156121bf57565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602060248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152fd5b6001549073ffffffffffffffffffffffffffffffffffffffff80911691827fffffffffffffffffffffffff0000000000000000000000000000000000000000821617600155167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e06000604051a3565b1561229357565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152fd5b156122f857565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f5061757361626c653a20706175736564000000000000000000000000000000006044820152fd5b1561235d57565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f6f6e6c79206d61746368206578656375746f72000000000000000000000000006044820152fd5b156123c257565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f6d69736d617463686564206c656e6774687300000000000000000000000000006044820152fd5b507f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b81811061245b570390565b612463612420565b0390565b8115612471570490565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b614e20907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffb1df81116124cf570190565b6124d7612420565b0190565b811981116124cf570190565b507f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9015612551575b8035907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff218136030182121561000e570190565b6125596124e7565b61251e565b919081101561259f575b60051b810135907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff218136030182121561000e570190565b6125a76124e7565b612568565b9035907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe18136030182121561000e570180359067ffffffffffffffff821161000e57602001918160051b3603831361000e57565b90156126095790565b6126116124e7565b90565b60a09160051015612623570190565b6124d76124e7565b60c09160061015612623570190565b60209160011015612623570190565b60409160021015612623570190565b60809160041015612623570190565b60609160031015612623570190565b9190811015612687575b60051b0190565b61268f6124e7565b612680565b3561261181610462565b507f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b67ffffffffffffffff81116126e257604052565b6126ea61269e565b604052565b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff8211176126e257604052565b8015150361000e57565b919082604091031261000e576020825161275381612730565b92015190565b90357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe18236030181121561000e57016020813591019167ffffffffffffffff821161000e578160051b3603831361000e57565b90918281527f07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff831161000e5760209260051b80928483013701016000815290565b90357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc18236030181121561000e570190565b9082818152602080910193818360051b82010194846000925b858410612849575050505050505090565b909192939495967fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe082820301845261288188846127ed565b6040908183019073ffffffffffffffffffffffffffffffffffffffff81356128a881610462565b168452888101357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe18236030181121561000e57019088823592019367ffffffffffffffff831161000e578260061b3603851361000e57808385938c96876060950152520193916000915b818310612932575050505080600192990194019401929594939190612838565b833586528a8401358b870152948501948a945092830192600190920191612912565b91908082526020809201929160005b828110612971575050505090565b90919293828060019273ffffffffffffffffffffffffffffffffffffffff883561299a81610462565b16815201950193929101612963565b90357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe18236030181121561000e57016020813591019167ffffffffffffffff821161000e57813603831361000e57565b601f82602094937fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0938186528686013760008582860101520116010190565b612611918135612a4781612730565b15158152612a77612a5a60208401610480565b73ffffffffffffffffffffffffffffffffffffffff166020830152565b612b00612af5612ada612abf612aa4612a936040880188612759565b60e0604089015260e08801916127ac565b612ab16060880188612759565b90878303606089015261281f565b612acc6080870187612759565b908683036080880152612954565b612ae760a08601866129a9565b9085830360a08701526129f9565b9260c08101906129a9565b9160c08185039101526129f9565b90612b2190604083526040830190612a38565b926020918281860391015280845281840191808260051b8601019484600080925b858410612b5457505050505050505090565b90919293949596977fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe082820301885288357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff2185360301811215612bd15786612bc160019387839401612a38565b9a01980196959401929190612b42565b8380fd5b506040513d6000823e3d90fd5b15612be957565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f63616e6e6f7420657865637574650000000000000000000000000000000000006044820152fd5b15612c4e57565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f6d616b6572206f726465722065787069726564000000000000000000000000006044820152fd5b3561261181612730565b15612cbd57565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f67617320707269636520746f6f206869676800000000000000000000000000006044820152fd5b807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04821181151516612d4c570290565b612d54612420565b0290565b9081602091031261000e575161261181612730565b909161117b92811015612d86575b60051b8101906125ac565b612d8e6124e7565b612d7b565b15612d9a57565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600d60248201527f6d7367206861732076616c7565000000000000000000000000000000000000006044820152fd5b15612dff57565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f6f6666657273206f6e6c7920696e2045524332300000000000000000000000006044820152fd5b15612e6457565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f63616e6e6f74206d69782063757272656e6369657300000000000000000000006044820152fd5b15612ec957565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f63616e6e6f74206d6978206f72646572207369646573000000000000000000006044820152fd5b15612f2e57565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600d60248201527f6e6f20646f67666f6f64696e67000000000000000000000000000000000000006044820152fd5b15612f9357565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600d60248201527f6f726465722065787069726564000000000000000000000000000000000000006044820152fd5b906020612611928181520190612a38565b1561300957565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f696e73756666696369656e7420746f74616c20707269636500000000000000006044820152fd5b3d156130ce573d9067ffffffffffffffff82116130c1575b604051916130b560207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f84011601846126ef565b82523d6000602084013e565b6130c961269e565b61307f565b606090565b156130da57565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f6661696c65642072657475726e696e67206578636573732045544800000000006044820152fd5b1561313f57565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600d60248201527f6e6f6e636520746f6f206c6f77000000000000000000000000000000000000006044820152fd5b156131a457565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600f60248201527f63616e6e6f7420626520656d70747900000000000000000000000000000000006044820152fd5b1561320957565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f6e6f6e636520616c72656164792065786563206f722063616e63656c6c6564006044820152fd5b9160206126119381815201916127ac565b919082608091031261000e57815161328f81612730565b916020810151916060604083015192015190565b90916132ba61261193604084526040840190612a38565b916020818403910152612a38565b156132cf57565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f73656c6c206f72646572206578706972656400000000000000000000000000006044820152fd5b1561333457565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f627579206f7264657220657870697265640000000000000000000000000000006044820152fd5b9161048b959493926133a381612cac565b1561352557916133c06109228061091d61091760808801886125ac565b92608060405180957fd9814ac500000000000000000000000000000000000000000000000000000000825281806133fb8787600484016132a3565b03915afa938415613518575b600080809281976134df575b5061341d90612be2565b613459602084016134306109af82612694565b906134496109fd60408801936109ee6109e8868b6125ac565b9182156134c0575b5050156132c8565b6134956020850161346c6109af82612694565b906134856109fd60408901936109ee6109e8868c6125ac565b91821561349a575b50501561332d565b61391a565b6134b79192506134b06109e8610eb7928a6125ac565b3592612694565b5411388061348d565b6134d69192506134b06109e8610eb792896125ac565b54113880613451565b91505061341d9550613508915060803d8111613511575b61350081836126ef565b810190613278565b96909290613413565b503d6134f6565b613520612bd5565b613407565b6133c061092261092261091d610917856113ff565b90916135586126119360008452606060208501526060840190612a38565b916040818403910152612a38565b90916135586126119360018452606060208501526060840190612a38565b1561358b57565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f6f72646572206e6f7420766572696669656400000000000000000000000000006044820152fd5b9161048b969594939161360b61092261092261091d61091760808601866125ac565b6040805180927f83d12146000000000000000000000000000000000000000000000000000000008252818061364488886004840161353a565b03915afa9081156136e7575b60009081926136c4575b5061366490613584565b61369f602084016136776109af82612694565b906136906109fd60408801936109ee6109e8868b6125ac565b9182156136ae5750501561332d565b6136a883614efd565b94613d29565b6134b79192506134b06109e8610eb792896125ac565b61366492506136e1915060403d8111610f1357610f0581836126ef565b9161365a565b6136ef612bd5565b613650565b9091612611939261371461092261092261091d61091760808601866125ac565b926040805180957f83d12146000000000000000000000000000000000000000000000000000000008252818061374e888860048401613566565b03915afa9384156137f1575b60009081956137ce575b5061376e90613584565b6137a9602083016137816109af82612694565b9061379a6109fd60408701936109ee6109e8868a6125ac565b9182156137b8575050156132c8565b6137b282614efd565b93614038565b6134d69192506134b06109e8610eb792886125ac565b61376e95506137eb915060403d8111610f1357610f0581836126ef565b94613764565b6137f9612bd5565b61375a565b9290612611949261381a61382892606087526060870190612a38565b908582036020870152612a38565b92604081850391015261281f565b92909161048b979695949261385a61092261092261091d61091760808a018a6125ac565b94608060405180977f950c52bb000000000000000000000000000000000000000000000000000000008252818061389789898989600486016137fe565b03915afa95861561390d575b600080809281996138e4575b506138b990612be2565b6138cc602084016134306109af82612694565b6138df6020850161346c6109af82612694565b61425e565b9150506138b99750613904915060803d81116135115761350081836126ef565b989092906138af565b613915612bd5565b6138a3565b979692959385879560408701613933610b2c828a6125ac565b35613d14575b61394560208701612694565b61396f9073ffffffffffffffffffffffffffffffffffffffff166000526004602052604060002090565b61397c60408801886125ac565b61398591612614565b356139999190600052602052604060002090565b80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790556139ce60208901612694565b6139f89073ffffffffffffffffffffffffffffffffffffffff166000526004602052604060002090565b90613a0390896125ac565b613a0c91612614565b35613a209190600052602052604060002090565b80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600117905563ffffffff1690613a5991612d1b565b612710900498613a698a88612450565b92613a7660208601612694565b613a8260208901612694565b613a8f60608801886125ac565b91613a9993614b14565b613aa660808801886125ac565b613aaf9161263a565b613ab890612694565b73ffffffffffffffffffffffffffffffffffffffff16613ada60208901612694565b94613ae760208801612694565b6040517f23b872dd00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9788166004820152961660248701526044860152846064815a602094600091f191821598610bab98613b71602063ffffffff99613bba99610a3698613bc29f613d07575b613cf1575001612694565b613b7d60208301612694565b613b9061091d61091760808601866125ac565b91613bb2613ba761091d610bc960808801886125ac565b9460608101906125ac565b97909661451d565b9116906124db565b90613bd661091d610bc960808401846125ac565b73ffffffffffffffffffffffffffffffffffffffff93841693168303613c445791610c17613c0c9492610c116020809601612694565b03925af18015613c37575b613c1f575b50565b613c1c9060203d60201161082f5761082081836126ef565b613c3f612bd5565b613c17565b91613c78602084613cdc82613c0c98613c6d61092261092261091d610bc96080879e01896125ac565b613c78838601612694565b60006040518096819582947f23b872dd00000000000000000000000000000000000000000000000000000000845230906004850160409194939294606082019573ffffffffffffffffffffffffffffffffffffffff80921683521660208201520152565b03925af18015613d0757613cf1575001612694565b610e1d90833d851161082f5761082081836126ef565b613d0f612bd5565b613b66565b613d24610e82610b2c838b6125ac565b613939565b9583979198949392936040840194613d44610b2c87876125ac565b35614023575b60209a8b998a870197613d5c89612694565b613d869073ffffffffffffffffffffffffffffffffffffffff166000526004602052604060002090565b90613d9190896125ac565b613d9a91612614565b35613dae9190600052602052604060002090565b80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790558963ffffffff80961690613dea91612d1b565b6127109004998b613dfb8c83612450565b9401613e0681612694565b613e0f8b612694565b9560608b01968b613e2089826125ac565b916080019d8e613e2f916125ac565b613e389161263a565b613e4190612694565b92613e4b9561419a565b613e5490612694565b938d613e5f8b612694565b613e698b836125ac565b613e7291612600565b613e7b90612694565b91613e868c826125ac565b613e8f9161263a565b613e9890612694565b93613ea2916125ac565b96613eae98919661451d565b5a613eb891612450565b9116613ec3916124db565b3a613ecd91612d1b565b95613ed882826125ac565b613ee19161263a565b613eea90612694565b73ffffffffffffffffffffffffffffffffffffffff94851694168403613f52575050613f1c94610c11610c1792612694565b03925af18015613f45575b613f2f575050565b81613c1c92903d1061082f5761082081836126ef565b613f4d612bd5565b613f27565b613f1c969492600087613fe3613f7861092261092261091d610bc9879a610d889a6125ac565b613f8185612694565b6040517f23b872dd0000000000000000000000000000000000000000000000000000000080825273ffffffffffffffffffffffffffffffffffffffff909216600482015230602482015260448101999099529793849283919082906064820190565b03925af18015614016575b613ff9575b50612694565b61400f90883d8a1161082f5761082081836126ef565b5038613ff3565b61401e612bd5565b613fee565b614033610e82610b2c88886125ac565b613d4a565b9194939092816020870195863561404e81610462565b73ffffffffffffffffffffffffffffffffffffffff16600052600460205260406000206040890161407f908a6125ac565b61408891612614565b3560005260205260406000206140c39060017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00825416179055565b63ffffffff16906140d391612d1b565b6127109004956140e38784612450565b916140ed87612694565b9160208201976140fc89612694565b93606083019561410c87856125ac565b60808701979161411c89896125ac565b6141259161263a565b61412e90612694565b926141389561419a565b61414190612694565b9761414b90612694565b9161415684826125ac565b61415f91612600565b61416890612694565b93614172916125ac565b61417b9161263a565b61418490612694565b9361418e916125ac565b9661261198919661451d565b9073ffffffffffffffffffffffffffffffffffffffff6000916141c66142279896602098968387614b14565b604051978896879586937f23b872dd0000000000000000000000000000000000000000000000000000000085526004850160409194939294606082019573ffffffffffffffffffffffffffffffffffffffff80921683521660208201520152565b0393165af18015614251575b61423a5750565b613c1c9060203d811161082f5761082081836126ef565b614259612bd5565b614233565b919995929893979490978763ffffffff60408c01978c89614282610b2c82846125ac565b3561441c575b5050169061429591612d1b565b6127109004976142a58982612450565b998b60209d8e809d8183019288886142bc86612694565b9487019e8f6142ca90612694565b93604081016142d8916125ac565b6142e191612614565b35906142ed90896125ac565b6142f691612614565b359061430560808a018a6125ac565b61430e9161263a565b61431790612694565b9461432197614433565b61432a90612694565b6143338a612694565b9061434160808401846125ac565b61434a91612600565b61435390612694565b9260808101614361916125ac565b61436a9161263a565b61437390612694565b9361437d9861451d565b5a61438791612450565b9063ffffffff16614397916124db565b3a6143a191612d1b565b946143af60808201826125ac565b6143b89161263a565b6143c190612694565b73ffffffffffffffffffffffffffffffffffffffff938416931683036143f25750613f1c94610c11610c1792612694565b610d88613f1c969492600087613fe3613f7861092261092261091d610bc98a6080899c01906125ac565b610b2c610e829161442c936125ac565b8c89614288565b919461450a96939794916141c673ffffffffffffffffffffffffffffffffffffffff92600094848716865260209b8c9a60048c52604088209088528b526144a26040882060017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00825416179055565b6144cc8573ffffffffffffffffffffffffffffffffffffffff166000526004602052604060002090565b9087528a526145036040872060017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00825416179055565b8387614b14565b0393165af18015613f4557613f2f575050565b929795947f9f0ef199f3d5fa3ecdee559103421e5ce53b68b3187e374801d79307d145d1eb95614594939892956040519687968752602087015273ffffffffffffffffffffffffffffffffffffffff928392838093166040890152606088015260a0608088015216991697169560a084019161281f565b0390a4565b91909260208401916145af83356109af81610462565b6145bf6109e860408801886125ac565b356000526020526145f9604060002060017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00825416179055565b156146525761048b9361464861464161461185612694565b9461091d85606086019761462589886125ac565b9061463961091d610bc960808c018c6125ac565b9233906149aa565b93826125ac565b94909333916148e2565b61048b9361469d614696614667859695612694565b9561091d85606086019861467b8a886125ac565b9061468f61091d610bc960808c018c6125ac565b92336149aa565b94826125ac565b94909333906148e2565b916146be6126119492604085526040850190612a38565b92602081850391015261281f565b909161048b939261470f602084016146e66109af82612694565b906146ff6109fd60408801936109ee6109e8868b6125ac565b9182156147c2575b505015612f8c565b61472861092261092261091d61091760808801886125ac565b926040805180957ffd2596280000000000000000000000000000000000000000000000000000000082528180614763888888600485016146a7565b03915afa9384156147b5575b6000908195614792575b5061478390612be2565b61478c81612cac565b936147e1565b61478395506147af915060403d8111610f1357610f0581836126ef565b94614779565b6147bd612bd5565b61476f565b6147d89192506134b06109e8610eb792896125ac565b54113880614707565b949192939460208201908135966147f788610462565b73ffffffffffffffffffffffffffffffffffffffff88166000526004602052604060002061482b6109e860408701876125ac565b35600052602052614865604060002060017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00825416179055565b156148a057614890848861487b61048b9a610462565b888861463961091d610bc960808b018b6125ac565b61489a3392612694565b906148e2565b8691506148af61048b97610462565b6148d6846148c3610bc960808701876125ac565b356148cd81610462565b888886336149aa565b6148df82610462565b33905b9094614594907fd1b78f78360698bdfc69fb877fd0dd84d4817dfe3095a8456e6f7ff0f4d511709493979560206149366080870161492081896125ac565b1561499d575b359761493189610462565b6125ac565b60011015614990575b01359061494b82610462565b604051958695865273ffffffffffffffffffffffffffffffffffffffff928392838093166020890152604088015260806060880152169916971695608084019161281f565b6149986124e7565b61493f565b6149a56124e7565b614926565b93926149b99195928686614b14565b73ffffffffffffffffffffffffffffffffffffffff614a0b614a046149fc846149f76149ee60025463ffffffff9060c01c1690565b63ffffffff1690565b612d1b565b612710900490565b8093612450565b921680614a3357505061048b9250600080928192604051915af1614a2d613067565b50614e98565b6040517f23b872dd0000000000000000000000000000000000000000000000000000000080825273ffffffffffffffffffffffffffffffffffffffff87811660048401529590951660248201526044810193909352602094613f1c94869460009190868160648186895af18015614b07575b614aea575b5060405190815273ffffffffffffffffffffffffffffffffffffffff90921660048301523060248301526044820193909352938492839182906064820190565b614b0090873d891161082f5761082081836126ef565b5038614aaa565b614b0f612bd5565b614aa5565b9291909260005b838110614b29575050505050565b8060051b830135907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc18436030182121561000e57614c076001928501614c00614b7761092261092284612694565b60408051907f01ffc9a7000000000000000000000000000000000000000000000000000000009283835260209182846004938180614bdb878201907f80ac58cd00000000000000000000000000000000000000000000000000000000602083019252565b03915afa938415614cc2575b600094614ca3575b5083614c0d575b5050509050614ccf565b8785614d88565b01614b1b565b614c5993508294614c236109226109228a612694565b915180958194829383528201907fd9b67a2600000000000000000000000000000000000000000000000000000000602083019252565b03915afa918215614c96575b600092614c79575b50501580388080614bf6565b614c8f9250803d1061082f5761082081836126ef565b3880614c6d565b614c9e612bd5565b614c65565b614cbb919450833d851161082f5761082081836126ef565b9238614bef565b614cca612bd5565b614be7565b15614cd657565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600b60248201527f6f6e6c79206572633732310000000000000000000000000000000000000000006044820152fd5b9035907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe18136030182121561000e570180359067ffffffffffffffff821161000e57602001918160061b3603831361000e57565b92919260005b6020850190614d9d8287614d34565b9050811015614e9057614dd173ffffffffffffffffffffffffffffffffffffffff8735614dc981610462565b169287614d34565b821015614e83575b823b1561000e576040517f23b872dd00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff858116600483015286166024820152600683901b919091013560448201526001926000908290606490829084905af18015614e76575b614e5d575b5001614d8e565b80614e6a614e70926126ce565b80610411565b38614e56565b614e7e612bd5565b614e51565b614e8b6124e7565b614dd9565b505050509050565b15614e9f57565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f6661696c656420746f2073656e6420657468657220746f2073656c6c657200006044820152fd5b60408101614f0e610bc982846125ac565b3591614f23614f1d83836125ac565b90612649565b3590818414614fbd57614f5d614f42614f3c85846125ac565b90612658565b35614f56614f5086856125ac565b90612667565b3590612450565b908115614fb657614f77614f5061271095614f7e936125ac565b3542612450565b9080821115614fa557505081905b8381811115614f9d57030204900390565b900302040190565b83614fb09202612467565b90614f8c565b5050505090565b5050509056fea26469706673582212201fed3c965173332717e8e04875cdcd9fcab5ae530f3d9840d2cb29aa39dccd6d64736f6c634300080e0033000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc200000000000000000000000031ae855ca3ee0413da86eca2f877ddd0da30e703

Deployed Bytecode

0x60806040526004361015610013575b600080fd5b60003560e01c80630df4239c14610243578063183f17c41461023a57806331e27e271461023157806335659fb8146102285780633f4ba83a1461021f5780634266581e146102165780635c975abb1461020d5780635e35359e1461020457806363f3c034146101fb578063690d8320146101f25780636d947e4b146101e9578063715018a6146101e0578063723d9836146101d757806378759e13146101ce5780638456cb59146101c55780638aff5573146101bc5780638ca793b2146101b35780638da5cb5b146101aa57806398011ac8146101a15780639d9a0cef14610198578063ad5c46481461018f578063bcb47ece14610186578063bd11257c1461017d578063bd545f5314610174578063cb97a8101461016b578063d19b6da314610162578063ed5fd575146101595763f2fde38b1461015157600080fd5b61000e6120c4565b5061000e612087565b5061000e611fcd565b5061000e611ec6565b5061000e611d6c565b5061000e611ccd565b5061000e611c7a565b5061000e611c0a565b5061000e611b17565b5061000e6119eb565b5061000e611998565b5061000e61187b565b5061000e61175b565b5061000e611652565b5061000e6113a4565b5061000e61117f565b5061000e61106c565b5061000e611030565b5061000e610f27565b5061000e610843565b5061000e61070e565b5061000e6106c9565b5061000e61065f565b5061000e610550565b5061000e61050a565b5061000e61048d565b5061000e61041c565b5061000e61027d565b9181601f8401121561000e5782359167ffffffffffffffff831161000e576020808501948460051b01011161000e57565b503461000e5760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261000e5767ffffffffffffffff60043581811161000e576102ce90369060040161024c565b60249291923582811161000e576102e990369060040161024c565b9260443590811161000e5761030290369060040161024c565b9390916103146002600054141561228c565b600260005560019561032d60ff885460a01c16156122f1565b5a936002549261035473ffffffffffffffffffffffffffffffffffffffff85163314612356565b61035f8588146123bb565b61036a8888146123bb565b63ffffffff808560c01c169460a01c16946103b0886103ab7f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2995a90612450565b612467565b9060005b8981106103c7576103c56001600055565b005b8061040b8a8a8f948f8f8a6104038f948f948f94828f8f90826103fd946103f16103f7935a6124db565b9b61255e565b9661255e565b94612d6d565b929091613836565b016103b4565b600091031261000e57565b503461000e5760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261000e57602063ffffffff60025460a01c16604051908152f35b73ffffffffffffffffffffffffffffffffffffffff81160361000e57565b359061048b82610462565b565b503461000e5760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261000e5773ffffffffffffffffffffffffffffffffffffffff6004356104de81610462565b1660005260046020526040600020602435600052602052602060ff604060002054166040519015158152f35b503461000e5760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261000e57602063ffffffff60025460c01c16604051908152f35b503461000e5760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261000e576001546105a43373ffffffffffffffffffffffffffffffffffffffff8316146121b8565b60ff8160a01c1615610601577fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff166001557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa6020604051338152a1005b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f5061757361626c653a206e6f74207061757365640000000000000000000000006044820152fd5b503461000e5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261000e5773ffffffffffffffffffffffffffffffffffffffff6004356106b081610462565b1660005260036020526020604060002054604051908152f35b503461000e5760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261000e57602060ff60015460a01c166040519015158152f35b503461000e5760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261000e5760043561074a81610462565b6024359061075782610462565b7fbfed55bdcd242e3dd0f60ddd7d1e87c67f61c34cd9527b3e6455d841b102536261080360443573ffffffffffffffffffffffffffffffffffffffff80956107a4826001541633146121b8565b1694604051947fa9059cbb000000000000000000000000000000000000000000000000000000008652169384600482015281602482015260208160448160008a5af18015610836575b610808575b506040519081529081906020820190565b0390a3005b6108289060203d811161082f575b61082081836126ef565b810190612d58565b50386107f2565b503d610816565b61083e612bd5565b6107ed565b503461000e577ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc60408136011261000e576004359067ffffffffffffffff9081831161000e5760e090833603011261000e5760243590811161000e576108ad90369060040161024c565b91906108be6002600054141561228c565b60026000556108d560ff60015460a01c16156122f1565b5a926002546108fb73ffffffffffffffffffffffffffffffffffffffff82163314612356565b61093b61092261092261091d61091760848901896004016125ac565b90612600565b612694565b73ffffffffffffffffffffffffffffffffffffffff1690565b946040805180977ff1332a910000000000000000000000000000000000000000000000000000000082528180610979888a8c60040160048501612b0e565b03915afa958615610f1a575b600090600097610ee6575b5061099a90612be2565b610a046109fd6109d56109af60248901612694565b73ffffffffffffffffffffffffffffffffffffffff166000526004602052604060002090565b6109ee6109e860448a018a6004016125ac565b90612614565b35600052602052604060002090565b5460ff1690565b8015610e90575b610a159015612c47565b610a2185600401612cac565b15610b1557826103ab610a36610a3d936124a0565b5a90612450565b926000907f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc29363ffffffff808560a01c169460c01c16925b818110610ae45750505050505050610ada9150806109ee6109e8610aa16109af6024610aaf9601612694565b9260448101906004016125ac565b60017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00825416179055565b6103c56001600055565b600190610b0f8787878d8d610af98e5a6124db565b91610b05888b8d61255e565b91600401906135e9565b01610a75565b9194610b32610b2c604487969701866004016125ac565b9061262b565b35610e6c575b936000946000915b878310610e315750505073ffffffffffffffffffffffffffffffffffffffff939450610bb291610ba663ffffffff610bab93610b9a610aaf610b876109af60248b01612694565b6109ee6109e860448c018c6004016125ac565b60a01c16915a90612450565b6124db565b3a90612d1b565b90610bcf61091d610bc960848401846004016125ac565b9061263a565b7f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2841693168303610cb95791610c17610c789492610c11602460209601612694565b936124db565b6040517f23b872dd00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff909316600484015230602484015260448301529092839190829060009082906064820190565b03925af18015610cac575b610c8e575b50610ada565b610ca59060203d811161082f5761082081836126ef565b5038610c88565b610cb4612bd5565b610c83565b9190610ccb60848401600485016125ac565b610cd49161263a565b610cdd90612694565b73ffffffffffffffffffffffffffffffffffffffff1691610d0060248501612694565b6040517f23b872dd0000000000000000000000000000000000000000000000000000000080825273ffffffffffffffffffffffffffffffffffffffff929092166004820152306024820152604481019690965260209586948590829060649082905a90600091f18015610dc597600093610d8893602493610e24575b610e07575b5001612694565b60405192835273ffffffffffffffffffffffffffffffffffffffff1660048301523060248301526044820193909352938492839182906064820190565b03925af18015610dfa575b610ddc575b5050610ada565b81610df292903d1061082f5761082081836126ef565b503880610dd5565b610e02612bd5565b610dd0565b610e1d90893d8b1161082f5761082081836126ef565b5038610d81565b610e2c612bd5565b610d7c565b909195610e63600191610e5d63ffffffff8760c01c168b610e578c8c600401928961255e565b886136f4565b906124db565b96019190610b40565b610e8b610e82610b2c60448701876004016125ac565b353a1115612cb6565b610b38565b50610a15610ea76109e860448801886004016125ac565b35610edd610eb760248901612694565b73ffffffffffffffffffffffffffffffffffffffff166000526003602052604060002090565b54119050610a0b565b61099a9750610f0d915060403d604011610f13575b610f0581836126ef565b81019061273a565b96610990565b503d610efb565b610f22612bd5565b610985565b503461000e5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261000e57600435610f6381610462565b73ffffffffffffffffffffffffffffffffffffffff610f87816001541633146121b8565b47916000808060405186855af1610f9c613067565b5015610fd2577f94b2de810873337ed265c5f8cf98c9cffefa06b8607f9a2f1fbaebdfbcfbef1c916020916040519485521692a2005b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600660248201527f6661696c656400000000000000000000000000000000000000000000000000006044820152fd5b503461000e5760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261000e5760206040516107d08152f35b503461000e576000807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112611113576001547fffffffffffffffffffffffff000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff8216916110e43384146121b8565b1660015581604051917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08284a3f35b80fd5b60407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc82011261000e5767ffffffffffffffff9160043583811161000e57826111619160040161024c565b9390939260243591821161000e5761117b9160040161024c565b9091565b5061118936611116565b91929060009361119d60028654141561228c565b600285556001916111b560ff845460a01c16156122f1565b6111c08583146123bb565b85946111cc8386612517565b9273ffffffffffffffffffffffffffffffffffffffff6111f761091d610bc9608097888101906125ac565b16958615968715908161134c575b6112176112128585612517565b612cac565b159182159261133d575b508a5b848110611289578b8b8b611243575b5061123e6001600055565b604051f35b61124f81341015613002565b8181341161125e575b50611233565b808061126d6112829434612450565b60405190335af161127c613067565b506130d3565b8181611258565b88906112b66112af61092261091d610bc98d6112a6878d8d61255e565b908101906125ac565b8414612e5d565b6112d66112cf6112ca611212848a8a61255e565b151590565b8514612ec2565b6112fa6112f261092260206112ec858b8b61255e565b01612694565b331415612f27565b61133761131a61131361130e848a8a61255e565b614efd565b809e6124db565b9c61132683898961255e565b611331848b8d612d6d565b916146cc565b01611224565b61134690612df8565b38611221565b6113563415612d93565b611205565b60207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc82011261000e576004359067ffffffffffffffff821161000e5761117b9160040161024c565b506113ae3661135b565b6113bd6002600054141561228c565b60026000556113d460ff60015460a01c16156122f1565b60009173ffffffffffffffffffffffffffffffffffffffff61140961091d610bc96113ff8686612517565b60808101906125ac565b16918215159182611643575b6114226112128383612517565b9182159384611634575b5060005b81811061147357868615611448576103c56001600055565b61145481341015613002565b80341115610ada576000808061126d61146d9434612450565b80610ada565b61156a9661149861149161092261091d610bc96113ff87898b61255e565b8814612e5d565b6114b46114ac6112ca61121285878961255e565b871514612ec2565b6114ca6112f261092260206112ec86888a61255e565b6114fe6109fd6114e36109af60206112ec87898b61255e565b6109ee6109e86114f487898b61255e565b60408101906125ac565b8015611602575b61150f9015612f8c565b604061152b61092261092261091d6109176113ff888a8c61255e565b61153684868861255e565b90825180809c81947f9e0daf5e00000000000000000000000000000000000000000000000000000000835260048301612ff1565b03915afa9788156115f5575b6000906000996115c3575b50600192916115926115bd92612be2565b866115ab6115a461130e86898b61255e565b80936124db565b9a6115b785888a61255e565b90614599565b01611430565b61159299506115bd9150916115e96001949360403d604011610f1357610f0581836126ef565b9a909250509192611581565b6115fd612bd5565b611576565b5061150f6116176109e86114f485878961255e565b3561162b610eb760206112ec87898b61255e565b54119050611505565b61163d90612df8565b3861142c565b61164d3415612d93565b611415565b503461000e5760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261000e57740100000000000000000000000000000000000000007fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff6001546116dd3373ffffffffffffffffffffffffffffffffffffffff8316146121b8565b6116ed60ff8260a01c16156122f1565b16176001557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586020604051338152a1005b7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc602091011261000e5760043563ffffffff8116810361000e5790565b503461000e5761176a3661171e565b61178d73ffffffffffffffffffffffffffffffffffffffff6001541633146121b8565b6107d063ffffffff82161161181d57600280547fffffffff00000000ffffffffffffffffffffffffffffffffffffffffffffffff1660c083901b7bffffffff0000000000000000000000000000000000000000000000001617905560405163ffffffff90911681527f45a5a29d28d3452ca649e48ecb93f018866388cb166efa2f14529862d6c30e1090602090a1005b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f70726f746f636f6c2066656520746f6f206869676800000000000000000000006044820152fd5b503461000e5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261000e576004356118b781610462565b73ffffffffffffffffffffffffffffffffffffffff906118dc826001541633146121b8565b16801561193a57806000917fffffffffffffffffffffffff00000000000000000000000000000000000000006002541617600255604051907f18068b45283315585200a72a30aee7615ec699afcdbe3070b03535c8439c93078383a2f35b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f6d61746368206578656375746f722063616e6e6f7420626520300000000000006044820152fd5b503461000e5760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261000e57602073ffffffffffffffffffffffffffffffffffffffff60015416604051908152f35b503461000e576119fa3661135b565b611a0581151561319d565b60005b818110611a485750611a437ffa0ae5d80fe3763c880a3839fab0294171a6f730d1f82c4cd5392c6f67b4173291604051918291339583613267565b0390a2005b80611a8c611a596001938587612676565b35611a843373ffffffffffffffffffffffffffffffffffffffff166000526003602052604060002090565b541115613138565b611ad6611ad1611acd6109fd611ac23373ffffffffffffffffffffffffffffffffffffffff166000526004602052604060002090565b6109ee86898b612676565b1590565b613202565b611b11610aaf611b063373ffffffffffffffffffffffffffffffffffffffff166000526004602052604060002090565b6109ee848789612676565b01611a08565b503461000e57611b2636611116565b9092611b376002600054141561228c565b6002600055600193611b5060ff865460a01c16156122f1565b5a9160025490611b7773ffffffffffffffffffffffffffffffffffffffff83163314612356565b611b828587146123bb565b63ffffffff808360c01c169260a01c1692611bc3876103ab7f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2975a90612450565b9660005b818110611bd8576103c56001600055565b80611c04888888888f968f8f91611bf7818c6103f7611bfe955a6124db565b928c61255e565b90613392565b01611bc7565b503461000e5760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261000e57602060405173ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2168152f35b503461000e5760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261000e57602073ffffffffffffffffffffffffffffffffffffffff60025416604051908152f35b503461000e5760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261000e576020600435611d0b81610462565b73ffffffffffffffffffffffffffffffffffffffff60243591169060008281526004845260408120828252845260ff604082205416159283611d55575b5050506040519015158152f35b604092935081526003845220541115388080611d48565b503461000e5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261000e57600435336000526003602052611db86040600020548211613138565b336000526003602052620186a06040600020547ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe795f8111611eb9575b01811015611e5b5780611e263373ffffffffffffffffffffffffffffffffffffffff166000526003602052604060002090565b5560405190815233907f1e7178d84f0b0825c65795cd62e7972809ad3aac6917843aaec596161b2c0a97908060208101611a43565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600860248201527f746f6f206d616e790000000000000000000000000000000000000000000000006044820152fd5b611ec1612420565b611df3565b503461000e5760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261000e57600435611f0281610462565b60243567ffffffffffffffff811161000e57611f2290369060040161024c565b90611f326002600054141561228c565b6002600055611f4960ff60015460a01c16156122f1565b73ffffffffffffffffffffffffffffffffffffffff831615611f6f57610ada9233614b14565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600f60248201527f696e76616c6964206164647265737300000000000000000000000000000000006044820152fd5b503461000e57611fdc3661171e565b611fff73ffffffffffffffffffffffffffffffffffffffff6001541633146121b8565b63ffffffff81169062030d40821161000e577f70315b78769d300844b16f6da622ba96060a0bcd294a60299e48b5ac10b53efa916020917fffffffffffffffff00000000ffffffffffffffffffffffffffffffffffffffff77ffffffff00000000000000000000000000000000000000006002549260a01b16911617600255604051908152a1005b503461000e5760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261000e57602060405162030d408152f35b503461000e5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261000e5760043561210081610462565b73ffffffffffffffffffffffffffffffffffffffff612124816001541633146121b8565b811615612134576103c59061221d565b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152fd5b156121bf57565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602060248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152fd5b6001549073ffffffffffffffffffffffffffffffffffffffff80911691827fffffffffffffffffffffffff0000000000000000000000000000000000000000821617600155167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e06000604051a3565b1561229357565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152fd5b156122f857565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f5061757361626c653a20706175736564000000000000000000000000000000006044820152fd5b1561235d57565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f6f6e6c79206d61746368206578656375746f72000000000000000000000000006044820152fd5b156123c257565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f6d69736d617463686564206c656e6774687300000000000000000000000000006044820152fd5b507f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b81811061245b570390565b612463612420565b0390565b8115612471570490565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b614e20907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffb1df81116124cf570190565b6124d7612420565b0190565b811981116124cf570190565b507f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9015612551575b8035907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff218136030182121561000e570190565b6125596124e7565b61251e565b919081101561259f575b60051b810135907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff218136030182121561000e570190565b6125a76124e7565b612568565b9035907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe18136030182121561000e570180359067ffffffffffffffff821161000e57602001918160051b3603831361000e57565b90156126095790565b6126116124e7565b90565b60a09160051015612623570190565b6124d76124e7565b60c09160061015612623570190565b60209160011015612623570190565b60409160021015612623570190565b60809160041015612623570190565b60609160031015612623570190565b9190811015612687575b60051b0190565b61268f6124e7565b612680565b3561261181610462565b507f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b67ffffffffffffffff81116126e257604052565b6126ea61269e565b604052565b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff8211176126e257604052565b8015150361000e57565b919082604091031261000e576020825161275381612730565b92015190565b90357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe18236030181121561000e57016020813591019167ffffffffffffffff821161000e578160051b3603831361000e57565b90918281527f07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff831161000e5760209260051b80928483013701016000815290565b90357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc18236030181121561000e570190565b9082818152602080910193818360051b82010194846000925b858410612849575050505050505090565b909192939495967fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe082820301845261288188846127ed565b6040908183019073ffffffffffffffffffffffffffffffffffffffff81356128a881610462565b168452888101357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe18236030181121561000e57019088823592019367ffffffffffffffff831161000e578260061b3603851361000e57808385938c96876060950152520193916000915b818310612932575050505080600192990194019401929594939190612838565b833586528a8401358b870152948501948a945092830192600190920191612912565b91908082526020809201929160005b828110612971575050505090565b90919293828060019273ffffffffffffffffffffffffffffffffffffffff883561299a81610462565b16815201950193929101612963565b90357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe18236030181121561000e57016020813591019167ffffffffffffffff821161000e57813603831361000e57565b601f82602094937fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0938186528686013760008582860101520116010190565b612611918135612a4781612730565b15158152612a77612a5a60208401610480565b73ffffffffffffffffffffffffffffffffffffffff166020830152565b612b00612af5612ada612abf612aa4612a936040880188612759565b60e0604089015260e08801916127ac565b612ab16060880188612759565b90878303606089015261281f565b612acc6080870187612759565b908683036080880152612954565b612ae760a08601866129a9565b9085830360a08701526129f9565b9260c08101906129a9565b9160c08185039101526129f9565b90612b2190604083526040830190612a38565b926020918281860391015280845281840191808260051b8601019484600080925b858410612b5457505050505050505090565b90919293949596977fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe082820301885288357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff2185360301811215612bd15786612bc160019387839401612a38565b9a01980196959401929190612b42565b8380fd5b506040513d6000823e3d90fd5b15612be957565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f63616e6e6f7420657865637574650000000000000000000000000000000000006044820152fd5b15612c4e57565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f6d616b6572206f726465722065787069726564000000000000000000000000006044820152fd5b3561261181612730565b15612cbd57565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f67617320707269636520746f6f206869676800000000000000000000000000006044820152fd5b807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04821181151516612d4c570290565b612d54612420565b0290565b9081602091031261000e575161261181612730565b909161117b92811015612d86575b60051b8101906125ac565b612d8e6124e7565b612d7b565b15612d9a57565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600d60248201527f6d7367206861732076616c7565000000000000000000000000000000000000006044820152fd5b15612dff57565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f6f6666657273206f6e6c7920696e2045524332300000000000000000000000006044820152fd5b15612e6457565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f63616e6e6f74206d69782063757272656e6369657300000000000000000000006044820152fd5b15612ec957565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f63616e6e6f74206d6978206f72646572207369646573000000000000000000006044820152fd5b15612f2e57565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600d60248201527f6e6f20646f67666f6f64696e67000000000000000000000000000000000000006044820152fd5b15612f9357565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600d60248201527f6f726465722065787069726564000000000000000000000000000000000000006044820152fd5b906020612611928181520190612a38565b1561300957565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f696e73756666696369656e7420746f74616c20707269636500000000000000006044820152fd5b3d156130ce573d9067ffffffffffffffff82116130c1575b604051916130b560207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f84011601846126ef565b82523d6000602084013e565b6130c961269e565b61307f565b606090565b156130da57565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f6661696c65642072657475726e696e67206578636573732045544800000000006044820152fd5b1561313f57565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600d60248201527f6e6f6e636520746f6f206c6f77000000000000000000000000000000000000006044820152fd5b156131a457565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600f60248201527f63616e6e6f7420626520656d70747900000000000000000000000000000000006044820152fd5b1561320957565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f6e6f6e636520616c72656164792065786563206f722063616e63656c6c6564006044820152fd5b9160206126119381815201916127ac565b919082608091031261000e57815161328f81612730565b916020810151916060604083015192015190565b90916132ba61261193604084526040840190612a38565b916020818403910152612a38565b156132cf57565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f73656c6c206f72646572206578706972656400000000000000000000000000006044820152fd5b1561333457565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f627579206f7264657220657870697265640000000000000000000000000000006044820152fd5b9161048b959493926133a381612cac565b1561352557916133c06109228061091d61091760808801886125ac565b92608060405180957fd9814ac500000000000000000000000000000000000000000000000000000000825281806133fb8787600484016132a3565b03915afa938415613518575b600080809281976134df575b5061341d90612be2565b613459602084016134306109af82612694565b906134496109fd60408801936109ee6109e8868b6125ac565b9182156134c0575b5050156132c8565b6134956020850161346c6109af82612694565b906134856109fd60408901936109ee6109e8868c6125ac565b91821561349a575b50501561332d565b61391a565b6134b79192506134b06109e8610eb7928a6125ac565b3592612694565b5411388061348d565b6134d69192506134b06109e8610eb792896125ac565b54113880613451565b91505061341d9550613508915060803d8111613511575b61350081836126ef565b810190613278565b96909290613413565b503d6134f6565b613520612bd5565b613407565b6133c061092261092261091d610917856113ff565b90916135586126119360008452606060208501526060840190612a38565b916040818403910152612a38565b90916135586126119360018452606060208501526060840190612a38565b1561358b57565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f6f72646572206e6f7420766572696669656400000000000000000000000000006044820152fd5b9161048b969594939161360b61092261092261091d61091760808601866125ac565b6040805180927f83d12146000000000000000000000000000000000000000000000000000000008252818061364488886004840161353a565b03915afa9081156136e7575b60009081926136c4575b5061366490613584565b61369f602084016136776109af82612694565b906136906109fd60408801936109ee6109e8868b6125ac565b9182156136ae5750501561332d565b6136a883614efd565b94613d29565b6134b79192506134b06109e8610eb792896125ac565b61366492506136e1915060403d8111610f1357610f0581836126ef565b9161365a565b6136ef612bd5565b613650565b9091612611939261371461092261092261091d61091760808601866125ac565b926040805180957f83d12146000000000000000000000000000000000000000000000000000000008252818061374e888860048401613566565b03915afa9384156137f1575b60009081956137ce575b5061376e90613584565b6137a9602083016137816109af82612694565b9061379a6109fd60408701936109ee6109e8868a6125ac565b9182156137b8575050156132c8565b6137b282614efd565b93614038565b6134d69192506134b06109e8610eb792886125ac565b61376e95506137eb915060403d8111610f1357610f0581836126ef565b94613764565b6137f9612bd5565b61375a565b9290612611949261381a61382892606087526060870190612a38565b908582036020870152612a38565b92604081850391015261281f565b92909161048b979695949261385a61092261092261091d61091760808a018a6125ac565b94608060405180977f950c52bb000000000000000000000000000000000000000000000000000000008252818061389789898989600486016137fe565b03915afa95861561390d575b600080809281996138e4575b506138b990612be2565b6138cc602084016134306109af82612694565b6138df6020850161346c6109af82612694565b61425e565b9150506138b99750613904915060803d81116135115761350081836126ef565b989092906138af565b613915612bd5565b6138a3565b979692959385879560408701613933610b2c828a6125ac565b35613d14575b61394560208701612694565b61396f9073ffffffffffffffffffffffffffffffffffffffff166000526004602052604060002090565b61397c60408801886125ac565b61398591612614565b356139999190600052602052604060002090565b80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790556139ce60208901612694565b6139f89073ffffffffffffffffffffffffffffffffffffffff166000526004602052604060002090565b90613a0390896125ac565b613a0c91612614565b35613a209190600052602052604060002090565b80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600117905563ffffffff1690613a5991612d1b565b612710900498613a698a88612450565b92613a7660208601612694565b613a8260208901612694565b613a8f60608801886125ac565b91613a9993614b14565b613aa660808801886125ac565b613aaf9161263a565b613ab890612694565b73ffffffffffffffffffffffffffffffffffffffff16613ada60208901612694565b94613ae760208801612694565b6040517f23b872dd00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9788166004820152961660248701526044860152846064815a602094600091f191821598610bab98613b71602063ffffffff99613bba99610a3698613bc29f613d07575b613cf1575001612694565b613b7d60208301612694565b613b9061091d61091760808601866125ac565b91613bb2613ba761091d610bc960808801886125ac565b9460608101906125ac565b97909661451d565b9116906124db565b90613bd661091d610bc960808401846125ac565b73ffffffffffffffffffffffffffffffffffffffff93841693168303613c445791610c17613c0c9492610c116020809601612694565b03925af18015613c37575b613c1f575b50565b613c1c9060203d60201161082f5761082081836126ef565b613c3f612bd5565b613c17565b91613c78602084613cdc82613c0c98613c6d61092261092261091d610bc96080879e01896125ac565b613c78838601612694565b60006040518096819582947f23b872dd00000000000000000000000000000000000000000000000000000000845230906004850160409194939294606082019573ffffffffffffffffffffffffffffffffffffffff80921683521660208201520152565b03925af18015613d0757613cf1575001612694565b610e1d90833d851161082f5761082081836126ef565b613d0f612bd5565b613b66565b613d24610e82610b2c838b6125ac565b613939565b9583979198949392936040840194613d44610b2c87876125ac565b35614023575b60209a8b998a870197613d5c89612694565b613d869073ffffffffffffffffffffffffffffffffffffffff166000526004602052604060002090565b90613d9190896125ac565b613d9a91612614565b35613dae9190600052602052604060002090565b80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790558963ffffffff80961690613dea91612d1b565b6127109004998b613dfb8c83612450565b9401613e0681612694565b613e0f8b612694565b9560608b01968b613e2089826125ac565b916080019d8e613e2f916125ac565b613e389161263a565b613e4190612694565b92613e4b9561419a565b613e5490612694565b938d613e5f8b612694565b613e698b836125ac565b613e7291612600565b613e7b90612694565b91613e868c826125ac565b613e8f9161263a565b613e9890612694565b93613ea2916125ac565b96613eae98919661451d565b5a613eb891612450565b9116613ec3916124db565b3a613ecd91612d1b565b95613ed882826125ac565b613ee19161263a565b613eea90612694565b73ffffffffffffffffffffffffffffffffffffffff94851694168403613f52575050613f1c94610c11610c1792612694565b03925af18015613f45575b613f2f575050565b81613c1c92903d1061082f5761082081836126ef565b613f4d612bd5565b613f27565b613f1c969492600087613fe3613f7861092261092261091d610bc9879a610d889a6125ac565b613f8185612694565b6040517f23b872dd0000000000000000000000000000000000000000000000000000000080825273ffffffffffffffffffffffffffffffffffffffff909216600482015230602482015260448101999099529793849283919082906064820190565b03925af18015614016575b613ff9575b50612694565b61400f90883d8a1161082f5761082081836126ef565b5038613ff3565b61401e612bd5565b613fee565b614033610e82610b2c88886125ac565b613d4a565b9194939092816020870195863561404e81610462565b73ffffffffffffffffffffffffffffffffffffffff16600052600460205260406000206040890161407f908a6125ac565b61408891612614565b3560005260205260406000206140c39060017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00825416179055565b63ffffffff16906140d391612d1b565b6127109004956140e38784612450565b916140ed87612694565b9160208201976140fc89612694565b93606083019561410c87856125ac565b60808701979161411c89896125ac565b6141259161263a565b61412e90612694565b926141389561419a565b61414190612694565b9761414b90612694565b9161415684826125ac565b61415f91612600565b61416890612694565b93614172916125ac565b61417b9161263a565b61418490612694565b9361418e916125ac565b9661261198919661451d565b9073ffffffffffffffffffffffffffffffffffffffff6000916141c66142279896602098968387614b14565b604051978896879586937f23b872dd0000000000000000000000000000000000000000000000000000000085526004850160409194939294606082019573ffffffffffffffffffffffffffffffffffffffff80921683521660208201520152565b0393165af18015614251575b61423a5750565b613c1c9060203d811161082f5761082081836126ef565b614259612bd5565b614233565b919995929893979490978763ffffffff60408c01978c89614282610b2c82846125ac565b3561441c575b5050169061429591612d1b565b6127109004976142a58982612450565b998b60209d8e809d8183019288886142bc86612694565b9487019e8f6142ca90612694565b93604081016142d8916125ac565b6142e191612614565b35906142ed90896125ac565b6142f691612614565b359061430560808a018a6125ac565b61430e9161263a565b61431790612694565b9461432197614433565b61432a90612694565b6143338a612694565b9061434160808401846125ac565b61434a91612600565b61435390612694565b9260808101614361916125ac565b61436a9161263a565b61437390612694565b9361437d9861451d565b5a61438791612450565b9063ffffffff16614397916124db565b3a6143a191612d1b565b946143af60808201826125ac565b6143b89161263a565b6143c190612694565b73ffffffffffffffffffffffffffffffffffffffff938416931683036143f25750613f1c94610c11610c1792612694565b610d88613f1c969492600087613fe3613f7861092261092261091d610bc98a6080899c01906125ac565b610b2c610e829161442c936125ac565b8c89614288565b919461450a96939794916141c673ffffffffffffffffffffffffffffffffffffffff92600094848716865260209b8c9a60048c52604088209088528b526144a26040882060017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00825416179055565b6144cc8573ffffffffffffffffffffffffffffffffffffffff166000526004602052604060002090565b9087528a526145036040872060017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00825416179055565b8387614b14565b0393165af18015613f4557613f2f575050565b929795947f9f0ef199f3d5fa3ecdee559103421e5ce53b68b3187e374801d79307d145d1eb95614594939892956040519687968752602087015273ffffffffffffffffffffffffffffffffffffffff928392838093166040890152606088015260a0608088015216991697169560a084019161281f565b0390a4565b91909260208401916145af83356109af81610462565b6145bf6109e860408801886125ac565b356000526020526145f9604060002060017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00825416179055565b156146525761048b9361464861464161461185612694565b9461091d85606086019761462589886125ac565b9061463961091d610bc960808c018c6125ac565b9233906149aa565b93826125ac565b94909333916148e2565b61048b9361469d614696614667859695612694565b9561091d85606086019861467b8a886125ac565b9061468f61091d610bc960808c018c6125ac565b92336149aa565b94826125ac565b94909333906148e2565b916146be6126119492604085526040850190612a38565b92602081850391015261281f565b909161048b939261470f602084016146e66109af82612694565b906146ff6109fd60408801936109ee6109e8868b6125ac565b9182156147c2575b505015612f8c565b61472861092261092261091d61091760808801886125ac565b926040805180957ffd2596280000000000000000000000000000000000000000000000000000000082528180614763888888600485016146a7565b03915afa9384156147b5575b6000908195614792575b5061478390612be2565b61478c81612cac565b936147e1565b61478395506147af915060403d8111610f1357610f0581836126ef565b94614779565b6147bd612bd5565b61476f565b6147d89192506134b06109e8610eb792896125ac565b54113880614707565b949192939460208201908135966147f788610462565b73ffffffffffffffffffffffffffffffffffffffff88166000526004602052604060002061482b6109e860408701876125ac565b35600052602052614865604060002060017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00825416179055565b156148a057614890848861487b61048b9a610462565b888861463961091d610bc960808b018b6125ac565b61489a3392612694565b906148e2565b8691506148af61048b97610462565b6148d6846148c3610bc960808701876125ac565b356148cd81610462565b888886336149aa565b6148df82610462565b33905b9094614594907fd1b78f78360698bdfc69fb877fd0dd84d4817dfe3095a8456e6f7ff0f4d511709493979560206149366080870161492081896125ac565b1561499d575b359761493189610462565b6125ac565b60011015614990575b01359061494b82610462565b604051958695865273ffffffffffffffffffffffffffffffffffffffff928392838093166020890152604088015260806060880152169916971695608084019161281f565b6149986124e7565b61493f565b6149a56124e7565b614926565b93926149b99195928686614b14565b73ffffffffffffffffffffffffffffffffffffffff614a0b614a046149fc846149f76149ee60025463ffffffff9060c01c1690565b63ffffffff1690565b612d1b565b612710900490565b8093612450565b921680614a3357505061048b9250600080928192604051915af1614a2d613067565b50614e98565b6040517f23b872dd0000000000000000000000000000000000000000000000000000000080825273ffffffffffffffffffffffffffffffffffffffff87811660048401529590951660248201526044810193909352602094613f1c94869460009190868160648186895af18015614b07575b614aea575b5060405190815273ffffffffffffffffffffffffffffffffffffffff90921660048301523060248301526044820193909352938492839182906064820190565b614b0090873d891161082f5761082081836126ef565b5038614aaa565b614b0f612bd5565b614aa5565b9291909260005b838110614b29575050505050565b8060051b830135907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc18436030182121561000e57614c076001928501614c00614b7761092261092284612694565b60408051907f01ffc9a7000000000000000000000000000000000000000000000000000000009283835260209182846004938180614bdb878201907f80ac58cd00000000000000000000000000000000000000000000000000000000602083019252565b03915afa938415614cc2575b600094614ca3575b5083614c0d575b5050509050614ccf565b8785614d88565b01614b1b565b614c5993508294614c236109226109228a612694565b915180958194829383528201907fd9b67a2600000000000000000000000000000000000000000000000000000000602083019252565b03915afa918215614c96575b600092614c79575b50501580388080614bf6565b614c8f9250803d1061082f5761082081836126ef565b3880614c6d565b614c9e612bd5565b614c65565b614cbb919450833d851161082f5761082081836126ef565b9238614bef565b614cca612bd5565b614be7565b15614cd657565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600b60248201527f6f6e6c79206572633732310000000000000000000000000000000000000000006044820152fd5b9035907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe18136030182121561000e570180359067ffffffffffffffff821161000e57602001918160061b3603831361000e57565b92919260005b6020850190614d9d8287614d34565b9050811015614e9057614dd173ffffffffffffffffffffffffffffffffffffffff8735614dc981610462565b169287614d34565b821015614e83575b823b1561000e576040517f23b872dd00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff858116600483015286166024820152600683901b919091013560448201526001926000908290606490829084905af18015614e76575b614e5d575b5001614d8e565b80614e6a614e70926126ce565b80610411565b38614e56565b614e7e612bd5565b614e51565b614e8b6124e7565b614dd9565b505050509050565b15614e9f57565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f6661696c656420746f2073656e6420657468657220746f2073656c6c657200006044820152fd5b60408101614f0e610bc982846125ac565b3591614f23614f1d83836125ac565b90612649565b3590818414614fbd57614f5d614f42614f3c85846125ac565b90612658565b35614f56614f5086856125ac565b90612667565b3590612450565b908115614fb657614f77614f5061271095614f7e936125ac565b3542612450565b9080821115614fa557505081905b8381811115614f9d57030204900390565b900302040190565b83614fb09202612467565b90614f8c565b5050505090565b5050509056fea26469706673582212201fed3c965173332717e8e04875cdcd9fcab5ae530f3d9840d2cb29aa39dccd6d64736f6c634300080e0033

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

000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc200000000000000000000000031ae855ca3ee0413da86eca2f877ddd0da30e703

-----Decoded View---------------
Arg [0] : _weth (address): 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2
Arg [1] : _matchExecutor (address): 0x31ae855ca3Ee0413dA86eCA2f877ddd0dA30e703

-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2
Arg [1] : 00000000000000000000000031ae855ca3ee0413da86eca2f877ddd0da30e703


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading
[ Download: CSV Export  ]

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.