ETH Price: $1,972.88 (+0.54%)
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

More Info

Private Name Tags

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To

There are no matching entries

Please try again later

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading
Loading...
Loading
Cross-Chain Transactions

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
KunstifyPort

Compiler Version
v0.8.18+commit.87f61d96

Optimization Enabled:
Yes with 500 runs

Other Settings:
default evmVersion
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.18;

/**
 * Multi-chain NFT Marketplace
 * - ERC721 & ERC1155 support
 * - Batch buying per NFT type
 * - Off-chain order signature verification
 * - Fee verification per seller package
 * - Supports ETH & ERC20
 */

import '@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol';
import '@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol';
import '@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol';
import '@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol';
import '@openzeppelin/contracts/utils/cryptography/ECDSA.sol';
import '@openzeppelin/contracts/token/ERC20/IERC20.sol';
import '@openzeppelin/contracts/token/ERC721/IERC721.sol';
import '@openzeppelin/contracts/token/ERC1155/IERC1155.sol';

error InvalidSignature();
error InvalidFeeSignature();
error IncorrectPayment();
error OrderFilledOrCancelled();
error ExpiredOrder();
error UnauthorizedTaker();
error TransferFailed();
error ZeroAddress();
error BatchTypeMismatch();

interface ICollection {
  function royaltyInfo(uint256 _tokenId, uint256 _salePrice) external view returns (address, uint256);
}

contract KunstifyPort is Initializable, OwnableUpgradeable, ReentrancyGuardUpgradeable, PausableUpgradeable {
  using ECDSA for bytes32;

  address public backendSigner;
  address public feeRecipient;

  struct Order {
    address maker;
    address taker; // optional
    address token;
    uint256 tokenId;
    uint256 amount; // for ERC1155
    bool is1155;
    address paymentToken; // address(0) = ETH
    uint256 price;
    uint256 expiration;
    uint256 salt;
  }

  struct FeeData {
    uint8 packageId;
    uint256 feeBps;
    bytes signature;
  }

  mapping(bytes32 => bool) public isOrderFilledOrCancelled;

  event BatchOrderFilled(bytes32[] orderHashes, address[] makers, address taker, address paymentToken, address collectionAddress, uint256 supply, uint256[] tokenIds, uint256[] prices);

  event OrderCancelled(bytes32 indexed orderHash, address indexed maker);
  event BackendSignerUpdated(address indexed newSigner);
  event FeeRecipientUpdated(address indexed newRecipient);

  function initialize(address _backendSigner) external initializer {
    if (_backendSigner == address(0)) revert ZeroAddress();

    __Ownable_init();
    __ReentrancyGuard_init();
    __Pausable_init();
    // Payment fee goes to feeRecipient
    feeRecipient = msg.sender;
    backendSigner = _backendSigner;
  }

  function setBackendSigner(address _backendSigner) external onlyOwner {
    if (_backendSigner == address(0)) revert ZeroAddress();
    backendSigner = _backendSigner;
    emit BackendSignerUpdated(_backendSigner);
  }
  function setFeeRecipient(address _feeRecipient) external onlyOwner {
    if (_feeRecipient == address(0)) revert ZeroAddress();
    feeRecipient = _feeRecipient;
    emit FeeRecipientUpdated(_feeRecipient);
  }
  /* ------------------------- SIGNATURE VERIFICATION ------------------------- */
  function verifyOrderSignature(Order memory order, bytes memory signature) internal view returns (bool) {
    bytes32 msgHash = keccak256(abi.encodePacked(order.maker, order.taker, order.token, order.tokenId, order.amount, order.is1155, order.price, order.expiration, order.salt));
    bytes32 ethHash = keccak256(abi.encodePacked('\x19Ethereum Signed Message:\n32', msgHash));
    return ECDSA.recover(ethHash, signature) == backendSigner;
  }

  function verifyFeeSignature(address user, uint8 packageId, uint256 feeBps, bytes memory signature) internal view returns (bool) {
    bytes32 msgHash = keccak256(abi.encodePacked(user, feeBps, packageId));
    bytes32 ethHash = keccak256(abi.encodePacked('\x19Ethereum Signed Message:\n32', msgHash));
    return ECDSA.recover(ethHash, signature) == backendSigner;
  }

  /* ------------------------- ORDER HASH ------------------------- */
  function _hashOrder(Order memory order) internal pure returns (bytes32) {
    return keccak256(abi.encode(order.maker, order.taker, order.token, order.tokenId, order.amount, order.is1155, order.paymentToken, order.price, order.expiration, order.salt));
  }

  /* ------------------------- CANCEL ORDER ------------------------- */
  function cancelOrder(Order calldata order) external whenNotPaused {
    require(msg.sender == order.maker, 'Not maker');
    bytes32 orderHash = _hashOrder(order);
    if (isOrderFilledOrCancelled[orderHash]) revert OrderFilledOrCancelled();
    isOrderFilledOrCancelled[orderHash] = true;
    emit OrderCancelled(orderHash, order.maker);
  }

  /* ------------------------- FILL SINGLE ORDER ------------------------- */
  function fillOrder(Order calldata order, bytes calldata orderSignature, FeeData calldata feeData) external payable nonReentrant whenNotPaused {
    // Correctly declare and initialize single-element memory arrays
    Order[] memory orders = new Order[](1);
    orders[0] = order;

    bytes[] memory orderSignatures = new bytes[](1);
    orderSignatures[0] = orderSignature;

    FeeData[] memory feeDatas = new FeeData[](1);
    feeDatas[0] = feeData;

    // Call the internal batch processor
    _fillOrders(orders, orderSignatures, feeDatas);
  }

  /* ------------------------- FILL MULTIPLE ORDERS (BATCH) ------------------------- */
  function fillBatchOrders(Order[] calldata orders, bytes[] calldata orderSignatures, FeeData[] calldata feeDatas) external payable nonReentrant whenNotPaused {
    require(orders.length == orderSignatures.length && orders.length == feeDatas.length, 'Length mismatch');
    _fillOrders(orders, orderSignatures, feeDatas);
  }

  /* ------------------------- INTERNAL PROCESSING ------------------------- */
  function _fillOrders(Order[] memory orders, bytes[] memory orderSignatures, FeeData[] memory feeDatas) internal {
    require(orders.length > 0, 'No orders provided');
    require(orders.length == orderSignatures.length && orders.length == feeDatas.length, 'Array length mismatch');

    // All orders must be same type
    bool is1155Type = orders[0].is1155;
    uint256 quantity = orders[0].amount;
    for (uint256 i = 0; i < orders.length; i++) {
      require(orders[i].is1155 == is1155Type, 'All orders must be same type');
    }

    // Calculate total ETH required
    uint256 totalEthRequired = 0;
    for (uint256 i = 0; i < orders.length; i++) {
      if (orders[i].paymentToken == address(0)) {
        totalEthRequired += orders[i].price;
      }
    }
    require(msg.value == totalEthRequired, 'Incorrect total ETH sent');

    // Fetch collection royalty info once
    address collection = orders[0].token;

    bytes32[] memory orderHashes = new bytes32[](orders.length);
    address[] memory makers = new address[](orders.length);
    uint256[] memory tokenIds = new uint256[](orders.length);
    uint256[] memory prices = new uint256[](orders.length);

    for (uint256 i = 0; i < orders.length; i++) {
      Order memory order = orders[i];
      FeeData memory feeData = feeDatas[i];
      bytes memory sig = orderSignatures[i];

      bytes32 orderHash = _hashOrder(order);
      if (isOrderFilledOrCancelled[orderHash]) revert OrderFilledOrCancelled();
      if (order.expiration != 0 && block.timestamp > order.expiration) revert ExpiredOrder();
      if (order.taker != address(0) && order.taker != msg.sender) revert UnauthorizedTaker();

      // Signature verifications
      if (!verifyOrderSignature(order, sig)) revert InvalidSignature();
      if (!verifyFeeSignature(order.maker, feeData.packageId, feeData.feeBps, feeData.signature)) revert InvalidFeeSignature();

      isOrderFilledOrCancelled[orderHash] = true;

      // --- Calculate fee, royalty, seller share ---
      uint256 feeAmount = (order.price * feeData.feeBps) / 10_000;
      (address royaltyReceiver, uint256 royaltyAmount) = _getRoyaltyAmount(collection, order.maker, msg.sender, order.price);
      uint256 sellerAmount = order.price - feeAmount - royaltyAmount;

      // --- Payment transfer ---
      // --- Payment transfer ---
      if (order.paymentToken == address(0)) {
        // ETH transfers
        if (feeAmount > 0) {
          (bool sentFee, ) = payable(feeRecipient).call{ value: feeAmount }('');
          if (!sentFee) revert TransferFailed();
        }
        if (royaltyAmount > 0) {
          // FIXED: Use royaltyReceiver from the function call, not the package-level creator
          (bool sentRoyalty, ) = payable(royaltyReceiver).call{ value: royaltyAmount }('');
          if (!sentRoyalty) revert TransferFailed();
        }
        (bool sentSeller, ) = payable(order.maker).call{ value: sellerAmount }('');
        if (!sentSeller) revert TransferFailed();
      } else {
        // ERC20 transfers
        IERC20 token = IERC20(order.paymentToken);
        require(token.transferFrom(msg.sender, address(this), order.price), 'ERC20 pull failed');

        if (feeAmount > 0) require(token.transfer(feeRecipient, feeAmount), 'Fee transfer failed');
        if (royaltyAmount > 0) require(token.transfer(royaltyReceiver, royaltyAmount), 'Royalty transfer failed');
        require(token.transfer(order.maker, sellerAmount), 'Seller transfer failed');
      }

      // --- NFT transfer ---
      if (order.is1155) {
        uint256 balance = IERC1155(order.token).balanceOf(order.maker, order.tokenId);
        require(balance >= order.amount, 'Insufficient ERC1155 balance');
        IERC1155(order.token).safeTransferFrom(order.maker, msg.sender, order.tokenId, order.amount, '');
      } else {
        require(IERC721(order.token).ownerOf(order.tokenId) == order.maker, 'ERC721 not owned');
        IERC721(order.token).safeTransferFrom(order.maker, msg.sender, order.tokenId);
      }
      orderHashes[i] = orderHash;
      makers[i] = order.maker;
      prices[i] = order.price;
      tokenIds[i] = order.tokenId;
      unchecked {
        i++;
      }
    }
    emit BatchOrderFilled(orderHashes, makers, msg.sender, orders[0].paymentToken, collection, is1155Type ? quantity : 1, tokenIds, prices);
  }

  /* -------------------------HELPER FUNCTIN ------------------------- */
  function _getRoyaltyAmount(address collection, address maker, address taker, uint256 price) internal view returns (address receiver, uint256 amount) {
    (address creator, uint256 bps) = _getRoyaltyByAddress(collection);

    if (creator == address(0) || bps == 0 || creator == maker || creator == taker) {
      return (address(0), 0);
    }

    return (creator, (price * bps) / 10_000);
  }

  function _getRoyaltyByAddress(address collection) public view returns (address receiver, uint256 bps) {
    try ICollection(collection).royaltyInfo(0, 10000) returns (address _receiver, uint256 _amount) {
      return (_receiver, _amount); // amount is BPS for sale price 10000
    } catch {
      return (address(0), 0);
    }
  }
  /* ------------------------- ERC RECEIVERS ------------------------- */
  function onERC1155Received(address, address, uint256, uint256, bytes calldata) external pure returns (bytes4) {
    return this.onERC1155Received.selector;
  }

  function onERC1155BatchReceived(address, address, uint256[] calldata, uint256[] calldata, bytes calldata) external pure returns (bytes4) {
    return this.onERC1155BatchReceived.selector;
  }

  function onERC721Received(address, address, uint256, bytes calldata) external pure returns (bytes4) {
    return this.onERC721Received.selector;
  }

  /* ------------------------- PAUSE/UNPAUSE ------------------------- */
  function pause() external onlyOwner {
    _pause();
  }

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

  receive() external payable {}
  fallback() external payable {}
}

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

pragma solidity ^0.8.0;

import "../utils/ContextUpgradeable.sol";
import {Initializable} from "../proxy/utils/Initializable.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 OwnableUpgradeable is Initializable, ContextUpgradeable {
    address private _owner;

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

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    function __Ownable_init() internal onlyInitializing {
        __Ownable_init_unchained();
    }

    function __Ownable_init_unchained() internal onlyInitializing {
        _transferOwnership(_msgSender());
    }

    /**
     * @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 is not the owner");
    }

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

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

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

    /**
     * @dev This empty reserved space is put in place to allow future versions to add new
     * variables without shifting down storage in the inheritance chain.
     * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
     */
    uint256[49] private __gap;
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (proxy/utils/Initializable.sol)

pragma solidity ^0.8.2;

import "../../utils/AddressUpgradeable.sol";

/**
 * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed
 * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an
 * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer
 * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.
 *
 * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be
 * reused. This mechanism prevents re-execution of each "step" but allows the creation of new initialization steps in
 * case an upgrade adds a module that needs to be initialized.
 *
 * For example:
 *
 * [.hljs-theme-light.nopadding]
 * ```solidity
 * contract MyToken is ERC20Upgradeable {
 *     function initialize() initializer public {
 *         __ERC20_init("MyToken", "MTK");
 *     }
 * }
 *
 * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {
 *     function initializeV2() reinitializer(2) public {
 *         __ERC20Permit_init("MyToken");
 *     }
 * }
 * ```
 *
 * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as
 * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.
 *
 * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure
 * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.
 *
 * [CAUTION]
 * ====
 * Avoid leaving a contract uninitialized.
 *
 * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation
 * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke
 * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:
 *
 * [.hljs-theme-light.nopadding]
 * ```
 * /// @custom:oz-upgrades-unsafe-allow constructor
 * constructor() {
 *     _disableInitializers();
 * }
 * ```
 * ====
 */
abstract contract Initializable {
    /**
     * @dev Indicates that the contract has been initialized.
     * @custom:oz-retyped-from bool
     */
    uint8 private _initialized;

    /**
     * @dev Indicates that the contract is in the process of being initialized.
     */
    bool private _initializing;

    /**
     * @dev Triggered when the contract has been initialized or reinitialized.
     */
    event Initialized(uint8 version);

    /**
     * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,
     * `onlyInitializing` functions can be used to initialize parent contracts.
     *
     * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a
     * constructor.
     *
     * Emits an {Initialized} event.
     */
    modifier initializer() {
        bool isTopLevelCall = !_initializing;
        require(
            (isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1),
            "Initializable: contract is already initialized"
        );
        _initialized = 1;
        if (isTopLevelCall) {
            _initializing = true;
        }
        _;
        if (isTopLevelCall) {
            _initializing = false;
            emit Initialized(1);
        }
    }

    /**
     * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the
     * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be
     * used to initialize parent contracts.
     *
     * A reinitializer may be used after the original initialization step. This is essential to configure modules that
     * are added through upgrades and that require initialization.
     *
     * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`
     * cannot be nested. If one is invoked in the context of another, execution will revert.
     *
     * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in
     * a contract, executing them in the right order is up to the developer or operator.
     *
     * WARNING: setting the version to 255 will prevent any future reinitialization.
     *
     * Emits an {Initialized} event.
     */
    modifier reinitializer(uint8 version) {
        require(!_initializing && _initialized < version, "Initializable: contract is already initialized");
        _initialized = version;
        _initializing = true;
        _;
        _initializing = false;
        emit Initialized(version);
    }

    /**
     * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the
     * {initializer} and {reinitializer} modifiers, directly or indirectly.
     */
    modifier onlyInitializing() {
        require(_initializing, "Initializable: contract is not initializing");
        _;
    }

    /**
     * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.
     * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized
     * to any version. It is recommended to use this to lock implementation contracts that are designed to be called
     * through proxies.
     *
     * Emits an {Initialized} event the first time it is successfully executed.
     */
    function _disableInitializers() internal virtual {
        require(!_initializing, "Initializable: contract is initializing");
        if (_initialized != type(uint8).max) {
            _initialized = type(uint8).max;
            emit Initialized(type(uint8).max);
        }
    }

    /**
     * @dev Returns the highest version that has been initialized. See {reinitializer}.
     */
    function _getInitializedVersion() internal view returns (uint8) {
        return _initialized;
    }

    /**
     * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.
     */
    function _isInitializing() internal view returns (bool) {
        return _initializing;
    }
}

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

pragma solidity ^0.8.0;

import "../utils/ContextUpgradeable.sol";
import {Initializable} from "../proxy/utils/Initializable.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 PausableUpgradeable is Initializable, ContextUpgradeable {
    /**
     * @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.
     */
    function __Pausable_init() internal onlyInitializing {
        __Pausable_init_unchained();
    }

    function __Pausable_init_unchained() internal onlyInitializing {
        _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());
    }

    /**
     * @dev This empty reserved space is put in place to allow future versions to add new
     * variables without shifting down storage in the inheritance chain.
     * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
     */
    uint256[49] private __gap;
}

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

pragma solidity ^0.8.0;
import {Initializable} from "../proxy/utils/Initializable.sol";

/**
 * @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 ReentrancyGuardUpgradeable is Initializable {
    // 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;

    function __ReentrancyGuard_init() internal onlyInitializing {
        __ReentrancyGuard_init_unchained();
    }

    function __ReentrancyGuard_init_unchained() internal onlyInitializing {
        _status = _NOT_ENTERED;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and making it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        _nonReentrantBefore();
        _;
        _nonReentrantAfter();
    }

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

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

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

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

    /**
     * @dev This empty reserved space is put in place to allow future versions to add new
     * variables without shifting down storage in the inheritance chain.
     * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
     */
    uint256[49] private __gap;
}

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

pragma solidity ^0.8.1;

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

        return account.code.length > 0;
    }

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

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

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

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

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

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

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

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResultFromTarget(target, success, returndata, errorMessage);
    }

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

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        (bool success, bytes memory returndata) = target.delegatecall(data);
        return verifyCallResultFromTarget(target, success, returndata, errorMessage);
    }

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

    /**
     * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason or using the provided one.
     *
     * _Available since v4.3._
     */
    function verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal pure returns (bytes memory) {
        if (success) {
            return returndata;
        } else {
            _revert(returndata, errorMessage);
        }
    }

    function _revert(bytes memory returndata, string memory errorMessage) private pure {
        // Look for revert reason and bubble it up if present
        if (returndata.length > 0) {
            // The easiest way to bubble the revert reason is using memory via assembly
            /// @solidity memory-safe-assembly
            assembly {
                let returndata_size := mload(returndata)
                revert(add(32, returndata), returndata_size)
            }
        } else {
            revert(errorMessage);
        }
    }
}

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

pragma solidity ^0.8.0;
import {Initializable} from "../proxy/utils/Initializable.sol";

/**
 * @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 ContextUpgradeable is Initializable {
    function __Context_init() internal onlyInitializing {
    }

    function __Context_init_unchained() internal onlyInitializing {
    }
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

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

    function _contextSuffixLength() internal view virtual returns (uint256) {
        return 0;
    }

    /**
     * @dev This empty reserved space is put in place to allow future versions to add new
     * variables without shifting down storage in the inheritance chain.
     * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
     */
    uint256[50] private __gap;
}

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

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

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

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

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

    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

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

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

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

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

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

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

    /**
     * @dev Transfers `tokenId` token from `from` to `to`.
     *
     * WARNING: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC721
     * or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must
     * understand this adds an external call which potentially creates a reentrancy vulnerability.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must be owned by `from`.
     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(address from, address to, uint256 tokenId) external;

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

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

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

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

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (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 // Deprecated in v4.8
    }

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

    /**
     * @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 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 message) {
        // 32 is the length in bytes of hash,
        // enforced by the type signature above
        /// @solidity memory-safe-assembly
        assembly {
            mstore(0x00, "\x19Ethereum Signed Message:\n32")
            mstore(0x1c, hash)
            message := keccak256(0x00, 0x3c)
        }
    }

    /**
     * @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 data) {
        /// @solidity memory-safe-assembly
        assembly {
            let ptr := mload(0x40)
            mstore(ptr, "\x19\x01")
            mstore(add(ptr, 0x02), domainSeparator)
            mstore(add(ptr, 0x22), structHash)
            data := keccak256(ptr, 0x42)
        }
    }

    /**
     * @dev Returns an Ethereum Signed Data with intended validator, created from a
     * `validator` and `data` according to the version 0 of EIP-191.
     *
     * See {recover}.
     */
    function toDataWithIntendedValidatorHash(address validator, bytes memory data) internal pure returns (bytes32) {
        return keccak256(abi.encodePacked("\x19\x00", validator, data));
    }
}

// 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.9.0) (utils/math/Math.sol)

pragma solidity ^0.8.0;

/**
 * @dev Standard math utilities missing in the Solidity language.
 */
library Math {
    enum Rounding {
        Down, // Toward negative infinity
        Up, // Toward infinity
        Zero // Toward zero
    }

    /**
     * @dev Returns the largest of two numbers.
     */
    function max(uint256 a, uint256 b) internal pure returns (uint256) {
        return a > b ? a : b;
    }

    /**
     * @dev Returns the smallest of two numbers.
     */
    function min(uint256 a, uint256 b) internal pure returns (uint256) {
        return a < b ? a : b;
    }

    /**
     * @dev Returns the average of two numbers. The result is rounded towards
     * zero.
     */
    function average(uint256 a, uint256 b) internal pure returns (uint256) {
        // (a + b) / 2 can overflow.
        return (a & b) + (a ^ b) / 2;
    }

    /**
     * @dev Returns the ceiling of the division of two numbers.
     *
     * This differs from standard division with `/` in that it rounds up instead
     * of rounding down.
     */
    function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {
        // (a + b - 1) / b can overflow on addition, so we distribute.
        return a == 0 ? 0 : (a - 1) / b + 1;
    }

    /**
     * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0
     * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)
     * with further edits by Uniswap Labs also under MIT license.
     */
    function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) {
        unchecked {
            // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use
            // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256
            // variables such that product = prod1 * 2^256 + prod0.
            uint256 prod0; // Least significant 256 bits of the product
            uint256 prod1; // Most significant 256 bits of the product
            assembly {
                let mm := mulmod(x, y, not(0))
                prod0 := mul(x, y)
                prod1 := sub(sub(mm, prod0), lt(mm, prod0))
            }

            // Handle non-overflow cases, 256 by 256 division.
            if (prod1 == 0) {
                // Solidity will revert if denominator == 0, unlike the div opcode on its own.
                // The surrounding unchecked block does not change this fact.
                // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic.
                return prod0 / denominator;
            }

            // Make sure the result is less than 2^256. Also prevents denominator == 0.
            require(denominator > prod1, "Math: mulDiv overflow");

            ///////////////////////////////////////////////
            // 512 by 256 division.
            ///////////////////////////////////////////////

            // Make division exact by subtracting the remainder from [prod1 prod0].
            uint256 remainder;
            assembly {
                // Compute remainder using mulmod.
                remainder := mulmod(x, y, denominator)

                // Subtract 256 bit number from 512 bit number.
                prod1 := sub(prod1, gt(remainder, prod0))
                prod0 := sub(prod0, remainder)
            }

            // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.
            // See https://cs.stackexchange.com/q/138556/92363.

            // Does not overflow because the denominator cannot be zero at this stage in the function.
            uint256 twos = denominator & (~denominator + 1);
            assembly {
                // Divide denominator by twos.
                denominator := div(denominator, twos)

                // Divide [prod1 prod0] by twos.
                prod0 := div(prod0, twos)

                // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.
                twos := add(div(sub(0, twos), twos), 1)
            }

            // Shift in bits from prod1 into prod0.
            prod0 |= prod1 * twos;

            // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such
            // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for
            // four bits. That is, denominator * inv = 1 mod 2^4.
            uint256 inverse = (3 * denominator) ^ 2;

            // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works
            // in modular arithmetic, doubling the correct bits in each step.
            inverse *= 2 - denominator * inverse; // inverse mod 2^8
            inverse *= 2 - denominator * inverse; // inverse mod 2^16
            inverse *= 2 - denominator * inverse; // inverse mod 2^32
            inverse *= 2 - denominator * inverse; // inverse mod 2^64
            inverse *= 2 - denominator * inverse; // inverse mod 2^128
            inverse *= 2 - denominator * inverse; // inverse mod 2^256

            // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.
            // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is
            // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1
            // is no longer required.
            result = prod0 * inverse;
            return result;
        }
    }

    /**
     * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.
     */
    function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) {
        uint256 result = mulDiv(x, y, denominator);
        if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {
            result += 1;
        }
        return result;
    }

    /**
     * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down.
     *
     * Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11).
     */
    function sqrt(uint256 a) internal pure returns (uint256) {
        if (a == 0) {
            return 0;
        }

        // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.
        //
        // We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have
        // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.
        //
        // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`
        // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`
        // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`
        //
        // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.
        uint256 result = 1 << (log2(a) >> 1);

        // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,
        // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at
        // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision
        // into the expected uint128 result.
        unchecked {
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            return min(result, a / result);
        }
    }

    /**
     * @notice Calculates sqrt(a), following the selected rounding direction.
     */
    function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = sqrt(a);
            return result + (rounding == Rounding.Up && result * result < a ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 2, rounded down, of a positive value.
     * Returns 0 if given 0.
     */
    function log2(uint256 value) internal pure returns (uint256) {
        uint256 result = 0;
        unchecked {
            if (value >> 128 > 0) {
                value >>= 128;
                result += 128;
            }
            if (value >> 64 > 0) {
                value >>= 64;
                result += 64;
            }
            if (value >> 32 > 0) {
                value >>= 32;
                result += 32;
            }
            if (value >> 16 > 0) {
                value >>= 16;
                result += 16;
            }
            if (value >> 8 > 0) {
                value >>= 8;
                result += 8;
            }
            if (value >> 4 > 0) {
                value >>= 4;
                result += 4;
            }
            if (value >> 2 > 0) {
                value >>= 2;
                result += 2;
            }
            if (value >> 1 > 0) {
                result += 1;
            }
        }
        return result;
    }

    /**
     * @dev Return the log in base 2, following the selected rounding direction, of a positive value.
     * Returns 0 if given 0.
     */
    function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = log2(value);
            return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 10, rounded down, of a positive value.
     * Returns 0 if given 0.
     */
    function log10(uint256 value) internal pure returns (uint256) {
        uint256 result = 0;
        unchecked {
            if (value >= 10 ** 64) {
                value /= 10 ** 64;
                result += 64;
            }
            if (value >= 10 ** 32) {
                value /= 10 ** 32;
                result += 32;
            }
            if (value >= 10 ** 16) {
                value /= 10 ** 16;
                result += 16;
            }
            if (value >= 10 ** 8) {
                value /= 10 ** 8;
                result += 8;
            }
            if (value >= 10 ** 4) {
                value /= 10 ** 4;
                result += 4;
            }
            if (value >= 10 ** 2) {
                value /= 10 ** 2;
                result += 2;
            }
            if (value >= 10 ** 1) {
                result += 1;
            }
        }
        return result;
    }

    /**
     * @dev Return the log in base 10, following the selected rounding direction, of a positive value.
     * Returns 0 if given 0.
     */
    function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = log10(value);
            return result + (rounding == Rounding.Up && 10 ** result < value ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 256, rounded down, of a positive value.
     * Returns 0 if given 0.
     *
     * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.
     */
    function log256(uint256 value) internal pure returns (uint256) {
        uint256 result = 0;
        unchecked {
            if (value >> 128 > 0) {
                value >>= 128;
                result += 16;
            }
            if (value >> 64 > 0) {
                value >>= 64;
                result += 8;
            }
            if (value >> 32 > 0) {
                value >>= 32;
                result += 4;
            }
            if (value >> 16 > 0) {
                value >>= 16;
                result += 2;
            }
            if (value >> 8 > 0) {
                result += 1;
            }
        }
        return result;
    }

    /**
     * @dev Return the log in base 256, following the selected rounding direction, of a positive value.
     * Returns 0 if given 0.
     */
    function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = log256(value);
            return result + (rounding == Rounding.Up && 1 << (result << 3) < value ? 1 : 0);
        }
    }
}

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

pragma solidity ^0.8.0;

/**
 * @dev Standard signed math utilities missing in the Solidity language.
 */
library SignedMath {
    /**
     * @dev Returns the largest of two signed numbers.
     */
    function max(int256 a, int256 b) internal pure returns (int256) {
        return a > b ? a : b;
    }

    /**
     * @dev Returns the smallest of two signed numbers.
     */
    function min(int256 a, int256 b) internal pure returns (int256) {
        return a < b ? a : b;
    }

    /**
     * @dev Returns the average of two signed numbers without overflow.
     * The result is rounded towards zero.
     */
    function average(int256 a, int256 b) internal pure returns (int256) {
        // Formula from the book "Hacker's Delight"
        int256 x = (a & b) + ((a ^ b) >> 1);
        return x + (int256(uint256(x) >> 255) & (a ^ b));
    }

    /**
     * @dev Returns the absolute unsigned value of a signed value.
     */
    function abs(int256 n) internal pure returns (uint256) {
        unchecked {
            // must be unchecked in order to support `n = type(int256).min`
            return uint256(n >= 0 ? n : -n);
        }
    }
}

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

pragma solidity ^0.8.0;

import "./math/Math.sol";
import "./math/SignedMath.sol";

/**
 * @dev String operations.
 */
library Strings {
    bytes16 private constant _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) {
        unchecked {
            uint256 length = Math.log10(value) + 1;
            string memory buffer = new string(length);
            uint256 ptr;
            /// @solidity memory-safe-assembly
            assembly {
                ptr := add(buffer, add(32, length))
            }
            while (true) {
                ptr--;
                /// @solidity memory-safe-assembly
                assembly {
                    mstore8(ptr, byte(mod(value, 10), _SYMBOLS))
                }
                value /= 10;
                if (value == 0) break;
            }
            return buffer;
        }
    }

    /**
     * @dev Converts a `int256` to its ASCII `string` decimal representation.
     */
    function toString(int256 value) internal pure returns (string memory) {
        return string(abi.encodePacked(value < 0 ? "-" : "", toString(SignedMath.abs(value))));
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
     */
    function toHexString(uint256 value) internal pure returns (string memory) {
        unchecked {
            return toHexString(value, Math.log256(value) + 1);
        }
    }

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

    /**
     * @dev Returns true if the two strings are equal.
     */
    function equal(string memory a, string memory b) internal pure returns (bool) {
        return keccak256(bytes(a)) == keccak256(bytes(b));
    }
}

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

Contract Security Audit

Contract ABI

API
[{"inputs":[],"name":"ExpiredOrder","type":"error"},{"inputs":[],"name":"InvalidFeeSignature","type":"error"},{"inputs":[],"name":"InvalidSignature","type":"error"},{"inputs":[],"name":"OrderFilledOrCancelled","type":"error"},{"inputs":[],"name":"TransferFailed","type":"error"},{"inputs":[],"name":"UnauthorizedTaker","type":"error"},{"inputs":[],"name":"ZeroAddress","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"newSigner","type":"address"}],"name":"BackendSignerUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bytes32[]","name":"orderHashes","type":"bytes32[]"},{"indexed":false,"internalType":"address[]","name":"makers","type":"address[]"},{"indexed":false,"internalType":"address","name":"taker","type":"address"},{"indexed":false,"internalType":"address","name":"paymentToken","type":"address"},{"indexed":false,"internalType":"address","name":"collectionAddress","type":"address"},{"indexed":false,"internalType":"uint256","name":"supply","type":"uint256"},{"indexed":false,"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"},{"indexed":false,"internalType":"uint256[]","name":"prices","type":"uint256[]"}],"name":"BatchOrderFilled","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"newRecipient","type":"address"}],"name":"FeeRecipientUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint8","name":"version","type":"uint8"}],"name":"Initialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"orderHash","type":"bytes32"},{"indexed":true,"internalType":"address","name":"maker","type":"address"}],"name":"OrderCancelled","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"stateMutability":"payable","type":"fallback"},{"inputs":[{"internalType":"address","name":"collection","type":"address"}],"name":"_getRoyaltyByAddress","outputs":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint256","name":"bps","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"backendSigner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"maker","type":"address"},{"internalType":"address","name":"taker","type":"address"},{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bool","name":"is1155","type":"bool"},{"internalType":"address","name":"paymentToken","type":"address"},{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"uint256","name":"expiration","type":"uint256"},{"internalType":"uint256","name":"salt","type":"uint256"}],"internalType":"struct KunstifyPort.Order","name":"order","type":"tuple"}],"name":"cancelOrder","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"feeRecipient","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"maker","type":"address"},{"internalType":"address","name":"taker","type":"address"},{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bool","name":"is1155","type":"bool"},{"internalType":"address","name":"paymentToken","type":"address"},{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"uint256","name":"expiration","type":"uint256"},{"internalType":"uint256","name":"salt","type":"uint256"}],"internalType":"struct KunstifyPort.Order[]","name":"orders","type":"tuple[]"},{"internalType":"bytes[]","name":"orderSignatures","type":"bytes[]"},{"components":[{"internalType":"uint8","name":"packageId","type":"uint8"},{"internalType":"uint256","name":"feeBps","type":"uint256"},{"internalType":"bytes","name":"signature","type":"bytes"}],"internalType":"struct KunstifyPort.FeeData[]","name":"feeDatas","type":"tuple[]"}],"name":"fillBatchOrders","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"maker","type":"address"},{"internalType":"address","name":"taker","type":"address"},{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bool","name":"is1155","type":"bool"},{"internalType":"address","name":"paymentToken","type":"address"},{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"uint256","name":"expiration","type":"uint256"},{"internalType":"uint256","name":"salt","type":"uint256"}],"internalType":"struct KunstifyPort.Order","name":"order","type":"tuple"},{"internalType":"bytes","name":"orderSignature","type":"bytes"},{"components":[{"internalType":"uint8","name":"packageId","type":"uint8"},{"internalType":"uint256","name":"feeBps","type":"uint256"},{"internalType":"bytes","name":"signature","type":"bytes"}],"internalType":"struct KunstifyPort.FeeData","name":"feeData","type":"tuple"}],"name":"fillOrder","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"_backendSigner","type":"address"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"isOrderFilledOrCancelled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256[]","name":"","type":"uint256[]"},{"internalType":"uint256[]","name":"","type":"uint256[]"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC1155BatchReceived","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC1155Received","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC721Received","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"pure","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":"_backendSigner","type":"address"}],"name":"setBackendSigner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_feeRecipient","type":"address"}],"name":"setFeeRecipient","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]

608060405234801561001057600080fd5b50612cd6806100206000396000f3fe60806040526004361061010c5760003560e01c80638da5cb5b1161009a578063dd9cb3be11610061578063dd9cb3be14610315578063e74b981b14610354578063ede5dad214610374578063f23a6e6114610394578063f2fde38b146103c157005b80638da5cb5b146102655780639be21ccf14610283578063b0a08e1b146102b3578063bc197c81146102c6578063c4d66de8146102f557005b80635be67a83116100de5780635be67a83146101e45780635c975abb146101f757806365d65e861461021b578063715018a61461023b5780638456cb591461025057005b8063150b7a021461011557806336f95670146101775780633f4ba83a1461019757806346904840146101ac57005b3661011357005b005b34801561012157600080fd5b50610141610130366004612310565b630a85bd0160e11b95945050505050565b6040517fffffffff0000000000000000000000000000000000000000000000000000000090911681526020015b60405180910390f35b34801561018357600080fd5b50610113610192366004612383565b6103e1565b3480156101a357600080fd5b5061011361045a565b3480156101b857600080fd5b5060ca546101cc906001600160a01b031681565b6040516001600160a01b03909116815260200161016e565b6101136101f23660046123ec565b61046c565b34801561020357600080fd5b5060975460ff165b604051901515815260200161016e565b34801561022757600080fd5b5060c9546101cc906001600160a01b031681565b34801561024757600080fd5b50610113610560565b34801561025c57600080fd5b50610113610572565b34801561027157600080fd5b506033546001600160a01b03166101cc565b34801561028f57600080fd5b5061020b61029e3660046124b5565b60cb6020526000908152604090205460ff1681565b6101136102c13660046124e7565b610582565b3480156102d257600080fd5b506101416102e136600461256a565b63bc197c8160e01b98975050505050505050565b34801561030157600080fd5b50610113610310366004612383565b610749565b34801561032157600080fd5b50610335610330366004612383565b6108ca565b604080516001600160a01b03909316835260208301919091520161016e565b34801561036057600080fd5b5061011361036f366004612383565b610950565b34801561038057600080fd5b5061011361038f366004612629565b6109c9565b3480156103a057600080fd5b506101416103af366004612646565b63f23a6e6160e01b9695505050505050565b3480156103cd57600080fd5b506101136103dc366004612383565b610ad8565b6103e9610b51565b6001600160a01b0381166104105760405163d92e233d60e01b815260040160405180910390fd5b60c980546001600160a01b0319166001600160a01b0383169081179091556040517fbf1b7f0ea3d9f70f4a9732008adf3ed3aacaa8e1d290ace363b8a009a0d9c09e90600090a250565b610462610b51565b61046a610bab565b565b610474610bfd565b61047c610c56565b848314801561048a57508481145b6104db5760405162461bcd60e51b815260206004820152600f60248201527f4c656e677468206d69736d61746368000000000000000000000000000000000060448201526064015b60405180910390fd5b61054e8686808060200260200160405190810160405280939291908181526020016000905b8282101561052d5761051e610140830286013681900381019061273a565b81526020019060010190610500565b505050505085859061053f9190612875565b6105498486612979565b610ca9565b6105586001606555565b505050505050565b610568610b51565b61046a6000611ae5565b61057a610b51565b61046a611b37565b61058a610bfd565b610592610c56565b604080516001808252818301909252600091816020015b604080516101408101825260008082526020808301829052928201819052606082018190526080820181905260a0820181905260c0820181905260e08201819052610100820181905261012082015282526000199092019101816105a957905050905061061b3686900386018661273a565b8160008151811061062e5761062e6129e1565b6020908102919091010152604080516001808252818301909252600091816020015b606081526020019060019003908161065057905050905084848080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201829052508551869450909250151590506106b1576106b16129e1565b6020908102919091010152604080516001808252818301909252600091816020015b604080516060808201835260008083526020830152918101919091528152602001906001900390816106d357905050905061070d846129f7565b81600081518110610720576107206129e1565b6020026020010181905250610736838383610ca9565b5050506107436001606555565b50505050565b600054610100900460ff16158080156107695750600054600160ff909116105b806107835750303b158015610783575060005460ff166001145b6107f55760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a656400000000000000000000000000000000000060648201526084016104d2565b6000805460ff191660011790558015610818576000805461ff0019166101001790555b6001600160a01b03821661083f5760405163d92e233d60e01b815260040160405180910390fd5b610847611b74565b61084f611ba3565b610857611bd2565b60ca8054336001600160a01b03199182161790915560c980549091166001600160a01b03841617905580156108c6576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050565b60405163152a902d60e11b815260006004820181905261271060248301529081906001600160a01b03841690632a55205a906044016040805180830381865afa925050508015610937575060408051601f3d908101601f1916820190925261093491810190612a03565b60015b61094657506000928392509050565b9094909350915050565b610958610b51565b6001600160a01b03811661097f5760405163d92e233d60e01b815260040160405180910390fd5b60ca80546001600160a01b0319166001600160a01b0383169081179091556040517f7a7b5a0a132f9e0581eb8527f66eae9ee89c2a3e79d4ac7e41a1f1f4d48a7fc290600090a250565b6109d1610c56565b6109de6020820182612383565b6001600160a01b0316336001600160a01b031614610a2a5760405162461bcd60e51b81526020600482015260096024820152682737ba1036b0b5b2b960b91b60448201526064016104d2565b6000610a43610a3e3684900384018461273a565b611c01565b600081815260cb602052604090205490915060ff1615610a7657604051633d9c5bb760e11b815260040160405180910390fd5b600081815260cb60209081526040909120805460ff19166001179055610a9e90830183612383565b6001600160a01b0316817fa6eb7cdc219e1518ced964e9a34e61d68a94e4f1569db3e84256ba981ba5275360405160405180910390a35050565b610ae0610b51565b6001600160a01b038116610b455760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016104d2565b610b4e81611ae5565b50565b6033546001600160a01b0316331461046a5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016104d2565b610bb3611cbd565b6097805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b600260655403610c4f5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016104d2565b6002606555565b60975460ff161561046a5760405162461bcd60e51b815260206004820152601060248201527f5061757361626c653a207061757365640000000000000000000000000000000060448201526064016104d2565b6000835111610cfa5760405162461bcd60e51b815260206004820152601260248201527f4e6f206f72646572732070726f7669646564000000000000000000000000000060448201526064016104d2565b81518351148015610d0c575080518351145b610d585760405162461bcd60e51b815260206004820152601560248201527f4172726179206c656e677468206d69736d61746368000000000000000000000060448201526064016104d2565b600083600081518110610d6d57610d6d6129e1565b602002602001015160a001519050600084600081518110610d9057610d906129e1565b602002602001015160800151905060005b8551811015610e2c57821515868281518110610dbf57610dbf6129e1565b602002602001015160a00151151514610e1a5760405162461bcd60e51b815260206004820152601c60248201527f416c6c206f7264657273206d7573742062652073616d6520747970650000000060448201526064016104d2565b80610e2481612a47565b915050610da1565b506000805b8651811015610eaf5760006001600160a01b0316878281518110610e5757610e576129e1565b602002602001015160c001516001600160a01b031603610e9d57868181518110610e8357610e836129e1565b602002602001015160e0015182610e9a9190612a60565b91505b80610ea781612a47565b915050610e31565b50803414610eff5760405162461bcd60e51b815260206004820152601860248201527f496e636f727265637420746f74616c204554482073656e74000000000000000060448201526064016104d2565b600086600081518110610f1457610f146129e1565b60200260200101516040015190506000875167ffffffffffffffff811115610f3e57610f3e6126b0565b604051908082528060200260200182016040528015610f67578160200160208202803683370190505b5090506000885167ffffffffffffffff811115610f8657610f866126b0565b604051908082528060200260200182016040528015610faf578160200160208202803683370190505b5090506000895167ffffffffffffffff811115610fce57610fce6126b0565b604051908082528060200260200182016040528015610ff7578160200160208202803683370190505b50905060008a5167ffffffffffffffff811115611016576110166126b0565b60405190808252806020026020018201604052801561103f578160200160208202803683370190505b50905060005b8b51811015611a605760008c8281518110611062576110626129e1565b6020026020010151905060008b8381518110611080576110806129e1565b6020026020010151905060008d848151811061109e5761109e6129e1565b6020026020010151905060006110b384611c01565b600081815260cb602052604090205490915060ff16156110e657604051633d9c5bb760e11b815260040160405180910390fd5b610100840151158015906110fe575083610100015142115b1561111c576040516322fd168360e11b815260040160405180910390fd5b60208401516001600160a01b031615801590611145575060208401516001600160a01b03163314155b1561116357604051630fb22aa560e21b815260040160405180910390fd5b61116d8483611d0f565b61118a57604051638baa579f60e01b815260040160405180910390fd5b6111a68460000151846000015185602001518660400151611e31565b6111c3576040516303c0409b60e21b815260040160405180910390fd5b600081815260cb602090815260408220805460ff1916600117905584015160e0860151612710916111f391612a73565b6111fd9190612a8a565b90506000806112168d8860000151338a60e00151611f10565b91509150600081848960e0015161122d9190612aac565b6112379190612aac565b60c08901519091506001600160a01b03166113bd5783156112c85760ca546040516000916001600160a01b03169086908381818185875af1925050503d806000811461129f576040519150601f19603f3d011682016040523d82523d6000602084013e6112a4565b606091505b50509050806112c6576040516312171d8360e31b815260040160405180910390fd5b505b8115611344576000836001600160a01b03168360405160006040518083038185875af1925050503d806000811461131b576040519150601f19603f3d011682016040523d82523d6000602084013e611320565b606091505b5050905080611342576040516312171d8360e31b815260040160405180910390fd5b505b87516040516000916001600160a01b03169083908381818185875af1925050503d8060008114611390576040519150601f19603f3d011682016040523d82523d6000602084013e611395565b606091505b50509050806113b7576040516312171d8360e31b815260040160405180910390fd5b506116dd565b60c088015160e08901516040516323b872dd60e01b815233600482015230602482015260448101919091526001600160a01b038216906323b872dd906064016020604051808303816000875af115801561141b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061143f9190612abf565b61148b5760405162461bcd60e51b815260206004820152601160248201527f45524332302070756c6c206661696c656400000000000000000000000000000060448201526064016104d2565b84156115545760ca5460405163a9059cbb60e01b81526001600160a01b039182166004820152602481018790529082169063a9059cbb906044016020604051808303816000875af11580156114e4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115089190612abf565b6115545760405162461bcd60e51b815260206004820152601360248201527f466565207472616e73666572206661696c65640000000000000000000000000060448201526064016104d2565b82156116195760405163a9059cbb60e01b81526001600160a01b0385811660048301526024820185905282169063a9059cbb906044016020604051808303816000875af11580156115a9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115cd9190612abf565b6116195760405162461bcd60e51b815260206004820152601760248201527f526f79616c7479207472616e73666572206661696c656400000000000000000060448201526064016104d2565b885160405163a9059cbb60e01b81526001600160a01b039182166004820152602481018490529082169063a9059cbb906044016020604051808303816000875af115801561166b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061168f9190612abf565b6116db5760405162461bcd60e51b815260206004820152601660248201527f53656c6c6572207472616e73666572206661696c65640000000000000000000060448201526064016104d2565b505b8760a001511561185157604080890151895160608b01519251627eeac760e11b81526001600160a01b039182166004820152602481019390935260009291169062fdd58e90604401602060405180830381865afa158015611742573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117669190612adc565b905088608001518110156117bc5760405162461bcd60e51b815260206004820152601c60248201527f496e73756666696369656e7420455243313135352062616c616e63650000000060448201526064016104d2565b6040898101518a5160608c015160808d01519351637921219560e11b81526001600160a01b0392831660048201523360248201526044810191909152606481019390935260a06084840152600060a4840152169063f242432a9060c401600060405180830381600087803b15801561183357600080fd5b505af1158015611847573d6000803e3d6000fd5b50505050506119a1565b87600001516001600160a01b031688604001516001600160a01b0316636352211e8a606001516040518263ffffffff1660e01b815260040161189591815260200190565b602060405180830381865afa1580156118b2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118d69190612af5565b6001600160a01b03161461192c5760405162461bcd60e51b815260206004820152601060248201527f455243373231206e6f74206f776e65640000000000000000000000000000000060448201526064016104d2565b604088810151895160608b01519251632142170760e11b81526001600160a01b039182166004820152336024820152604481019390935216906342842e0e90606401600060405180830381600087803b15801561198857600080fd5b505af115801561199c573d6000803e3d6000fd5b505050505b848d8a815181106119b4576119b46129e1565b60200260200101818152505087600001518c8a815181106119d7576119d76129e1565b60200260200101906001600160a01b031690816001600160a01b0316815250508760e001518a8a81518110611a0e57611a0e6129e1565b60200260200101818152505087606001518b8a81518110611a3157611a316129e1565b602002602001018181525050888060010199505050505050505050508080611a5890612a47565b915050611045565b507fae4803de4ac29c5407abde08dc231a37f1da8d8db8d309a24127f13266d8a1398484338e600081518110611a9857611a986129e1565b602002602001015160c00151898d611ab1576001611ab3565b8c5b8888604051611ac9989796959493929190612b86565b60405180910390a15050505050505050505050565b6001606555565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b611b3f610c56565b6097805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258610be03390565b600054610100900460ff16611b9b5760405162461bcd60e51b81526004016104d290612c3f565b61046a611fab565b600054610100900460ff16611bca5760405162461bcd60e51b81526004016104d290612c3f565b61046a611fdb565b600054610100900460ff16611bf95760405162461bcd60e51b81526004016104d290612c3f565b61046a612002565b80516020808301516040808501516060860151608087015160a088015160c089015160e08a01516101008b01516101208c0151975160009b611ca09b909a9991016001600160a01b039a8b168152988a1660208a015296891660408901526060880195909552608087019390935290151560a086015290941660c084015260e08301939093526101008201929092526101208101919091526101400190565b604051602081830303815290604052805190602001209050919050565b60975460ff1661046a5760405162461bcd60e51b815260206004820152601460248201527f5061757361626c653a206e6f742070617573656400000000000000000000000060448201526064016104d2565b8151602080840151604080860151606080880151608089015160a08a015160e08b01516101008c01516101208d015188519b871b6bffffffffffffffffffffffff199081168d8d015299871b8a1660348d01529690951b90971660488a0152605c890192909252607c880152151560f81b609c870152609d86019390935260bd85019290925260dd808501929092528051808503909201825260fd8401905280519101207f19457468657265756d205369676e6564204d6573736167653a0a33320000000061011d830152610139820181905260009182906101590160408051601f19818403018152919052805160209091012060c9549091506001600160a01b0316611e1c8286612035565b6001600160a01b031614925050505b92915050565b604080516bffffffffffffffffffffffff19606087901b16602080830191909152603482018590527fff0000000000000000000000000000000000000000000000000000000000000060f887901b166054830152825180830360350181526055830184528051908201207f19457468657265756d205369676e6564204d6573736167653a0a333200000000607584015260918084018290528451808503909101815260b1909301909352815191012060c95460009291906001600160a01b0316611efb8286612035565b6001600160a01b031614979650505050505050565b600080600080611f1f886108ca565b90925090506001600160a01b0382161580611f38575080155b80611f545750866001600160a01b0316826001600160a01b0316145b80611f705750856001600160a01b0316826001600160a01b0316145b15611f8357600080935093505050611fa2565b81612710611f918388612a73565b611f9b9190612a8a565b9350935050505b94509492505050565b600054610100900460ff16611fd25760405162461bcd60e51b81526004016104d290612c3f565b61046a33611ae5565b600054610100900460ff16611ade5760405162461bcd60e51b81526004016104d290612c3f565b600054610100900460ff166120295760405162461bcd60e51b81526004016104d290612c3f565b6097805460ff19169055565b60008060006120448585612059565b915091506120518161209e565b509392505050565b600080825160410361208f5760208301516040840151606085015160001a612083878285856121e8565b94509450505050612097565b506000905060025b9250929050565b60008160048111156120b2576120b2612c8a565b036120ba5750565b60018160048111156120ce576120ce612c8a565b0361211b5760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e6174757265000000000000000060448201526064016104d2565b600281600481111561212f5761212f612c8a565b0361217c5760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e6774680060448201526064016104d2565b600381600481111561219057612190612c8a565b03610b4e5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b60648201526084016104d2565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a083111561221f5750600090506003611fa2565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015612273573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811661229c57600060019250925050611fa2565b9660009650945050505050565b6001600160a01b0381168114610b4e57600080fd5b80356122c9816122a9565b919050565b60008083601f8401126122e057600080fd5b50813567ffffffffffffffff8111156122f857600080fd5b60208301915083602082850101111561209757600080fd5b60008060008060006080868803121561232857600080fd5b8535612333816122a9565b94506020860135612343816122a9565b935060408601359250606086013567ffffffffffffffff81111561236657600080fd5b612372888289016122ce565b969995985093965092949392505050565b60006020828403121561239557600080fd5b81356123a0816122a9565b9392505050565b60008083601f8401126123b957600080fd5b50813567ffffffffffffffff8111156123d157600080fd5b6020830191508360208260051b850101111561209757600080fd5b6000806000806000806060878903121561240557600080fd5b863567ffffffffffffffff8082111561241d57600080fd5b818901915089601f83011261243157600080fd5b81358181111561244057600080fd5b8a60206101408302850101111561245657600080fd5b60209283019850965090880135908082111561247157600080fd5b61247d8a838b016123a7565b9096509450604089013591508082111561249657600080fd5b506124a389828a016123a7565b979a9699509497509295939492505050565b6000602082840312156124c757600080fd5b5035919050565b600061014082840312156124e157600080fd5b50919050565b60008060008061018085870312156124fe57600080fd5b61250886866124ce565b935061014085013567ffffffffffffffff8082111561252657600080fd5b612532888389016122ce565b909550935061016087013591508082111561254c57600080fd5b5085016060818803121561255f57600080fd5b939692955090935050565b60008060008060008060008060a0898b03121561258657600080fd5b8835612591816122a9565b975060208901356125a1816122a9565b9650604089013567ffffffffffffffff808211156125be57600080fd5b6125ca8c838d016123a7565b909850965060608b01359150808211156125e357600080fd5b6125ef8c838d016123a7565b909650945060808b013591508082111561260857600080fd5b506126158b828c016122ce565b999c989b5096995094979396929594505050565b6000610140828403121561263c57600080fd5b6123a083836124ce565b60008060008060008060a0878903121561265f57600080fd5b863561266a816122a9565b9550602087013561267a816122a9565b94506040870135935060608701359250608087013567ffffffffffffffff8111156126a457600080fd5b6124a389828a016122ce565b634e487b7160e01b600052604160045260246000fd5b604051610140810167ffffffffffffffff811182821017156126ea576126ea6126b0565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715612719576127196126b0565b604052919050565b8015158114610b4e57600080fd5b80356122c981612721565b6000610140828403121561274d57600080fd5b6127556126c6565b61275e836122be565b815261276c602084016122be565b602082015261277d604084016122be565b604082015260608301356060820152608083013560808201526127a260a0840161272f565b60a08201526127b360c084016122be565b60c082015260e083810135908201526101008084013590820152610120928301359281019290925250919050565b600067ffffffffffffffff8211156127fb576127fb6126b0565b5060051b60200190565b600082601f83011261281657600080fd5b813567ffffffffffffffff811115612830576128306126b0565b612843601f8201601f19166020016126f0565b81815284602083860101111561285857600080fd5b816020850160208301376000918101602001919091529392505050565b6000612888612883846127e1565b6126f0565b80848252602080830192508560051b8501368111156128a657600080fd5b855b818110156128e257803567ffffffffffffffff8111156128c85760008081fd5b6128d436828a01612805565b8652509382019382016128a8565b50919695505050505050565b60006060828403121561290057600080fd5b6040516060810167ffffffffffffffff8282108183111715612924576129246126b0565b816040528293508435915060ff8216821461293e57600080fd5b81835260208501356020840152604085013591508082111561295f57600080fd5b5061296c85828601612805565b6040830152505092915050565b6000612987612883846127e1565b80848252602080830192508560051b8501368111156129a557600080fd5b855b818110156128e257803567ffffffffffffffff8111156129c75760008081fd5b6129d336828a016128ee565b8652509382019382016129a7565b634e487b7160e01b600052603260045260246000fd5b6000611e2b36836128ee565b60008060408385031215612a1657600080fd5b8251612a21816122a9565b6020939093015192949293505050565b634e487b7160e01b600052601160045260246000fd5b600060018201612a5957612a59612a31565b5060010190565b80820180821115611e2b57611e2b612a31565b8082028115828204841417611e2b57611e2b612a31565b600082612aa757634e487b7160e01b600052601260045260246000fd5b500490565b81810381811115611e2b57611e2b612a31565b600060208284031215612ad157600080fd5b81516123a081612721565b600060208284031215612aee57600080fd5b5051919050565b600060208284031215612b0757600080fd5b81516123a0816122a9565b600081518084526020808501945080840160005b83811015612b4b5781516001600160a01b031687529582019590820190600101612b26565b509495945050505050565b600081518084526020808501945080840160005b83811015612b4b57815187529582019590820190600101612b6a565b6101008082528951908201819052600090610120830190602090818d01845b82811015612bc157815185529383019390830190600101612ba5565b50505083820390840152612bd5818b612b12565b6001600160a01b038a16604085015290506001600160a01b03881660608401526001600160a01b03871660808401528560a084015282810360c0840152612c1c8186612b56565b905082810360e0840152612c308185612b56565b9b9a5050505050505050505050565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b634e487b7160e01b600052602160045260246000fdfea26469706673582212207c879ffff758bb29627e54765d38be32c67a1af34e582e1a2083a96831b40b4f64736f6c63430008120033

Deployed Bytecode

0x60806040526004361061010c5760003560e01c80638da5cb5b1161009a578063dd9cb3be11610061578063dd9cb3be14610315578063e74b981b14610354578063ede5dad214610374578063f23a6e6114610394578063f2fde38b146103c157005b80638da5cb5b146102655780639be21ccf14610283578063b0a08e1b146102b3578063bc197c81146102c6578063c4d66de8146102f557005b80635be67a83116100de5780635be67a83146101e45780635c975abb146101f757806365d65e861461021b578063715018a61461023b5780638456cb591461025057005b8063150b7a021461011557806336f95670146101775780633f4ba83a1461019757806346904840146101ac57005b3661011357005b005b34801561012157600080fd5b50610141610130366004612310565b630a85bd0160e11b95945050505050565b6040517fffffffff0000000000000000000000000000000000000000000000000000000090911681526020015b60405180910390f35b34801561018357600080fd5b50610113610192366004612383565b6103e1565b3480156101a357600080fd5b5061011361045a565b3480156101b857600080fd5b5060ca546101cc906001600160a01b031681565b6040516001600160a01b03909116815260200161016e565b6101136101f23660046123ec565b61046c565b34801561020357600080fd5b5060975460ff165b604051901515815260200161016e565b34801561022757600080fd5b5060c9546101cc906001600160a01b031681565b34801561024757600080fd5b50610113610560565b34801561025c57600080fd5b50610113610572565b34801561027157600080fd5b506033546001600160a01b03166101cc565b34801561028f57600080fd5b5061020b61029e3660046124b5565b60cb6020526000908152604090205460ff1681565b6101136102c13660046124e7565b610582565b3480156102d257600080fd5b506101416102e136600461256a565b63bc197c8160e01b98975050505050505050565b34801561030157600080fd5b50610113610310366004612383565b610749565b34801561032157600080fd5b50610335610330366004612383565b6108ca565b604080516001600160a01b03909316835260208301919091520161016e565b34801561036057600080fd5b5061011361036f366004612383565b610950565b34801561038057600080fd5b5061011361038f366004612629565b6109c9565b3480156103a057600080fd5b506101416103af366004612646565b63f23a6e6160e01b9695505050505050565b3480156103cd57600080fd5b506101136103dc366004612383565b610ad8565b6103e9610b51565b6001600160a01b0381166104105760405163d92e233d60e01b815260040160405180910390fd5b60c980546001600160a01b0319166001600160a01b0383169081179091556040517fbf1b7f0ea3d9f70f4a9732008adf3ed3aacaa8e1d290ace363b8a009a0d9c09e90600090a250565b610462610b51565b61046a610bab565b565b610474610bfd565b61047c610c56565b848314801561048a57508481145b6104db5760405162461bcd60e51b815260206004820152600f60248201527f4c656e677468206d69736d61746368000000000000000000000000000000000060448201526064015b60405180910390fd5b61054e8686808060200260200160405190810160405280939291908181526020016000905b8282101561052d5761051e610140830286013681900381019061273a565b81526020019060010190610500565b505050505085859061053f9190612875565b6105498486612979565b610ca9565b6105586001606555565b505050505050565b610568610b51565b61046a6000611ae5565b61057a610b51565b61046a611b37565b61058a610bfd565b610592610c56565b604080516001808252818301909252600091816020015b604080516101408101825260008082526020808301829052928201819052606082018190526080820181905260a0820181905260c0820181905260e08201819052610100820181905261012082015282526000199092019101816105a957905050905061061b3686900386018661273a565b8160008151811061062e5761062e6129e1565b6020908102919091010152604080516001808252818301909252600091816020015b606081526020019060019003908161065057905050905084848080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201829052508551869450909250151590506106b1576106b16129e1565b6020908102919091010152604080516001808252818301909252600091816020015b604080516060808201835260008083526020830152918101919091528152602001906001900390816106d357905050905061070d846129f7565b81600081518110610720576107206129e1565b6020026020010181905250610736838383610ca9565b5050506107436001606555565b50505050565b600054610100900460ff16158080156107695750600054600160ff909116105b806107835750303b158015610783575060005460ff166001145b6107f55760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a656400000000000000000000000000000000000060648201526084016104d2565b6000805460ff191660011790558015610818576000805461ff0019166101001790555b6001600160a01b03821661083f5760405163d92e233d60e01b815260040160405180910390fd5b610847611b74565b61084f611ba3565b610857611bd2565b60ca8054336001600160a01b03199182161790915560c980549091166001600160a01b03841617905580156108c6576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050565b60405163152a902d60e11b815260006004820181905261271060248301529081906001600160a01b03841690632a55205a906044016040805180830381865afa925050508015610937575060408051601f3d908101601f1916820190925261093491810190612a03565b60015b61094657506000928392509050565b9094909350915050565b610958610b51565b6001600160a01b03811661097f5760405163d92e233d60e01b815260040160405180910390fd5b60ca80546001600160a01b0319166001600160a01b0383169081179091556040517f7a7b5a0a132f9e0581eb8527f66eae9ee89c2a3e79d4ac7e41a1f1f4d48a7fc290600090a250565b6109d1610c56565b6109de6020820182612383565b6001600160a01b0316336001600160a01b031614610a2a5760405162461bcd60e51b81526020600482015260096024820152682737ba1036b0b5b2b960b91b60448201526064016104d2565b6000610a43610a3e3684900384018461273a565b611c01565b600081815260cb602052604090205490915060ff1615610a7657604051633d9c5bb760e11b815260040160405180910390fd5b600081815260cb60209081526040909120805460ff19166001179055610a9e90830183612383565b6001600160a01b0316817fa6eb7cdc219e1518ced964e9a34e61d68a94e4f1569db3e84256ba981ba5275360405160405180910390a35050565b610ae0610b51565b6001600160a01b038116610b455760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016104d2565b610b4e81611ae5565b50565b6033546001600160a01b0316331461046a5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016104d2565b610bb3611cbd565b6097805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b600260655403610c4f5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016104d2565b6002606555565b60975460ff161561046a5760405162461bcd60e51b815260206004820152601060248201527f5061757361626c653a207061757365640000000000000000000000000000000060448201526064016104d2565b6000835111610cfa5760405162461bcd60e51b815260206004820152601260248201527f4e6f206f72646572732070726f7669646564000000000000000000000000000060448201526064016104d2565b81518351148015610d0c575080518351145b610d585760405162461bcd60e51b815260206004820152601560248201527f4172726179206c656e677468206d69736d61746368000000000000000000000060448201526064016104d2565b600083600081518110610d6d57610d6d6129e1565b602002602001015160a001519050600084600081518110610d9057610d906129e1565b602002602001015160800151905060005b8551811015610e2c57821515868281518110610dbf57610dbf6129e1565b602002602001015160a00151151514610e1a5760405162461bcd60e51b815260206004820152601c60248201527f416c6c206f7264657273206d7573742062652073616d6520747970650000000060448201526064016104d2565b80610e2481612a47565b915050610da1565b506000805b8651811015610eaf5760006001600160a01b0316878281518110610e5757610e576129e1565b602002602001015160c001516001600160a01b031603610e9d57868181518110610e8357610e836129e1565b602002602001015160e0015182610e9a9190612a60565b91505b80610ea781612a47565b915050610e31565b50803414610eff5760405162461bcd60e51b815260206004820152601860248201527f496e636f727265637420746f74616c204554482073656e74000000000000000060448201526064016104d2565b600086600081518110610f1457610f146129e1565b60200260200101516040015190506000875167ffffffffffffffff811115610f3e57610f3e6126b0565b604051908082528060200260200182016040528015610f67578160200160208202803683370190505b5090506000885167ffffffffffffffff811115610f8657610f866126b0565b604051908082528060200260200182016040528015610faf578160200160208202803683370190505b5090506000895167ffffffffffffffff811115610fce57610fce6126b0565b604051908082528060200260200182016040528015610ff7578160200160208202803683370190505b50905060008a5167ffffffffffffffff811115611016576110166126b0565b60405190808252806020026020018201604052801561103f578160200160208202803683370190505b50905060005b8b51811015611a605760008c8281518110611062576110626129e1565b6020026020010151905060008b8381518110611080576110806129e1565b6020026020010151905060008d848151811061109e5761109e6129e1565b6020026020010151905060006110b384611c01565b600081815260cb602052604090205490915060ff16156110e657604051633d9c5bb760e11b815260040160405180910390fd5b610100840151158015906110fe575083610100015142115b1561111c576040516322fd168360e11b815260040160405180910390fd5b60208401516001600160a01b031615801590611145575060208401516001600160a01b03163314155b1561116357604051630fb22aa560e21b815260040160405180910390fd5b61116d8483611d0f565b61118a57604051638baa579f60e01b815260040160405180910390fd5b6111a68460000151846000015185602001518660400151611e31565b6111c3576040516303c0409b60e21b815260040160405180910390fd5b600081815260cb602090815260408220805460ff1916600117905584015160e0860151612710916111f391612a73565b6111fd9190612a8a565b90506000806112168d8860000151338a60e00151611f10565b91509150600081848960e0015161122d9190612aac565b6112379190612aac565b60c08901519091506001600160a01b03166113bd5783156112c85760ca546040516000916001600160a01b03169086908381818185875af1925050503d806000811461129f576040519150601f19603f3d011682016040523d82523d6000602084013e6112a4565b606091505b50509050806112c6576040516312171d8360e31b815260040160405180910390fd5b505b8115611344576000836001600160a01b03168360405160006040518083038185875af1925050503d806000811461131b576040519150601f19603f3d011682016040523d82523d6000602084013e611320565b606091505b5050905080611342576040516312171d8360e31b815260040160405180910390fd5b505b87516040516000916001600160a01b03169083908381818185875af1925050503d8060008114611390576040519150601f19603f3d011682016040523d82523d6000602084013e611395565b606091505b50509050806113b7576040516312171d8360e31b815260040160405180910390fd5b506116dd565b60c088015160e08901516040516323b872dd60e01b815233600482015230602482015260448101919091526001600160a01b038216906323b872dd906064016020604051808303816000875af115801561141b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061143f9190612abf565b61148b5760405162461bcd60e51b815260206004820152601160248201527f45524332302070756c6c206661696c656400000000000000000000000000000060448201526064016104d2565b84156115545760ca5460405163a9059cbb60e01b81526001600160a01b039182166004820152602481018790529082169063a9059cbb906044016020604051808303816000875af11580156114e4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115089190612abf565b6115545760405162461bcd60e51b815260206004820152601360248201527f466565207472616e73666572206661696c65640000000000000000000000000060448201526064016104d2565b82156116195760405163a9059cbb60e01b81526001600160a01b0385811660048301526024820185905282169063a9059cbb906044016020604051808303816000875af11580156115a9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115cd9190612abf565b6116195760405162461bcd60e51b815260206004820152601760248201527f526f79616c7479207472616e73666572206661696c656400000000000000000060448201526064016104d2565b885160405163a9059cbb60e01b81526001600160a01b039182166004820152602481018490529082169063a9059cbb906044016020604051808303816000875af115801561166b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061168f9190612abf565b6116db5760405162461bcd60e51b815260206004820152601660248201527f53656c6c6572207472616e73666572206661696c65640000000000000000000060448201526064016104d2565b505b8760a001511561185157604080890151895160608b01519251627eeac760e11b81526001600160a01b039182166004820152602481019390935260009291169062fdd58e90604401602060405180830381865afa158015611742573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117669190612adc565b905088608001518110156117bc5760405162461bcd60e51b815260206004820152601c60248201527f496e73756666696369656e7420455243313135352062616c616e63650000000060448201526064016104d2565b6040898101518a5160608c015160808d01519351637921219560e11b81526001600160a01b0392831660048201523360248201526044810191909152606481019390935260a06084840152600060a4840152169063f242432a9060c401600060405180830381600087803b15801561183357600080fd5b505af1158015611847573d6000803e3d6000fd5b50505050506119a1565b87600001516001600160a01b031688604001516001600160a01b0316636352211e8a606001516040518263ffffffff1660e01b815260040161189591815260200190565b602060405180830381865afa1580156118b2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118d69190612af5565b6001600160a01b03161461192c5760405162461bcd60e51b815260206004820152601060248201527f455243373231206e6f74206f776e65640000000000000000000000000000000060448201526064016104d2565b604088810151895160608b01519251632142170760e11b81526001600160a01b039182166004820152336024820152604481019390935216906342842e0e90606401600060405180830381600087803b15801561198857600080fd5b505af115801561199c573d6000803e3d6000fd5b505050505b848d8a815181106119b4576119b46129e1565b60200260200101818152505087600001518c8a815181106119d7576119d76129e1565b60200260200101906001600160a01b031690816001600160a01b0316815250508760e001518a8a81518110611a0e57611a0e6129e1565b60200260200101818152505087606001518b8a81518110611a3157611a316129e1565b602002602001018181525050888060010199505050505050505050508080611a5890612a47565b915050611045565b507fae4803de4ac29c5407abde08dc231a37f1da8d8db8d309a24127f13266d8a1398484338e600081518110611a9857611a986129e1565b602002602001015160c00151898d611ab1576001611ab3565b8c5b8888604051611ac9989796959493929190612b86565b60405180910390a15050505050505050505050565b6001606555565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b611b3f610c56565b6097805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258610be03390565b600054610100900460ff16611b9b5760405162461bcd60e51b81526004016104d290612c3f565b61046a611fab565b600054610100900460ff16611bca5760405162461bcd60e51b81526004016104d290612c3f565b61046a611fdb565b600054610100900460ff16611bf95760405162461bcd60e51b81526004016104d290612c3f565b61046a612002565b80516020808301516040808501516060860151608087015160a088015160c089015160e08a01516101008b01516101208c0151975160009b611ca09b909a9991016001600160a01b039a8b168152988a1660208a015296891660408901526060880195909552608087019390935290151560a086015290941660c084015260e08301939093526101008201929092526101208101919091526101400190565b604051602081830303815290604052805190602001209050919050565b60975460ff1661046a5760405162461bcd60e51b815260206004820152601460248201527f5061757361626c653a206e6f742070617573656400000000000000000000000060448201526064016104d2565b8151602080840151604080860151606080880151608089015160a08a015160e08b01516101008c01516101208d015188519b871b6bffffffffffffffffffffffff199081168d8d015299871b8a1660348d01529690951b90971660488a0152605c890192909252607c880152151560f81b609c870152609d86019390935260bd85019290925260dd808501929092528051808503909201825260fd8401905280519101207f19457468657265756d205369676e6564204d6573736167653a0a33320000000061011d830152610139820181905260009182906101590160408051601f19818403018152919052805160209091012060c9549091506001600160a01b0316611e1c8286612035565b6001600160a01b031614925050505b92915050565b604080516bffffffffffffffffffffffff19606087901b16602080830191909152603482018590527fff0000000000000000000000000000000000000000000000000000000000000060f887901b166054830152825180830360350181526055830184528051908201207f19457468657265756d205369676e6564204d6573736167653a0a333200000000607584015260918084018290528451808503909101815260b1909301909352815191012060c95460009291906001600160a01b0316611efb8286612035565b6001600160a01b031614979650505050505050565b600080600080611f1f886108ca565b90925090506001600160a01b0382161580611f38575080155b80611f545750866001600160a01b0316826001600160a01b0316145b80611f705750856001600160a01b0316826001600160a01b0316145b15611f8357600080935093505050611fa2565b81612710611f918388612a73565b611f9b9190612a8a565b9350935050505b94509492505050565b600054610100900460ff16611fd25760405162461bcd60e51b81526004016104d290612c3f565b61046a33611ae5565b600054610100900460ff16611ade5760405162461bcd60e51b81526004016104d290612c3f565b600054610100900460ff166120295760405162461bcd60e51b81526004016104d290612c3f565b6097805460ff19169055565b60008060006120448585612059565b915091506120518161209e565b509392505050565b600080825160410361208f5760208301516040840151606085015160001a612083878285856121e8565b94509450505050612097565b506000905060025b9250929050565b60008160048111156120b2576120b2612c8a565b036120ba5750565b60018160048111156120ce576120ce612c8a565b0361211b5760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e6174757265000000000000000060448201526064016104d2565b600281600481111561212f5761212f612c8a565b0361217c5760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e6774680060448201526064016104d2565b600381600481111561219057612190612c8a565b03610b4e5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b60648201526084016104d2565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a083111561221f5750600090506003611fa2565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015612273573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811661229c57600060019250925050611fa2565b9660009650945050505050565b6001600160a01b0381168114610b4e57600080fd5b80356122c9816122a9565b919050565b60008083601f8401126122e057600080fd5b50813567ffffffffffffffff8111156122f857600080fd5b60208301915083602082850101111561209757600080fd5b60008060008060006080868803121561232857600080fd5b8535612333816122a9565b94506020860135612343816122a9565b935060408601359250606086013567ffffffffffffffff81111561236657600080fd5b612372888289016122ce565b969995985093965092949392505050565b60006020828403121561239557600080fd5b81356123a0816122a9565b9392505050565b60008083601f8401126123b957600080fd5b50813567ffffffffffffffff8111156123d157600080fd5b6020830191508360208260051b850101111561209757600080fd5b6000806000806000806060878903121561240557600080fd5b863567ffffffffffffffff8082111561241d57600080fd5b818901915089601f83011261243157600080fd5b81358181111561244057600080fd5b8a60206101408302850101111561245657600080fd5b60209283019850965090880135908082111561247157600080fd5b61247d8a838b016123a7565b9096509450604089013591508082111561249657600080fd5b506124a389828a016123a7565b979a9699509497509295939492505050565b6000602082840312156124c757600080fd5b5035919050565b600061014082840312156124e157600080fd5b50919050565b60008060008061018085870312156124fe57600080fd5b61250886866124ce565b935061014085013567ffffffffffffffff8082111561252657600080fd5b612532888389016122ce565b909550935061016087013591508082111561254c57600080fd5b5085016060818803121561255f57600080fd5b939692955090935050565b60008060008060008060008060a0898b03121561258657600080fd5b8835612591816122a9565b975060208901356125a1816122a9565b9650604089013567ffffffffffffffff808211156125be57600080fd5b6125ca8c838d016123a7565b909850965060608b01359150808211156125e357600080fd5b6125ef8c838d016123a7565b909650945060808b013591508082111561260857600080fd5b506126158b828c016122ce565b999c989b5096995094979396929594505050565b6000610140828403121561263c57600080fd5b6123a083836124ce565b60008060008060008060a0878903121561265f57600080fd5b863561266a816122a9565b9550602087013561267a816122a9565b94506040870135935060608701359250608087013567ffffffffffffffff8111156126a457600080fd5b6124a389828a016122ce565b634e487b7160e01b600052604160045260246000fd5b604051610140810167ffffffffffffffff811182821017156126ea576126ea6126b0565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715612719576127196126b0565b604052919050565b8015158114610b4e57600080fd5b80356122c981612721565b6000610140828403121561274d57600080fd5b6127556126c6565b61275e836122be565b815261276c602084016122be565b602082015261277d604084016122be565b604082015260608301356060820152608083013560808201526127a260a0840161272f565b60a08201526127b360c084016122be565b60c082015260e083810135908201526101008084013590820152610120928301359281019290925250919050565b600067ffffffffffffffff8211156127fb576127fb6126b0565b5060051b60200190565b600082601f83011261281657600080fd5b813567ffffffffffffffff811115612830576128306126b0565b612843601f8201601f19166020016126f0565b81815284602083860101111561285857600080fd5b816020850160208301376000918101602001919091529392505050565b6000612888612883846127e1565b6126f0565b80848252602080830192508560051b8501368111156128a657600080fd5b855b818110156128e257803567ffffffffffffffff8111156128c85760008081fd5b6128d436828a01612805565b8652509382019382016128a8565b50919695505050505050565b60006060828403121561290057600080fd5b6040516060810167ffffffffffffffff8282108183111715612924576129246126b0565b816040528293508435915060ff8216821461293e57600080fd5b81835260208501356020840152604085013591508082111561295f57600080fd5b5061296c85828601612805565b6040830152505092915050565b6000612987612883846127e1565b80848252602080830192508560051b8501368111156129a557600080fd5b855b818110156128e257803567ffffffffffffffff8111156129c75760008081fd5b6129d336828a016128ee565b8652509382019382016129a7565b634e487b7160e01b600052603260045260246000fd5b6000611e2b36836128ee565b60008060408385031215612a1657600080fd5b8251612a21816122a9565b6020939093015192949293505050565b634e487b7160e01b600052601160045260246000fd5b600060018201612a5957612a59612a31565b5060010190565b80820180821115611e2b57611e2b612a31565b8082028115828204841417611e2b57611e2b612a31565b600082612aa757634e487b7160e01b600052601260045260246000fd5b500490565b81810381811115611e2b57611e2b612a31565b600060208284031215612ad157600080fd5b81516123a081612721565b600060208284031215612aee57600080fd5b5051919050565b600060208284031215612b0757600080fd5b81516123a0816122a9565b600081518084526020808501945080840160005b83811015612b4b5781516001600160a01b031687529582019590820190600101612b26565b509495945050505050565b600081518084526020808501945080840160005b83811015612b4b57815187529582019590820190600101612b6a565b6101008082528951908201819052600090610120830190602090818d01845b82811015612bc157815185529383019390830190600101612ba5565b50505083820390840152612bd5818b612b12565b6001600160a01b038a16604085015290506001600160a01b03881660608401526001600160a01b03871660808401528560a084015282810360c0840152612c1c8186612b56565b905082810360e0840152612c308185612b56565b9b9a5050505050505050505050565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b634e487b7160e01b600052602160045260246000fdfea26469706673582212207c879ffff758bb29627e54765d38be32c67a1af34e582e1a2083a96831b40b4f64736f6c63430008120033

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

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.