ETH Price: $2,690.77 (-0.23%)

Contract

0x0e97C887b61cCd952a53578B04763E7134429e05
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Zap218634082025-02-17 3:24:594 hrs ago1739762699IN
KyberSwap: KSZapRouter v2
0 ETH0.000656551.25144231
Zap218633192025-02-17 3:07:115 hrs ago1739761631IN
KyberSwap: KSZapRouter v2
0.0141731 ETH0.000654961.10397843
Zap218630352025-02-17 2:09:596 hrs ago1739758199IN
KyberSwap: KSZapRouter v2
0 ETH0.000724411.18007987
Zap218618472025-02-16 22:09:5910 hrs ago1739743799IN
KyberSwap: KSZapRouter v2
0 ETH0.002130482.7930745
Zap218606722025-02-16 18:13:2314 hrs ago1739729603IN
KyberSwap: KSZapRouter v2
0 ETH0.002063582.68807108
Zap218600162025-02-16 16:01:2316 hrs ago1739721683IN
KyberSwap: KSZapRouter v2
0.05646625 ETH0.000890991.19824041
Zap218599392025-02-16 15:45:4716 hrs ago1739720747IN
KyberSwap: KSZapRouter v2
0.03 ETH0.00196971.78534212
Zap218584442025-02-16 10:44:4721 hrs ago1739702687IN
KyberSwap: KSZapRouter v2
0.01 ETH0.000695220.70478353
Zap218573072025-02-16 6:55:2325 hrs ago1739688923IN
KyberSwap: KSZapRouter v2
0.00215692 ETH0.001639832.69933455
Zap218572942025-02-16 6:52:4725 hrs ago1739688767IN
KyberSwap: KSZapRouter v2
0.00673786 ETH0.0024242.67578172
Zap218550322025-02-15 23:15:5933 hrs ago1739661359IN
KyberSwap: KSZapRouter v2
0 ETH0.00052710.71799588
Zap218550172025-02-15 23:12:5933 hrs ago1739661179IN
KyberSwap: KSZapRouter v2
0 ETH0.000542670.7585839
Zap218537352025-02-15 18:53:2337 hrs ago1739645603IN
KyberSwap: KSZapRouter v2
0.02 ETH0.000599670.77370159
Zap218534082025-02-15 17:47:1138 hrs ago1739641631IN
KyberSwap: KSZapRouter v2
0 ETH0.000624960.83414335
Zap218533092025-02-15 17:27:2338 hrs ago1739640443IN
KyberSwap: KSZapRouter v2
0 ETH0.000638450.91782078
Zap218533072025-02-15 17:26:5938 hrs ago1739640419IN
KyberSwap: KSZapRouter v2
0.042 ETH0.000614070.82495358
Zap218517042025-02-15 12:03:5944 hrs ago1739621039IN
KyberSwap: KSZapRouter v2
0.25 ETH0.001283191.27501914
Zap218516652025-02-15 11:55:2344 hrs ago1739620523IN
KyberSwap: KSZapRouter v2
0 ETH0.001090871.27481633
Zap218479492025-02-14 23:25:472 days ago1739575547IN
KyberSwap: KSZapRouter v2
0.006 ETH0.002166462.87349379
Zap218472812025-02-14 21:09:352 days ago1739567375IN
KyberSwap: KSZapRouter v2
0 ETH0.001367771.3319432
Zap218426462025-02-14 5:33:593 days ago1739511239IN
KyberSwap: KSZapRouter v2
0 ETH0.000884431.29431551
Zap218426252025-02-14 5:29:233 days ago1739510963IN
KyberSwap: KSZapRouter v2
0 ETH0.000785191.2609444
Zap218416572025-02-14 2:14:473 days ago1739499287IN
KyberSwap: KSZapRouter v2
0.01583194 ETH0.000987971.29512632
Zap218399302025-02-13 20:25:473 days ago1739478347IN
KyberSwap: KSZapRouter v2
0.005 ETH0.001106921.38814026
Zap218398852025-02-13 20:16:353 days ago1739477795IN
KyberSwap: KSZapRouter v2
0 ETH0.000737180.90810071
View all transactions

Latest 25 internal transactions (View All)

Advanced mode:
Parent Transaction Hash Block
From
To
218633192025-02-17 3:07:115 hrs ago1739761631
KyberSwap: KSZapRouter v2
0.0141731 ETH
218600162025-02-16 16:01:2316 hrs ago1739721683
KyberSwap: KSZapRouter v2
0.05646625 ETH
218599392025-02-16 15:45:4716 hrs ago1739720747
KyberSwap: KSZapRouter v2
0.03 ETH
218584442025-02-16 10:44:4721 hrs ago1739702687
KyberSwap: KSZapRouter v2
0.01 ETH
218573072025-02-16 6:55:2325 hrs ago1739688923
KyberSwap: KSZapRouter v2
0.00215692 ETH
218572942025-02-16 6:52:4725 hrs ago1739688767
KyberSwap: KSZapRouter v2
0.00673786 ETH
218537352025-02-15 18:53:2337 hrs ago1739645603
KyberSwap: KSZapRouter v2
0.02 ETH
218533072025-02-15 17:26:5938 hrs ago1739640419
KyberSwap: KSZapRouter v2
0.042 ETH
218517042025-02-15 12:03:5944 hrs ago1739621039
KyberSwap: KSZapRouter v2
0.25 ETH
218479492025-02-14 23:25:472 days ago1739575547
KyberSwap: KSZapRouter v2
0.006 ETH
218416572025-02-14 2:14:473 days ago1739499287
KyberSwap: KSZapRouter v2
0.01583194 ETH
218399302025-02-13 20:25:473 days ago1739478347
KyberSwap: KSZapRouter v2
0.005 ETH
218363162025-02-13 8:17:354 days ago1739434655
KyberSwap: KSZapRouter v2
0.00732633 ETH
218336992025-02-12 23:30:354 days ago1739403035
KyberSwap: KSZapRouter v2
0.01 ETH
218193792025-02-10 23:23:476 days ago1739229827
KyberSwap: KSZapRouter v2
0.0033 ETH
218191212025-02-10 22:31:476 days ago1739226707
KyberSwap: KSZapRouter v2
0.0033 ETH
218175392025-02-10 17:13:596 days ago1739207639
KyberSwap: KSZapRouter v2
0.0302 ETH
218174752025-02-10 17:01:116 days ago1739206871
KyberSwap: KSZapRouter v2
0.0305 ETH
218145562025-02-10 7:14:237 days ago1739171663
KyberSwap: KSZapRouter v2
0.008 ETH
218084732025-02-09 10:51:357 days ago1739098295
KyberSwap: KSZapRouter v2
0.0309 ETH
218083422025-02-09 10:25:117 days ago1739096711
KyberSwap: KSZapRouter v2
0.0309 ETH
218082892025-02-09 10:14:357 days ago1739096075
KyberSwap: KSZapRouter v2
0.0309 ETH
218082812025-02-09 10:12:597 days ago1739095979
KyberSwap: KSZapRouter v2
0.0618 ETH
218025882025-02-08 15:07:358 days ago1739027255
KyberSwap: KSZapRouter v2
0.00240083 ETH
218025542025-02-08 15:00:478 days ago1739026847
KyberSwap: KSZapRouter v2
0.005 ETH
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
KSZapRouterPosition

Compiler Version
v0.8.9+commit.e5eed63a

Optimization Enabled:
Yes with 200 runs

Other Settings:
london EvmVersion, MIT license
File 1 of 25 : KSZapRouterPosition.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.9;

import {IKSZapRouterPosition} from 'contracts/interfaces/IKSZapRouterPosition.sol';
import {IZapValidator} from 'contracts/interfaces/zap/validators/IZapValidator.sol';
import {IZapExecutorPosition} from 'contracts/interfaces/zap/executors/IZapExecutorPosition.sol';
import {IZapDexEnum} from 'contracts/interfaces/zap/common/IZapDexEnum.sol';

import {KSRescueV2} from 'ks-growth-utils-sc/contracts/KSRescueV2.sol';
import {ReentrancyGuard} from 'openzeppelin/contracts/security/ReentrancyGuard.sol';

import {IERC20} from 'openzeppelin/contracts/token/ERC20/IERC20.sol';
import {SafeERC20} from 'openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol';
import {IERC721} from 'openzeppelin/contracts/token/ERC721/IERC721.sol';
import {IERC1155} from 'openzeppelin/contracts/token/ERC1155/IERC1155.sol';

/// @notice Main KyberSwap Zap Router to allow users zapping into any dexes
/// It uses Validator to validate the zap result with flexibility, to enable adding more dexes
contract KSZapRouterPosition is IKSZapRouterPosition, IZapDexEnum, KSRescueV2, ReentrancyGuard {
  using SafeERC20 for IERC20;

  address private constant ETH_ADDRESS = address(0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE);

  mapping(address => bool) public whitelistedExecutor;
  mapping(address => bool) public whitelistedValidator;

  modifier checkDeadline(uint32 _deadline) {
    require(block.timestamp <= _deadline, 'ZapRouter: expired');
    _;
  }

  constructor() {}

  /// @notice Whitelist executors by the owner, can grant or revoke
  function whitelistExecutors(
    address[] calldata _executors,
    bool _grantOrRevoke
  ) external onlyOwner {
    for (uint256 i = 0; i < _executors.length; i++) {
      whitelistedExecutor[_executors[i]] = _grantOrRevoke;
      emit ExecutorWhitelisted(_executors[i], _grantOrRevoke);
    }
  }

  /// @notice Whitelist validators by the owner, can grant or revoke
  function whitelistValidators(
    address[] calldata _validators,
    bool _grantOrRevoke
  ) external onlyOwner {
    for (uint256 i = 0; i < _validators.length; i++) {
      whitelistedValidator[_validators[i]] = _grantOrRevoke;
      emit ValidatorWhitelisted(_validators[i], _grantOrRevoke);
    }
  }

  /// @inheritdoc IKSZapRouterPosition
  function zap(
    ZapDescription calldata _desc,
    ZapExecutionData calldata _exe
  )
    external
    payable
    override
    whenNotPaused
    nonReentrant
    checkDeadline(_exe.deadline)
    returns (bytes memory zapResults)
  {
    uint8 dexType = uint8(_desc.zapFlags >> 8);
    uint8 srcType = uint8(_desc.zapFlags);

    require(whitelistedExecutor[_exe.executor], 'ZapRouter: non whitelisted executor');

    // handle src token collection
    if (srcType == uint8(SrcType.ERC20Token)) {
      _handleCollectERC20Tokens(_desc.srcInfo, _exe.executor);
    } else if (srcType == uint8(SrcType.ERC721Token)) {
      _handleCollectERC721Tokens(_desc.srcInfo, _exe.executor);
    } else if (srcType == uint8(SrcType.ERC1155Token)) {
      _handleCollectERC1155Tokens(_desc.srcInfo, _exe.executor);
    }

    // prepare validation data
    bytes memory initialData;
    if (_exe.validator != address(0)) {
      require(whitelistedValidator[_exe.validator], 'ZapRouter: non whitelisted validator');
      initialData = IZapValidator(_exe.validator).prepareValidationData(dexType, _desc.zapInfo);
    }

    // calling executor to execute the zap logic
    zapResults = IZapExecutorPosition(_exe.executor).executeZap{value: msg.value}(_exe.executorData);

    // validate data after zapping if needed
    if (_exe.validator != address(0)) {
      bool isValid = IZapValidator(_exe.validator).validateData(
        dexType, _desc.extraData, initialData, zapResults
      );
      require(isValid, 'ZapRouter: validation failed');
    }

    emit ZapExecuted(
      dexType,
      _desc.srcInfo,
      _exe.validator,
      _exe.executor,
      _desc.zapInfo,
      _desc.extraData,
      initialData,
      zapResults
    );
    emit ClientData(_exe.clientData);
  }

  /// @notice Handle collecting ERC20 tokens and transfer to executor
  function _handleCollectERC20Tokens(bytes memory _srcInfo, address _executor) internal {
    ERC20SrcInfo memory src = abi.decode(_srcInfo, (ERC20SrcInfo));
    require(
      src.tokens.length == src.amounts.length && src.tokens.length > 0, 'ZapRouter: invalid data'
    );
    uint256 msgValue = msg.value;
    address msgSender = msg.sender;
    for (uint256 i = 0; i < src.tokens.length;) {
      if (src.tokens[i] == ETH_ADDRESS) {
        // native token, should appear only once with correct msg.value
        require(msgValue > 0 && msgValue == src.amounts[i], 'ZapRouter: invalid msg value');
        msgValue = 0;
      } else {
        IERC20(src.tokens[i]).safeTransferFrom(msgSender, _executor, src.amounts[i]);
      }
      emit ERC20Collected(src.tokens[i], src.amounts[i]);
      unchecked {
        ++i;
      }
    }
    require(msgValue == 0, 'ZapRouter: invalid msg value');
  }

  /// @notice Handle collecting ERC721 token and transfer to executor
  function _handleCollectERC721Tokens(bytes memory _srcInfo, address _executor) internal {
    require(msg.value == 0, 'ZapRouter: invalid msg value');
    ERC721SrcInfo memory src = abi.decode(_srcInfo, (ERC721SrcInfo));
    require(src.tokens.length == src.ids.length && src.tokens.length > 0, 'ZapRouter: invalid data');
    for (uint256 i = 0; i < src.tokens.length;) {
      IERC721(src.tokens[i]).safeTransferFrom(msg.sender, _executor, src.ids[i]);
      emit ERC721Collected(src.tokens[i], src.ids[i]);
      unchecked {
        ++i;
      }
    }
  }

  /// @notice Handle collecting ERC1155 token and transfer to executor
  function _handleCollectERC1155Tokens(bytes memory _srcInfo, address _executor) internal {
    require(msg.value == 0, 'ZapRouter: invalid msg value');
    ERC1155SrcInfo memory src = abi.decode(_srcInfo, (ERC1155SrcInfo));
    require(src.tokens.length > 0 && src.tokens.length == src.ids.length, 'ZapRouter: invalid data');
    require(src.tokens.length == src.amounts.length, 'ZapRouter: invalid data');
    require(src.tokens.length == src.datas.length, 'ZapRouter: invalid data');
    for (uint256 i = 0; i < src.tokens.length;) {
      IERC1155(src.tokens[i]).safeTransferFrom(
        msg.sender, _executor, src.ids[i], src.amounts[i], src.datas[i]
      );
      emit ERC1155Collected(src.tokens[i], src.ids[i], src.amounts[i]);
      unchecked {
        ++i;
      }
    }
  }
}

File 2 of 25 : IKSZapRouterPosition.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.9;

interface IKSZapRouterPosition {
  event ClientData(bytes _clientData);
  event ZapExecuted(
    uint8 indexed _dexType,
    bytes indexed _srcInfo,
    address _validator,
    address _executor,
    bytes _zapInfo,
    bytes _extraData,
    bytes _initialData,
    bytes _zapResults
  );
  event ExecutorWhitelisted(address indexed _executor, bool indexed _grantOrRevoke);
  event ValidatorWhitelisted(address indexed _validator, bool indexed _grantOrRevoke);
  event ERC20Collected(address indexed _token, uint256 indexed _amount);
  event ERC721Collected(address indexed _token, uint256 indexed _id);
  event ERC1155Collected(address indexed _token, uint256 indexed _id, uint256 indexed _amount);

  /// @dev Contains general data for zapping and validation
  /// @param zapFlags packed value of dexType (uint8) | srcType (uint8)
  /// @param srcInfo src position info
  /// @param zapInfo extra info, depends on each dex type
  /// @param extraData extra data to be used for validation
  struct ZapDescription {
    uint16 zapFlags;
    bytes srcInfo;
    bytes zapInfo;
    bytes extraData;
  }

  /// @dev Contains execution data for zapping
  /// @param validator validator address, must be whitelisted one
  /// @param executor zap executor address, must be whitelisted one
  /// @param deadline make sure the request is not expired yet
  /// @param executorData data for zap execution
  /// @param clientData for events and tracking purposes
  struct ZapExecutionData {
    address validator;
    address executor;
    uint32 deadline;
    bytes executorData;
    bytes clientData;
  }

  /// @dev Contains address and function for the delegatecall
  /// @param helper helper address
  /// @param funcSelector helper function
  struct DelegatecallData {
    address helper;
    bytes4 funcSelector;
  }

  struct ERC20SrcInfo {
    address[] tokens;
    uint256[] amounts;
  }

  struct ERC721SrcInfo {
    address[] tokens;
    uint256[] ids;
  }

  struct ERC1155SrcInfo {
    address[] tokens;
    uint256[] ids;
    uint256[] amounts;
    bytes[] datas;
  }

  /// @notice collect token, execute and validate zap
  function zap(
    ZapDescription calldata _desc,
    ZapExecutionData calldata _exe
  ) external payable returns (bytes memory zapResults);

  function whitelistExecutors(address[] calldata _executors, bool _grantOrRevoke) external;
  function whitelistValidators(address[] calldata _validators, bool _grantOrRevoke) external;
}

File 3 of 25 : IZapValidator.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.9;

import {IZapDexEnum} from 'contracts/interfaces/zap/common/IZapDexEnum.sol';

interface IZapValidator is IZapDexEnum {
  function prepareValidationData(
    uint8 _dexType,
    bytes calldata _zapInfo
  ) external view returns (bytes memory validationData);

  function validateData(
    uint8 _dexType,
    bytes calldata _extraData,
    bytes calldata _initialData,
    bytes calldata _zapResults
  ) external view returns (bool isValid);
}

File 4 of 25 : IZapExecutorPosition.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.9;

interface IZapExecutorPosition {
  // @notice Function execute zap
  /// @param _executorData bytes data and will be decoded into corresponding data depends on dex type
  /// @return zapResults result of the zap, depend on dex type
  function executeZap(
    bytes calldata _executorData
  ) external payable returns (bytes memory zapResults);
}

File 5 of 25 : IZapDexEnum.sol
// SPDX-License-Identifier: MIT
pragma solidity >= 0.8.0;

interface IZapDexEnum {
  enum DexType {
    UniswapV2,
    UniswapV3
  }
  enum SrcType {
    ERC20Token,
    ERC721Token,
    ERC1155Token
  }
}

File 6 of 25 : KSRescueV2.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import {KSRescue} from '@src/KSRescue.sol';
import {IERC721} from '@openzeppelin/contracts/token/ERC721/IERC721.sol';
import {IERC1155} from '@openzeppelin/contracts/token/ERC1155/IERC1155.sol';

abstract contract KSRescueV2 is KSRescue {
  function rescueBatchERC721(
    address token,
    uint256[] calldata _ids,
    address recipient
  ) external onlyOwner {
    require(recipient != address(0), 'KSRescue: invalid recipient');
    for (uint256 i = 0; i < _ids.length; i++) {
      IERC721(token).transferFrom(address(this), recipient, _ids[i]);
    }
  }

  function rescueBatchERC1155(
    address token,
    uint256[] calldata ids,
    uint256[] memory amounts,
    bytes calldata data,
    address recipient
  ) external onlyOwner {
    require(recipient != address(0), 'KSRescue: invalid recipient');
    require(ids.length == amounts.length, 'KSRescue: invalid array length');
    for (uint256 i = 0; i < ids.length; ++i) {
      if (amounts[i] == 0) amounts[i] = IERC1155(token).balanceOf(address(this), ids[i]);
    }
    IERC1155(token).safeBatchTransferFrom(address(this), recipient, ids, amounts, data);
  }
}

File 7 of 25 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (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() {
        _nonReentrantBefore();
        _;
        _nonReentrantAfter();
    }

    function _nonReentrantBefore() private {
        // On the first call to nonReentrant, _status will be _NOT_ENTERED
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

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

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

    /**
     * @dev Returns true if the reentrancy guard is currently set to "entered", which indicates there is a
     * `nonReentrant` function in the call stack.
     */
    function _reentrancyGuardEntered() internal view returns (bool) {
        return _status == _ENTERED;
    }
}

File 8 of 25 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @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);

    /**
     * @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);
}

File 9 of 25 : SafeERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.3) (token/ERC20/utils/SafeERC20.sol)

pragma solidity ^0.8.0;

import "../IERC20.sol";
import "../extensions/IERC20Permit.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;

    /**
     * @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value,
     * non-reverting calls are assumed to be successful.
     */
    function safeTransfer(IERC20 token, address to, uint256 value) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
    }

    /**
     * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the
     * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful.
     */
    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));
    }

    /**
     * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value,
     * non-reverting calls are assumed to be successful.
     */
    function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {
        uint256 oldAllowance = token.allowance(address(this), spender);
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance + value));
    }

    /**
     * @dev Decrease the calling contract's allowance toward `spender` by `value`. If `token` returns no value,
     * non-reverting calls are assumed to be successful.
     */
    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");
            _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance - value));
        }
    }

    /**
     * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value,
     * non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval
     * to be set to zero before setting it to a non-zero value, such as USDT.
     */
    function forceApprove(IERC20 token, address spender, uint256 value) internal {
        bytes memory approvalCall = abi.encodeWithSelector(token.approve.selector, spender, value);

        if (!_callOptionalReturnBool(token, approvalCall)) {
            _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, 0));
            _callOptionalReturn(token, approvalCall);
        }
    }

    /**
     * @dev Use a ERC-2612 signature to set the `owner` approval toward `spender` on `token`.
     * Revert on invalid signature.
     */
    function safePermit(
        IERC20Permit token,
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) internal {
        uint256 nonceBefore = token.nonces(owner);
        token.permit(owner, spender, value, deadline, v, r, s);
        uint256 nonceAfter = token.nonces(owner);
        require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed");
    }

    /**
     * @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");
        require(returndata.length == 0 || abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
    }

    /**
     * @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).
     *
     * This is a variant of {_callOptionalReturn} that silents catches all reverts and returns a bool instead.
     */
    function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {
        // 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 cannot use {Address-functionCall} here since this should return false
        // and not revert is the subcall reverts.

        (bool success, bytes memory returndata) = address(token).call(data);
        return
            success && (returndata.length == 0 || abi.decode(returndata, (bool))) && Address.isContract(address(token));
    }
}

File 10 of 25 : IERC721.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (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`.
     *
     * 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;

    /**
     * @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 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: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC721
     * or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must
     * understand this adds an external call which potentially creates a reentrancy vulnerability.
     *
     * 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 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 the account approved for `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function getApproved(uint256 tokenId) external view returns (address operator);

    /**
     * @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);
}

File 11 of 25 : IERC1155.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC1155/IERC1155.sol)

pragma solidity ^0.8.0;

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

/**
 * @dev Required interface of an ERC1155 compliant contract, as defined in the
 * https://eips.ethereum.org/EIPS/eip-1155[EIP].
 *
 * _Available since v3.1._
 */
interface IERC1155 is IERC165 {
    /**
     * @dev Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`.
     */
    event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value);

    /**
     * @dev Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all
     * transfers.
     */
    event TransferBatch(
        address indexed operator,
        address indexed from,
        address indexed to,
        uint256[] ids,
        uint256[] values
    );

    /**
     * @dev Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to
     * `approved`.
     */
    event ApprovalForAll(address indexed account, address indexed operator, bool approved);

    /**
     * @dev Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI.
     *
     * If an {URI} event was emitted for `id`, the standard
     * https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value
     * returned by {IERC1155MetadataURI-uri}.
     */
    event URI(string value, uint256 indexed id);

    /**
     * @dev Returns the amount of tokens of token type `id` owned by `account`.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     */
    function balanceOf(address account, uint256 id) external view returns (uint256);

    /**
     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}.
     *
     * Requirements:
     *
     * - `accounts` and `ids` must have the same length.
     */
    function balanceOfBatch(
        address[] calldata accounts,
        uint256[] calldata ids
    ) external view returns (uint256[] memory);

    /**
     * @dev Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`,
     *
     * Emits an {ApprovalForAll} event.
     *
     * Requirements:
     *
     * - `operator` cannot be the caller.
     */
    function setApprovalForAll(address operator, bool approved) external;

    /**
     * @dev Returns true if `operator` is approved to transfer ``account``'s tokens.
     *
     * See {setApprovalForAll}.
     */
    function isApprovedForAll(address account, address operator) external view returns (bool);

    /**
     * @dev Transfers `amount` tokens of token type `id` from `from` to `to`.
     *
     * Emits a {TransferSingle} event.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - If the caller is not `from`, it must have been approved to spend ``from``'s tokens via {setApprovalForAll}.
     * - `from` must have a balance of tokens of type `id` of at least `amount`.
     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the
     * acceptance magic value.
     */
    function safeTransferFrom(address from, address to, uint256 id, uint256 amount, bytes calldata data) external;

    /**
     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}.
     *
     * Emits a {TransferBatch} event.
     *
     * Requirements:
     *
     * - `ids` and `amounts` must have the same length.
     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the
     * acceptance magic value.
     */
    function safeBatchTransferFrom(
        address from,
        address to,
        uint256[] calldata ids,
        uint256[] calldata amounts,
        bytes calldata data
    ) external;
}

File 12 of 25 : KSRescue.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import {KyberSwapRole} from '@src/KyberSwapRole.sol';
import {IERC20} from '@openzeppelin/contracts/token/ERC20/IERC20.sol';
import {SafeERC20} from '@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol';

abstract contract KSRescue is KyberSwapRole {
  using SafeERC20 for IERC20;

  address private constant ETH_ADDRESS = address(0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE);

  function rescueFunds(address token, uint256 amount, address recipient) external onlyOwner {
    require(recipient != address(0), 'KSRescue: invalid recipient');
    if (amount == 0) amount = _getAvailableAmount(token);
    if (amount > 0) {
      if (_isETH(token)) {
        (bool success,) = recipient.call{value: amount}('');
        require(success, 'KSRescue: ETH_TRANSFER_FAILED');
      } else {
        IERC20(token).safeTransfer(recipient, amount);
      }
    }
  }

  function _getAvailableAmount(address token) internal view virtual returns (uint256 amount) {
    if (_isETH(token)) {
      amount = address(this).balance;
    } else {
      amount = IERC20(token).balanceOf(address(this));
    }
    if (amount > 0) --amount;
  }

  function _isETH(address token) internal pure returns (bool) {
    return (token == ETH_ADDRESS);
  }
}

File 13 of 25 : IERC721.sol
// SPDX-License-Identifier: MIT

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 14 of 25 : IERC1155.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

/**
 * @dev Required interface of an ERC1155 compliant contract, as defined in the
 * https://eips.ethereum.org/EIPS/eip-1155[EIP].
 *
 * _Available since v3.1._
 */
interface IERC1155 is IERC165 {
    /**
     * @dev Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`.
     */
    event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value);

    /**
     * @dev Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all
     * transfers.
     */
    event TransferBatch(
        address indexed operator,
        address indexed from,
        address indexed to,
        uint256[] ids,
        uint256[] values
    );

    /**
     * @dev Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to
     * `approved`.
     */
    event ApprovalForAll(address indexed account, address indexed operator, bool approved);

    /**
     * @dev Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI.
     *
     * If an {URI} event was emitted for `id`, the standard
     * https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value
     * returned by {IERC1155MetadataURI-uri}.
     */
    event URI(string value, uint256 indexed id);

    /**
     * @dev Returns the amount of tokens of token type `id` owned by `account`.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     */
    function balanceOf(address account, uint256 id) external view returns (uint256);

    /**
     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}.
     *
     * Requirements:
     *
     * - `accounts` and `ids` must have the same length.
     */
    function balanceOfBatch(address[] calldata accounts, uint256[] calldata ids)
        external
        view
        returns (uint256[] memory);

    /**
     * @dev Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`,
     *
     * Emits an {ApprovalForAll} event.
     *
     * Requirements:
     *
     * - `operator` cannot be the caller.
     */
    function setApprovalForAll(address operator, bool approved) external;

    /**
     * @dev Returns true if `operator` is approved to transfer ``account``'s tokens.
     *
     * See {setApprovalForAll}.
     */
    function isApprovedForAll(address account, address operator) external view returns (bool);

    /**
     * @dev Transfers `amount` tokens of token type `id` from `from` to `to`.
     *
     * Emits a {TransferSingle} event.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - If the caller is not `from`, it must be have been approved to spend ``from``'s tokens via {setApprovalForAll}.
     * - `from` must have a balance of tokens of type `id` of at least `amount`.
     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the
     * acceptance magic value.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 id,
        uint256 amount,
        bytes calldata data
    ) external;

    /**
     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}.
     *
     * Emits a {TransferBatch} event.
     *
     * Requirements:
     *
     * - `ids` and `amounts` must have the same length.
     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the
     * acceptance magic value.
     */
    function safeBatchTransferFrom(
        address from,
        address to,
        uint256[] calldata ids,
        uint256[] calldata amounts,
        bytes calldata data
    ) external;
}

File 15 of 25 : IERC20Permit.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/extensions/IERC20Permit.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in
 * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].
 *
 * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by
 * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't
 * need to send a transaction, and thus is not required to hold Ether at all.
 */
interface IERC20Permit {
    /**
     * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,
     * given ``owner``'s signed approval.
     *
     * IMPORTANT: The same issues {IERC20-approve} has related to transaction
     * ordering also apply here.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     * - `deadline` must be a timestamp in the future.
     * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`
     * over the EIP712-formatted function arguments.
     * - the signature must use ``owner``'s current nonce (see {nonces}).
     *
     * For more information on the signature format, see the
     * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP
     * section].
     */
    function permit(
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external;

    /**
     * @dev Returns the current nonce for `owner`. This value must be
     * included whenever a signature is generated for {permit}.
     *
     * Every successful call to {permit} increases ``owner``'s nonce by one. This
     * prevents a signature from being used multiple times.
     */
    function nonces(address owner) external view returns (uint256);

    /**
     * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.
     */
    // solhint-disable-next-line func-name-mixedcase
    function DOMAIN_SEPARATOR() external view returns (bytes32);
}

File 16 of 25 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.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
     *
     * Furthermore, `isContract` will also return true if the target contract within
     * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,
     * which only has an effect at the end of a transaction.
     * ====
     *
     * [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://consensys.net/diligence/blog/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.8.0/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 functionCallWithValue(target, data, 0, "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");
        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResultFromTarget(target, 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) {
        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResultFromTarget(target, 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) {
        (bool success, bytes memory returndata) = target.delegatecall(data);
        return verifyCallResultFromTarget(target, success, returndata, errorMessage);
    }

    /**
     * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling
     * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.
     *
     * _Available since v4.8._
     */
    function verifyCallResultFromTarget(
        address target,
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        if (success) {
            if (returndata.length == 0) {
                // only check isContract if the call was successful and the return data is empty
                // otherwise we already know that it was a contract
                require(isContract(target), "Address: call to non-contract");
            }
            return returndata;
        } else {
            _revert(returndata, errorMessage);
        }
    }

    /**
     * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason or 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 {
            _revert(returndata, errorMessage);
        }
    }

    function _revert(bytes memory returndata, string memory errorMessage) private pure {
        // 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
            /// @solidity memory-safe-assembly
            assembly {
                let returndata_size := mload(returndata)
                revert(add(32, returndata), returndata_size)
            }
        } else {
            revert(errorMessage);
        }
    }
}

File 17 of 25 : 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 18 of 25 : KyberSwapRole.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import {Ownable} from '@openzeppelin/contracts/access/Ownable.sol';
import {Pausable} from '@openzeppelin/contracts/security/Pausable.sol';

abstract contract KyberSwapRole is Ownable, Pausable {
  mapping(address => bool) public operators;
  mapping(address => bool) public guardians;

  /**
   * @dev Emitted when the an user was grant or revoke operator role.
   */
  event UpdateOperator(address user, bool grantOrRevoke);

  /**
   * @dev Emitted when the an user was grant or revoke guardian role.
   */
  event UpdateGuardian(address user, bool grantOrRevoke);

  /**
   * @dev Modifier to make a function callable only when caller is operator.
   *
   * Requirements:
   *
   * - Caller must have operator role.
   */
  modifier onlyOperator() {
    require(operators[msg.sender], 'KyberSwapRole: not operator');
    _;
  }

  /**
   * @dev Modifier to make a function callable only when caller is guardian.
   *
   * Requirements:
   *
   * - Caller must have guardian role.
   */
  modifier onlyGuardian() {
    require(guardians[msg.sender], 'KyberSwapRole: not guardian');
    _;
  }

  /**
   * @dev Update Operator role for user.
   * Can only be called by the current owner.
   */
  function updateOperator(address user, bool grantOrRevoke) external onlyOwner {
    operators[user] = grantOrRevoke;
    emit UpdateOperator(user, grantOrRevoke);
  }

  /**
   * @dev Update Guardian role for user.
   * Can only be called by the current owner.
   */
  function updateGuardian(address user, bool grantOrRevoke) external onlyOwner {
    guardians[user] = grantOrRevoke;
    emit UpdateGuardian(user, grantOrRevoke);
  }

  /**
   * @dev Enable logic for contract.
   * Can only be called by the current owner.
   */
  function enableLogic() external onlyOwner {
    _unpause();
  }

  /**
   * @dev Disable logic for contract.
   * Can only be called by the guardians.
   */
  function disableLogic() external onlyGuardian {
    _pause();
  }
}

File 19 of 25 : IERC20.sol
// SPDX-License-Identifier: MIT

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 `recipient`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address recipient, 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 `sender` to `recipient` 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 sender,
        address recipient,
        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 20 of 25 : SafeERC20.sol
// SPDX-License-Identifier: MIT

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 21 of 25 : IERC165.sol
// SPDX-License-Identifier: MIT

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 22 of 25 : Ownable.sol
// SPDX-License-Identifier: MIT

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() {
        _setOwner(_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 {
        _setOwner(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");
        _setOwner(newOwner);
    }

    function _setOwner(address newOwner) private {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}

File 23 of 25 : Pausable.sol
// SPDX-License-Identifier: MIT

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 24 of 25 : Address.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @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
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize, which returns 0 for contracts in
        // construction, since the code is only stored at the end of the
        // constructor execution.

        uint256 size;
        assembly {
            size := extcodesize(account)
        }
        return size > 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);
            }
        }
    }
}

File 25 of 25 : Context.sol
// SPDX-License-Identifier: MIT

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;
    }
}

Settings
{
  "remappings": [
    "ds-test/=lib/forge-std/lib/ds-test/src/",
    "forge-std/=lib/forge-std/src/",
    "openzeppelin/=lib/openzeppelin-contracts/",
    "erc4626-tests/=lib/openzeppelin-contracts/lib/erc4626-tests/",
    "ks-growth-utils-sc/=lib/ks-growth-utils-sc/",
    "@openzeppelin/=lib/ks-growth-utils-sc/lib/openzeppelin-contracts/",
    "@src/=lib/ks-growth-utils-sc/contracts/",
    "openzeppelin-contracts/=lib/openzeppelin-contracts/"
  ],
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "metadata": {
    "useLiteralContent": false,
    "bytecodeHash": "ipfs"
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "abi"
      ]
    }
  },
  "evmVersion": "london",
  "viaIR": false,
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bytes","name":"_clientData","type":"bytes"}],"name":"ClientData","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_token","type":"address"},{"indexed":true,"internalType":"uint256","name":"_id","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"ERC1155Collected","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_token","type":"address"},{"indexed":true,"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"ERC20Collected","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_token","type":"address"},{"indexed":true,"internalType":"uint256","name":"_id","type":"uint256"}],"name":"ERC721Collected","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_executor","type":"address"},{"indexed":true,"internalType":"bool","name":"_grantOrRevoke","type":"bool"}],"name":"ExecutorWhitelisted","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":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"bool","name":"grantOrRevoke","type":"bool"}],"name":"UpdateGuardian","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"bool","name":"grantOrRevoke","type":"bool"}],"name":"UpdateOperator","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_validator","type":"address"},{"indexed":true,"internalType":"bool","name":"_grantOrRevoke","type":"bool"}],"name":"ValidatorWhitelisted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint8","name":"_dexType","type":"uint8"},{"indexed":true,"internalType":"bytes","name":"_srcInfo","type":"bytes"},{"indexed":false,"internalType":"address","name":"_validator","type":"address"},{"indexed":false,"internalType":"address","name":"_executor","type":"address"},{"indexed":false,"internalType":"bytes","name":"_zapInfo","type":"bytes"},{"indexed":false,"internalType":"bytes","name":"_extraData","type":"bytes"},{"indexed":false,"internalType":"bytes","name":"_initialData","type":"bytes"},{"indexed":false,"internalType":"bytes","name":"_zapResults","type":"bytes"}],"name":"ZapExecuted","type":"event"},{"inputs":[],"name":"disableLogic","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"enableLogic","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"guardians","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"operators","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"},{"internalType":"bytes","name":"data","type":"bytes"},{"internalType":"address","name":"recipient","type":"address"}],"name":"rescueBatchERC1155","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256[]","name":"_ids","type":"uint256[]"},{"internalType":"address","name":"recipient","type":"address"}],"name":"rescueBatchERC721","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address","name":"recipient","type":"address"}],"name":"rescueFunds","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"},{"internalType":"bool","name":"grantOrRevoke","type":"bool"}],"name":"updateGuardian","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"},{"internalType":"bool","name":"grantOrRevoke","type":"bool"}],"name":"updateOperator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"_executors","type":"address[]"},{"internalType":"bool","name":"_grantOrRevoke","type":"bool"}],"name":"whitelistExecutors","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"_validators","type":"address[]"},{"internalType":"bool","name":"_grantOrRevoke","type":"bool"}],"name":"whitelistValidators","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"whitelistedExecutor","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"whitelistedValidator","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"uint16","name":"zapFlags","type":"uint16"},{"internalType":"bytes","name":"srcInfo","type":"bytes"},{"internalType":"bytes","name":"zapInfo","type":"bytes"},{"internalType":"bytes","name":"extraData","type":"bytes"}],"internalType":"struct IKSZapRouterPosition.ZapDescription","name":"_desc","type":"tuple"},{"components":[{"internalType":"address","name":"validator","type":"address"},{"internalType":"address","name":"executor","type":"address"},{"internalType":"uint32","name":"deadline","type":"uint32"},{"internalType":"bytes","name":"executorData","type":"bytes"},{"internalType":"bytes","name":"clientData","type":"bytes"}],"internalType":"struct IKSZapRouterPosition.ZapExecutionData","name":"_exe","type":"tuple"}],"name":"zap","outputs":[{"internalType":"bytes","name":"zapResults","type":"bytes"}],"stateMutability":"payable","type":"function"}]

608060405234801561001057600080fd5b5061001a33610031565b6000805460ff60a01b191690556001600355610081565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b612c5f80620000916000396000f3fe6080604052600436106101095760003560e01c8063a827db4611610095578063cc15009711610064578063cc150097146102f6578063dff3ca7d14610316578063e83aa3a814610336578063f2fde38b14610356578063f9338d181461037657600080fd5b8063a827db4614610266578063aa5d82c314610296578063c2eb5282146102b6578063c5389017146102d657600080fd5b8063715018a6116100dc578063715018a6146101c457806388f4950f146101d95780638da5cb5b146101f95780639abf6f1f146102215780639dd392391461025157600080fd5b80630633b14a1461010e57806313e7c9d8146101535780635c975abb146101835780636d44a3b2146101a2575b600080fd5b34801561011a57600080fd5b5061013e610129366004611fc3565b60026020526000908152604090205460ff1681565b60405190151581526020015b60405180910390f35b34801561015f57600080fd5b5061013e61016e366004611fc3565b60016020526000908152604090205460ff1681565b34801561018f57600080fd5b50600054600160a01b900460ff1661013e565b3480156101ae57600080fd5b506101c26101bd366004611fee565b61038b565b005b3480156101d057600080fd5b506101c2610422565b3480156101e557600080fd5b506101c26101f4366004611fee565b610458565b34801561020557600080fd5b506000546040516001600160a01b03909116815260200161014a565b34801561022d57600080fd5b5061013e61023c366004611fc3565b60056020526000908152604090205460ff1681565b34801561025d57600080fd5b506101c26104de565b34801561027257600080fd5b5061013e610281366004611fc3565b60046020526000908152604090205460ff1681565b6102a96102a4366004612027565b610545565b60405161014a91906120e6565b3480156102c257600080fd5b506101c26102d1366004612144565b610bc3565b3480156102e257600080fd5b506101c26102f136600461219a565b610cc3565b34801561030257600080fd5b506101c26103113660046122d3565b610dca565b34801561032257600080fd5b506101c2610331366004612144565b610fe0565b34801561034257600080fd5b506101c26103513660046123e6565b6110da565b34801561036257600080fd5b506101c2610371366004611fc3565b611222565b34801561038257600080fd5b506101c26112bd565b6000546001600160a01b031633146103be5760405162461bcd60e51b81526004016103b59061241d565b60405180910390fd5b6001600160a01b038216600081815260016020908152604091829020805460ff19168515159081179091558251938452908301527f2ee52be9d342458b3d25e07faada7ff9bc06723b4aa24edb6321ac1316b8a9dd91015b60405180910390a15050565b6000546001600160a01b0316331461044c5760405162461bcd60e51b81526004016103b59061241d565b61045660006112ef565b565b6000546001600160a01b031633146104825760405162461bcd60e51b81526004016103b59061241d565b6001600160a01b038216600081815260026020908152604091829020805460ff19168515159081179091558251938452908301527f25d7ce8d7e0b3990938766275ee2d54fbe81347d287bfbf0429838409a889fdc9101610416565b3360009081526002602052604090205460ff1661053d5760405162461bcd60e51b815260206004820152601b60248201527f4b7962657253776170526f6c653a206e6f7420677561726469616e000000000060448201526064016103b5565b61045661133f565b600054606090600160a01b900460ff16156105955760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b60448201526064016103b5565b61059d6113e4565b6105ad6060830160408401612452565b8063ffffffff164211156105f85760405162461bcd60e51b815260206004820152601260248201527116985c149bdd5d195c8e88195e1c1a5c995960721b60448201526064016103b5565b600060086106096020870187612478565b61ffff16901c905060006106206020870187612478565b9050600460006106366040880160208901611fc3565b6001600160a01b0316815260208101919091526040016000205460ff166106ab5760405162461bcd60e51b815260206004820152602360248201527f5a6170526f757465723a206e6f6e2077686974656c69737465642065786563756044820152623a37b960e91b60648201526084016103b5565b60ff81166107125761070d6106c3602088018861249c565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250610708925050506040880160208901611fc3565b61143e565b6107de565b60ff8116600114156107785761070d61072e602088018861249c565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250610773925050506040880160208901611fc3565b61161e565b60ff8116600214156107de576107de610794602088018861249c565b8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506107d9925050506040880160208901611fc3565b6117c2565b606060006107ef6020880188611fc3565b6001600160a01b031614610921576005600061080e6020890189611fc3565b6001600160a01b0316815260208101919091526040016000205460ff166108835760405162461bcd60e51b8152602060048201526024808201527f5a6170526f757465723a206e6f6e2077686974656c69737465642076616c696460448201526330ba37b960e11b60648201526084016103b5565b6108906020870187611fc3565b6001600160a01b031663c6256bef846108ac60408b018b61249c565b6040518463ffffffff1660e01b81526004016108ca9392919061250b565b60006040518083038186803b1580156108e257600080fd5b505afa1580156108f6573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261091e9190810190612594565b90505b6109316040870160208801611fc3565b6001600160a01b031663f012a2b63461094d60608a018a61249c565b6040518463ffffffff1660e01b815260040161096a9291906125c8565b6000604051808303818588803b15801561098357600080fd5b505af1158015610997573d6000803e3d6000fd5b50505050506040513d6000823e601f3d908101601f191682016040526109c09190810190612594565b945060006109d16020880188611fc3565b6001600160a01b031614610acd5760006109ee6020880188611fc3565b6001600160a01b031663af0a355785610a0a60608c018c61249c565b868b6040518663ffffffff1660e01b8152600401610a2c9594939291906125dc565b60206040518083038186803b158015610a4457600080fd5b505afa158015610a58573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a7c919061262b565b905080610acb5760405162461bcd60e51b815260206004820152601c60248201527f5a6170526f757465723a2076616c69646174696f6e206661696c65640000000060448201526064016103b5565b505b610ada602088018861249c565b604051610ae8929190612648565b60405190819003902060ff84167fc6c65320d36912d569b6a6e9cd567b0472cfe5c0e10c35f799df19912d6b9cef610b2360208a018a611fc3565b610b3360408b0160208c01611fc3565b610b4060408d018d61249c565b610b4d60608f018f61249c565b898e604051610b63989796959493929190612658565b60405180910390a37f095e66fa4dd6a6f7b43fb8444a7bd0edb870508c7abf639bc216efb0bcff9779610b99608088018861249c565b604051610ba79291906125c8565b60405180910390a150505050610bbd6001600355565b92915050565b6000546001600160a01b03163314610bed5760405162461bcd60e51b81526004016103b59061241d565b60005b82811015610cbd578160046000868685818110610c0f57610c0f6126cf565b9050602002016020810190610c249190611fc3565b6001600160a01b031681526020810191909152604001600020805460ff1916911515919091179055811515848483818110610c6157610c616126cf565b9050602002016020810190610c769190611fc3565b6001600160a01b03167f19f4c310cf148369e5605e8f3538cee4d3495da0612c9a45c0b89105ed6fee4d60405160405180910390a380610cb5816126fb565b915050610bf0565b50505050565b6000546001600160a01b03163314610ced5760405162461bcd60e51b81526004016103b59061241d565b6001600160a01b038116610d135760405162461bcd60e51b81526004016103b590612716565b60005b82811015610dc357846001600160a01b03166323b872dd3084878786818110610d4157610d416126cf565b6040516001600160e01b031960e088901b1681526001600160a01b03958616600482015294909316602485015250602090910201356044820152606401600060405180830381600087803b158015610d9857600080fd5b505af1158015610dac573d6000803e3d6000fd5b505050508080610dbb906126fb565b915050610d16565b5050505050565b6000546001600160a01b03163314610df45760405162461bcd60e51b81526004016103b59061241d565b6001600160a01b038116610e1a5760405162461bcd60e51b81526004016103b590612716565b83518514610e6a5760405162461bcd60e51b815260206004820152601e60248201527f4b535265736375653a20696e76616c6964206172726179206c656e677468000060448201526064016103b5565b60005b85811015610f6c57848181518110610e8757610e876126cf565b602002602001015160001415610f5c57876001600160a01b031662fdd58e30898985818110610eb857610eb86126cf565b6040516001600160e01b031960e087901b1681526001600160a01b039094166004850152602002919091013560248301525060440160206040518083038186803b158015610f0557600080fd5b505afa158015610f19573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f3d919061274d565b858281518110610f4f57610f4f6126cf565b6020026020010181815250505b610f65816126fb565b9050610e6d565b50604051631759616b60e11b81526001600160a01b03881690632eb2c2d690610fa590309085908b908b908b908b908b90600401612766565b600060405180830381600087803b158015610fbf57600080fd5b505af1158015610fd3573d6000803e3d6000fd5b5050505050505050505050565b6000546001600160a01b0316331461100a5760405162461bcd60e51b81526004016103b59061241d565b60005b82811015610cbd57816005600086868581811061102c5761102c6126cf565b90506020020160208101906110419190611fc3565b6001600160a01b031681526020810191909152604001600020805460ff191691151591909117905581151584848381811061107e5761107e6126cf565b90506020020160208101906110939190611fc3565b6001600160a01b03167f43572750395348a3948322f95d3b0bf4773311c6c19ec9a575cde194e5bac21160405160405180910390a3806110d2816126fb565b91505061100d565b6000546001600160a01b031633146111045760405162461bcd60e51b81526004016103b59061241d565b6001600160a01b03811661112a5760405162461bcd60e51b81526004016103b590612716565b8161113b57611138836119f4565b91505b811561121d5773eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6001600160a01b0384161415611209576000816001600160a01b03168360405160006040518083038185875af1925050503d80600081146111b3576040519150601f19603f3d011682016040523d82523d6000602084013e6111b8565b606091505b5050905080610cbd5760405162461bcd60e51b815260206004820152601d60248201527f4b535265736375653a204554485f5452414e534645525f4641494c454400000060448201526064016103b5565b61121d6001600160a01b0384168284611ab3565b505050565b6000546001600160a01b0316331461124c5760405162461bcd60e51b81526004016103b59061241d565b6001600160a01b0381166112b15760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016103b5565b6112ba816112ef565b50565b6000546001600160a01b031633146112e75760405162461bcd60e51b81526004016103b59061241d565b610456611b05565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600054600160a01b900460ff161561138c5760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b60448201526064016103b5565b6000805460ff60a01b1916600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586113c73390565b6040516001600160a01b03909116815260200160405180910390a1565b600260035414156114375760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016103b5565b6002600355565b6000828060200190518101906114549190612972565b60208101515181515191925014801561146e575080515115155b61148a5760405162461bcd60e51b81526004016103b5906129a6565b343360005b8351518110156115ff578351805173eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee9190839081106114c4576114c46126cf565b60200260200101516001600160a01b0316141561152c576000831180156115075750836020015181815181106114fc576114fc6126cf565b602002602001015183145b6115235760405162461bcd60e51b81526004016103b5906129dd565b60009250611586565b611586828686602001518481518110611547576115476126cf565b602002602001015187600001518581518110611565576115656126cf565b60200260200101516001600160a01b0316611b89909392919063ffffffff16565b8360200151818151811061159c5761159c6126cf565b6020026020010151846000015182815181106115ba576115ba6126cf565b60200260200101516001600160a01b03167f542ffabdd5320a08598fbaa483210c5e34df4cfbd7f2541470a88d43c640311460405160405180910390a360010161148f565b508115610dc35760405162461bcd60e51b81526004016103b5906129dd565b341561163c5760405162461bcd60e51b81526004016103b5906129dd565b6000828060200190518101906116529190612972565b60208101515181515191925014801561166c575080515115155b6116885760405162461bcd60e51b81526004016103b5906129a6565b60005b815151811015610cbd5781518051829081106116a9576116a96126cf565b60200260200101516001600160a01b03166342842e0e3385856020015185815181106116d7576116d76126cf565b60209081029190910101516040516001600160e01b031960e086901b1681526001600160a01b0393841660048201529290911660248301526044820152606401600060405180830381600087803b15801561173157600080fd5b505af1158015611745573d6000803e3d6000fd5b505050508160200151818151811061175f5761175f6126cf565b60200260200101518260000151828151811061177d5761177d6126cf565b60200260200101516001600160a01b03167fa6fb63d713a5a606436dc801f04dfdfd00d8e5211c54bc1332aeb047992c06f760405160405180910390a360010161168b565b34156117e05760405162461bcd60e51b81526004016103b5906129dd565b6000828060200190518101906117f69190612a93565b805151909150158015906118105750602081015151815151145b61182c5760405162461bcd60e51b81526004016103b5906129a6565b604081015151815151146118525760405162461bcd60e51b81526004016103b5906129a6565b606081015151815151146118785760405162461bcd60e51b81526004016103b5906129a6565b60005b815151811015610cbd578151805182908110611899576118996126cf565b60200260200101516001600160a01b031663f242432a3385856020015185815181106118c7576118c76126cf565b6020026020010151866040015186815181106118e5576118e56126cf565b602002602001015187606001518781518110611903576119036126cf565b60200260200101516040518663ffffffff1660e01b815260040161192b959493929190612b6b565b600060405180830381600087803b15801561194557600080fd5b505af1158015611959573d6000803e3d6000fd5b5050505081604001518181518110611973576119736126cf565b602002602001015182602001518281518110611991576119916126cf565b6020026020010151836000015183815181106119af576119af6126cf565b60200260200101516001600160a01b03167fc9efed9c685f673048e2e1c9ddf550a10f21608098f48dd9cf18c3f77028486260405160405180910390a460010161187b565b600073eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6001600160a01b0383161415611a22575047611a9c565b6040516370a0823160e01b81523060048201526001600160a01b038316906370a082319060240160206040518083038186803b158015611a6157600080fd5b505afa158015611a75573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a99919061274d565b90505b8015611aae57611aab81612bb0565b90505b919050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b17905261121d908490611be3565b600054600160a01b900460ff16611b555760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b60448201526064016103b5565b6000805460ff60a01b191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa336113c7565b604080516001600160a01b0385811660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b179052610cbd908590611cb5565b6000611c38826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316611d2b9092919063ffffffff16565b80519091501561121d5780806020019051810190611c56919061262b565b61121d5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016103b5565b6000611d0a826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316611d449092919063ffffffff16565b9050805160001480611c56575080806020019051810190611c56919061262b565b6060611d3a8484600085611d53565b90505b9392505050565b6060611d3a8484600085611e3e565b606082471015611d755760405162461bcd60e51b81526004016103b590612bc7565b843b611dc35760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016103b5565b600080866001600160a01b03168587604051611ddf9190612c0d565b60006040518083038185875af1925050503d8060008114611e1c576040519150601f19603f3d011682016040523d82523d6000602084013e611e21565b606091505b5091509150611e31828286611ecf565b925050505b949350505050565b606082471015611e605760405162461bcd60e51b81526004016103b590612bc7565b600080866001600160a01b03168587604051611e7c9190612c0d565b60006040518083038185875af1925050503d8060008114611eb9576040519150601f19603f3d011682016040523d82523d6000602084013e611ebe565b606091505b5091509150611e3187838387611f08565b60608315611ede575081611d3d565b825115611eee5782518084602001fd5b8160405162461bcd60e51b81526004016103b591906120e6565b60608315611f74578251611f6d576001600160a01b0385163b611f6d5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016103b5565b5081611e36565b611e368383815115611f895781518083602001fd5b8060405162461bcd60e51b81526004016103b591906120e6565b6001600160a01b03811681146112ba57600080fd5b8035611aae81611fa3565b600060208284031215611fd557600080fd5b8135611d3d81611fa3565b80151581146112ba57600080fd5b6000806040838503121561200157600080fd5b823561200c81611fa3565b9150602083013561201c81611fe0565b809150509250929050565b6000806040838503121561203a57600080fd5b82356001600160401b038082111561205157600080fd5b908401906080828703121561206557600080fd5b9092506020840135908082111561207b57600080fd5b50830160a0818603121561201c57600080fd5b60005b838110156120a9578181015183820152602001612091565b83811115610cbd5750506000910152565b600081518084526120d281602086016020860161208e565b601f01601f19169290920160200192915050565b602081526000611d3d60208301846120ba565b60008083601f84011261210b57600080fd5b5081356001600160401b0381111561212257600080fd5b6020830191508360208260051b850101111561213d57600080fd5b9250929050565b60008060006040848603121561215957600080fd5b83356001600160401b0381111561216f57600080fd5b61217b868287016120f9565b909450925050602084013561218f81611fe0565b809150509250925092565b600080600080606085870312156121b057600080fd5b84356121bb81611fa3565b935060208501356001600160401b038111156121d657600080fd5b6121e2878288016120f9565b90945092505060408501356121f681611fa3565b939692955090935050565b634e487b7160e01b600052604160045260246000fd5b604051608081016001600160401b038111828210171561223957612239612201565b60405290565b604051601f8201601f191681016001600160401b038111828210171561226757612267612201565b604052919050565b60006001600160401b0382111561228857612288612201565b5060051b60200190565b60008083601f8401126122a457600080fd5b5081356001600160401b038111156122bb57600080fd5b60208301915083602082850101111561213d57600080fd5b600080600080600080600060a0888a0312156122ee57600080fd5b87356122f981611fa3565b96506020888101356001600160401b038082111561231657600080fd5b6123228c838d016120f9565b909950975060408b013591508082111561233b57600080fd5b818b0191508b601f83011261234f57600080fd5b813561236261235d8261226f565b61223f565b81815260059190911b8301840190848101908e83111561238157600080fd5b938501935b8285101561239f57843582529385019390850190612386565b9850505060608b01359250808311156123b757600080fd5b50506123c58a828b01612292565b90945092506123d8905060808901611fb8565b905092959891949750929550565b6000806000606084860312156123fb57600080fd5b833561240681611fa3565b925060208401359150604084013561218f81611fa3565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60006020828403121561246457600080fd5b813563ffffffff81168114611d3d57600080fd5b60006020828403121561248a57600080fd5b813561ffff81168114611d3d57600080fd5b6000808335601e198436030181126124b357600080fd5b8301803591506001600160401b038211156124cd57600080fd5b60200191503681900382131561213d57600080fd5b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b60ff841681526040602082015260006125286040830184866124e2565b95945050505050565b600082601f83011261254257600080fd5b81516001600160401b0381111561255b5761255b612201565b61256e601f8201601f191660200161223f565b81815284602083860101111561258357600080fd5b611e3682602083016020870161208e565b6000602082840312156125a657600080fd5b81516001600160401b038111156125bc57600080fd5b611e3684828501612531565b602081526000611d3a6020830184866124e2565b60ff861681526080602082015260006125f96080830186886124e2565b828103604084015261260b81866120ba565b9050828103606084015261261f81856120ba565b98975050505050505050565b60006020828403121561263d57600080fd5b8151611d3d81611fe0565b8183823760009101908152919050565b6001600160a01b0389811682528816602082015260c060408201819052600090612685908301888a6124e2565b82810360608401526126988187896124e2565b905082810360808401526126ac81866120ba565b905082810360a08401526126c081856120ba565b9b9a5050505050505050505050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600060001982141561270f5761270f6126e5565b5060010190565b6020808252601b908201527f4b535265736375653a20696e76616c696420726563697069656e740000000000604082015260600190565b60006020828403121561275f57600080fd5b5051919050565b6001600160a01b03888116825287811660208084019190915260a0604084018190528301879052600091906001600160fb1b038811156127a557600080fd5b8760051b9150818960c0860137600091840160c08181018481528683039091016060870152885190819052828901939160e001905b808310156127fa57845182529383019360019290920191908301906127da565b50858103608087015261280e81888a6124e2565b9d9c50505050505050505050505050565b600082601f83011261283057600080fd5b8151602061284061235d8361226f565b82815260059290921b8401810191818101908684111561285f57600080fd5b8286015b8481101561288357805161287681611fa3565b8352918301918301612863565b509695505050505050565b600082601f83011261289f57600080fd5b815160206128af61235d8361226f565b82815260059290921b840181019181810190868411156128ce57600080fd5b8286015b8481101561288357805183529183019183016128d2565b6000604082840312156128fb57600080fd5b604051604081016001600160401b03828210818311171561291e5761291e612201565b81604052829350845191508082111561293657600080fd5b6129428683870161281f565b8352602085015191508082111561295857600080fd5b506129658582860161288e565b6020830152505092915050565b60006020828403121561298457600080fd5b81516001600160401b0381111561299a57600080fd5b611e36848285016128e9565b60208082526017908201527f5a6170526f757465723a20696e76616c69642064617461000000000000000000604082015260600190565b6020808252601c908201527f5a6170526f757465723a20696e76616c6964206d73672076616c756500000000604082015260600190565b600082601f830112612a2557600080fd5b81516020612a3561235d8361226f565b82815260059290921b84018101918181019086841115612a5457600080fd5b8286015b848110156128835780516001600160401b03811115612a775760008081fd5b612a858986838b0101612531565b845250918301918301612a58565b600060208284031215612aa557600080fd5b81516001600160401b0380821115612abc57600080fd5b9083019060808286031215612ad057600080fd5b612ad8612217565b825182811115612ae757600080fd5b612af38782860161281f565b825250602083015182811115612b0857600080fd5b612b148782860161288e565b602083015250604083015182811115612b2c57600080fd5b612b388782860161288e565b604083015250606083015182811115612b5057600080fd5b612b5c87828601612a14565b60608301525095945050505050565b6001600160a01b03868116825285166020820152604081018490526060810183905260a060808201819052600090612ba5908301846120ba565b979650505050505050565b600081612bbf57612bbf6126e5565b506000190190565b60208082526026908201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6040820152651c8818d85b1b60d21b606082015260800190565b60008251612c1f81846020870161208e565b919091019291505056fea264697066735822122009898114db090d7745f5fb2f97d75198b07c29fc62eaf4acafcf21977525546564736f6c63430008090033

Deployed Bytecode

0x6080604052600436106101095760003560e01c8063a827db4611610095578063cc15009711610064578063cc150097146102f6578063dff3ca7d14610316578063e83aa3a814610336578063f2fde38b14610356578063f9338d181461037657600080fd5b8063a827db4614610266578063aa5d82c314610296578063c2eb5282146102b6578063c5389017146102d657600080fd5b8063715018a6116100dc578063715018a6146101c457806388f4950f146101d95780638da5cb5b146101f95780639abf6f1f146102215780639dd392391461025157600080fd5b80630633b14a1461010e57806313e7c9d8146101535780635c975abb146101835780636d44a3b2146101a2575b600080fd5b34801561011a57600080fd5b5061013e610129366004611fc3565b60026020526000908152604090205460ff1681565b60405190151581526020015b60405180910390f35b34801561015f57600080fd5b5061013e61016e366004611fc3565b60016020526000908152604090205460ff1681565b34801561018f57600080fd5b50600054600160a01b900460ff1661013e565b3480156101ae57600080fd5b506101c26101bd366004611fee565b61038b565b005b3480156101d057600080fd5b506101c2610422565b3480156101e557600080fd5b506101c26101f4366004611fee565b610458565b34801561020557600080fd5b506000546040516001600160a01b03909116815260200161014a565b34801561022d57600080fd5b5061013e61023c366004611fc3565b60056020526000908152604090205460ff1681565b34801561025d57600080fd5b506101c26104de565b34801561027257600080fd5b5061013e610281366004611fc3565b60046020526000908152604090205460ff1681565b6102a96102a4366004612027565b610545565b60405161014a91906120e6565b3480156102c257600080fd5b506101c26102d1366004612144565b610bc3565b3480156102e257600080fd5b506101c26102f136600461219a565b610cc3565b34801561030257600080fd5b506101c26103113660046122d3565b610dca565b34801561032257600080fd5b506101c2610331366004612144565b610fe0565b34801561034257600080fd5b506101c26103513660046123e6565b6110da565b34801561036257600080fd5b506101c2610371366004611fc3565b611222565b34801561038257600080fd5b506101c26112bd565b6000546001600160a01b031633146103be5760405162461bcd60e51b81526004016103b59061241d565b60405180910390fd5b6001600160a01b038216600081815260016020908152604091829020805460ff19168515159081179091558251938452908301527f2ee52be9d342458b3d25e07faada7ff9bc06723b4aa24edb6321ac1316b8a9dd91015b60405180910390a15050565b6000546001600160a01b0316331461044c5760405162461bcd60e51b81526004016103b59061241d565b61045660006112ef565b565b6000546001600160a01b031633146104825760405162461bcd60e51b81526004016103b59061241d565b6001600160a01b038216600081815260026020908152604091829020805460ff19168515159081179091558251938452908301527f25d7ce8d7e0b3990938766275ee2d54fbe81347d287bfbf0429838409a889fdc9101610416565b3360009081526002602052604090205460ff1661053d5760405162461bcd60e51b815260206004820152601b60248201527f4b7962657253776170526f6c653a206e6f7420677561726469616e000000000060448201526064016103b5565b61045661133f565b600054606090600160a01b900460ff16156105955760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b60448201526064016103b5565b61059d6113e4565b6105ad6060830160408401612452565b8063ffffffff164211156105f85760405162461bcd60e51b815260206004820152601260248201527116985c149bdd5d195c8e88195e1c1a5c995960721b60448201526064016103b5565b600060086106096020870187612478565b61ffff16901c905060006106206020870187612478565b9050600460006106366040880160208901611fc3565b6001600160a01b0316815260208101919091526040016000205460ff166106ab5760405162461bcd60e51b815260206004820152602360248201527f5a6170526f757465723a206e6f6e2077686974656c69737465642065786563756044820152623a37b960e91b60648201526084016103b5565b60ff81166107125761070d6106c3602088018861249c565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250610708925050506040880160208901611fc3565b61143e565b6107de565b60ff8116600114156107785761070d61072e602088018861249c565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250610773925050506040880160208901611fc3565b61161e565b60ff8116600214156107de576107de610794602088018861249c565b8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506107d9925050506040880160208901611fc3565b6117c2565b606060006107ef6020880188611fc3565b6001600160a01b031614610921576005600061080e6020890189611fc3565b6001600160a01b0316815260208101919091526040016000205460ff166108835760405162461bcd60e51b8152602060048201526024808201527f5a6170526f757465723a206e6f6e2077686974656c69737465642076616c696460448201526330ba37b960e11b60648201526084016103b5565b6108906020870187611fc3565b6001600160a01b031663c6256bef846108ac60408b018b61249c565b6040518463ffffffff1660e01b81526004016108ca9392919061250b565b60006040518083038186803b1580156108e257600080fd5b505afa1580156108f6573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261091e9190810190612594565b90505b6109316040870160208801611fc3565b6001600160a01b031663f012a2b63461094d60608a018a61249c565b6040518463ffffffff1660e01b815260040161096a9291906125c8565b6000604051808303818588803b15801561098357600080fd5b505af1158015610997573d6000803e3d6000fd5b50505050506040513d6000823e601f3d908101601f191682016040526109c09190810190612594565b945060006109d16020880188611fc3565b6001600160a01b031614610acd5760006109ee6020880188611fc3565b6001600160a01b031663af0a355785610a0a60608c018c61249c565b868b6040518663ffffffff1660e01b8152600401610a2c9594939291906125dc565b60206040518083038186803b158015610a4457600080fd5b505afa158015610a58573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a7c919061262b565b905080610acb5760405162461bcd60e51b815260206004820152601c60248201527f5a6170526f757465723a2076616c69646174696f6e206661696c65640000000060448201526064016103b5565b505b610ada602088018861249c565b604051610ae8929190612648565b60405190819003902060ff84167fc6c65320d36912d569b6a6e9cd567b0472cfe5c0e10c35f799df19912d6b9cef610b2360208a018a611fc3565b610b3360408b0160208c01611fc3565b610b4060408d018d61249c565b610b4d60608f018f61249c565b898e604051610b63989796959493929190612658565b60405180910390a37f095e66fa4dd6a6f7b43fb8444a7bd0edb870508c7abf639bc216efb0bcff9779610b99608088018861249c565b604051610ba79291906125c8565b60405180910390a150505050610bbd6001600355565b92915050565b6000546001600160a01b03163314610bed5760405162461bcd60e51b81526004016103b59061241d565b60005b82811015610cbd578160046000868685818110610c0f57610c0f6126cf565b9050602002016020810190610c249190611fc3565b6001600160a01b031681526020810191909152604001600020805460ff1916911515919091179055811515848483818110610c6157610c616126cf565b9050602002016020810190610c769190611fc3565b6001600160a01b03167f19f4c310cf148369e5605e8f3538cee4d3495da0612c9a45c0b89105ed6fee4d60405160405180910390a380610cb5816126fb565b915050610bf0565b50505050565b6000546001600160a01b03163314610ced5760405162461bcd60e51b81526004016103b59061241d565b6001600160a01b038116610d135760405162461bcd60e51b81526004016103b590612716565b60005b82811015610dc357846001600160a01b03166323b872dd3084878786818110610d4157610d416126cf565b6040516001600160e01b031960e088901b1681526001600160a01b03958616600482015294909316602485015250602090910201356044820152606401600060405180830381600087803b158015610d9857600080fd5b505af1158015610dac573d6000803e3d6000fd5b505050508080610dbb906126fb565b915050610d16565b5050505050565b6000546001600160a01b03163314610df45760405162461bcd60e51b81526004016103b59061241d565b6001600160a01b038116610e1a5760405162461bcd60e51b81526004016103b590612716565b83518514610e6a5760405162461bcd60e51b815260206004820152601e60248201527f4b535265736375653a20696e76616c6964206172726179206c656e677468000060448201526064016103b5565b60005b85811015610f6c57848181518110610e8757610e876126cf565b602002602001015160001415610f5c57876001600160a01b031662fdd58e30898985818110610eb857610eb86126cf565b6040516001600160e01b031960e087901b1681526001600160a01b039094166004850152602002919091013560248301525060440160206040518083038186803b158015610f0557600080fd5b505afa158015610f19573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f3d919061274d565b858281518110610f4f57610f4f6126cf565b6020026020010181815250505b610f65816126fb565b9050610e6d565b50604051631759616b60e11b81526001600160a01b03881690632eb2c2d690610fa590309085908b908b908b908b908b90600401612766565b600060405180830381600087803b158015610fbf57600080fd5b505af1158015610fd3573d6000803e3d6000fd5b5050505050505050505050565b6000546001600160a01b0316331461100a5760405162461bcd60e51b81526004016103b59061241d565b60005b82811015610cbd57816005600086868581811061102c5761102c6126cf565b90506020020160208101906110419190611fc3565b6001600160a01b031681526020810191909152604001600020805460ff191691151591909117905581151584848381811061107e5761107e6126cf565b90506020020160208101906110939190611fc3565b6001600160a01b03167f43572750395348a3948322f95d3b0bf4773311c6c19ec9a575cde194e5bac21160405160405180910390a3806110d2816126fb565b91505061100d565b6000546001600160a01b031633146111045760405162461bcd60e51b81526004016103b59061241d565b6001600160a01b03811661112a5760405162461bcd60e51b81526004016103b590612716565b8161113b57611138836119f4565b91505b811561121d5773eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6001600160a01b0384161415611209576000816001600160a01b03168360405160006040518083038185875af1925050503d80600081146111b3576040519150601f19603f3d011682016040523d82523d6000602084013e6111b8565b606091505b5050905080610cbd5760405162461bcd60e51b815260206004820152601d60248201527f4b535265736375653a204554485f5452414e534645525f4641494c454400000060448201526064016103b5565b61121d6001600160a01b0384168284611ab3565b505050565b6000546001600160a01b0316331461124c5760405162461bcd60e51b81526004016103b59061241d565b6001600160a01b0381166112b15760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016103b5565b6112ba816112ef565b50565b6000546001600160a01b031633146112e75760405162461bcd60e51b81526004016103b59061241d565b610456611b05565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600054600160a01b900460ff161561138c5760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b60448201526064016103b5565b6000805460ff60a01b1916600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586113c73390565b6040516001600160a01b03909116815260200160405180910390a1565b600260035414156114375760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016103b5565b6002600355565b6000828060200190518101906114549190612972565b60208101515181515191925014801561146e575080515115155b61148a5760405162461bcd60e51b81526004016103b5906129a6565b343360005b8351518110156115ff578351805173eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee9190839081106114c4576114c46126cf565b60200260200101516001600160a01b0316141561152c576000831180156115075750836020015181815181106114fc576114fc6126cf565b602002602001015183145b6115235760405162461bcd60e51b81526004016103b5906129dd565b60009250611586565b611586828686602001518481518110611547576115476126cf565b602002602001015187600001518581518110611565576115656126cf565b60200260200101516001600160a01b0316611b89909392919063ffffffff16565b8360200151818151811061159c5761159c6126cf565b6020026020010151846000015182815181106115ba576115ba6126cf565b60200260200101516001600160a01b03167f542ffabdd5320a08598fbaa483210c5e34df4cfbd7f2541470a88d43c640311460405160405180910390a360010161148f565b508115610dc35760405162461bcd60e51b81526004016103b5906129dd565b341561163c5760405162461bcd60e51b81526004016103b5906129dd565b6000828060200190518101906116529190612972565b60208101515181515191925014801561166c575080515115155b6116885760405162461bcd60e51b81526004016103b5906129a6565b60005b815151811015610cbd5781518051829081106116a9576116a96126cf565b60200260200101516001600160a01b03166342842e0e3385856020015185815181106116d7576116d76126cf565b60209081029190910101516040516001600160e01b031960e086901b1681526001600160a01b0393841660048201529290911660248301526044820152606401600060405180830381600087803b15801561173157600080fd5b505af1158015611745573d6000803e3d6000fd5b505050508160200151818151811061175f5761175f6126cf565b60200260200101518260000151828151811061177d5761177d6126cf565b60200260200101516001600160a01b03167fa6fb63d713a5a606436dc801f04dfdfd00d8e5211c54bc1332aeb047992c06f760405160405180910390a360010161168b565b34156117e05760405162461bcd60e51b81526004016103b5906129dd565b6000828060200190518101906117f69190612a93565b805151909150158015906118105750602081015151815151145b61182c5760405162461bcd60e51b81526004016103b5906129a6565b604081015151815151146118525760405162461bcd60e51b81526004016103b5906129a6565b606081015151815151146118785760405162461bcd60e51b81526004016103b5906129a6565b60005b815151811015610cbd578151805182908110611899576118996126cf565b60200260200101516001600160a01b031663f242432a3385856020015185815181106118c7576118c76126cf565b6020026020010151866040015186815181106118e5576118e56126cf565b602002602001015187606001518781518110611903576119036126cf565b60200260200101516040518663ffffffff1660e01b815260040161192b959493929190612b6b565b600060405180830381600087803b15801561194557600080fd5b505af1158015611959573d6000803e3d6000fd5b5050505081604001518181518110611973576119736126cf565b602002602001015182602001518281518110611991576119916126cf565b6020026020010151836000015183815181106119af576119af6126cf565b60200260200101516001600160a01b03167fc9efed9c685f673048e2e1c9ddf550a10f21608098f48dd9cf18c3f77028486260405160405180910390a460010161187b565b600073eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6001600160a01b0383161415611a22575047611a9c565b6040516370a0823160e01b81523060048201526001600160a01b038316906370a082319060240160206040518083038186803b158015611a6157600080fd5b505afa158015611a75573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a99919061274d565b90505b8015611aae57611aab81612bb0565b90505b919050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b17905261121d908490611be3565b600054600160a01b900460ff16611b555760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b60448201526064016103b5565b6000805460ff60a01b191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa336113c7565b604080516001600160a01b0385811660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b179052610cbd908590611cb5565b6000611c38826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316611d2b9092919063ffffffff16565b80519091501561121d5780806020019051810190611c56919061262b565b61121d5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016103b5565b6000611d0a826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316611d449092919063ffffffff16565b9050805160001480611c56575080806020019051810190611c56919061262b565b6060611d3a8484600085611d53565b90505b9392505050565b6060611d3a8484600085611e3e565b606082471015611d755760405162461bcd60e51b81526004016103b590612bc7565b843b611dc35760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016103b5565b600080866001600160a01b03168587604051611ddf9190612c0d565b60006040518083038185875af1925050503d8060008114611e1c576040519150601f19603f3d011682016040523d82523d6000602084013e611e21565b606091505b5091509150611e31828286611ecf565b925050505b949350505050565b606082471015611e605760405162461bcd60e51b81526004016103b590612bc7565b600080866001600160a01b03168587604051611e7c9190612c0d565b60006040518083038185875af1925050503d8060008114611eb9576040519150601f19603f3d011682016040523d82523d6000602084013e611ebe565b606091505b5091509150611e3187838387611f08565b60608315611ede575081611d3d565b825115611eee5782518084602001fd5b8160405162461bcd60e51b81526004016103b591906120e6565b60608315611f74578251611f6d576001600160a01b0385163b611f6d5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016103b5565b5081611e36565b611e368383815115611f895781518083602001fd5b8060405162461bcd60e51b81526004016103b591906120e6565b6001600160a01b03811681146112ba57600080fd5b8035611aae81611fa3565b600060208284031215611fd557600080fd5b8135611d3d81611fa3565b80151581146112ba57600080fd5b6000806040838503121561200157600080fd5b823561200c81611fa3565b9150602083013561201c81611fe0565b809150509250929050565b6000806040838503121561203a57600080fd5b82356001600160401b038082111561205157600080fd5b908401906080828703121561206557600080fd5b9092506020840135908082111561207b57600080fd5b50830160a0818603121561201c57600080fd5b60005b838110156120a9578181015183820152602001612091565b83811115610cbd5750506000910152565b600081518084526120d281602086016020860161208e565b601f01601f19169290920160200192915050565b602081526000611d3d60208301846120ba565b60008083601f84011261210b57600080fd5b5081356001600160401b0381111561212257600080fd5b6020830191508360208260051b850101111561213d57600080fd5b9250929050565b60008060006040848603121561215957600080fd5b83356001600160401b0381111561216f57600080fd5b61217b868287016120f9565b909450925050602084013561218f81611fe0565b809150509250925092565b600080600080606085870312156121b057600080fd5b84356121bb81611fa3565b935060208501356001600160401b038111156121d657600080fd5b6121e2878288016120f9565b90945092505060408501356121f681611fa3565b939692955090935050565b634e487b7160e01b600052604160045260246000fd5b604051608081016001600160401b038111828210171561223957612239612201565b60405290565b604051601f8201601f191681016001600160401b038111828210171561226757612267612201565b604052919050565b60006001600160401b0382111561228857612288612201565b5060051b60200190565b60008083601f8401126122a457600080fd5b5081356001600160401b038111156122bb57600080fd5b60208301915083602082850101111561213d57600080fd5b600080600080600080600060a0888a0312156122ee57600080fd5b87356122f981611fa3565b96506020888101356001600160401b038082111561231657600080fd5b6123228c838d016120f9565b909950975060408b013591508082111561233b57600080fd5b818b0191508b601f83011261234f57600080fd5b813561236261235d8261226f565b61223f565b81815260059190911b8301840190848101908e83111561238157600080fd5b938501935b8285101561239f57843582529385019390850190612386565b9850505060608b01359250808311156123b757600080fd5b50506123c58a828b01612292565b90945092506123d8905060808901611fb8565b905092959891949750929550565b6000806000606084860312156123fb57600080fd5b833561240681611fa3565b925060208401359150604084013561218f81611fa3565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60006020828403121561246457600080fd5b813563ffffffff81168114611d3d57600080fd5b60006020828403121561248a57600080fd5b813561ffff81168114611d3d57600080fd5b6000808335601e198436030181126124b357600080fd5b8301803591506001600160401b038211156124cd57600080fd5b60200191503681900382131561213d57600080fd5b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b60ff841681526040602082015260006125286040830184866124e2565b95945050505050565b600082601f83011261254257600080fd5b81516001600160401b0381111561255b5761255b612201565b61256e601f8201601f191660200161223f565b81815284602083860101111561258357600080fd5b611e3682602083016020870161208e565b6000602082840312156125a657600080fd5b81516001600160401b038111156125bc57600080fd5b611e3684828501612531565b602081526000611d3a6020830184866124e2565b60ff861681526080602082015260006125f96080830186886124e2565b828103604084015261260b81866120ba565b9050828103606084015261261f81856120ba565b98975050505050505050565b60006020828403121561263d57600080fd5b8151611d3d81611fe0565b8183823760009101908152919050565b6001600160a01b0389811682528816602082015260c060408201819052600090612685908301888a6124e2565b82810360608401526126988187896124e2565b905082810360808401526126ac81866120ba565b905082810360a08401526126c081856120ba565b9b9a5050505050505050505050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600060001982141561270f5761270f6126e5565b5060010190565b6020808252601b908201527f4b535265736375653a20696e76616c696420726563697069656e740000000000604082015260600190565b60006020828403121561275f57600080fd5b5051919050565b6001600160a01b03888116825287811660208084019190915260a0604084018190528301879052600091906001600160fb1b038811156127a557600080fd5b8760051b9150818960c0860137600091840160c08181018481528683039091016060870152885190819052828901939160e001905b808310156127fa57845182529383019360019290920191908301906127da565b50858103608087015261280e81888a6124e2565b9d9c50505050505050505050505050565b600082601f83011261283057600080fd5b8151602061284061235d8361226f565b82815260059290921b8401810191818101908684111561285f57600080fd5b8286015b8481101561288357805161287681611fa3565b8352918301918301612863565b509695505050505050565b600082601f83011261289f57600080fd5b815160206128af61235d8361226f565b82815260059290921b840181019181810190868411156128ce57600080fd5b8286015b8481101561288357805183529183019183016128d2565b6000604082840312156128fb57600080fd5b604051604081016001600160401b03828210818311171561291e5761291e612201565b81604052829350845191508082111561293657600080fd5b6129428683870161281f565b8352602085015191508082111561295857600080fd5b506129658582860161288e565b6020830152505092915050565b60006020828403121561298457600080fd5b81516001600160401b0381111561299a57600080fd5b611e36848285016128e9565b60208082526017908201527f5a6170526f757465723a20696e76616c69642064617461000000000000000000604082015260600190565b6020808252601c908201527f5a6170526f757465723a20696e76616c6964206d73672076616c756500000000604082015260600190565b600082601f830112612a2557600080fd5b81516020612a3561235d8361226f565b82815260059290921b84018101918181019086841115612a5457600080fd5b8286015b848110156128835780516001600160401b03811115612a775760008081fd5b612a858986838b0101612531565b845250918301918301612a58565b600060208284031215612aa557600080fd5b81516001600160401b0380821115612abc57600080fd5b9083019060808286031215612ad057600080fd5b612ad8612217565b825182811115612ae757600080fd5b612af38782860161281f565b825250602083015182811115612b0857600080fd5b612b148782860161288e565b602083015250604083015182811115612b2c57600080fd5b612b388782860161288e565b604083015250606083015182811115612b5057600080fd5b612b5c87828601612a14565b60608301525095945050505050565b6001600160a01b03868116825285166020820152604081018490526060810183905260a060808201819052600090612ba5908301846120ba565b979650505050505050565b600081612bbf57612bbf6126e5565b506000190190565b60208082526026908201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6040820152651c8818d85b1b60d21b606082015260800190565b60008251612c1f81846020870161208e565b919091019291505056fea264697066735822122009898114db090d7745f5fb2f97d75198b07c29fc62eaf4acafcf21977525546564736f6c63430008090033

Deployed Bytecode Sourcemap

1032:5501:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;300:41:7;;;;;;;;;;-1:-1:-1;300:41:7;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;706:14:25;;699:22;681:41;;669:2;654:18;300:41:7;;;;;;;;255;;;;;;;;;;-1:-1:-1;255:41:7;;;;;:::i;:::-;;;;;;;;;;;;;;;;1041:84:9;;;;;;;;;;-1:-1:-1;1088:4:9;1111:7;-1:-1:-1;;;1111:7:9;;;;1041:84;;1255:165:7;;;;;;;;;;-1:-1:-1;1255:165:7;;;;;:::i;:::-;;:::i;:::-;;1605:92:8;;;;;;;;;;;;;:::i;1523:165:7:-;;;;;;;;;;-1:-1:-1;1523:165:7;;;;;:::i;:::-;;:::i;973:85:8:-;;;;;;;;;;-1:-1:-1;1019:7:8;1045:6;973:85;;-1:-1:-1;;;;;1045:6:8;;;1389:51:25;;1377:2;1362:18;973:85:8;1243:203:25;1312:52:0;;;;;;;;;;-1:-1:-1;1312:52:0;;;;;:::i;:::-;;;;;;;;;;;;;;;;1946:65:7;;;;;;;;;;;;;:::i;1257:51:0:-;;;;;;;;;;-1:-1:-1;1257:51:0;;;;;:::i;:::-;;;;;;;;;;;;;;;;2298:1771;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;1579:298::-;;;;;;;;;;-1:-1:-1;1579:298:0;;;;;:::i;:::-;;:::i;298:319:6:-;;;;;;;;;;-1:-1:-1;298:319:6;;;;;:::i;:::-;;:::i;621:559::-;;;;;;;;;;-1:-1:-1;621:559:6;;;;;:::i;:::-;;:::i;1950:305:0:-;;;;;;;;;;-1:-1:-1;1950:305:0;;;;;:::i;:::-;;:::i;440:475:5:-;;;;;;;;;;-1:-1:-1;440:475:5;;;;;:::i;:::-;;:::i;1846:189:8:-;;;;;;;;;;-1:-1:-1;1846:189:8;;;;;:::i;:::-;;:::i;1787:63:7:-;;;;;;;;;;;;;:::i;1255:165::-;1019:7:8;1045:6;-1:-1:-1;;;;;1045:6:8;666:10:15;1185:23:8;1177:68;;;;-1:-1:-1;;;1177:68:8;;;;;;;:::i;:::-;;;;;;;;;-1:-1:-1;;;;;1338:15:7;::::1;;::::0;;;:9:::1;:15;::::0;;;;;;;;:31;;-1:-1:-1;;1338:31:7::1;::::0;::::1;;::::0;;::::1;::::0;;;1380:35;;8481:51:25;;;8548:18;;;8541:50;1380:35:7::1;::::0;8454:18:25;1380:35:7::1;;;;;;;;1255:165:::0;;:::o;1605:92:8:-;1019:7;1045:6;-1:-1:-1;;;;;1045:6:8;666:10:15;1185:23:8;1177:68;;;;-1:-1:-1;;;1177:68:8;;;;;;;:::i;:::-;1669:21:::1;1687:1;1669:9;:21::i;:::-;1605:92::o:0;1523:165:7:-;1019:7:8;1045:6;-1:-1:-1;;;;;1045:6:8;666:10:15;1185:23:8;1177:68;;;;-1:-1:-1;;;1177:68:8;;;;;;;:::i;:::-;-1:-1:-1;;;;;1606:15:7;::::1;;::::0;;;:9:::1;:15;::::0;;;;;;;;:31;;-1:-1:-1;;1606:31:7::1;::::0;::::1;;::::0;;::::1;::::0;;;1648:35;;8481:51:25;;;8548:18;;;8541:50;1648:35:7::1;::::0;8454:18:25;1648:35:7::1;8313:284:25::0;1946:65:7;1097:10;1087:21;;;;:9;:21;;;;;;;;1079:61;;;;-1:-1:-1;;;1079:61:7;;8804:2:25;1079:61:7;;;8786:21:25;8843:2;8823:18;;;8816:30;8882:29;8862:18;;;8855:57;8929:18;;1079:61:7;8602:351:25;1079:61:7;1998:8:::1;:6;:8::i;2298:1771:0:-:0;1088:4:9;1111:7;2505:23:0;;-1:-1:-1;;;1111:7:9;;;;1354:9;1346:38;;;;-1:-1:-1;;;1346:38:9;;9160:2:25;1346:38:9;;;9142:21:25;9199:2;9179:18;;;9172:30;-1:-1:-1;;;9218:18:25;;;9211:46;9274:18;;1346:38:9;8958:340:25;1346:38:9;2261:21:17::1;:19;:21::i;:::-;2477:13:0::2;::::0;;;::::2;::::0;::::2;;:::i;:::-;1443:9;1424:28;;:15;:28;;1416:59;;;::::0;-1:-1:-1;;;1416:59:0;;9786:2:25;1416:59:0::2;::::0;::::2;9768:21:25::0;9825:2;9805:18;;;9798:30;-1:-1:-1;;;9844:18:25;;;9837:48;9902:18;;1416:59:0::2;9584:342:25::0;1416:59:0::2;2538:13:::3;2578:1;2560:14;;::::0;::::3;:5:::0;:14:::3;:::i;:::-;:19;;::::0;::::3;::::0;-1:-1:-1;2586:13:0::3;2608:14;;::::0;::::3;:5:::0;:14:::3;:::i;:::-;2586:37:::0;-1:-1:-1;2638:19:0::3;:34;2658:13;::::0;;;::::3;::::0;::::3;;:::i;:::-;-1:-1:-1::0;;;;;2638:34:0::3;::::0;;::::3;::::0;::::3;::::0;;;;;;-1:-1:-1;2638:34:0;;::::3;;2630:82;;;::::0;-1:-1:-1;;;2630:82:0;;10410:2:25;2630:82:0::3;::::0;::::3;10392:21:25::0;10449:2;10429:18;;;10422:30;10488:34;10468:18;;;10461:62;-1:-1:-1;;;10539:18:25;;;10532:33;10582:19;;2630:82:0::3;10208:399:25::0;2630:82:0::3;2758:36;::::0;::::3;2754:354;;2804:55;2830:13;;::::0;::::3;:5:::0;:13:::3;:::i;:::-;2804:55;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::3;::::0;;;;-1:-1:-1;2845:13:0::3;::::0;-1:-1:-1;;;2845:13:0;;;::::3;::::0;::::3;;:::i;:::-;2804:25;:55::i;:::-;2754:354;;;2876:37;::::0;::::3;2893:19;2876:37;2872:236;;;2923:56;2950:13;;::::0;::::3;:5:::0;:13:::3;:::i;:::-;2923:56;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::3;::::0;;;;-1:-1:-1;2965:13:0::3;::::0;-1:-1:-1;;;2965:13:0;;;::::3;::::0;::::3;;:::i;:::-;2923:26;:56::i;2872:236::-;2996:38;::::0;::::3;3013:20;2996:38;2992:116;;;3044:57;3072:13;;::::0;::::3;:5:::0;:13:::3;:::i;:::-;3044:57;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::3;::::0;;;;-1:-1:-1;3087:13:0::3;::::0;-1:-1:-1;;;3087:13:0;;;::::3;::::0;::::3;;:::i;:::-;3044:27;:57::i;:::-;3145:24;3205:1;3179:14;;::::0;::::3;:4:::0;:14:::3;:::i;:::-;-1:-1:-1::0;;;;;3179:28:0::3;;3175:231;;3225:20;:36;3246:14;;::::0;::::3;:4:::0;:14:::3;:::i;:::-;-1:-1:-1::0;;;;;3225:36:0::3;::::0;;::::3;::::0;::::3;::::0;;;;;;-1:-1:-1;3225:36:0;;::::3;;3217:85;;;::::0;-1:-1:-1;;;3217:85:0;;11472:2:25;3217:85:0::3;::::0;::::3;11454:21:25::0;11511:2;11491:18;;;11484:30;11550:34;11530:18;;;11523:62;-1:-1:-1;;;11601:18:25;;;11594:34;11645:19;;3217:85:0::3;11270:400:25::0;3217:85:0::3;3338:14;;::::0;::::3;:4:::0;:14:::3;:::i;:::-;-1:-1:-1::0;;;;;3324:51:0::3;;3376:7:::0;3385:13:::3;;::::0;::::3;:5:::0;:13:::3;:::i;:::-;3324:75;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;::::0;::::3;;;;;;;;;;;;::::0;::::3;;;;;;;;;;;;;;;;;::::0;;::::3;-1:-1:-1::0;;3324:75:0::3;::::0;::::3;;::::0;::::3;::::0;;;::::3;::::0;::::3;:::i;:::-;3310:89;;3175:231;3495:13;::::0;;;::::3;::::0;::::3;;:::i;:::-;-1:-1:-1::0;;;;;3474:46:0::3;;3528:9;3539:17;;::::0;::::3;:4:::0;:17:::3;:::i;:::-;3474:83;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;::::0;::::3;;;;;;;;;;;;::::0;::::3;;;;;;;;;;;;;;;;;;::::0;;::::3;-1:-1:-1::0;;3474:83:0::3;::::0;::::3;;::::0;::::3;::::0;;;::::3;::::0;::::3;:::i;:::-;3461:96:::0;-1:-1:-1;3639:1:0::3;3613:14;;::::0;::::3;:4:::0;:14:::3;:::i;:::-;-1:-1:-1::0;;;;;3613:28:0::3;;3609:229;;3651:12;3680:14;;::::0;::::3;:4:::0;:14:::3;:::i;:::-;-1:-1:-1::0;;;;;3666:42:0::3;;3718:7:::0;3727:15:::3;;::::0;::::3;:5:::0;:15:::3;:::i;:::-;3744:11;3757:10;3666:109;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;::::0;::::3;;;;;;;;;;;;::::0;::::3;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;3651:124;;3791:7;3783:48;;;::::0;-1:-1:-1;;;3783:48:0;;14464:2:25;3783:48:0::3;::::0;::::3;14446:21:25::0;14503:2;14483:18;;;14476:30;14542;14522:18;;;14515:58;14590:18;;3783:48:0::3;14262:352:25::0;3783:48:0::3;3643:195;3609:229;3883:13;;::::0;::::3;:5:::0;:13:::3;:::i;:::-;3849:177;;;;;;;:::i;:::-;;::::0;;;;::::3;::::0;;::::3;::::0;::::3;;3904:14;;::::0;::::3;:4:::0;:14:::3;:::i;:::-;3926:13;::::0;;;::::3;::::0;::::3;;:::i;:::-;3947;;::::0;::::3;:5:::0;:13:::3;:::i;:::-;3968:15;;::::0;::::3;:5:::0;:15:::3;:::i;:::-;3991:11;4010:10;3849:177;;;;;;;;;;;;;:::i;:::-;;;;;;;;4037:27;4048:15;;::::0;::::3;:4:::0;:15:::3;:::i;:::-;4037:27;;;;;;;:::i;:::-;;;;;;;;2532:1537;;;2292:1:17::2;2303:20:::1;1716:1:::0;2809:7;:22;2629:209;2303:20:::1;2298:1771:0::0;;;;:::o;1579:298::-;1019:7:8;1045:6;-1:-1:-1;;;;;1045:6:8;666:10:15;1185:23:8;1177:68;;;;-1:-1:-1;;;1177:68:8;;;;;;;:::i;:::-;1701:9:0::1;1696:177;1716:21:::0;;::::1;1696:177;;;1789:14;1752:19;:34;1772:10;;1783:1;1772:13;;;;;;;:::i;:::-;;;;;;;;;;;;;;:::i;:::-;-1:-1:-1::0;;;;;1752:34:0::1;::::0;;::::1;::::0;::::1;::::0;;;;;;-1:-1:-1;1752:34:0;:51;;-1:-1:-1;;1752:51:0::1;::::0;::::1;;::::0;;;::::1;::::0;;1816:50;::::1;;1836:10:::0;;1847:1;1836:13;;::::1;;;;;:::i;:::-;;;;;;;;;;;;;;:::i;:::-;-1:-1:-1::0;;;;;1816:50:0::1;;;;;;;;;;;1739:3:::0;::::1;::::0;::::1;:::i;:::-;;;;1696:177;;;;1579:298:::0;;;:::o;298:319:6:-;1019:7:8;1045:6;-1:-1:-1;;;;;1045:6:8;666:10:15;1185:23:8;1177:68;;;;-1:-1:-1;;;1177:68:8;;;;;;;:::i;:::-;-1:-1:-1;;;;;433:23:6;::::1;425:63;;;;-1:-1:-1::0;;;425:63:6::1;;;;;;;:::i;:::-;499:9;494:119;514:15:::0;;::::1;494:119;;;552:5;-1:-1:-1::0;;;;;544:27:6::1;;580:4;587:9;598:4;;603:1;598:7;;;;;;;:::i;:::-;544:62;::::0;-1:-1:-1;;;;;;544:62:6::1;::::0;;;;;;-1:-1:-1;;;;;16871:15:25;;;544:62:6::1;::::0;::::1;16853:34:25::0;16923:15;;;;16903:18;;;16896:43;-1:-1:-1;598:7:6::1;::::0;;::::1;;;16955:18:25::0;;;16948:34;16788:18;;544:62:6::1;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;531:3;;;;;:::i;:::-;;;;494:119;;;;298:319:::0;;;;:::o;621:559::-;1019:7:8;1045:6;-1:-1:-1;;;;;1045:6:8;666:10:15;1185:23:8;1177:68;;;;-1:-1:-1;;;1177:68:8;;;;;;;:::i;:::-;-1:-1:-1;;;;;811:23:6;::::1;803:63;;;;-1:-1:-1::0;;;803:63:6::1;;;;;;;:::i;:::-;894:14:::0;;880:28;::::1;872:71;;;::::0;-1:-1:-1;;;872:71:6;;17195:2:25;872:71:6::1;::::0;::::1;17177:21:25::0;17234:2;17214:18;;;17207:30;17273:32;17253:18;;;17246:60;17323:18;;872:71:6::1;16993:354:25::0;872:71:6::1;954:9;949:138;969:14:::0;;::::1;949:138;;;1002:7;1010:1;1002:10;;;;;;;;:::i;:::-;;;;;;;1016:1;1002:15;998:82;;;1041:5;-1:-1:-1::0;;;;;1032:25:6::1;;1066:4;1073:3;;1077:1;1073:6;;;;;;;:::i;:::-;1032:48;::::0;-1:-1:-1;;;;;;1032:48:6::1;::::0;;;;;;-1:-1:-1;;;;;17544:32:25;;;1032:48:6::1;::::0;::::1;17526:51:25::0;1073:6:6::1;;::::0;;;::::1;;17593:18:25::0;;;17586:34;-1:-1:-1;17499:18:25;;1032:48:6::1;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;1019:7;1027:1;1019:10;;;;;;;;:::i;:::-;;;;;;:61;;;::::0;::::1;998:82;985:3;::::0;::::1;:::i;:::-;;;949:138;;;-1:-1:-1::0;1092:83:6::1;::::0;-1:-1:-1;;;1092:83:6;;-1:-1:-1;;;;;1092:37:6;::::1;::::0;::::1;::::0;:83:::1;::::0;1138:4:::1;::::0;1145:9;;1156:3;;;;1161:7;;1170:4;;;;1092:83:::1;;;:::i;:::-;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;621:559:::0;;;;;;;:::o;1950:305:0:-;1019:7:8;1045:6;-1:-1:-1;;;;;1045:6:8;666:10:15;1185:23:8;1177:68;;;;-1:-1:-1;;;1177:68:8;;;;;;;:::i;:::-;2074:9:0::1;2069:182;2089:22:::0;;::::1;2069:182;;;2165:14;2126:20;:36;2147:11;;2159:1;2147:14;;;;;;;:::i;:::-;;;;;;;;;;;;;;:::i;:::-;-1:-1:-1::0;;;;;2126:36:0::1;::::0;;::::1;::::0;::::1;::::0;;;;;;-1:-1:-1;2126:36:0;:53;;-1:-1:-1;;2126:53:0::1;::::0;::::1;;::::0;;;::::1;::::0;;2192:52;::::1;;2213:11:::0;;2225:1;2213:14;;::::1;;;;;:::i;:::-;;;;;;;;;;;;;;:::i;:::-;-1:-1:-1::0;;;;;2192:52:0::1;;;;;;;;;;;2113:3:::0;::::1;::::0;::::1;:::i;:::-;;;;2069:182;;440:475:5::0;1019:7:8;1045:6;-1:-1:-1;;;;;1045:6:8;666:10:15;1185:23:8;1177:68;;;;-1:-1:-1;;;1177:68:8;;;;;;;:::i;:::-;-1:-1:-1;;;;;544:23:5;::::1;536:63;;;;-1:-1:-1::0;;;536:63:5::1;;;;;;;:::i;:::-;609:11:::0;605:52:::1;;631:26;651:5;631:19;:26::i;:::-;622:35;;605:52;667:10:::0;;663:248:::1;;392:42:::0;-1:-1:-1;;;;;1260:20:5;;;687:218:::1;;;717:12;734:9;-1:-1:-1::0;;;;;734:14:5::1;756:6;734:33;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;716:51;;;785:7;777:49;;;::::0;-1:-1:-1;;;777:49:5;;19621:2:25;777:49:5::1;::::0;::::1;19603:21:25::0;19660:2;19640:18;;;19633:30;19699:31;19679:18;;;19672:59;19748:18;;777:49:5::1;19419:353:25::0;687:218:5::1;851:45;-1:-1:-1::0;;;;;851:26:5;::::1;878:9:::0;889:6;851:26:::1;:45::i;:::-;440:475:::0;;;:::o;1846:189:8:-;1019:7;1045:6;-1:-1:-1;;;;;1045:6:8;666:10:15;1185:23:8;1177:68;;;;-1:-1:-1;;;1177:68:8;;;;;;;:::i;:::-;-1:-1:-1;;;;;1934:22:8;::::1;1926:73;;;::::0;-1:-1:-1;;;1926:73:8;;19979:2:25;1926:73:8::1;::::0;::::1;19961:21:25::0;20018:2;19998:18;;;19991:30;20057:34;20037:18;;;20030:62;-1:-1:-1;;;20108:18:25;;;20101:36;20154:19;;1926:73:8::1;19777:402:25::0;1926:73:8::1;2009:19;2019:8;2009:9;:19::i;:::-;1846:189:::0;:::o;1787:63:7:-;1019:7:8;1045:6;-1:-1:-1;;;;;1045:6:8;666:10:15;1185:23:8;1177:68;;;;-1:-1:-1;;;1177:68:8;;;;;;;:::i;:::-;1835:10:7::1;:8;:10::i;2041:169:8:-:0;2096:16;2115:6;;-1:-1:-1;;;;;2131:17:8;;;-1:-1:-1;;;;;;2131:17:8;;;;;;2163:40;;2115:6;;;;;;;2163:40;;2096:16;2163:40;2086:124;2041:169;:::o;1806:115:9:-;1088:4;1111:7;-1:-1:-1;;;1111:7:9;;;;1354:9;1346:38;;;;-1:-1:-1;;;1346:38:9;;9160:2:25;1346:38:9;;;9142:21:25;9199:2;9179:18;;;9172:30;-1:-1:-1;;;9218:18:25;;;9211:46;9274:18;;1346:38:9;8958:340:25;1346:38:9;1865:7:::1;:14:::0;;-1:-1:-1;;;;1865:14:9::1;-1:-1:-1::0;;;1865:14:9::1;::::0;;1894:20:::1;1901:12;666:10:15::0;;587:96;1901:12:9::1;1894:20;::::0;-1:-1:-1;;;;;1407:32:25;;;1389:51;;1377:2;1362:18;1894:20:9::1;;;;;;;1806:115::o:0;2336:287:17:-;1759:1;2468:7;;:19;;2460:63;;;;-1:-1:-1;;;2460:63:17;;20386:2:25;2460:63:17;;;20368:21:25;20425:2;20405:18;;;20398:30;20464:33;20444:18;;;20437:61;20515:18;;2460:63:17;20184:355:25;2460:63:17;1759:1;2598:7;:18;2336:287::o;4143:898:0:-;4235:23;4272:8;4261:36;;;;;;;;;;;;:::i;:::-;4339:11;;;;:18;4318:10;;:17;4235:62;;-1:-1:-1;4318:39:0;:64;;;;-1:-1:-1;4361:10:0;;:17;:21;;4318:64;4303:112;;;;-1:-1:-1;;;4303:112:0;;;;;;;:::i;:::-;4440:9;4475:10;4421:16;4491:486;4515:10;;:17;4511:21;;4491:486;;;4547:10;;:13;;1209:42;;4547:10;4558:1;;4547:13;;;;;;:::i;:::-;;;;;;;-1:-1:-1;;;;;4547:28:0;;4543:331;;;4678:1;4667:8;:12;:42;;;;;4695:3;:11;;;4707:1;4695:14;;;;;;;;:::i;:::-;;;;;;;4683:8;:26;4667:42;4659:83;;;;-1:-1:-1;;;4659:83:0;;;;;;;:::i;:::-;4763:1;4752:12;;4543:331;;;4789:76;4828:9;4839;4850:3;:11;;;4862:1;4850:14;;;;;;;;:::i;:::-;;;;;;;4796:3;:10;;;4807:1;4796:13;;;;;;;;:::i;:::-;;;;;;;-1:-1:-1;;;;;4789:38:0;;;:76;;;;;;:::i;:::-;4916:3;:11;;;4928:1;4916:14;;;;;;;;:::i;:::-;;;;;;;4901:3;:10;;;4912:1;4901:13;;;;;;;;:::i;:::-;;;;;;;-1:-1:-1;;;;;4886:45:0;;;;;;;;;;;4959:3;;4491:486;;;-1:-1:-1;4990:13:0;;4982:54;;;;-1:-1:-1;;;4982:54:0;;;;;;;:::i;5115:557::-;5216:9;:14;5208:55;;;;-1:-1:-1;;;5208:55:0;;;;;;;:::i;:::-;5269:24;5307:8;5296:37;;;;;;;;;;;;:::i;:::-;5368:7;;;;:14;5347:10;;:17;5269:64;;-1:-1:-1;5347:35:0;:60;;;;-1:-1:-1;5386:10:0;;:17;:21;;5347:60;5339:96;;;;-1:-1:-1;;;5339:96:0;;;;;;;:::i;:::-;5446:9;5441:227;5465:10;;:17;5461:21;;5441:227;;;5501:10;;:13;;5512:1;;5501:13;;;;;;:::i;:::-;;;;;;;-1:-1:-1;;;;;5493:39:0;;5533:10;5545:9;5556:3;:7;;;5564:1;5556:10;;;;;;;;:::i;:::-;;;;;;;;;;;5493:74;;-1:-1:-1;;;;;;5493:74:0;;;;;;;-1:-1:-1;;;;;16871:15:25;;;5493:74:0;;;16853:34:25;16923:15;;;;16903:18;;;16896:43;16955:18;;;16948:34;16788:18;;5493:74:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5611:3;:7;;;5619:1;5611:10;;;;;;;;:::i;:::-;;;;;;;5596:3;:10;;;5607:1;5596:13;;;;;;;;:::i;:::-;;;;;;;-1:-1:-1;;;;;5580:42:0;;;;;;;;;;;5650:3;;5441:227;;5747:784;5849:9;:14;5841:55;;;;-1:-1:-1;;;5841:55:0;;;;;;;:::i;:::-;5902:25;5941:8;5930:38;;;;;;;;;;;;:::i;:::-;5982:10;;:17;5902:66;;-1:-1:-1;5982:21:0;;;;:60;;-1:-1:-1;6028:7:0;;;;:14;6007:10;;:17;:35;5982:60;5974:96;;;;-1:-1:-1;;;5974:96:0;;;;;;;:::i;:::-;6105:11;;;;:18;6084:10;;:17;:39;6076:75;;;;-1:-1:-1;;;6076:75:0;;;;;;;:::i;:::-;6186:9;;;;:16;6165:10;;:17;:37;6157:73;;;;-1:-1:-1;;;6157:73:0;;;;;;;:::i;:::-;6241:9;6236:291;6260:10;;:17;6256:21;;6236:291;;;6297:10;;:13;;6308:1;;6297:13;;;;;;:::i;:::-;;;;;;;-1:-1:-1;;;;;6288:40:0;;6338:10;6350:9;6361:3;:7;;;6369:1;6361:10;;;;;;;;:::i;:::-;;;;;;;6373:3;:11;;;6385:1;6373:14;;;;;;;;:::i;:::-;;;;;;;6389:3;:9;;;6399:1;6389:12;;;;;;;;:::i;:::-;;;;;;;6288:121;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6466:3;:11;;;6478:1;6466:14;;;;;;;;:::i;:::-;;;;;;;6454:3;:7;;;6462:1;6454:10;;;;;;;;:::i;:::-;;;;;;;6439:3;:10;;;6450:1;6439:13;;;;;;;;:::i;:::-;;;;;;;-1:-1:-1;;;;;6422:59:0;;;;;;;;;;;6509:3;;6236:291;;919:263:5;994:14;392:42;-1:-1:-1;;;;;1260:20:5;;;1016:132;;;-1:-1:-1;1052:21:5;1016:132;;;1103:38;;-1:-1:-1;;;1103:38:5;;1135:4;1103:38;;;1389:51:25;-1:-1:-1;;;;;1103:23:5;;;;;1362:18:25;;1103:38:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;1094:47;;1016:132;1157:10;;1153:24;;1169:8;;;:::i;:::-;;;1153:24;919:263;;;:::o;634:205:12:-;773:58;;;-1:-1:-1;;;;;17544:32:25;;773:58:12;;;17526:51:25;17593:18;;;;17586:34;;;773:58:12;;;;;;;;;;17499:18:25;;;;773:58:12;;;;;;;;-1:-1:-1;;;;;773:58:12;-1:-1:-1;;;773:58:12;;;746:86;;766:5;;746:19;:86::i;2053:117:9:-;1088:4;1111:7;-1:-1:-1;;;1111:7:9;;;;1612:41;;;;-1:-1:-1;;;1612:41:9;;27191:2:25;1612:41:9;;;27173:21:25;27230:2;27210:18;;;27203:30;-1:-1:-1;;;27249:18:25;;;27242:50;27309:18;;1612:41:9;26989:344:25;1612:41:9;2121:5:::1;2111:15:::0;;-1:-1:-1;;;;2111:15:9::1;::::0;;2141:22:::1;666:10:15::0;2150:12:9::1;587:96:15::0;1355:203:21;1482:68;;;-1:-1:-1;;;;;16871:15:25;;;1482:68:21;;;16853:34:25;16923:15;;16903:18;;;16896:43;16955:18;;;;16948:34;;;1482:68:21;;;;;;;;;;16788:18:25;;;;1482:68:21;;;;;;;;-1:-1:-1;;;;;1482:68:21;-1:-1:-1;;;1482:68:21;;;1455:96;;1475:5;;1455:19;:96::i;3140:706:12:-;3559:23;3585:69;3613:4;3585:69;;;;;;;;;;;;;;;;;3593:5;-1:-1:-1;;;;;3585:27:12;;;:69;;;;;:::i;:::-;3668:17;;3559:95;;-1:-1:-1;3668:21:12;3664:176;;3763:10;3752:30;;;;;;;;;;;;:::i;:::-;3744:85;;;;-1:-1:-1;;;3744:85:12;;27540:2:25;3744:85:12;;;27522:21:25;27579:2;27559:18;;;27552:30;27618:34;27598:18;;;27591:62;-1:-1:-1;;;27669:18:25;;;27662:40;27719:19;;3744:85:12;27338:406:25;5196:642:21;5615:23;5641:69;5669:4;5641:69;;;;;;;;;;;;;;;;;5649:5;-1:-1:-1;;;;;5641:27:21;;;:69;;;;;:::i;:::-;5615:95;;5728:10;:17;5749:1;5728:22;:56;;;;5765:10;5754:30;;;;;;;;;;;;:::i;3461:223:14:-;3594:12;3625:52;3647:6;3655:4;3661:1;3664:12;3625:21;:52::i;:::-;3618:59;;3461:223;;;;;;:::o;4108::23:-;4241:12;4272:52;4294:6;4302:4;4308:1;4311:12;4272:21;:52::i;4548:499:14:-;4713:12;4770:5;4745:21;:30;;4737:81;;;;-1:-1:-1;;;4737:81:14;;;;;;;:::i;:::-;1034:20;;4828:60;;;;-1:-1:-1;;;4828:60:14;;28358:2:25;4828:60:14;;;28340:21:25;28397:2;28377:18;;;28370:30;28436:31;28416:18;;;28409:59;28485:18;;4828:60:14;28156:353:25;4828:60:14;4900:12;4914:23;4941:6;-1:-1:-1;;;;;4941:11:14;4960:5;4967:4;4941:31;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4899:73;;;;4989:51;5006:7;5015:10;5027:12;4989:16;:51::i;:::-;4982:58;;;;4548:499;;;;;;;:::o;5165:446:23:-;5330:12;5387:5;5362:21;:30;;5354:81;;;;-1:-1:-1;;;5354:81:23;;;;;;;:::i;:::-;5446:12;5460:23;5487:6;-1:-1:-1;;;;;5487:11:23;5506:5;5513:4;5487:31;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5445:73;;;;5535:69;5562:6;5570:7;5579:10;5591:12;5535:26;:69::i;7161:692:14:-;7307:12;7335:7;7331:516;;;-1:-1:-1;7365:10:14;7358:17;;7331:516;7476:17;;:21;7472:365;;7670:10;7664:17;7730:15;7717:10;7713:2;7709:19;7702:44;7472:365;7809:12;7802:20;;-1:-1:-1;;;7802:20:14;;;;;;;;:::i;7671:628:23:-;7851:12;7879:7;7875:418;;;7906:17;;7902:286;;-1:-1:-1;;;;;1702:19:23;;;8113:60;;;;-1:-1:-1;;;8113:60:23;;28358:2:25;8113:60:23;;;28340:21:25;28397:2;28377:18;;;28370:30;28436:31;28416:18;;;28409:59;28485:18;;8113:60:23;28156:353:25;8113:60:23;-1:-1:-1;8208:10:23;8201:17;;7875:418;8249:33;8257:10;8269:12;8980:17;;:21;8976:379;;9208:10;9202:17;9264:15;9251:10;9247:2;9243:19;9236:44;8976:379;9331:12;9324:20;;-1:-1:-1;;;9324:20:23;;;;;;;;:::i;14:131:25:-;-1:-1:-1;;;;;89:31:25;;79:42;;69:70;;135:1;132;125:12;150:134;218:20;;247:31;218:20;247:31;:::i;289:247::-;348:6;401:2;389:9;380:7;376:23;372:32;369:52;;;417:1;414;407:12;369:52;456:9;443:23;475:31;500:5;475:31;:::i;733:118::-;819:5;812:13;805:21;798:5;795:32;785:60;;841:1;838;831:12;856:382;921:6;929;982:2;970:9;961:7;957:23;953:32;950:52;;;998:1;995;988:12;950:52;1037:9;1024:23;1056:31;1081:5;1056:31;:::i;:::-;1106:5;-1:-1:-1;1163:2:25;1148:18;;1135:32;1176:30;1135:32;1176:30;:::i;:::-;1225:7;1215:17;;;856:382;;;;;:::o;1451:687::-;1587:6;1595;1648:2;1636:9;1627:7;1623:23;1619:32;1616:52;;;1664:1;1661;1654:12;1616:52;1704:9;1691:23;-1:-1:-1;;;;;1774:2:25;1766:6;1763:14;1760:34;;;1790:1;1787;1780:12;1760:34;1813:22;;;;1869:3;1851:16;;;1847:26;1844:46;;;1886:1;1883;1876:12;1844:46;1909:2;;-1:-1:-1;1964:2:25;1949:18;;1936:32;;1980:16;;;1977:36;;;2009:1;2006;1999:12;1977:36;-1:-1:-1;2032:24:25;;2090:3;2072:16;;;2068:26;2065:46;;;2107:1;2104;2097:12;2143:258;2215:1;2225:113;2239:6;2236:1;2233:13;2225:113;;;2315:11;;;2309:18;2296:11;;;2289:39;2261:2;2254:10;2225:113;;;2356:6;2353:1;2350:13;2347:48;;;-1:-1:-1;;2391:1:25;2373:16;;2366:27;2143:258::o;2406:257::-;2447:3;2485:5;2479:12;2512:6;2507:3;2500:19;2528:63;2584:6;2577:4;2572:3;2568:14;2561:4;2554:5;2550:16;2528:63;:::i;:::-;2645:2;2624:15;-1:-1:-1;;2620:29:25;2611:39;;;;2652:4;2607:50;;2406:257;-1:-1:-1;;2406:257:25:o;2668:217::-;2815:2;2804:9;2797:21;2778:4;2835:44;2875:2;2864:9;2860:18;2852:6;2835:44;:::i;2890:367::-;2953:8;2963:6;3017:3;3010:4;3002:6;2998:17;2994:27;2984:55;;3035:1;3032;3025:12;2984:55;-1:-1:-1;3058:20:25;;-1:-1:-1;;;;;3090:30:25;;3087:50;;;3133:1;3130;3123:12;3087:50;3170:4;3162:6;3158:17;3146:29;;3230:3;3223:4;3213:6;3210:1;3206:14;3198:6;3194:27;3190:38;3187:47;3184:67;;;3247:1;3244;3237:12;3184:67;2890:367;;;;;:::o;3262:566::-;3354:6;3362;3370;3423:2;3411:9;3402:7;3398:23;3394:32;3391:52;;;3439:1;3436;3429:12;3391:52;3479:9;3466:23;-1:-1:-1;;;;;3504:6:25;3501:30;3498:50;;;3544:1;3541;3534:12;3498:50;3583:70;3645:7;3636:6;3625:9;3621:22;3583:70;:::i;:::-;3672:8;;-1:-1:-1;3557:96:25;-1:-1:-1;;3757:2:25;3742:18;;3729:32;3770:28;3729:32;3770:28;:::i;:::-;3817:5;3807:15;;;3262:566;;;;;:::o;3833:713::-;3937:6;3945;3953;3961;4014:2;4002:9;3993:7;3989:23;3985:32;3982:52;;;4030:1;4027;4020:12;3982:52;4069:9;4056:23;4088:31;4113:5;4088:31;:::i;:::-;4138:5;-1:-1:-1;4194:2:25;4179:18;;4166:32;-1:-1:-1;;;;;4210:30:25;;4207:50;;;4253:1;4250;4243:12;4207:50;4292:70;4354:7;4345:6;4334:9;4330:22;4292:70;:::i;:::-;4381:8;;-1:-1:-1;4266:96:25;-1:-1:-1;;4468:2:25;4453:18;;4440:32;4481:33;4440:32;4481:33;:::i;:::-;3833:713;;;;-1:-1:-1;3833:713:25;;-1:-1:-1;;3833:713:25:o;4551:127::-;4612:10;4607:3;4603:20;4600:1;4593:31;4643:4;4640:1;4633:15;4667:4;4664:1;4657:15;4683:253;4755:2;4749:9;4797:4;4785:17;;-1:-1:-1;;;;;4817:34:25;;4853:22;;;4814:62;4811:88;;;4879:18;;:::i;:::-;4915:2;4908:22;4683:253;:::o;4941:275::-;5012:2;5006:9;5077:2;5058:13;;-1:-1:-1;;5054:27:25;5042:40;;-1:-1:-1;;;;;5097:34:25;;5133:22;;;5094:62;5091:88;;;5159:18;;:::i;:::-;5195:2;5188:22;4941:275;;-1:-1:-1;4941:275:25:o;5221:183::-;5281:4;-1:-1:-1;;;;;5306:6:25;5303:30;5300:56;;;5336:18;;:::i;:::-;-1:-1:-1;5381:1:25;5377:14;5393:4;5373:25;;5221:183::o;5409:347::-;5460:8;5470:6;5524:3;5517:4;5509:6;5505:17;5501:27;5491:55;;5542:1;5539;5532:12;5491:55;-1:-1:-1;5565:20:25;;-1:-1:-1;;;;;5597:30:25;;5594:50;;;5640:1;5637;5630:12;5594:50;5677:4;5669:6;5665:17;5653:29;;5729:3;5722:4;5713:6;5705;5701:19;5697:30;5694:39;5691:59;;;5746:1;5743;5736:12;5761:1725;5919:6;5927;5935;5943;5951;5959;5967;6020:3;6008:9;5999:7;5995:23;5991:33;5988:53;;;6037:1;6034;6027:12;5988:53;6076:9;6063:23;6095:31;6120:5;6095:31;:::i;:::-;6145:5;-1:-1:-1;6169:2:25;6207:18;;;6194:32;-1:-1:-1;;;;;6275:14:25;;;6272:34;;;6302:1;6299;6292:12;6272:34;6341:70;6403:7;6394:6;6383:9;6379:22;6341:70;:::i;:::-;6430:8;;-1:-1:-1;6315:96:25;-1:-1:-1;6518:2:25;6503:18;;6490:32;;-1:-1:-1;6534:16:25;;;6531:36;;;6563:1;6560;6553:12;6531:36;6601:8;6590:9;6586:24;6576:34;;6648:7;6641:4;6637:2;6633:13;6629:27;6619:55;;6670:1;6667;6660:12;6619:55;6706:2;6693:16;6729:60;6745:43;6785:2;6745:43;:::i;:::-;6729:60;:::i;:::-;6823:15;;;6905:1;6901:10;;;;6893:19;;6889:28;;;6854:12;;;;6929:19;;;6926:39;;;6961:1;6958;6951:12;6926:39;6985:11;;;;7005:142;7021:6;7016:3;7013:15;7005:142;;;7087:17;;7075:30;;7038:12;;;;7125;;;;7005:142;;;7166:5;-1:-1:-1;;;7224:2:25;7209:18;;7196:32;;-1:-1:-1;7240:16:25;;;7237:36;;;7269:1;7266;7259:12;7237:36;;;7308:60;7360:7;7349:8;7338:9;7334:24;7308:60;:::i;:::-;7387:8;;-1:-1:-1;7282:86:25;-1:-1:-1;7441:39:25;;-1:-1:-1;7475:3:25;7460:19;;7441:39;:::i;:::-;7431:49;;5761:1725;;;;;;;;;;:::o;7491:456::-;7568:6;7576;7584;7637:2;7625:9;7616:7;7612:23;7608:32;7605:52;;;7653:1;7650;7643:12;7605:52;7692:9;7679:23;7711:31;7736:5;7711:31;:::i;:::-;7761:5;-1:-1:-1;7813:2:25;7798:18;;7785:32;;-1:-1:-1;7869:2:25;7854:18;;7841:32;7882:33;7841:32;7882:33;:::i;7952:356::-;8154:2;8136:21;;;8173:18;;;8166:30;8232:34;8227:2;8212:18;;8205:62;8299:2;8284:18;;7952:356::o;9303:276::-;9361:6;9414:2;9402:9;9393:7;9389:23;9385:32;9382:52;;;9430:1;9427;9420:12;9382:52;9469:9;9456:23;9519:10;9512:5;9508:22;9501:5;9498:33;9488:61;;9545:1;9542;9535:12;9931:272;9989:6;10042:2;10030:9;10021:7;10017:23;10013:32;10010:52;;;10058:1;10055;10048:12;10010:52;10097:9;10084:23;10147:6;10140:5;10136:18;10129:5;10126:29;10116:57;;10169:1;10166;10159:12;10744:521;10821:4;10827:6;10887:11;10874:25;10981:2;10977:7;10966:8;10950:14;10946:29;10942:43;10922:18;10918:68;10908:96;;11000:1;10997;10990:12;10908:96;11027:33;;11079:20;;;-1:-1:-1;;;;;;11111:30:25;;11108:50;;;11154:1;11151;11144:12;11108:50;11187:4;11175:17;;-1:-1:-1;11218:14:25;11214:27;;;11204:38;;11201:58;;;11255:1;11252;11245:12;11675:266;11763:6;11758:3;11751:19;11815:6;11808:5;11801:4;11796:3;11792:14;11779:43;-1:-1:-1;11867:1:25;11842:16;;;11860:4;11838:27;;;11831:38;;;;11923:2;11902:15;;;-1:-1:-1;;11898:29:25;11889:39;;;11885:50;;11675:266::o;11946:322::-;12139:4;12131:6;12127:17;12116:9;12109:36;12181:2;12176;12165:9;12161:18;12154:30;12090:4;12201:61;12258:2;12247:9;12243:18;12235:6;12227;12201:61;:::i;:::-;12193:69;11946:322;-1:-1:-1;;;;;11946:322:25:o;12273:496::-;12326:5;12379:3;12372:4;12364:6;12360:17;12356:27;12346:55;;12397:1;12394;12387:12;12346:55;12426:6;12420:13;-1:-1:-1;;;;;12448:2:25;12445:26;12442:52;;;12474:18;;:::i;:::-;12518:55;12561:2;12542:13;;-1:-1:-1;;12538:27:25;12567:4;12534:38;12518:55;:::i;:::-;12598:2;12589:7;12582:19;12644:3;12637:4;12632:2;12624:6;12620:15;12616:26;12613:35;12610:55;;;12661:1;12658;12651:12;12610:55;12674:64;12735:2;12728:4;12719:7;12715:18;12708:4;12700:6;12696:17;12674:64;:::i;12774:335::-;12853:6;12906:2;12894:9;12885:7;12881:23;12877:32;12874:52;;;12922:1;12919;12912:12;12874:52;12955:9;12949:16;-1:-1:-1;;;;;12980:6:25;12977:30;12974:50;;;13020:1;13017;13010:12;12974:50;13043:60;13095:7;13086:6;13075:9;13071:22;13043:60;:::i;13114:244::-;13271:2;13260:9;13253:21;13234:4;13291:61;13348:2;13337:9;13333:18;13325:6;13317;13291:61;:::i;13363:644::-;13648:4;13640:6;13636:17;13625:9;13618:36;13690:3;13685:2;13674:9;13670:18;13663:31;13599:4;13717:62;13774:3;13763:9;13759:19;13751:6;13743;13717:62;:::i;:::-;13827:9;13819:6;13815:22;13810:2;13799:9;13795:18;13788:50;13861:32;13886:6;13878;13861:32;:::i;:::-;13847:46;;13941:9;13933:6;13929:22;13924:2;13913:9;13909:18;13902:50;13969:32;13994:6;13986;13969:32;:::i;:::-;13961:40;13363:644;-1:-1:-1;;;;;;;;13363:644:25:o;14012:245::-;14079:6;14132:2;14120:9;14111:7;14107:23;14103:32;14100:52;;;14148:1;14145;14138:12;14100:52;14180:9;14174:16;14199:28;14221:5;14199:28;:::i;14619:271::-;14802:6;14794;14789:3;14776:33;14758:3;14828:16;;14853:13;;;14828:16;14619:271;-1:-1:-1;14619:271:25:o;14895:953::-;-1:-1:-1;;;;;15294:15:25;;;15276:34;;15346:15;;15341:2;15326:18;;15319:43;15398:3;15393:2;15378:18;;15371:31;;;15219:4;;15425:62;;15467:19;;15459:6;15451;15425:62;:::i;:::-;15535:9;15527:6;15523:22;15518:2;15507:9;15503:18;15496:50;15569:49;15611:6;15603;15595;15569:49;:::i;:::-;15555:63;;15667:9;15659:6;15655:22;15649:3;15638:9;15634:19;15627:51;15701:32;15726:6;15718;15701:32;:::i;:::-;15687:46;;15782:9;15774:6;15770:22;15764:3;15753:9;15749:19;15742:51;15810:32;15835:6;15827;15810:32;:::i;:::-;15802:40;14895:953;-1:-1:-1;;;;;;;;;;;14895:953:25:o;15853:127::-;15914:10;15909:3;15905:20;15902:1;15895:31;15945:4;15942:1;15935:15;15969:4;15966:1;15959:15;15985:127;16046:10;16041:3;16037:20;16034:1;16027:31;16077:4;16074:1;16067:15;16101:4;16098:1;16091:15;16117:135;16156:3;-1:-1:-1;;16177:17:25;;16174:43;;;16197:18;;:::i;:::-;-1:-1:-1;16244:1:25;16233:13;;16117:135::o;16257:351::-;16459:2;16441:21;;;16498:2;16478:18;;;16471:30;16537:29;16532:2;16517:18;;16510:57;16599:2;16584:18;;16257:351::o;17631:184::-;17701:6;17754:2;17742:9;17733:7;17729:23;17725:32;17722:52;;;17770:1;17767;17760:12;17722:52;-1:-1:-1;17793:16:25;;17631:184;-1:-1:-1;17631:184:25:o;17820:1384::-;-1:-1:-1;;;;;18237:15:25;;;18219:34;;18310:15;;;18272:2;18290:18;;;18283:43;;;;18199:3;18357:2;18342:18;;18335:31;;;18382:19;;18375:35;;;18162:4;;18191:19;-1:-1:-1;;;;;18422:31:25;;18419:51;;;18466:1;18463;18456:12;18419:51;18500:6;18497:1;18493:14;18479:28;;18558:6;18550;18544:3;18533:9;18529:19;18516:49;18657:1;18584:22;;;18633:3;18625:12;;;18646:13;;;18699:18;;;18695:28;;;18690:2;18675:18;;18668:56;18771:13;;18793:20;;;;18864:15;;;;18657:1;18837:3;18829:12;;18907:171;18921:8;18918:1;18915:15;18907:171;;;18984:13;;18972:26;;19053:15;;;;18945:1;18938:9;;;;;19018:12;;;;18907:171;;;18911:3;19124:9;19119:3;19115:19;19109:3;19098:9;19094:19;19087:48;19152:46;19194:3;19186:6;19178;19152:46;:::i;:::-;19144:54;17820:1384;-1:-1:-1;;;;;;;;;;;;;17820:1384:25:o;20544:734::-;20609:5;20662:3;20655:4;20647:6;20643:17;20639:27;20629:55;;20680:1;20677;20670:12;20629:55;20709:6;20703:13;20735:4;20759:60;20775:43;20815:2;20775:43;:::i;20759:60::-;20853:15;;;20939:1;20935:10;;;;20923:23;;20919:32;;;20884:12;;;;20963:15;;;20960:35;;;20991:1;20988;20981:12;20960:35;21027:2;21019:6;21015:15;21039:210;21055:6;21050:3;21047:15;21039:210;;;21128:3;21122:10;21145:31;21170:5;21145:31;:::i;:::-;21189:18;;21227:12;;;;21072;;21039:210;;;-1:-1:-1;21267:5:25;20544:734;-1:-1:-1;;;;;;20544:734:25:o;21283:659::-;21348:5;21401:3;21394:4;21386:6;21382:17;21378:27;21368:55;;21419:1;21416;21409:12;21368:55;21448:6;21442:13;21474:4;21498:60;21514:43;21554:2;21514:43;:::i;21498:60::-;21592:15;;;21678:1;21674:10;;;;21662:23;;21658:32;;;21623:12;;;;21702:15;;;21699:35;;;21730:1;21727;21720:12;21699:35;21766:2;21758:6;21754:15;21778:135;21794:6;21789:3;21786:15;21778:135;;;21860:10;;21848:23;;21891:12;;;;21811;;21778:135;;21947:773;22017:5;22065:4;22053:9;22048:3;22044:19;22040:30;22037:50;;;22083:1;22080;22073:12;22037:50;22116:4;22110:11;22160:4;22152:6;22148:17;-1:-1:-1;;;;;22252:6:25;22240:10;22237:22;22232:2;22220:10;22217:18;22214:46;22211:72;;;22263:18;;:::i;:::-;22305:10;22299:4;22292:24;22334:6;22325:15;;22369:9;22363:16;22349:30;;22402:2;22394:6;22391:14;22388:34;;;22418:1;22415;22408:12;22388:34;22446:68;22510:3;22501:6;22490:9;22486:22;22446:68;:::i;:::-;22438:6;22431:84;22561:2;22550:9;22546:18;22540:25;22524:41;;22590:2;22580:8;22577:16;22574:36;;;22606:1;22603;22596:12;22574:36;;22643:70;22709:3;22698:8;22687:9;22683:24;22643:70;:::i;:::-;22638:2;22630:6;22626:15;22619:95;;;21947:773;;;;:::o;22725:369::-;22824:6;22877:2;22865:9;22856:7;22852:23;22848:32;22845:52;;;22893:1;22890;22883:12;22845:52;22926:9;22920:16;-1:-1:-1;;;;;22951:6:25;22948:30;22945:50;;;22991:1;22988;22981:12;22945:50;23014:74;23080:7;23071:6;23060:9;23056:22;23014:74;:::i;23099:347::-;23301:2;23283:21;;;23340:2;23320:18;;;23313:30;23379:25;23374:2;23359:18;;23352:53;23437:2;23422:18;;23099:347::o;23451:352::-;23653:2;23635:21;;;23692:2;23672:18;;;23665:30;23731;23726:2;23711:18;;23704:58;23794:2;23779:18;;23451:352::o;24183:894::-;24246:5;24299:3;24292:4;24284:6;24280:17;24276:27;24266:55;;24317:1;24314;24307:12;24266:55;24346:6;24340:13;24372:4;24396:60;24412:43;24452:2;24412:43;:::i;24396:60::-;24490:15;;;24576:1;24572:10;;;;24560:23;;24556:32;;;24521:12;;;;24600:15;;;24597:35;;;24628:1;24625;24618:12;24597:35;24664:2;24656:6;24652:15;24676:372;24692:6;24687:3;24684:15;24676:372;;;24771:3;24765:10;-1:-1:-1;;;;;24794:11:25;24791:35;24788:125;;;24867:1;24896:2;24892;24885:14;24788:125;24938:67;25001:3;24996:2;24982:11;24974:6;24970:24;24966:33;24938:67;:::i;:::-;24926:80;;-1:-1:-1;25026:12:25;;;;24709;;24676:372;;25082:1196;25183:6;25236:2;25224:9;25215:7;25211:23;25207:32;25204:52;;;25252:1;25249;25242:12;25204:52;25285:9;25279:16;-1:-1:-1;;;;;25355:2:25;25347:6;25344:14;25341:34;;;25371:1;25368;25361:12;25341:34;25394:22;;;;25450:4;25432:16;;;25428:27;25425:47;;;25468:1;25465;25458:12;25425:47;25494:22;;:::i;:::-;25547:2;25541:9;25575:2;25565:8;25562:16;25559:36;;;25591:1;25588;25581:12;25559:36;25618:67;25677:7;25666:8;25662:2;25658:17;25618:67;:::i;:::-;25611:5;25604:82;;25725:2;25721;25717:11;25711:18;25754:2;25744:8;25741:16;25738:36;;;25770:1;25767;25760:12;25738:36;25806:67;25865:7;25854:8;25850:2;25846:17;25806:67;:::i;:::-;25801:2;25794:5;25790:14;25783:91;;25913:2;25909;25905:11;25899:18;25942:2;25932:8;25929:16;25926:36;;;25958:1;25955;25948:12;25926:36;25994:67;26053:7;26042:8;26038:2;26034:17;25994:67;:::i;:::-;25989:2;25982:5;25978:14;25971:91;;26101:2;26097;26093:11;26087:18;26130:2;26120:8;26117:16;26114:36;;;26146:1;26143;26136:12;26114:36;26182:65;26239:7;26228:8;26224:2;26220:17;26182:65;:::i;:::-;26177:2;26166:14;;26159:89;-1:-1:-1;26170:5:25;25082:1196;-1:-1:-1;;;;;25082:1196:25:o;26283:560::-;-1:-1:-1;;;;;26580:15:25;;;26562:34;;26632:15;;26627:2;26612:18;;26605:43;26679:2;26664:18;;26657:34;;;26722:2;26707:18;;26700:34;;;26542:3;26765;26750:19;;26743:32;;;26505:4;;26792:45;;26817:19;;26809:6;26792:45;:::i;:::-;26784:53;26283:560;-1:-1:-1;;;;;;;26283:560:25:o;26848:136::-;26887:3;26915:5;26905:39;;26924:18;;:::i;:::-;-1:-1:-1;;;26960:18:25;;26848:136::o;27749:402::-;27951:2;27933:21;;;27990:2;27970:18;;;27963:30;28029:34;28024:2;28009:18;;28002:62;-1:-1:-1;;;28095:2:25;28080:18;;28073:36;28141:3;28126:19;;27749:402::o;28514:274::-;28643:3;28681:6;28675:13;28697:53;28743:6;28738:3;28731:4;28723:6;28719:17;28697:53;:::i;:::-;28766:16;;;;;28514:274;-1:-1:-1;;28514:274:25:o

Swarm Source

ipfs://09898114db090d7745f5fb2f97d75198b07c29fc62eaf4acafcf219775255465

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  ]
[ 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.