GLMR Price: $0.02009 (-6.68%)

Contract

0x6701Aac5d539698131DaeC436bA7aC64d9D3526D

Overview

GLMR Balance

Moonbeam Chain LogoMoonbeam Chain LogoMoonbeam Chain Logo0 GLMR

GLMR Value

$0.00

More Info

Private Name Tags

Transaction Hash
Block
From
To
Claim50791032023-12-14 12:13:30773 days ago1702556010IN
0x6701Aac5...4d9D3526D
0 GLMR0.01866362136.39614117
Claim50163442023-12-05 15:20:24782 days ago1701789624IN
0x6701Aac5...4d9D3526D
0 GLMR0.0173095126.5
Claim49931662023-12-02 8:34:54785 days ago1701506094IN
0x6701Aac5...4d9D3526D
0 GLMR0.01877957137.25554949
Claim49854502023-12-01 6:01:48786 days ago1701410508IN
0x6701Aac5...4d9D3526D
0 GLMR0.01880604137.45699944
Claim49847702023-12-01 3:39:00786 days ago1701401940IN
0x6701Aac5...4d9D3526D
0 GLMR0.01728059126.28874711
Claim49681382023-11-28 18:43:00789 days ago1701196980IN
0x6701Aac5...4d9D3526D
0 GLMR0.01710025125
Claim49657352023-11-28 10:39:24789 days ago1701167964IN
0x6701Aac5...4d9D3526D
0 GLMR0.01710175125
Claim49656422023-11-28 10:20:42789 days ago1701166842IN
0x6701Aac5...4d9D3526D
0 GLMR0.01951081142.6
Claim49655202023-11-28 9:56:12789 days ago1701165372IN
0x6701Aac5...4d9D3526D
0 GLMR0.01710025125
Claim49654942023-11-28 9:51:00789 days ago1701165060IN
0x6701Aac5...4d9D3526D
0 GLMR0.01710275125
Claim49636212023-11-28 3:34:18789 days ago1701142458IN
0x6701Aac5...4d9D3526D
0 GLMR0.01710425125
Claim49636062023-11-28 3:31:18789 days ago1701142278IN
0x6701Aac5...4d9D3526D
0 GLMR0.01710275125
Claim49635872023-11-28 3:27:30789 days ago1701142050IN
0x6701Aac5...4d9D3526D
0 GLMR0.01710425125
Claim49635562023-11-28 3:21:18789 days ago1701141678IN
0x6701Aac5...4d9D3526D
0 GLMR0.01710175125
Claim49635242023-11-28 3:14:54789 days ago1701141294IN
0x6701Aac5...4d9D3526D
0 GLMR0.01714086125.27856266
Claim49634842023-11-28 3:06:54789 days ago1701140814IN
0x6701Aac5...4d9D3526D
0 GLMR0.01710175125
Claim49632292023-11-28 2:15:42789 days ago1701137742IN
0x6701Aac5...4d9D3526D
0 GLMR0.01710175125
Claim49632022023-11-28 2:10:18789 days ago1701137418IN
0x6701Aac5...4d9D3526D
0 GLMR0.01710025125
Claim49631782023-11-28 2:05:30789 days ago1701137130IN
0x6701Aac5...4d9D3526D
0 GLMR0.01711493125.07810938
Claim49631542023-11-28 2:00:36789 days ago1701136836IN
0x6701Aac5...4d9D3526D
0 GLMR0.01712045125.11846128
Claim49631052023-11-28 1:50:48789 days ago1701136248IN
0x6701Aac5...4d9D3526D
0 GLMR0.01710275125
Claim49619192023-11-27 21:52:00789 days ago1701121920IN
0x6701Aac5...4d9D3526D
0 GLMR0.01710425125
Claim49618942023-11-27 21:47:00789 days ago1701121620IN
0x6701Aac5...4d9D3526D
0 GLMR0.01710425125
Claim49618792023-11-27 21:44:00789 days ago1701121440IN
0x6701Aac5...4d9D3526D
0 GLMR0.01710275125
Claim49618602023-11-27 21:40:06789 days ago1701121206IN
0x6701Aac5...4d9D3526D
0 GLMR0.01710175125
View all transactions

Latest 8 internal transactions

Parent Transaction Hash Block From To
46201712023-10-10 20:51:30837 days ago1696971090
0x6701Aac5...4d9D3526D
 Contract Creation0 GLMR
46201662023-10-10 20:50:30837 days ago1696971030
0x6701Aac5...4d9D3526D
 Contract Creation0 GLMR
46201612023-10-10 20:49:24837 days ago1696970964
0x6701Aac5...4d9D3526D
 Contract Creation0 GLMR
46201532023-10-10 20:47:48837 days ago1696970868
0x6701Aac5...4d9D3526D
 Contract Creation0 GLMR
46128852023-10-09 20:22:48838 days ago1696882968
0x6701Aac5...4d9D3526D
 Contract Creation0 GLMR
46128772023-10-09 20:21:12838 days ago1696882872
0x6701Aac5...4d9D3526D
 Contract Creation0 GLMR
46128672023-10-09 20:19:06838 days ago1696882746
0x6701Aac5...4d9D3526D
 Contract Creation0 GLMR
45145332023-09-26 0:14:36852 days ago1695687276
0x6701Aac5...4d9D3526D
 Contract Creation0 GLMR
Cross-Chain Transactions
Loading...
Loading

Similar Match Source Code
This contract matches the deployed Bytecode of the Source Code for Contract 0x9896302e...3880DC7DC
The constructor portion of the code might be different and could alter the actual behaviour of the contract

Contract Name:
ERC721AirbaseController

Compiler Version
v0.8.17+commit.8df45f5f

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity Standard Json-Input format)

// SPDX-License-Identifier: MIT
pragma solidity 0.8.17;

import "@openzeppelin/contracts/security/Pausable.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "./AirERC721.sol";
import "../../Ownable.sol";
import "../../Core.sol";
import "../../Datastructures.sol";
import "./IERC721AirbaseController.sol";
import "../../AirAddress.sol";
import "../../Claimable.sol";

contract ERC721AirbaseController is
  IERC721AirbaseController,
  Core,
  Claimable,
  ReentrancyGuard
{
  using SafeMath for uint256;
  using Counters for Counters.Counter;
  using AirAddress for address;

  mapping(address => Token) public tokens;
  string public baseURI;

  Counters.Counter private _totalTokens;

  constructor(
    address owner_,
    address _ca,
    string memory _baseURI
  ) Core(owner_, _ca) ReentrancyGuard() {
    baseURI = _baseURI;
  }

  function totalTokens() external view returns (uint256) {
    return _totalTokens.current();
  }

  function getTokenInfo(address token) external view returns (Token memory) {
    return tokens[token];
  }

  function addToken(
    address contractAddress,
    address owner_,
    address creator,
    bool _isExternal
  ) external onlyOwner {
    require(
      contractAddress != address(0),
      "ERC721ABC:invalid-contract-address"
    );

    Token storage token = tokens[contractAddress];

    token.active = true;
    token.owner = owner_;
    token.creator = creator;
    token.isExternal = _isExternal;

    _totalTokens.increment();
    emit AddToken(contractAddress, owner_, creator, _isExternal);
  }

  function create(
    address _creator,
    string memory name_,
    string memory symbol_,
    string memory tokenURI_,
    address owner_,
    bool _transferable,
    Datastructures.CertificateInfo calldata certificate
  ) external override whenNotPaused returns (address contractAddr) {
    uint256 nonce = _useNonce(_creator);

    bytes32 salt = keccak256(abi.encode(_creator, nonce));

    bytes memory bytecode = abi.encodePacked(
      type(AirERC721).creationCode,
      abi.encode(name_, symbol_, tokenURI_, address(this), _transferable)
    );

    assembly {
      contractAddr := create2(0, add(bytecode, 32), mload(bytecode), salt)
    }

    _validateCreate(owner_, contractAddr, certificate);
    AirERC721 airToken = AirERC721(contractAddr);
    if (bytes(tokenURI_).length == 0) {
      airToken.setBaseURI(
        string(
          abi.encodePacked(baseURI, "0x", contractAddr.toAsciiString(), "/")
        )
      );
    }

    airToken.transferOwnership(owner_);

    Token storage token = tokens[contractAddr];

    token.active = true;
    token.owner = owner_;
    token.creator = _creator;

    _totalTokens.increment();

    emit TokenCreated(
      address(this),
      _creator,
      contractAddr,
      name_,
      symbol_,
      owner_,
      _transferable
    );
  }

  function claim(
    address user,
    bytes32 claimId,
    address tokenAddr,
    uint256 amount,
    bytes32 window,
    uint256 windowLimit,
    Datastructures.CertificateInfo calldata certificate
  ) external override whenNotPaused nonReentrant {
    Token storage token = tokens[tokenAddr];
    require(!token.isExternal, "ERC721ABC:use-claim-external");
    require(token.active, "ERC721ABC:inactive-token");

    _updateClaim(amount, window, windowLimit, claimId);

    uint256 nonce = _useNonce(user);

    bytes memory encodedMessage = abi.encode(
      user,
      claimId,
      tokenAddr,
      amount,
      window,
      windowLimit,
      certificate.deadline,
      nonce,
      _thisHash()
    );
    _validateCertificate(encodedMessage, certificate);

    AirERC721(tokenAddr).mintBatch(user, amount);
    emit Claim(claimId, user, tokenAddr, amount);
  }

  function claimBatch(
    address user,
    bytes32[] calldata claimIds,
    address tokenAddr,
    uint256 amount,
    bytes32 window,
    uint256 windowLimit,
    Datastructures.CertificateInfo calldata certificate
  ) external override whenNotPaused nonReentrant {
    Token storage token = tokens[tokenAddr];
    require(!token.isExternal, "ERC721ABC:use-claim-external-batch");
    require(token.active, "ERC721ABC:inactive-token");

    _updateBatchClaim(amount, window, windowLimit, claimIds);

    uint256 nonce = _useNonce(user);

    bytes memory encodedMessage = abi.encode(
      user,
      claimIds,
      tokenAddr,
      amount,
      window,
      windowLimit,
      certificate.deadline,
      nonce,
      _thisHash()
    );
    _validateCertificate(encodedMessage, certificate);

    AirERC721(tokenAddr).mintBatch(user, amount);

    emit ClaimBatch(user, tokenAddr, claimIds, amount);
  }

  function claimExternal(
    address user,
    bytes32 claimId,
    address tokenAddr,
    uint256 amount,
    bytes32 window,
    uint256 windowLimit,
    Datastructures.CertificateInfo calldata certificate
  ) external override whenNotPaused nonReentrant {
    Token storage token = tokens[tokenAddr];
    require(token.isExternal, "ERC721ABC:use-claim");
    require(token.active, "ERC721ABC:inactive-token");

    _updateClaim(amount, window, windowLimit, claimId);

    uint256 nonce = _useNonce(user);

    bytes memory encodedMessgae = abi.encode(
      user,
      claimId,
      tokenAddr,
      amount,
      window,
      windowLimit,
      certificate.deadline,
      nonce,
      _thisHash()
    );
    _validateCertificate(encodedMessgae, certificate);
    _mintExternalBatch(tokenAddr, user, amount);

    emit Claim(claimId, user, tokenAddr, amount);
  }

  function claimExternalBatch(
    address user,
    bytes32[] calldata claimIds,
    address tokenAddr,
    uint256 amount,
    bytes32 window,
    uint256 windowLimit,
    Datastructures.CertificateInfo calldata certificate
  ) external override whenNotPaused nonReentrant {
    Token storage token = tokens[tokenAddr];
    require(token.isExternal, "ERC721ABC:use-claim-batch");
    require(token.active, "ERC721ABC:inactive-token");

    _updateBatchClaim(amount, window, windowLimit, claimIds);

    uint256 nonce = _useNonce(user);

    bytes memory encodedMessgae = abi.encode(
      user,
      claimIds,
      tokenAddr,
      amount,
      window,
      windowLimit,
      certificate.deadline,
      nonce,
      _thisHash()
    );
    _validateCertificate(encodedMessgae, certificate);
   _mintExternalBatch(tokenAddr, user, amount);

    emit ClaimBatch(user, tokenAddr, claimIds, amount);
  }

  function updateBaseURI(string memory newURI) external override onlyOwner {
    emit UpdateBaseURI(baseURI, newURI);
    baseURI = newURI;
  }

  function _mintExternalBatch(
    address tokenAddr,
    address user,
    uint256 amount
  ) internal {
    for (uint256 i = 0; i < amount; i++) {
      AirERC721(tokenAddr).mint(user);
    }
  }

  function _validateCreate(
    address owner_,
    address contractAddress,
    Datastructures.CertificateInfo calldata certificate
  ) internal view {
    bytes memory encodedMessage = abi.encode(
      owner_,
      contractAddress,
      certificate.deadline,
      _thisHash()
    );

    _validateCertificate(encodedMessage, certificate);
  }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (access/AccessControl.sol)

pragma solidity ^0.8.0;

import "./IAccessControl.sol";
import "../utils/Context.sol";
import "../utils/Strings.sol";
import "../utils/introspection/ERC165.sol";

/**
 * @dev Contract module that allows children to implement role-based access
 * control mechanisms. This is a lightweight version that doesn't allow enumerating role
 * members except through off-chain means by accessing the contract event logs. Some
 * applications may benefit from on-chain enumerability, for those cases see
 * {AccessControlEnumerable}.
 *
 * Roles are referred to by their `bytes32` identifier. These should be exposed
 * in the external API and be unique. The best way to achieve this is by
 * using `public constant` hash digests:
 *
 * ```
 * bytes32 public constant MY_ROLE = keccak256("MY_ROLE");
 * ```
 *
 * Roles can be used to represent a set of permissions. To restrict access to a
 * function call, use {hasRole}:
 *
 * ```
 * function foo() public {
 *     require(hasRole(MY_ROLE, msg.sender));
 *     ...
 * }
 * ```
 *
 * Roles can be granted and revoked dynamically via the {grantRole} and
 * {revokeRole} functions. Each role has an associated admin role, and only
 * accounts that have a role's admin role can call {grantRole} and {revokeRole}.
 *
 * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means
 * that only accounts with this role will be able to grant or revoke other
 * roles. More complex role relationships can be created by using
 * {_setRoleAdmin}.
 *
 * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to
 * grant and revoke this role. Extra precautions should be taken to secure
 * accounts that have been granted it.
 */
abstract contract AccessControl is Context, IAccessControl, ERC165 {
    struct RoleData {
        mapping(address => bool) members;
        bytes32 adminRole;
    }

    mapping(bytes32 => RoleData) private _roles;

    bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;

    /**
     * @dev Modifier that checks that an account has a specific role. Reverts
     * with a standardized message including the required role.
     *
     * The format of the revert reason is given by the following regular expression:
     *
     *  /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/
     *
     * _Available since v4.1._
     */
    modifier onlyRole(bytes32 role) {
        _checkRole(role);
        _;
    }

    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
        return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId);
    }

    /**
     * @dev Returns `true` if `account` has been granted `role`.
     */
    function hasRole(bytes32 role, address account) public view virtual override returns (bool) {
        return _roles[role].members[account];
    }

    /**
     * @dev Revert with a standard message if `_msgSender()` is missing `role`.
     * Overriding this function changes the behavior of the {onlyRole} modifier.
     *
     * Format of the revert message is described in {_checkRole}.
     *
     * _Available since v4.6._
     */
    function _checkRole(bytes32 role) internal view virtual {
        _checkRole(role, _msgSender());
    }

    /**
     * @dev Revert with a standard message if `account` is missing `role`.
     *
     * The format of the revert reason is given by the following regular expression:
     *
     *  /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/
     */
    function _checkRole(bytes32 role, address account) internal view virtual {
        if (!hasRole(role, account)) {
            revert(
                string(
                    abi.encodePacked(
                        "AccessControl: account ",
                        Strings.toHexString(uint160(account), 20),
                        " is missing role ",
                        Strings.toHexString(uint256(role), 32)
                    )
                )
            );
        }
    }

    /**
     * @dev Returns the admin role that controls `role`. See {grantRole} and
     * {revokeRole}.
     *
     * To change a role's admin, use {_setRoleAdmin}.
     */
    function getRoleAdmin(bytes32 role) public view virtual override returns (bytes32) {
        return _roles[role].adminRole;
    }

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     *
     * May emit a {RoleGranted} event.
     */
    function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {
        _grantRole(role, account);
    }

    /**
     * @dev Revokes `role` from `account`.
     *
     * If `account` had been granted `role`, emits a {RoleRevoked} event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     *
     * May emit a {RoleRevoked} event.
     */
    function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {
        _revokeRole(role, account);
    }

    /**
     * @dev Revokes `role` from the calling account.
     *
     * Roles are often managed via {grantRole} and {revokeRole}: this function's
     * purpose is to provide a mechanism for accounts to lose their privileges
     * if they are compromised (such as when a trusted device is misplaced).
     *
     * If the calling account had been revoked `role`, emits a {RoleRevoked}
     * event.
     *
     * Requirements:
     *
     * - the caller must be `account`.
     *
     * May emit a {RoleRevoked} event.
     */
    function renounceRole(bytes32 role, address account) public virtual override {
        require(account == _msgSender(), "AccessControl: can only renounce roles for self");

        _revokeRole(role, account);
    }

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event. Note that unlike {grantRole}, this function doesn't perform any
     * checks on the calling account.
     *
     * May emit a {RoleGranted} event.
     *
     * [WARNING]
     * ====
     * This function should only be called from the constructor when setting
     * up the initial roles for the system.
     *
     * Using this function in any other way is effectively circumventing the admin
     * system imposed by {AccessControl}.
     * ====
     *
     * NOTE: This function is deprecated in favor of {_grantRole}.
     */
    function _setupRole(bytes32 role, address account) internal virtual {
        _grantRole(role, account);
    }

    /**
     * @dev Sets `adminRole` as ``role``'s admin role.
     *
     * Emits a {RoleAdminChanged} event.
     */
    function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {
        bytes32 previousAdminRole = getRoleAdmin(role);
        _roles[role].adminRole = adminRole;
        emit RoleAdminChanged(role, previousAdminRole, adminRole);
    }

    /**
     * @dev Grants `role` to `account`.
     *
     * Internal function without access restriction.
     *
     * May emit a {RoleGranted} event.
     */
    function _grantRole(bytes32 role, address account) internal virtual {
        if (!hasRole(role, account)) {
            _roles[role].members[account] = true;
            emit RoleGranted(role, account, _msgSender());
        }
    }

    /**
     * @dev Revokes `role` from `account`.
     *
     * Internal function without access restriction.
     *
     * May emit a {RoleRevoked} event.
     */
    function _revokeRole(bytes32 role, address account) internal virtual {
        if (hasRole(role, account)) {
            _roles[role].members[account] = false;
            emit RoleRevoked(role, account, _msgSender());
        }
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol)

pragma solidity ^0.8.0;

/**
 * @dev External interface of AccessControl declared to support ERC165 detection.
 */
interface IAccessControl {
    /**
     * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`
     *
     * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite
     * {RoleAdminChanged} not being emitted signaling this.
     *
     * _Available since v3.1._
     */
    event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);

    /**
     * @dev Emitted when `account` is granted `role`.
     *
     * `sender` is the account that originated the contract call, an admin role
     * bearer except when using {AccessControl-_setupRole}.
     */
    event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);

    /**
     * @dev Emitted when `account` is revoked `role`.
     *
     * `sender` is the account that originated the contract call:
     *   - if using `revokeRole`, it is the admin role bearer
     *   - if using `renounceRole`, it is the role bearer (i.e. `account`)
     */
    event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);

    /**
     * @dev Returns `true` if `account` has been granted `role`.
     */
    function hasRole(bytes32 role, address account) external view returns (bool);

    /**
     * @dev Returns the admin role that controls `role`. See {grantRole} and
     * {revokeRole}.
     *
     * To change a role's admin, use {AccessControl-_setRoleAdmin}.
     */
    function getRoleAdmin(bytes32 role) external view returns (bytes32);

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function grantRole(bytes32 role, address account) external;

    /**
     * @dev Revokes `role` from `account`.
     *
     * If `account` had been granted `role`, emits a {RoleRevoked} event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function revokeRole(bytes32 role, address account) external;

    /**
     * @dev Revokes `role` from the calling account.
     *
     * Roles are often managed via {grantRole} and {revokeRole}: this function's
     * purpose is to provide a mechanism for accounts to lose their privileges
     * if they are compromised (such as when a trusted device is misplaced).
     *
     * If the calling account had been granted `role`, emits a {RoleRevoked}
     * event.
     *
     * Requirements:
     *
     * - the caller must be `account`.
     */
    function renounceRole(bytes32 role, address account) external;
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (security/Pausable.sol)

pragma solidity ^0.8.0;

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

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

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

    bool private _paused;

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

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

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

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

    /**
     * @dev Throws if the contract is paused.
     */
    function _requireNotPaused() internal view virtual {
        require(!paused(), "Pausable: paused");
    }

    /**
     * @dev Throws if the contract is not paused.
     */
    function _requirePaused() internal view virtual {
        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 5 of 27 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol)

pragma solidity ^0.8.0;

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

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

    uint256 private _status;

    constructor() {
        _status = _NOT_ENTERED;
    }

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

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

        _;

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

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC721/ERC721.sol)

pragma solidity ^0.8.0;

import "./IERC721.sol";
import "./IERC721Receiver.sol";
import "./extensions/IERC721Metadata.sol";
import "../../utils/Address.sol";
import "../../utils/Context.sol";
import "../../utils/Strings.sol";
import "../../utils/introspection/ERC165.sol";

/**
 * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
 * the Metadata extension, but not including the Enumerable extension, which is available separately as
 * {ERC721Enumerable}.
 */
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata {
    using Address for address;
    using Strings for uint256;

    // Token name
    string private _name;

    // Token symbol
    string private _symbol;

    // Mapping from token ID to owner address
    mapping(uint256 => address) private _owners;

    // Mapping owner address to token count
    mapping(address => uint256) private _balances;

    // Mapping from token ID to approved address
    mapping(uint256 => address) private _tokenApprovals;

    // Mapping from owner to operator approvals
    mapping(address => mapping(address => bool)) private _operatorApprovals;

    /**
     * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection.
     */
    constructor(string memory name_, string memory symbol_) {
        _name = name_;
        _symbol = symbol_;
    }

    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {
        return
            interfaceId == type(IERC721).interfaceId ||
            interfaceId == type(IERC721Metadata).interfaceId ||
            super.supportsInterface(interfaceId);
    }

    /**
     * @dev See {IERC721-balanceOf}.
     */
    function balanceOf(address owner) public view virtual override returns (uint256) {
        require(owner != address(0), "ERC721: address zero is not a valid owner");
        return _balances[owner];
    }

    /**
     * @dev See {IERC721-ownerOf}.
     */
    function ownerOf(uint256 tokenId) public view virtual override returns (address) {
        address owner = _owners[tokenId];
        require(owner != address(0), "ERC721: invalid token ID");
        return owner;
    }

    /**
     * @dev See {IERC721Metadata-name}.
     */
    function name() public view virtual override returns (string memory) {
        return _name;
    }

    /**
     * @dev See {IERC721Metadata-symbol}.
     */
    function symbol() public view virtual override returns (string memory) {
        return _symbol;
    }

    /**
     * @dev See {IERC721Metadata-tokenURI}.
     */
    function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
        _requireMinted(tokenId);

        string memory baseURI = _baseURI();
        return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : "";
    }

    /**
     * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each
     * token will be the concatenation of the `baseURI` and the `tokenId`. Empty
     * by default, can be overridden in child contracts.
     */
    function _baseURI() internal view virtual returns (string memory) {
        return "";
    }

    /**
     * @dev See {IERC721-approve}.
     */
    function approve(address to, uint256 tokenId) public virtual override {
        address owner = ERC721.ownerOf(tokenId);
        require(to != owner, "ERC721: approval to current owner");

        require(
            _msgSender() == owner || isApprovedForAll(owner, _msgSender()),
            "ERC721: approve caller is not token owner nor approved for all"
        );

        _approve(to, tokenId);
    }

    /**
     * @dev See {IERC721-getApproved}.
     */
    function getApproved(uint256 tokenId) public view virtual override returns (address) {
        _requireMinted(tokenId);

        return _tokenApprovals[tokenId];
    }

    /**
     * @dev See {IERC721-setApprovalForAll}.
     */
    function setApprovalForAll(address operator, bool approved) public virtual override {
        _setApprovalForAll(_msgSender(), operator, approved);
    }

    /**
     * @dev See {IERC721-isApprovedForAll}.
     */
    function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) {
        return _operatorApprovals[owner][operator];
    }

    /**
     * @dev See {IERC721-transferFrom}.
     */
    function transferFrom(
        address from,
        address to,
        uint256 tokenId
    ) public virtual override {
        //solhint-disable-next-line max-line-length
        require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: caller is not token owner nor approved");

        _transfer(from, to, tokenId);
    }

    /**
     * @dev See {IERC721-safeTransferFrom}.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId
    ) public virtual override {
        safeTransferFrom(from, to, tokenId, "");
    }

    /**
     * @dev See {IERC721-safeTransferFrom}.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId,
        bytes memory data
    ) public virtual override {
        require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: caller is not token owner nor approved");
        _safeTransfer(from, to, tokenId, data);
    }

    /**
     * @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.
     *
     * `data` is additional data, it has no specified format and it is sent in call to `to`.
     *
     * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g.
     * implement alternative mechanisms to perform token transfer, such as signature-based.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function _safeTransfer(
        address from,
        address to,
        uint256 tokenId,
        bytes memory data
    ) internal virtual {
        _transfer(from, to, tokenId);
        require(_checkOnERC721Received(from, to, tokenId, data), "ERC721: transfer to non ERC721Receiver implementer");
    }

    /**
     * @dev Returns whether `tokenId` exists.
     *
     * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}.
     *
     * Tokens start existing when they are minted (`_mint`),
     * and stop existing when they are burned (`_burn`).
     */
    function _exists(uint256 tokenId) internal view virtual returns (bool) {
        return _owners[tokenId] != address(0);
    }

    /**
     * @dev Returns whether `spender` is allowed to manage `tokenId`.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) {
        address owner = ERC721.ownerOf(tokenId);
        return (spender == owner || isApprovedForAll(owner, spender) || getApproved(tokenId) == spender);
    }

    /**
     * @dev Safely mints `tokenId` and transfers it to `to`.
     *
     * Requirements:
     *
     * - `tokenId` must not exist.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function _safeMint(address to, uint256 tokenId) internal virtual {
        _safeMint(to, tokenId, "");
    }

    /**
     * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is
     * forwarded in {IERC721Receiver-onERC721Received} to contract recipients.
     */
    function _safeMint(
        address to,
        uint256 tokenId,
        bytes memory data
    ) internal virtual {
        _mint(to, tokenId);
        require(
            _checkOnERC721Received(address(0), to, tokenId, data),
            "ERC721: transfer to non ERC721Receiver implementer"
        );
    }

    /**
     * @dev Mints `tokenId` and transfers it to `to`.
     *
     * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible
     *
     * Requirements:
     *
     * - `tokenId` must not exist.
     * - `to` cannot be the zero address.
     *
     * Emits a {Transfer} event.
     */
    function _mint(address to, uint256 tokenId) internal virtual {
        require(to != address(0), "ERC721: mint to the zero address");
        require(!_exists(tokenId), "ERC721: token already minted");

        _beforeTokenTransfer(address(0), to, tokenId);

        _balances[to] += 1;
        _owners[tokenId] = to;

        emit Transfer(address(0), to, tokenId);

        _afterTokenTransfer(address(0), to, tokenId);
    }

    /**
     * @dev Destroys `tokenId`.
     * The approval is cleared when the token is burned.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     *
     * Emits a {Transfer} event.
     */
    function _burn(uint256 tokenId) internal virtual {
        address owner = ERC721.ownerOf(tokenId);

        _beforeTokenTransfer(owner, address(0), tokenId);

        // Clear approvals
        _approve(address(0), tokenId);

        _balances[owner] -= 1;
        delete _owners[tokenId];

        emit Transfer(owner, address(0), tokenId);

        _afterTokenTransfer(owner, address(0), tokenId);
    }

    /**
     * @dev Transfers `tokenId` from `from` to `to`.
     *  As opposed to {transferFrom}, this imposes no restrictions on msg.sender.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - `tokenId` token must be owned by `from`.
     *
     * Emits a {Transfer} event.
     */
    function _transfer(
        address from,
        address to,
        uint256 tokenId
    ) internal virtual {
        require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer from incorrect owner");
        require(to != address(0), "ERC721: transfer to the zero address");

        _beforeTokenTransfer(from, to, tokenId);

        // Clear approvals from the previous owner
        _approve(address(0), tokenId);

        _balances[from] -= 1;
        _balances[to] += 1;
        _owners[tokenId] = to;

        emit Transfer(from, to, tokenId);

        _afterTokenTransfer(from, to, tokenId);
    }

    /**
     * @dev Approve `to` to operate on `tokenId`
     *
     * Emits an {Approval} event.
     */
    function _approve(address to, uint256 tokenId) internal virtual {
        _tokenApprovals[tokenId] = to;
        emit Approval(ERC721.ownerOf(tokenId), to, tokenId);
    }

    /**
     * @dev Approve `operator` to operate on all of `owner` tokens
     *
     * Emits an {ApprovalForAll} event.
     */
    function _setApprovalForAll(
        address owner,
        address operator,
        bool approved
    ) internal virtual {
        require(owner != operator, "ERC721: approve to caller");
        _operatorApprovals[owner][operator] = approved;
        emit ApprovalForAll(owner, operator, approved);
    }

    /**
     * @dev Reverts if the `tokenId` has not been minted yet.
     */
    function _requireMinted(uint256 tokenId) internal view virtual {
        require(_exists(tokenId), "ERC721: invalid token ID");
    }

    /**
     * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address.
     * The call is not executed if the target address is not a contract.
     *
     * @param from address representing the previous owner of the given token ID
     * @param to target address that will receive the tokens
     * @param tokenId uint256 ID of the token to be transferred
     * @param data bytes optional data to send along with the call
     * @return bool whether the call correctly returned the expected magic value
     */
    function _checkOnERC721Received(
        address from,
        address to,
        uint256 tokenId,
        bytes memory data
    ) private returns (bool) {
        if (to.isContract()) {
            try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, data) returns (bytes4 retval) {
                return retval == IERC721Receiver.onERC721Received.selector;
            } catch (bytes memory reason) {
                if (reason.length == 0) {
                    revert("ERC721: transfer to non ERC721Receiver implementer");
                } else {
                    /// @solidity memory-safe-assembly
                    assembly {
                        revert(add(32, reason), mload(reason))
                    }
                }
            }
        } else {
            return true;
        }
    }

    /**
     * @dev Hook that is called before any token transfer. This includes minting
     * and burning.
     *
     * Calling conditions:
     *
     * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be
     * transferred to `to`.
     * - When `from` is zero, `tokenId` will be minted for `to`.
     * - When `to` is zero, ``from``'s `tokenId` will be burned.
     * - `from` and `to` are never both zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _beforeTokenTransfer(
        address from,
        address to,
        uint256 tokenId
    ) internal virtual {}

    /**
     * @dev Hook that is called after any transfer of tokens. This includes
     * minting and burning.
     *
     * Calling conditions:
     *
     * - when `from` and `to` are both non-zero.
     * - `from` and `to` are never both zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _afterTokenTransfer(
        address from,
        address to,
        uint256 tokenId
    ) internal virtual {}
}

File 7 of 27 : ERC721Burnable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC721/extensions/ERC721Burnable.sol)

pragma solidity ^0.8.0;

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

/**
 * @title ERC721 Burnable Token
 * @dev ERC721 Token that can be burned (destroyed).
 */
abstract contract ERC721Burnable is Context, ERC721 {
    /**
     * @dev Burns `tokenId`. See {ERC721-_burn}.
     *
     * Requirements:
     *
     * - The caller must own `tokenId` or be an approved operator.
     */
    function burn(uint256 tokenId) public virtual {
        //solhint-disable-next-line max-line-length
        require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: caller is not token owner nor approved");
        _burn(tokenId);
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC721/extensions/ERC721URIStorage.sol)

pragma solidity ^0.8.0;

import "../ERC721.sol";

/**
 * @dev ERC721 token with storage based token URI management.
 */
abstract contract ERC721URIStorage is ERC721 {
    using Strings for uint256;

    // Optional mapping for token URIs
    mapping(uint256 => string) private _tokenURIs;

    /**
     * @dev See {IERC721Metadata-tokenURI}.
     */
    function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
        _requireMinted(tokenId);

        string memory _tokenURI = _tokenURIs[tokenId];
        string memory base = _baseURI();

        // If there is no base URI, return the token URI.
        if (bytes(base).length == 0) {
            return _tokenURI;
        }
        // If both are set, concatenate the baseURI and tokenURI (via abi.encodePacked).
        if (bytes(_tokenURI).length > 0) {
            return string(abi.encodePacked(base, _tokenURI));
        }

        return super.tokenURI(tokenId);
    }

    /**
     * @dev Sets `_tokenURI` as the tokenURI of `tokenId`.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function _setTokenURI(uint256 tokenId, string memory _tokenURI) internal virtual {
        require(_exists(tokenId), "ERC721URIStorage: URI set of nonexistent token");
        _tokenURIs[tokenId] = _tokenURI;
    }

    /**
     * @dev See {ERC721-_burn}. This override additionally checks to see if a
     * token-specific URI was set for the token, and if so, it deletes the token URI from
     * the storage mapping.
     */
    function _burn(uint256 tokenId) internal virtual override {
        super._burn(tokenId);

        if (bytes(_tokenURIs[tokenId]).length != 0) {
            delete _tokenURIs[tokenId];
        }
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol)

pragma solidity ^0.8.0;

import "../IERC721.sol";

/**
 * @title ERC-721 Non-Fungible Token Standard, optional metadata extension
 * @dev See https://eips.ethereum.org/EIPS/eip-721
 */
interface IERC721Metadata is IERC721 {
    /**
     * @dev Returns the token collection name.
     */
    function name() external view returns (string memory);

    /**
     * @dev Returns the token collection symbol.
     */
    function symbol() external view returns (string memory);

    /**
     * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token.
     */
    function tokenURI(uint256 tokenId) external view returns (string memory);
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.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: 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 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 27 : IERC721Receiver.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721Receiver.sol)

pragma solidity ^0.8.0;

/**
 * @title ERC721 token receiver interface
 * @dev Interface for any contract that wants to support safeTransfers
 * from ERC721 asset contracts.
 */
interface IERC721Receiver {
    /**
     * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom}
     * by `operator` from `from`, this function is called.
     *
     * It must return its Solidity selector to confirm the token transfer.
     * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted.
     *
     * The selector can be obtained in Solidity with `IERC721Receiver.onERC721Received.selector`.
     */
    function onERC721Received(
        address operator,
        address from,
        uint256 tokenId,
        bytes calldata data
    ) external returns (bytes4);
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol)

pragma solidity ^0.8.1;

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

        return account.code.length > 0;
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

pragma solidity ^0.8.0;

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

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

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Counters.sol)

pragma solidity ^0.8.0;

/**
 * @title Counters
 * @author Matt Condon (@shrugs)
 * @dev Provides counters that can only be incremented, decremented or reset. This can be used e.g. to track the number
 * of elements in a mapping, issuing ERC721 ids, or counting request ids.
 *
 * Include with `using Counters for Counters.Counter;`
 */
library Counters {
    struct Counter {
        // This variable should never be directly accessed by users of the library: interactions must be restricted to
        // the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add
        // this feature: see https://github.com/ethereum/solidity/issues/4637
        uint256 _value; // default: 0
    }

    function current(Counter storage counter) internal view returns (uint256) {
        return counter._value;
    }

    function increment(Counter storage counter) internal {
        unchecked {
            counter._value += 1;
        }
    }

    function decrement(Counter storage counter) internal {
        uint256 value = counter._value;
        require(value > 0, "Counter: decrement overflow");
        unchecked {
            counter._value = value - 1;
        }
    }

    function reset(Counter storage counter) internal {
        counter._value = 0;
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.3) (utils/cryptography/ECDSA.sol)

pragma solidity ^0.8.0;

import "../Strings.sol";

/**
 * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.
 *
 * These functions can be used to verify that a message was signed by the holder
 * of the private keys of a given address.
 */
library ECDSA {
    enum RecoverError {
        NoError,
        InvalidSignature,
        InvalidSignatureLength,
        InvalidSignatureS,
        InvalidSignatureV
    }

    function _throwError(RecoverError error) private pure {
        if (error == RecoverError.NoError) {
            return; // no error: do nothing
        } else if (error == RecoverError.InvalidSignature) {
            revert("ECDSA: invalid signature");
        } else if (error == RecoverError.InvalidSignatureLength) {
            revert("ECDSA: invalid signature length");
        } else if (error == RecoverError.InvalidSignatureS) {
            revert("ECDSA: invalid signature 's' value");
        } else if (error == RecoverError.InvalidSignatureV) {
            revert("ECDSA: invalid signature 'v' value");
        }
    }

    /**
     * @dev Returns the address that signed a hashed message (`hash`) with
     * `signature` or error string. This address can then be used for verification purposes.
     *
     * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:
     * this function rejects them by requiring the `s` value to be in the lower
     * half order, and the `v` value to be either 27 or 28.
     *
     * IMPORTANT: `hash` _must_ be the result of a hash operation for the
     * verification to be secure: it is possible to craft signatures that
     * recover to arbitrary addresses for non-hashed data. A safe way to ensure
     * this is by receiving a hash of the original message (which may otherwise
     * be too long), and then calling {toEthSignedMessageHash} on it.
     *
     * Documentation for signature generation:
     * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]
     * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]
     *
     * _Available since v4.3._
     */
    function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) {
        if (signature.length == 65) {
            bytes32 r;
            bytes32 s;
            uint8 v;
            // ecrecover takes the signature parameters, and the only way to get them
            // currently is to use assembly.
            /// @solidity memory-safe-assembly
            assembly {
                r := mload(add(signature, 0x20))
                s := mload(add(signature, 0x40))
                v := byte(0, mload(add(signature, 0x60)))
            }
            return tryRecover(hash, v, r, s);
        } else {
            return (address(0), RecoverError.InvalidSignatureLength);
        }
    }

    /**
     * @dev Returns the address that signed a hashed message (`hash`) with
     * `signature`. This address can then be used for verification purposes.
     *
     * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:
     * this function rejects them by requiring the `s` value to be in the lower
     * half order, and the `v` value to be either 27 or 28.
     *
     * IMPORTANT: `hash` _must_ be the result of a hash operation for the
     * verification to be secure: it is possible to craft signatures that
     * recover to arbitrary addresses for non-hashed data. A safe way to ensure
     * this is by receiving a hash of the original message (which may otherwise
     * be too long), and then calling {toEthSignedMessageHash} on it.
     */
    function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {
        (address recovered, RecoverError error) = tryRecover(hash, signature);
        _throwError(error);
        return recovered;
    }

    /**
     * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.
     *
     * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]
     *
     * _Available since v4.3._
     */
    function tryRecover(
        bytes32 hash,
        bytes32 r,
        bytes32 vs
    ) internal pure returns (address, RecoverError) {
        bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);
        uint8 v = uint8((uint256(vs) >> 255) + 27);
        return tryRecover(hash, v, r, s);
    }

    /**
     * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.
     *
     * _Available since v4.2._
     */
    function recover(
        bytes32 hash,
        bytes32 r,
        bytes32 vs
    ) internal pure returns (address) {
        (address recovered, RecoverError error) = tryRecover(hash, r, vs);
        _throwError(error);
        return recovered;
    }

    /**
     * @dev Overload of {ECDSA-tryRecover} that receives the `v`,
     * `r` and `s` signature fields separately.
     *
     * _Available since v4.3._
     */
    function tryRecover(
        bytes32 hash,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) internal pure returns (address, RecoverError) {
        // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature
        // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines
        // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most
        // signatures from current libraries generate a unique signature with an s-value in the lower half order.
        //
        // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value
        // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or
        // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept
        // these malleable signatures as well.
        if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {
            return (address(0), RecoverError.InvalidSignatureS);
        }
        if (v != 27 && v != 28) {
            return (address(0), RecoverError.InvalidSignatureV);
        }

        // If the signature is valid (and not malleable), return the signer address
        address signer = ecrecover(hash, v, r, s);
        if (signer == address(0)) {
            return (address(0), RecoverError.InvalidSignature);
        }

        return (signer, RecoverError.NoError);
    }

    /**
     * @dev Overload of {ECDSA-recover} that receives the `v`,
     * `r` and `s` signature fields separately.
     */
    function recover(
        bytes32 hash,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) internal pure returns (address) {
        (address recovered, RecoverError error) = tryRecover(hash, v, r, s);
        _throwError(error);
        return recovered;
    }

    /**
     * @dev Returns an Ethereum Signed Message, created from a `hash`. This
     * produces hash corresponding to the one signed with the
     * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]
     * JSON-RPC method as part of EIP-191.
     *
     * See {recover}.
     */
    function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) {
        // 32 is the length in bytes of hash,
        // enforced by the type signature above
        return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", hash));
    }

    /**
     * @dev Returns an Ethereum Signed Message, created from `s`. This
     * produces hash corresponding to the one signed with the
     * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]
     * JSON-RPC method as part of EIP-191.
     *
     * See {recover}.
     */
    function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) {
        return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n", Strings.toString(s.length), s));
    }

    /**
     * @dev Returns an Ethereum Signed Typed Data, created from a
     * `domainSeparator` and a `structHash`. This produces hash corresponding
     * to the one signed with the
     * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]
     * JSON-RPC method as part of EIP-712.
     *
     * See {recover}.
     */
    function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) {
        return keccak256(abi.encodePacked("\x19\x01", domainSeparator, structHash));
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)

pragma solidity ^0.8.0;

import "./IERC165.sol";

/**
 * @dev Implementation of the {IERC165} interface.
 *
 * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check
 * for the additional interface id that will be supported. For example:
 *
 * ```solidity
 * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
 *     return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);
 * }
 * ```
 *
 * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.
 */
abstract contract ERC165 is IERC165 {
    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
        return interfaceId == type(IERC165).interfaceId;
    }
}

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

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (utils/math/SafeMath.sol)

pragma solidity ^0.8.0;

// CAUTION
// This version of SafeMath should only be used with Solidity 0.8 or later,
// because it relies on the compiler's built in overflow checks.

/**
 * @dev Wrappers over Solidity's arithmetic operations.
 *
 * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler
 * now has built in overflow checking.
 */
library SafeMath {
    /**
     * @dev Returns the addition of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            uint256 c = a + b;
            if (c < a) return (false, 0);
            return (true, c);
        }
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b > a) return (false, 0);
            return (true, a - b);
        }
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
            // benefit is lost if 'b' is also tested.
            // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
            if (a == 0) return (true, 0);
            uint256 c = a * b;
            if (c / a != b) return (false, 0);
            return (true, c);
        }
    }

    /**
     * @dev Returns the division of two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b == 0) return (false, 0);
            return (true, a / b);
        }
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b == 0) return (false, 0);
            return (true, a % b);
        }
    }

    /**
     * @dev Returns the addition of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `+` operator.
     *
     * Requirements:
     *
     * - Addition cannot overflow.
     */
    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        return a + b;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting on
     * overflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b) internal pure returns (uint256) {
        return a - b;
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `*` operator.
     *
     * Requirements:
     *
     * - Multiplication cannot overflow.
     */
    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        return a * b;
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator.
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        return a / b;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting when dividing by zero.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b) internal pure returns (uint256) {
        return a % b;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
     * overflow (when the result is negative).
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {trySub}.
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(
        uint256 a,
        uint256 b,
        string memory errorMessage
    ) internal pure returns (uint256) {
        unchecked {
            require(b <= a, errorMessage);
            return a - b;
        }
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting with custom message on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(
        uint256 a,
        uint256 b,
        string memory errorMessage
    ) internal pure returns (uint256) {
        unchecked {
            require(b > 0, errorMessage);
            return a / b;
        }
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting with custom message when dividing by zero.
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {tryMod}.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(
        uint256 a,
        uint256 b,
        string memory errorMessage
    ) internal pure returns (uint256) {
        unchecked {
            require(b > 0, errorMessage);
            return a % b;
        }
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (utils/Strings.sol)

pragma solidity ^0.8.0;

/**
 * @dev String operations.
 */
library Strings {
    bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef";
    uint8 private constant _ADDRESS_LENGTH = 20;

    /**
     * @dev Converts a `uint256` to its ASCII `string` decimal representation.
     */
    function toString(uint256 value) internal pure returns (string memory) {
        // Inspired by OraclizeAPI's implementation - MIT licence
        // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol

        if (value == 0) {
            return "0";
        }
        uint256 temp = value;
        uint256 digits;
        while (temp != 0) {
            digits++;
            temp /= 10;
        }
        bytes memory buffer = new bytes(digits);
        while (value != 0) {
            digits -= 1;
            buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));
            value /= 10;
        }
        return string(buffer);
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
     */
    function toHexString(uint256 value) internal pure returns (string memory) {
        if (value == 0) {
            return "0x00";
        }
        uint256 temp = value;
        uint256 length = 0;
        while (temp != 0) {
            length++;
            temp >>= 8;
        }
        return toHexString(value, length);
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.
     */
    function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {
        bytes memory buffer = new bytes(2 * length + 2);
        buffer[0] = "0";
        buffer[1] = "x";
        for (uint256 i = 2 * length + 1; i > 1; --i) {
            buffer[i] = _HEX_SYMBOLS[value & 0xf];
            value >>= 4;
        }
        require(value == 0, "Strings: hex length insufficient");
        return string(buffer);
    }

    /**
     * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.
     */
    function toHexString(address addr) internal pure returns (string memory) {
        return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);
    }
}

//SPDX-License-Identifier: Unlicense
pragma solidity 0.8.17;

library AirAddress {
  function toAsciiString(address x) internal pure returns (string memory) {
    bytes memory s = new bytes(40);
    for (uint256 i = 0; i < 20; i++) {
      bytes1 b = bytes1(uint8(uint256(uint160(x)) / (2**(8 * (19 - i)))));
      bytes1 hi = bytes1(uint8(b) / 16);
      bytes1 lo = bytes1(uint8(b) - 16 * uint8(hi));
      s[2 * i] = char(hi);
      s[2 * i + 1] = char(lo);
    }
    return string(s);
  }

  function char(bytes1 b) internal pure returns (bytes1 c) {
    if (uint8(b) < 10) return bytes1(uint8(b) + 0x30);
    else return bytes1(uint8(b) + 0x57);
  }
}

// SPDX-License-Identifier: MIT
pragma solidity 0.8.17;

import "@openzeppelin/contracts/utils/math/SafeMath.sol";

/**
 * @dev A contract for managing claims within a window and
 *  ensuring that each claim can only be made once.
 */
abstract contract Claimable {
  using SafeMath for uint256;

  // Mapping from claim ID to a boolean indicating whether the claim has been made or not.
  mapping(bytes32 => bool) public hasClaimed;
  // Mapping from a window ID to the total amount claimed within that window.
  mapping(bytes32 => uint256) public windowClaimed;

  /**
   * @dev Internal function to update the window claimed amount when the amount does not exceed the window limit.
   * @param amount The amount being claimed.
   * @param window The ID of the window being claimed within.
   * @param windowLimit The maximum amount that can be claimed within the window.
   * @return windowLiquidity The remaining amount that can be claimed within the window.
   */
  function _updateWindow(
    uint256 amount,
    bytes32 window,
    uint256 windowLimit
  ) internal returns (uint256 windowLiquidity) {
    require(amount > 0, "Claimable:invalid-amount");
    windowLiquidity = windowLimit - windowClaimed[window];
    require(amount <= windowLiquidity, "Claimable:insufficient-fund");
    windowClaimed[window] = windowClaimed[window].add(amount);
  }

  /**
   * @dev Internal function to update the window claimed amount and the claim ID has not been used before.
   * @param amount The amount being claimed.
   * @param window The ID of the window being claimed within.
   * @param windowLimit The maximum amount that can be claimed within the window.
   * @param claimId The ID of the claim being made.
   * @return windowLiquidity The remaining amount that can be claimed within the window.
   */
  function _updateClaim(
    uint256 amount,
    bytes32 window,
    uint256 windowLimit,
    bytes32 claimId
  ) internal returns (uint256 windowLiquidity) {
    windowLiquidity = _updateWindow(amount, window, windowLimit);
    require(!hasClaimed[claimId], "Claimable:already-claimed");
    hasClaimed[claimId] = true;
  }

  /**
   * @dev Internal function to update the window claimed amount and multiple claim IDs have not been used before.
   * @param amount The amount being claimed.
   * @param window The ID of the window being claimed within.
   * @param windowLimit The maximum amount that can be claimed within the window.
   * @param claimIds An array of claim IDs being made.
   * @return windowLiquidity The remaining amount that can be claimed within the window.
   */
  function _updateBatchClaim(
    uint256 amount,
    bytes32 window,
    uint256 windowLimit,
    bytes32[] calldata claimIds
  ) internal returns (uint256 windowLiquidity) {
    windowLiquidity = _updateWindow(amount, window, windowLimit);
    for (uint256 i = 0; i < claimIds.length; i++) {
      require(!hasClaimed[claimIds[i]], "Claimable:already-claimed");
      hasClaimed[claimIds[i]] = true;
    }
  }

  /**
   * @dev Get the claimed status for multiple claims
   * @param ids IDs of the claims to check
   * @return batchClaimed Array of claimed status for each ID provided
   */
  function getBatchClaimed(bytes32[] calldata ids)
    external
    view
    returns (bool[] memory)
  {
    bool[] memory batchClaimed = new bool[](ids.length);
    for (uint256 i = 0; i < ids.length; ++i) {
      batchClaimed[i] = hasClaimed[ids[i]];
    }
    return batchClaimed;
  }

  /**
   * @dev Get the amount claimed for multiple windows
   * @param ids IDs of the windows to check
   * @return batchWindowsClaimed Array of claimed amounts for each window ID provided
   */
  function getBatchWindowClaimed(bytes32[] calldata ids)
    external
    view
    returns (uint256[] memory)
  {
    uint256[] memory batchWindowsClaimed = new uint256[](ids.length);

    for (uint256 i = 0; i < ids.length; ++i) {
      batchWindowsClaimed[i] = windowClaimed[ids[i]];
    }

    return batchWindowsClaimed;
  }
}

//SPDX-License-Identifier: Unlicense
pragma solidity 0.8.17;

import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "./Datastructures.sol";
import "./Ownable.sol";

abstract contract Core is Ownable, Pausable {
  using Counters for Counters.Counter;

  event UpdateCA(address indexed old, address indexed newCa);

  address public certificationAuthority;
  bytes32 private immutable _THIS_HASH;

  mapping(address => Counters.Counter) private nonces;

  constructor(address owner_, address ca) Ownable(owner_) {
    certificationAuthority = ca;
    _THIS_HASH = keccak256(abi.encode(block.chainid, address(this)));
  }

  function pause() external onlyOwner {
    _pause();
  }

  function unpause() external onlyOwner {
    _unpause();
  }

  function updateCA(address ca) external onlyOwner {
    require(ca != address(0), "Core:ca-must-be-non-zero-address");
    emit UpdateCA(certificationAuthority, ca);
    certificationAuthority = ca;
  }

  /**
   * @dev Returns the current nonce for `ca`. This value must be
   * included whenever a signature is generated.
   *
   * Every successful call to {create, withdraw, withdrawRemaining, claim} increases ``owner``'s nonce by one. This
   * prevents a signature from being used multiple times.
   */
  function getNonce(address user) public view virtual returns (uint256) {
    return nonces[user].current();
  }

  function _blockTimestamp() internal view virtual returns (uint256) {
    return block.timestamp;
  }

  /**
   * @dev "Consume a nonce": return the current value and increment.
   *
   */
  function _useNonce(address user) internal virtual returns (uint256 current) {
    Counters.Counter storage nonce = nonces[user];
    current = nonce.current();
    nonce.increment();
  }

  function _validateCertificate(
    bytes memory _message,
    Datastructures.CertificateInfo calldata certificate
  ) internal view virtual {
    require(
      _blockTimestamp() <= certificate.deadline,
      "Core:expired-certificate"
    );
    bytes32 hash = ECDSA.toEthSignedMessageHash(_message);
    address signer = ECDSA.recover(
      hash,
      certificate.v,
      certificate.r,
      certificate.s
    );

    require(certificationAuthority == signer, "Core:invalid-certificate");
  }

  function _thisHash() internal view returns (bytes32) {
    return _THIS_HASH;
  }
}

File 23 of 27 : Datastructures.sol
//SPDX-License-Identifier: Unlicense
pragma solidity 0.8.17;

library Datastructures {
  struct CertificateInfo {
    uint256 deadline;
    uint8 v;
    bytes32 r;
    bytes32 s;
  }
}

// SPDX-License-Identifier: MIT
pragma solidity 0.8.17;

import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol";
import "@openzeppelin/contracts/access/AccessControl.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import "./IAirERC721.sol";
import "../../Ownable.sol";

contract AirERC721 is Ownable, ERC165, IAirERC721, IERC721Metadata {
  using Address for address;
  using Strings for uint256;

  // Token name
  string private _name;

  // Token symbol
  string private _symbol;

  // Mapping from token ID to owner address
  mapping(uint256 => address) private _owners;

  // Mapping owner address to token count
  mapping(address => uint256) private _balances;

  // Mapping from token ID to approved address
  mapping(uint256 => address) private _tokenApprovals;

  // Mapping from owner to operator approvals
  mapping(address => mapping(address => bool)) private _operatorApprovals;

  // Token counter
  uint256 private _tokenCounter;

  // Minter
  mapping(address => bool) private _minters;

  // Default allow transfer
  bool private _transferable = true;

  // Base token URI
  string private _baseURI;

  modifier onlyMinter() {
    require(_minters[msg.sender], "ERC721:must-be-minter");
    _;
  }

  modifier onlyTransferable() {
    require(_transferable, "ERC721:is-not-transferable");
    _;
  }

  constructor(
    string memory name_,
    string memory symbol_,
    string memory baseURI_,
    address _minter,
    bool transferable_
  ) Ownable(msg.sender) {
    _name = name_;
    _symbol = symbol_;
    _minters[_minter] = true;
    _transferable = transferable_;
    _baseURI = baseURI_;
  }

  /**
   * @dev See {IERC165-supportsInterface}.
   */
  function supportsInterface(bytes4 interfaceId)
    public
    view
    virtual
    override(ERC165, IERC165)
    returns (bool)
  {
    return
      interfaceId == type(IERC721).interfaceId ||
      interfaceId == type(IERC721Metadata).interfaceId ||
      super.supportsInterface(interfaceId);
  }

  /**
   * @dev See {IERC721-balanceOf}.
   */
  function balanceOf(address owner) 
    public 
    view 
    virtual 
    override 
    returns (uint256) 
    {
    require(owner != address(0), "ERC721:owner-must-be-non-zero-address");
    return _balances[owner];
  }

  /**
   * @dev See {IERC721-ownerOf}.
   */
  function ownerOf(uint256 tokenId)
    public
    view
    virtual
    override
    returns (address)
  {
    address owner = _owners[tokenId];
    require(owner != address(0), "ERC721:invalid-token-id");
    return owner;
  }

  /**
   * @dev See {IERC721Metadata-name}.
   */
  function name() public view virtual override returns (string memory) {
    return _name;
  }

  /**
   * @dev See {IERC721Metadata-symbol}.
   */
  function symbol() public view virtual override returns (string memory) {
    return _symbol;
  }

  /**
   * @dev See {IERC721Metadata-tokenURI}.
   */
  function tokenURI(uint256 tokenId)
    public
    view
    virtual
    override
    returns (string memory)
  {
    _requireMinted(tokenId);

    return
      bytes(_baseURI).length > 0
        ? string(abi.encodePacked(_baseURI, tokenId.toString()))
        : "";
  }

  /**
   * @dev See {IERC721-approve}.
   */
  function approve(address to, uint256 tokenId) public virtual override {
    address owner = AirERC721.ownerOf(tokenId);
    require(to != owner, "ERC721:cannot-approve-to-current-owner");

    require(
      _msgSender() == owner || isApprovedForAll(owner, _msgSender()),
      "ERC721:caller-must-be-token-owner-or-approved-all"
    );

    _approve(to, tokenId);
  }

  /**
   * @dev See {IERC721-getApproved}.
   */
  function getApproved(uint256 tokenId)
    public
    view
    virtual
    override
    returns (address)
  {
    _requireMinted(tokenId);

    return _tokenApprovals[tokenId];
  }

  /**
   * @dev See {IERC721-setApprovalForAll}.
   */
  function setApprovalForAll(address operator, bool approved)
    public
    virtual
    override
  {
    _setApprovalForAll(_msgSender(), operator, approved);
  }

  /**
   * @dev See {IERC721-isApprovedForAll}.
   */
  function isApprovedForAll(address owner, address operator)
    public
    view
    virtual
    override
    returns (bool)
  {
    return _operatorApprovals[owner][operator];
  }

  /**
   * @dev See {IERC721-transferFrom}.
   */
  function transferFrom(
    address from,
    address to,
    uint256 tokenId
  ) public virtual override {
    //solhint-disable-next-line max-line-length
    require(
      _isApprovedOrOwner(_msgSender(), tokenId),
      "ERC721:caller-must-be-token-owner-or-approved"
    );

    _transfer(from, to, tokenId);
  }

  /**
   * @dev See {IERC721-safeTransferFrom}.
   */
  function safeTransferFrom(
    address from,
    address to,
    uint256 tokenId
  ) public virtual override {
    safeTransferFrom(from, to, tokenId, "");
  }

  /**
   * @dev See {IERC721-safeTransferFrom}.
   */
  function safeTransferFrom(
    address from,
    address to,
    uint256 tokenId,
    bytes memory data
  ) public virtual override {
    require(
      _isApprovedOrOwner(_msgSender(), tokenId),
      "ERC721:caller-must-be-token-owner-or-approved"
    );
    _safeTransfer(from, to, tokenId, data);
  }

  /**
   * @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.
   *
   * `data` is additional data, it has no specified format and it is sent in call to `to`.
   *
   * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g.
   * implement alternative mechanisms to perform token transfer, such as signature-based.
   *
   * Requirements:
   *
   * - `from` cannot be the zero address.
   * - `to` cannot be the zero address.
   * - `tokenId` token must exist and be owned by `from`.
   * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
   *
   * Emits a {Transfer} event.
   */
  function _safeTransfer(
    address from,
    address to,
    uint256 tokenId,
    bytes memory data
  ) internal virtual {
    _transfer(from, to, tokenId);
    require(
      _checkOnERC721Received(from, to, tokenId, data),
      "ERC721:target-cannot-receive-ERC721"
    );
  }

  /**
   * @dev Returns whether `tokenId` exists.
   *
   * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}.
   *
   * Tokens start existing when they are minted (`_mint`),
   * and stop existing when they are burned (`_burn`).
   */
  function _exists(uint256 tokenId) internal view virtual returns (bool) {
    return _owners[tokenId] != address(0);
  }

  /**
   * @dev Returns whether `spender` is allowed to manage `tokenId`.
   *
   * Requirements:
   *
   * - `tokenId` must exist.
   */
  function _isApprovedOrOwner(address spender, uint256 tokenId)
    internal
    view
    virtual
    returns (bool)
  {
    address owner = AirERC721.ownerOf(tokenId);
    return (spender == owner ||
      isApprovedForAll(owner, spender) ||
      getApproved(tokenId) == spender);
  }

  function mint(address to) external override onlyMinter {
    require(to != address(0), "ERC721:receiver-must-be-non-zero-address");
    _tokenCounter = _tokenCounter + 1;
    _balances[to] += 1;
    _owners[_tokenCounter] = to;

    require(
      _checkOnERC721Received(address(0), to, _tokenCounter, ""),
      "ERC721:target-cannot-receive-ERC721"
    );

    emit Transfer(address(0), to, _tokenCounter);
  }

  function mintBatch(address to, uint256 amount) external override onlyMinter {
    require(to != address(0), "ERC721:receiver-must-be-non-zero-address");

    for (uint256 i = 1; i <= amount; i++) {
      uint256 tokenId = _tokenCounter + i;
      _owners[tokenId] = to;
      emit Transfer(address(0), to, tokenId);
    }

    _balances[to] += amount;
    _tokenCounter = _tokenCounter + amount;
  }

  function burn(address account, uint256 tokenId) external override onlyMinter {
    require(
      _isApprovedOrOwner(_msgSender(), tokenId),
      "ERC721:caller-must-be-token-owner-or-be-approved-by-token-owner"
    );

    address owner = ownerOf(tokenId);

    require(account == owner, "ERC721:must-be-token-owner");

    // Clear approvals
    _approve(address(0), tokenId);

    _balances[owner] -= 1;
    delete _owners[tokenId];

    emit Transfer(owner, address(0), tokenId);
  }

  function burnBatch(address account, uint256[] calldata tokenIds)
    external
    override
    onlyMinter
  {
    _balances[account] -= tokenIds.length;
    for (uint256 i = 0; i < tokenIds.length; i++) {
      uint256 tokenId = tokenIds[i];
      require(
        _isApprovedOrOwner(_msgSender(), tokenId),
        "ERC721:caller-must-be-token-owner-or-be-approved-by-token-owner"
      );
      address owner = ownerOf(tokenId);

      require(account == owner, "ERC721:must-be-token-owner");
      // Clear approvals
      _approve(address(0), tokenId);

      delete _owners[tokenId];
      emit Transfer(account, address(0), tokenId);
    }
  }

  function setBaseURI(string calldata newURI) external onlyOwner {
    _baseURI = newURI;
  }

  function setTransferable(bool transferable_) external onlyOwner {
    _transferable = transferable_;
  }

  function setName(string calldata name_) external onlyOwner {
    _name = name_;
  }

  function setSymbol(string calldata symbol_) external onlyOwner {
    _symbol = symbol_;
  }

  /**
   * @dev Add a new minter.
   */
  function addMinter(address minter) external onlyOwner {
    require(minter != address(0), "ERC721:minter-must-be-non-zero-address");
    require(!_minters[minter], "ERC721:minter-already-added");
    _minters[minter] = true;
    emit AddMinter(minter);
  }

  /**
   * @dev Remove a old minter.
   */
  function removeMinter(address minter) external onlyOwner {
    require(_minters[minter], "ERC721:must-be-minter");
    delete _minters[minter];
    emit RemoveMinter(minter);
  }

  /**
   * @dev Transfers `tokenId` from `from` to `to`.
   *  As opposed to {transferFrom}, this imposes no restrictions on msg.sender.
   *
   * Requirements:
   *
   * - `to` cannot be the zero address.
   * - `tokenId` token must be owned by `from`.
   *
   * Emits a {Transfer} event.
   */
  function _transfer(
    address from,
    address to,
    uint256 tokenId
  ) internal virtual {
    require(AirERC721.ownerOf(tokenId) == from, "ERC721:must-be-token-owner");
    require(to != address(0), "ERC721:target-must-be-non-zero-address");

    // Clear approvals from the previous owner
    _approve(address(0), tokenId);

    _balances[from] -= 1;
    _balances[to] += 1;
    _owners[tokenId] = to;

    emit Transfer(from, to, tokenId);
  }

  /**
   * @dev Approve `to` to operate on `tokenId`
   *
   * Emits an {Approval} event.
   */
  function _approve(address to, uint256 tokenId) internal virtual {
    _tokenApprovals[tokenId] = to;
    emit Approval(AirERC721.ownerOf(tokenId), to, tokenId);
  }

  /**
   * @dev Approve `operator` to operate on all of `owner` tokens
   *
   * Emits an {ApprovalForAll} event.
   */
  function _setApprovalForAll(
    address owner,
    address operator,
    bool approved
  ) internal virtual {
    require(owner != operator, "ERC721:owner-must-be-different-from-operator");
    _operatorApprovals[owner][operator] = approved;
    emit ApprovalForAll(owner, operator, approved);
  }

  /**
   * @dev Reverts if the `tokenId` has not been minted yet.
   */
  function _requireMinted(uint256 tokenId) internal view virtual {
    require(_exists(tokenId), "ERC721:invalid-token-id");
  }

  /**
   * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address.
   * The call is not executed if the target address is not a contract.
   *
   * @param from address representing the previous owner of the given token ID
   * @param to target address that will receive the tokens
   * @param tokenId uint256 ID of the token to be transferred
   * @param data bytes optional data to send along with the call
   * @return bool whether the call correctly returned the expected magic value
   */
  function _checkOnERC721Received(
    address from,
    address to,
    uint256 tokenId,
    bytes memory data
  ) private returns (bool) {
    if (to.isContract()) {
      try
        IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, data)
      returns (bytes4 retval) {
        return retval == IERC721Receiver.onERC721Received.selector;
      } catch (bytes memory reason) {
        if (reason.length == 0) {
          revert("ERC721:target-cannot-receive-ERC721");
        } else {
          /// @solidity memory-safe-assembly
          assembly {
            revert(add(32, reason), mload(reason))
          }
        }
      }
    } else {
      return true;
    }
  }
}

// SPDX-License-Identifier: MIT
pragma solidity 0.8.17;

import "@openzeppelin/contracts/token/ERC721/IERC721.sol";

interface IAirERC721 is IERC721 {
  event AddMinter(address indexed newMinter);

  event RemoveMinter(address indexed oldMinter);

  function mint(address account) external;

  function mintBatch(address account, uint256 amount) external;

  function burn(address account, uint256 tokenId) external;

  function burnBatch(address account, uint256[] calldata tokenIds) external;
}

//SPDX-License-Identifier: Unlicense
pragma solidity 0.8.17;
import "../../Datastructures.sol";

interface IERC721AirbaseController {

  struct Token {
    bool active;
    address owner;
    address creator;
    bool isExternal;
  }

  event TokenCreated(
    address indexed minter,
    address indexed creator,
    address indexed contractAddr,
    string name,
    string symbol,
    address owner,
    bool transferable
  );

  event Claim(
    bytes32 indexed claimId,
    address indexed user,
    address indexed token,
    uint256 amount
  );

  event ClaimBatch(
    address indexed user,
    address indexed token,
    bytes32[] claimId,
    uint256 amount
  );

  event UpdateBaseURI(string indexed old, string indexed newURI);

  event AddToken(
    address indexed contractAddress,
    address indexed owner_,
    address indexed creator,
    bool _isExternal
  );

  function updateBaseURI(string memory newURI) external;

  function create(
    address _creator,
    string memory _name,
    string memory _symbol,
    string memory _tokenURI,
    address _owner,
    bool _transferable,
    Datastructures.CertificateInfo calldata certificate
  ) external returns (address contractAddr);

  function claim(
    address user,
    bytes32 claimId,
    address token,
    uint256 amount,
    bytes32 window,
    uint256 windowLimit,
    Datastructures.CertificateInfo calldata certificate
  ) external;

  function claimBatch(
    address user,
    bytes32[] calldata claimIds,
    address token,
    uint256 amount,
    bytes32 window,
    uint256 windowLimit,
    Datastructures.CertificateInfo calldata certificate
  ) external;

   function claimExternal(
    address user,
    bytes32 claimId,
    address token,
    uint256 amount,
    bytes32 window,
    uint256 windowLimit,
    Datastructures.CertificateInfo calldata certificate
  ) external;

  function claimExternalBatch(
    address user,
    bytes32[] calldata claimIds,
    address token,
    uint256 amount,
    bytes32 window,
    uint256 windowLimit,
    Datastructures.CertificateInfo calldata certificate
  ) external;

  
}

// SPDX-License-Identifier: MIT
pragma solidity 0.8.17;

import "@openzeppelin/contracts/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(address owner_) {
    _transferOwnership(owner_);
  }

  /**
   * @dev Throws if called by any account other than the owner.
   */
  modifier onlyOwner() {
    _checkOwner();
    _;
  }

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

  /**
   * @dev Throws if the sender is not the owner.
   */
  function _checkOwner() internal view virtual {
    require(owner() == _msgSender(), "Ownable:caller-must-be-owner");
  }

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

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

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

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

Contract Security Audit

Contract ABI

API
[{"inputs":[{"internalType":"address","name":"owner_","type":"address"},{"internalType":"address","name":"_ca","type":"address"},{"internalType":"string","name":"_baseURI","type":"string"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"contractAddress","type":"address"},{"indexed":true,"internalType":"address","name":"owner_","type":"address"},{"indexed":true,"internalType":"address","name":"creator","type":"address"},{"indexed":false,"internalType":"bool","name":"_isExternal","type":"bool"}],"name":"AddToken","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"claimId","type":"bytes32"},{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Claim","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"bytes32[]","name":"claimId","type":"bytes32[]"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"ClaimBatch","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":true,"internalType":"address","name":"minter","type":"address"},{"indexed":true,"internalType":"address","name":"creator","type":"address"},{"indexed":true,"internalType":"address","name":"contractAddr","type":"address"},{"indexed":false,"internalType":"string","name":"name","type":"string"},{"indexed":false,"internalType":"string","name":"symbol","type":"string"},{"indexed":false,"internalType":"address","name":"owner","type":"address"},{"indexed":false,"internalType":"bool","name":"transferable","type":"bool"}],"name":"TokenCreated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"string","name":"old","type":"string"},{"indexed":true,"internalType":"string","name":"newURI","type":"string"}],"name":"UpdateBaseURI","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"old","type":"address"},{"indexed":true,"internalType":"address","name":"newCa","type":"address"}],"name":"UpdateCA","type":"event"},{"inputs":[{"internalType":"address","name":"contractAddress","type":"address"},{"internalType":"address","name":"owner_","type":"address"},{"internalType":"address","name":"creator","type":"address"},{"internalType":"bool","name":"_isExternal","type":"bool"}],"name":"addToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"baseURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"certificationAuthority","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"},{"internalType":"bytes32","name":"claimId","type":"bytes32"},{"internalType":"address","name":"tokenAddr","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes32","name":"window","type":"bytes32"},{"internalType":"uint256","name":"windowLimit","type":"uint256"},{"components":[{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"internalType":"struct Datastructures.CertificateInfo","name":"certificate","type":"tuple"}],"name":"claim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"},{"internalType":"bytes32[]","name":"claimIds","type":"bytes32[]"},{"internalType":"address","name":"tokenAddr","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes32","name":"window","type":"bytes32"},{"internalType":"uint256","name":"windowLimit","type":"uint256"},{"components":[{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"internalType":"struct Datastructures.CertificateInfo","name":"certificate","type":"tuple"}],"name":"claimBatch","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"},{"internalType":"bytes32","name":"claimId","type":"bytes32"},{"internalType":"address","name":"tokenAddr","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes32","name":"window","type":"bytes32"},{"internalType":"uint256","name":"windowLimit","type":"uint256"},{"components":[{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"internalType":"struct Datastructures.CertificateInfo","name":"certificate","type":"tuple"}],"name":"claimExternal","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"},{"internalType":"bytes32[]","name":"claimIds","type":"bytes32[]"},{"internalType":"address","name":"tokenAddr","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes32","name":"window","type":"bytes32"},{"internalType":"uint256","name":"windowLimit","type":"uint256"},{"components":[{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"internalType":"struct Datastructures.CertificateInfo","name":"certificate","type":"tuple"}],"name":"claimExternalBatch","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_creator","type":"address"},{"internalType":"string","name":"name_","type":"string"},{"internalType":"string","name":"symbol_","type":"string"},{"internalType":"string","name":"tokenURI_","type":"string"},{"internalType":"address","name":"owner_","type":"address"},{"internalType":"bool","name":"_transferable","type":"bool"},{"components":[{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"internalType":"struct Datastructures.CertificateInfo","name":"certificate","type":"tuple"}],"name":"create","outputs":[{"internalType":"address","name":"contractAddr","type":"address"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32[]","name":"ids","type":"bytes32[]"}],"name":"getBatchClaimed","outputs":[{"internalType":"bool[]","name":"","type":"bool[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32[]","name":"ids","type":"bytes32[]"}],"name":"getBatchWindowClaimed","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"getNonce","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"getTokenInfo","outputs":[{"components":[{"internalType":"bool","name":"active","type":"bool"},{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"creator","type":"address"},{"internalType":"bool","name":"isExternal","type":"bool"}],"internalType":"struct IERC721AirbaseController.Token","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"hasClaimed","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":"pause","outputs":[],"stateMutability":"nonpayable","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":"","type":"address"}],"name":"tokens","outputs":[{"internalType":"bool","name":"active","type":"bool"},{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"creator","type":"address"},{"internalType":"bool","name":"isExternal","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalTokens","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"newURI","type":"string"}],"name":"updateBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"ca","type":"address"}],"name":"updateCA","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"windowClaimed","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}]

0x60a06040523480156200001157600080fd5b50604051620053923803806200539283398101604081905262000034916200013d565b8282816200004281620000ba565b506000805460ff60a01b19169055600180546001600160a01b0319166001600160a01b03831617905560408051466020820152309181019190915260600160408051601f198184030181529190528051602090910120608052505060016005556007620000b08282620002c6565b5050505062000392565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b80516001600160a01b03811681146200012257600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b6000806000606084860312156200015357600080fd5b6200015e846200010a565b925060206200016f8186016200010a565b60408601519093506001600160401b03808211156200018d57600080fd5b818701915087601f830112620001a257600080fd5b815181811115620001b757620001b762000127565b604051601f8201601f19908116603f01168101908382118183101715620001e257620001e262000127565b816040528281528a86848701011115620001fb57600080fd5b600093505b828410156200021f578484018601518185018701529285019262000200565b60008684830101528096505050505050509250925092565b600181811c908216806200024c57607f821691505b6020821081036200026d57634e487b7160e01b600052602260045260246000fd5b50919050565b601f821115620002c157600081815260208120601f850160051c810160208610156200029c5750805b601f850160051c820191505b81811015620002bd57828155600101620002a8565b5050505b505050565b81516001600160401b03811115620002e257620002e262000127565b620002fa81620002f3845462000237565b8462000273565b602080601f831160018114620003325760008415620003195750858301515b600019600386901b1c1916600185901b178555620002bd565b600085815260208120601f198616915b82811015620003635788860151825594840194600190910190840162000342565b5085821015620003825787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b608051614fc8620003ca600039600081816106bd01528181610a94015281816110f8015281816112f301526119940152614fc86000f3fe60806040523480156200001157600080fd5b5060043610620001755760003560e01c80637e1c0c0911620000d3578063a894c4571162000086578063a894c45714620003ed578063b46f2bee1462000413578063b7f14601146200042a578063e2e498d91462000441578063e48603391462000467578063f2fde38b14620004ea57600080fd5b80637e1c0c0914620003855780638456cb59146200038f5780638da5cb5b1462000399578063931688cb14620003ab578063a032d20a14620003c2578063a2d92d6614620003d957600080fd5b80635c975abb116200012c5780635c975abb14620002e557806361b7283714620003045780636c0360eb146200031b578063715018a6146200033457806372d6e1bd146200033e5780637b4909fc146200035557600080fd5b806314b65122146200017a5780631da3993114620001b05780631f69565f14620001d657806320fd027e14620002ab5780632d0335ab14620002c45780633f4ba83a14620002db575b600080fd5b6200019d6200018b36600462002179565b60046020526000908152604090205481565b6040519081526020015b60405180910390f35b620001c7620001c1366004620021e2565b62000501565b604051620001a7919062002228565b62000265620001e736600462002286565b60408051608080820183526000808352602080840182905283850182905260609384018290526001600160a01b039586168252600681529084902084519283018552805460ff808216151585526101009091048716928401929092526001015494851693820193909352600160a01b90930490911615159082015290565b604080518251151581526020808401516001600160a01b0390811691830191909152838301511691810191909152606091820151151591810191909152608001620001a7565b620002c2620002bc366004620022b7565b620005c6565b005b6200019d620002d536600462002286565b62000780565b620002c26200079f565b600054600160a01b900460ff165b6040519015158152602001620001a7565b620002c2620003153660046200233b565b620007b5565b62000325620008e2565b604051620001a79190620023ec565b620002c262000978565b620002c26200034f36600462002401565b6200098e565b6200036c620003663660046200254a565b62000bb2565b6040516001600160a01b039091168152602001620001a7565b6200019d62000ea7565b620002c262000eb8565b6000546001600160a01b03166200036c565b620002c2620003bc3660046200261b565b62000ecc565b620002c2620003d336600462002286565b62000f41565b6001546200036c906001600160a01b031681565b620002f3620003fe36600462002179565b60036020526000908152604090205460ff1681565b620002c262000424366004620022b7565b62000fff565b620002c26200043b36600462002401565b620011f9565b6200045862000452366004620021e2565b620013a0565b604051620001a7919062002654565b620004b56200047836600462002286565b6006602052600090815260409020805460019091015460ff808316926001600160a01b0361010090910481169290811691600160a01b9091041684565b604051620001a7949392919093151584526001600160a01b039283166020850152911660408301521515606082015260800190565b620002c2620004fb36600462002286565b6200146d565b606060008267ffffffffffffffff8111156200052157620005216200249f565b6040519080825280602002602001820160405280156200054b578160200160208202803683370190505b50905060005b83811015620005bc576004600086868481811062000573576200057362002690565b905060200201358152602001908152602001600020548282815181106200059e576200059e62002690565b6020908102919091010152620005b481620026bc565b905062000551565b5090505b92915050565b620005d0620014f0565b600260055403620005fe5760405162461bcd60e51b8152600401620005f590620026d8565b60405180910390fd5b60026005556001600160a01b03851660009081526006602052604090206001810154600160a01b900460ff166200066e5760405162461bcd60e51b81526020600482015260136024820152724552433732314142433a7573652d636c61696d60681b6044820152606401620005f5565b805460ff16620006925760405162461bcd60e51b8152600401620005f5906200270f565b620006a08585858a6200153f565b506000620006ae89620015cf565b905060008989898989898935887f0000000000000000000000000000000000000000000000000000000000000000604051602001620006f69998979695949392919062002746565b6040516020818303038152906040529050620007138185620015f7565b62000720888b89620016ea565b876001600160a01b03168a6001600160a01b03168a7fa45c018c08cffc1e5d85864e334de0f820678cb0f6278a9ee5ed170b2b3d94d78a6040516200076791815260200190565b60405180910390a4505060016005555050505050505050565b6001600160a01b038116600090815260026020526040812054620005c0565b620007a962001769565b620007b3620017c5565b565b620007bf62001769565b6001600160a01b038416620008225760405162461bcd60e51b815260206004820152602260248201527f4552433732314142433a696e76616c69642d636f6e74726163742d6164647265604482015261737360f01b6064820152608401620005f5565b6001600160a01b0380851660009081526006602052604090208054858316610100026001600160a81b0319918216176001908117835582018054851515600160a01b029216938616939093171790915562000881600880546001019055565b826001600160a01b0316846001600160a01b0316866001600160a01b03167f4c5718421b3801475e265ae9ab80227c467f061ad9b88372dad584aeaf4fb15485604051620008d3911515815260200190565b60405180910390a45050505050565b60078054620008f19062002796565b80601f01602080910402602001604051908101604052809291908181526020018280546200091f9062002796565b8015620009705780601f10620009445761010080835404028352916020019162000970565b820191906000526020600020905b8154815290600101906020018083116200095257829003601f168201915b505050505081565b6200098262001769565b620007b360006200181c565b62000998620014f0565b600260055403620009bd5760405162461bcd60e51b8152600401620005f590620026d8565b60026005556001600160a01b03851660009081526006602052604090206001810154600160a01b900460ff161562000a435760405162461bcd60e51b815260206004820152602260248201527f4552433732314142433a7573652d636c61696d2d65787465726e616c2d6261746044820152610c6d60f31b6064820152608401620005f5565b805460ff1662000a675760405162461bcd60e51b8152600401620005f5906200270f565b62000a768585858b8b6200186c565b50600062000a848a620015cf565b905060008a8a8a8a8a8a8a8a35897f000000000000000000000000000000000000000000000000000000000000000060405160200162000ace9a99989796959493929190620027ff565b604051602081830303815290604052905062000aeb8185620015f7565b604051630922dc7f60e21b81526001600160a01b038c811660048301526024820189905289169063248b71fc90604401600060405180830381600087803b15801562000b3657600080fd5b505af115801562000b4b573d6000803e3d6000fd5b50505050876001600160a01b03168b6001600160a01b03167f8cccb6bc39b8f83ea43afb129a5cb259bfbe1f692c17e90f15cdadd2cb95ad648c8c8b60405162000b989392919062002861565b60405180910390a350506001600555505050505050505050565b600062000bbe620014f0565b600062000bcb89620015cf565b604080516001600160a01b038c16602082015290810182905290915060009060600160405160208183030381529060405280519060200120905060006040518060200162000c19906200216b565b601f1982820381018352601f90910116604081905262000c46908c908c908c9030908c9060200162002887565b60408051601f198184030181529082905262000c669291602001620028e9565b6040516020818303038152906040529050818151602083016000f5935062000c9087858762001971565b8751849060000362000d3657806001600160a01b03166355f804b3600762000cc1886001600160a01b0316620019da565b60405160200162000cd492919062002997565b6040516020818303038152906040526040518263ffffffff1660e01b815260040162000d019190620023ec565b600060405180830381600087803b15801562000d1c57600080fd5b505af115801562000d31573d6000803e3d6000fd5b505050505b60405163f2fde38b60e01b81526001600160a01b03898116600483015282169063f2fde38b90602401600060405180830381600087803b15801562000d7a57600080fd5b505af115801562000d8f573d6000803e3d6000fd5b50505050600060066000876001600160a01b03166001600160a01b03168152602001908152602001600020905060018160000160006101000a81548160ff021916908315150217905550888160000160016101000a8154816001600160a01b0302191690836001600160a01b031602179055508c8160010160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555062000e3a600880546001019055565b856001600160a01b03168d6001600160a01b0316306001600160a01b03167f3923665a02dad5d6680d3fe2477c048eb90c41b1859237c692b8f515b18e64f28f8f8e8e60405162000e8f9493929190620029dc565b60405180910390a45050505050979650505050505050565b600062000eb360085490565b905090565b62000ec262001769565b620007b362001b43565b62000ed662001769565b8060405162000ee6919062002a27565b6040518091039020600760405162000eff919062002a45565b604051908190038120907f8df4f488121a100577506716b83a42d04585c6b7b93941484c5b63b503e1806d90600090a3600762000f3d828262002aa6565b5050565b62000f4b62001769565b6001600160a01b03811662000fa35760405162461bcd60e51b815260206004820181905260248201527f436f72653a63612d6d7573742d62652d6e6f6e2d7a65726f2d616464726573736044820152606401620005f5565b6001546040516001600160a01b038084169216907f80db520797a74a3fc61723e79b460b431b2cb614e41b3a8bea1cf760de40873890600090a3600180546001600160a01b0319166001600160a01b0392909216919091179055565b62001009620014f0565b6002600554036200102e5760405162461bcd60e51b8152600401620005f590620026d8565b60026005556001600160a01b03851660009081526006602052604090206001810154600160a01b900460ff1615620010a95760405162461bcd60e51b815260206004820152601c60248201527f4552433732314142433a7573652d636c61696d2d65787465726e616c000000006044820152606401620005f5565b805460ff16620010cd5760405162461bcd60e51b8152600401620005f5906200270f565b620010db8585858a6200153f565b506000620010e989620015cf565b905060008989898989898935887f0000000000000000000000000000000000000000000000000000000000000000604051602001620011319998979695949392919062002746565b60405160208183030381529060405290506200114e8185620015f7565b604051630922dc7f60e21b81526001600160a01b038b811660048301526024820189905289169063248b71fc90604401600060405180830381600087803b1580156200119957600080fd5b505af1158015620011ae573d6000803e3d6000fd5b50505050876001600160a01b03168a6001600160a01b03168a7fa45c018c08cffc1e5d85864e334de0f820678cb0f6278a9ee5ed170b2b3d94d78a6040516200076791815260200190565b62001203620014f0565b600260055403620012285760405162461bcd60e51b8152600401620005f590620026d8565b60026005556001600160a01b03851660009081526006602052604090206001810154600160a01b900460ff16620012a25760405162461bcd60e51b815260206004820152601960248201527f4552433732314142433a7573652d636c61696d2d6261746368000000000000006044820152606401620005f5565b805460ff16620012c65760405162461bcd60e51b8152600401620005f5906200270f565b620012d58585858b8b6200186c565b506000620012e38a620015cf565b905060008a8a8a8a8a8a8a8a35897f00000000000000000000000000000000000000000000000000000000000000006040516020016200132d9a99989796959493929190620027ff565b60405160208183030381529060405290506200134a8185620015f7565b62001357888c89620016ea565b876001600160a01b03168b6001600160a01b03167f8cccb6bc39b8f83ea43afb129a5cb259bfbe1f692c17e90f15cdadd2cb95ad648c8c8b60405162000b989392919062002861565b606060008267ffffffffffffffff811115620013c057620013c06200249f565b604051908082528060200260200182016040528015620013ea578160200160208202803683370190505b50905060005b83811015620005bc576003600086868481811062001412576200141262002690565b90506020020135815260200190815260200160002060009054906101000a900460ff168282815181106200144a576200144a62002690565b911515602092830291909101909101526200146581620026bc565b9050620013f0565b6200147762001769565b6001600160a01b038116620014e25760405162461bcd60e51b815260206004820152602a60248201527f4f776e61626c653a6e65772d6f776e65722d6d7573742d62652d6e6f6e2d7a65604482015269726f2d6164647265737360b01b6064820152608401620005f5565b620014ed816200181c565b50565b600054600160a01b900460ff1615620007b35760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401620005f5565b60006200154e85858562001b89565b60008381526003602052604090205490915060ff1615620015ae5760405162461bcd60e51b815260206004820152601960248201527810db185a5b58589b194e985b1c9958591e4b58db185a5b5959603a1b6044820152606401620005f5565b600091825260036020526040909120805460ff191660011790559392505050565b6001600160a01b03811660009081526002602052604090208054600181018255905b50919050565b80354211156200164a5760405162461bcd60e51b815260206004820152601860248201527f436f72653a657870697265642d636572746966696361746500000000000000006044820152606401620005f5565b6000620016578362001c7f565b90506000620016828262001672604086016020870162002b73565b8560400135866060013562001cbe565b6001549091506001600160a01b03808316911614620016e45760405162461bcd60e51b815260206004820152601860248201527f436f72653a696e76616c69642d636572746966696361746500000000000000006044820152606401620005f5565b50505050565b60005b81811015620016e4576040516335313c2160e11b81526001600160a01b038481166004830152851690636a62784290602401600060405180830381600087803b1580156200173a57600080fd5b505af11580156200174f573d6000803e3d6000fd5b5050505080806200176090620026bc565b915050620016ed565b6000546001600160a01b03163314620007b35760405162461bcd60e51b815260206004820152601c60248201527f4f776e61626c653a63616c6c65722d6d7573742d62652d6f776e6572000000006044820152606401620005f5565b620017cf62001ce0565b6000805460ff60a01b191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60006200187b86868662001b89565b905060005b82811015620019675760036000858584818110620018a257620018a262002690565b602090810292909201358352508101919091526040016000205460ff16156200190a5760405162461bcd60e51b815260206004820152601960248201527810db185a5b58589b194e985b1c9958591e4b58db185a5b5959603a1b6044820152606401620005f5565b60016003600086868581811062001925576200192562002690565b90506020020135815260200190815260200160002060006101000a81548160ff02191690831515021790555080806200195e90620026bc565b91505062001880565b5095945050505050565b604080516001600160a01b038086166020830152841681830152823560608201527f00000000000000000000000000000000000000000000000000000000000000006080808301919091528251808303909101815260a0909101909152620016e48183620015f7565b60408051602880825260608281019093526000919060208201818036833701905050905060005b601481101562001b3c57600062001a1a82601362002b98565b62001a2790600862002bae565b62001a3490600262002cc5565b62001a49906001600160a01b03871662002ce9565b60f81b9050600060108260f81c62001a62919062002d00565b60f81b905060008160f81c601062001a7b919062002d25565b8360f81c62001a8b919062002d44565b60f81b905062001a9b8262001d32565b8562001aa986600262002bae565b8151811062001abc5762001abc62002690565b60200101906001600160f81b031916908160001a90535062001ade8162001d32565b8562001aec86600262002bae565b62001af990600162002d60565b8151811062001b0c5762001b0c62002690565b60200101906001600160f81b031916908160001a905350505050808062001b3390620026bc565b91505062001a01565b5092915050565b62001b4d620014f0565b6000805460ff60a01b1916600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258620017ff3390565b600080841162001bdc5760405162461bcd60e51b815260206004820152601860248201527f436c61696d61626c653a696e76616c69642d616d6f756e7400000000000000006044820152606401620005f5565b60008381526004602052604090205462001bf7908362002b98565b90508084111562001c4b5760405162461bcd60e51b815260206004820152601b60248201527f436c61696d61626c653a696e73756666696369656e742d66756e6400000000006044820152606401620005f5565b60008381526004602052604090205462001c66908562001d72565b6000938452600460205260409093209290925550919050565b600062001c8d825162001d87565b8260405160200162001ca192919062002d76565b604051602081830303815290604052805190602001209050919050565b600080600062001cd18787878762001ea8565b91509150620019678162001f9d565b600054600160a01b900460ff16620007b35760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401620005f5565b6000600a60f883901c101562001d5c5762001d5360f883901c603062002dd5565b60f81b92915050565b62001d5360f883901c605762002dd5565b919050565b600062001d80828462002d60565b9392505050565b60608160000362001daf5750506040805180820190915260018152600360fc1b602082015290565b8160005b811562001ddf578062001dc681620026bc565b915062001dd79050600a8362002ce9565b915062001db3565b60008167ffffffffffffffff81111562001dfd5762001dfd6200249f565b6040519080825280601f01601f19166020018201604052801562001e28576020820181803683370190505b5090505b841562001ea05762001e4060018362002b98565b915062001e4f600a8662002df1565b62001e5c90603062002d60565b60f81b81838151811062001e745762001e7462002690565b60200101906001600160f81b031916908160001a90535062001e98600a8662002ce9565b945062001e2c565b949350505050565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a083111562001ee1575060009050600362001f94565b8460ff16601b1415801562001efa57508460ff16601c14155b1562001f0d575060009050600462001f94565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa15801562001f62573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811662001f8d5760006001925092505062001f94565b9150600090505b94509492505050565b600081600481111562001fb45762001fb462002e08565b0362001fbd5750565b600181600481111562001fd45762001fd462002e08565b03620020235760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401620005f5565b60028160048111156200203a576200203a62002e08565b03620020895760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401620005f5565b6003816004811115620020a057620020a062002e08565b03620020fa5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401620005f5565b600481600481111562002111576200211162002e08565b03620014ed5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b6064820152608401620005f5565b61219d8062002e1f83390190565b6000602082840312156200218c57600080fd5b5035919050565b60008083601f840112620021a657600080fd5b50813567ffffffffffffffff811115620021bf57600080fd5b6020830191508360208260051b8501011115620021db57600080fd5b9250929050565b60008060208385031215620021f657600080fd5b823567ffffffffffffffff8111156200220e57600080fd5b6200221c8582860162002193565b90969095509350505050565b6020808252825182820181905260009190848201906040850190845b81811015620022625783518352928401929184019160010162002244565b50909695505050505050565b80356001600160a01b038116811462001d6d57600080fd5b6000602082840312156200229957600080fd5b62001d80826200226e565b600060808284031215620015f157600080fd5b6000806000806000806000610140888a031215620022d457600080fd5b620022df886200226e565b965060208801359550620022f6604089016200226e565b9450606088013593506080880135925060a088013591506200231c8960c08a01620022a4565b905092959891949750929550565b8035801515811462001d6d57600080fd5b600080600080608085870312156200235257600080fd5b6200235d856200226e565b93506200236d602086016200226e565b92506200237d604086016200226e565b91506200238d606086016200232a565b905092959194509250565b60005b83811015620023b55781810151838201526020016200239b565b50506000910152565b60008151808452620023d881602086016020860162002398565b601f01601f19169290920160200192915050565b60208152600062001d806020830184620023be565b600080600080600080600080610140898b0312156200241f57600080fd5b6200242a896200226e565b9750602089013567ffffffffffffffff8111156200244757600080fd5b620024558b828c0162002193565b90985096506200246a905060408a016200226e565b9450606089013593506080890135925060a08901359150620024908a60c08b01620022a4565b90509295985092959890939650565b634e487b7160e01b600052604160045260246000fd5b600082601f830112620024c757600080fd5b813567ffffffffffffffff80821115620024e557620024e56200249f565b604051601f8301601f19908116603f011681019082821181831017156200251057620025106200249f565b816040528381528660208588010111156200252a57600080fd5b836020870160208301376000602085830101528094505050505092915050565b6000806000806000806000610140888a0312156200256757600080fd5b62002572886200226e565b9650602088013567ffffffffffffffff808211156200259057600080fd5b6200259e8b838c01620024b5565b975060408a0135915080821115620025b557600080fd5b620025c38b838c01620024b5565b965060608a0135915080821115620025da57600080fd5b50620025e98a828b01620024b5565b945050620025fa608089016200226e565b92506200260a60a089016200232a565b91506200231c8960c08a01620022a4565b6000602082840312156200262e57600080fd5b813567ffffffffffffffff8111156200264657600080fd5b62001ea084828501620024b5565b6020808252825182820181905260009190848201906040850190845b818110156200226257835115158352928401929184019160010162002670565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600060018201620026d157620026d1620026a6565b5060010190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b60208082526018908201527f4552433732314142433a696e6163746976652d746f6b656e0000000000000000604082015260600190565b6001600160a01b03998a16815260208101989098529590971660408701526060860193909352608085019190915260a084015260c083015260e08201929092526101008101919091526101200190565b600181811c90821680620027ab57607f821691505b602082108103620015f157634e487b7160e01b600052602260045260246000fd5b81835260006001600160fb1b03831115620027e657600080fd5b8260051b80836020870137939093016020019392505050565b6001600160a01b038b8116825261012060208301819052600091620028288483018d8f620027cc565b9a16604084015250506060810196909652608086019490945260a085019290925260c084015260e0830152610100909101529392505050565b60408152600062002877604083018587620027cc565b9050826020830152949350505050565b60a0815260006200289c60a0830188620023be565b8281036020840152620028b08188620023be565b90508281036040840152620028c68187620023be565b6001600160a01b0395909516606084015250509015156080909101529392505050565b60008351620028fd81846020880162002398565b8351908301906200291381836020880162002398565b01949350505050565b600081546200292b8162002796565b600182811680156200294657600181146200295c576200298d565b60ff19841687528215158302870194506200298d565b8560005260208060002060005b85811015620029845781548a82015290840190820162002969565b50505082870194505b5050505092915050565b6000620029a582856200291c565b61060f60f31b81528351620029c281600284016020880162002398565b602f60f81b60029290910191820152600301949350505050565b608081526000620029f16080830187620023be565b828103602084015262002a058187620023be565b6001600160a01b03959095166040840152505090151560609091015292915050565b6000825162002a3b81846020870162002398565b9190910192915050565b600062001d8082846200291c565b601f82111562002aa157600081815260208120601f850160051c8101602086101562002a7c5750805b601f850160051c820191505b8181101562002a9d5782815560010162002a88565b5050505b505050565b815167ffffffffffffffff81111562002ac35762002ac36200249f565b62002adb8162002ad4845462002796565b8462002a53565b602080601f83116001811462002b13576000841562002afa5750858301515b600019600386901b1c1916600185901b17855562002a9d565b600085815260208120601f198616915b8281101562002b445788860151825594840194600190910190840162002b23565b508582101562002b635787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b60006020828403121562002b8657600080fd5b813560ff8116811462001d8057600080fd5b81810381811115620005c057620005c0620026a6565b8082028115828204841417620005c057620005c0620026a6565b600181815b8085111562002c0957816000190482111562002bed5762002bed620026a6565b8085161562002bfb57918102915b93841c939080029062002bcd565b509250929050565b60008262002c2257506001620005c0565b8162002c3157506000620005c0565b816001811462002c4a576002811462002c555762002c75565b6001915050620005c0565b60ff84111562002c695762002c69620026a6565b50506001821b620005c0565b5060208310610133831016604e8410600b841016171562002c9a575081810a620005c0565b62002ca6838362002bc8565b806000190482111562002cbd5762002cbd620026a6565b029392505050565b600062001d80838362002c11565b634e487b7160e01b600052601260045260246000fd5b60008262002cfb5762002cfb62002cd3565b500490565b600060ff83168062002d165762002d1662002cd3565b8060ff84160491505092915050565b60ff818116838216029081169081811462001b3c5762001b3c620026a6565b60ff8281168282160390811115620005c057620005c0620026a6565b80820180821115620005c057620005c0620026a6565b7f19457468657265756d205369676e6564204d6573736167653a0a00000000000081526000835162002db081601a85016020880162002398565b83519083019062002dc981601a84016020880162002398565b01601a01949350505050565b60ff8181168382160190811115620005c057620005c0620026a6565b60008262002e035762002e0362002cd3565b500690565b634e487b7160e01b600052602160045260246000fdfe60806040526009805460ff191660011790553480156200001e57600080fd5b506040516200219d3803806200219d8339810160408190526200004191620001ce565b336200004d81620000b9565b5060016200005c86826200032c565b5060026200006b85826200032c565b506001600160a01b03821660009081526008602052604090208054600160ff199182161790915560098054909116821515179055600a620000ad84826200032c565b505050505050620003f8565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126200013157600080fd5b81516001600160401b03808211156200014e576200014e62000109565b604051601f8301601f19908116603f0116810190828211818310171562000179576200017962000109565b816040528381526020925086838588010111156200019657600080fd5b600091505b83821015620001ba57858201830151818301840152908201906200019b565b600093810190920192909252949350505050565b600080600080600060a08688031215620001e757600080fd5b85516001600160401b0380821115620001ff57600080fd5b6200020d89838a016200011f565b965060208801519150808211156200022457600080fd5b6200023289838a016200011f565b955060408801519150808211156200024957600080fd5b5062000258888289016200011f565b606088015190945090506001600160a01b03811681146200027857600080fd5b608087015190925080151581146200028f57600080fd5b809150509295509295909350565b600181811c90821680620002b257607f821691505b602082108103620002d357634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200032757600081815260208120601f850160051c81016020861015620003025750805b601f850160051c820191505b8181101562000323578281556001016200030e565b5050505b505050565b81516001600160401b0381111562000348576200034862000109565b62000360816200035984546200029d565b84620002d9565b602080601f8311600181146200039857600084156200037f5750858301515b600019600386901b1c1916600185901b17855562000323565b600085815260208120601f198616915b82811015620003c957888601518255948401946001909101908401620003a8565b5085821015620003e85787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b611d9580620004086000396000f3fe608060405234801561001057600080fd5b506004361061018e5760003560e01c80638da5cb5b116100de578063b2dc5dc311610097578063c47f002711610071578063c47f00271461035c578063c87b56dd1461036f578063e985e9c514610382578063f2fde38b1461039557600080fd5b8063b2dc5dc314610323578063b84c824614610336578063b88d4fde1461034957600080fd5b80638da5cb5b146102be57806395d89b41146102cf578063983b2d56146102d75780639cd23707146102ea5780639dc29fac146102fd578063a22cb4651461031057600080fd5b80633092afd51161014b5780636352211e116101255780636352211e1461026f5780636a6278421461028257806370a0823114610295578063715018a6146102b657600080fd5b80633092afd51461023657806342842e0e1461024957806355f804b31461025c57600080fd5b806301ffc9a71461019357806306fdde03146101bb578063081812fc146101d0578063095ea7b3146101fb57806323b872dd14610210578063248b71fc14610223575b600080fd5b6101a66101a136600461154b565b6103a8565b60405190151581526020015b60405180910390f35b6101c36103fa565b6040516101b291906115bf565b6101e36101de3660046115d2565b61048c565b6040516001600160a01b0390911681526020016101b2565b61020e610209366004611607565b6104b3565b005b61020e61021e366004611631565b6105c6565b61020e610231366004611607565b6105f8565b61020e61024436600461166d565b610705565b61020e610257366004611631565b61078e565b61020e61026a366004611688565b6107a9565b6101e361027d3660046115d2565b6107be565b61020e61029036600461166d565b61081d565b6102a86102a336600461166d565b61093d565b6040519081526020016101b2565b61020e6109bf565b6000546001600160a01b03166101e3565b6101c36109d3565b61020e6102e536600461166d565b6109e2565b61020e6102f836600461170a565b610b04565b61020e61030b366004611607565b610b1f565b61020e61031e366004611725565b610c2e565b61020e610331366004611758565b610c3d565b61020e610344366004611688565b610d8b565b61020e6103573660046117f4565b610da0565b61020e61036a366004611688565b610dd2565b6101c361037d3660046115d2565b610de7565b6101a66103903660046118d0565b610e4e565b61020e6103a336600461166d565b610e7c565b60006001600160e01b031982166380ac58cd60e01b14806103d957506001600160e01b03198216635b5e139f60e01b145b806103f457506301ffc9a760e01b6001600160e01b03198316145b92915050565b606060018054610409906118fa565b80601f0160208091040260200160405190810160405280929190818152602001828054610435906118fa565b80156104825780601f1061045757610100808354040283529160200191610482565b820191906000526020600020905b81548152906001019060200180831161046557829003601f168201915b5050505050905090565b600061049782610ef9565b506000908152600560205260409020546001600160a01b031690565b60006104be826107be565b9050806001600160a01b0316836001600160a01b0316036105355760405162461bcd60e51b815260206004820152602660248201527f4552433732313a63616e6e6f742d617070726f76652d746f2d63757272656e7460448201526516b7bbb732b960d11b60648201526084015b60405180910390fd5b336001600160a01b038216148061055157506105518133610e4e565b6105b75760405162461bcd60e51b815260206004820152603160248201527f4552433732313a63616c6c65722d6d7573742d62652d746f6b656e2d6f776e656044820152701c8b5bdc8b585c1c1c9bdd99590b585b1b607a1b606482015260840161052c565b6105c18383610f57565b505050565b6105d1335b82610fc5565b6105ed5760405162461bcd60e51b815260040161052c90611934565b6105c1838383611024565b3360009081526008602052604090205460ff166106275760405162461bcd60e51b815260040161052c90611981565b6001600160a01b03821661064d5760405162461bcd60e51b815260040161052c906119b0565b60015b8181116106c2576000816007546106679190611a0e565b60008181526003602052604080822080546001600160a01b0319166001600160a01b03891690811790915590519293508392909190600080516020611d69833981519152908290a450806106ba81611a21565b915050610650565b506001600160a01b038216600090815260046020526040812080548392906106eb908490611a0e565b90915550506007546106fe908290611a0e565b6007555050565b61070d611173565b6001600160a01b03811660009081526008602052604090205460ff166107455760405162461bcd60e51b815260040161052c90611981565b6001600160a01b038116600081815260086020526040808220805460ff19169055517f2f91b591fc56ac0917953ad01ec225524ee5ef0555213e4c8a9d8c9728ee7ffb9190a250565b6105c183838360405180602001604052806000815250610da0565b6107b1611173565b600a6105c1828483611a88565b6000818152600360205260408120546001600160a01b0316806103f45760405162461bcd60e51b8152602060048201526017602482015276115490cdcc8c4e9a5b9d985b1a590b5d1bdad95b8b5a59604a1b604482015260640161052c565b3360009081526008602052604090205460ff1661084c5760405162461bcd60e51b815260040161052c90611981565b6001600160a01b0381166108725760405162461bcd60e51b815260040161052c906119b0565b600754610880906001611a0e565b6007556001600160a01b03811660009081526004602052604081208054600192906108ac908490611a0e565b909155505060078054600090815260036020908152604080832080546001600160a01b0319166001600160a01b038716179055925483519182019093528181526108f79284916111cd565b6109135760405162461bcd60e51b815260040161052c90611b49565b6007546040516001600160a01b03831690600090600080516020611d69833981519152908290a450565b60006001600160a01b0382166109a35760405162461bcd60e51b815260206004820152602560248201527f4552433732313a6f776e65722d6d7573742d62652d6e6f6e2d7a65726f2d6164604482015264647265737360d81b606482015260840161052c565b506001600160a01b031660009081526004602052604090205490565b6109c7611173565b6109d160006112ce565b565b606060028054610409906118fa565b6109ea611173565b6001600160a01b038116610a4f5760405162461bcd60e51b815260206004820152602660248201527f4552433732313a6d696e7465722d6d7573742d62652d6e6f6e2d7a65726f2d6160448201526564647265737360d01b606482015260840161052c565b6001600160a01b03811660009081526008602052604090205460ff1615610ab85760405162461bcd60e51b815260206004820152601b60248201527f4552433732313a6d696e7465722d616c72656164792d61646465640000000000604482015260640161052c565b6001600160a01b038116600081815260086020526040808220805460ff19166001179055517f16baa937b08d58713325f93ac58b8a9369a4359bbefb4957d6d9b402735722ab9190a250565b610b0c611173565b6009805460ff1916911515919091179055565b3360009081526008602052604090205460ff16610b4e5760405162461bcd60e51b815260040161052c90611981565b610b57336105cb565b610b735760405162461bcd60e51b815260040161052c90611b8c565b6000610b7e826107be565b9050806001600160a01b0316836001600160a01b031614610bb15760405162461bcd60e51b815260040161052c90611be9565b610bbc600083610f57565b6001600160a01b0381166000908152600460205260408120805460019290610be5908490611c20565b909155505060008281526003602052604080822080546001600160a01b0319169055518391906001600160a01b03841690600080516020611d69833981519152908390a4505050565b610c3933838361131e565b5050565b3360009081526008602052604090205460ff16610c6c5760405162461bcd60e51b815260040161052c90611981565b6001600160a01b03831660009081526004602052604081208054839290610c94908490611c20565b90915550600090505b81811015610d85576000838383818110610cb957610cb9611c33565b905060200201359050610ccc6105cb3390565b610ce85760405162461bcd60e51b815260040161052c90611b8c565b6000610cf3826107be565b9050806001600160a01b0316866001600160a01b031614610d265760405162461bcd60e51b815260040161052c90611be9565b610d31600083610f57565b60008281526003602052604080822080546001600160a01b0319169055518391906001600160a01b03891690600080516020611d69833981519152908390a450508080610d7d90611a21565b915050610c9d565b50505050565b610d93611173565b60026105c1828483611a88565b610daa3383610fc5565b610dc65760405162461bcd60e51b815260040161052c90611934565b610d8584848484611401565b610dda611173565b60016105c1828483611a88565b6060610df282610ef9565b6000600a8054610e01906118fa565b905011610e1d57604051806020016040528060008152506103f4565b600a610e2883611434565b604051602001610e39929190611c49565b60405160208183030381529060405292915050565b6001600160a01b03918216600090815260066020908152604080832093909416825291909152205460ff1690565b610e84611173565b6001600160a01b038116610eed5760405162461bcd60e51b815260206004820152602a60248201527f4f776e61626c653a6e65772d6f776e65722d6d7573742d62652d6e6f6e2d7a65604482015269726f2d6164647265737360b01b606482015260840161052c565b610ef6816112ce565b50565b6000818152600360205260409020546001600160a01b0316610ef65760405162461bcd60e51b8152602060048201526017602482015276115490cdcc8c4e9a5b9d985b1a590b5d1bdad95b8b5a59604a1b604482015260640161052c565b600081815260056020526040902080546001600160a01b0319166001600160a01b0384169081179091558190610f8c826107be565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b600080610fd1836107be565b9050806001600160a01b0316846001600160a01b03161480610ff85750610ff88185610e4e565b8061101c5750836001600160a01b03166110118461048c565b6001600160a01b0316145b949350505050565b826001600160a01b0316611037826107be565b6001600160a01b03161461105d5760405162461bcd60e51b815260040161052c90611be9565b6001600160a01b0382166110c25760405162461bcd60e51b815260206004820152602660248201527f4552433732313a7461726765742d6d7573742d62652d6e6f6e2d7a65726f2d6160448201526564647265737360d01b606482015260840161052c565b6110cd600082610f57565b6001600160a01b03831660009081526004602052604081208054600192906110f6908490611c20565b90915550506001600160a01b0382166000908152600460205260408120805460019290611124908490611a0e565b909155505060008181526003602052604080822080546001600160a01b0319166001600160a01b038681169182179092559151849391871691600080516020611d6983398151915291a4505050565b6000546001600160a01b031633146109d15760405162461bcd60e51b815260206004820152601c60248201527f4f776e61626c653a63616c6c65722d6d7573742d62652d6f776e657200000000604482015260640161052c565b60006001600160a01b0384163b156112c357604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290611211903390899088908890600401611cd0565b6020604051808303816000875af192505050801561124c575060408051601f3d908101601f1916820190925261124991810190611d0d565b60015b6112a9573d80801561127a576040519150601f19603f3d011682016040523d82523d6000602084013e61127f565b606091505b5080516000036112a15760405162461bcd60e51b815260040161052c90611b49565b805181602001fd5b6001600160e01b031916630a85bd0160e11b14905061101c565b506001949350505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b816001600160a01b0316836001600160a01b0316036113945760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a6f776e65722d6d7573742d62652d646966666572656e742d6660448201526b3937b696b7b832b930ba37b960a11b606482015260840161052c565b6001600160a01b03838116600081815260066020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b61140c848484611024565b611418848484846111cd565b610d855760405162461bcd60e51b815260040161052c90611b49565b60608160000361145b5750506040805180820190915260018152600360fc1b602082015290565b8160005b8115611485578061146f81611a21565b915061147e9050600a83611d40565b915061145f565b60008167ffffffffffffffff8111156114a0576114a06117de565b6040519080825280601f01601f1916602001820160405280156114ca576020820181803683370190505b5090505b841561101c576114df600183611c20565b91506114ec600a86611d54565b6114f7906030611a0e565b60f81b81838151811061150c5761150c611c33565b60200101906001600160f81b031916908160001a90535061152e600a86611d40565b94506114ce565b6001600160e01b031981168114610ef657600080fd5b60006020828403121561155d57600080fd5b813561156881611535565b9392505050565b60005b8381101561158a578181015183820152602001611572565b50506000910152565b600081518084526115ab81602086016020860161156f565b601f01601f19169290920160200192915050565b6020815260006115686020830184611593565b6000602082840312156115e457600080fd5b5035919050565b80356001600160a01b038116811461160257600080fd5b919050565b6000806040838503121561161a57600080fd5b611623836115eb565b946020939093013593505050565b60008060006060848603121561164657600080fd5b61164f846115eb565b925061165d602085016115eb565b9150604084013590509250925092565b60006020828403121561167f57600080fd5b611568826115eb565b6000806020838503121561169b57600080fd5b823567ffffffffffffffff808211156116b357600080fd5b818501915085601f8301126116c757600080fd5b8135818111156116d657600080fd5b8660208285010111156116e857600080fd5b60209290920196919550909350505050565b8035801515811461160257600080fd5b60006020828403121561171c57600080fd5b611568826116fa565b6000806040838503121561173857600080fd5b611741836115eb565b915061174f602084016116fa565b90509250929050565b60008060006040848603121561176d57600080fd5b611776846115eb565b9250602084013567ffffffffffffffff8082111561179357600080fd5b818601915086601f8301126117a757600080fd5b8135818111156117b657600080fd5b8760208260051b85010111156117cb57600080fd5b6020830194508093505050509250925092565b634e487b7160e01b600052604160045260246000fd5b6000806000806080858703121561180a57600080fd5b611813856115eb565b9350611821602086016115eb565b925060408501359150606085013567ffffffffffffffff8082111561184557600080fd5b818701915087601f83011261185957600080fd5b81358181111561186b5761186b6117de565b604051601f8201601f19908116603f01168101908382118183101715611893576118936117de565b816040528281528a60208487010111156118ac57600080fd5b82602086016020830137600060208483010152809550505050505092959194509250565b600080604083850312156118e357600080fd5b6118ec836115eb565b915061174f602084016115eb565b600181811c9082168061190e57607f821691505b60208210810361192e57634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252602d908201527f4552433732313a63616c6c65722d6d7573742d62652d746f6b656e2d6f776e6560408201526c1c8b5bdc8b585c1c1c9bdd9959609a1b606082015260800190565b60208082526015908201527422a9219b99189d36bab9ba16b13296b6b4b73a32b960591b604082015260600190565b60208082526028908201527f4552433732313a72656365697665722d6d7573742d62652d6e6f6e2d7a65726f6040820152672d6164647265737360c01b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b808201808211156103f4576103f46119f8565b600060018201611a3357611a336119f8565b5060010190565b601f8211156105c157600081815260208120601f850160051c81016020861015611a615750805b601f850160051c820191505b81811015611a8057828155600101611a6d565b505050505050565b67ffffffffffffffff831115611aa057611aa06117de565b611ab483611aae83546118fa565b83611a3a565b6000601f841160018114611ae85760008515611ad05750838201355b600019600387901b1c1916600186901b178355611b42565b600083815260209020601f19861690835b82811015611b195786850135825560209485019460019092019101611af9565b5086821015611b365760001960f88860031b161c19848701351681555b505060018560011b0183555b5050505050565b60208082526023908201527f4552433732313a7461726765742d63616e6e6f742d726563656976652d45524360408201526237323160e81b606082015260800190565b6020808252603f908201527f4552433732313a63616c6c65722d6d7573742d62652d746f6b656e2d6f776e6560408201527f722d6f722d62652d617070726f7665642d62792d746f6b656e2d6f776e657200606082015260800190565b6020808252601a908201527f4552433732313a6d7573742d62652d746f6b656e2d6f776e6572000000000000604082015260600190565b818103818111156103f4576103f46119f8565b634e487b7160e01b600052603260045260246000fd5b6000808454611c57816118fa565b60018281168015611c6f5760018114611c8457611cb3565b60ff1984168752821515830287019450611cb3565b8860005260208060002060005b85811015611caa5781548a820152908401908201611c91565b50505082870194505b505050508351611cc781836020880161156f565b01949350505050565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090611d0390830184611593565b9695505050505050565b600060208284031215611d1f57600080fd5b815161156881611535565b634e487b7160e01b600052601260045260246000fd5b600082611d4f57611d4f611d2a565b500490565b600082611d6357611d63611d2a565b50069056feddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa164736f6c6343000811000aa164736f6c6343000811000a000000000000000000000000685acfc099e2a0bc75aa833949291be794d317300000000000000000000000007d3f6c020da258fa8b6cef65c83293653e40cfc80000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000002268747470733a2f2f6675656c2e6169726c7966742e6f6e652f6170692f6d6574612f000000000000000000000000000000000000000000000000000000000000

Deployed Bytecode

0x60806040523480156200001157600080fd5b5060043610620001755760003560e01c80637e1c0c0911620000d3578063a894c4571162000086578063a894c45714620003ed578063b46f2bee1462000413578063b7f14601146200042a578063e2e498d91462000441578063e48603391462000467578063f2fde38b14620004ea57600080fd5b80637e1c0c0914620003855780638456cb59146200038f5780638da5cb5b1462000399578063931688cb14620003ab578063a032d20a14620003c2578063a2d92d6614620003d957600080fd5b80635c975abb116200012c5780635c975abb14620002e557806361b7283714620003045780636c0360eb146200031b578063715018a6146200033457806372d6e1bd146200033e5780637b4909fc146200035557600080fd5b806314b65122146200017a5780631da3993114620001b05780631f69565f14620001d657806320fd027e14620002ab5780632d0335ab14620002c45780633f4ba83a14620002db575b600080fd5b6200019d6200018b36600462002179565b60046020526000908152604090205481565b6040519081526020015b60405180910390f35b620001c7620001c1366004620021e2565b62000501565b604051620001a7919062002228565b62000265620001e736600462002286565b60408051608080820183526000808352602080840182905283850182905260609384018290526001600160a01b039586168252600681529084902084519283018552805460ff808216151585526101009091048716928401929092526001015494851693820193909352600160a01b90930490911615159082015290565b604080518251151581526020808401516001600160a01b0390811691830191909152838301511691810191909152606091820151151591810191909152608001620001a7565b620002c2620002bc366004620022b7565b620005c6565b005b6200019d620002d536600462002286565b62000780565b620002c26200079f565b600054600160a01b900460ff165b6040519015158152602001620001a7565b620002c2620003153660046200233b565b620007b5565b62000325620008e2565b604051620001a79190620023ec565b620002c262000978565b620002c26200034f36600462002401565b6200098e565b6200036c620003663660046200254a565b62000bb2565b6040516001600160a01b039091168152602001620001a7565b6200019d62000ea7565b620002c262000eb8565b6000546001600160a01b03166200036c565b620002c2620003bc3660046200261b565b62000ecc565b620002c2620003d336600462002286565b62000f41565b6001546200036c906001600160a01b031681565b620002f3620003fe36600462002179565b60036020526000908152604090205460ff1681565b620002c262000424366004620022b7565b62000fff565b620002c26200043b36600462002401565b620011f9565b6200045862000452366004620021e2565b620013a0565b604051620001a7919062002654565b620004b56200047836600462002286565b6006602052600090815260409020805460019091015460ff808316926001600160a01b0361010090910481169290811691600160a01b9091041684565b604051620001a7949392919093151584526001600160a01b039283166020850152911660408301521515606082015260800190565b620002c2620004fb36600462002286565b6200146d565b606060008267ffffffffffffffff8111156200052157620005216200249f565b6040519080825280602002602001820160405280156200054b578160200160208202803683370190505b50905060005b83811015620005bc576004600086868481811062000573576200057362002690565b905060200201358152602001908152602001600020548282815181106200059e576200059e62002690565b6020908102919091010152620005b481620026bc565b905062000551565b5090505b92915050565b620005d0620014f0565b600260055403620005fe5760405162461bcd60e51b8152600401620005f590620026d8565b60405180910390fd5b60026005556001600160a01b03851660009081526006602052604090206001810154600160a01b900460ff166200066e5760405162461bcd60e51b81526020600482015260136024820152724552433732314142433a7573652d636c61696d60681b6044820152606401620005f5565b805460ff16620006925760405162461bcd60e51b8152600401620005f5906200270f565b620006a08585858a6200153f565b506000620006ae89620015cf565b905060008989898989898935887fa5c262fb92384843e962b7e895bec49207f48d5456115ca5cbbc3f5be022aae3604051602001620006f69998979695949392919062002746565b6040516020818303038152906040529050620007138185620015f7565b62000720888b89620016ea565b876001600160a01b03168a6001600160a01b03168a7fa45c018c08cffc1e5d85864e334de0f820678cb0f6278a9ee5ed170b2b3d94d78a6040516200076791815260200190565b60405180910390a4505060016005555050505050505050565b6001600160a01b038116600090815260026020526040812054620005c0565b620007a962001769565b620007b3620017c5565b565b620007bf62001769565b6001600160a01b038416620008225760405162461bcd60e51b815260206004820152602260248201527f4552433732314142433a696e76616c69642d636f6e74726163742d6164647265604482015261737360f01b6064820152608401620005f5565b6001600160a01b0380851660009081526006602052604090208054858316610100026001600160a81b0319918216176001908117835582018054851515600160a01b029216938616939093171790915562000881600880546001019055565b826001600160a01b0316846001600160a01b0316866001600160a01b03167f4c5718421b3801475e265ae9ab80227c467f061ad9b88372dad584aeaf4fb15485604051620008d3911515815260200190565b60405180910390a45050505050565b60078054620008f19062002796565b80601f01602080910402602001604051908101604052809291908181526020018280546200091f9062002796565b8015620009705780601f10620009445761010080835404028352916020019162000970565b820191906000526020600020905b8154815290600101906020018083116200095257829003601f168201915b505050505081565b6200098262001769565b620007b360006200181c565b62000998620014f0565b600260055403620009bd5760405162461bcd60e51b8152600401620005f590620026d8565b60026005556001600160a01b03851660009081526006602052604090206001810154600160a01b900460ff161562000a435760405162461bcd60e51b815260206004820152602260248201527f4552433732314142433a7573652d636c61696d2d65787465726e616c2d6261746044820152610c6d60f31b6064820152608401620005f5565b805460ff1662000a675760405162461bcd60e51b8152600401620005f5906200270f565b62000a768585858b8b6200186c565b50600062000a848a620015cf565b905060008a8a8a8a8a8a8a8a35897fa5c262fb92384843e962b7e895bec49207f48d5456115ca5cbbc3f5be022aae360405160200162000ace9a99989796959493929190620027ff565b604051602081830303815290604052905062000aeb8185620015f7565b604051630922dc7f60e21b81526001600160a01b038c811660048301526024820189905289169063248b71fc90604401600060405180830381600087803b15801562000b3657600080fd5b505af115801562000b4b573d6000803e3d6000fd5b50505050876001600160a01b03168b6001600160a01b03167f8cccb6bc39b8f83ea43afb129a5cb259bfbe1f692c17e90f15cdadd2cb95ad648c8c8b60405162000b989392919062002861565b60405180910390a350506001600555505050505050505050565b600062000bbe620014f0565b600062000bcb89620015cf565b604080516001600160a01b038c16602082015290810182905290915060009060600160405160208183030381529060405280519060200120905060006040518060200162000c19906200216b565b601f1982820381018352601f90910116604081905262000c46908c908c908c9030908c9060200162002887565b60408051601f198184030181529082905262000c669291602001620028e9565b6040516020818303038152906040529050818151602083016000f5935062000c9087858762001971565b8751849060000362000d3657806001600160a01b03166355f804b3600762000cc1886001600160a01b0316620019da565b60405160200162000cd492919062002997565b6040516020818303038152906040526040518263ffffffff1660e01b815260040162000d019190620023ec565b600060405180830381600087803b15801562000d1c57600080fd5b505af115801562000d31573d6000803e3d6000fd5b505050505b60405163f2fde38b60e01b81526001600160a01b03898116600483015282169063f2fde38b90602401600060405180830381600087803b15801562000d7a57600080fd5b505af115801562000d8f573d6000803e3d6000fd5b50505050600060066000876001600160a01b03166001600160a01b03168152602001908152602001600020905060018160000160006101000a81548160ff021916908315150217905550888160000160016101000a8154816001600160a01b0302191690836001600160a01b031602179055508c8160010160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555062000e3a600880546001019055565b856001600160a01b03168d6001600160a01b0316306001600160a01b03167f3923665a02dad5d6680d3fe2477c048eb90c41b1859237c692b8f515b18e64f28f8f8e8e60405162000e8f9493929190620029dc565b60405180910390a45050505050979650505050505050565b600062000eb360085490565b905090565b62000ec262001769565b620007b362001b43565b62000ed662001769565b8060405162000ee6919062002a27565b6040518091039020600760405162000eff919062002a45565b604051908190038120907f8df4f488121a100577506716b83a42d04585c6b7b93941484c5b63b503e1806d90600090a3600762000f3d828262002aa6565b5050565b62000f4b62001769565b6001600160a01b03811662000fa35760405162461bcd60e51b815260206004820181905260248201527f436f72653a63612d6d7573742d62652d6e6f6e2d7a65726f2d616464726573736044820152606401620005f5565b6001546040516001600160a01b038084169216907f80db520797a74a3fc61723e79b460b431b2cb614e41b3a8bea1cf760de40873890600090a3600180546001600160a01b0319166001600160a01b0392909216919091179055565b62001009620014f0565b6002600554036200102e5760405162461bcd60e51b8152600401620005f590620026d8565b60026005556001600160a01b03851660009081526006602052604090206001810154600160a01b900460ff1615620010a95760405162461bcd60e51b815260206004820152601c60248201527f4552433732314142433a7573652d636c61696d2d65787465726e616c000000006044820152606401620005f5565b805460ff16620010cd5760405162461bcd60e51b8152600401620005f5906200270f565b620010db8585858a6200153f565b506000620010e989620015cf565b905060008989898989898935887fa5c262fb92384843e962b7e895bec49207f48d5456115ca5cbbc3f5be022aae3604051602001620011319998979695949392919062002746565b60405160208183030381529060405290506200114e8185620015f7565b604051630922dc7f60e21b81526001600160a01b038b811660048301526024820189905289169063248b71fc90604401600060405180830381600087803b1580156200119957600080fd5b505af1158015620011ae573d6000803e3d6000fd5b50505050876001600160a01b03168a6001600160a01b03168a7fa45c018c08cffc1e5d85864e334de0f820678cb0f6278a9ee5ed170b2b3d94d78a6040516200076791815260200190565b62001203620014f0565b600260055403620012285760405162461bcd60e51b8152600401620005f590620026d8565b60026005556001600160a01b03851660009081526006602052604090206001810154600160a01b900460ff16620012a25760405162461bcd60e51b815260206004820152601960248201527f4552433732314142433a7573652d636c61696d2d6261746368000000000000006044820152606401620005f5565b805460ff16620012c65760405162461bcd60e51b8152600401620005f5906200270f565b620012d58585858b8b6200186c565b506000620012e38a620015cf565b905060008a8a8a8a8a8a8a8a35897fa5c262fb92384843e962b7e895bec49207f48d5456115ca5cbbc3f5be022aae36040516020016200132d9a99989796959493929190620027ff565b60405160208183030381529060405290506200134a8185620015f7565b62001357888c89620016ea565b876001600160a01b03168b6001600160a01b03167f8cccb6bc39b8f83ea43afb129a5cb259bfbe1f692c17e90f15cdadd2cb95ad648c8c8b60405162000b989392919062002861565b606060008267ffffffffffffffff811115620013c057620013c06200249f565b604051908082528060200260200182016040528015620013ea578160200160208202803683370190505b50905060005b83811015620005bc576003600086868481811062001412576200141262002690565b90506020020135815260200190815260200160002060009054906101000a900460ff168282815181106200144a576200144a62002690565b911515602092830291909101909101526200146581620026bc565b9050620013f0565b6200147762001769565b6001600160a01b038116620014e25760405162461bcd60e51b815260206004820152602a60248201527f4f776e61626c653a6e65772d6f776e65722d6d7573742d62652d6e6f6e2d7a65604482015269726f2d6164647265737360b01b6064820152608401620005f5565b620014ed816200181c565b50565b600054600160a01b900460ff1615620007b35760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401620005f5565b60006200154e85858562001b89565b60008381526003602052604090205490915060ff1615620015ae5760405162461bcd60e51b815260206004820152601960248201527810db185a5b58589b194e985b1c9958591e4b58db185a5b5959603a1b6044820152606401620005f5565b600091825260036020526040909120805460ff191660011790559392505050565b6001600160a01b03811660009081526002602052604090208054600181018255905b50919050565b80354211156200164a5760405162461bcd60e51b815260206004820152601860248201527f436f72653a657870697265642d636572746966696361746500000000000000006044820152606401620005f5565b6000620016578362001c7f565b90506000620016828262001672604086016020870162002b73565b8560400135866060013562001cbe565b6001549091506001600160a01b03808316911614620016e45760405162461bcd60e51b815260206004820152601860248201527f436f72653a696e76616c69642d636572746966696361746500000000000000006044820152606401620005f5565b50505050565b60005b81811015620016e4576040516335313c2160e11b81526001600160a01b038481166004830152851690636a62784290602401600060405180830381600087803b1580156200173a57600080fd5b505af11580156200174f573d6000803e3d6000fd5b5050505080806200176090620026bc565b915050620016ed565b6000546001600160a01b03163314620007b35760405162461bcd60e51b815260206004820152601c60248201527f4f776e61626c653a63616c6c65722d6d7573742d62652d6f776e6572000000006044820152606401620005f5565b620017cf62001ce0565b6000805460ff60a01b191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60006200187b86868662001b89565b905060005b82811015620019675760036000858584818110620018a257620018a262002690565b602090810292909201358352508101919091526040016000205460ff16156200190a5760405162461bcd60e51b815260206004820152601960248201527810db185a5b58589b194e985b1c9958591e4b58db185a5b5959603a1b6044820152606401620005f5565b60016003600086868581811062001925576200192562002690565b90506020020135815260200190815260200160002060006101000a81548160ff02191690831515021790555080806200195e90620026bc565b91505062001880565b5095945050505050565b604080516001600160a01b038086166020830152841681830152823560608201527fa5c262fb92384843e962b7e895bec49207f48d5456115ca5cbbc3f5be022aae36080808301919091528251808303909101815260a0909101909152620016e48183620015f7565b60408051602880825260608281019093526000919060208201818036833701905050905060005b601481101562001b3c57600062001a1a82601362002b98565b62001a2790600862002bae565b62001a3490600262002cc5565b62001a49906001600160a01b03871662002ce9565b60f81b9050600060108260f81c62001a62919062002d00565b60f81b905060008160f81c601062001a7b919062002d25565b8360f81c62001a8b919062002d44565b60f81b905062001a9b8262001d32565b8562001aa986600262002bae565b8151811062001abc5762001abc62002690565b60200101906001600160f81b031916908160001a90535062001ade8162001d32565b8562001aec86600262002bae565b62001af990600162002d60565b8151811062001b0c5762001b0c62002690565b60200101906001600160f81b031916908160001a905350505050808062001b3390620026bc565b91505062001a01565b5092915050565b62001b4d620014f0565b6000805460ff60a01b1916600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258620017ff3390565b600080841162001bdc5760405162461bcd60e51b815260206004820152601860248201527f436c61696d61626c653a696e76616c69642d616d6f756e7400000000000000006044820152606401620005f5565b60008381526004602052604090205462001bf7908362002b98565b90508084111562001c4b5760405162461bcd60e51b815260206004820152601b60248201527f436c61696d61626c653a696e73756666696369656e742d66756e6400000000006044820152606401620005f5565b60008381526004602052604090205462001c66908562001d72565b6000938452600460205260409093209290925550919050565b600062001c8d825162001d87565b8260405160200162001ca192919062002d76565b604051602081830303815290604052805190602001209050919050565b600080600062001cd18787878762001ea8565b91509150620019678162001f9d565b600054600160a01b900460ff16620007b35760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401620005f5565b6000600a60f883901c101562001d5c5762001d5360f883901c603062002dd5565b60f81b92915050565b62001d5360f883901c605762002dd5565b919050565b600062001d80828462002d60565b9392505050565b60608160000362001daf5750506040805180820190915260018152600360fc1b602082015290565b8160005b811562001ddf578062001dc681620026bc565b915062001dd79050600a8362002ce9565b915062001db3565b60008167ffffffffffffffff81111562001dfd5762001dfd6200249f565b6040519080825280601f01601f19166020018201604052801562001e28576020820181803683370190505b5090505b841562001ea05762001e4060018362002b98565b915062001e4f600a8662002df1565b62001e5c90603062002d60565b60f81b81838151811062001e745762001e7462002690565b60200101906001600160f81b031916908160001a90535062001e98600a8662002ce9565b945062001e2c565b949350505050565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a083111562001ee1575060009050600362001f94565b8460ff16601b1415801562001efa57508460ff16601c14155b1562001f0d575060009050600462001f94565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa15801562001f62573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811662001f8d5760006001925092505062001f94565b9150600090505b94509492505050565b600081600481111562001fb45762001fb462002e08565b0362001fbd5750565b600181600481111562001fd45762001fd462002e08565b03620020235760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401620005f5565b60028160048111156200203a576200203a62002e08565b03620020895760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401620005f5565b6003816004811115620020a057620020a062002e08565b03620020fa5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401620005f5565b600481600481111562002111576200211162002e08565b03620014ed5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b6064820152608401620005f5565b61219d8062002e1f83390190565b6000602082840312156200218c57600080fd5b5035919050565b60008083601f840112620021a657600080fd5b50813567ffffffffffffffff811115620021bf57600080fd5b6020830191508360208260051b8501011115620021db57600080fd5b9250929050565b60008060208385031215620021f657600080fd5b823567ffffffffffffffff8111156200220e57600080fd5b6200221c8582860162002193565b90969095509350505050565b6020808252825182820181905260009190848201906040850190845b81811015620022625783518352928401929184019160010162002244565b50909695505050505050565b80356001600160a01b038116811462001d6d57600080fd5b6000602082840312156200229957600080fd5b62001d80826200226e565b600060808284031215620015f157600080fd5b6000806000806000806000610140888a031215620022d457600080fd5b620022df886200226e565b965060208801359550620022f6604089016200226e565b9450606088013593506080880135925060a088013591506200231c8960c08a01620022a4565b905092959891949750929550565b8035801515811462001d6d57600080fd5b600080600080608085870312156200235257600080fd5b6200235d856200226e565b93506200236d602086016200226e565b92506200237d604086016200226e565b91506200238d606086016200232a565b905092959194509250565b60005b83811015620023b55781810151838201526020016200239b565b50506000910152565b60008151808452620023d881602086016020860162002398565b601f01601f19169290920160200192915050565b60208152600062001d806020830184620023be565b600080600080600080600080610140898b0312156200241f57600080fd5b6200242a896200226e565b9750602089013567ffffffffffffffff8111156200244757600080fd5b620024558b828c0162002193565b90985096506200246a905060408a016200226e565b9450606089013593506080890135925060a08901359150620024908a60c08b01620022a4565b90509295985092959890939650565b634e487b7160e01b600052604160045260246000fd5b600082601f830112620024c757600080fd5b813567ffffffffffffffff80821115620024e557620024e56200249f565b604051601f8301601f19908116603f011681019082821181831017156200251057620025106200249f565b816040528381528660208588010111156200252a57600080fd5b836020870160208301376000602085830101528094505050505092915050565b6000806000806000806000610140888a0312156200256757600080fd5b62002572886200226e565b9650602088013567ffffffffffffffff808211156200259057600080fd5b6200259e8b838c01620024b5565b975060408a0135915080821115620025b557600080fd5b620025c38b838c01620024b5565b965060608a0135915080821115620025da57600080fd5b50620025e98a828b01620024b5565b945050620025fa608089016200226e565b92506200260a60a089016200232a565b91506200231c8960c08a01620022a4565b6000602082840312156200262e57600080fd5b813567ffffffffffffffff8111156200264657600080fd5b62001ea084828501620024b5565b6020808252825182820181905260009190848201906040850190845b818110156200226257835115158352928401929184019160010162002670565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600060018201620026d157620026d1620026a6565b5060010190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b60208082526018908201527f4552433732314142433a696e6163746976652d746f6b656e0000000000000000604082015260600190565b6001600160a01b03998a16815260208101989098529590971660408701526060860193909352608085019190915260a084015260c083015260e08201929092526101008101919091526101200190565b600181811c90821680620027ab57607f821691505b602082108103620015f157634e487b7160e01b600052602260045260246000fd5b81835260006001600160fb1b03831115620027e657600080fd5b8260051b80836020870137939093016020019392505050565b6001600160a01b038b8116825261012060208301819052600091620028288483018d8f620027cc565b9a16604084015250506060810196909652608086019490945260a085019290925260c084015260e0830152610100909101529392505050565b60408152600062002877604083018587620027cc565b9050826020830152949350505050565b60a0815260006200289c60a0830188620023be565b8281036020840152620028b08188620023be565b90508281036040840152620028c68187620023be565b6001600160a01b0395909516606084015250509015156080909101529392505050565b60008351620028fd81846020880162002398565b8351908301906200291381836020880162002398565b01949350505050565b600081546200292b8162002796565b600182811680156200294657600181146200295c576200298d565b60ff19841687528215158302870194506200298d565b8560005260208060002060005b85811015620029845781548a82015290840190820162002969565b50505082870194505b5050505092915050565b6000620029a582856200291c565b61060f60f31b81528351620029c281600284016020880162002398565b602f60f81b60029290910191820152600301949350505050565b608081526000620029f16080830187620023be565b828103602084015262002a058187620023be565b6001600160a01b03959095166040840152505090151560609091015292915050565b6000825162002a3b81846020870162002398565b9190910192915050565b600062001d8082846200291c565b601f82111562002aa157600081815260208120601f850160051c8101602086101562002a7c5750805b601f850160051c820191505b8181101562002a9d5782815560010162002a88565b5050505b505050565b815167ffffffffffffffff81111562002ac35762002ac36200249f565b62002adb8162002ad4845462002796565b8462002a53565b602080601f83116001811462002b13576000841562002afa5750858301515b600019600386901b1c1916600185901b17855562002a9d565b600085815260208120601f198616915b8281101562002b445788860151825594840194600190910190840162002b23565b508582101562002b635787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b60006020828403121562002b8657600080fd5b813560ff8116811462001d8057600080fd5b81810381811115620005c057620005c0620026a6565b8082028115828204841417620005c057620005c0620026a6565b600181815b8085111562002c0957816000190482111562002bed5762002bed620026a6565b8085161562002bfb57918102915b93841c939080029062002bcd565b509250929050565b60008262002c2257506001620005c0565b8162002c3157506000620005c0565b816001811462002c4a576002811462002c555762002c75565b6001915050620005c0565b60ff84111562002c695762002c69620026a6565b50506001821b620005c0565b5060208310610133831016604e8410600b841016171562002c9a575081810a620005c0565b62002ca6838362002bc8565b806000190482111562002cbd5762002cbd620026a6565b029392505050565b600062001d80838362002c11565b634e487b7160e01b600052601260045260246000fd5b60008262002cfb5762002cfb62002cd3565b500490565b600060ff83168062002d165762002d1662002cd3565b8060ff84160491505092915050565b60ff818116838216029081169081811462001b3c5762001b3c620026a6565b60ff8281168282160390811115620005c057620005c0620026a6565b80820180821115620005c057620005c0620026a6565b7f19457468657265756d205369676e6564204d6573736167653a0a00000000000081526000835162002db081601a85016020880162002398565b83519083019062002dc981601a84016020880162002398565b01601a01949350505050565b60ff8181168382160190811115620005c057620005c0620026a6565b60008262002e035762002e0362002cd3565b500690565b634e487b7160e01b600052602160045260246000fdfe60806040526009805460ff191660011790553480156200001e57600080fd5b506040516200219d3803806200219d8339810160408190526200004191620001ce565b336200004d81620000b9565b5060016200005c86826200032c565b5060026200006b85826200032c565b506001600160a01b03821660009081526008602052604090208054600160ff199182161790915560098054909116821515179055600a620000ad84826200032c565b505050505050620003f8565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126200013157600080fd5b81516001600160401b03808211156200014e576200014e62000109565b604051601f8301601f19908116603f0116810190828211818310171562000179576200017962000109565b816040528381526020925086838588010111156200019657600080fd5b600091505b83821015620001ba57858201830151818301840152908201906200019b565b600093810190920192909252949350505050565b600080600080600060a08688031215620001e757600080fd5b85516001600160401b0380821115620001ff57600080fd5b6200020d89838a016200011f565b965060208801519150808211156200022457600080fd5b6200023289838a016200011f565b955060408801519150808211156200024957600080fd5b5062000258888289016200011f565b606088015190945090506001600160a01b03811681146200027857600080fd5b608087015190925080151581146200028f57600080fd5b809150509295509295909350565b600181811c90821680620002b257607f821691505b602082108103620002d357634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200032757600081815260208120601f850160051c81016020861015620003025750805b601f850160051c820191505b8181101562000323578281556001016200030e565b5050505b505050565b81516001600160401b0381111562000348576200034862000109565b62000360816200035984546200029d565b84620002d9565b602080601f8311600181146200039857600084156200037f5750858301515b600019600386901b1c1916600185901b17855562000323565b600085815260208120601f198616915b82811015620003c957888601518255948401946001909101908401620003a8565b5085821015620003e85787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b611d9580620004086000396000f3fe608060405234801561001057600080fd5b506004361061018e5760003560e01c80638da5cb5b116100de578063b2dc5dc311610097578063c47f002711610071578063c47f00271461035c578063c87b56dd1461036f578063e985e9c514610382578063f2fde38b1461039557600080fd5b8063b2dc5dc314610323578063b84c824614610336578063b88d4fde1461034957600080fd5b80638da5cb5b146102be57806395d89b41146102cf578063983b2d56146102d75780639cd23707146102ea5780639dc29fac146102fd578063a22cb4651461031057600080fd5b80633092afd51161014b5780636352211e116101255780636352211e1461026f5780636a6278421461028257806370a0823114610295578063715018a6146102b657600080fd5b80633092afd51461023657806342842e0e1461024957806355f804b31461025c57600080fd5b806301ffc9a71461019357806306fdde03146101bb578063081812fc146101d0578063095ea7b3146101fb57806323b872dd14610210578063248b71fc14610223575b600080fd5b6101a66101a136600461154b565b6103a8565b60405190151581526020015b60405180910390f35b6101c36103fa565b6040516101b291906115bf565b6101e36101de3660046115d2565b61048c565b6040516001600160a01b0390911681526020016101b2565b61020e610209366004611607565b6104b3565b005b61020e61021e366004611631565b6105c6565b61020e610231366004611607565b6105f8565b61020e61024436600461166d565b610705565b61020e610257366004611631565b61078e565b61020e61026a366004611688565b6107a9565b6101e361027d3660046115d2565b6107be565b61020e61029036600461166d565b61081d565b6102a86102a336600461166d565b61093d565b6040519081526020016101b2565b61020e6109bf565b6000546001600160a01b03166101e3565b6101c36109d3565b61020e6102e536600461166d565b6109e2565b61020e6102f836600461170a565b610b04565b61020e61030b366004611607565b610b1f565b61020e61031e366004611725565b610c2e565b61020e610331366004611758565b610c3d565b61020e610344366004611688565b610d8b565b61020e6103573660046117f4565b610da0565b61020e61036a366004611688565b610dd2565b6101c361037d3660046115d2565b610de7565b6101a66103903660046118d0565b610e4e565b61020e6103a336600461166d565b610e7c565b60006001600160e01b031982166380ac58cd60e01b14806103d957506001600160e01b03198216635b5e139f60e01b145b806103f457506301ffc9a760e01b6001600160e01b03198316145b92915050565b606060018054610409906118fa565b80601f0160208091040260200160405190810160405280929190818152602001828054610435906118fa565b80156104825780601f1061045757610100808354040283529160200191610482565b820191906000526020600020905b81548152906001019060200180831161046557829003601f168201915b5050505050905090565b600061049782610ef9565b506000908152600560205260409020546001600160a01b031690565b60006104be826107be565b9050806001600160a01b0316836001600160a01b0316036105355760405162461bcd60e51b815260206004820152602660248201527f4552433732313a63616e6e6f742d617070726f76652d746f2d63757272656e7460448201526516b7bbb732b960d11b60648201526084015b60405180910390fd5b336001600160a01b038216148061055157506105518133610e4e565b6105b75760405162461bcd60e51b815260206004820152603160248201527f4552433732313a63616c6c65722d6d7573742d62652d746f6b656e2d6f776e656044820152701c8b5bdc8b585c1c1c9bdd99590b585b1b607a1b606482015260840161052c565b6105c18383610f57565b505050565b6105d1335b82610fc5565b6105ed5760405162461bcd60e51b815260040161052c90611934565b6105c1838383611024565b3360009081526008602052604090205460ff166106275760405162461bcd60e51b815260040161052c90611981565b6001600160a01b03821661064d5760405162461bcd60e51b815260040161052c906119b0565b60015b8181116106c2576000816007546106679190611a0e565b60008181526003602052604080822080546001600160a01b0319166001600160a01b03891690811790915590519293508392909190600080516020611d69833981519152908290a450806106ba81611a21565b915050610650565b506001600160a01b038216600090815260046020526040812080548392906106eb908490611a0e565b90915550506007546106fe908290611a0e565b6007555050565b61070d611173565b6001600160a01b03811660009081526008602052604090205460ff166107455760405162461bcd60e51b815260040161052c90611981565b6001600160a01b038116600081815260086020526040808220805460ff19169055517f2f91b591fc56ac0917953ad01ec225524ee5ef0555213e4c8a9d8c9728ee7ffb9190a250565b6105c183838360405180602001604052806000815250610da0565b6107b1611173565b600a6105c1828483611a88565b6000818152600360205260408120546001600160a01b0316806103f45760405162461bcd60e51b8152602060048201526017602482015276115490cdcc8c4e9a5b9d985b1a590b5d1bdad95b8b5a59604a1b604482015260640161052c565b3360009081526008602052604090205460ff1661084c5760405162461bcd60e51b815260040161052c90611981565b6001600160a01b0381166108725760405162461bcd60e51b815260040161052c906119b0565b600754610880906001611a0e565b6007556001600160a01b03811660009081526004602052604081208054600192906108ac908490611a0e565b909155505060078054600090815260036020908152604080832080546001600160a01b0319166001600160a01b038716179055925483519182019093528181526108f79284916111cd565b6109135760405162461bcd60e51b815260040161052c90611b49565b6007546040516001600160a01b03831690600090600080516020611d69833981519152908290a450565b60006001600160a01b0382166109a35760405162461bcd60e51b815260206004820152602560248201527f4552433732313a6f776e65722d6d7573742d62652d6e6f6e2d7a65726f2d6164604482015264647265737360d81b606482015260840161052c565b506001600160a01b031660009081526004602052604090205490565b6109c7611173565b6109d160006112ce565b565b606060028054610409906118fa565b6109ea611173565b6001600160a01b038116610a4f5760405162461bcd60e51b815260206004820152602660248201527f4552433732313a6d696e7465722d6d7573742d62652d6e6f6e2d7a65726f2d6160448201526564647265737360d01b606482015260840161052c565b6001600160a01b03811660009081526008602052604090205460ff1615610ab85760405162461bcd60e51b815260206004820152601b60248201527f4552433732313a6d696e7465722d616c72656164792d61646465640000000000604482015260640161052c565b6001600160a01b038116600081815260086020526040808220805460ff19166001179055517f16baa937b08d58713325f93ac58b8a9369a4359bbefb4957d6d9b402735722ab9190a250565b610b0c611173565b6009805460ff1916911515919091179055565b3360009081526008602052604090205460ff16610b4e5760405162461bcd60e51b815260040161052c90611981565b610b57336105cb565b610b735760405162461bcd60e51b815260040161052c90611b8c565b6000610b7e826107be565b9050806001600160a01b0316836001600160a01b031614610bb15760405162461bcd60e51b815260040161052c90611be9565b610bbc600083610f57565b6001600160a01b0381166000908152600460205260408120805460019290610be5908490611c20565b909155505060008281526003602052604080822080546001600160a01b0319169055518391906001600160a01b03841690600080516020611d69833981519152908390a4505050565b610c3933838361131e565b5050565b3360009081526008602052604090205460ff16610c6c5760405162461bcd60e51b815260040161052c90611981565b6001600160a01b03831660009081526004602052604081208054839290610c94908490611c20565b90915550600090505b81811015610d85576000838383818110610cb957610cb9611c33565b905060200201359050610ccc6105cb3390565b610ce85760405162461bcd60e51b815260040161052c90611b8c565b6000610cf3826107be565b9050806001600160a01b0316866001600160a01b031614610d265760405162461bcd60e51b815260040161052c90611be9565b610d31600083610f57565b60008281526003602052604080822080546001600160a01b0319169055518391906001600160a01b03891690600080516020611d69833981519152908390a450508080610d7d90611a21565b915050610c9d565b50505050565b610d93611173565b60026105c1828483611a88565b610daa3383610fc5565b610dc65760405162461bcd60e51b815260040161052c90611934565b610d8584848484611401565b610dda611173565b60016105c1828483611a88565b6060610df282610ef9565b6000600a8054610e01906118fa565b905011610e1d57604051806020016040528060008152506103f4565b600a610e2883611434565b604051602001610e39929190611c49565b60405160208183030381529060405292915050565b6001600160a01b03918216600090815260066020908152604080832093909416825291909152205460ff1690565b610e84611173565b6001600160a01b038116610eed5760405162461bcd60e51b815260206004820152602a60248201527f4f776e61626c653a6e65772d6f776e65722d6d7573742d62652d6e6f6e2d7a65604482015269726f2d6164647265737360b01b606482015260840161052c565b610ef6816112ce565b50565b6000818152600360205260409020546001600160a01b0316610ef65760405162461bcd60e51b8152602060048201526017602482015276115490cdcc8c4e9a5b9d985b1a590b5d1bdad95b8b5a59604a1b604482015260640161052c565b600081815260056020526040902080546001600160a01b0319166001600160a01b0384169081179091558190610f8c826107be565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b600080610fd1836107be565b9050806001600160a01b0316846001600160a01b03161480610ff85750610ff88185610e4e565b8061101c5750836001600160a01b03166110118461048c565b6001600160a01b0316145b949350505050565b826001600160a01b0316611037826107be565b6001600160a01b03161461105d5760405162461bcd60e51b815260040161052c90611be9565b6001600160a01b0382166110c25760405162461bcd60e51b815260206004820152602660248201527f4552433732313a7461726765742d6d7573742d62652d6e6f6e2d7a65726f2d6160448201526564647265737360d01b606482015260840161052c565b6110cd600082610f57565b6001600160a01b03831660009081526004602052604081208054600192906110f6908490611c20565b90915550506001600160a01b0382166000908152600460205260408120805460019290611124908490611a0e565b909155505060008181526003602052604080822080546001600160a01b0319166001600160a01b038681169182179092559151849391871691600080516020611d6983398151915291a4505050565b6000546001600160a01b031633146109d15760405162461bcd60e51b815260206004820152601c60248201527f4f776e61626c653a63616c6c65722d6d7573742d62652d6f776e657200000000604482015260640161052c565b60006001600160a01b0384163b156112c357604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290611211903390899088908890600401611cd0565b6020604051808303816000875af192505050801561124c575060408051601f3d908101601f1916820190925261124991810190611d0d565b60015b6112a9573d80801561127a576040519150601f19603f3d011682016040523d82523d6000602084013e61127f565b606091505b5080516000036112a15760405162461bcd60e51b815260040161052c90611b49565b805181602001fd5b6001600160e01b031916630a85bd0160e11b14905061101c565b506001949350505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b816001600160a01b0316836001600160a01b0316036113945760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a6f776e65722d6d7573742d62652d646966666572656e742d6660448201526b3937b696b7b832b930ba37b960a11b606482015260840161052c565b6001600160a01b03838116600081815260066020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b61140c848484611024565b611418848484846111cd565b610d855760405162461bcd60e51b815260040161052c90611b49565b60608160000361145b5750506040805180820190915260018152600360fc1b602082015290565b8160005b8115611485578061146f81611a21565b915061147e9050600a83611d40565b915061145f565b60008167ffffffffffffffff8111156114a0576114a06117de565b6040519080825280601f01601f1916602001820160405280156114ca576020820181803683370190505b5090505b841561101c576114df600183611c20565b91506114ec600a86611d54565b6114f7906030611a0e565b60f81b81838151811061150c5761150c611c33565b60200101906001600160f81b031916908160001a90535061152e600a86611d40565b94506114ce565b6001600160e01b031981168114610ef657600080fd5b60006020828403121561155d57600080fd5b813561156881611535565b9392505050565b60005b8381101561158a578181015183820152602001611572565b50506000910152565b600081518084526115ab81602086016020860161156f565b601f01601f19169290920160200192915050565b6020815260006115686020830184611593565b6000602082840312156115e457600080fd5b5035919050565b80356001600160a01b038116811461160257600080fd5b919050565b6000806040838503121561161a57600080fd5b611623836115eb565b946020939093013593505050565b60008060006060848603121561164657600080fd5b61164f846115eb565b925061165d602085016115eb565b9150604084013590509250925092565b60006020828403121561167f57600080fd5b611568826115eb565b6000806020838503121561169b57600080fd5b823567ffffffffffffffff808211156116b357600080fd5b818501915085601f8301126116c757600080fd5b8135818111156116d657600080fd5b8660208285010111156116e857600080fd5b60209290920196919550909350505050565b8035801515811461160257600080fd5b60006020828403121561171c57600080fd5b611568826116fa565b6000806040838503121561173857600080fd5b611741836115eb565b915061174f602084016116fa565b90509250929050565b60008060006040848603121561176d57600080fd5b611776846115eb565b9250602084013567ffffffffffffffff8082111561179357600080fd5b818601915086601f8301126117a757600080fd5b8135818111156117b657600080fd5b8760208260051b85010111156117cb57600080fd5b6020830194508093505050509250925092565b634e487b7160e01b600052604160045260246000fd5b6000806000806080858703121561180a57600080fd5b611813856115eb565b9350611821602086016115eb565b925060408501359150606085013567ffffffffffffffff8082111561184557600080fd5b818701915087601f83011261185957600080fd5b81358181111561186b5761186b6117de565b604051601f8201601f19908116603f01168101908382118183101715611893576118936117de565b816040528281528a60208487010111156118ac57600080fd5b82602086016020830137600060208483010152809550505050505092959194509250565b600080604083850312156118e357600080fd5b6118ec836115eb565b915061174f602084016115eb565b600181811c9082168061190e57607f821691505b60208210810361192e57634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252602d908201527f4552433732313a63616c6c65722d6d7573742d62652d746f6b656e2d6f776e6560408201526c1c8b5bdc8b585c1c1c9bdd9959609a1b606082015260800190565b60208082526015908201527422a9219b99189d36bab9ba16b13296b6b4b73a32b960591b604082015260600190565b60208082526028908201527f4552433732313a72656365697665722d6d7573742d62652d6e6f6e2d7a65726f6040820152672d6164647265737360c01b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b808201808211156103f4576103f46119f8565b600060018201611a3357611a336119f8565b5060010190565b601f8211156105c157600081815260208120601f850160051c81016020861015611a615750805b601f850160051c820191505b81811015611a8057828155600101611a6d565b505050505050565b67ffffffffffffffff831115611aa057611aa06117de565b611ab483611aae83546118fa565b83611a3a565b6000601f841160018114611ae85760008515611ad05750838201355b600019600387901b1c1916600186901b178355611b42565b600083815260209020601f19861690835b82811015611b195786850135825560209485019460019092019101611af9565b5086821015611b365760001960f88860031b161c19848701351681555b505060018560011b0183555b5050505050565b60208082526023908201527f4552433732313a7461726765742d63616e6e6f742d726563656976652d45524360408201526237323160e81b606082015260800190565b6020808252603f908201527f4552433732313a63616c6c65722d6d7573742d62652d746f6b656e2d6f776e6560408201527f722d6f722d62652d617070726f7665642d62792d746f6b656e2d6f776e657200606082015260800190565b6020808252601a908201527f4552433732313a6d7573742d62652d746f6b656e2d6f776e6572000000000000604082015260600190565b818103818111156103f4576103f46119f8565b634e487b7160e01b600052603260045260246000fd5b6000808454611c57816118fa565b60018281168015611c6f5760018114611c8457611cb3565b60ff1984168752821515830287019450611cb3565b8860005260208060002060005b85811015611caa5781548a820152908401908201611c91565b50505082870194505b505050508351611cc781836020880161156f565b01949350505050565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090611d0390830184611593565b9695505050505050565b600060208284031215611d1f57600080fd5b815161156881611535565b634e487b7160e01b600052601260045260246000fd5b600082611d4f57611d4f611d2a565b500490565b600082611d6357611d63611d2a565b50069056feddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa164736f6c6343000811000aa164736f6c6343000811000a

Block Transaction Gas Used Reward
view all blocks collator

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
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.