ETH Price: $3,470.35 (+3.03%)

Contract

0x569161dB42b26056789b2B9481f859398A18E0e9
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

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

Contract Source Code Verified (Exact Match)

Contract Name:
DirectTransactionAtomicWrapper

Compiler Version
v0.8.17+commit.8df45f5f

Optimization Enabled:
Yes with 5500 runs

Other Settings:
default evmVersion
File 1 of 15 : DirectTransactionAtomicWrapper.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.17;

import "@openzeppelin/contracts/proxy/utils/Initializable.sol";
import "./Access.sol";
import "./Utils.sol";
import "./TokenHandler.sol";

uint8 constant VERSION = 2;

contract DirectTransactionAtomicWrapper is TokenHandler, Utils {
    struct ExternalCall {
        address payable contractAddress;
        uint256 value;
        bytes data;
    }

    error MarketplaceCallFailed(string reason);

    /// @custom:oz-upgrades-unsafe-allow constructor
    constructor() {
        _disableInitializers();
    }

    // constructor
    // This initializer will not be called again when the contract is upgraded
    function initialize(
        address[] memory whitelistedCallers
    ) external initializer {
        __Utils_init(whitelistedCallers);
        __TokenHandler_init();
    }

    // constructor for upgrades
    function reinitialize()
        external
        reinitializer(VERSION)
        onlyWhitelistedCaller
    {
        __TokenHandler_init();
    }

    receive() external payable {}

    /**
     * @notice Executes atomic transaction of any token when token ID is unknown i.e. primary sale
     */
    function executeAtomic(
        address payable marketplaceAddress,
        bytes calldata marketplaceData,
        uint256 value,
        address buyer,
        uint256 quantity,
        bool isErc721
    ) external onlyWhitelistedCaller primarySale(buyer, quantity, isErc721) {
        _callMarketplace(marketplaceAddress, marketplaceData, value);
    }

    /**
     * @notice Approves ERC20 spending and executes atomic transaction of any token when token ID is unknown
     * i.e. primary sale
     */
    function executeAtomic(
        address payable marketplaceAddress,
        bytes calldata marketplaceData,
        uint256 value,
        address buyer,
        uint256 quantity,
        bool isErc721,
        address erc20Address
    ) external onlyWhitelistedCaller primarySale(buyer, quantity, isErc721) {
        approveCurrencySpending(erc20Address, marketplaceAddress, value);
        _callMarketplace(marketplaceAddress, marketplaceData, 0);
    }

    /**
     * @notice Approves ERC20 spending by spender and executes atomic transaction of any token when token ID is unknown
     * i.e. primary sale
     */
    function executeAtomic(
        address payable marketplaceAddress,
        bytes calldata marketplaceData,
        uint256 value,
        address buyer,
        uint256 quantity,
        bool isErc721,
        address erc20Address,
        address erc20Spender
    ) external onlyWhitelistedCaller primarySale(buyer, quantity, isErc721) {
        approveCurrencySpending(erc20Address, erc20Spender, value);
        _callMarketplace(marketplaceAddress, marketplaceData, 0);
    }

    /**
     * @notice Executes atomic transaction of ERC721 when token ID is known i.e. secondary sale
     */
    function executeAtomic(
        address payable marketplaceAddress,
        bytes calldata marketplaceData,
        uint256 value,
        address buyer,
        address tokenAddress,
        uint256 tokenId
    ) external onlyWhitelistedCaller {
        _callMarketplace(marketplaceAddress, marketplaceData, value);
        _transferErc721Token(buyer, tokenAddress, tokenId);
    }

    /**
     * @notice Approves ERC20 spending and executes atomic transaction of ERC721 when token ID is known
     * i.e. secondary sale
     */
    function executeAtomic(
        address payable marketplaceAddress,
        bytes calldata marketplaceData,
        uint256 value,
        address buyer,
        address tokenAddress,
        uint256 tokenId,
        address erc20Address
    ) external onlyWhitelistedCaller {
        approveCurrencySpending(erc20Address, marketplaceAddress, value);
        _callMarketplace(marketplaceAddress, marketplaceData, 0);
        _transferErc721Token(buyer, tokenAddress, tokenId);
    }

    /**
     * @notice Approves ERC20 spending by spender and executes atomic transaction of ERC721 when token ID is known
     * i.e. secondary sale
     */
    function executeAtomic(
        address payable marketplaceAddress,
        bytes calldata marketplaceData,
        uint256 value,
        address buyer,
        address tokenAddress,
        uint256 tokenId,
        address erc20Address,
        address erc20Spender
    ) external onlyWhitelistedCaller {
        approveCurrencySpending(erc20Address, erc20Spender, value);
        _callMarketplace(marketplaceAddress, marketplaceData, 0);
        _transferErc721Token(buyer, tokenAddress, tokenId);
    }

    /**
     * @notice Executes atomic transaction of ERC1155 when token ID is known i.e. secondary sale
     */
    function executeAtomic(
        address payable marketplaceAddress,
        bytes calldata marketplaceData,
        uint256 value,
        address buyer,
        address tokenAddress,
        uint256 tokenId,
        uint256 quantity
    ) external onlyWhitelistedCaller {
        _callMarketplace(marketplaceAddress, marketplaceData, value);
        _transferErc1155Token(buyer, tokenAddress, tokenId, quantity);
    }

    /**
     * @notice Approves ERC20 spending and executes atomic transaction of ERC1155 when token ID is known
     * i.e. secondary sale
     */
    function executeAtomic(
        address payable marketplaceAddress,
        bytes calldata marketplaceData,
        uint256 value,
        address buyer,
        address tokenAddress,
        uint256 tokenId,
        uint256 quantity,
        address erc20Address
    ) external onlyWhitelistedCaller {
        approveCurrencySpending(erc20Address, marketplaceAddress, value);
        _callMarketplace(marketplaceAddress, marketplaceData, 0);
        _transferErc1155Token(buyer, tokenAddress, tokenId, quantity);
    }

    /**
     * @notice Approves ERC20 spending by spender and executes atomic transaction of ERC1155 when token ID is known
     * i.e. secondary sale
     */
    function executeAtomic(
        address payable marketplaceAddress,
        bytes calldata marketplaceData,
        uint256 value,
        address buyer,
        address tokenAddress,
        uint256 tokenId,
        uint256 quantity,
        address erc20Address,
        address erc20Spender
    ) external onlyWhitelistedCaller {
        approveCurrencySpending(erc20Address, erc20Spender, value);
        _callMarketplace(marketplaceAddress, marketplaceData, 0);
        _transferErc1155Token(buyer, tokenAddress, tokenId, quantity);
    }

    /**
     * @notice Executes atomic transaction of batch ERC1155 when token ID is known i.e. secondary sale
     */
    function executeAtomic(
        address payable marketplaceAddress,
        bytes calldata marketplaceData,
        uint256 value,
        address buyer,
        address tokenAddress,
        uint256[] calldata tokenIds,
        uint256[] calldata quantities
    ) external onlyWhitelistedCaller {
        _callMarketplace(marketplaceAddress, marketplaceData, value);
        _batchTransferErc1155Token(buyer, tokenAddress, tokenIds, quantities);
    }

    /**
     * @notice Approves ERC20 spending and executes atomic transaction of batch ERC1155 when token ID is known
     * i.e. secondary sale
     */
    function executeAtomic(
        address payable marketplaceAddress,
        bytes calldata marketplaceData,
        uint256 value,
        address buyer,
        address tokenAddress,
        uint256[] calldata tokenIds,
        uint256[] calldata quantities,
        address erc20Address
    ) external onlyWhitelistedCaller {
        approveCurrencySpending(erc20Address, marketplaceAddress, value);
        _callMarketplace(marketplaceAddress, marketplaceData, 0);
        _batchTransferErc1155Token(buyer, tokenAddress, tokenIds, quantities);
    }

    /**
     * @notice Approves ERC20 spending by spender and executes atomic
     * transaction of batch ERC1155 when token ID is known i.e. secondary sale
     */
    function executeAtomic(
        address payable marketplaceAddress,
        bytes calldata marketplaceData,
        uint256 value,
        address buyer,
        address tokenAddress,
        uint256[] calldata tokenIds,
        uint256[] calldata quantities,
        address erc20Address,
        address erc20SpenderAddress
    ) external onlyWhitelistedCaller {
        approveCurrencySpending(erc20Address, erc20SpenderAddress, value);
        _callMarketplace(marketplaceAddress, marketplaceData, 0);
        _batchTransferErc1155Token(buyer, tokenAddress, tokenIds, quantities);
    }

    /**
     * @notice Executes custom atomic transactions that won't work with executeAtomic
     * @dev Uses onERC721Received / onERC1155Received / onERC1155BatchReceived to transfer tokens
     */
    function executeCustomAtomic(
        ExternalCall[] calldata calls,
        address buyer,
        uint256 quantity,
        bool isErc721
    ) external onlyWhitelistedCaller primarySale(buyer, quantity, isErc721) {
        executeCustomAtomic(calls);
    }

    /**
     * @notice Executes custom atomic transactions that won't work with executeAtomic
     */
    function executeCustomAtomic(
        ExternalCall[] calldata calls
    ) public onlyWhitelistedCaller {
        uint256 callsCount = calls.length;

        for (uint256 i; i < callsCount; ) {
            _callMarketplace(
                calls[i].contractAddress,
                calls[i].data,
                calls[i].value
            );

            unchecked {
                ++i;
            }
        }
    }

    function _callMarketplace(
        address payable contractAddress,
        bytes calldata data,
        uint256 value
    ) private {
        (bool success, bytes memory returnData) = contractAddress.call{
            value: value
        }(data);

        if (!success) {
            revert MarketplaceCallFailed(_getRevertMsg(returnData));
        }
    }
}

File 2 of 15 : TokenHandler.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.17;

import "@openzeppelin/contracts/token/ERC1155/utils/ERC1155Receiver.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol";
import "@openzeppelin/contracts/proxy/utils/Initializable.sol";
import "./DeliveryHandler.sol";

contract TokenHandler is
    DeliveryHandler,
    ERC1155Receiver,
    IERC721Receiver,
    Initializable
{
    // deprecated
    struct PrimaryErc721 {
        address tokenAddress;
        uint256 tokenId;
    }

    struct PrimaryErc1155 {
        address tokenAddress;
        uint256 tokenId;
        uint256 quantity;
    }

    struct PrimaryErc1155Batch {
        address tokenAddress;
        uint256[] tokenIds;
        uint256[] quantities;
    }

    // non-zero uint256 are cheaper than booleans
    uint256 private constant _SALE_TYPE_PRIMARY = 1;

    uint256 private constant _SALE_TYPE_SECONDARY = 2;

    uint256 private constant _ERC_1155_SINGLE = 1;

    uint256 private constant _ERC_1155_BATCH = 2;

    uint256 private constant _PRIMARY_ERC721_IDS_INITIAL_SIZE = 100;

    // deprecated
    address private _unknownTokenRecipient;

    // deprecated
    PrimaryErc721[] private _primaryErc721s;

    PrimaryErc1155 private _primaryErc1155;

    PrimaryErc1155Batch private _primaryErc1155Batch;

    uint256 private _saleType;

    address private _primaryErc721Address;

    uint256[] private _primaryErc721Ids;

    uint256 private _primaryErc721RemainingQuantity;

    /// @custom:oz-renamed-from _isPrimaryBatch
    uint256 private _transferMode;

    uint256[36] private __gap_token_handler;

    // constructor
    function __TokenHandler_init() internal onlyInitializing {
        // initializing first 100 ERC721 token IDs with arbitrary values
        for (uint256 i; i < _PRIMARY_ERC721_IDS_INITIAL_SIZE; ) {
            _primaryErc721Ids.push(42);
            unchecked {
                ++i;
            }
        }
        // 1 is the default value for the remaining quantity, it's cheaper than 0
        _primaryErc721RemainingQuantity = 1;
        // secondary sale type has no side effects in onERC721Received / onERC1155Received / onERC1155BatchReceived
        _saleType = _SALE_TYPE_SECONDARY;
    }

    /**
     * @notice This modifier must be applied to every primary execute atomic function
     */
    modifier primarySale(
        address buyer,
        uint256 quantity,
        bool isErc721
    ) {
        // sets _saleType to _SALE_TYPE_PRIMARY
        // sets _primaryErc721RemainingQuantity to quantity
        _startReceivingPrimaryTokens(quantity, isErc721);
        _;
        _completePrimary(buyer, quantity, isErc721);
    }

    /**
     * @notice Handle the receipt of an NFT
     * @dev This function handles ERC721 token transfer during the primary flow when minted token ID is unknown.
     * The ERC721 smart contract calls this function on the recipient
     * after a `transfer`. This function MAY throw to revert and reject the
     * transfer. Return of other than the magic value MUST result in the
     * transaction being reverted.
     * Note: the contract address is always the message sender.
     * @param tokenId The NFT identifier which is being transferred
     * @return `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))`
     */
    function onERC721Received(
        address,
        address,
        uint256 tokenId,
        bytes calldata
    ) external returns (bytes4) {
        if (_isPrimary()) {
            // this function calls _stopReceivingPrimaryTokens at the end
            // all subsequent calls will simply return the magic value
            _onERC721ReceivedPrimary(tokenId);
        }

        // secondary flow
        return this.onERC721Received.selector;
    }

    /**
     * @notice Handle the receipt of a single ERC1155 token type.
     * @dev This function handles ERC1155 token transfer during the primary flow when minted token ID is unknown.
     * An ERC1155-compliant smart contract MUST call this function on the token recipient contract,
     * at the end of a `safeTransferFrom` after the balance has been updated.
     * This function MUST return `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))`
     * (i.e. 0xf23a6e61) if it accepts the transfer.
     * This function MUST revert if it rejects the transfer.
     * Return of any other value than the prescribed keccak256 generated value
     * MUST result in the transaction being reverted by the caller.
     * @param tokenId The ID of the token being transferred
     * @param quantity The amount of tokens being transferred
     * @return `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))`
     */
    function onERC1155Received(
        address,
        address,
        uint256 tokenId,
        uint256 quantity,
        bytes calldata
    ) external returns (bytes4) {
        if (_isPrimary()) {
            if (_transferMode != _ERC_1155_SINGLE) {
                _transferMode = _ERC_1155_SINGLE;
            }
            _primaryErc1155.tokenAddress = msg.sender;
            _primaryErc1155.tokenId = tokenId;
            _primaryErc1155.quantity = quantity;
            // all subsequent calls will simply return the magic value
            _stopReceivingPrimaryTokens();
        }

        // secondary flow
        return this.onERC1155Received.selector;
    }

    /**
     * @notice Handle the receipt of multiple ERC1155 token types.
     * @dev This function handles ERC1155 batch token transfer during the primary flow when minted token ID is unknown.
     * An ERC1155-compliant smart contract MUST call this function on the token recipient contract,
     * at the end of a `safeBatchTransferFrom` after the balances have been updated.
     * This function MUST return
     * `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))`
     * (i.e. 0xbc197c81) if it accepts the transfer(s).
     * This function MUST revert if it rejects the transfer(s).
     * Return of any other value than the prescribed keccak256 generated value
     * MUST result in the transaction being reverted by the caller.
     * @param tokenIds An array containing ids of each token being transferred
     * (order and length must match _values array)
     * @param quantities An array containing amounts of each token being transferred
     * (order and length must match _ids array)
     * @return `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))`
     */
    function onERC1155BatchReceived(
        address,
        address,
        uint256[] calldata tokenIds,
        uint256[] calldata quantities,
        bytes calldata
    ) external returns (bytes4) {
        if (_isPrimary()) {
            if (_transferMode != _ERC_1155_BATCH) {
                _transferMode = _ERC_1155_BATCH;
            }
            _primaryErc1155Batch.tokenAddress = msg.sender;
            _primaryErc1155Batch.tokenIds = tokenIds;
            _primaryErc1155Batch.quantities = quantities;
            // all subsequent calls will simply return the magic value
            _stopReceivingPrimaryTokens();
        }

        // secondary flow
        return this.onERC1155BatchReceived.selector;
    }

    function _completePrimary(
        address buyer,
        uint256 expectedQuantity,
        bool isErc721
    ) private {
        if (isErc721) {
            return _completePrimaryErc721(buyer, expectedQuantity);
        }

        if (_transferMode == _ERC_1155_SINGLE) {
            return _completePrimaryErc1155(buyer, expectedQuantity);
        }

        return _completePrimaryErc1155Batch(buyer, expectedQuantity);
    }

    function _completePrimaryErc721(
        address buyer,
        uint256 expectedQuantity
    ) private {
        // _primaryErc721RemainingQuantity is always expected to be 1 at the end of the primary flow
        _validateTokensReceived(_primaryErc721RemainingQuantity, 1);
        // cache token address
        address tokenAddress = _primaryErc721Address;

        for (uint256 i; i < expectedQuantity; ) {
            _transferErc721Token(buyer, tokenAddress, _primaryErc721Ids[i]);

            unchecked {
                ++i;
            }
        }
    }

    function _completePrimaryErc1155(
        address buyer,
        uint256 expectedQuantity
    ) private {
        uint256 receivedQuantity = _primaryErc1155.quantity;
        _validateTokensReceived(receivedQuantity, expectedQuantity);
        _transferErc1155Token(
            buyer,
            _primaryErc1155.tokenAddress,
            _primaryErc1155.tokenId,
            receivedQuantity
        );
    }

    function _completePrimaryErc1155Batch(
        address buyer,
        uint256 expectedQuantity
    ) private {
        uint256[] memory tokenIds = _primaryErc1155Batch.tokenIds;
        uint256[] memory quantities = _primaryErc1155Batch.quantities;

        uint256 tokenCount = quantities.length;
        uint256 receivedQuantity;
        // calculate the total quantity received
        for (uint256 i; i < tokenCount; ) {
            unchecked {
                receivedQuantity += quantities[i];
                ++i;
            }
        }

        _validateTokensReceived(receivedQuantity, expectedQuantity);
        _batchTransferErc1155Token(
            buyer,
            _primaryErc1155Batch.tokenAddress,
            tokenIds,
            quantities
        );
    }

    function _startReceivingPrimaryTokens(
        uint256 quantity,
        bool isErc721
    ) private {
        _saleType = _SALE_TYPE_PRIMARY;
        // we need to keep track of the number of tokens received for multi ERC721 mints
        // _primaryErc721RemainingQuantity is already equal to 1 (default value)
        if (isErc721 && quantity > 1) {
            _primaryErc721RemainingQuantity = quantity;
        }
    }

    function _stopReceivingPrimaryTokens() private {
        _saleType = _SALE_TYPE_SECONDARY;
    }

    function _onERC721ReceivedPrimary(uint256 tokenId) private {
        // cache the value of _primaryErc721RemainingQuantity
        uint256 primaryErc721RemainingQuantity = _primaryErc721RemainingQuantity;
        // when primaryErc721RemainingQuantity is 1, it means that the last token is being received
        if (primaryErc721RemainingQuantity == 1) {
            _primaryErc721Address = msg.sender;
            // write the tokenId to the first index, it has to be initialised
            _primaryErc721Ids[0] = tokenId;
            return _stopReceivingPrimaryTokens();
        }

        uint256 index;
        unchecked {
            // when primaryErc721RemainingQuantity is 2, it means that the second last token is being received
            // i.e. it can be written to _primaryErc721TokenIds[1] so we need to decrement the value
            index = primaryErc721RemainingQuantity - 1;
            // decrement the remaining quantity
            --_primaryErc721RemainingQuantity;
        }

        // extend the array if required and fill it with the tokenId
        if (_PRIMARY_ERC721_IDS_INITIAL_SIZE < primaryErc721RemainingQuantity) {
            uint256 currentTokenIdsSize = _primaryErc721Ids.length;

            if (currentTokenIdsSize < primaryErc721RemainingQuantity) {
                return
                    _extendPrimaryErc721TokenIds(
                        currentTokenIdsSize,
                        primaryErc721RemainingQuantity,
                        tokenId
                    );
            }
        }

        // otherwise just write the tokenId to the primaryErc721RemainingQuantity index
        _primaryErc721Ids[index] = tokenId;
    }

    function _extendPrimaryErc721TokenIds(
        uint256 currentSize,
        uint256 requiredSize,
        uint256 tokenId
    ) private {
        uint256 delta;
        unchecked {
            delta = requiredSize - currentSize;
        }

        for (uint256 i; i < delta; ) {
            _primaryErc721Ids.push(tokenId);
            unchecked {
                ++i;
            }
        }
    }

    function _isPrimary() private view returns (bool) {
        return _saleType == _SALE_TYPE_PRIMARY;
    }

    function _validateTokensReceived(
        uint256 receivedQuantity,
        uint256 expectedQuantity
    ) private view {
        // if it's still primary then none of onERC721Received / onERC1155Received / onERC1155BatchReceived was called
        // and _saleType was not reset properly i.e. it's not _SALE_TYPE_SECONDARY
        if (_isPrimary() || receivedQuantity != expectedQuantity) {
            revert TokenNotReceivedByBuyer(0);
        }
    }
}

File 3 of 15 : Utils.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.17;

import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/proxy/utils/Initializable.sol";
import "./Access.sol";

contract Utils is Access {
    uint256[48] private __gap_utils;

    error CallFailed(string reason);

    // constructor
    // This initializer will not be called again when the contract is upgraded
    function __Utils_init(
        address[] memory whitelistedCallers
    ) internal onlyInitializing {
        __Access_init(whitelistedCallers);
    }

    /**
     * @notice Allows to call any contract with any data
     * @param to The address of the contract to call
     * @param value The amount of ether to send
     * @param data The data to send
     */
    function callAny(
        address payable to,
        uint256 value,
        bytes calldata data
    ) external payable onlyWhitelistedCaller returns (bytes memory) {
        if (to == address(0)) {
            revert NullAddressCheckFailed();
        }

        (bool success, bytes memory result) = to.call{value: value}(data);

        if (!success) {
            revert CallFailed(_getRevertMsg(result));
        }

        return result;
    }

    function approveCurrencySpending(
        address erc20Address,
        address marketplaceAddress,
        uint256 amount
    ) public onlyWhitelistedCaller returns (bool) {
        IERC20 erc20Contract = IERC20(erc20Address);
        return erc20Contract.approve(marketplaceAddress, amount);
    }

    function withdrawErc20(
        address erc20Address,
        address to,
        uint256 amount
    ) external onlyWhitelistedCaller returns (bool) {
        IERC20 erc20Contract = IERC20(erc20Address);
        return erc20Contract.transfer(to, amount);
    }

    function _getRevertMsg(
        bytes memory _returnData
    ) internal pure returns (string memory) {
        // If the _returnData length is less than 68, then the transaction failed silently (without a revert message)
        if (_returnData.length < 68) return "Transaction reverted silently";

        assembly {
            // Slice the sighash.
            _returnData := add(_returnData, 0x04)
        }
        return abi.decode(_returnData, (string)); // All that remains is the revert string
    }
}

File 4 of 15 : Access.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.17;

import "@openzeppelin/contracts/proxy/utils/Initializable.sol";

contract Access is Initializable {
    mapping(address => bool) private _whitelistedCallers;

    uint256[48] private __gap_access;

    event WhitelistedCallerAdded(address callerAddress);

    event WhitelistedCallerRemoved(address callerAddress);

    error CallerNotWhitelisted();

    error NullAddressCheckFailed();

    // constructor
    // This initializer will not be called again when the contract is upgraded
    function __Access_init(
        address[] memory callerAddresses
    ) internal onlyInitializing {
        uint256 callerCount = callerAddresses.length;

        for (uint256 i; i < callerCount; ) {
            if (callerAddresses[i] == address(0)) {
                revert NullAddressCheckFailed();
            }

            _whitelistedCallers[callerAddresses[i]] = true;
            emit WhitelistedCallerAdded(callerAddresses[i]);

            unchecked {
                ++i;
            }
        }
    }

    modifier onlyWhitelistedCaller() {
        if (!_whitelistedCallers[msg.sender]) {
            revert CallerNotWhitelisted();
        }

        _;
    }

    function whitelistCallerAddress(
        address callerAddress
    ) external onlyWhitelistedCaller {
        _whitelistedCallers[callerAddress] = true;
        emit WhitelistedCallerAdded(callerAddress);
    }

    function removeFromCallerWhitelist(
        address callerAddress
    ) external onlyWhitelistedCaller {
        delete _whitelistedCallers[callerAddress];
        emit WhitelistedCallerRemoved(callerAddress);
    }
}

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

pragma solidity ^0.8.2;

import "../../utils/Address.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) || (!Address.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;
    }
}

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

File 7 of 15 : DeliveryHandler.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.17;

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

contract DeliveryHandler {
    uint256[48] private __gap_delivery_handler;

    error TokenNotReceivedByBuyer(uint256 tokenId);

    function _transferErc721Token(
        address to,
        address tokenAddress,
        uint256 tokenId
    ) internal {
        IERC721 erc721Contract = IERC721(tokenAddress);

        erc721Contract.safeTransferFrom(address(this), to, tokenId);

        if (to != erc721Contract.ownerOf(tokenId)) {
            revert TokenNotReceivedByBuyer(tokenId);
        }
    }

    function _transferErc1155Token(
        address to,
        address tokenAddress,
        uint256 tokenId,
        uint256 quantity
    ) internal {
        IERC1155 erc1155Contract = IERC1155(tokenAddress);

        uint256 startingBalance = erc1155Contract.balanceOf(to, tokenId);

        erc1155Contract.safeTransferFrom(
            address(this),
            to,
            tokenId,
            quantity,
            ""
        );

        uint256 newBalance = erc1155Contract.balanceOf(to, tokenId);

        if (newBalance != startingBalance + quantity) {
            revert TokenNotReceivedByBuyer(tokenId);
        }
    }

    function _batchTransferErc1155Token(
        address to,
        address tokenAddress,
        uint256[] memory tokenIds,
        uint256[] memory quantities
    ) internal {
        IERC1155 erc1155Contract = IERC1155(tokenAddress);

        uint256 tokenCount = tokenIds.length;
        // We need this array cuz we need to pass array to balanceOfBatch method
        address[] memory recipients = new address[](tokenCount);

        for (uint256 i; i < tokenCount; ) {
            recipients[i] = to;
            unchecked {
                ++i;
            }
        }

        uint256[] memory startingBalances = erc1155Contract.balanceOfBatch(
            recipients,
            tokenIds
        );

        erc1155Contract.safeBatchTransferFrom(
            address(this),
            to,
            tokenIds,
            quantities,
            ""
        );

        uint256[] memory newBalances = erc1155Contract.balanceOfBatch(
            recipients,
            tokenIds
        );

        for (uint256 i; i < tokenCount; ) {
            if (newBalances[i] != startingBalances[i] + quantities[i]) {
                revert TokenNotReceivedByBuyer(tokenIds[i]);
            }

            unchecked {
                ++i;
            }
        }
    }
}

File 8 of 15 : IERC721Receiver.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721Receiver.sol)

pragma solidity ^0.8.0;

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

File 9 of 15 : ERC1155Receiver.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC1155/utils/ERC1155Receiver.sol)

pragma solidity ^0.8.0;

import "../IERC1155Receiver.sol";
import "../../../utils/introspection/ERC165.sol";

/**
 * @dev _Available since v3.1._
 */
abstract contract ERC1155Receiver is ERC165, IERC1155Receiver {
    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {
        return interfaceId == type(IERC1155Receiver).interfaceId || super.supportsInterface(interfaceId);
    }
}

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

pragma solidity ^0.8.1;

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

        return account.code.length > 0;
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

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

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

pragma solidity ^0.8.0;

import "./IERC165.sol";

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

File 14 of 15 : IERC1155Receiver.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC1155/IERC1155Receiver.sol)

pragma solidity ^0.8.0;

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

/**
 * @dev _Available since v3.1._
 */
interface IERC1155Receiver is IERC165 {
    /**
     * @dev Handles the receipt of a single ERC1155 token type. This function is
     * called at the end of a `safeTransferFrom` after the balance has been updated.
     *
     * NOTE: To accept the transfer, this must return
     * `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))`
     * (i.e. 0xf23a6e61, or its own function selector).
     *
     * @param operator The address which initiated the transfer (i.e. msg.sender)
     * @param from The address which previously owned the token
     * @param id The ID of the token being transferred
     * @param value The amount of tokens being transferred
     * @param data Additional data with no specified format
     * @return `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))` if transfer is allowed
     */
    function onERC1155Received(
        address operator,
        address from,
        uint256 id,
        uint256 value,
        bytes calldata data
    ) external returns (bytes4);

    /**
     * @dev Handles the receipt of a multiple ERC1155 token types. This function
     * is called at the end of a `safeBatchTransferFrom` after the balances have
     * been updated.
     *
     * NOTE: To accept the transfer(s), this must return
     * `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))`
     * (i.e. 0xbc197c81, or its own function selector).
     *
     * @param operator The address which initiated the batch transfer (i.e. msg.sender)
     * @param from The address which previously owned the token
     * @param ids An array containing ids of each token being transferred (order and length must match values array)
     * @param values An array containing amounts of each token being transferred (order and length must match ids array)
     * @param data Additional data with no specified format
     * @return `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))` if transfer is allowed
     */
    function onERC1155BatchReceived(
        address operator,
        address from,
        uint256[] calldata ids,
        uint256[] calldata values,
        bytes calldata data
    ) external returns (bytes4);
}

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

pragma solidity ^0.8.0;

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

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

Contract Security Audit

Contract ABI

[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"string","name":"reason","type":"string"}],"name":"CallFailed","type":"error"},{"inputs":[],"name":"CallerNotWhitelisted","type":"error"},{"inputs":[{"internalType":"string","name":"reason","type":"string"}],"name":"MarketplaceCallFailed","type":"error"},{"inputs":[],"name":"NullAddressCheckFailed","type":"error"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"TokenNotReceivedByBuyer","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint8","name":"version","type":"uint8"}],"name":"Initialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"callerAddress","type":"address"}],"name":"WhitelistedCallerAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"callerAddress","type":"address"}],"name":"WhitelistedCallerRemoved","type":"event"},{"inputs":[{"internalType":"address","name":"erc20Address","type":"address"},{"internalType":"address","name":"marketplaceAddress","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approveCurrencySpending","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"callAny","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address payable","name":"marketplaceAddress","type":"address"},{"internalType":"bytes","name":"marketplaceData","type":"bytes"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"address","name":"buyer","type":"address"},{"internalType":"address","name":"tokenAddress","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"address","name":"erc20Address","type":"address"},{"internalType":"address","name":"erc20Spender","type":"address"}],"name":"executeAtomic","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable","name":"marketplaceAddress","type":"address"},{"internalType":"bytes","name":"marketplaceData","type":"bytes"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"address","name":"buyer","type":"address"},{"internalType":"address","name":"tokenAddress","type":"address"},{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"},{"internalType":"uint256[]","name":"quantities","type":"uint256[]"},{"internalType":"address","name":"erc20Address","type":"address"},{"internalType":"address","name":"erc20SpenderAddress","type":"address"}],"name":"executeAtomic","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable","name":"marketplaceAddress","type":"address"},{"internalType":"bytes","name":"marketplaceData","type":"bytes"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"address","name":"buyer","type":"address"},{"internalType":"address","name":"tokenAddress","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"address","name":"erc20Address","type":"address"}],"name":"executeAtomic","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable","name":"marketplaceAddress","type":"address"},{"internalType":"bytes","name":"marketplaceData","type":"bytes"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"address","name":"buyer","type":"address"},{"internalType":"uint256","name":"quantity","type":"uint256"},{"internalType":"bool","name":"isErc721","type":"bool"}],"name":"executeAtomic","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable","name":"marketplaceAddress","type":"address"},{"internalType":"bytes","name":"marketplaceData","type":"bytes"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"address","name":"buyer","type":"address"},{"internalType":"address","name":"tokenAddress","type":"address"},{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"},{"internalType":"uint256[]","name":"quantities","type":"uint256[]"},{"internalType":"address","name":"erc20Address","type":"address"}],"name":"executeAtomic","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable","name":"marketplaceAddress","type":"address"},{"internalType":"bytes","name":"marketplaceData","type":"bytes"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"address","name":"buyer","type":"address"},{"internalType":"address","name":"tokenAddress","type":"address"},{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"},{"internalType":"uint256[]","name":"quantities","type":"uint256[]"}],"name":"executeAtomic","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable","name":"marketplaceAddress","type":"address"},{"internalType":"bytes","name":"marketplaceData","type":"bytes"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"address","name":"buyer","type":"address"},{"internalType":"address","name":"tokenAddress","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"executeAtomic","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable","name":"marketplaceAddress","type":"address"},{"internalType":"bytes","name":"marketplaceData","type":"bytes"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"address","name":"buyer","type":"address"},{"internalType":"address","name":"tokenAddress","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"quantity","type":"uint256"},{"internalType":"address","name":"erc20Address","type":"address"}],"name":"executeAtomic","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable","name":"marketplaceAddress","type":"address"},{"internalType":"bytes","name":"marketplaceData","type":"bytes"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"address","name":"buyer","type":"address"},{"internalType":"uint256","name":"quantity","type":"uint256"},{"internalType":"bool","name":"isErc721","type":"bool"},{"internalType":"address","name":"erc20Address","type":"address"}],"name":"executeAtomic","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable","name":"marketplaceAddress","type":"address"},{"internalType":"bytes","name":"marketplaceData","type":"bytes"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"address","name":"buyer","type":"address"},{"internalType":"uint256","name":"quantity","type":"uint256"},{"internalType":"bool","name":"isErc721","type":"bool"},{"internalType":"address","name":"erc20Address","type":"address"},{"internalType":"address","name":"erc20Spender","type":"address"}],"name":"executeAtomic","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable","name":"marketplaceAddress","type":"address"},{"internalType":"bytes","name":"marketplaceData","type":"bytes"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"address","name":"buyer","type":"address"},{"internalType":"address","name":"tokenAddress","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"quantity","type":"uint256"},{"internalType":"address","name":"erc20Address","type":"address"},{"internalType":"address","name":"erc20Spender","type":"address"}],"name":"executeAtomic","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable","name":"marketplaceAddress","type":"address"},{"internalType":"bytes","name":"marketplaceData","type":"bytes"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"address","name":"buyer","type":"address"},{"internalType":"address","name":"tokenAddress","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"quantity","type":"uint256"}],"name":"executeAtomic","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"address payable","name":"contractAddress","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"internalType":"struct DirectTransactionAtomicWrapper.ExternalCall[]","name":"calls","type":"tuple[]"}],"name":"executeCustomAtomic","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"address payable","name":"contractAddress","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"internalType":"struct DirectTransactionAtomicWrapper.ExternalCall[]","name":"calls","type":"tuple[]"},{"internalType":"address","name":"buyer","type":"address"},{"internalType":"uint256","name":"quantity","type":"uint256"},{"internalType":"bool","name":"isErc721","type":"bool"}],"name":"executeCustomAtomic","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"whitelistedCallers","type":"address[]"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"},{"internalType":"uint256[]","name":"quantities","type":"uint256[]"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC1155BatchReceived","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"quantity","type":"uint256"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC1155Received","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC721Received","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"reinitialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"callerAddress","type":"address"}],"name":"removeFromCallerWhitelist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"callerAddress","type":"address"}],"name":"whitelistCallerAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"erc20Address","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdrawErc20","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]

60806040523480156200001157600080fd5b506200001c62000022565b620000e3565b603054610100900460ff16156200008f5760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60305460ff90811614620000e1576030805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b6133b580620000f36000396000f3fe60806040526004361061019a5760003560e01c806371f9ddf7116100e1578063c57468091161008a578063e8e8abe211610064578063e8e8abe214610483578063eb80618e146104a3578063f23a6e61146104c3578063fdb7ab4f146104e357600080fd5b8063c574680914610423578063ca4f3a0014610443578063d85187991461046357600080fd5b8063a224cee7116100bb578063a224cee7146103c3578063bc197c81146103e3578063c284430d1461040357600080fd5b806371f9ddf71461036357806388a7765b1461038357806398b0e42e146103a357600080fd5b8063270e10c311610143578063422c74231161011d578063422c74231461030e5780636a5c452a1461032e5780636c2eb3501461034e57600080fd5b8063270e10c3146102ae578063369d6960146102ce57806337db43e7146102ee57600080fd5b806312e6bf6a1161017457806312e6bf6a1461021d578063150b7a021461023d5780631593dee11461028e57600080fd5b806301ffc9a7146101a65780630a8a4b1e146101db5780630daf3b92146101fd57600080fd5b366101a157005b600080fd5b3480156101b257600080fd5b506101c66101c13660046121fd565b610503565b60405190151581526020015b60405180910390f35b3480156101e757600080fd5b506101fb6101f63660046122b4565b61059c565b005b34801561020957600080fd5b506101fb6102183660046123ae565b6105fb565b61023061022b3660046123f0565b6106d9565b6040516101d2919061249c565b34801561024957600080fd5b5061025d6102583660046124af565b610805565b6040517fffffffff0000000000000000000000000000000000000000000000000000000090911681526020016101d2565b34801561029a57600080fd5b506101c66102a9366004612522565b61084c565b3480156102ba57600080fd5b506101fb6102c9366004612563565b610915565b3480156102da57600080fd5b506101fb6102e936600461266b565b6109db565b3480156102fa57600080fd5b506101fb61030936600461271b565b610a39565b34801561031a57600080fd5b506101fb6103293660046127ab565b610a99565b34801561033a57600080fd5b506101c6610349366004612522565b610b5e565b34801561035a57600080fd5b506101fb610bdf565b34801561036f57600080fd5b506101fb61037e366004612895565b610d3e565b34801561038f57600080fd5b506101fb61039e366004612974565b610de9565b3480156103af57600080fd5b506101fb6103be366004612a04565b610e39565b3480156103cf57600080fd5b506101fb6103de366004612aa5565b610ebd565b3480156103ef57600080fd5b5061025d6103fe366004612b44565b611001565b34801561040f57600080fd5b506101fb61041e366004612c03565b6110a0565b34801561042f57600080fd5b506101fb61043e366004612c9e565b6110f5565b34801561044f57600080fd5b506101fb61045e366004612d2f565b611156565b34801561046f57600080fd5b506101fb61047e366004612a04565b6111b7565b34801561048f57600080fd5b506101fb61049e366004612dc3565b611238565b3480156104af57600080fd5b506101fb6104be366004612e83565b61128d565b3480156104cf57600080fd5b5061025d6104de366004612ef7565b6112df565b3480156104ef57600080fd5b506101fb6104fe366004612f73565b61136c565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f4e2312e000000000000000000000000000000000000000000000000000000000148061059657507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b92915050565b3360009081526061602052604090205460ff166105cc57604051638c6e5d7160e01b815260040160405180910390fd5b6105d7828288610b5e565b506105e589898960006113b4565b6105f0858585611462565b505050505050505050565b3360009081526061602052604090205460ff1661062b57604051638c6e5d7160e01b815260040160405180910390fd5b8060005b818110156106d3576106cb84848381811061064c5761064c61300a565b905060200281019061065e9190613039565b61066c906020810190612a04565b85858481811061067e5761067e61300a565b90506020028101906106909190613039565b61069e906040810190613077565b8787868181106106b0576106b061300a565b90506020028101906106c29190613039565b602001356113b4565b60010161062f565b50505050565b3360009081526061602052604090205460609060ff1661070c57604051638c6e5d7160e01b815260040160405180910390fd5b6001600160a01b03851661074c576040517f99e565de00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600080866001600160a01b031686868660405161076a9291906130dc565b60006040518083038185875af1925050503d80600081146107a7576040519150601f19603f3d011682016040523d82523d6000602084013e6107ac565b606091505b5091509150816107fb576107bf816115b5565b6040517fb5e1dc2d0000000000000000000000000000000000000000000000000000000081526004016107f2919061249c565b60405180910390fd5b9695505050505050565b600061081360385460011490565b156108215761082184611614565b507f150b7a020000000000000000000000000000000000000000000000000000000095945050505050565b3360009081526061602052604081205460ff1661087c57604051638c6e5d7160e01b815260040160405180910390fd5b6040517fa9059cbb0000000000000000000000000000000000000000000000000000000081526001600160a01b0384811660048301526024820184905285919082169063a9059cbb906044015b6020604051808303816000875af11580156108e8573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061090c91906130ec565b95945050505050565b3360009081526061602052604090205460ff1661094557604051638c6e5d7160e01b815260040160405180910390fd5b61095082828b610b5e565b5061095e8c8c8c60006113b4565b6109cd888888888080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050604080516020808c0282810182019093528b82529093508b92508a9182918501908490808284376000920191909152506116e992505050565b505050505050505050505050565b3360009081526061602052604090205460ff16610a0b57604051638c6e5d7160e01b815260040160405180910390fd5b610a16818987610b5e565b50610a2488888860006113b4565b610a2f848484611462565b5050505050505050565b3360009081526061602052604090205460ff16610a6957604051638c6e5d7160e01b815260040160405180910390fd5b828282610a7682826119d2565b610a828a8a8a8a6113b4565b610a8d8383836119ef565b50505050505050505050565b3360009081526061602052604090205460ff16610ac957604051638c6e5d7160e01b815260040160405180910390fd5b610ad4818c8a610b5e565b50610ae28b8b8b60006113b4565b610b51878787878080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050604080516020808b0282810182019093528a82529093508a9250899182918501908490808284376000920191909152506116e992505050565b5050505050505050505050565b3360009081526061602052604081205460ff16610b8e57604051638c6e5d7160e01b815260040160405180910390fd5b6040517f095ea7b30000000000000000000000000000000000000000000000000000000081526001600160a01b0384811660048301526024820184905285919082169063095ea7b3906044016108c9565b603054600290610100900460ff16158015610c01575060305460ff8083169116105b610c8d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a656400000000000000000000000000000000000060648201526084016107f2565b603080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00001660ff80841691909117610100179091553360009081526061602052604090205416610cf157604051638c6e5d7160e01b815260040160405180910390fd5b610cf9611a22565b6030805461ff001916905560405160ff821681527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498906020015b60405180910390a150565b3360009081526061602052604090205460ff16610d6e57604051638c6e5d7160e01b815260040160405180910390fd5b610d7a8a8a8a8a6113b4565b610a8d868686868080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050604080516020808a028281018201909352898252909350899250889182918501908490808284376000920191909152506116e992505050565b3360009081526061602052604090205460ff16610e1957604051638c6e5d7160e01b815260040160405180910390fd5b610e25878787876113b4565b610e30838383611462565b50505050505050565b3360009081526061602052604090205460ff16610e6957604051638c6e5d7160e01b815260040160405180910390fd5b6001600160a01b038116600081815260616020908152604091829020805460ff1916600117905590519182527f0296c3485f8ea7cd789274957ec1ed41439d196703a3c9e3cd7185c67c55ac499101610d33565b603054610100900460ff1615808015610edd5750603054600160ff909116105b80610ef75750303b158015610ef7575060305460ff166001145b610f83576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a656400000000000000000000000000000000000060648201526084016107f2565b6030805460ff191660011790558015610fa6576030805461ff0019166101001790555b610faf82611b10565b610fb7611a22565b8015610ffd576030805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050565b600061100f60385460011490565b15611072576002603c5414611024576002603c555b603580547fffffffffffffffffffffffff0000000000000000000000000000000000000000163317905561105a6036888861219d565b506110676037868661219d565b506110726002603855565b507fbc197c810000000000000000000000000000000000000000000000000000000098975050505050505050565b3360009081526061602052604090205460ff166110d057604051638c6e5d7160e01b815260040160405180910390fd5b6110db818a88610b5e565b506110e989898960006113b4565b6105f085858585611bb3565b3360009081526061602052604090205460ff1661112557604051638c6e5d7160e01b815260040160405180910390fd5b83838361113282826119d2565b61113d848c8a610b5e565b5061114b8b8b8b60006113b4565b610b518383836119ef565b3360009081526061602052604090205460ff1661118657604051638c6e5d7160e01b815260040160405180910390fd5b84848461119382826119d2565b61119e85858b610b5e565b506111ac8c8c8c60006113b4565b6109cd8383836119ef565b3360009081526061602052604090205460ff166111e757604051638c6e5d7160e01b815260040160405180910390fd5b6001600160a01b038116600081815260616020908152604091829020805460ff1916905590519182527fef09386a3ded19bf8dde7ecdbe4e65eaa8ec88d2247b4c7bea7a026113a246599101610d33565b3360009081526061602052604090205460ff1661126857604051638c6e5d7160e01b815260040160405180910390fd5b611273828289610b5e565b506112818a8a8a60006113b4565b610a8d86868686611bb3565b3360009081526061602052604090205460ff166112bd57604051638c6e5d7160e01b815260040160405180910390fd5b8282826112ca82826119d2565b6112d488886105fb565b610a2f8383836119ef565b60006112ed60385460011490565b15611340576001603c5414611302576001603c555b603280547fffffffffffffffffffffffff00000000000000000000000000000000000000001633179055603385905560348490556113406002603855565b507ff23a6e61000000000000000000000000000000000000000000000000000000009695505050505050565b3360009081526061602052604090205460ff1661139c57604051638c6e5d7160e01b815260040160405180910390fd5b6113a8888888886113b4565b610a2f84848484611bb3565b600080856001600160a01b03168386866040516113d29291906130dc565b60006040518083038185875af1925050503d806000811461140f576040519150601f19603f3d011682016040523d82523d6000602084013e611414565b606091505b50915091508161145a57611427816115b5565b6040517facfaaa980000000000000000000000000000000000000000000000000000000081526004016107f2919061249c565b505050505050565b6040517f42842e0e0000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b038481166024830152604482018390528391908216906342842e0e90606401600060405180830381600087803b1580156114ce57600080fd5b505af11580156114e2573d6000803e3d6000fd5b50506040517f6352211e000000000000000000000000000000000000000000000000000000008152600481018590526001600160a01b0384169250636352211e9150602401602060405180830381865afa158015611544573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115689190613109565b6001600160a01b0316846001600160a01b0316146106d3576040517f1073c214000000000000000000000000000000000000000000000000000000008152600481018390526024016107f2565b60606044825110156115fa57505060408051808201909152601d81527f5472616e73616374696f6e2072657665727465642073696c656e746c79000000602082015290565b600482019150818060200190518101906105969190613126565b603b54600181900361167657603980547fffffffffffffffffffffffff00000000000000000000000000000000000000001633179055603a80548391906000906116605761166061300a565b600091825260209091200155610ffd6002603855565b603b80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff908101909155810160648211156116c457603a54828110156116c2576106d3818486611dac565b505b82603a82815481106116d8576116d861300a565b600091825260209091200155505050565b8151839060008167ffffffffffffffff81111561170857611708612a21565b604051908082528060200260200182016040528015611731578160200160208202803683370190505b50905060005b8281101561177257878282815181106117525761175261300a565b6001600160a01b0390921660209283029190910190910152600101611737565b506040517f4e1273f40000000000000000000000000000000000000000000000000000000081526000906001600160a01b03851690634e1273f4906117bd9085908a906004016131f5565b600060405180830381865afa1580156117da573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052611802919081019061324b565b6040517f2eb2c2d60000000000000000000000000000000000000000000000000000000081529091506001600160a01b03851690632eb2c2d6906118509030908c908b908b906004016132d1565b600060405180830381600087803b15801561186a57600080fd5b505af115801561187e573d6000803e3d6000fd5b50506040517f4e1273f4000000000000000000000000000000000000000000000000000000008152600092506001600160a01b0387169150634e1273f4906118cc9086908b906004016131f5565b600060405180830381865afa1580156118e9573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052611911919081019061324b565b905060005b84811015610a8d578681815181106119305761193061300a565b602002602001015183828151811061194a5761194a61300a565b602002602001015161195c919061332c565b82828151811061196e5761196e61300a565b6020026020010151146119ca5787818151811061198d5761198d61300a565b60200260200101516040517f1073c2140000000000000000000000000000000000000000000000000000000081526004016107f291815260200190565b600101611916565b60016038558080156119e45750600182115b15610ffd5750603b55565b8015611a04576119ff8383611dfd565b505050565b6001603c5403611a18576119ff8383611e51565b6119ff8383611e7c565b603054610100900460ff16611ab9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e6700000000000000000000000000000000000000000060648201526084016107f2565b60005b6064811015611b0357603a805460018181018355600092909252602a7fa2999d817b6757290b50e8ecf3fa939673403dd35c97de392fdb343b4015ce9e9091015501611abc565b506001603b556002603855565b603054610100900460ff16611ba7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e6700000000000000000000000000000000000000000060648201526084016107f2565b611bb081611f8b565b50565b6040517efdd58e0000000000000000000000000000000000000000000000000000000081526001600160a01b03858116600483015260248201849052849160009183169062fdd58e90604401602060405180830381865afa158015611c1c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c409190613366565b6040517ff242432a0000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b038881166024830152604482018790526064820186905260a06084830152600060a48301529192509083169063f242432a9060c401600060405180830381600087803b158015611cc257600080fd5b505af1158015611cd6573d6000803e3d6000fd5b50506040517efdd58e0000000000000000000000000000000000000000000000000000000081526001600160a01b03898116600483015260248201889052600093508516915062fdd58e90604401602060405180830381865afa158015611d41573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d659190613366565b9050611d71848361332c565b8114610e30576040517f1073c214000000000000000000000000000000000000000000000000000000008152600481018690526024016107f2565b82820360005b81811015611df657603a8054600181810183556000929092527fa2999d817b6757290b50e8ecf3fa939673403dd35c97de392fdb343b4015ce9e0184905501611db2565b5050505050565b611e0a603b546001612152565b6039546001600160a01b031660005b828110156106d357611e498483603a8481548110611e3957611e3961300a565b9060005260206000200154611462565b600101611e19565b603454611e5e8183612152565b6032546033546119ff9185916001600160a01b039091169084611bb3565b60006035600101805480602002602001604051908101604052809291908181526020018280548015611ecd57602002820191906000526020600020905b815481526020019060010190808311611eb9575b5050505050905060006035600201805480602002602001604051908101604052809291908181526020018280548015611f2557602002820191906000526020600020905b815481526020019060010190808311611f11575b505050505090506000815190506000805b82811015611f6757838181518110611f5057611f5061300a565b602002602001015182019150806001019050611f36565b50611f728186612152565b60355461145a9087906001600160a01b031686866116e9565b603054610100900460ff16612022576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e6700000000000000000000000000000000000000000060648201526084016107f2565b805160005b818110156119ff5760006001600160a01b031683828151811061204c5761204c61300a565b60200260200101516001600160a01b031603612094576040517f99e565de00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001606160008584815181106120ac576120ac61300a565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060006101000a81548160ff0219169083151502179055507f0296c3485f8ea7cd789274957ec1ed41439d196703a3c9e3cd7185c67c55ac4983828151811061211e5761211e61300a565b602002602001015160405161214291906001600160a01b0391909116815260200190565b60405180910390a1600101612027565b603854600114806121635750808214155b15610ffd576040517f1073c214000000000000000000000000000000000000000000000000000000008152600060048201526024016107f2565b8280548282559060005260206000209081019282156121d8579160200282015b828111156121d85782358255916020019190600101906121bd565b506121e49291506121e8565b5090565b5b808211156121e457600081556001016121e9565b60006020828403121561220f57600080fd5b81357fffffffff000000000000000000000000000000000000000000000000000000008116811461223f57600080fd5b9392505050565b6001600160a01b0381168114611bb057600080fd5b803561226681612246565b919050565b60008083601f84011261227d57600080fd5b50813567ffffffffffffffff81111561229557600080fd5b6020830191508360208285010111156122ad57600080fd5b9250929050565b60008060008060008060008060006101008a8c0312156122d357600080fd5b89356122de81612246565b985060208a013567ffffffffffffffff8111156122fa57600080fd5b6123068c828d0161226b565b90995097505060408a0135955060608a013561232181612246565b945060808a013561233181612246565b935060a08a0135925060c08a013561234881612246565b915060e08a013561235881612246565b809150509295985092959850929598565b60008083601f84011261237b57600080fd5b50813567ffffffffffffffff81111561239357600080fd5b6020830191508360208260051b85010111156122ad57600080fd5b600080602083850312156123c157600080fd5b823567ffffffffffffffff8111156123d857600080fd5b6123e485828601612369565b90969095509350505050565b6000806000806060858703121561240657600080fd5b843561241181612246565b935060208501359250604085013567ffffffffffffffff81111561243457600080fd5b6124408782880161226b565b95989497509550505050565b60005b8381101561246757818101518382015260200161244f565b50506000910152565b6000815180845261248881602086016020860161244c565b601f01601f19169290920160200192915050565b60208152600061223f6020830184612470565b6000806000806000608086880312156124c757600080fd5b85356124d281612246565b945060208601356124e281612246565b935060408601359250606086013567ffffffffffffffff81111561250557600080fd5b6125118882890161226b565b969995985093965092949392505050565b60008060006060848603121561253757600080fd5b833561254281612246565b9250602084013561255281612246565b929592945050506040919091013590565b6000806000806000806000806000806000806101208d8f03121561258657600080fd5b61258f8d61225b565b9b5067ffffffffffffffff60208e013511156125aa57600080fd5b6125ba8e60208f01358f0161226b565b909b50995060408d013598506125d260608e0161225b565b97506125e060808e0161225b565b965067ffffffffffffffff60a08e013511156125fb57600080fd5b61260b8e60a08f01358f01612369565b909650945067ffffffffffffffff60c08e0135111561262957600080fd5b6126398e60c08f01358f01612369565b909450925061264a60e08e0161225b565b91506126596101008e0161225b565b90509295989b509295989b509295989b565b60008060008060008060008060e0898b03121561268757600080fd5b883561269281612246565b9750602089013567ffffffffffffffff8111156126ae57600080fd5b6126ba8b828c0161226b565b9098509650506040890135945060608901356126d581612246565b935060808901356126e581612246565b925060a0890135915060c08901356126fc81612246565b809150509295985092959890939650565b8015158114611bb057600080fd5b600080600080600080600060c0888a03121561273657600080fd5b873561274181612246565b9650602088013567ffffffffffffffff81111561275d57600080fd5b6127698a828b0161226b565b90975095505060408801359350606088013561278481612246565b92506080880135915060a088013561279b8161270d565b8091505092959891949750929550565b60008060008060008060008060008060006101008c8e0312156127cd57600080fd5b6127d68c61225b565b9a5067ffffffffffffffff8060208e013511156127f257600080fd5b6128028e60208f01358f0161226b565b909b50995060408d0135985061281a60608e0161225b565b975061282860808e0161225b565b96508060a08e0135111561283b57600080fd5b61284b8e60a08f01358f01612369565b909650945060c08d013581101561286157600080fd5b506128728d60c08e01358e01612369565b909350915061288360e08d0161225b565b90509295989b509295989b9093969950565b60008060008060008060008060008060e08b8d0312156128b457600080fd5b8a356128bf81612246565b995060208b013567ffffffffffffffff808211156128dc57600080fd5b6128e88e838f0161226b565b909b50995060408d0135985060608d0135915061290482612246565b81975061291360808e0161225b565b965060a08d013591508082111561292957600080fd5b6129358e838f01612369565b909650945060c08d013591508082111561294e57600080fd5b5061295b8d828e01612369565b915080935050809150509295989b9194979a5092959850565b600080600080600080600060c0888a03121561298f57600080fd5b873561299a81612246565b9650602088013567ffffffffffffffff8111156129b657600080fd5b6129c28a828b0161226b565b9097509550506040880135935060608801356129dd81612246565b925060808801356129ed81612246565b8092505060a0880135905092959891949750929550565b600060208284031215612a1657600080fd5b813561223f81612246565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715612a7957612a79612a21565b604052919050565b600067ffffffffffffffff821115612a9b57612a9b612a21565b5060051b60200190565b60006020808385031215612ab857600080fd5b823567ffffffffffffffff811115612acf57600080fd5b8301601f81018513612ae057600080fd5b8035612af3612aee82612a81565b612a50565b81815260059190911b82018301908381019087831115612b1257600080fd5b928401925b82841015612b39578335612b2a81612246565b82529284019290840190612b17565b979650505050505050565b60008060008060008060008060a0898b031215612b6057600080fd5b8835612b6b81612246565b97506020890135612b7b81612246565b9650604089013567ffffffffffffffff80821115612b9857600080fd5b612ba48c838d01612369565b909850965060608b0135915080821115612bbd57600080fd5b612bc98c838d01612369565b909650945060808b0135915080821115612be257600080fd5b50612bef8b828c0161226b565b999c989b5096995094979396929594505050565b60008060008060008060008060006101008a8c031215612c2257600080fd5b8935612c2d81612246565b985060208a013567ffffffffffffffff811115612c4957600080fd5b612c558c828d0161226b565b90995097505060408a0135955060608a0135612c7081612246565b945060808a0135612c8081612246565b935060a08a0135925060c08a0135915060e08a013561235881612246565b60008060008060008060008060e0898b031215612cba57600080fd5b8835612cc581612246565b9750602089013567ffffffffffffffff811115612ce157600080fd5b612ced8b828c0161226b565b909850965050604089013594506060890135612d0881612246565b93506080890135925060a0890135612d1f8161270d565b915060c08901356126fc81612246565b60008060008060008060008060006101008a8c031215612d4e57600080fd5b8935612d5981612246565b985060208a013567ffffffffffffffff811115612d7557600080fd5b612d818c828d0161226b565b90995097505060408a0135955060608a0135612d9c81612246565b945060808a0135935060a08a0135612db38161270d565b925060c08a013561234881612246565b6000806000806000806000806000806101208b8d031215612de357600080fd5b8a35612dee81612246565b995060208b013567ffffffffffffffff811115612e0a57600080fd5b612e168d828e0161226b565b909a5098505060408b0135965060608b0135612e3181612246565b955060808b0135612e4181612246565b945060a08b0135935060c08b0135925060e08b0135612e5f81612246565b91506101008b0135612e7081612246565b809150509295989b9194979a5092959850565b600080600080600060808688031215612e9b57600080fd5b853567ffffffffffffffff811115612eb257600080fd5b612ebe88828901612369565b9096509450506020860135612ed281612246565b9250604086013591506060860135612ee98161270d565b809150509295509295909350565b60008060008060008060a08789031215612f1057600080fd5b8635612f1b81612246565b95506020870135612f2b81612246565b94506040870135935060608701359250608087013567ffffffffffffffff811115612f5557600080fd5b612f6189828a0161226b565b979a9699509497509295939492505050565b60008060008060008060008060e0898b031215612f8f57600080fd5b8835612f9a81612246565b9750602089013567ffffffffffffffff811115612fb657600080fd5b612fc28b828c0161226b565b909850965050604089013594506060890135612fdd81612246565b93506080890135612fed81612246565b979a969950949793969295929450505060a08201359160c0013590565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600082357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa183360301811261306d57600080fd5b9190910192915050565b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe18436030181126130ac57600080fd5b83018035915067ffffffffffffffff8211156130c757600080fd5b6020019150368190038213156122ad57600080fd5b8183823760009101908152919050565b6000602082840312156130fe57600080fd5b815161223f8161270d565b60006020828403121561311b57600080fd5b815161223f81612246565b60006020828403121561313857600080fd5b815167ffffffffffffffff8082111561315057600080fd5b818401915084601f83011261316457600080fd5b81518181111561317657613176612a21565b6131896020601f19601f84011601612a50565b91508082528560208285010111156131a057600080fd5b6131b181602084016020860161244c565b50949350505050565b600081518084526020808501945080840160005b838110156131ea578151875295820195908201906001016131ce565b509495945050505050565b604080825283519082018190526000906020906060840190828701845b828110156132375781516001600160a01b031684529284019290840190600101613212565b505050838103828501526107fb81866131ba565b6000602080838503121561325e57600080fd5b825167ffffffffffffffff81111561327557600080fd5b8301601f8101851361328657600080fd5b8051613294612aee82612a81565b81815260059190911b820183019083810190878311156132b357600080fd5b928401925b82841015612b39578351825292840192908401906132b8565b60006001600160a01b03808716835280861660208401525060a060408301526132fd60a08301856131ba565b828103606084015261330f81856131ba565b838103608090940193909352505060008152602001949350505050565b80820180821115610596577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60006020828403121561337857600080fd5b505191905056fea2646970667358221220f351a5252deb0c1f57366c2971377beb0689306f296b0f5809b6c22d3bb3a82964736f6c63430008110033

Deployed Bytecode

0x60806040526004361061019a5760003560e01c806371f9ddf7116100e1578063c57468091161008a578063e8e8abe211610064578063e8e8abe214610483578063eb80618e146104a3578063f23a6e61146104c3578063fdb7ab4f146104e357600080fd5b8063c574680914610423578063ca4f3a0014610443578063d85187991461046357600080fd5b8063a224cee7116100bb578063a224cee7146103c3578063bc197c81146103e3578063c284430d1461040357600080fd5b806371f9ddf71461036357806388a7765b1461038357806398b0e42e146103a357600080fd5b8063270e10c311610143578063422c74231161011d578063422c74231461030e5780636a5c452a1461032e5780636c2eb3501461034e57600080fd5b8063270e10c3146102ae578063369d6960146102ce57806337db43e7146102ee57600080fd5b806312e6bf6a1161017457806312e6bf6a1461021d578063150b7a021461023d5780631593dee11461028e57600080fd5b806301ffc9a7146101a65780630a8a4b1e146101db5780630daf3b92146101fd57600080fd5b366101a157005b600080fd5b3480156101b257600080fd5b506101c66101c13660046121fd565b610503565b60405190151581526020015b60405180910390f35b3480156101e757600080fd5b506101fb6101f63660046122b4565b61059c565b005b34801561020957600080fd5b506101fb6102183660046123ae565b6105fb565b61023061022b3660046123f0565b6106d9565b6040516101d2919061249c565b34801561024957600080fd5b5061025d6102583660046124af565b610805565b6040517fffffffff0000000000000000000000000000000000000000000000000000000090911681526020016101d2565b34801561029a57600080fd5b506101c66102a9366004612522565b61084c565b3480156102ba57600080fd5b506101fb6102c9366004612563565b610915565b3480156102da57600080fd5b506101fb6102e936600461266b565b6109db565b3480156102fa57600080fd5b506101fb61030936600461271b565b610a39565b34801561031a57600080fd5b506101fb6103293660046127ab565b610a99565b34801561033a57600080fd5b506101c6610349366004612522565b610b5e565b34801561035a57600080fd5b506101fb610bdf565b34801561036f57600080fd5b506101fb61037e366004612895565b610d3e565b34801561038f57600080fd5b506101fb61039e366004612974565b610de9565b3480156103af57600080fd5b506101fb6103be366004612a04565b610e39565b3480156103cf57600080fd5b506101fb6103de366004612aa5565b610ebd565b3480156103ef57600080fd5b5061025d6103fe366004612b44565b611001565b34801561040f57600080fd5b506101fb61041e366004612c03565b6110a0565b34801561042f57600080fd5b506101fb61043e366004612c9e565b6110f5565b34801561044f57600080fd5b506101fb61045e366004612d2f565b611156565b34801561046f57600080fd5b506101fb61047e366004612a04565b6111b7565b34801561048f57600080fd5b506101fb61049e366004612dc3565b611238565b3480156104af57600080fd5b506101fb6104be366004612e83565b61128d565b3480156104cf57600080fd5b5061025d6104de366004612ef7565b6112df565b3480156104ef57600080fd5b506101fb6104fe366004612f73565b61136c565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f4e2312e000000000000000000000000000000000000000000000000000000000148061059657507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b92915050565b3360009081526061602052604090205460ff166105cc57604051638c6e5d7160e01b815260040160405180910390fd5b6105d7828288610b5e565b506105e589898960006113b4565b6105f0858585611462565b505050505050505050565b3360009081526061602052604090205460ff1661062b57604051638c6e5d7160e01b815260040160405180910390fd5b8060005b818110156106d3576106cb84848381811061064c5761064c61300a565b905060200281019061065e9190613039565b61066c906020810190612a04565b85858481811061067e5761067e61300a565b90506020028101906106909190613039565b61069e906040810190613077565b8787868181106106b0576106b061300a565b90506020028101906106c29190613039565b602001356113b4565b60010161062f565b50505050565b3360009081526061602052604090205460609060ff1661070c57604051638c6e5d7160e01b815260040160405180910390fd5b6001600160a01b03851661074c576040517f99e565de00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600080866001600160a01b031686868660405161076a9291906130dc565b60006040518083038185875af1925050503d80600081146107a7576040519150601f19603f3d011682016040523d82523d6000602084013e6107ac565b606091505b5091509150816107fb576107bf816115b5565b6040517fb5e1dc2d0000000000000000000000000000000000000000000000000000000081526004016107f2919061249c565b60405180910390fd5b9695505050505050565b600061081360385460011490565b156108215761082184611614565b507f150b7a020000000000000000000000000000000000000000000000000000000095945050505050565b3360009081526061602052604081205460ff1661087c57604051638c6e5d7160e01b815260040160405180910390fd5b6040517fa9059cbb0000000000000000000000000000000000000000000000000000000081526001600160a01b0384811660048301526024820184905285919082169063a9059cbb906044015b6020604051808303816000875af11580156108e8573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061090c91906130ec565b95945050505050565b3360009081526061602052604090205460ff1661094557604051638c6e5d7160e01b815260040160405180910390fd5b61095082828b610b5e565b5061095e8c8c8c60006113b4565b6109cd888888888080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050604080516020808c0282810182019093528b82529093508b92508a9182918501908490808284376000920191909152506116e992505050565b505050505050505050505050565b3360009081526061602052604090205460ff16610a0b57604051638c6e5d7160e01b815260040160405180910390fd5b610a16818987610b5e565b50610a2488888860006113b4565b610a2f848484611462565b5050505050505050565b3360009081526061602052604090205460ff16610a6957604051638c6e5d7160e01b815260040160405180910390fd5b828282610a7682826119d2565b610a828a8a8a8a6113b4565b610a8d8383836119ef565b50505050505050505050565b3360009081526061602052604090205460ff16610ac957604051638c6e5d7160e01b815260040160405180910390fd5b610ad4818c8a610b5e565b50610ae28b8b8b60006113b4565b610b51878787878080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050604080516020808b0282810182019093528a82529093508a9250899182918501908490808284376000920191909152506116e992505050565b5050505050505050505050565b3360009081526061602052604081205460ff16610b8e57604051638c6e5d7160e01b815260040160405180910390fd5b6040517f095ea7b30000000000000000000000000000000000000000000000000000000081526001600160a01b0384811660048301526024820184905285919082169063095ea7b3906044016108c9565b603054600290610100900460ff16158015610c01575060305460ff8083169116105b610c8d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a656400000000000000000000000000000000000060648201526084016107f2565b603080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00001660ff80841691909117610100179091553360009081526061602052604090205416610cf157604051638c6e5d7160e01b815260040160405180910390fd5b610cf9611a22565b6030805461ff001916905560405160ff821681527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498906020015b60405180910390a150565b3360009081526061602052604090205460ff16610d6e57604051638c6e5d7160e01b815260040160405180910390fd5b610d7a8a8a8a8a6113b4565b610a8d868686868080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050604080516020808a028281018201909352898252909350899250889182918501908490808284376000920191909152506116e992505050565b3360009081526061602052604090205460ff16610e1957604051638c6e5d7160e01b815260040160405180910390fd5b610e25878787876113b4565b610e30838383611462565b50505050505050565b3360009081526061602052604090205460ff16610e6957604051638c6e5d7160e01b815260040160405180910390fd5b6001600160a01b038116600081815260616020908152604091829020805460ff1916600117905590519182527f0296c3485f8ea7cd789274957ec1ed41439d196703a3c9e3cd7185c67c55ac499101610d33565b603054610100900460ff1615808015610edd5750603054600160ff909116105b80610ef75750303b158015610ef7575060305460ff166001145b610f83576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a656400000000000000000000000000000000000060648201526084016107f2565b6030805460ff191660011790558015610fa6576030805461ff0019166101001790555b610faf82611b10565b610fb7611a22565b8015610ffd576030805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050565b600061100f60385460011490565b15611072576002603c5414611024576002603c555b603580547fffffffffffffffffffffffff0000000000000000000000000000000000000000163317905561105a6036888861219d565b506110676037868661219d565b506110726002603855565b507fbc197c810000000000000000000000000000000000000000000000000000000098975050505050505050565b3360009081526061602052604090205460ff166110d057604051638c6e5d7160e01b815260040160405180910390fd5b6110db818a88610b5e565b506110e989898960006113b4565b6105f085858585611bb3565b3360009081526061602052604090205460ff1661112557604051638c6e5d7160e01b815260040160405180910390fd5b83838361113282826119d2565b61113d848c8a610b5e565b5061114b8b8b8b60006113b4565b610b518383836119ef565b3360009081526061602052604090205460ff1661118657604051638c6e5d7160e01b815260040160405180910390fd5b84848461119382826119d2565b61119e85858b610b5e565b506111ac8c8c8c60006113b4565b6109cd8383836119ef565b3360009081526061602052604090205460ff166111e757604051638c6e5d7160e01b815260040160405180910390fd5b6001600160a01b038116600081815260616020908152604091829020805460ff1916905590519182527fef09386a3ded19bf8dde7ecdbe4e65eaa8ec88d2247b4c7bea7a026113a246599101610d33565b3360009081526061602052604090205460ff1661126857604051638c6e5d7160e01b815260040160405180910390fd5b611273828289610b5e565b506112818a8a8a60006113b4565b610a8d86868686611bb3565b3360009081526061602052604090205460ff166112bd57604051638c6e5d7160e01b815260040160405180910390fd5b8282826112ca82826119d2565b6112d488886105fb565b610a2f8383836119ef565b60006112ed60385460011490565b15611340576001603c5414611302576001603c555b603280547fffffffffffffffffffffffff00000000000000000000000000000000000000001633179055603385905560348490556113406002603855565b507ff23a6e61000000000000000000000000000000000000000000000000000000009695505050505050565b3360009081526061602052604090205460ff1661139c57604051638c6e5d7160e01b815260040160405180910390fd5b6113a8888888886113b4565b610a2f84848484611bb3565b600080856001600160a01b03168386866040516113d29291906130dc565b60006040518083038185875af1925050503d806000811461140f576040519150601f19603f3d011682016040523d82523d6000602084013e611414565b606091505b50915091508161145a57611427816115b5565b6040517facfaaa980000000000000000000000000000000000000000000000000000000081526004016107f2919061249c565b505050505050565b6040517f42842e0e0000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b038481166024830152604482018390528391908216906342842e0e90606401600060405180830381600087803b1580156114ce57600080fd5b505af11580156114e2573d6000803e3d6000fd5b50506040517f6352211e000000000000000000000000000000000000000000000000000000008152600481018590526001600160a01b0384169250636352211e9150602401602060405180830381865afa158015611544573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115689190613109565b6001600160a01b0316846001600160a01b0316146106d3576040517f1073c214000000000000000000000000000000000000000000000000000000008152600481018390526024016107f2565b60606044825110156115fa57505060408051808201909152601d81527f5472616e73616374696f6e2072657665727465642073696c656e746c79000000602082015290565b600482019150818060200190518101906105969190613126565b603b54600181900361167657603980547fffffffffffffffffffffffff00000000000000000000000000000000000000001633179055603a80548391906000906116605761166061300a565b600091825260209091200155610ffd6002603855565b603b80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff908101909155810160648211156116c457603a54828110156116c2576106d3818486611dac565b505b82603a82815481106116d8576116d861300a565b600091825260209091200155505050565b8151839060008167ffffffffffffffff81111561170857611708612a21565b604051908082528060200260200182016040528015611731578160200160208202803683370190505b50905060005b8281101561177257878282815181106117525761175261300a565b6001600160a01b0390921660209283029190910190910152600101611737565b506040517f4e1273f40000000000000000000000000000000000000000000000000000000081526000906001600160a01b03851690634e1273f4906117bd9085908a906004016131f5565b600060405180830381865afa1580156117da573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052611802919081019061324b565b6040517f2eb2c2d60000000000000000000000000000000000000000000000000000000081529091506001600160a01b03851690632eb2c2d6906118509030908c908b908b906004016132d1565b600060405180830381600087803b15801561186a57600080fd5b505af115801561187e573d6000803e3d6000fd5b50506040517f4e1273f4000000000000000000000000000000000000000000000000000000008152600092506001600160a01b0387169150634e1273f4906118cc9086908b906004016131f5565b600060405180830381865afa1580156118e9573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052611911919081019061324b565b905060005b84811015610a8d578681815181106119305761193061300a565b602002602001015183828151811061194a5761194a61300a565b602002602001015161195c919061332c565b82828151811061196e5761196e61300a565b6020026020010151146119ca5787818151811061198d5761198d61300a565b60200260200101516040517f1073c2140000000000000000000000000000000000000000000000000000000081526004016107f291815260200190565b600101611916565b60016038558080156119e45750600182115b15610ffd5750603b55565b8015611a04576119ff8383611dfd565b505050565b6001603c5403611a18576119ff8383611e51565b6119ff8383611e7c565b603054610100900460ff16611ab9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e6700000000000000000000000000000000000000000060648201526084016107f2565b60005b6064811015611b0357603a805460018181018355600092909252602a7fa2999d817b6757290b50e8ecf3fa939673403dd35c97de392fdb343b4015ce9e9091015501611abc565b506001603b556002603855565b603054610100900460ff16611ba7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e6700000000000000000000000000000000000000000060648201526084016107f2565b611bb081611f8b565b50565b6040517efdd58e0000000000000000000000000000000000000000000000000000000081526001600160a01b03858116600483015260248201849052849160009183169062fdd58e90604401602060405180830381865afa158015611c1c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c409190613366565b6040517ff242432a0000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b038881166024830152604482018790526064820186905260a06084830152600060a48301529192509083169063f242432a9060c401600060405180830381600087803b158015611cc257600080fd5b505af1158015611cd6573d6000803e3d6000fd5b50506040517efdd58e0000000000000000000000000000000000000000000000000000000081526001600160a01b03898116600483015260248201889052600093508516915062fdd58e90604401602060405180830381865afa158015611d41573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d659190613366565b9050611d71848361332c565b8114610e30576040517f1073c214000000000000000000000000000000000000000000000000000000008152600481018690526024016107f2565b82820360005b81811015611df657603a8054600181810183556000929092527fa2999d817b6757290b50e8ecf3fa939673403dd35c97de392fdb343b4015ce9e0184905501611db2565b5050505050565b611e0a603b546001612152565b6039546001600160a01b031660005b828110156106d357611e498483603a8481548110611e3957611e3961300a565b9060005260206000200154611462565b600101611e19565b603454611e5e8183612152565b6032546033546119ff9185916001600160a01b039091169084611bb3565b60006035600101805480602002602001604051908101604052809291908181526020018280548015611ecd57602002820191906000526020600020905b815481526020019060010190808311611eb9575b5050505050905060006035600201805480602002602001604051908101604052809291908181526020018280548015611f2557602002820191906000526020600020905b815481526020019060010190808311611f11575b505050505090506000815190506000805b82811015611f6757838181518110611f5057611f5061300a565b602002602001015182019150806001019050611f36565b50611f728186612152565b60355461145a9087906001600160a01b031686866116e9565b603054610100900460ff16612022576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e6700000000000000000000000000000000000000000060648201526084016107f2565b805160005b818110156119ff5760006001600160a01b031683828151811061204c5761204c61300a565b60200260200101516001600160a01b031603612094576040517f99e565de00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001606160008584815181106120ac576120ac61300a565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060006101000a81548160ff0219169083151502179055507f0296c3485f8ea7cd789274957ec1ed41439d196703a3c9e3cd7185c67c55ac4983828151811061211e5761211e61300a565b602002602001015160405161214291906001600160a01b0391909116815260200190565b60405180910390a1600101612027565b603854600114806121635750808214155b15610ffd576040517f1073c214000000000000000000000000000000000000000000000000000000008152600060048201526024016107f2565b8280548282559060005260206000209081019282156121d8579160200282015b828111156121d85782358255916020019190600101906121bd565b506121e49291506121e8565b5090565b5b808211156121e457600081556001016121e9565b60006020828403121561220f57600080fd5b81357fffffffff000000000000000000000000000000000000000000000000000000008116811461223f57600080fd5b9392505050565b6001600160a01b0381168114611bb057600080fd5b803561226681612246565b919050565b60008083601f84011261227d57600080fd5b50813567ffffffffffffffff81111561229557600080fd5b6020830191508360208285010111156122ad57600080fd5b9250929050565b60008060008060008060008060006101008a8c0312156122d357600080fd5b89356122de81612246565b985060208a013567ffffffffffffffff8111156122fa57600080fd5b6123068c828d0161226b565b90995097505060408a0135955060608a013561232181612246565b945060808a013561233181612246565b935060a08a0135925060c08a013561234881612246565b915060e08a013561235881612246565b809150509295985092959850929598565b60008083601f84011261237b57600080fd5b50813567ffffffffffffffff81111561239357600080fd5b6020830191508360208260051b85010111156122ad57600080fd5b600080602083850312156123c157600080fd5b823567ffffffffffffffff8111156123d857600080fd5b6123e485828601612369565b90969095509350505050565b6000806000806060858703121561240657600080fd5b843561241181612246565b935060208501359250604085013567ffffffffffffffff81111561243457600080fd5b6124408782880161226b565b95989497509550505050565b60005b8381101561246757818101518382015260200161244f565b50506000910152565b6000815180845261248881602086016020860161244c565b601f01601f19169290920160200192915050565b60208152600061223f6020830184612470565b6000806000806000608086880312156124c757600080fd5b85356124d281612246565b945060208601356124e281612246565b935060408601359250606086013567ffffffffffffffff81111561250557600080fd5b6125118882890161226b565b969995985093965092949392505050565b60008060006060848603121561253757600080fd5b833561254281612246565b9250602084013561255281612246565b929592945050506040919091013590565b6000806000806000806000806000806000806101208d8f03121561258657600080fd5b61258f8d61225b565b9b5067ffffffffffffffff60208e013511156125aa57600080fd5b6125ba8e60208f01358f0161226b565b909b50995060408d013598506125d260608e0161225b565b97506125e060808e0161225b565b965067ffffffffffffffff60a08e013511156125fb57600080fd5b61260b8e60a08f01358f01612369565b909650945067ffffffffffffffff60c08e0135111561262957600080fd5b6126398e60c08f01358f01612369565b909450925061264a60e08e0161225b565b91506126596101008e0161225b565b90509295989b509295989b509295989b565b60008060008060008060008060e0898b03121561268757600080fd5b883561269281612246565b9750602089013567ffffffffffffffff8111156126ae57600080fd5b6126ba8b828c0161226b565b9098509650506040890135945060608901356126d581612246565b935060808901356126e581612246565b925060a0890135915060c08901356126fc81612246565b809150509295985092959890939650565b8015158114611bb057600080fd5b600080600080600080600060c0888a03121561273657600080fd5b873561274181612246565b9650602088013567ffffffffffffffff81111561275d57600080fd5b6127698a828b0161226b565b90975095505060408801359350606088013561278481612246565b92506080880135915060a088013561279b8161270d565b8091505092959891949750929550565b60008060008060008060008060008060006101008c8e0312156127cd57600080fd5b6127d68c61225b565b9a5067ffffffffffffffff8060208e013511156127f257600080fd5b6128028e60208f01358f0161226b565b909b50995060408d0135985061281a60608e0161225b565b975061282860808e0161225b565b96508060a08e0135111561283b57600080fd5b61284b8e60a08f01358f01612369565b909650945060c08d013581101561286157600080fd5b506128728d60c08e01358e01612369565b909350915061288360e08d0161225b565b90509295989b509295989b9093969950565b60008060008060008060008060008060e08b8d0312156128b457600080fd5b8a356128bf81612246565b995060208b013567ffffffffffffffff808211156128dc57600080fd5b6128e88e838f0161226b565b909b50995060408d0135985060608d0135915061290482612246565b81975061291360808e0161225b565b965060a08d013591508082111561292957600080fd5b6129358e838f01612369565b909650945060c08d013591508082111561294e57600080fd5b5061295b8d828e01612369565b915080935050809150509295989b9194979a5092959850565b600080600080600080600060c0888a03121561298f57600080fd5b873561299a81612246565b9650602088013567ffffffffffffffff8111156129b657600080fd5b6129c28a828b0161226b565b9097509550506040880135935060608801356129dd81612246565b925060808801356129ed81612246565b8092505060a0880135905092959891949750929550565b600060208284031215612a1657600080fd5b813561223f81612246565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715612a7957612a79612a21565b604052919050565b600067ffffffffffffffff821115612a9b57612a9b612a21565b5060051b60200190565b60006020808385031215612ab857600080fd5b823567ffffffffffffffff811115612acf57600080fd5b8301601f81018513612ae057600080fd5b8035612af3612aee82612a81565b612a50565b81815260059190911b82018301908381019087831115612b1257600080fd5b928401925b82841015612b39578335612b2a81612246565b82529284019290840190612b17565b979650505050505050565b60008060008060008060008060a0898b031215612b6057600080fd5b8835612b6b81612246565b97506020890135612b7b81612246565b9650604089013567ffffffffffffffff80821115612b9857600080fd5b612ba48c838d01612369565b909850965060608b0135915080821115612bbd57600080fd5b612bc98c838d01612369565b909650945060808b0135915080821115612be257600080fd5b50612bef8b828c0161226b565b999c989b5096995094979396929594505050565b60008060008060008060008060006101008a8c031215612c2257600080fd5b8935612c2d81612246565b985060208a013567ffffffffffffffff811115612c4957600080fd5b612c558c828d0161226b565b90995097505060408a0135955060608a0135612c7081612246565b945060808a0135612c8081612246565b935060a08a0135925060c08a0135915060e08a013561235881612246565b60008060008060008060008060e0898b031215612cba57600080fd5b8835612cc581612246565b9750602089013567ffffffffffffffff811115612ce157600080fd5b612ced8b828c0161226b565b909850965050604089013594506060890135612d0881612246565b93506080890135925060a0890135612d1f8161270d565b915060c08901356126fc81612246565b60008060008060008060008060006101008a8c031215612d4e57600080fd5b8935612d5981612246565b985060208a013567ffffffffffffffff811115612d7557600080fd5b612d818c828d0161226b565b90995097505060408a0135955060608a0135612d9c81612246565b945060808a0135935060a08a0135612db38161270d565b925060c08a013561234881612246565b6000806000806000806000806000806101208b8d031215612de357600080fd5b8a35612dee81612246565b995060208b013567ffffffffffffffff811115612e0a57600080fd5b612e168d828e0161226b565b909a5098505060408b0135965060608b0135612e3181612246565b955060808b0135612e4181612246565b945060a08b0135935060c08b0135925060e08b0135612e5f81612246565b91506101008b0135612e7081612246565b809150509295989b9194979a5092959850565b600080600080600060808688031215612e9b57600080fd5b853567ffffffffffffffff811115612eb257600080fd5b612ebe88828901612369565b9096509450506020860135612ed281612246565b9250604086013591506060860135612ee98161270d565b809150509295509295909350565b60008060008060008060a08789031215612f1057600080fd5b8635612f1b81612246565b95506020870135612f2b81612246565b94506040870135935060608701359250608087013567ffffffffffffffff811115612f5557600080fd5b612f6189828a0161226b565b979a9699509497509295939492505050565b60008060008060008060008060e0898b031215612f8f57600080fd5b8835612f9a81612246565b9750602089013567ffffffffffffffff811115612fb657600080fd5b612fc28b828c0161226b565b909850965050604089013594506060890135612fdd81612246565b93506080890135612fed81612246565b979a969950949793969295929450505060a08201359160c0013590565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600082357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa183360301811261306d57600080fd5b9190910192915050565b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe18436030181126130ac57600080fd5b83018035915067ffffffffffffffff8211156130c757600080fd5b6020019150368190038213156122ad57600080fd5b8183823760009101908152919050565b6000602082840312156130fe57600080fd5b815161223f8161270d565b60006020828403121561311b57600080fd5b815161223f81612246565b60006020828403121561313857600080fd5b815167ffffffffffffffff8082111561315057600080fd5b818401915084601f83011261316457600080fd5b81518181111561317657613176612a21565b6131896020601f19601f84011601612a50565b91508082528560208285010111156131a057600080fd5b6131b181602084016020860161244c565b50949350505050565b600081518084526020808501945080840160005b838110156131ea578151875295820195908201906001016131ce565b509495945050505050565b604080825283519082018190526000906020906060840190828701845b828110156132375781516001600160a01b031684529284019290840190600101613212565b505050838103828501526107fb81866131ba565b6000602080838503121561325e57600080fd5b825167ffffffffffffffff81111561327557600080fd5b8301601f8101851361328657600080fd5b8051613294612aee82612a81565b81815260059190911b820183019083810190878311156132b357600080fd5b928401925b82841015612b39578351825292840192908401906132b8565b60006001600160a01b03808716835280861660208401525060a060408301526132fd60a08301856131ba565b828103606084015261330f81856131ba565b838103608090940193909352505060008152602001949350505050565b80820180821115610596577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60006020828403121561337857600080fd5b505191905056fea2646970667358221220f351a5252deb0c1f57366c2971377beb0689306f296b0f5809b6c22d3bb3a82964736f6c63430008110033

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

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

Validator Index Block Amount
View All Withdrawals

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

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.