ETH Price: $3,491.36 (-0.34%)
Gas: 3 Gwei

Contract

0x00F1743a87823053b98F8337C6f07004E38E328E
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Token Holdings

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Batch Delist203457262024-07-20 5:42:5924 hrs ago1721454179IN
0x00F1743a...4E38E328E
0 ETH0.000208812.2
Batch Delist202009102024-06-30 0:25:3521 days ago1719707135IN
0x00F1743a...4E38E328E
0 ETH0.000414621.74642174
Batch List199026452024-05-19 7:58:4762 days ago1716105527IN
0x00F1743a...4E38E328E
0 ETH0.000682572.9
Batch List199026372024-05-19 7:57:1162 days ago1716105431IN
0x00F1743a...4E38E328E
0 ETH0.000070382.9
Batch List198268532024-05-08 17:33:3573 days ago1715189615IN
0x00F1743a...4E38E328E
0 ETH0.003454915.5
Batch List194627892024-03-18 16:13:35124 days ago1710778415IN
0x00F1743a...4E38E328E
0 ETH0.0080933738.03903167
Batch Delist194604642024-03-18 8:21:59124 days ago1710750119IN
0x00F1743a...4E38E328E
0 ETH0.0057955923.24486728
Batch Buy194304222024-03-14 2:55:23129 days ago1710384923IN
0x00F1743a...4E38E328E
0.5 ETH0.0062871646.30097596
Batch List192711752024-02-20 20:05:11151 days ago1708459511IN
0x00F1743a...4E38E328E
0 ETH0.0181911746.11993797
Batch Buy192632832024-02-19 17:33:11152 days ago1708363991IN
0x00F1743a...4E38E328E
0.25 ETH0.0066346145.66494337
Batch Buy192383622024-02-16 5:22:59156 days ago1708060979IN
0x00F1743a...4E38E328E
0 ETH0.0026420418.54935368
Batch Buy192262802024-02-14 12:42:35157 days ago1707914555IN
0x00F1743a...4E38E328E
0 ETH0.004725324.74835033
Batch Delist192256422024-02-14 10:33:59157 days ago1707906839IN
0x00F1743a...4E38E328E
0 ETH0.0023396522.19958458
Batch List192256262024-02-14 10:30:47157 days ago1707906647IN
0x00F1743a...4E38E328E
0 ETH0.0276954928.26575362
Batch List192110482024-02-12 9:27:35159 days ago1707730055IN
0x00F1743a...4E38E328E
0 ETH0.0046718220.94442167
Batch List191980692024-02-10 13:41:35161 days ago1707572495IN
0x00F1743a...4E38E328E
0 ETH0.006169727.65816828
Batch Change Pri...191980232024-02-10 13:32:11161 days ago1707571931IN
0x00F1743a...4E38E328E
0 ETH0.0011438230.15861331
Batch List191979922024-02-10 13:25:59161 days ago1707571559IN
0x00F1743a...4E38E328E
0 ETH0.0065386125.89856915
0x60e06040191921842024-02-09 17:54:47162 days ago1707501287IN
 Create: MastodonMarketplace
0 ETH0.26189774.22115981

Latest 6 internal transactions

Advanced mode:
Parent Transaction Hash Block From To
194304222024-03-14 2:55:23129 days ago1710384923
0x00F1743a...4E38E328E
0.0175 ETH
194304222024-03-14 2:55:23129 days ago1710384923
0x00F1743a...4E38E328E
0.0075 ETH
194304222024-03-14 2:55:23129 days ago1710384923
0x00F1743a...4E38E328E
0.475 ETH
192632832024-02-19 17:33:11152 days ago1708363991
0x00F1743a...4E38E328E
0.00875 ETH
192632832024-02-19 17:33:11152 days ago1708363991
0x00F1743a...4E38E328E
0.00375 ETH
192632832024-02-19 17:33:11152 days ago1708363991
0x00F1743a...4E38E328E
0.2375 ETH
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
MastodonMarketplace

Compiler Version
v0.8.24+commit.e11b9ed9

Optimization Enabled:
No with 200 runs

Other Settings:
default evmVersion
File 1 of 18 : MastodonMarketplace.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.21;

import {ERC165Checker} from "@openzeppelin/contracts/utils/introspection/ERC165Checker.sol";
import {ReentrancyGuard} from "@openzeppelin/contracts/utils/ReentrancyGuard.sol";
import {IMastodonMarketplace} from "./IMastodonMarketplace.sol";
import {IERC20} from "@openzeppelin/contracts/interfaces/IERC20.sol";
import {IERC721} from "@openzeppelin/contracts/interfaces/IERC721.sol";
import {IERC1155} from "@openzeppelin/contracts/interfaces/IERC1155.sol";
import {IERC721Receiver} from "@openzeppelin/contracts/interfaces/IERC721Receiver.sol";
import {IERC1155Receiver} from "@openzeppelin/contracts/interfaces/IERC1155Receiver.sol";
import {SafeERC20} from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";

/**
 * @title MastodonMarketplace
 * @dev A decentralized marketplace contract for trading ERC721 and ERC1155 NFTs.
 * Users can list, delist, and buy NFTs using native tokens or specified ERC20 tokens.
 */
contract MastodonMarketplace is
    IMastodonMarketplace,
    IERC721Receiver,
    IERC1155Receiver,
    ReentrancyGuard
{
    using SafeERC20 for IERC20;
    /**
     * @notice The global index representing the unique identifier for NFT listings on the marketplace.
     * @dev It increments with each new listing, providing a unique identifier for tracking and referencing listings.
     */
    uint256 public globalIndex;

    // Constants for fee calculations
    uint16 private constant MAX_BPS = 10000;
    uint16 private constant BURN_FEE_BPS = 350;
    uint8 private constant DEV_FEE_BPS = 150;

    //The ERC20 token contract address for the $XEN token.
    IERC20 public immutable xen;

    //The ERC20 token contract address for the $DXN token.
    IERC20 public immutable dxn;

    //The address of the contract developer.
    address public immutable dev;

    //The address of smart contract designated to BUY & BURN $DXN tokens
    //with $XEN token and native token of blockchain.
    address public dxnBuyBurn;

    /**
     * @dev The pending DXN token burn address.
     * @notice This address is set and updated by the developer before it becomes the active burn address.
     */
    address public pendingDxnBuyBurn;

    /**
     * @dev Flag indicating whether ownership of the DXN token burn functionality is renounced.
     * @notice If true, ownership is not renounced; if false, ownership is renounced.
     */
    bool public isOwned = true;

    /**
     * @dev Constant defining the duration of the time-lock for updates to the DXN token burn address.
     * @notice After setting a pending burn address, a delay of LOCK_DURATION must pass before it becomes active.
     */
    uint256 private constant LOCK_DURATION = 7 days;

    /**
     * @dev The timestamp threshold for updating the DXN token burn address.
     * @notice This threshold determines when the pending burn address becomes the active burn address.
     */
    uint256 public timeThreshold;

    // Mapping to store NFT orders
    mapping(uint256 listIndex => Order order) public orders;

    /**
     * @dev Constructor to initialize the MastodonMarketplace contract.
     * @param _xen The address of the $XEN token contract.
     * @param _dxn The address of the $DXN token contract.
     * @param _dxnBuyBurn The address of smart contract for burning DXN tokens.
     */
    constructor(IERC20 _xen, IERC20 _dxn, address _dxnBuyBurn) {
        require(_dxnBuyBurn != address(0), "Mastodon: zero address is not allowed");

        xen = _xen;
        dxn = _dxn;
        dxnBuyBurn = _dxnBuyBurn;
        dev = msg.sender;
    }

    /**
     * @dev Batch lists multiple NFTs for sale on the marketplace.
     * @param inputOrders An array of InputOrder structures representing the NFTs to be listed.
     */
    function batchList(InputOrder[] calldata inputOrders) external nonReentrant {
        uint256 arrayLength = inputOrders.length;
        for (uint256 i = 0; i < arrayLength; i++) {
            _list(inputOrders[i]);
        }
    }

    /**
     * @dev Batch delists multiple NFTs from the marketplace.
     * @param listIndexes An array of list indexes representing the NFTs to be delisted.
     */
    function batchDelist(uint256[] calldata listIndexes) external nonReentrant {
        uint256 arrayLength = listIndexes.length;
        for (uint256 i = 0; i < arrayLength; i++) {
            _delist(listIndexes[i]);
        }
    }

    /**
     * @dev Batch buys multiple NFTs from the marketplace.
     * @param listIndexes An array of list indexes representing the NFTs to be bought.
     */
    function batchBuy(uint256[] calldata listIndexes) external payable nonReentrant {
        uint256 arrayLength = listIndexes.length;
        for (uint256 i = 0; i < arrayLength; i++) {
            _buy(listIndexes[i]);
        }

        if(address(this).balance > 0){
            (bool success, ) = msg.sender.call{
                value: address(this).balance
            }("");
            require(success, "Mastodon: remaining funds failed");
        }
    }

    /**
     * @dev Batch changing prices and payout tokens for multiple NFTs from the marketplace.
     * @param listIndexes An array of list indexes representing the NFTs for which the prices will be changed.
     * @param newPrices An array of Price structures representing the new prices corresponding to the NFTs.
     */
    function batchChangePrice(uint256[] calldata listIndexes, Price[] calldata newPrices) external nonReentrant {
        require(listIndexes.length == newPrices.length, "Mastodon: length diff");

        uint256 arrayLength = listIndexes.length;
        for (uint256 i = 0; i < arrayLength; i++) {
            _changePrice(listIndexes[i], newPrices[i]);
        }
    }

    /**
     * @dev Sets the pending $DXN token burn address and updates the time threshold.
     * @param _dxnBuyBurn The address for buying and burning DXN tokens.
     */
    function setPendingDxnBuyBurn(address _dxnBuyBurn) external {
        require(isOwned == true, "Mastodon: renounced to ownership");
        require(msg.sender == dev, "Mastodon: not dev");
        require(_dxnBuyBurn != address(0), "Mastodon: zero address is not allowed");

        timeThreshold = block.timestamp + LOCK_DURATION;
        pendingDxnBuyBurn = _dxnBuyBurn;
    }

    /**
     * @dev Accepts the pending $DXN token burn address after conditions are met.
     */
    function acceptDxnBuyBurn() external {
        require(isOwned == true, "Mastodon: renounced to ownership");
        require(msg.sender == dev, "Mastodon: not dev");
        require(block.timestamp > timeThreshold, "Mastodon: not enough time passed");

        dxnBuyBurn = pendingDxnBuyBurn;
    }

    /**
     * @dev Renounces ownership of changing the dxn address for buy and burn.
     */
    function renounceDxnBuyBurnOwnership () external {
        require(msg.sender == dev, "Mastodon: not dev");
        isOwned = false;
    }

    /**
     * @dev Lists a single NFT for sale on the marketplace.
     * @param inputOrder An InputOrder structure representing the NFT to be listed.
     */
    function _list(InputOrder calldata inputOrder) internal {
        globalIndex++;

        Order storage newOrder = orders[globalIndex];
        newOrder.nftContract = inputOrder.nftContract;
        newOrder.tokenId = inputOrder.tokenId;
        newOrder.payoutToken = inputOrder.payoutToken;
        newOrder.price = inputOrder.price;
        newOrder.seller = msg.sender;

        bool supportsERC721 = ERC165Checker.supportsInterface(
            inputOrder.nftContract,
            type(IERC721).interfaceId
        );
        bool supportsERC1155 = ERC165Checker.supportsInterface(
            inputOrder.nftContract,
            type(IERC1155).interfaceId
        );

        if (supportsERC721 && !supportsERC1155) {
            newOrder.assetClass = AssetClass.ERC721;
            IERC721(inputOrder.nftContract).safeTransferFrom(
                msg.sender,
                address(this),
                inputOrder.tokenId
            );
        } else if (!supportsERC721 && supportsERC1155) {
            require(inputOrder.supply > 0, "Mastodon: erc1155 supply > 0");
            newOrder.supply = inputOrder.supply;
            newOrder.assetClass = AssetClass.ERC1155;
            IERC1155(inputOrder.nftContract).safeTransferFrom(
                msg.sender,
                address(this),
                inputOrder.tokenId,
                inputOrder.supply,
                "0x0"
            );
        } else if (supportsERC721 && supportsERC1155) {
            if (inputOrder.supply == 0) {
                newOrder.assetClass = AssetClass.BothClass_ERC721;
                IERC721(inputOrder.nftContract).safeTransferFrom(
                    msg.sender,
                    address(this),
                    inputOrder.tokenId
                );
            } else {
                newOrder.assetClass = AssetClass.BothClass_ERC1155;
                newOrder.supply = inputOrder.supply;
                IERC1155(inputOrder.nftContract).safeTransferFrom(
                    msg.sender,
                    address(this),
                    inputOrder.tokenId,
                    inputOrder.supply,
                    "0x0"
                );
            }
        } else {
            revert("Mastodon: not supported");
        }

        emit List(globalIndex, newOrder);
    }

    /**
     * @dev Delists a single NFT from the marketplace.
     * @param listIndex The index of the NFT to be delisted.
     */
    function _delist(uint256 listIndex) internal {
        require(
            orders[listIndex].seller == msg.sender,
            "Mastodon: not the order owner"
        );

        Order memory order = orders[listIndex];

        if (
            order.assetClass == AssetClass.ERC721 ||
            order.assetClass == AssetClass.BothClass_ERC721
        ) {
            IERC721(orders[listIndex].nftContract).safeTransferFrom(
                address(this),
                msg.sender,
                orders[listIndex].tokenId
            );
        } else if (
            order.assetClass == AssetClass.ERC1155 ||
            order.assetClass == AssetClass.BothClass_ERC1155

        ) {
            IERC1155(orders[listIndex].nftContract).safeTransferFrom(
                address(this),
                msg.sender,
                order.tokenId,
                order.supply,
                "0x0"
            );
        } else revert("Mastodon: not supported");

        emit Delist(listIndex, order);
        delete (orders[listIndex]);
    }

    /**
     * @dev Buys a single NFT from the marketplace.
     * @param listIndex The index of the NFT to be bought.
     */
    function _buy(uint256 listIndex) internal {
        Order memory order = orders[listIndex];

        uint256 price = order.price;

        uint256 sellerProceeds = (price * 9500) / MAX_BPS;
        uint256 developerFee = (price * DEV_FEE_BPS) /MAX_BPS;
        uint256 burnAmount = (price * BURN_FEE_BPS) / MAX_BPS;

        if (order.payoutToken == PayoutToken.NativeToken) {
            require(address(this).balance >= price, "Mastodon: invalid price");

            (bool success, ) = order.seller.call{
                value: sellerProceeds
            }("");
            require(success, "Mastodon: 1.Payment failed.");

            (success, ) = dev.call{value: developerFee}("");
            require(success, "Mastodon: 2.Payment failed.");

            (success, ) = dxnBuyBurn.call{value: burnAmount}("");
            require(success, "Mastodon: 3.Payment failed.");
        } else if (order.payoutToken == PayoutToken.Xen) {
            xen.safeTransferFrom(msg.sender, order.seller, sellerProceeds);

            xen.safeTransferFrom(msg.sender, dev, developerFee);

            xen.safeTransferFrom(msg.sender, dxnBuyBurn, burnAmount);
        } else {
            dxn.safeTransferFrom(msg.sender, order.seller, sellerProceeds);

            dxn.safeTransferFrom(msg.sender, dev, developerFee);

            dxn.safeTransferFrom(
                msg.sender,
                0x000000000000000000000000000000000000dEaD,
                burnAmount
            );
        }

        if (order.assetClass == AssetClass.ERC721 ||
            order.assetClass == AssetClass.BothClass_ERC721) {
            IERC721(order.nftContract).safeTransferFrom(
                address(this),
                msg.sender,
                order.tokenId
            );
        } else {
            IERC1155(order.nftContract).safeTransferFrom(
                address(this),
                msg.sender,
                order.tokenId,
                order.supply,
                "0x0"
            );
        }

        emit Buy(listIndex, orders[listIndex]);
        delete (orders[listIndex]);
    }

    /**
     * @dev Updates the price and payout token for a specific NFT listing.
     * @param listIndex The index of the NFT listing to be updated.
     * @param newPrice A Price structure representing the new price and payout token for the NFT.
     */
    function _changePrice(uint256 listIndex, Price calldata newPrice) internal {
        require(
            orders[listIndex].seller == msg.sender,
            "Mastodon: not the order owner"
        );

        orders[listIndex].payoutToken = newPrice.payoutToken;
        orders[listIndex].price = newPrice.newPrice;

        emit NewPrice(listIndex, newPrice);
    }

    // ERC721 and ERC1155 receiver functions... //

    function onERC721Received(
        address operator,
        address from,
        uint256 tokenId,
        bytes calldata data
    ) external returns (bytes4) {
        return (this.onERC721Received.selector);
    }

    function onERC1155Received(
        address operator,
        address from,
        uint256 id,
        uint256 value,
        bytes calldata data
    ) external returns (bytes4) {
        return (this.onERC1155Received.selector);
    }

    function onERC1155BatchReceived(
        address operator,
        address from,
        uint256[] calldata ids,
        uint256[] calldata values,
        bytes calldata data
    ) external returns (bytes4) {
        return (this.onERC1155BatchReceived.selector);
    }

    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(
        bytes4 interfaceId
    ) public view override returns (bool) {}

}

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

    /**
     * @dev Decrease the calling contract's allowance toward `spender` by `value`. If `token` returns no value,
     * non-reverting calls are assumed to be successful.
     */
    function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {
        unchecked {
            uint256 oldAllowance = token.allowance(address(this), spender);
            require(oldAllowance >= value, "SafeERC20: decreased allowance below zero");
            _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance - value));
        }
    }

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

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

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

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

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

    /**
     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
     * on the return value: the return value is optional (but if data is returned, it must not be false).
     * @param token The token targeted by the call.
     * @param data The call data (encoded using abi.encode or one of its variants).
     *
     * This is a variant of {_callOptionalReturn} that silents catches all reverts and returns a bool instead.
     */
    function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {
        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
        // we're implementing it ourselves. We cannot use {Address-functionCall} here since this should return false
        // and not revert is the subcall reverts.

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

File 3 of 18 : IERC1155Receiver.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (interfaces/IERC1155Receiver.sol)

pragma solidity ^0.8.0;

import "../token/ERC1155/IERC1155Receiver.sol";

File 4 of 18 : IERC721Receiver.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (interfaces/IERC721Receiver.sol)

pragma solidity ^0.8.0;

import "../token/ERC721/IERC721Receiver.sol";

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

pragma solidity ^0.8.0;

import "../token/ERC1155/IERC1155.sol";

File 6 of 18 : IERC721.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (interfaces/IERC721.sol)

pragma solidity ^0.8.0;

import "../token/ERC721/IERC721.sol";

File 7 of 18 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (interfaces/IERC20.sol)

pragma solidity ^0.8.0;

import "../token/ERC20/IERC20.sol";

File 8 of 18 : IMastodonMarketplace.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.21;

import {IERC721} from "@openzeppelin/contracts/interfaces/IERC721.sol";
import {IERC1155} from "@openzeppelin/contracts/interfaces/IERC1155.sol";

/**
 * @dev A decentralized marketplace for buying and selling NFTs (Non-Fungible Tokens) using Ethereum.
 * @notice This contract allows users to list NFTs for sale, buy NFTs from other users, and delist NFTs.
 */
interface IMastodonMarketplace {
    /**
     * @dev Enumeration of possible payout tokens for an NFT sale.
     */
    enum PayoutToken {
        NativeToken, // Ether
        Xen, // ERC20 token (Xen)
        Dxn // ERC20 token (Dxn)
    }

    enum AssetClass {
        ERC721, // Represents a single ERC721 token.
        ERC1155, // Represents an ERC1155 token.
        BothClass_ERC721, // Represents the smart contracts that inherit
        BothClass_ERC1155 // ERC721 & ERC1155 but it will transfer one type in sc
    }

    /**
     * @dev Struct representing the details of an NFT listing.
     */
    struct InputOrder {
        address nftContract; // The address of the NFT contract.
        uint256 tokenId; // The ID of the NFT or batch of NFTs.
        uint256 supply; // The supply of NFTs for ERC1155 tokens, set to 0 for ERC721.
        PayoutToken payoutToken; // The desired token to receive as payment.
        uint256 price; // The price at which the NFT is listed for sale.
    }

    /**
     * @dev Struct representing an active order on the marketplace.
     */
    struct Order {
        address nftContract; // The address of the NFT contract.
        address seller; // The address of the seller.
        uint256 tokenId; // The ID of the NFT or batch of NFTs.
        uint256 supply; // The supply of NFTs for ERC1155 tokens, set to 0 for ERC721.
        PayoutToken payoutToken; // The desired token to receive as payment.
        uint256 price; // The price at which the NFT is listed for sale.
        AssetClass assetClass; // The type of NFT collection
    }

    /**
     * @dev Struct representing the details necessary to change the price.
     */
    struct Price {
        PayoutToken payoutToken; // The desired token to receive as payment.
        uint256 newPrice; // The new price for Order
    }

    /**
     * @dev Event emitted when a new NFT is listed on the marketplace.
     * @param orderIndex The index of the order in the marketplace.
     * @param order The details of the listed NFT order.
     */
    event List(uint256 indexed orderIndex, Order order);

    /**
     * @dev Event emitted when an existing NFT listing is delisted from the marketplace.
     * @param orderIndex The index of the order in the marketplace.
     * @param order The details of the delisted NFT order.
     */
    event Delist(uint256 indexed orderIndex, Order order);

    /**
     * @dev Event emitted when a user successfully purchases an NFT from the marketplace.
     * @param orderIndex The index of the order in the marketplace.
     * @param order The details of the purchased NFT order.
     */
    event Buy(uint256 indexed orderIndex, Order order);

    /**
     * @dev This event provides information about the updated price and payout token for a specific NFT listing.
     * @param orderIndex The index of the NFT listing for which the price has been changed.
     * @param newPrice A Price structure representing the new price and payout token for the NFT.
     */
    event NewPrice(uint256 indexed orderIndex, Price newPrice);

    /**
     * @dev Lists multiple NFTs on the marketplace.
     * @param inputOrders An array of InputOrder structures representing the NFTs to be listed.
     */
    function batchList(InputOrder[] calldata inputOrders) external;

    /**
     * @dev Delists multiple NFTs from the marketplace.
     * @param listIndexes An array of indexes representing the NFT orders to be delisted.
     */
    function batchDelist(uint256[] calldata listIndexes) external;

    /**
     * @dev Allows users to purchase multiple NFTs from the marketplace.
     * @param listIndexes An array of indexes representing the NFT orders to be purchased.
     */
    function batchBuy(uint256[] calldata listIndexes) external payable;

    /**
     * @notice Allows the order owner to change the prices of listed NFTs and the payout token.
     * @param listIndexes An array of list indexes representing the NFTs for which the prices will be changed.
     * @param newPrices An array of Price structures representing the new payout tokens & prices corresponding to the NFTs.
     */
    function batchChangePrice(uint256[] calldata listIndexes, Price[] calldata newPrices ) external;

}

File 9 of 18 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/ReentrancyGuard.sol)

pragma solidity ^0.8.20;

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

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

    uint256 private _status;

    /**
     * @dev Unauthorized reentrant call.
     */
    error ReentrancyGuardReentrantCall();

    constructor() {
        _status = NOT_ENTERED;
    }

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

    function _nonReentrantBefore() private {
        // On the first call to nonReentrant, _status will be NOT_ENTERED
        if (_status == ENTERED) {
            revert ReentrancyGuardReentrantCall();
        }

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

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

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

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

pragma solidity ^0.8.0;

import "./IERC165.sol";

/**
 * @dev Library used to query support of an interface declared via {IERC165}.
 *
 * Note that these functions return the actual result of the query: they do not
 * `revert` if an interface is not supported. It is up to the caller to decide
 * what to do in these cases.
 */
library ERC165Checker {
    // As per the EIP-165 spec, no interface should ever match 0xffffffff
    bytes4 private constant _INTERFACE_ID_INVALID = 0xffffffff;

    /**
     * @dev Returns true if `account` supports the {IERC165} interface.
     */
    function supportsERC165(address account) internal view returns (bool) {
        // Any contract that implements ERC165 must explicitly indicate support of
        // InterfaceId_ERC165 and explicitly indicate non-support of InterfaceId_Invalid
        return
            supportsERC165InterfaceUnchecked(account, type(IERC165).interfaceId) &&
            !supportsERC165InterfaceUnchecked(account, _INTERFACE_ID_INVALID);
    }

    /**
     * @dev Returns true if `account` supports the interface defined by
     * `interfaceId`. Support for {IERC165} itself is queried automatically.
     *
     * See {IERC165-supportsInterface}.
     */
    function supportsInterface(address account, bytes4 interfaceId) internal view returns (bool) {
        // query support of both ERC165 as per the spec and support of _interfaceId
        return supportsERC165(account) && supportsERC165InterfaceUnchecked(account, interfaceId);
    }

    /**
     * @dev Returns a boolean array where each value corresponds to the
     * interfaces passed in and whether they're supported or not. This allows
     * you to batch check interfaces for a contract where your expectation
     * is that some interfaces may not be supported.
     *
     * See {IERC165-supportsInterface}.
     *
     * _Available since v3.4._
     */
    function getSupportedInterfaces(
        address account,
        bytes4[] memory interfaceIds
    ) internal view returns (bool[] memory) {
        // an array of booleans corresponding to interfaceIds and whether they're supported or not
        bool[] memory interfaceIdsSupported = new bool[](interfaceIds.length);

        // query support of ERC165 itself
        if (supportsERC165(account)) {
            // query support of each interface in interfaceIds
            for (uint256 i = 0; i < interfaceIds.length; i++) {
                interfaceIdsSupported[i] = supportsERC165InterfaceUnchecked(account, interfaceIds[i]);
            }
        }

        return interfaceIdsSupported;
    }

    /**
     * @dev Returns true if `account` supports all the interfaces defined in
     * `interfaceIds`. Support for {IERC165} itself is queried automatically.
     *
     * Batch-querying can lead to gas savings by skipping repeated checks for
     * {IERC165} support.
     *
     * See {IERC165-supportsInterface}.
     */
    function supportsAllInterfaces(address account, bytes4[] memory interfaceIds) internal view returns (bool) {
        // query support of ERC165 itself
        if (!supportsERC165(account)) {
            return false;
        }

        // query support of each interface in interfaceIds
        for (uint256 i = 0; i < interfaceIds.length; i++) {
            if (!supportsERC165InterfaceUnchecked(account, interfaceIds[i])) {
                return false;
            }
        }

        // all interfaces supported
        return true;
    }

    /**
     * @notice Query if a contract implements an interface, does not check ERC165 support
     * @param account The address of the contract to query for support of an interface
     * @param interfaceId The interface identifier, as specified in ERC-165
     * @return true if the contract at account indicates support of the interface with
     * identifier interfaceId, false otherwise
     * @dev Assumes that account contains a contract that supports ERC165, otherwise
     * the behavior of this method is undefined. This precondition can be checked
     * with {supportsERC165}.
     *
     * Some precompiled contracts will falsely indicate support for a given interface, so caution
     * should be exercised when using this function.
     *
     * Interface identification is specified in ERC-165.
     */
    function supportsERC165InterfaceUnchecked(address account, bytes4 interfaceId) internal view returns (bool) {
        // prepare call
        bytes memory encodedParams = abi.encodeWithSelector(IERC165.supportsInterface.selector, interfaceId);

        // perform static call
        bool success;
        uint256 returnSize;
        uint256 returnValue;
        assembly {
            success := staticcall(30000, account, add(encodedParams, 0x20), mload(encodedParams), 0x00, 0x20)
            returnSize := returndatasize()
            returnValue := mload(0x00)
        }

        return success && returnSize >= 0x20 && returnValue > 0;
    }
}

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

pragma solidity ^0.8.0;

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

File 12 of 18 : 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 13 of 18 : IERC20Permit.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.4) (token/ERC20/extensions/IERC20Permit.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in
 * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].
 *
 * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by
 * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't
 * need to send a transaction, and thus is not required to hold Ether at all.
 *
 * ==== Security Considerations
 *
 * There are two important considerations concerning the use of `permit`. The first is that a valid permit signature
 * expresses an allowance, and it should not be assumed to convey additional meaning. In particular, it should not be
 * considered as an intention to spend the allowance in any specific way. The second is that because permits have
 * built-in replay protection and can be submitted by anyone, they can be frontrun. A protocol that uses permits should
 * take this into consideration and allow a `permit` call to fail. Combining these two aspects, a pattern that may be
 * generally recommended is:
 *
 * ```solidity
 * function doThingWithPermit(..., uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) public {
 *     try token.permit(msg.sender, address(this), value, deadline, v, r, s) {} catch {}
 *     doThing(..., value);
 * }
 *
 * function doThing(..., uint256 value) public {
 *     token.safeTransferFrom(msg.sender, address(this), value);
 *     ...
 * }
 * ```
 *
 * Observe that: 1) `msg.sender` is used as the owner, leaving no ambiguity as to the signer intent, and 2) the use of
 * `try/catch` allows the permit to fail and makes the code tolerant to frontrunning. (See also
 * {SafeERC20-safeTransferFrom}).
 *
 * Additionally, note that smart contract wallets (such as Argent or Safe) are not able to produce permit signatures, so
 * contracts should have entry points that don't rely on permit.
 */
interface IERC20Permit {
    /**
     * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,
     * given ``owner``'s signed approval.
     *
     * IMPORTANT: The same issues {IERC20-approve} has related to transaction
     * ordering also apply here.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     * - `deadline` must be a timestamp in the future.
     * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`
     * over the EIP712-formatted function arguments.
     * - the signature must use ``owner``'s current nonce (see {nonces}).
     *
     * For more information on the signature format, see the
     * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP
     * section].
     *
     * CAUTION: See Security Considerations above.
     */
    function permit(
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external;

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

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

File 14 of 18 : 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 15 of 18 : 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 16 of 18 : 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 17 of 18 : 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 18 of 18 : 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;
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"contract IERC20","name":"_xen","type":"address"},{"internalType":"contract IERC20","name":"_dxn","type":"address"},{"internalType":"address","name":"_dxnBuyBurn","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"ReentrancyGuardReentrantCall","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"orderIndex","type":"uint256"},{"components":[{"internalType":"address","name":"nftContract","type":"address"},{"internalType":"address","name":"seller","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"supply","type":"uint256"},{"internalType":"enum IMastodonMarketplace.PayoutToken","name":"payoutToken","type":"uint8"},{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"enum IMastodonMarketplace.AssetClass","name":"assetClass","type":"uint8"}],"indexed":false,"internalType":"struct IMastodonMarketplace.Order","name":"order","type":"tuple"}],"name":"Buy","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"orderIndex","type":"uint256"},{"components":[{"internalType":"address","name":"nftContract","type":"address"},{"internalType":"address","name":"seller","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"supply","type":"uint256"},{"internalType":"enum IMastodonMarketplace.PayoutToken","name":"payoutToken","type":"uint8"},{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"enum IMastodonMarketplace.AssetClass","name":"assetClass","type":"uint8"}],"indexed":false,"internalType":"struct IMastodonMarketplace.Order","name":"order","type":"tuple"}],"name":"Delist","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"orderIndex","type":"uint256"},{"components":[{"internalType":"address","name":"nftContract","type":"address"},{"internalType":"address","name":"seller","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"supply","type":"uint256"},{"internalType":"enum IMastodonMarketplace.PayoutToken","name":"payoutToken","type":"uint8"},{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"enum IMastodonMarketplace.AssetClass","name":"assetClass","type":"uint8"}],"indexed":false,"internalType":"struct IMastodonMarketplace.Order","name":"order","type":"tuple"}],"name":"List","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"orderIndex","type":"uint256"},{"components":[{"internalType":"enum IMastodonMarketplace.PayoutToken","name":"payoutToken","type":"uint8"},{"internalType":"uint256","name":"newPrice","type":"uint256"}],"indexed":false,"internalType":"struct IMastodonMarketplace.Price","name":"newPrice","type":"tuple"}],"name":"NewPrice","type":"event"},{"inputs":[],"name":"acceptDxnBuyBurn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"listIndexes","type":"uint256[]"}],"name":"batchBuy","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"listIndexes","type":"uint256[]"},{"components":[{"internalType":"enum IMastodonMarketplace.PayoutToken","name":"payoutToken","type":"uint8"},{"internalType":"uint256","name":"newPrice","type":"uint256"}],"internalType":"struct IMastodonMarketplace.Price[]","name":"newPrices","type":"tuple[]"}],"name":"batchChangePrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"listIndexes","type":"uint256[]"}],"name":"batchDelist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"nftContract","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"supply","type":"uint256"},{"internalType":"enum IMastodonMarketplace.PayoutToken","name":"payoutToken","type":"uint8"},{"internalType":"uint256","name":"price","type":"uint256"}],"internalType":"struct IMastodonMarketplace.InputOrder[]","name":"inputOrders","type":"tuple[]"}],"name":"batchList","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"dev","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"dxn","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"dxnBuyBurn","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"globalIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isOwned","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"address","name":"from","type":"address"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"internalType":"uint256[]","name":"values","type":"uint256[]"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"onERC1155BatchReceived","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"address","name":"from","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"onERC1155Received","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"address","name":"from","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"onERC721Received","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"listIndex","type":"uint256"}],"name":"orders","outputs":[{"internalType":"address","name":"nftContract","type":"address"},{"internalType":"address","name":"seller","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"supply","type":"uint256"},{"internalType":"enum IMastodonMarketplace.PayoutToken","name":"payoutToken","type":"uint8"},{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"enum IMastodonMarketplace.AssetClass","name":"assetClass","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pendingDxnBuyBurn","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceDxnBuyBurnOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_dxnBuyBurn","type":"address"}],"name":"setPendingDxnBuyBurn","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":[],"name":"timeThreshold","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"xen","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"}]

60e06040526001600360146101000a81548160ff0219169083151502179055503480156200002b575f80fd5b506040516200416d3803806200416d833981810160405281019062000051919062000255565b60015f819055505f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603620000c9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620000c09062000332565b60405180910390fd5b8273ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff16815250508173ffffffffffffffffffffffffffffffffffffffff1660a08173ffffffffffffffffffffffffffffffffffffffff16815250508060025f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055503373ffffffffffffffffffffffffffffffffffffffff1660c08173ffffffffffffffffffffffffffffffffffffffff168152505050505062000352565b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f620001dd82620001b2565b9050919050565b5f620001f082620001d1565b9050919050565b6200020281620001e4565b81146200020d575f80fd5b50565b5f815190506200022081620001f7565b92915050565b6200023181620001d1565b81146200023c575f80fd5b50565b5f815190506200024f8162000226565b92915050565b5f805f606084860312156200026f576200026e620001ae565b5b5f6200027e8682870162000210565b9350506020620002918682870162000210565b9250506040620002a4868287016200023f565b9150509250925092565b5f82825260208201905092915050565b7f4d6173746f646f6e3a207a65726f2061646472657373206973206e6f7420616c5f8201527f6c6f776564000000000000000000000000000000000000000000000000000000602082015250565b5f6200031a602583620002ae565b91506200032782620002be565b604082019050919050565b5f6020820190508181035f8301526200034b816200030c565b9050919050565b60805160a05160c051613d9c620003d15f395f81816106e1015281816107ef01528181610aa901528181610bde01528181611a6b01528181611c890152611dba01525f81816104e001528181611d6f01528181611ddc0152611e2b01525f81816106bd01528181611c3e01528181611cab0152611d190152613d9c5ff3fe60806040526004361061011e575f3560e01c806391cca3db1161009f578063d35bbaab11610063578063d35bbaab146103d0578063d890a870146103fa578063f23a6e6114610424578063f374189d14610460578063f68f7f68146104765761011e565b806391cca3db146102d8578063a85c38ef14610302578063af5bbd3514610344578063b19c6c801461036c578063bc197c81146103945761011e565b806377dca534116100e657806377dca534146102185780638280aaa41461024057806383e0de451461026857806387479487146102845780639055c515146102ae5761011e565b806301ffc9a7146101225780630e5e739c1461015e578063150b7a02146101885780631c85e1f1146101c45780635afe54d2146101ee575b5f80fd5b34801561012d575f80fd5b506101486004803603810190610143919061268d565b61048c565b60405161015591906126d2565b60405180910390f35b348015610169575f80fd5b50610172610492565b60405161017f91906126d2565b60405180910390f35b348015610193575f80fd5b506101ae60048036038101906101a991906127d9565b6104a5565b6040516101bb919061286c565b60405180910390f35b3480156101cf575f80fd5b506101d86104b9565b6040516101e59190612894565b60405180910390f35b3480156101f9575f80fd5b506102026104de565b60405161020f9190612908565b60405180910390f35b348015610223575f80fd5b5061023e60048036038101906102399190612976565b610502565b005b34801561024b575f80fd5b5061026660048036038101906102619190612a16565b610557565b005b610282600480360381019061027d9190612a16565b6105ad565b005b34801561028f575f80fd5b506102986106b5565b6040516102a59190612a70565b60405180910390f35b3480156102b9575f80fd5b506102c26106bb565b6040516102cf9190612908565b60405180910390f35b3480156102e3575f80fd5b506102ec6106df565b6040516102f99190612894565b60405180910390f35b34801561030d575f80fd5b5061032860048036038101906103239190612a89565b610703565b60405161033b9796959493929190612b6d565b60405180910390f35b34801561034f575f80fd5b5061036a60048036038101906103659190612bda565b610797565b005b348015610377575f80fd5b50610392600480360381019061038d9190612c5a565b610941565b005b34801561039f575f80fd5b506103ba60048036038101906103b59190612cd8565b6109fa565b6040516103c7919061286c565b60405180910390f35b3480156103db575f80fd5b506103e4610a11565b6040516103f19190612894565b60405180910390f35b348015610405575f80fd5b5061040e610a36565b60405161041b9190612a70565b60405180910390f35b34801561042f575f80fd5b5061044a60048036038101906104459190612daf565b610a3c565b604051610457919061286c565b60405180910390f35b34801561046b575f80fd5b50610474610a51565b005b348015610481575f80fd5b5061048a610bdc565b005b5f919050565b600360149054906101000a900460ff1681565b5f63150b7a0260e01b905095945050505050565b60035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b7f000000000000000000000000000000000000000000000000000000000000000081565b61050a610c86565b5f8282905090505f5b818110156105495761053c84848381811061053157610530612e45565b5b905060a00201610cca565b8080600101915050610513565b5050610553611241565b5050565b61055f610c86565b5f8282905090505f5b8181101561059f5761059284848381811061058657610585612e45565b5b9050602002013561124a565b8080600101915050610568565b50506105a9611241565b5050565b6105b5610c86565b5f8282905090505f5b818110156105f5576105e88484838181106105dc576105db612e45565b5b9050602002013561177d565b80806001019150506105be565b505f4711156106a8575f3373ffffffffffffffffffffffffffffffffffffffff164760405161062390612e9f565b5f6040518083038185875af1925050503d805f811461065d576040519150601f19603f3d011682016040523d82523d5f602084013e610662565b606091505b50509050806106a6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161069d90612f0d565b60405180910390fd5b505b506106b1611241565b5050565b60045481565b7f000000000000000000000000000000000000000000000000000000000000000081565b7f000000000000000000000000000000000000000000000000000000000000000081565b6005602052805f5260405f205f91509050805f015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690806001015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690806002015490806003015490806004015f9054906101000a900460ff1690806005015490806006015f9054906101000a900460ff16905087565b60011515600360149054906101000a900460ff161515146107ed576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107e490612f75565b60405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461087b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161087290612fdd565b60405180910390fd5b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16036108e9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108e09061306b565b60405180910390fd5b62093a80426108f891906130b6565b6004819055508060035f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b610949610c86565b818190508484905014610991576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161098890613133565b60405180910390fd5b5f8484905090505f5b818110156109ea576109dd8686838181106109b8576109b7612e45565b5b905060200201358585848181106109d2576109d1612e45565b5b9050604002016120ad565b808060010191505061099a565b50506109f4611241565b50505050565b5f63bc197c8160e01b905098975050505050505050565b60025f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60015481565b5f63f23a6e6160e01b90509695505050505050565b60011515600360149054906101000a900460ff16151514610aa7576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a9e90612f75565b60405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610b35576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b2c90612fdd565b60405180910390fd5b6004544211610b79576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b709061319b565b60405180910390fd5b60035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1660025f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610c6a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c6190612fdd565b60405180910390fd5b5f600360146101000a81548160ff021916908315150217905550565b60025f5403610cc1576040517f3ee5aeb500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60025f81905550565b60015f815480929190610cdc906131b9565b91905055505f60055f60015481526020019081526020015f209050815f016020810190610d099190612bda565b815f015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081602001358160020181905550816060016020810190610d699190613223565b816004015f6101000a81548160ff02191690836002811115610d8e57610d8d612ab4565b5b02179055508160800135816005018190555033816001015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505f610e1e835f016020810190610df89190612bda565b7f80ac58cd000000000000000000000000000000000000000000000000000000006121f3565b90505f610e5c845f016020810190610e369190612bda565b7fd9b67a26000000000000000000000000000000000000000000000000000000006121f3565b9050818015610e69575080155b15610f1d575f836006015f6101000a81548160ff02191690836003811115610e9457610e93612ab4565b5b0217905550835f016020810190610eab9190612bda565b73ffffffffffffffffffffffffffffffffffffffff166342842e0e333087602001356040518463ffffffff1660e01b8152600401610eeb9392919061324e565b5f604051808303815f87803b158015610f02575f80fd5b505af1158015610f14573d5f803e3d5ffd5b50505050611201565b81158015610f285750805b15611036575f846040013511610f73576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f6a906132cd565b60405180910390fd5b836040013583600301819055506001836006015f6101000a81548160ff02191690836003811115610fa757610fa6612ab4565b5b0217905550835f016020810190610fbe9190612bda565b73ffffffffffffffffffffffffffffffffffffffff1663f242432a3330876020013588604001356040518563ffffffff1660e01b81526004016110049493929190613345565b5f604051808303815f87803b15801561101b575f80fd5b505af115801561102d573d5f803e3d5ffd5b50505050611200565b8180156110405750805b156111c4575f846040013503611100576002836006015f6101000a81548160ff0219169083600381111561107757611076612ab4565b5b0217905550835f01602081019061108e9190612bda565b73ffffffffffffffffffffffffffffffffffffffff166342842e0e333087602001356040518463ffffffff1660e01b81526004016110ce9392919061324e565b5f604051808303815f87803b1580156110e5575f80fd5b505af11580156110f7573d5f803e3d5ffd5b505050506111bf565b6003836006015f6101000a81548160ff0219169083600381111561112757611126612ab4565b5b021790555083604001358360030181905550835f01602081019061114b9190612bda565b73ffffffffffffffffffffffffffffffffffffffff1663f242432a3330876020013588604001356040518563ffffffff1660e01b81526004016111919493929190613345565b5f604051808303815f87803b1580156111a8575f80fd5b505af11580156111ba573d5f803e3d5ffd5b505050505b6111ff565b6040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111f6906133e5565b60405180910390fd5b5b5b6001547f957f8b455632d2c7d179f71128c71eb5d88027f042d282ef210b64f6c06ed9808460405161123391906135c9565b60405180910390a250505050565b60015f81905550565b3373ffffffffffffffffffffffffffffffffffffffff1660055f8381526020019081526020015f206001015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146112eb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112e29061362c565b60405180910390fd5b5f60055f8381526020019081526020015f206040518060e00160405290815f82015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001600182015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016002820154815260200160038201548152602001600482015f9054906101000a900460ff1660028111156113e9576113e8612ab4565b5b60028111156113fb576113fa612ab4565b5b815260200160058201548152602001600682015f9054906101000a900460ff16600381111561142d5761142c612ab4565b5b600381111561143f5761143e612ab4565b5b8152505090505f600381111561145857611457612ab4565b5b8160c00151600381111561146f5761146e612ab4565b5b14806114a357506002600381111561148a57611489612ab4565b5b8160c0015160038111156114a1576114a0612ab4565b5b145b1561155d5760055f8381526020019081526020015f205f015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166342842e0e303360055f8781526020019081526020015f20600201546040518463ffffffff1660e01b815260040161152b9392919061324e565b5f604051808303815f87803b158015611542575f80fd5b505af1158015611554573d5f803e3d5ffd5b505050506116a7565b6001600381111561157157611570612ab4565b5b8160c00151600381111561158857611587612ab4565b5b14806115bb57506003808111156115a2576115a1612ab4565b5b8160c0015160038111156115b9576115b8612ab4565b5b145b1561166b5760055f8381526020019081526020015f205f015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f242432a3033846040015185606001516040518563ffffffff1660e01b81526004016116399493929190613345565b5f604051808303815f87803b158015611650575f80fd5b505af1158015611662573d5f803e3d5ffd5b505050506116a6565b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161169d906133e5565b60405180910390fd5b5b817f3bb2460a03b33f98a5d5cda2bed0f19ec4376a1f83bf76599e4d5113fa6dcb61826040516116d791906136d6565b60405180910390a260055f8381526020019081526020015f205f8082015f6101000a81549073ffffffffffffffffffffffffffffffffffffffff0219169055600182015f6101000a81549073ffffffffffffffffffffffffffffffffffffffff0219169055600282015f9055600382015f9055600482015f6101000a81549060ff0219169055600582015f9055600682015f6101000a81549060ff021916905550505050565b5f60055f8381526020019081526020015f206040518060e00160405290815f82015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001600182015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016002820154815260200160038201548152602001600482015f9054906101000a900460ff16600281111561187b5761187a612ab4565b5b600281111561188d5761188c612ab4565b5b815260200160058201548152602001600682015f9054906101000a900460ff1660038111156118bf576118be612ab4565b5b60038111156118d1576118d0612ab4565b5b8152505090505f8160a0015190505f61271061ffff1661251c836118f591906136ef565b6118ff919061375d565b90505f61271061ffff16609660ff168461191991906136ef565b611923919061375d565b90505f61271061ffff1661015e61ffff168561193f91906136ef565b611949919061375d565b90505f600281111561195e5761195d612ab4565b5b8560800151600281111561197557611974612ab4565b5b03611c0257834710156119bd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119b4906137d7565b60405180910390fd5b5f856020015173ffffffffffffffffffffffffffffffffffffffff16846040516119e690612e9f565b5f6040518083038185875af1925050503d805f8114611a20576040519150601f19603f3d011682016040523d82523d5f602084013e611a25565b606091505b5050905080611a69576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a609061383f565b60405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1683604051611aad90612e9f565b5f6040518083038185875af1925050503d805f8114611ae7576040519150601f19603f3d011682016040523d82523d5f602084013e611aec565b606091505b50508091505080611b32576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b29906138a7565b60405180910390fd5b60025f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1682604051611b7790612e9f565b5f6040518083038185875af1925050503d805f8114611bb1576040519150601f19603f3d011682016040523d82523d5f602084013e611bb6565b606091505b50508091505080611bfc576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611bf39061390f565b60405180910390fd5b50611e72565b60016002811115611c1657611c15612ab4565b5b85608001516002811115611c2d57611c2c612ab4565b5b03611d6357611c83338660200151857f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16612217909392919063ffffffff16565b611cf0337f0000000000000000000000000000000000000000000000000000000000000000847f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16612217909392919063ffffffff16565b611d5e3360025f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16837f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16612217909392919063ffffffff16565b611e71565b611db4338660200151857f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16612217909392919063ffffffff16565b611e21337f0000000000000000000000000000000000000000000000000000000000000000847f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16612217909392919063ffffffff16565b611e703361dead837f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16612217909392919063ffffffff16565b5b5b5f6003811115611e8557611e84612ab4565b5b8560c001516003811115611e9c57611e9b612ab4565b5b1480611ed0575060026003811115611eb757611eb6612ab4565b5b8560c001516003811115611ece57611ecd612ab4565b5b145b15611f4b57845f015173ffffffffffffffffffffffffffffffffffffffff166342842e0e303388604001516040518463ffffffff1660e01b8152600401611f199392919061324e565b5f604051808303815f87803b158015611f30575f80fd5b505af1158015611f42573d5f803e3d5ffd5b50505050611fc3565b845f015173ffffffffffffffffffffffffffffffffffffffff1663f242432a3033886040015189606001516040518563ffffffff1660e01b8152600401611f959493929190613345565b5f604051808303815f87803b158015611fac575f80fd5b505af1158015611fbe573d5f803e3d5ffd5b505050505b857f2eb7f9b07b6544cac22c4eecfde986c5c3e19b322c328044551d77616336216160055f8981526020019081526020015f206040516120039190613a08565b60405180910390a260055f8781526020019081526020015f205f8082015f6101000a81549073ffffffffffffffffffffffffffffffffffffffff0219169055600182015f6101000a81549073ffffffffffffffffffffffffffffffffffffffff0219169055600282015f9055600382015f9055600482015f6101000a81549060ff0219169055600582015f9055600682015f6101000a81549060ff02191690555050505050505050565b3373ffffffffffffffffffffffffffffffffffffffff1660055f8481526020019081526020015f206001015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461214e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016121459061362c565b60405180910390fd5b805f0160208101906121609190613223565b60055f8481526020019081526020015f206004015f6101000a81548160ff0219169083600281111561219557612194612ab4565b5b0217905550806020013560055f8481526020019081526020015f2060050181905550817f734ff158e0f303483bae1158d0eb4ab1384156c82bb25ac21ac5320b65278998826040516121e79190613a8a565b60405180910390a25050565b5f6121fd836122a0565b801561220f575061220e83836122ec565b5b905092915050565b61229a846323b872dd60e01b8585856040516024016122389392919061324e565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506123a5565b50505050565b5f6122cb827f01ffc9a7000000000000000000000000000000000000000000000000000000006122ec565b80156122e557506122e38263ffffffff60e01b6122ec565b155b9050919050565b5f806301ffc9a760e01b83604051602401612307919061286c565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff838183161783525050505090505f805f60205f8551602087018a617530fa92503d91505f51905082801561238e575060208210155b801561239957505f81115b94505050505092915050565b5f612406826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff1661246b9092919063ffffffff16565b90505f815114806124275750808060200190518101906124269190613acd565b5b612466576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161245d90613b68565b60405180910390fd5b505050565b606061247984845f85612482565b90509392505050565b6060824710156124c7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016124be90613bf6565b60405180910390fd5b5f808673ffffffffffffffffffffffffffffffffffffffff1685876040516124ef9190613c76565b5f6040518083038185875af1925050503d805f8114612529576040519150601f19603f3d011682016040523d82523d5f602084013e61252e565b606091505b509150915061253f8783838761254b565b92505050949350505050565b606083156125ac575f8351036125a457612564856125bf565b6125a3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161259a90613cd6565b60405180910390fd5b5b8290506125b7565b6125b683836125e1565b5b949350505050565b5f808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b5f825111156125f35781518083602001fd5b806040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016126279190613d46565b60405180910390fd5b5f80fd5b5f80fd5b5f7fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b61266c81612638565b8114612676575f80fd5b50565b5f8135905061268781612663565b92915050565b5f602082840312156126a2576126a1612630565b5b5f6126af84828501612679565b91505092915050565b5f8115159050919050565b6126cc816126b8565b82525050565b5f6020820190506126e55f8301846126c3565b92915050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f612714826126eb565b9050919050565b6127248161270a565b811461272e575f80fd5b50565b5f8135905061273f8161271b565b92915050565b5f819050919050565b61275781612745565b8114612761575f80fd5b50565b5f813590506127728161274e565b92915050565b5f80fd5b5f80fd5b5f80fd5b5f8083601f84011261279957612798612778565b5b8235905067ffffffffffffffff8111156127b6576127b561277c565b5b6020830191508360018202830111156127d2576127d1612780565b5b9250929050565b5f805f805f608086880312156127f2576127f1612630565b5b5f6127ff88828901612731565b955050602061281088828901612731565b945050604061282188828901612764565b935050606086013567ffffffffffffffff81111561284257612841612634565b5b61284e88828901612784565b92509250509295509295909350565b61286681612638565b82525050565b5f60208201905061287f5f83018461285d565b92915050565b61288e8161270a565b82525050565b5f6020820190506128a75f830184612885565b92915050565b5f819050919050565b5f6128d06128cb6128c6846126eb565b6128ad565b6126eb565b9050919050565b5f6128e1826128b6565b9050919050565b5f6128f2826128d7565b9050919050565b612902816128e8565b82525050565b5f60208201905061291b5f8301846128f9565b92915050565b5f8083601f84011261293657612935612778565b5b8235905067ffffffffffffffff8111156129535761295261277c565b5b6020830191508360a082028301111561296f5761296e612780565b5b9250929050565b5f806020838503121561298c5761298b612630565b5b5f83013567ffffffffffffffff8111156129a9576129a8612634565b5b6129b585828601612921565b92509250509250929050565b5f8083601f8401126129d6576129d5612778565b5b8235905067ffffffffffffffff8111156129f3576129f261277c565b5b602083019150836020820283011115612a0f57612a0e612780565b5b9250929050565b5f8060208385031215612a2c57612a2b612630565b5b5f83013567ffffffffffffffff811115612a4957612a48612634565b5b612a55858286016129c1565b92509250509250929050565b612a6a81612745565b82525050565b5f602082019050612a835f830184612a61565b92915050565b5f60208284031215612a9e57612a9d612630565b5b5f612aab84828501612764565b91505092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffd5b60038110612af257612af1612ab4565b5b50565b5f819050612b0282612ae1565b919050565b5f612b1182612af5565b9050919050565b612b2181612b07565b82525050565b60048110612b3857612b37612ab4565b5b50565b5f819050612b4882612b27565b919050565b5f612b5782612b3b565b9050919050565b612b6781612b4d565b82525050565b5f60e082019050612b805f83018a612885565b612b8d6020830189612885565b612b9a6040830188612a61565b612ba76060830187612a61565b612bb46080830186612b18565b612bc160a0830185612a61565b612bce60c0830184612b5e565b98975050505050505050565b5f60208284031215612bef57612bee612630565b5b5f612bfc84828501612731565b91505092915050565b5f8083601f840112612c1a57612c19612778565b5b8235905067ffffffffffffffff811115612c3757612c3661277c565b5b602083019150836040820283011115612c5357612c52612780565b5b9250929050565b5f805f8060408587031215612c7257612c71612630565b5b5f85013567ffffffffffffffff811115612c8f57612c8e612634565b5b612c9b878288016129c1565b9450945050602085013567ffffffffffffffff811115612cbe57612cbd612634565b5b612cca87828801612c05565b925092505092959194509250565b5f805f805f805f8060a0898b031215612cf457612cf3612630565b5b5f612d018b828c01612731565b9850506020612d128b828c01612731565b975050604089013567ffffffffffffffff811115612d3357612d32612634565b5b612d3f8b828c016129c1565b9650965050606089013567ffffffffffffffff811115612d6257612d61612634565b5b612d6e8b828c016129c1565b9450945050608089013567ffffffffffffffff811115612d9157612d90612634565b5b612d9d8b828c01612784565b92509250509295985092959890939650565b5f805f805f8060a08789031215612dc957612dc8612630565b5b5f612dd689828a01612731565b9650506020612de789828a01612731565b9550506040612df889828a01612764565b9450506060612e0989828a01612764565b935050608087013567ffffffffffffffff811115612e2a57612e29612634565b5b612e3689828a01612784565b92509250509295509295509295565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b5f81905092915050565b50565b5f612e8a5f83612e72565b9150612e9582612e7c565b5f82019050919050565b5f612ea982612e7f565b9150819050919050565b5f82825260208201905092915050565b7f4d6173746f646f6e3a2072656d61696e696e672066756e6473206661696c65645f82015250565b5f612ef7602083612eb3565b9150612f0282612ec3565b602082019050919050565b5f6020820190508181035f830152612f2481612eeb565b9050919050565b7f4d6173746f646f6e3a2072656e6f756e63656420746f206f776e6572736869705f82015250565b5f612f5f602083612eb3565b9150612f6a82612f2b565b602082019050919050565b5f6020820190508181035f830152612f8c81612f53565b9050919050565b7f4d6173746f646f6e3a206e6f74206465760000000000000000000000000000005f82015250565b5f612fc7601183612eb3565b9150612fd282612f93565b602082019050919050565b5f6020820190508181035f830152612ff481612fbb565b9050919050565b7f4d6173746f646f6e3a207a65726f2061646472657373206973206e6f7420616c5f8201527f6c6f776564000000000000000000000000000000000000000000000000000000602082015250565b5f613055602583612eb3565b915061306082612ffb565b604082019050919050565b5f6020820190508181035f83015261308281613049565b9050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f6130c082612745565b91506130cb83612745565b92508282019050808211156130e3576130e2613089565b5b92915050565b7f4d6173746f646f6e3a206c656e677468206469666600000000000000000000005f82015250565b5f61311d601583612eb3565b9150613128826130e9565b602082019050919050565b5f6020820190508181035f83015261314a81613111565b9050919050565b7f4d6173746f646f6e3a206e6f7420656e6f7567682074696d65207061737365645f82015250565b5f613185602083612eb3565b915061319082613151565b602082019050919050565b5f6020820190508181035f8301526131b281613179565b9050919050565b5f6131c382612745565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036131f5576131f4613089565b5b600182019050919050565b6003811061320c575f80fd5b50565b5f8135905061321d81613200565b92915050565b5f6020828403121561323857613237612630565b5b5f6132458482850161320f565b91505092915050565b5f6060820190506132615f830186612885565b61326e6020830185612885565b61327b6040830184612a61565b949350505050565b7f4d6173746f646f6e3a206572633131353520737570706c79203e2030000000005f82015250565b5f6132b7601c83612eb3565b91506132c282613283565b602082019050919050565b5f6020820190508181035f8301526132e4816132ab565b9050919050565b5f82825260208201905092915050565b7f30783000000000000000000000000000000000000000000000000000000000005f82015250565b5f61332f6003836132eb565b915061333a826132fb565b602082019050919050565b5f60a0820190506133585f830187612885565b6133656020830186612885565b6133726040830185612a61565b61337f6060830184612a61565b818103608083015261339081613323565b905095945050505050565b7f4d6173746f646f6e3a206e6f7420737570706f727465640000000000000000005f82015250565b5f6133cf601783612eb3565b91506133da8261339b565b602082019050919050565b5f6020820190508181035f8301526133fc816133c3565b9050919050565b5f815f1c9050919050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f61343f61343a83613403565b61340e565b9050919050565b61344f8161270a565b82525050565b5f819050919050565b5f61347061346b83613403565b613455565b9050919050565b61348081612745565b82525050565b5f60ff82169050919050565b5f6134a461349f83613403565b613486565b9050919050565b6134b481612b07565b82525050565b5f60ff82169050919050565b5f6134d86134d383613403565b6134ba565b9050919050565b6134e881612b4d565b82525050565b60e082015f8083015490506135028161342d565b61350e5f860182613446565b506001830154905061351f8161342d565b61352c6020860182613446565b506002830154905061353d8161345e565b61354a6040860182613477565b506003830154905061355b8161345e565b6135686060860182613477565b506004830154905061357981613492565b61358660808601826134ab565b50600583015490506135978161345e565b6135a460a0860182613477565b50600683015490506135b5816134c6565b6135c260c08601826134df565b5050505050565b5f60e0820190506135dc5f8301846134ee565b92915050565b7f4d6173746f646f6e3a206e6f7420746865206f72646572206f776e65720000005f82015250565b5f613616601d83612eb3565b9150613621826135e2565b602082019050919050565b5f6020820190508181035f8301526136438161360a565b9050919050565b60e082015f82015161365e5f850182613446565b5060208201516136716020850182613446565b5060408201516136846040850182613477565b5060608201516136976060850182613477565b5060808201516136aa60808501826134ab565b5060a08201516136bd60a0850182613477565b5060c08201516136d060c08501826134df565b50505050565b5f60e0820190506136e95f83018461364a565b92915050565b5f6136f982612745565b915061370483612745565b925082820261371281612745565b9150828204841483151761372957613728613089565b5b5092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b5f61376782612745565b915061377283612745565b92508261378257613781613730565b5b828204905092915050565b7f4d6173746f646f6e3a20696e76616c69642070726963650000000000000000005f82015250565b5f6137c1601783612eb3565b91506137cc8261378d565b602082019050919050565b5f6020820190508181035f8301526137ee816137b5565b9050919050565b7f4d6173746f646f6e3a20312e5061796d656e74206661696c65642e00000000005f82015250565b5f613829601b83612eb3565b9150613834826137f5565b602082019050919050565b5f6020820190508181035f8301526138568161381d565b9050919050565b7f4d6173746f646f6e3a20322e5061796d656e74206661696c65642e00000000005f82015250565b5f613891601b83612eb3565b915061389c8261385d565b602082019050919050565b5f6020820190508181035f8301526138be81613885565b9050919050565b7f4d6173746f646f6e3a20332e5061796d656e74206661696c65642e00000000005f82015250565b5f6138f9601b83612eb3565b9150613904826138c5565b602082019050919050565b5f6020820190508181035f830152613926816138ed565b9050919050565b60e082015f8083015490506139418161342d565b61394d5f860182613446565b506001830154905061395e8161342d565b61396b6020860182613446565b506002830154905061397c8161345e565b6139896040860182613477565b506003830154905061399a8161345e565b6139a76060860182613477565b50600483015490506139b881613492565b6139c560808601826134ab565b50600583015490506139d68161345e565b6139e360a0860182613477565b50600683015490506139f4816134c6565b613a0160c08601826134df565b5050505050565b5f60e082019050613a1b5f83018461392d565b92915050565b5f613a2f602084018461320f565b905092915050565b5f613a456020840184612764565b905092915050565b60408201613a5d5f830183613a21565b613a695f8501826134ab565b50613a776020830183613a37565b613a846020850182613477565b50505050565b5f604082019050613a9d5f830184613a4d565b92915050565b613aac816126b8565b8114613ab6575f80fd5b50565b5f81519050613ac781613aa3565b92915050565b5f60208284031215613ae257613ae1612630565b5b5f613aef84828501613ab9565b91505092915050565b7f5361666545524332303a204552433230206f7065726174696f6e20646964206e5f8201527f6f74207375636365656400000000000000000000000000000000000000000000602082015250565b5f613b52602a83612eb3565b9150613b5d82613af8565b604082019050919050565b5f6020820190508181035f830152613b7f81613b46565b9050919050565b7f416464726573733a20696e73756666696369656e742062616c616e636520666f5f8201527f722063616c6c0000000000000000000000000000000000000000000000000000602082015250565b5f613be0602683612eb3565b9150613beb82613b86565b604082019050919050565b5f6020820190508181035f830152613c0d81613bd4565b9050919050565b5f81519050919050565b5f5b83811015613c3b578082015181840152602081019050613c20565b5f8484015250505050565b5f613c5082613c14565b613c5a8185612e72565b9350613c6a818560208601613c1e565b80840191505092915050565b5f613c818284613c46565b915081905092915050565b7f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000005f82015250565b5f613cc0601d83612eb3565b9150613ccb82613c8c565b602082019050919050565b5f6020820190508181035f830152613ced81613cb4565b9050919050565b5f81519050919050565b5f601f19601f8301169050919050565b5f613d1882613cf4565b613d228185612eb3565b9350613d32818560208601613c1e565b613d3b81613cfe565b840191505092915050565b5f6020820190508181035f830152613d5e8184613d0e565b90509291505056fea2646970667358221220a24e5917d9393f0deffc9d40edb23824b5de90bf018255ed4db9cd44d9f849aa64736f6c6343000818003300000000000000000000000006450dee7fd2fb8e39061434babcfc05599a6fb800000000000000000000000080f0c1c49891dcfdd40b6e0f960f84e6042bcb6f0000000000000000000000008ff4596cdad4f8b1e1efac1592a5b7b586bc5ef3

Deployed Bytecode

0x60806040526004361061011e575f3560e01c806391cca3db1161009f578063d35bbaab11610063578063d35bbaab146103d0578063d890a870146103fa578063f23a6e6114610424578063f374189d14610460578063f68f7f68146104765761011e565b806391cca3db146102d8578063a85c38ef14610302578063af5bbd3514610344578063b19c6c801461036c578063bc197c81146103945761011e565b806377dca534116100e657806377dca534146102185780638280aaa41461024057806383e0de451461026857806387479487146102845780639055c515146102ae5761011e565b806301ffc9a7146101225780630e5e739c1461015e578063150b7a02146101885780631c85e1f1146101c45780635afe54d2146101ee575b5f80fd5b34801561012d575f80fd5b506101486004803603810190610143919061268d565b61048c565b60405161015591906126d2565b60405180910390f35b348015610169575f80fd5b50610172610492565b60405161017f91906126d2565b60405180910390f35b348015610193575f80fd5b506101ae60048036038101906101a991906127d9565b6104a5565b6040516101bb919061286c565b60405180910390f35b3480156101cf575f80fd5b506101d86104b9565b6040516101e59190612894565b60405180910390f35b3480156101f9575f80fd5b506102026104de565b60405161020f9190612908565b60405180910390f35b348015610223575f80fd5b5061023e60048036038101906102399190612976565b610502565b005b34801561024b575f80fd5b5061026660048036038101906102619190612a16565b610557565b005b610282600480360381019061027d9190612a16565b6105ad565b005b34801561028f575f80fd5b506102986106b5565b6040516102a59190612a70565b60405180910390f35b3480156102b9575f80fd5b506102c26106bb565b6040516102cf9190612908565b60405180910390f35b3480156102e3575f80fd5b506102ec6106df565b6040516102f99190612894565b60405180910390f35b34801561030d575f80fd5b5061032860048036038101906103239190612a89565b610703565b60405161033b9796959493929190612b6d565b60405180910390f35b34801561034f575f80fd5b5061036a60048036038101906103659190612bda565b610797565b005b348015610377575f80fd5b50610392600480360381019061038d9190612c5a565b610941565b005b34801561039f575f80fd5b506103ba60048036038101906103b59190612cd8565b6109fa565b6040516103c7919061286c565b60405180910390f35b3480156103db575f80fd5b506103e4610a11565b6040516103f19190612894565b60405180910390f35b348015610405575f80fd5b5061040e610a36565b60405161041b9190612a70565b60405180910390f35b34801561042f575f80fd5b5061044a60048036038101906104459190612daf565b610a3c565b604051610457919061286c565b60405180910390f35b34801561046b575f80fd5b50610474610a51565b005b348015610481575f80fd5b5061048a610bdc565b005b5f919050565b600360149054906101000a900460ff1681565b5f63150b7a0260e01b905095945050505050565b60035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b7f00000000000000000000000080f0c1c49891dcfdd40b6e0f960f84e6042bcb6f81565b61050a610c86565b5f8282905090505f5b818110156105495761053c84848381811061053157610530612e45565b5b905060a00201610cca565b8080600101915050610513565b5050610553611241565b5050565b61055f610c86565b5f8282905090505f5b8181101561059f5761059284848381811061058657610585612e45565b5b9050602002013561124a565b8080600101915050610568565b50506105a9611241565b5050565b6105b5610c86565b5f8282905090505f5b818110156105f5576105e88484838181106105dc576105db612e45565b5b9050602002013561177d565b80806001019150506105be565b505f4711156106a8575f3373ffffffffffffffffffffffffffffffffffffffff164760405161062390612e9f565b5f6040518083038185875af1925050503d805f811461065d576040519150601f19603f3d011682016040523d82523d5f602084013e610662565b606091505b50509050806106a6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161069d90612f0d565b60405180910390fd5b505b506106b1611241565b5050565b60045481565b7f00000000000000000000000006450dee7fd2fb8e39061434babcfc05599a6fb881565b7f0000000000000000000000005a5d0ad85762979caae341274f0eba22df8ecedd81565b6005602052805f5260405f205f91509050805f015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690806001015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690806002015490806003015490806004015f9054906101000a900460ff1690806005015490806006015f9054906101000a900460ff16905087565b60011515600360149054906101000a900460ff161515146107ed576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107e490612f75565b60405180910390fd5b7f0000000000000000000000005a5d0ad85762979caae341274f0eba22df8ecedd73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461087b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161087290612fdd565b60405180910390fd5b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16036108e9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108e09061306b565b60405180910390fd5b62093a80426108f891906130b6565b6004819055508060035f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b610949610c86565b818190508484905014610991576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161098890613133565b60405180910390fd5b5f8484905090505f5b818110156109ea576109dd8686838181106109b8576109b7612e45565b5b905060200201358585848181106109d2576109d1612e45565b5b9050604002016120ad565b808060010191505061099a565b50506109f4611241565b50505050565b5f63bc197c8160e01b905098975050505050505050565b60025f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60015481565b5f63f23a6e6160e01b90509695505050505050565b60011515600360149054906101000a900460ff16151514610aa7576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a9e90612f75565b60405180910390fd5b7f0000000000000000000000005a5d0ad85762979caae341274f0eba22df8ecedd73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610b35576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b2c90612fdd565b60405180910390fd5b6004544211610b79576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b709061319b565b60405180910390fd5b60035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1660025f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b7f0000000000000000000000005a5d0ad85762979caae341274f0eba22df8ecedd73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610c6a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c6190612fdd565b60405180910390fd5b5f600360146101000a81548160ff021916908315150217905550565b60025f5403610cc1576040517f3ee5aeb500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60025f81905550565b60015f815480929190610cdc906131b9565b91905055505f60055f60015481526020019081526020015f209050815f016020810190610d099190612bda565b815f015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081602001358160020181905550816060016020810190610d699190613223565b816004015f6101000a81548160ff02191690836002811115610d8e57610d8d612ab4565b5b02179055508160800135816005018190555033816001015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505f610e1e835f016020810190610df89190612bda565b7f80ac58cd000000000000000000000000000000000000000000000000000000006121f3565b90505f610e5c845f016020810190610e369190612bda565b7fd9b67a26000000000000000000000000000000000000000000000000000000006121f3565b9050818015610e69575080155b15610f1d575f836006015f6101000a81548160ff02191690836003811115610e9457610e93612ab4565b5b0217905550835f016020810190610eab9190612bda565b73ffffffffffffffffffffffffffffffffffffffff166342842e0e333087602001356040518463ffffffff1660e01b8152600401610eeb9392919061324e565b5f604051808303815f87803b158015610f02575f80fd5b505af1158015610f14573d5f803e3d5ffd5b50505050611201565b81158015610f285750805b15611036575f846040013511610f73576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f6a906132cd565b60405180910390fd5b836040013583600301819055506001836006015f6101000a81548160ff02191690836003811115610fa757610fa6612ab4565b5b0217905550835f016020810190610fbe9190612bda565b73ffffffffffffffffffffffffffffffffffffffff1663f242432a3330876020013588604001356040518563ffffffff1660e01b81526004016110049493929190613345565b5f604051808303815f87803b15801561101b575f80fd5b505af115801561102d573d5f803e3d5ffd5b50505050611200565b8180156110405750805b156111c4575f846040013503611100576002836006015f6101000a81548160ff0219169083600381111561107757611076612ab4565b5b0217905550835f01602081019061108e9190612bda565b73ffffffffffffffffffffffffffffffffffffffff166342842e0e333087602001356040518463ffffffff1660e01b81526004016110ce9392919061324e565b5f604051808303815f87803b1580156110e5575f80fd5b505af11580156110f7573d5f803e3d5ffd5b505050506111bf565b6003836006015f6101000a81548160ff0219169083600381111561112757611126612ab4565b5b021790555083604001358360030181905550835f01602081019061114b9190612bda565b73ffffffffffffffffffffffffffffffffffffffff1663f242432a3330876020013588604001356040518563ffffffff1660e01b81526004016111919493929190613345565b5f604051808303815f87803b1580156111a8575f80fd5b505af11580156111ba573d5f803e3d5ffd5b505050505b6111ff565b6040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111f6906133e5565b60405180910390fd5b5b5b6001547f957f8b455632d2c7d179f71128c71eb5d88027f042d282ef210b64f6c06ed9808460405161123391906135c9565b60405180910390a250505050565b60015f81905550565b3373ffffffffffffffffffffffffffffffffffffffff1660055f8381526020019081526020015f206001015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146112eb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112e29061362c565b60405180910390fd5b5f60055f8381526020019081526020015f206040518060e00160405290815f82015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001600182015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016002820154815260200160038201548152602001600482015f9054906101000a900460ff1660028111156113e9576113e8612ab4565b5b60028111156113fb576113fa612ab4565b5b815260200160058201548152602001600682015f9054906101000a900460ff16600381111561142d5761142c612ab4565b5b600381111561143f5761143e612ab4565b5b8152505090505f600381111561145857611457612ab4565b5b8160c00151600381111561146f5761146e612ab4565b5b14806114a357506002600381111561148a57611489612ab4565b5b8160c0015160038111156114a1576114a0612ab4565b5b145b1561155d5760055f8381526020019081526020015f205f015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166342842e0e303360055f8781526020019081526020015f20600201546040518463ffffffff1660e01b815260040161152b9392919061324e565b5f604051808303815f87803b158015611542575f80fd5b505af1158015611554573d5f803e3d5ffd5b505050506116a7565b6001600381111561157157611570612ab4565b5b8160c00151600381111561158857611587612ab4565b5b14806115bb57506003808111156115a2576115a1612ab4565b5b8160c0015160038111156115b9576115b8612ab4565b5b145b1561166b5760055f8381526020019081526020015f205f015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f242432a3033846040015185606001516040518563ffffffff1660e01b81526004016116399493929190613345565b5f604051808303815f87803b158015611650575f80fd5b505af1158015611662573d5f803e3d5ffd5b505050506116a6565b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161169d906133e5565b60405180910390fd5b5b817f3bb2460a03b33f98a5d5cda2bed0f19ec4376a1f83bf76599e4d5113fa6dcb61826040516116d791906136d6565b60405180910390a260055f8381526020019081526020015f205f8082015f6101000a81549073ffffffffffffffffffffffffffffffffffffffff0219169055600182015f6101000a81549073ffffffffffffffffffffffffffffffffffffffff0219169055600282015f9055600382015f9055600482015f6101000a81549060ff0219169055600582015f9055600682015f6101000a81549060ff021916905550505050565b5f60055f8381526020019081526020015f206040518060e00160405290815f82015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001600182015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016002820154815260200160038201548152602001600482015f9054906101000a900460ff16600281111561187b5761187a612ab4565b5b600281111561188d5761188c612ab4565b5b815260200160058201548152602001600682015f9054906101000a900460ff1660038111156118bf576118be612ab4565b5b60038111156118d1576118d0612ab4565b5b8152505090505f8160a0015190505f61271061ffff1661251c836118f591906136ef565b6118ff919061375d565b90505f61271061ffff16609660ff168461191991906136ef565b611923919061375d565b90505f61271061ffff1661015e61ffff168561193f91906136ef565b611949919061375d565b90505f600281111561195e5761195d612ab4565b5b8560800151600281111561197557611974612ab4565b5b03611c0257834710156119bd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119b4906137d7565b60405180910390fd5b5f856020015173ffffffffffffffffffffffffffffffffffffffff16846040516119e690612e9f565b5f6040518083038185875af1925050503d805f8114611a20576040519150601f19603f3d011682016040523d82523d5f602084013e611a25565b606091505b5050905080611a69576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a609061383f565b60405180910390fd5b7f0000000000000000000000005a5d0ad85762979caae341274f0eba22df8ecedd73ffffffffffffffffffffffffffffffffffffffff1683604051611aad90612e9f565b5f6040518083038185875af1925050503d805f8114611ae7576040519150601f19603f3d011682016040523d82523d5f602084013e611aec565b606091505b50508091505080611b32576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b29906138a7565b60405180910390fd5b60025f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1682604051611b7790612e9f565b5f6040518083038185875af1925050503d805f8114611bb1576040519150601f19603f3d011682016040523d82523d5f602084013e611bb6565b606091505b50508091505080611bfc576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611bf39061390f565b60405180910390fd5b50611e72565b60016002811115611c1657611c15612ab4565b5b85608001516002811115611c2d57611c2c612ab4565b5b03611d6357611c83338660200151857f00000000000000000000000006450dee7fd2fb8e39061434babcfc05599a6fb873ffffffffffffffffffffffffffffffffffffffff16612217909392919063ffffffff16565b611cf0337f0000000000000000000000005a5d0ad85762979caae341274f0eba22df8ecedd847f00000000000000000000000006450dee7fd2fb8e39061434babcfc05599a6fb873ffffffffffffffffffffffffffffffffffffffff16612217909392919063ffffffff16565b611d5e3360025f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16837f00000000000000000000000006450dee7fd2fb8e39061434babcfc05599a6fb873ffffffffffffffffffffffffffffffffffffffff16612217909392919063ffffffff16565b611e71565b611db4338660200151857f00000000000000000000000080f0c1c49891dcfdd40b6e0f960f84e6042bcb6f73ffffffffffffffffffffffffffffffffffffffff16612217909392919063ffffffff16565b611e21337f0000000000000000000000005a5d0ad85762979caae341274f0eba22df8ecedd847f00000000000000000000000080f0c1c49891dcfdd40b6e0f960f84e6042bcb6f73ffffffffffffffffffffffffffffffffffffffff16612217909392919063ffffffff16565b611e703361dead837f00000000000000000000000080f0c1c49891dcfdd40b6e0f960f84e6042bcb6f73ffffffffffffffffffffffffffffffffffffffff16612217909392919063ffffffff16565b5b5b5f6003811115611e8557611e84612ab4565b5b8560c001516003811115611e9c57611e9b612ab4565b5b1480611ed0575060026003811115611eb757611eb6612ab4565b5b8560c001516003811115611ece57611ecd612ab4565b5b145b15611f4b57845f015173ffffffffffffffffffffffffffffffffffffffff166342842e0e303388604001516040518463ffffffff1660e01b8152600401611f199392919061324e565b5f604051808303815f87803b158015611f30575f80fd5b505af1158015611f42573d5f803e3d5ffd5b50505050611fc3565b845f015173ffffffffffffffffffffffffffffffffffffffff1663f242432a3033886040015189606001516040518563ffffffff1660e01b8152600401611f959493929190613345565b5f604051808303815f87803b158015611fac575f80fd5b505af1158015611fbe573d5f803e3d5ffd5b505050505b857f2eb7f9b07b6544cac22c4eecfde986c5c3e19b322c328044551d77616336216160055f8981526020019081526020015f206040516120039190613a08565b60405180910390a260055f8781526020019081526020015f205f8082015f6101000a81549073ffffffffffffffffffffffffffffffffffffffff0219169055600182015f6101000a81549073ffffffffffffffffffffffffffffffffffffffff0219169055600282015f9055600382015f9055600482015f6101000a81549060ff0219169055600582015f9055600682015f6101000a81549060ff02191690555050505050505050565b3373ffffffffffffffffffffffffffffffffffffffff1660055f8481526020019081526020015f206001015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461214e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016121459061362c565b60405180910390fd5b805f0160208101906121609190613223565b60055f8481526020019081526020015f206004015f6101000a81548160ff0219169083600281111561219557612194612ab4565b5b0217905550806020013560055f8481526020019081526020015f2060050181905550817f734ff158e0f303483bae1158d0eb4ab1384156c82bb25ac21ac5320b65278998826040516121e79190613a8a565b60405180910390a25050565b5f6121fd836122a0565b801561220f575061220e83836122ec565b5b905092915050565b61229a846323b872dd60e01b8585856040516024016122389392919061324e565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506123a5565b50505050565b5f6122cb827f01ffc9a7000000000000000000000000000000000000000000000000000000006122ec565b80156122e557506122e38263ffffffff60e01b6122ec565b155b9050919050565b5f806301ffc9a760e01b83604051602401612307919061286c565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff838183161783525050505090505f805f60205f8551602087018a617530fa92503d91505f51905082801561238e575060208210155b801561239957505f81115b94505050505092915050565b5f612406826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff1661246b9092919063ffffffff16565b90505f815114806124275750808060200190518101906124269190613acd565b5b612466576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161245d90613b68565b60405180910390fd5b505050565b606061247984845f85612482565b90509392505050565b6060824710156124c7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016124be90613bf6565b60405180910390fd5b5f808673ffffffffffffffffffffffffffffffffffffffff1685876040516124ef9190613c76565b5f6040518083038185875af1925050503d805f8114612529576040519150601f19603f3d011682016040523d82523d5f602084013e61252e565b606091505b509150915061253f8783838761254b565b92505050949350505050565b606083156125ac575f8351036125a457612564856125bf565b6125a3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161259a90613cd6565b60405180910390fd5b5b8290506125b7565b6125b683836125e1565b5b949350505050565b5f808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b5f825111156125f35781518083602001fd5b806040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016126279190613d46565b60405180910390fd5b5f80fd5b5f80fd5b5f7fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b61266c81612638565b8114612676575f80fd5b50565b5f8135905061268781612663565b92915050565b5f602082840312156126a2576126a1612630565b5b5f6126af84828501612679565b91505092915050565b5f8115159050919050565b6126cc816126b8565b82525050565b5f6020820190506126e55f8301846126c3565b92915050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f612714826126eb565b9050919050565b6127248161270a565b811461272e575f80fd5b50565b5f8135905061273f8161271b565b92915050565b5f819050919050565b61275781612745565b8114612761575f80fd5b50565b5f813590506127728161274e565b92915050565b5f80fd5b5f80fd5b5f80fd5b5f8083601f84011261279957612798612778565b5b8235905067ffffffffffffffff8111156127b6576127b561277c565b5b6020830191508360018202830111156127d2576127d1612780565b5b9250929050565b5f805f805f608086880312156127f2576127f1612630565b5b5f6127ff88828901612731565b955050602061281088828901612731565b945050604061282188828901612764565b935050606086013567ffffffffffffffff81111561284257612841612634565b5b61284e88828901612784565b92509250509295509295909350565b61286681612638565b82525050565b5f60208201905061287f5f83018461285d565b92915050565b61288e8161270a565b82525050565b5f6020820190506128a75f830184612885565b92915050565b5f819050919050565b5f6128d06128cb6128c6846126eb565b6128ad565b6126eb565b9050919050565b5f6128e1826128b6565b9050919050565b5f6128f2826128d7565b9050919050565b612902816128e8565b82525050565b5f60208201905061291b5f8301846128f9565b92915050565b5f8083601f84011261293657612935612778565b5b8235905067ffffffffffffffff8111156129535761295261277c565b5b6020830191508360a082028301111561296f5761296e612780565b5b9250929050565b5f806020838503121561298c5761298b612630565b5b5f83013567ffffffffffffffff8111156129a9576129a8612634565b5b6129b585828601612921565b92509250509250929050565b5f8083601f8401126129d6576129d5612778565b5b8235905067ffffffffffffffff8111156129f3576129f261277c565b5b602083019150836020820283011115612a0f57612a0e612780565b5b9250929050565b5f8060208385031215612a2c57612a2b612630565b5b5f83013567ffffffffffffffff811115612a4957612a48612634565b5b612a55858286016129c1565b92509250509250929050565b612a6a81612745565b82525050565b5f602082019050612a835f830184612a61565b92915050565b5f60208284031215612a9e57612a9d612630565b5b5f612aab84828501612764565b91505092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffd5b60038110612af257612af1612ab4565b5b50565b5f819050612b0282612ae1565b919050565b5f612b1182612af5565b9050919050565b612b2181612b07565b82525050565b60048110612b3857612b37612ab4565b5b50565b5f819050612b4882612b27565b919050565b5f612b5782612b3b565b9050919050565b612b6781612b4d565b82525050565b5f60e082019050612b805f83018a612885565b612b8d6020830189612885565b612b9a6040830188612a61565b612ba76060830187612a61565b612bb46080830186612b18565b612bc160a0830185612a61565b612bce60c0830184612b5e565b98975050505050505050565b5f60208284031215612bef57612bee612630565b5b5f612bfc84828501612731565b91505092915050565b5f8083601f840112612c1a57612c19612778565b5b8235905067ffffffffffffffff811115612c3757612c3661277c565b5b602083019150836040820283011115612c5357612c52612780565b5b9250929050565b5f805f8060408587031215612c7257612c71612630565b5b5f85013567ffffffffffffffff811115612c8f57612c8e612634565b5b612c9b878288016129c1565b9450945050602085013567ffffffffffffffff811115612cbe57612cbd612634565b5b612cca87828801612c05565b925092505092959194509250565b5f805f805f805f8060a0898b031215612cf457612cf3612630565b5b5f612d018b828c01612731565b9850506020612d128b828c01612731565b975050604089013567ffffffffffffffff811115612d3357612d32612634565b5b612d3f8b828c016129c1565b9650965050606089013567ffffffffffffffff811115612d6257612d61612634565b5b612d6e8b828c016129c1565b9450945050608089013567ffffffffffffffff811115612d9157612d90612634565b5b612d9d8b828c01612784565b92509250509295985092959890939650565b5f805f805f8060a08789031215612dc957612dc8612630565b5b5f612dd689828a01612731565b9650506020612de789828a01612731565b9550506040612df889828a01612764565b9450506060612e0989828a01612764565b935050608087013567ffffffffffffffff811115612e2a57612e29612634565b5b612e3689828a01612784565b92509250509295509295509295565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b5f81905092915050565b50565b5f612e8a5f83612e72565b9150612e9582612e7c565b5f82019050919050565b5f612ea982612e7f565b9150819050919050565b5f82825260208201905092915050565b7f4d6173746f646f6e3a2072656d61696e696e672066756e6473206661696c65645f82015250565b5f612ef7602083612eb3565b9150612f0282612ec3565b602082019050919050565b5f6020820190508181035f830152612f2481612eeb565b9050919050565b7f4d6173746f646f6e3a2072656e6f756e63656420746f206f776e6572736869705f82015250565b5f612f5f602083612eb3565b9150612f6a82612f2b565b602082019050919050565b5f6020820190508181035f830152612f8c81612f53565b9050919050565b7f4d6173746f646f6e3a206e6f74206465760000000000000000000000000000005f82015250565b5f612fc7601183612eb3565b9150612fd282612f93565b602082019050919050565b5f6020820190508181035f830152612ff481612fbb565b9050919050565b7f4d6173746f646f6e3a207a65726f2061646472657373206973206e6f7420616c5f8201527f6c6f776564000000000000000000000000000000000000000000000000000000602082015250565b5f613055602583612eb3565b915061306082612ffb565b604082019050919050565b5f6020820190508181035f83015261308281613049565b9050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f6130c082612745565b91506130cb83612745565b92508282019050808211156130e3576130e2613089565b5b92915050565b7f4d6173746f646f6e3a206c656e677468206469666600000000000000000000005f82015250565b5f61311d601583612eb3565b9150613128826130e9565b602082019050919050565b5f6020820190508181035f83015261314a81613111565b9050919050565b7f4d6173746f646f6e3a206e6f7420656e6f7567682074696d65207061737365645f82015250565b5f613185602083612eb3565b915061319082613151565b602082019050919050565b5f6020820190508181035f8301526131b281613179565b9050919050565b5f6131c382612745565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036131f5576131f4613089565b5b600182019050919050565b6003811061320c575f80fd5b50565b5f8135905061321d81613200565b92915050565b5f6020828403121561323857613237612630565b5b5f6132458482850161320f565b91505092915050565b5f6060820190506132615f830186612885565b61326e6020830185612885565b61327b6040830184612a61565b949350505050565b7f4d6173746f646f6e3a206572633131353520737570706c79203e2030000000005f82015250565b5f6132b7601c83612eb3565b91506132c282613283565b602082019050919050565b5f6020820190508181035f8301526132e4816132ab565b9050919050565b5f82825260208201905092915050565b7f30783000000000000000000000000000000000000000000000000000000000005f82015250565b5f61332f6003836132eb565b915061333a826132fb565b602082019050919050565b5f60a0820190506133585f830187612885565b6133656020830186612885565b6133726040830185612a61565b61337f6060830184612a61565b818103608083015261339081613323565b905095945050505050565b7f4d6173746f646f6e3a206e6f7420737570706f727465640000000000000000005f82015250565b5f6133cf601783612eb3565b91506133da8261339b565b602082019050919050565b5f6020820190508181035f8301526133fc816133c3565b9050919050565b5f815f1c9050919050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f61343f61343a83613403565b61340e565b9050919050565b61344f8161270a565b82525050565b5f819050919050565b5f61347061346b83613403565b613455565b9050919050565b61348081612745565b82525050565b5f60ff82169050919050565b5f6134a461349f83613403565b613486565b9050919050565b6134b481612b07565b82525050565b5f60ff82169050919050565b5f6134d86134d383613403565b6134ba565b9050919050565b6134e881612b4d565b82525050565b60e082015f8083015490506135028161342d565b61350e5f860182613446565b506001830154905061351f8161342d565b61352c6020860182613446565b506002830154905061353d8161345e565b61354a6040860182613477565b506003830154905061355b8161345e565b6135686060860182613477565b506004830154905061357981613492565b61358660808601826134ab565b50600583015490506135978161345e565b6135a460a0860182613477565b50600683015490506135b5816134c6565b6135c260c08601826134df565b5050505050565b5f60e0820190506135dc5f8301846134ee565b92915050565b7f4d6173746f646f6e3a206e6f7420746865206f72646572206f776e65720000005f82015250565b5f613616601d83612eb3565b9150613621826135e2565b602082019050919050565b5f6020820190508181035f8301526136438161360a565b9050919050565b60e082015f82015161365e5f850182613446565b5060208201516136716020850182613446565b5060408201516136846040850182613477565b5060608201516136976060850182613477565b5060808201516136aa60808501826134ab565b5060a08201516136bd60a0850182613477565b5060c08201516136d060c08501826134df565b50505050565b5f60e0820190506136e95f83018461364a565b92915050565b5f6136f982612745565b915061370483612745565b925082820261371281612745565b9150828204841483151761372957613728613089565b5b5092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b5f61376782612745565b915061377283612745565b92508261378257613781613730565b5b828204905092915050565b7f4d6173746f646f6e3a20696e76616c69642070726963650000000000000000005f82015250565b5f6137c1601783612eb3565b91506137cc8261378d565b602082019050919050565b5f6020820190508181035f8301526137ee816137b5565b9050919050565b7f4d6173746f646f6e3a20312e5061796d656e74206661696c65642e00000000005f82015250565b5f613829601b83612eb3565b9150613834826137f5565b602082019050919050565b5f6020820190508181035f8301526138568161381d565b9050919050565b7f4d6173746f646f6e3a20322e5061796d656e74206661696c65642e00000000005f82015250565b5f613891601b83612eb3565b915061389c8261385d565b602082019050919050565b5f6020820190508181035f8301526138be81613885565b9050919050565b7f4d6173746f646f6e3a20332e5061796d656e74206661696c65642e00000000005f82015250565b5f6138f9601b83612eb3565b9150613904826138c5565b602082019050919050565b5f6020820190508181035f830152613926816138ed565b9050919050565b60e082015f8083015490506139418161342d565b61394d5f860182613446565b506001830154905061395e8161342d565b61396b6020860182613446565b506002830154905061397c8161345e565b6139896040860182613477565b506003830154905061399a8161345e565b6139a76060860182613477565b50600483015490506139b881613492565b6139c560808601826134ab565b50600583015490506139d68161345e565b6139e360a0860182613477565b50600683015490506139f4816134c6565b613a0160c08601826134df565b5050505050565b5f60e082019050613a1b5f83018461392d565b92915050565b5f613a2f602084018461320f565b905092915050565b5f613a456020840184612764565b905092915050565b60408201613a5d5f830183613a21565b613a695f8501826134ab565b50613a776020830183613a37565b613a846020850182613477565b50505050565b5f604082019050613a9d5f830184613a4d565b92915050565b613aac816126b8565b8114613ab6575f80fd5b50565b5f81519050613ac781613aa3565b92915050565b5f60208284031215613ae257613ae1612630565b5b5f613aef84828501613ab9565b91505092915050565b7f5361666545524332303a204552433230206f7065726174696f6e20646964206e5f8201527f6f74207375636365656400000000000000000000000000000000000000000000602082015250565b5f613b52602a83612eb3565b9150613b5d82613af8565b604082019050919050565b5f6020820190508181035f830152613b7f81613b46565b9050919050565b7f416464726573733a20696e73756666696369656e742062616c616e636520666f5f8201527f722063616c6c0000000000000000000000000000000000000000000000000000602082015250565b5f613be0602683612eb3565b9150613beb82613b86565b604082019050919050565b5f6020820190508181035f830152613c0d81613bd4565b9050919050565b5f81519050919050565b5f5b83811015613c3b578082015181840152602081019050613c20565b5f8484015250505050565b5f613c5082613c14565b613c5a8185612e72565b9350613c6a818560208601613c1e565b80840191505092915050565b5f613c818284613c46565b915081905092915050565b7f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000005f82015250565b5f613cc0601d83612eb3565b9150613ccb82613c8c565b602082019050919050565b5f6020820190508181035f830152613ced81613cb4565b9050919050565b5f81519050919050565b5f601f19601f8301169050919050565b5f613d1882613cf4565b613d228185612eb3565b9350613d32818560208601613c1e565b613d3b81613cfe565b840191505092915050565b5f6020820190508181035f830152613d5e8184613d0e565b90509291505056fea2646970667358221220a24e5917d9393f0deffc9d40edb23824b5de90bf018255ed4db9cd44d9f849aa64736f6c63430008180033

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

00000000000000000000000006450dee7fd2fb8e39061434babcfc05599a6fb800000000000000000000000080f0c1c49891dcfdd40b6e0f960f84e6042bcb6f0000000000000000000000008ff4596cdad4f8b1e1efac1592a5b7b586bc5ef3

-----Decoded View---------------
Arg [0] : _xen (address): 0x06450dEe7FD2Fb8E39061434BAbCFC05599a6Fb8
Arg [1] : _dxn (address): 0x80f0C1c49891dcFDD40b6e0F960F84E6042bcB6F
Arg [2] : _dxnBuyBurn (address): 0x8ff4596Cdad4F8B1e1eFaC1592a5B7b586BC5eF3

-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 00000000000000000000000006450dee7fd2fb8e39061434babcfc05599a6fb8
Arg [1] : 00000000000000000000000080f0c1c49891dcfdd40b6e0f960f84e6042bcb6f
Arg [2] : 0000000000000000000000008ff4596cdad4f8b1e1efac1592a5b7b586bc5ef3


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

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

Validator Index Block Amount
View All Withdrawals

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

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.