ETH Price: $1,967.06 (+0.89%)

Token

Runbot (RUNBOT)

Overview

Max Total Supply

840 RUNBOT

Holders

58

Transfers

-
0

Market

Volume (24H)

N/A

Min Price (24H)

N/A

Max Price (24H)

N/A
Loading...
Loading
Loading...
Loading
Loading...
Loading

Click here to update the token information / general information

Contract Source Code Verified (Exact Match)

Contract Name:
Runbot

Compiler Version
v0.8.17+commit.8df45f5f

Optimization Enabled:
Yes with 100000 runs

Other Settings:
default evmVersion, MIT license

Contract Source Code (Solidity)

/**
 *Submitted for verification at Arbiscan.io on 2023-03-20
*/

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

// Version: 1.0.0

abstract contract A_Base{
}
// Version: 1.0.0


// Version: 1.0.0

// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)


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

interface I_Dust{
	function getETHDust() external;
	
	function getTokenDust(IERC20 token) external;
	
	receive() external payable;
	
	fallback() external payable;
}

// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)


// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)


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

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

/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * By default, the owner account will be the one that deploys the contract. This
 * can later be changed with {transferOwnership}.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
abstract contract Ownable is Context {
    address private _owner;

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

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor() {
        _transferOwnership(_msgSender());
    }

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

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

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

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

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

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

abstract contract A_Dust is A_Base, Ownable, I_Dust{
 
	function getETHDust() external onlyOwner {
		payable(owner()).transfer(address(this).balance);
	}
	
	function getTokenDust(IERC20 token) external onlyOwner {
		token.transfer(owner(), token.balanceOf(address(this)));
	}
	
	receive() external payable {
		payable(owner()).transfer(msg.value);
	}
	
	fallback() external payable{
		payable(owner()).transfer(msg.value);
	}
}



// Version: 1.0.0

interface I_Math{
    struct Fraction{
        uint256 numerator;
        uint256 denominator;
    }
}


interface I_Runbot_Fees is I_Math, I_Dust {
	
	////
	////
	////
	//////////////// Structs & Events ////////////////
    struct BorrowFees{
        uint256 feesMin;
        uint256 feesMax;
        uint256 durationMin;
        uint256 durationMax;
    }
	
	struct RoyaltyFees{
		address receiver;
		Fraction fees;
	}
	
	////
	////
	////
	//////////////// Public functions ////////////////
	function setTransferFees(uint256 fees) external ;
	
	function getTransferFees() external view returns (uint256);
	
	function getFeesBase(uint256 nftType) external view returns (uint256, Fraction memory, BorrowFees memory);
	
	function getFeesAddBase(uint256 nftType, uint256 nftSubType) external view returns (uint256, Fraction memory, BorrowFees memory);
	
	function getMintFeesType(uint256 nftType) external view returns (uint256);
	
	function getMintFeesTypeAdd(uint256 nftType, uint256 nftSubType) external view returns (uint256);
	
	function setFundingFees(uint256 nftType, uint256 numerator, uint256 denominator) external;
	
	function setMintFeesRebate(uint256 nbMint, uint256 numerator, uint256 denominator) external;
	
	function getMintFeesRebate() external view returns (uint256, Fraction memory);
	
	function setFundingFeesAdd(uint256 nftType, uint256 nftSubType, uint256 numerator, uint256 denominator) external;
	
	function setBaseFees(uint256 nftType, uint256 fees) external;
	
	function setBaseFeesAdd(uint256 nftType, uint256 nftSubType, uint256 fees) external;
	
	function setBorrowFees(uint256 nftType, uint256 feesMin, uint256 feesMax, uint256 durationMin, uint256 durationMax) external;
	
	function setBorrowFeesAdd(uint256 nftType, uint256 nftSubType, uint256 feesMin, uint256 feesMax, uint256 durationMin, uint256 durationMax) external;
	
	function setMintTypeFees(uint256 nftType, uint256 feesType) external;
	
	function setMintTypeFeesAdd(uint256 nftType, uint256 nftSubType, uint256 feesType) external;
	
	function addRoyaltyFees(uint256 nftType, address receiver, uint256 numerator, uint256 denominator) external;
	
	function addRoyaltyFeesAdd(uint256 nftType, uint256 nftSubType, address receiver, uint256 numerator, uint256 denominator) external;
	
	function updateRoyaltyFees(uint256 nftType, uint256 index, address receiver, uint256 numerator, uint256 denominator) external;
	
	function updateRoyaltyFeesAdd(uint256 nftType, uint256 nftSubType, uint256 index, address receiver, uint256 numerator, uint256 denominator) external;
	
	function deleteRoyaltyFees(uint256 nftType, uint256 index) external;
	
	function deleteRoyaltyFeesAdd(uint256 nftType, uint256 nftSubType, uint256 index) external;
	
	function getNbRoyaltyFees(uint256 nftType) external view returns (uint256);
	
	function getNbRoyaltyFeesAdd(uint256 nftType, uint256 nftSubType) external view returns (uint256);
	
	function getRoyaltyFees(uint256 nftType, uint256 index) external view returns (RoyaltyFees memory);
	
	function getRoyaltyFeesAdd(uint256 nftType, uint256 nftSubType, uint256 index) external view returns (RoyaltyFees memory);
	
	
	function getBaseFees(uint256 nftType, uint256 nftSubType, uint256 borrowDuration, bool isMint, uint256 mintNb) external view returns (uint256);
	
	
	function getFees(uint256 nftType, uint256 nftSubType, uint256 bidPrice, bool withFirstBuyRebate, uint256 initialBorrowDuration, uint256 currentBorrowDuration) external view returns (uint256);
	
	function dispatchRoyaltyTransferFees(uint256 nftType, uint256 nftSubType) external payable;
	
	function dispatchRoyaltySellFees(uint256 nftType, uint256 nftSubType) external payable;
	
	function dispatchRoyaltyMintFees(uint256 nftType, uint256 nftSubType) external payable;

}
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC721/extensions/IERC721Enumerable.sol)


// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC721/IERC721.sol)


// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)


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

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

/**
 * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension
 * @dev See https://eips.ethereum.org/EIPS/eip-721
 */
interface IERC721Enumerable is IERC721 {
    /**
     * @dev Returns the total amount of tokens stored by the contract.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns a token ID owned by `owner` at a given `index` of its token list.
     * Use along with {balanceOf} to enumerate all of ``owner``'s tokens.
     */
    function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256);

    /**
     * @dev Returns a token ID at a given `index` of all the tokens stored by the contract.
     * Use along with {totalSupply} to enumerate all tokens.
     */
    function tokenByIndex(uint256 index) external view returns (uint256);
}

/**
 *  @custom:security-contact [email protected]
 */
interface I_Runbot is I_Dust, IERC721, IERC721Enumerable {
	
	////
	////
	////
	//////////////// Structs & Events ////////////////
	event SetBidPrice(address indexed owner, uint256 indexed tokenId, uint256 bidPrice);
	event Buy(address indexed buyer, address indexed seller, uint256 indexed tokenId, uint256 bidPrice, uint256 fees);
	event Mint(address indexed minter, uint256 tokenId, uint256 nftType, uint256 nftSubType, uint256 bidPrice, uint256 borrowDuration, uint256 lockTimeout, bool withFirstBidRebate);
	event Move(address indexed from, address indexed to, uint256 indexed tokenId);
	
    struct MintAsk{
        address asker;
		uint256 nb;
        uint256 nftType;
        uint256 nftSubType;
        uint256 borrowDuration;
        uint256 bidPrice;
    }
    
    struct TransferAsk{
        address asker;
        address receiver;
        uint256 tokenId;
    }
	
	////
	////
	////
	//////////////// Public functions ////////////////
	function feesModel() external view returns (I_Runbot_Fees);
	
	function setFeesModel(I_Runbot_Fees feesModel_) external;
	
	function setBaseURI(string memory baseURI) external;
	
	
	function askTransfer(address receiver, uint256 tokenId) external payable returns (uint256);
	
	function getNbTransferAsks() external view returns (uint256);
	
	function getFirstTransferAsk() external view returns (uint256, TransferAsk memory);
	
	function completeTransferAsking(uint256 transferId, bool isApproved) external;
	
	
	function askMint(uint256 nb, uint256 nftType, uint256 nftSubType, uint256 borrowDuration, uint256 bidPrice) external payable returns (uint256);
	
	function getNbMintAsks() external view returns (uint256);
	
	function getFirstMintAsk() external view returns (uint256, MintAsk memory);
	
	function completeAskMint(uint256 mintId, uint256 lockTimeout, bool withFirstBidRebate, bool isApproved) external;
	
	function batchSafeMint(uint256 nb, address to, uint256 nftType, uint256 nftSubType, uint256 bidPrice, uint256 borrowDuration, uint256 lockTimeout, bool withFirstBidRebate) external;
	
	function batchSafeMintLinear(uint256 nb, address to, uint256 nftType, uint256 nftSubTypeStart, uint256 nftSubTypeAdd, uint256 bidPriceStart, uint256 bidPriceAdd, uint256 borrowDurationStart, uint256 borrowDurationAdd, uint256 lockTimeoutStart, uint256 lockTimeoutAdd, bool withFirstBidRebate) external;
	
	function safeMint(address to, uint256 nftType, uint256 nftSubType, uint256 bidPrice, uint256 borrowDuration, uint256 lockTimeout, bool withFirstBidRebate) external;
	
	function getNbMintedTokens() external view returns (uint256);
	
	function getNbMintedTokensByType(uint256 nftType) external view returns (uint256);
	
	function getNbMintedTokensBySubType(uint256 nftType, uint256 nftSubType) external view returns (uint256);
	
	function getTokenIdByType(uint256 nfttype, uint256 index) external view returns (uint256);
	
	function getTokenIdBySubType(uint256 nfttype, uint256 nftSubType, uint256 index) external view returns (uint256);
	
	function setBidPrice(uint256 tokenId, uint256 bidPrice) external;
	
	function batchSetBidPrice(uint256[] memory tokenIds, uint256[] memory bidPrices) external;
	
	function getBidPrice(uint256 tokenId) external view returns (uint256);
	
	function getInfos(uint256 tokenId) external view returns(uint256, uint256, uint256, uint256, bool, bool, uint256);
	
	function getFees(uint256 tokenId) external view returns (uint256);
	
	function buy(uint256 tokenId) external payable;
	
	function buyTo(address to, uint256 tokenId) external payable;
	
	function getBaseURI() external view returns (string memory);
	
}
// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC721/extensions/ERC721Enumerable.sol)


// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC721/ERC721.sol)


// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721Receiver.sol)


/**
 * @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);
}
// OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol)



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

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

    /**
     * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token.
     */
    function tokenURI(uint256 tokenId) external view returns (string memory);
}
// OpenZeppelin Contracts (last updated v4.8.0) (utils/Address.sol)


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

        return account.code.length > 0;
    }

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

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

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


// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/Math.sol)


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

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

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

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

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

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

            // Handle non-overflow cases, 256 by 256 division.
            if (prod1 == 0) {
                return prod0 / denominator;
            }

            // Make sure the result is less than 2^256. Also prevents denominator == 0.
            require(denominator > prod1);

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    /**
     * @dev Converts a `uint256` to its ASCII `string` decimal representation.
     */
    function toString(uint256 value) internal pure returns (string memory) {
        unchecked {
            uint256 length = Math.log10(value) + 1;
            string memory buffer = new string(length);
            uint256 ptr;
            /// @solidity memory-safe-assembly
            assembly {
                ptr := add(buffer, add(32, length))
            }
            while (true) {
                ptr--;
                /// @solidity memory-safe-assembly
                assembly {
                    mstore8(ptr, byte(mod(value, 10), _SYMBOLS))
                }
                value /= 10;
                if (value == 0) break;
            }
            return buffer;
        }
    }

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

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

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



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

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

    // Token name
    string private _name;

    // Token symbol
    string private _symbol;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        _approve(to, tokenId);
    }

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

        return _tokenApprovals[tokenId];
    }

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

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

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

        _transfer(from, to, tokenId);
    }

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

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

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients
     * are aware of the ERC721 protocol to prevent tokens from being forever locked.
     *
     * `data` is additional data, it has no specified format and it is sent in call to `to`.
     *
     * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g.
     * implement alternative mechanisms to perform token transfer, such as signature-based.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function _safeTransfer(
        address from,
        address to,
        uint256 tokenId,
        bytes memory data
    ) internal virtual {
        _transfer(from, to, tokenId);
        require(_checkOnERC721Received(from, to, tokenId, data), "ERC721: transfer to non ERC721Receiver implementer");
    }

    /**
     * @dev Returns the owner of the `tokenId`. Does NOT revert if token doesn't exist
     */
    function _ownerOf(uint256 tokenId) internal view virtual returns (address) {
        return _owners[tokenId];
    }

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

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

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

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

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

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

        // Check that tokenId was not minted by `_beforeTokenTransfer` hook
        require(!_exists(tokenId), "ERC721: token already minted");

        unchecked {
            // Will not overflow unless all 2**256 token ids are minted to the same owner.
            // Given that tokens are minted one by one, it is impossible in practice that
            // this ever happens. Might change if we allow batch minting.
            // The ERC fails to describe this case.
            _balances[to] += 1;
        }

        _owners[tokenId] = to;

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

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

    /**
     * @dev Destroys `tokenId`.
     * The approval is cleared when the token is burned.
     * This is an internal function that does not check if the sender is authorized to operate on the token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     *
     * Emits a {Transfer} event.
     */
    function _burn(uint256 tokenId) internal virtual {
        address owner = ERC721.ownerOf(tokenId);

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

        // Update ownership in case tokenId was transferred by `_beforeTokenTransfer` hook
        owner = ERC721.ownerOf(tokenId);

        // Clear approvals
        delete _tokenApprovals[tokenId];

        unchecked {
            // Cannot overflow, as that would require more tokens to be burned/transferred
            // out than the owner initially received through minting and transferring in.
            _balances[owner] -= 1;
        }
        delete _owners[tokenId];

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

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

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

        _beforeTokenTransfer(from, to, tokenId, 1);

        // Check that tokenId was not transferred by `_beforeTokenTransfer` hook
        require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer from incorrect owner");

        // Clear approvals from the previous owner
        delete _tokenApprovals[tokenId];

        unchecked {
            // `_balances[from]` cannot overflow for the same reason as described in `_burn`:
            // `from`'s balance is the number of token held, which is at least one before the current
            // transfer.
            // `_balances[to]` could overflow in the conditions described in `_mint`. That would require
            // all 2**256 token ids to be minted, which in practice is impossible.
            _balances[from] -= 1;
            _balances[to] += 1;
        }
        _owners[tokenId] = to;

        emit Transfer(from, to, tokenId);

        _afterTokenTransfer(from, to, tokenId, 1);
    }

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

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

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

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

    /**
     * @dev Hook that is called before any token transfer. This includes minting and burning. If {ERC721Consecutive} is
     * used, the hook may be called as part of a consecutive (batch) mint, as indicated by `batchSize` greater than 1.
     *
     * Calling conditions:
     *
     * - When `from` and `to` are both non-zero, ``from``'s tokens will be transferred to `to`.
     * - When `from` is zero, the tokens will be minted for `to`.
     * - When `to` is zero, ``from``'s tokens will be burned.
     * - `from` and `to` are never both zero.
     * - `batchSize` is non-zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _beforeTokenTransfer(
        address from,
        address to,
        uint256, /* firstTokenId */
        uint256 batchSize
    ) internal virtual {
        if (batchSize > 1) {
            if (from != address(0)) {
                _balances[from] -= batchSize;
            }
            if (to != address(0)) {
                _balances[to] += batchSize;
            }
        }
    }

    /**
     * @dev Hook that is called after any token transfer. This includes minting and burning. If {ERC721Consecutive} is
     * used, the hook may be called as part of a consecutive (batch) mint, as indicated by `batchSize` greater than 1.
     *
     * Calling conditions:
     *
     * - When `from` and `to` are both non-zero, ``from``'s tokens were transferred to `to`.
     * - When `from` is zero, the tokens were minted for `to`.
     * - When `to` is zero, ``from``'s tokens were burned.
     * - `from` and `to` are never both zero.
     * - `batchSize` is non-zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _afterTokenTransfer(
        address from,
        address to,
        uint256 firstTokenId,
        uint256 batchSize
    ) internal virtual {}
}

/**
 * @dev This implements an optional extension of {ERC721} defined in the EIP that adds
 * enumerability of all the token ids in the contract as well as all token ids owned by each
 * account.
 */
abstract contract ERC721Enumerable is ERC721, IERC721Enumerable {
    // Mapping from owner to list of owned token IDs
    mapping(address => mapping(uint256 => uint256)) private _ownedTokens;

    // Mapping from token ID to index of the owner tokens list
    mapping(uint256 => uint256) private _ownedTokensIndex;

    // Array with all token ids, used for enumeration
    uint256[] private _allTokens;

    // Mapping from token id to position in the allTokens array
    mapping(uint256 => uint256) private _allTokensIndex;

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

    /**
     * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}.
     */
    function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256) {
        require(index < ERC721.balanceOf(owner), "ERC721Enumerable: owner index out of bounds");
        return _ownedTokens[owner][index];
    }

    /**
     * @dev See {IERC721Enumerable-totalSupply}.
     */
    function totalSupply() public view virtual override returns (uint256) {
        return _allTokens.length;
    }

    /**
     * @dev See {IERC721Enumerable-tokenByIndex}.
     */
    function tokenByIndex(uint256 index) public view virtual override returns (uint256) {
        require(index < ERC721Enumerable.totalSupply(), "ERC721Enumerable: global index out of bounds");
        return _allTokens[index];
    }

    /**
     * @dev See {ERC721-_beforeTokenTransfer}.
     */
    function _beforeTokenTransfer(
        address from,
        address to,
        uint256 firstTokenId,
        uint256 batchSize
    ) internal virtual override {
        super._beforeTokenTransfer(from, to, firstTokenId, batchSize);

        if (batchSize > 1) {
            // Will only trigger during construction. Batch transferring (minting) is not available afterwards.
            revert("ERC721Enumerable: consecutive transfers not supported");
        }

        uint256 tokenId = firstTokenId;

        if (from == address(0)) {
            _addTokenToAllTokensEnumeration(tokenId);
        } else if (from != to) {
            _removeTokenFromOwnerEnumeration(from, tokenId);
        }
        if (to == address(0)) {
            _removeTokenFromAllTokensEnumeration(tokenId);
        } else if (to != from) {
            _addTokenToOwnerEnumeration(to, tokenId);
        }
    }

    /**
     * @dev Private function to add a token to this extension's ownership-tracking data structures.
     * @param to address representing the new owner of the given token ID
     * @param tokenId uint256 ID of the token to be added to the tokens list of the given address
     */
    function _addTokenToOwnerEnumeration(address to, uint256 tokenId) private {
        uint256 length = ERC721.balanceOf(to);
        _ownedTokens[to][length] = tokenId;
        _ownedTokensIndex[tokenId] = length;
    }

    /**
     * @dev Private function to add a token to this extension's token tracking data structures.
     * @param tokenId uint256 ID of the token to be added to the tokens list
     */
    function _addTokenToAllTokensEnumeration(uint256 tokenId) private {
        _allTokensIndex[tokenId] = _allTokens.length;
        _allTokens.push(tokenId);
    }

    /**
     * @dev Private function to remove a token from this extension's ownership-tracking data structures. Note that
     * while the token is not assigned a new owner, the `_ownedTokensIndex` mapping is _not_ updated: this allows for
     * gas optimizations e.g. when performing a transfer operation (avoiding double writes).
     * This has O(1) time complexity, but alters the order of the _ownedTokens array.
     * @param from address representing the previous owner of the given token ID
     * @param tokenId uint256 ID of the token to be removed from the tokens list of the given address
     */
    function _removeTokenFromOwnerEnumeration(address from, uint256 tokenId) private {
        // To prevent a gap in from's tokens array, we store the last token in the index of the token to delete, and
        // then delete the last slot (swap and pop).

        uint256 lastTokenIndex = ERC721.balanceOf(from) - 1;
        uint256 tokenIndex = _ownedTokensIndex[tokenId];

        // When the token to delete is the last token, the swap operation is unnecessary
        if (tokenIndex != lastTokenIndex) {
            uint256 lastTokenId = _ownedTokens[from][lastTokenIndex];

            _ownedTokens[from][tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token
            _ownedTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index
        }

        // This also deletes the contents at the last position of the array
        delete _ownedTokensIndex[tokenId];
        delete _ownedTokens[from][lastTokenIndex];
    }

    /**
     * @dev Private function to remove a token from this extension's token tracking data structures.
     * This has O(1) time complexity, but alters the order of the _allTokens array.
     * @param tokenId uint256 ID of the token to be removed from the tokens list
     */
    function _removeTokenFromAllTokensEnumeration(uint256 tokenId) private {
        // To prevent a gap in the tokens array, we store the last token in the index of the token to delete, and
        // then delete the last slot (swap and pop).

        uint256 lastTokenIndex = _allTokens.length - 1;
        uint256 tokenIndex = _allTokensIndex[tokenId];

        // When the token to delete is the last token, the swap operation is unnecessary. However, since this occurs so
        // rarely (when the last minted token is burnt) that we still do the swap here to avoid the gas cost of adding
        // an 'if' statement (like in _removeTokenFromOwnerEnumeration)
        uint256 lastTokenId = _allTokens[lastTokenIndex];

        _allTokens[tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token
        _allTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index

        // This also deletes the contents at the last position of the array
        delete _allTokensIndex[tokenId];
        _allTokens.pop();
    }
}
// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC721/extensions/ERC721URIStorage.sol)



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

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

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

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

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

        return super.tokenURI(tokenId);
    }

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

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

        if (bytes(_tokenURIs[tokenId]).length != 0) {
            delete _tokenURIs[tokenId];
        }
    }
}
// OpenZeppelin Contracts (last updated v4.8.0) (security/ReentrancyGuard.sol)


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

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

    uint256 private _status;

    constructor() {
        _status = _NOT_ENTERED;
    }

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

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

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

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

/**
 *  @custom:security-contact [email protected]
 */
contract Runbot is A_Base, Ownable, A_Dust, ReentrancyGuard, ERC721, ERC721Enumerable, ERC721URIStorage, I_Runbot {
	
	////
	////
	////
	//////////////// Public variables ////////////////
	I_Runbot_Fees public feesModel;
		
	////
	////
	////
	//////////////// Private variables ////////////////
	mapping(uint256 => uint256) private _nbMinted;
	mapping(uint256 => mapping(uint256 => uint256)) private _nbMintedSub;
	mapping(uint256 => uint256[]) private _mintedTokenIds;
	mapping(uint256 => mapping(uint256 => uint256[])) private _mintedSubTokenIds;
	
	
	uint256 private _lastTokenId;
	
	mapping(uint256 => uint256) private _nftTypes;
	mapping(uint256 => uint256) private _nftSubTypes;
	
	mapping(uint256 => MintAsk) private _mintAsks;
	uint256 private _mintAsksStart;
	uint256 private _mintAsksEnd;
	
	mapping(uint256 => TransferAsk) private _transferAsks;
	uint256 private _transferAsksStart;
	uint256 private _transferAsksEnd;
	
	mapping(uint256 => uint256) private _bidPrices;
	mapping(uint256 => uint256) private _borrowDuration;
	mapping(uint256 => uint256) private _borrowTimeout;
	mapping(uint256 => bool) private _isFirstBuy;
	mapping(uint256 => bool) private _withFirstBuyRebate;
	mapping(uint256 => uint256) private _lockTimeout;
	
	string private _baseURL;
	
	bool _initialized;
	
	////
	////
	////
	//////////////// Constructor & Modifiers ////////////////
	constructor() ERC721("Runbot", "RUNBOT") {
		_baseURL = "https://app.runbot.io/nft-metadata/";
	}
	
	////
	////
	////
	//////////////// Public functions ////////////////
	function setFeesModel(I_Runbot_Fees feesModel_) external onlyOwner {
		feesModel = feesModel_;
		_initialized = true;
	}
	
	function setBaseURI(string memory baseURI) external onlyOwner {
		_baseURL = baseURI;
	}
	
	
	function askTransfer(address receiver, uint256 tokenId) external payable nonReentrant returns (uint256){
		require(_initialized, "Runbot: Not initialized");
		
		address asker = _msgSender();
		
		uint256 transferFees = feesModel.getTransferFees();
		
		require(msg.value >= transferFees, "Runbot: Not enough transfer fees");
		require(ownerOf(tokenId) == asker, "Runbot: Caller is not token owner");
		require(_lockTimeout[tokenId] <= block.timestamp, "Runbot: Cannot transfer locked token");
		
		_transferAsks[_transferAsksEnd] = TransferAsk(asker, receiver, tokenId);
		_transferAsksEnd += 1;
		
		feesModel.dispatchRoyaltyMintFees{value:transferFees}(_nftTypes[tokenId], _nftSubTypes[tokenId]);
		
		return _transferAsksEnd - 1;
	}
	
	function getNbTransferAsks() external view returns (uint256){
		return _transferAsksEnd - _transferAsksStart;
	}
	
	function getFirstTransferAsk() external view returns (uint256, TransferAsk memory){
		require(_transferAsksStart < _transferAsksEnd, "Runbot: No transfer ask");
		
		return (_transferAsksStart, _transferAsks[_transferAsksStart]);
	}
	
	function completeTransferAsking(uint256 transferId, bool isApproved) external onlyOwner{
		require(transferId >= _transferAsksStart, "Runbot: Transfer ask already completed");
		require(transferId < _transferAsksEnd, "Runbot: Transfer ask does not exist");
		
		TransferAsk memory transferAsk = _transferAsks[transferId];
		
		uint256 tokenId = transferAsk.tokenId;
		
		if(isApproved){
			_safeTransfer(transferAsk.asker, transferAsk.receiver, tokenId, "");
			_bidPrices[tokenId] = 0;
			emit Move(transferAsk.asker, transferAsk.receiver, tokenId);
		}
		
		delete _transferAsks[transferId];
		_transferAsksStart += 1;
	}
	
	
	function askMint(uint256 nb, uint256 nftType, uint256 nftSubType, uint256 borrowDuration, uint256 bidPrice) external payable nonReentrant returns (uint256){
		require(_initialized, "Runbot: Not initialized");
		require(nb > 0, "Runbot: Cannot mint 0 token");
		
		(uint256 groupMintNbLimit,) = feesModel.getMintFeesRebate();
		
		require(nb <= groupMintNbLimit, "Runbot: Cannot mint so many tokens at once");
		
		uint256 fees = feesModel.getBaseFees(nftType, nftSubType, borrowDuration, true, nb);
		
		require(msg.value >= fees, "Runbot: Not enough mint fees");
		
		_mintAsks[_mintAsksEnd] = MintAsk(_msgSender(), nb, nftType, nftSubType, borrowDuration, bidPrice);
		_mintAsksEnd += 1;
		
		feesModel.dispatchRoyaltyMintFees{value:fees}(nftType, nftSubType);
		
		return _mintAsksEnd - 1;
	}
	
	function getNbMintAsks() external view returns (uint256){
		return _mintAsksEnd - _mintAsksStart;
	}
	
	function getFirstMintAsk() external view returns (uint256, MintAsk memory){
		require(_mintAsksStart < _mintAsksEnd, "Runbot: No mint ask");
		
		return (_mintAsksStart, _mintAsks[_mintAsksStart]);
	}
	
	function completeAskMint(uint256 mintId, uint256 lockTimeout, bool withFirstBidRebate, bool isApproved) external onlyOwner{
		require(mintId >= _mintAsksStart, "Runbot: Mint ask already completed");
		require(mintId < _mintAsksEnd, "Runbot: Mint ask does not exist");
		
		MintAsk memory mintAsk = _mintAsks[mintId];
		
		uint256 result = 0;
		
		if(isApproved){
			uint256 bidPrice = mintAsk.bidPrice;
			if (lockTimeout > block.timestamp){
				mintAsk.bidPrice = 0;
			}
			batchSafeMint(mintAsk.nb, mintAsk.asker, mintAsk.nftType, mintAsk.nftSubType, bidPrice, mintAsk.borrowDuration, lockTimeout, withFirstBidRebate);
		}
		
		delete _mintAsks[mintId];
		_mintAsksStart += 1;
	}
	
	function batchSafeMint(uint256 nb, address to, uint256 nftType, uint256 nftSubType, uint256 bidPrice, uint256 borrowDuration, uint256 lockTimeout, bool withFirstBidRebate) public onlyOwner{
		for (uint256 i = 0; i < nb; i++){
			safeMint(to, nftType, nftSubType, bidPrice, borrowDuration, lockTimeout, withFirstBidRebate);
		}
	}
	
	function batchSafeMintLinear(uint256 nb, address to, uint256 nftType, uint256 nftSubTypeStart, uint256 nftSubTypeAdd, uint256 bidPriceStart, uint256 bidPriceAdd, uint256 borrowDurationStart, uint256 borrowDurationAdd, uint256 lockTimeoutStart, uint256 lockTimeoutAdd, bool withFirstBidRebate) external onlyOwner{
		for (uint256 i = 0; i < nb; i++){
			safeMint(to, nftType, nftSubTypeStart + i * nftSubTypeAdd, bidPriceStart + i * bidPriceAdd, borrowDurationStart + i * borrowDurationAdd, lockTimeoutStart + i * lockTimeoutAdd, withFirstBidRebate);
		}
	}
	
	function safeMint(address to, uint256 nftType, uint256 nftSubType, uint256 bidPrice, uint256 borrowDuration, uint256 lockTimeout, bool withFirstBidRebate) public onlyOwner{
		require(_initialized, "Runbot: Not initialized");
		require(lockTimeout <= block.timestamp || bidPrice == 0, "Runbot: Cannot set bid price and lock timeout simulataneously");
		
		uint256 tokenId = _lastTokenId;
		_lastTokenId += 1;
		
		_safeMint(to, tokenId);
		_setTokenURI(tokenId, Strings.toString(tokenId));
		
		_nftTypes[tokenId] = nftType;
		_nftSubTypes[tokenId] = nftSubType;
		_bidPrices[tokenId] = bidPrice;
		_borrowDuration[tokenId] = borrowDuration;
		_isFirstBuy[tokenId] = true;
		_withFirstBuyRebate[tokenId] = withFirstBidRebate;
		_lockTimeout[tokenId] = lockTimeout;
		
		_nbMinted[nftType] += 1;
		_nbMintedSub[nftType][nftSubType] += 1;
		_mintedTokenIds[nftType].push(tokenId);
		_mintedSubTokenIds[nftType][nftSubType].push(tokenId);
		
		emit Mint(to, tokenId, nftType, nftSubType, bidPrice, borrowDuration, lockTimeout, withFirstBidRebate);
	}
	
	function getNbMintedTokens() external view returns (uint256){
		return _lastTokenId;
	}
	
	function getNbMintedTokensByType(uint256 nftType) external view returns (uint256){
		return _nbMinted[nftType];
	}
	
	function getNbMintedTokensBySubType(uint256 nftType, uint256 nftSubType) external view returns (uint256){
		return _nbMintedSub[nftType][nftSubType];
	}
	
	function getTokenIdByType(uint256 nfttype, uint256 index) external view returns (uint256){
		return _mintedTokenIds[nfttype][index];
	}
	
	function getTokenIdBySubType(uint256 nfttype, uint256 nftSubType, uint256 index) external view returns (uint256){
		return _mintedSubTokenIds[nfttype][nftSubType][index];
	}
	
	function setBidPrice(uint256 tokenId, uint256 bidPrice) external nonReentrant{
		_setBidPrice(tokenId, bidPrice);
	}
	
	function batchSetBidPrice(uint256[] memory tokenIds, uint256[] memory bidPrices) external nonReentrant{
		require(tokenIds.length == bidPrices.length, "Runbot: tokenIds and bidPrices must have the same length");
		
		for (uint256 i = 0; i < tokenIds.length; i++){
			_setBidPrice(tokenIds[i], bidPrices[i]);
		}
	}
	
	function getBidPrice(uint256 tokenId) external view returns (uint256){
		return _bidPrices[tokenId];
	}
	
	function getInfos(uint256 tokenId) public view returns(uint256, uint256, uint256, uint256, bool, bool, uint256){
		return (_nftTypes[tokenId], _nftSubTypes[tokenId], _borrowDuration[tokenId], _borrowTimeout[tokenId], _isFirstBuy[tokenId], _withFirstBuyRebate[tokenId], _lockTimeout[tokenId]);
	}
	
	function getFees(uint256 tokenId) public view returns (uint256){
		uint256 bidPrice = _bidPrices[tokenId];
		bool isFirstBuy = _isFirstBuy[tokenId];
		uint256 initialBorrowDuration = _borrowDuration[tokenId];
		
		return feesModel.getFees(_nftTypes[tokenId], _nftSubTypes[tokenId], bidPrice, isFirstBuy && _withFirstBuyRebate[tokenId], initialBorrowDuration, _getCurrentBorrowDuration(tokenId));
	}
	
	function buy(uint256 tokenId) external payable nonReentrant{
		_buyTo(_msgSender(), tokenId);
	}
	
	function buyTo(address to, uint256 tokenId) external payable nonReentrant{
		_buyTo(to, tokenId);
	}
	
	function tokenURI(uint256 tokenId) public view override(ERC721, ERC721URIStorage) returns (string memory)
	{
		return super.tokenURI(tokenId);
	}
	
	function supportsInterface(bytes4 interfaceId) public view override(IERC165, ERC721, ERC721Enumerable) returns (bool)
	{
		return super.supportsInterface(interfaceId);
	}
	
	function getBaseURI() external view returns (string memory) {
		return _baseURL;
	}
	
	
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId,
        bytes memory data
    ) public virtual override(IERC721, ERC721) {
       require(false, "Runbot: NFT not directly transferable");
    }
	
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId
    ) public virtual override(IERC721, ERC721) {
       require(false, "Runbot: NFT not directly transferable");
    }
	
    function transferFrom(
        address from,
        address to,
        uint256 tokenId
    ) public virtual override(IERC721, ERC721) {
       require(false, "Runbot: NFT not directly transferable");
    }
	////
	////
	////
	//////////////// Private functions ////////////////
	function _buyTo(address to, uint256 tokenId) internal{
		require(_initialized, "Runbot: Not initialized");
		require(_lockTimeout[tokenId] <= block.timestamp, "Runbot: NFT locked");
		
		uint256 bidPrice = _bidPrices[tokenId];
		bool isFirstBuy = _isFirstBuy[tokenId];
		uint256 initialBorrowDuration = _borrowDuration[tokenId];
		
		require(bidPrice > 0, "Runbot: NFT not for sale");
		
		uint256 fees = feesModel.getFees(_nftTypes[tokenId], _nftSubTypes[tokenId], bidPrice, isFirstBuy && _withFirstBuyRebate[tokenId], initialBorrowDuration, _getCurrentBorrowDuration(tokenId));
		
		require(msg.value >= bidPrice + fees, "Runbot: Not enough funds");
		
		
		if (_isFirstBuy[tokenId]){
			_borrowTimeout[tokenId] = block.timestamp + initialBorrowDuration;
			_isFirstBuy[tokenId] = false;
		}
		
		_bidPrices[tokenId] = 0;
		
		feesModel.dispatchRoyaltySellFees{value:fees}(_nftTypes[tokenId], _nftSubTypes[tokenId]);
		
		address seller = ownerOf(tokenId);
		payable(seller).transfer(bidPrice);
		
		_safeTransfer(seller, to, tokenId, "");
		
		emit Buy(to, seller, tokenId, bidPrice, fees);
	}
	
	function _setBidPrice(uint256 tokenId, uint256 bidPrice) internal{
		require(_isApprovedOrOwner(_msgSender(), tokenId), "Runbot: Caller is not token owner or approved");
		require(_lockTimeout[tokenId] <= block.timestamp, "Runbot: Cannot set bid price while locked");
		
		_bidPrices[tokenId] = bidPrice;
		
		emit SetBidPrice(ownerOf(tokenId), tokenId, bidPrice);
	}
	
	function _getCurrentBorrowDuration(uint256 tokenId) private view returns (uint256){
		uint256 borrowDuration = _borrowDuration[tokenId];
		
		if (!_isFirstBuy[tokenId]){
			uint256 borrowTimeout = _borrowTimeout[tokenId];
			if (borrowTimeout > block.timestamp){
				borrowDuration = borrowTimeout - block.timestamp;
			}else{
				borrowDuration = 0;
			}
		}
		
		return borrowDuration;
	}
	
	function _baseURI() internal view override returns (string memory) {
		return _baseURL;
	}
	
	function _beforeTokenTransfer(address from, address to, uint256 tokenId, uint256 batchSize) internal override(ERC721, ERC721Enumerable)
	{
		super._beforeTokenTransfer(from, to, tokenId, batchSize);
	}
	
	function _burn(uint256 tokenId) internal override(ERC721, ERC721URIStorage) {
		super._burn(tokenId);
	}
}

Contract Security Audit

Contract ABI

API
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"buyer","type":"address"},{"indexed":true,"internalType":"address","name":"seller","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"bidPrice","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"fees","type":"uint256"}],"name":"Buy","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"minter","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"nftType","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"nftSubType","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"bidPrice","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"borrowDuration","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"lockTimeout","type":"uint256"},{"indexed":false,"internalType":"bool","name":"withFirstBidRebate","type":"bool"}],"name":"Mint","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Move","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"bidPrice","type":"uint256"}],"name":"SetBidPrice","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"stateMutability":"payable","type":"fallback"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"nb","type":"uint256"},{"internalType":"uint256","name":"nftType","type":"uint256"},{"internalType":"uint256","name":"nftSubType","type":"uint256"},{"internalType":"uint256","name":"borrowDuration","type":"uint256"},{"internalType":"uint256","name":"bidPrice","type":"uint256"}],"name":"askMint","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"askTransfer","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"nb","type":"uint256"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"nftType","type":"uint256"},{"internalType":"uint256","name":"nftSubType","type":"uint256"},{"internalType":"uint256","name":"bidPrice","type":"uint256"},{"internalType":"uint256","name":"borrowDuration","type":"uint256"},{"internalType":"uint256","name":"lockTimeout","type":"uint256"},{"internalType":"bool","name":"withFirstBidRebate","type":"bool"}],"name":"batchSafeMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"nb","type":"uint256"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"nftType","type":"uint256"},{"internalType":"uint256","name":"nftSubTypeStart","type":"uint256"},{"internalType":"uint256","name":"nftSubTypeAdd","type":"uint256"},{"internalType":"uint256","name":"bidPriceStart","type":"uint256"},{"internalType":"uint256","name":"bidPriceAdd","type":"uint256"},{"internalType":"uint256","name":"borrowDurationStart","type":"uint256"},{"internalType":"uint256","name":"borrowDurationAdd","type":"uint256"},{"internalType":"uint256","name":"lockTimeoutStart","type":"uint256"},{"internalType":"uint256","name":"lockTimeoutAdd","type":"uint256"},{"internalType":"bool","name":"withFirstBidRebate","type":"bool"}],"name":"batchSafeMintLinear","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"},{"internalType":"uint256[]","name":"bidPrices","type":"uint256[]"}],"name":"batchSetBidPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"buy","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"buyTo","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"mintId","type":"uint256"},{"internalType":"uint256","name":"lockTimeout","type":"uint256"},{"internalType":"bool","name":"withFirstBidRebate","type":"bool"},{"internalType":"bool","name":"isApproved","type":"bool"}],"name":"completeAskMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"transferId","type":"uint256"},{"internalType":"bool","name":"isApproved","type":"bool"}],"name":"completeTransferAsking","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"feesModel","outputs":[{"internalType":"contract I_Runbot_Fees","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getBaseURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getBidPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getETHDust","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getFees","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getFirstMintAsk","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"components":[{"internalType":"address","name":"asker","type":"address"},{"internalType":"uint256","name":"nb","type":"uint256"},{"internalType":"uint256","name":"nftType","type":"uint256"},{"internalType":"uint256","name":"nftSubType","type":"uint256"},{"internalType":"uint256","name":"borrowDuration","type":"uint256"},{"internalType":"uint256","name":"bidPrice","type":"uint256"}],"internalType":"struct I_Runbot.MintAsk","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getFirstTransferAsk","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"components":[{"internalType":"address","name":"asker","type":"address"},{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"internalType":"struct I_Runbot.TransferAsk","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getInfos","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bool","name":"","type":"bool"},{"internalType":"bool","name":"","type":"bool"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getNbMintAsks","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getNbMintedTokens","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"nftType","type":"uint256"},{"internalType":"uint256","name":"nftSubType","type":"uint256"}],"name":"getNbMintedTokensBySubType","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"nftType","type":"uint256"}],"name":"getNbMintedTokensByType","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getNbTransferAsks","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"token","type":"address"}],"name":"getTokenDust","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"nfttype","type":"uint256"},{"internalType":"uint256","name":"nftSubType","type":"uint256"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"getTokenIdBySubType","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"nfttype","type":"uint256"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"getTokenIdByType","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"nftType","type":"uint256"},{"internalType":"uint256","name":"nftSubType","type":"uint256"},{"internalType":"uint256","name":"bidPrice","type":"uint256"},{"internalType":"uint256","name":"borrowDuration","type":"uint256"},{"internalType":"uint256","name":"lockTimeout","type":"uint256"},{"internalType":"bool","name":"withFirstBidRebate","type":"bool"}],"name":"safeMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"baseURI","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"bidPrice","type":"uint256"}],"name":"setBidPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract I_Runbot_Fees","name":"feesModel_","type":"address"}],"name":"setFeesModel","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":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]

60806040523480156200001157600080fd5b5060405180604001604052806006815260200165149d5b989bdd60d21b815250604051806040016040528060068152602001651495539093d560d21b8152506200006a62000064620000be60201b60201c565b620000c2565b6001805560026200007c8382620001b7565b5060036200008b8282620001b7565b5050506040518060600160405280602381526020016200554b60239139602190620000b79082620001b7565b5062000283565b3390565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b634e487b7160e01b600052604160045260246000fd5b600181811c908216806200013d57607f821691505b6020821081036200015e57634e487b7160e01b600052602260045260246000fd5b50919050565b601f821115620001b257600081815260208120601f850160051c810160208610156200018d5750805b601f850160051c820191505b81811015620001ae5782815560010162000199565b5050505b505050565b81516001600160401b03811115620001d357620001d362000112565b620001eb81620001e4845462000128565b8462000164565b602080601f8311600181146200022357600084156200020a5750858301515b600019600386901b1c1916600185901b178555620001ae565b600085815260208120601f198616915b82811015620002545788860151825594840194600190910190840162000233565b5085821015620002735787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b6152b880620002936000396000f3fe6080604052600436106103175760003560e01c8063714c53981161019a578063c87b56dd116100e1578063dcbace941161008a578063f0ecdbaa11610064578063f0ecdbaa14610a59578063f2fde38b14610a86578063fe42998714610aa65761037d565b8063dcbace94146109ce578063e611f8ba146109e3578063e985e9c514610a035761037d565b8063cfe018d7116100bb578063cfe018d714610963578063d5a06d4c1461099b578063d96a094a146109bb5761037d565b8063c87b56dd14610910578063c8dd638714610930578063cdd9544c146109435761037d565b806395d89b4111610143578063a22cb4651161011d578063a22cb465146108c2578063b88d4fde146108e2578063bbc7827e146108fd5761037d565b806395d89b41146108605780639b013aee146108755780639beb910a146108a25761037d565b80638da5cb5b116101745780638da5cb5b146107bf5780638f4188fa146107ea578063920927081461080a5761037d565b8063714c539814610780578063715018a61461079557806375ea7738146107aa5761037d565b806323b872dd1161025e57806355f804b3116102075780636352211e116101e15780636352211e14610720578063702185a31461074057806370a08231146107605761037d565b806355f804b3146106b35780635cdefb90146106d35780635f7bbd65146107005761037d565b806342842e0e1161023857806342842e0e1461059557806346c27e8c146105ea5780634f6ccce7146106935761037d565b806323b872dd146105955780632f745c59146105b557806338116b30146105d55761037d565b806310537900116102c05780631f70a9661161029a5780631f70a96614610535578063201995291461055557806322cebdc7146105755761037d565b8063105379001461048a57806316df0cae1461049f57806318160ddd146105165761037d565b8063081812fc116102f1578063081812fc14610412578063095ea7b31461045757806309bd4c31146104775761037d565b806301f899971461039b57806301ffc9a7146103bb57806306fdde03146103f05761037d565b3661037d5760005473ffffffffffffffffffffffffffffffffffffffff165b73ffffffffffffffffffffffffffffffffffffffff166108fc349081150290604051600060405180830381858888f1935050505015801561037b573d6000803e3d6000fd5b005b60005473ffffffffffffffffffffffffffffffffffffffff16610336565b3480156103a757600080fd5b5061037b6103b6366004614857565b610ac6565b3480156103c757600080fd5b506103db6103d63660046148e9565b610bcc565b60405190151581526020015b60405180910390f35b3480156103fc57600080fd5b50610405610bdd565b6040516103e79190614974565b34801561041e57600080fd5b5061043261042d366004614987565b610c6f565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016103e7565b34801561046357600080fd5b5061037b6104723660046149c2565b610ca3565b61037b6104853660046149c2565b610e2f565b34801561049657600080fd5b5061037b610e4a565b3480156104ab57600080fd5b506104b4610e9c565b60408051928352815173ffffffffffffffffffffffffffffffffffffffff166020808501919091528201518382015281015160608084019190915281015160808084019190915281015160a080840191909152015160c082015260e0016103e7565b34801561052257600080fd5b50600a545b6040519081526020016103e7565b34801561054157600080fd5b506105276105503660046149ee565b610fce565b34801561056157600080fd5b5061037b610570366004614a1e565b611001565b34801561058157600080fd5b5061037b610590366004614aba565b611090565b3480156105a157600080fd5b5061037b6105b0366004614b2d565b6110cf565b3480156105c157600080fd5b506105276105d03660046149c2565b611157565b3480156105e157600080fd5b50610527611226565b3480156105f657600080fd5b5061065a610605366004614987565b6000908152601360209081526040808320546014835281842054601c845282852054601d855283862054601e865284872054601f8752858820549680529490962054929691959094909360ff90811693911691565b60408051978852602088019690965294860193909352606085019190915215156080840152151560a083015260c082015260e0016103e7565b34801561069f57600080fd5b506105276106ae366004614987565b61123d565b3480156106bf57600080fd5b5061037b6106ce366004614be4565b6112fb565b3480156106df57600080fd5b506105276106ee366004614987565b6000908152600e602052604090205490565b34801561070c57600080fd5b5061037b61071b366004614c2d565b61130f565b34801561072c57600080fd5b5061043261073b366004614987565b611579565b34801561074c57600080fd5b5061037b61075b366004614c5d565b611605565b34801561076c57600080fd5b5061052761077b366004614c5d565b61176a565b34801561078c57600080fd5b50610405611838565b3480156107a157600080fd5b5061037b611847565b3480156107b657600080fd5b5061052761185b565b3480156107cb57600080fd5b5060005473ffffffffffffffffffffffffffffffffffffffff16610432565b3480156107f657600080fd5b5061037b6108053660046149ee565b61186d565b34801561081657600080fd5b5061081f61187f565b60408051928352815173ffffffffffffffffffffffffffffffffffffffff9081166020808601919091528301511683820152015160608201526080016103e7565b34801561086c57600080fd5b5061040561195f565b34801561088157600080fd5b50610527610890366004614987565b6000908152601b602052604090205490565b3480156108ae57600080fd5b506105276108bd366004614c7a565b61196e565b3480156108ce57600080fd5b5061037b6108dd366004614ca6565b6119ad565b3480156108ee57600080fd5b5061037b6105b0366004614cd4565b61052761090b366004614d54565b6119be565b34801561091c57600080fd5b5061040561092b366004614987565b611e83565b61052761093e3660046149c2565b611e8e565b34801561094f57600080fd5b5061037b61095e366004614d8f565b6122dc565b34801561096f57600080fd5b5061052761097e3660046149ee565b6000918252600f6020908152604080842092845291905290205490565b3480156109a757600080fd5b506105276109b6366004614987565b612504565b61037b6109c9366004614987565b612622565b3480156109da57600080fd5b50601254610527565b3480156109ef57600080fd5b5061037b6109fe366004614c5d565b61263d565b348015610a0f57600080fd5b506103db610a1e366004614dd9565b73ffffffffffffffffffffffffffffffffffffffff918216600090815260076020908152604080832093909416825291909152205460ff1690565b348015610a6557600080fd5b50600d546104329073ffffffffffffffffffffffffffffffffffffffff1681565b348015610a9257600080fd5b5061037b610aa1366004614c5d565b6126b7565b348015610ab257600080fd5b5061037b610ac1366004614e07565b61276b565b610ace612a44565b8051825114610b64576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603860248201527f52756e626f743a20746f6b656e49647320616e6420626964507269636573206d60448201527f7573742068617665207468652073616d65206c656e677468000000000000000060648201526084015b60405180910390fd5b60005b8251811015610bbe57610bac838281518110610b8557610b85614e70565b6020026020010151838381518110610b9f57610b9f614e70565b6020026020010151612ab7565b80610bb681614ece565b915050610b67565b50610bc860018055565b5050565b6000610bd782612c58565b92915050565b606060028054610bec90614f06565b80601f0160208091040260200160405190810160405280929190818152602001828054610c1890614f06565b8015610c655780601f10610c3a57610100808354040283529160200191610c65565b820191906000526020600020905b815481529060010190602001808311610c4857829003601f168201915b5050505050905090565b6000610c7a82612cae565b5060009081526006602052604090205473ffffffffffffffffffffffffffffffffffffffff1690565b6000610cae82611579565b90508073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603610d6b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560448201527f72000000000000000000000000000000000000000000000000000000000000006064820152608401610b5b565b3373ffffffffffffffffffffffffffffffffffffffff82161480610d945750610d948133610a1e565b610e20576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603d60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206f7220617070726f76656420666f7220616c6c0000006064820152608401610b5b565b610e2a8383612d39565b505050565b610e37612a44565b610e418282612dd9565b610bc860018055565b610e526132ba565b6000805460405173ffffffffffffffffffffffffffffffffffffffff909116914780156108fc02929091818181858888f19350505050158015610e99573d6000803e3d6000fd5b50565b6000610eed6040518060c00160405280600073ffffffffffffffffffffffffffffffffffffffff16815260200160008152602001600081526020016000815260200160008152602001600081525090565b60175460165410610f5a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f52756e626f743a204e6f206d696e742061736b000000000000000000000000006044820152606401610b5b565b5050601654600081815260156020908152604091829020825160c081018452815473ffffffffffffffffffffffffffffffffffffffff168152600182015492810192909252600281015492820192909252600382015460608201526004820154608082015260059091015460a08201529091565b6000828152601060205260408120805483908110610fee57610fee614e70565b9060005260206000200154905092915050565b6110096132ba565b60005b8c8110156110815761106f8c8c6110238c85614f59565b61102d908e614f70565b6110378b86614f59565b611041908d614f70565b61104b8a87614f59565b611055908c614f70565b61105f8988614f59565b611069908b614f70565b8861276b565b8061107981614ece565b91505061100c565b50505050505050505050505050565b6110986132ba565b60005b888110156110c4576110b28888888888888861276b565b806110bc81614ece565b91505061109b565b505050505050505050565b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f52756e626f743a204e4654206e6f74206469726563746c79207472616e73666560448201527f7261626c650000000000000000000000000000000000000000000000000000006064820152608401610b5b565b60006111628361176a565b82106111f0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201527f74206f6620626f756e64730000000000000000000000000000000000000000006064820152608401610b5b565b5073ffffffffffffffffffffffffffffffffffffffff919091166000908152600860209081526040808320938352929052205490565b6000601954601a546112389190614f83565b905090565b6000611248600a5490565b82106112d6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201527f7574206f6620626f756e647300000000000000000000000000000000000000006064820152608401610b5b565b600a82815481106112e9576112e9614e70565b90600052602060002001549050919050565b6113036132ba565b6021610bc88282614fe4565b6113176132ba565b6019548210156113a9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f52756e626f743a205472616e736665722061736b20616c726561647920636f6d60448201527f706c6574656400000000000000000000000000000000000000000000000000006064820152608401610b5b565b601a54821061143a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f52756e626f743a205472616e736665722061736b20646f6573206e6f7420657860448201527f69737400000000000000000000000000000000000000000000000000000000006064820152608401610b5b565b6000828152601860209081526040918290208251606081018452815473ffffffffffffffffffffffffffffffffffffffff90811682526001830154169281019290925260020154918101829052908215611510576114b182600001518360200151836040518060200160405280600081525061333b565b6000818152601b602090815260408083208390559084015184519151849373ffffffffffffffffffffffffffffffffffffffff92831693909216917fdeb3a6837278f6e9914a507e4d73f08e841d8fca434fb97d4307b3b0d3d6b10591a45b600084815260186020526040812080547fffffffffffffffffffffffff00000000000000000000000000000000000000009081168255600180830180549092169091556002909101829055601980549192909161156e908490614f70565b909155505050505050565b60008181526004602052604081205473ffffffffffffffffffffffffffffffffffffffff1680610bd7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f4552433732313a20696e76616c696420746f6b656e20494400000000000000006044820152606401610b5b565b61160d6132ba565b8073ffffffffffffffffffffffffffffffffffffffff1663a9059cbb61164860005473ffffffffffffffffffffffffffffffffffffffff1690565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff8516906370a0823190602401602060405180830381865afa1580156116b2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116d691906150fe565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b16815273ffffffffffffffffffffffffffffffffffffffff909216600483015260248201526044016020604051808303816000875af1158015611746573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bc89190615117565b600073ffffffffffffffffffffffffffffffffffffffff821661180f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f74206120766160448201527f6c6964206f776e657200000000000000000000000000000000000000000000006064820152608401610b5b565b5073ffffffffffffffffffffffffffffffffffffffff1660009081526005602052604090205490565b606060218054610bec90614f06565b61184f6132ba565b61185960006133de565b565b60006016546017546112389190614f83565b611875612a44565b610e418282612ab7565b60408051606081018252600080825260208201819052918101829052601a5460195410611908576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f52756e626f743a204e6f207472616e736665722061736b0000000000000000006044820152606401610b5b565b50506019546000818152601860209081526040918290208251606081018452815473ffffffffffffffffffffffffffffffffffffffff90811682526001830154169281019290925260020154918101919091529091565b606060038054610bec90614f06565b6000838152601160209081526040808320858452909152812080548390811061199957611999614e70565b906000526020600020015490509392505050565b610bc8338383613453565b50505050565b60006119c8612a44565b60225460ff16611a34576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f52756e626f743a204e6f7420696e697469616c697a65640000000000000000006044820152606401610b5b565b60008611611a9e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f52756e626f743a2043616e6e6f74206d696e74203020746f6b656e00000000006044820152606401610b5b565b600d54604080517eec4da1000000000000000000000000000000000000000000000000000000008152905160009273ffffffffffffffffffffffffffffffffffffffff169162ec4da19160048083019260609291908290030181865afa158015611b0c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b309190615134565b50905080871115611bc3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f52756e626f743a2043616e6e6f74206d696e7420736f206d616e7920746f6b6560448201527f6e73206174206f6e6365000000000000000000000000000000000000000000006064820152608401610b5b565b600d546040517fdf110488000000000000000000000000000000000000000000000000000000008152600481018890526024810187905260448101869052600160648201526084810189905260009173ffffffffffffffffffffffffffffffffffffffff169063df1104889060a401602060405180830381865afa158015611c4f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c7391906150fe565b905080341015611cdf576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f52756e626f743a204e6f7420656e6f756768206d696e742066656573000000006044820152606401610b5b565b6040518060c00160405280611cf13390565b73ffffffffffffffffffffffffffffffffffffffff1681526020018981526020018881526020018781526020018681526020018581525060156000601754815260200190815260200160002060008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506020820151816001015560408201518160020155606082015181600301556080820151816004015560a08201518160050155905050600160176000828254611dcc9190614f70565b9091555050600d546040517fd4d2f5d8000000000000000000000000000000000000000000000000000000008152600481018990526024810188905273ffffffffffffffffffffffffffffffffffffffff9091169063d4d2f5d89083906044016000604051808303818588803b158015611e4557600080fd5b505af1158015611e59573d6000803e3d6000fd5b50505050506001601754611e6d9190614f83565b92505050611e7a60018055565b95945050505050565b6060610bd782613580565b6000611e98612a44565b60225460ff16611f04576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f52756e626f743a204e6f7420696e697469616c697a65640000000000000000006044820152606401610b5b565b600d54604080517f0ce906070000000000000000000000000000000000000000000000000000000081529051339260009273ffffffffffffffffffffffffffffffffffffffff90911691630ce90607916004808201926020929091908290030181865afa158015611f79573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f9d91906150fe565b905080341015612009576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f52756e626f743a204e6f7420656e6f756768207472616e7366657220666565736044820152606401610b5b565b8173ffffffffffffffffffffffffffffffffffffffff1661202985611579565b73ffffffffffffffffffffffffffffffffffffffff16146120cc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602160248201527f52756e626f743a2043616c6c6572206973206e6f7420746f6b656e206f776e6560448201527f72000000000000000000000000000000000000000000000000000000000000006064820152608401610b5b565b6000848152602080526040902054421015612168576040517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048201526024808201527f52756e626f743a2043616e6e6f74207472616e73666572206c6f636b6564207460448201527f6f6b656e000000000000000000000000000000000000000000000000000000006064820152608401610b5b565b6040805160608101825273ffffffffffffffffffffffffffffffffffffffff80851682528781166020808401918252838501898152601a805460009081526018909352958220945185549085167fffffffffffffffffffffffff00000000000000000000000000000000000000009182161786559251600180870180549290961691909416179093559151600290930192909255825491929161220c908490614f70565b9091555050600d546000858152601360209081526040808320546014909252918290205491517fd4d2f5d800000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9093169263d4d2f5d892859261228e92909190600401918252602082015260400190565b6000604051808303818588803b1580156122a757600080fd5b505af11580156122bb573d6000803e3d6000fd5b50505050506001601a546122cf9190614f83565b92505050610bd760018055565b6122e46132ba565b601654841015612376576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f52756e626f743a204d696e742061736b20616c726561647920636f6d706c657460448201527f65640000000000000000000000000000000000000000000000000000000000006064820152608401610b5b565b60175484106123e1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f52756e626f743a204d696e742061736b20646f6573206e6f74206578697374006044820152606401610b5b565b6000848152601560209081526040808320815160c081018352815473ffffffffffffffffffffffffffffffffffffffff16815260018201549381019390935260028101549183019190915260038101546060830152600481015460808301526005015460a082015290821561248b5760a08201514286111561246557600060a08401525b61248983602001518460000151856040015186606001518588608001518c8c611090565b505b600086815260156020526040812080547fffffffffffffffffffffffff00000000000000000000000000000000000000001681556001808201839055600282018390556003820183905560048201839055600590910182905560168054919290916124f7908490614f70565b9091555050505050505050565b6000818152601b6020908152604080832054601e835281842054601c845282852054600d546013865284872054601490965293862054929460ff90921693909273ffffffffffffffffffffffffffffffffffffffff9091169163a083909e918686801561257f575060008a8152601f602052604090205460ff165b866125898c613683565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e089901b16815260048101969096526024860194909452604485019290925215156064840152608483015260a482015260c401602060405180830381865afa1580156125fe573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e7a91906150fe565b61262a612a44565b6126343382612dd9565b610e9960018055565b6126456132ba565b600d80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055602280547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055565b6126bf6132ba565b73ffffffffffffffffffffffffffffffffffffffff8116612762576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610b5b565b610e99816133de565b6127736132ba565b60225460ff166127df576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f52756e626f743a204e6f7420696e697469616c697a65640000000000000000006044820152606401610b5b565b42821115806127ec575083155b612878576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603d60248201527f52756e626f743a2043616e6e6f74207365742062696420707269636520616e6460448201527f206c6f636b2074696d656f75742073696d756c6174616e656f75736c790000006064820152608401610b5b565b6012805490600190600061288c8385614f70565b9091555061289c905088826136d8565b6128ae816128a9836136f2565b6137b0565b60008181526013602090815260408083208a905560148252808320899055601b8252808320889055601c8252808320879055601e8252808320805460017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff009182168117909255601f845282852080549091168715151790558280528184208790558a8452600e909252822080549192909161294a908490614f70565b90915550506000878152600f602090815260408083208984529091528120805460019290612979908490614f70565b90915550506000878152601060209081526040808320805460018082018355918552838520018590558a8452601183528184208a85528352818420805491820181558452928290209092018390558151838152908101899052908101879052606081018690526080810185905260a0810184905282151560c082015273ffffffffffffffffffffffffffffffffffffffff8916907fe3dbf380a595a9c8689ffa1f37d50b5893c82476efe9e1c209b8adf628c245a49060e00160405180910390a25050505050505050565b600260015403612ab0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610b5b565b6002600155565b612ac13383613879565b612b4d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f52756e626f743a2043616c6c6572206973206e6f7420746f6b656e206f776e6560448201527f72206f7220617070726f766564000000000000000000000000000000000000006064820152608401610b5b565b6000828152602080526040902054421015612bea576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602960248201527f52756e626f743a2043616e6e6f7420736574206269642070726963652077686960448201527f6c65206c6f636b656400000000000000000000000000000000000000000000006064820152608401610b5b565b6000828152601b6020526040902081905581612c0581611579565b73ffffffffffffffffffffffffffffffffffffffff167ff6883b6e03f0249ee984a32e1a41b3c807eeef7a8874cbf7f807d715632c8a9383604051612c4c91815260200190565b60405180910390a35050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f780e9d63000000000000000000000000000000000000000000000000000000001480610bd75750610bd782613938565b60008181526004602052604090205473ffffffffffffffffffffffffffffffffffffffff16610e99576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f4552433732313a20696e76616c696420746f6b656e20494400000000000000006044820152606401610b5b565b600081815260066020526040902080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff84169081179091558190612d9382611579565b73ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b60225460ff16612e45576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f52756e626f743a204e6f7420696e697469616c697a65640000000000000000006044820152606401610b5b565b6000818152602080526040902054421015612ebc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f52756e626f743a204e4654206c6f636b656400000000000000000000000000006044820152606401610b5b565b6000818152601b6020908152604080832054601e835281842054601c90935292205460ff9091169082612f4b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f52756e626f743a204e4654206e6f7420666f722073616c6500000000000000006044820152606401610b5b565b600d546000858152601360209081526040808320546014909252822054919273ffffffffffffffffffffffffffffffffffffffff169163a083909e919087878015612fa4575060008a8152601f602052604090205460ff165b87612fae8c613683565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e089901b16815260048101969096526024860194909452604485019290925215156064840152608483015260a482015260c401602060405180830381865afa158015613023573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061304791906150fe565b90506130538185614f70565b3410156130bc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f52756e626f743a204e6f7420656e6f7567682066756e647300000000000000006044820152606401610b5b565b6000858152601e602052604090205460ff161561311e576130dd8242614f70565b6000868152601d6020908152604080832093909355601e90522080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690555b6000858152601b60209081526040808320839055600d5460138352818420546014909352928190205490517fe8dbbd3c00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9093169263e8dbbd3c9285926131a292600401918252602082015260400190565b6000604051808303818588803b1580156131bb57600080fd5b505af11580156131cf573d6000803e3d6000fd5b505050505060006131df86611579565b60405190915073ffffffffffffffffffffffffffffffffffffffff82169086156108fc029087906000818181858888f19350505050158015613225573d6000803e3d6000fd5b506132418188886040518060200160405280600081525061333b565b858173ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff167ef93dbdb72854b6b6fb35433086556f2635fc83c37080c667496fecfa650fb488866040516132a9929190918252602082015260400190565b60405180910390a450505050505050565b60005473ffffffffffffffffffffffffffffffffffffffff163314611859576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610b5b565b613346848484613a1b565b61335284848484613d23565b6119b8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608401610b5b565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16036134e8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610b5b565b73ffffffffffffffffffffffffffffffffffffffff83811660008181526007602090815260408083209487168084529482529182902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b606061358b82612cae565b6000828152600c6020526040812080546135a490614f06565b80601f01602080910402602001604051908101604052809291908181526020018280546135d090614f06565b801561361d5780601f106135f25761010080835404028352916020019161361d565b820191906000526020600020905b81548152906001019060200180831161360057829003601f168201915b50505050509050600061362e611838565b90508051600003613640575092915050565b81511561367257808260405160200161365a9291906151be565b60405160208183030381529060405292505050919050565b61367b84613f16565b949350505050565b6000818152601c6020908152604080832054601e90925282205460ff16610bd7576000838152601d6020526040902054428111156136cc576136c54282614f83565b91506136d1565b600091505b5092915050565b610bc8828260405180602001604052806000815250613f7d565b606060006136ff83614020565b600101905060008167ffffffffffffffff81111561371f5761371f614759565b6040519080825280601f01601f191660200182016040528015613749576020820181803683370190505b5090508181016020015b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff017f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a850494508461375357509392505050565b60008281526004602052604090205473ffffffffffffffffffffffffffffffffffffffff16613861576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f45524337323155524953746f726167653a2055524920736574206f66206e6f6e60448201527f6578697374656e7420746f6b656e0000000000000000000000000000000000006064820152608401610b5b565b6000828152600c60205260409020610e2a8282614fe4565b60008061388583611579565b90508073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614806138f3575073ffffffffffffffffffffffffffffffffffffffff80821660009081526007602090815260408083209388168352929052205460ff165b8061367b57508373ffffffffffffffffffffffffffffffffffffffff1661391984610c6f565b73ffffffffffffffffffffffffffffffffffffffff1614949350505050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f80ac58cd0000000000000000000000000000000000000000000000000000000014806139cb57507fffffffff0000000000000000000000000000000000000000000000000000000082167f5b5e139f00000000000000000000000000000000000000000000000000000000145b80610bd757507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff00000000000000000000000000000000000000000000000000000000831614610bd7565b8273ffffffffffffffffffffffffffffffffffffffff16613a3b82611579565b73ffffffffffffffffffffffffffffffffffffffff1614613ade576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201527f6f776e65720000000000000000000000000000000000000000000000000000006064820152608401610b5b565b73ffffffffffffffffffffffffffffffffffffffff8216613b80576040517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152608401610b5b565b613b8d8383836001614102565b8273ffffffffffffffffffffffffffffffffffffffff16613bad82611579565b73ffffffffffffffffffffffffffffffffffffffff1614613c50576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201527f6f776e65720000000000000000000000000000000000000000000000000000006064820152608401610b5b565b600081815260066020908152604080832080547fffffffffffffffffffffffff000000000000000000000000000000000000000090811690915573ffffffffffffffffffffffffffffffffffffffff8781168086526005855283862080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01905590871680865283862080546001019055868652600490945282852080549092168417909155905184937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b600073ffffffffffffffffffffffffffffffffffffffff84163b15613f0b576040517f150b7a0200000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff85169063150b7a0290613d9a9033908990889088906004016151ed565b6020604051808303816000875af1925050508015613df3575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168201909252613df091810190615236565b60015b613ec0573d808015613e21576040519150601f19603f3d011682016040523d82523d6000602084013e613e26565b606091505b508051600003613eb8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608401610b5b565b805181602001fd5b7fffffffff00000000000000000000000000000000000000000000000000000000167f150b7a020000000000000000000000000000000000000000000000000000000014905061367b565b506001949350505050565b6060613f2182612cae565b6000613f2b611838565b90506000815111613f4b5760405180602001604052806000815250613f76565b80613f55846136f2565b604051602001613f669291906151be565b6040516020818303038152906040525b9392505050565b613f87838361410e565b613f946000848484613d23565b610e2a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608401610b5b565b6000807a184f03e93ff9f4daa797ed6e38ed64bf6a1f0100000000000000008310614069577a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000830492506040015b6d04ee2d6d415b85acef81000000008310614095576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc1000083106140b357662386f26fc10000830492506010015b6305f5e10083106140cb576305f5e100830492506008015b61271083106140df57612710830492506004015b606483106140f1576064830492506002015b600a8310610bd75760010192915050565b6119b884848484614341565b73ffffffffffffffffffffffffffffffffffffffff821661418b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610b5b565b60008181526004602052604090205473ffffffffffffffffffffffffffffffffffffffff1615614217576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610b5b565b614225600083836001614102565b60008181526004602052604090205473ffffffffffffffffffffffffffffffffffffffff16156142b1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610b5b565b73ffffffffffffffffffffffffffffffffffffffff8216600081815260056020908152604080832080546001019055848352600490915280822080547fffffffffffffffffffffffff0000000000000000000000000000000000000000168417905551839291907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b61434d848484846144f1565b60018111156143de576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603560248201527f455243373231456e756d657261626c653a20636f6e736563757469766520747260448201527f616e7366657273206e6f7420737570706f7274656400000000000000000000006064820152608401610b5b565b8173ffffffffffffffffffffffffffffffffffffffff85166144475761444281600a80546000838152600b60205260408120829055600182018355919091527fc65a7bb8d6351c1cf70c95a316cc6a92839c986682d98bc35f958f4883f9d2a80155565b614484565b8373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16146144845761448485826145a2565b73ffffffffffffffffffffffffffffffffffffffff84166144ad576144a881614659565b6144ea565b8473ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16146144ea576144ea8482614708565b5050505050565b60018111156119b85773ffffffffffffffffffffffffffffffffffffffff8416156145515773ffffffffffffffffffffffffffffffffffffffff84166000908152600560205260408120805483929061454b908490614f83565b90915550505b73ffffffffffffffffffffffffffffffffffffffff8316156119b85773ffffffffffffffffffffffffffffffffffffffff83166000908152600560205260408120805483929061156e908490614f70565b600060016145af8461176a565b6145b99190614f83565b6000838152600960205260409020549091508082146146195773ffffffffffffffffffffffffffffffffffffffff841660009081526008602090815260408083208584528252808320548484528184208190558352600990915290208190555b50600091825260096020908152604080842084905573ffffffffffffffffffffffffffffffffffffffff9094168352600881528383209183525290812055565b600a5460009061466b90600190614f83565b6000838152600b6020526040812054600a805493945090928490811061469357614693614e70565b9060005260206000200154905080600a83815481106146b4576146b4614e70565b6000918252602080832090910192909255828152600b9091526040808220849055858252812055600a8054806146ec576146ec615253565b6001900381819060005260206000200160009055905550505050565b60006147138361176a565b73ffffffffffffffffffffffffffffffffffffffff9093166000908152600860209081526040808320868452825280832085905593825260099052919091209190915550565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff811182821017156147cf576147cf614759565b604052919050565b600082601f8301126147e857600080fd5b8135602067ffffffffffffffff82111561480457614804614759565b8160051b614813828201614788565b928352848101820192828101908785111561482d57600080fd5b83870192505b8483101561484c57823582529183019190830190614833565b979650505050505050565b6000806040838503121561486a57600080fd5b823567ffffffffffffffff8082111561488257600080fd5b61488e868387016147d7565b935060208501359150808211156148a457600080fd5b506148b1858286016147d7565b9150509250929050565b7fffffffff0000000000000000000000000000000000000000000000000000000081168114610e9957600080fd5b6000602082840312156148fb57600080fd5b8135613f76816148bb565b60005b83811015614921578181015183820152602001614909565b50506000910152565b60008151808452614942816020860160208601614906565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b602081526000613f76602083018461492a565b60006020828403121561499957600080fd5b5035919050565b73ffffffffffffffffffffffffffffffffffffffff81168114610e9957600080fd5b600080604083850312156149d557600080fd5b82356149e0816149a0565b946020939093013593505050565b60008060408385031215614a0157600080fd5b50508035926020909101359150565b8015158114610e9957600080fd5b6000806000806000806000806000806000806101808d8f031215614a4157600080fd5b8c359b5060208d0135614a53816149a0565b9a5060408d0135995060608d0135985060808d0135975060a08d0135965060c08d0135955060e08d013594506101008d013593506101208d013592506101408d013591506101608d0135614aa681614a10565b809150509295989b509295989b509295989b565b600080600080600080600080610100898b031215614ad757600080fd5b883597506020890135614ae9816149a0565b965060408901359550606089013594506080890135935060a0890135925060c0890135915060e0890135614b1c81614a10565b809150509295985092959890939650565b600080600060608486031215614b4257600080fd5b8335614b4d816149a0565b92506020840135614b5d816149a0565b929592945050506040919091013590565b600067ffffffffffffffff831115614b8857614b88614759565b614bb960207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f86011601614788565b9050828152838383011115614bcd57600080fd5b828260208301376000602084830101529392505050565b600060208284031215614bf657600080fd5b813567ffffffffffffffff811115614c0d57600080fd5b8201601f81018413614c1e57600080fd5b61367b84823560208401614b6e565b60008060408385031215614c4057600080fd5b823591506020830135614c5281614a10565b809150509250929050565b600060208284031215614c6f57600080fd5b8135613f76816149a0565b600080600060608486031215614c8f57600080fd5b505081359360208301359350604090920135919050565b60008060408385031215614cb957600080fd5b8235614cc4816149a0565b91506020830135614c5281614a10565b60008060008060808587031215614cea57600080fd5b8435614cf5816149a0565b93506020850135614d05816149a0565b925060408501359150606085013567ffffffffffffffff811115614d2857600080fd5b8501601f81018713614d3957600080fd5b614d4887823560208401614b6e565b91505092959194509250565b600080600080600060a08688031215614d6c57600080fd5b505083359560208501359550604085013594606081013594506080013592509050565b60008060008060808587031215614da557600080fd5b84359350602085013592506040850135614dbe81614a10565b91506060850135614dce81614a10565b939692955090935050565b60008060408385031215614dec57600080fd5b8235614df7816149a0565b91506020830135614c52816149a0565b600080600080600080600060e0888a031215614e2257600080fd5b8735614e2d816149a0565b96506020880135955060408801359450606088013593506080880135925060a0880135915060c0880135614e6081614a10565b8091505092959891949750929550565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203614eff57614eff614e9f565b5060010190565b600181811c90821680614f1a57607f821691505b602082108103614f53577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b8082028115828204841417610bd757610bd7614e9f565b80820180821115610bd757610bd7614e9f565b81810381811115610bd757610bd7614e9f565b601f821115610e2a57600081815260208120601f850160051c81016020861015614fbd5750805b601f850160051c820191505b81811015614fdc57828155600101614fc9565b505050505050565b815167ffffffffffffffff811115614ffe57614ffe614759565b6150128161500c8454614f06565b84614f96565b602080601f831160018114615065576000841561502f5750858301515b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600386901b1c1916600185901b178555614fdc565b6000858152602081207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08616915b828110156150b257888601518255948401946001909101908401615093565b50858210156150ee57878501517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600388901b60f8161c191681555b5050505050600190811b01905550565b60006020828403121561511057600080fd5b5051919050565b60006020828403121561512957600080fd5b8151613f7681614a10565b600080828403606081121561514857600080fd5b8351925060407fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08201121561517c57600080fd5b506040516040810181811067ffffffffffffffff821117156151a0576151a0614759565b60409081526020858101518352940151938101939093525092909150565b600083516151d0818460208801614906565b8351908301906151e4818360208801614906565b01949350505050565b600073ffffffffffffffffffffffffffffffffffffffff80871683528086166020840152508360408301526080606083015261522c608083018461492a565b9695505050505050565b60006020828403121561524857600080fd5b8151613f76816148bb565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fdfea2646970667358221220e25eb3acf89f4987e45a2fb4d81e255e29e0323043fa4d59603df6308e5c688664736f6c6343000811003368747470733a2f2f6170702e72756e626f742e696f2f6e66742d6d657461646174612f

Deployed Bytecode

0x6080604052600436106103175760003560e01c8063714c53981161019a578063c87b56dd116100e1578063dcbace941161008a578063f0ecdbaa11610064578063f0ecdbaa14610a59578063f2fde38b14610a86578063fe42998714610aa65761037d565b8063dcbace94146109ce578063e611f8ba146109e3578063e985e9c514610a035761037d565b8063cfe018d7116100bb578063cfe018d714610963578063d5a06d4c1461099b578063d96a094a146109bb5761037d565b8063c87b56dd14610910578063c8dd638714610930578063cdd9544c146109435761037d565b806395d89b4111610143578063a22cb4651161011d578063a22cb465146108c2578063b88d4fde146108e2578063bbc7827e146108fd5761037d565b806395d89b41146108605780639b013aee146108755780639beb910a146108a25761037d565b80638da5cb5b116101745780638da5cb5b146107bf5780638f4188fa146107ea578063920927081461080a5761037d565b8063714c539814610780578063715018a61461079557806375ea7738146107aa5761037d565b806323b872dd1161025e57806355f804b3116102075780636352211e116101e15780636352211e14610720578063702185a31461074057806370a08231146107605761037d565b806355f804b3146106b35780635cdefb90146106d35780635f7bbd65146107005761037d565b806342842e0e1161023857806342842e0e1461059557806346c27e8c146105ea5780634f6ccce7146106935761037d565b806323b872dd146105955780632f745c59146105b557806338116b30146105d55761037d565b806310537900116102c05780631f70a9661161029a5780631f70a96614610535578063201995291461055557806322cebdc7146105755761037d565b8063105379001461048a57806316df0cae1461049f57806318160ddd146105165761037d565b8063081812fc116102f1578063081812fc14610412578063095ea7b31461045757806309bd4c31146104775761037d565b806301f899971461039b57806301ffc9a7146103bb57806306fdde03146103f05761037d565b3661037d5760005473ffffffffffffffffffffffffffffffffffffffff165b73ffffffffffffffffffffffffffffffffffffffff166108fc349081150290604051600060405180830381858888f1935050505015801561037b573d6000803e3d6000fd5b005b60005473ffffffffffffffffffffffffffffffffffffffff16610336565b3480156103a757600080fd5b5061037b6103b6366004614857565b610ac6565b3480156103c757600080fd5b506103db6103d63660046148e9565b610bcc565b60405190151581526020015b60405180910390f35b3480156103fc57600080fd5b50610405610bdd565b6040516103e79190614974565b34801561041e57600080fd5b5061043261042d366004614987565b610c6f565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016103e7565b34801561046357600080fd5b5061037b6104723660046149c2565b610ca3565b61037b6104853660046149c2565b610e2f565b34801561049657600080fd5b5061037b610e4a565b3480156104ab57600080fd5b506104b4610e9c565b60408051928352815173ffffffffffffffffffffffffffffffffffffffff166020808501919091528201518382015281015160608084019190915281015160808084019190915281015160a080840191909152015160c082015260e0016103e7565b34801561052257600080fd5b50600a545b6040519081526020016103e7565b34801561054157600080fd5b506105276105503660046149ee565b610fce565b34801561056157600080fd5b5061037b610570366004614a1e565b611001565b34801561058157600080fd5b5061037b610590366004614aba565b611090565b3480156105a157600080fd5b5061037b6105b0366004614b2d565b6110cf565b3480156105c157600080fd5b506105276105d03660046149c2565b611157565b3480156105e157600080fd5b50610527611226565b3480156105f657600080fd5b5061065a610605366004614987565b6000908152601360209081526040808320546014835281842054601c845282852054601d855283862054601e865284872054601f8752858820549680529490962054929691959094909360ff90811693911691565b60408051978852602088019690965294860193909352606085019190915215156080840152151560a083015260c082015260e0016103e7565b34801561069f57600080fd5b506105276106ae366004614987565b61123d565b3480156106bf57600080fd5b5061037b6106ce366004614be4565b6112fb565b3480156106df57600080fd5b506105276106ee366004614987565b6000908152600e602052604090205490565b34801561070c57600080fd5b5061037b61071b366004614c2d565b61130f565b34801561072c57600080fd5b5061043261073b366004614987565b611579565b34801561074c57600080fd5b5061037b61075b366004614c5d565b611605565b34801561076c57600080fd5b5061052761077b366004614c5d565b61176a565b34801561078c57600080fd5b50610405611838565b3480156107a157600080fd5b5061037b611847565b3480156107b657600080fd5b5061052761185b565b3480156107cb57600080fd5b5060005473ffffffffffffffffffffffffffffffffffffffff16610432565b3480156107f657600080fd5b5061037b6108053660046149ee565b61186d565b34801561081657600080fd5b5061081f61187f565b60408051928352815173ffffffffffffffffffffffffffffffffffffffff9081166020808601919091528301511683820152015160608201526080016103e7565b34801561086c57600080fd5b5061040561195f565b34801561088157600080fd5b50610527610890366004614987565b6000908152601b602052604090205490565b3480156108ae57600080fd5b506105276108bd366004614c7a565b61196e565b3480156108ce57600080fd5b5061037b6108dd366004614ca6565b6119ad565b3480156108ee57600080fd5b5061037b6105b0366004614cd4565b61052761090b366004614d54565b6119be565b34801561091c57600080fd5b5061040561092b366004614987565b611e83565b61052761093e3660046149c2565b611e8e565b34801561094f57600080fd5b5061037b61095e366004614d8f565b6122dc565b34801561096f57600080fd5b5061052761097e3660046149ee565b6000918252600f6020908152604080842092845291905290205490565b3480156109a757600080fd5b506105276109b6366004614987565b612504565b61037b6109c9366004614987565b612622565b3480156109da57600080fd5b50601254610527565b3480156109ef57600080fd5b5061037b6109fe366004614c5d565b61263d565b348015610a0f57600080fd5b506103db610a1e366004614dd9565b73ffffffffffffffffffffffffffffffffffffffff918216600090815260076020908152604080832093909416825291909152205460ff1690565b348015610a6557600080fd5b50600d546104329073ffffffffffffffffffffffffffffffffffffffff1681565b348015610a9257600080fd5b5061037b610aa1366004614c5d565b6126b7565b348015610ab257600080fd5b5061037b610ac1366004614e07565b61276b565b610ace612a44565b8051825114610b64576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603860248201527f52756e626f743a20746f6b656e49647320616e6420626964507269636573206d60448201527f7573742068617665207468652073616d65206c656e677468000000000000000060648201526084015b60405180910390fd5b60005b8251811015610bbe57610bac838281518110610b8557610b85614e70565b6020026020010151838381518110610b9f57610b9f614e70565b6020026020010151612ab7565b80610bb681614ece565b915050610b67565b50610bc860018055565b5050565b6000610bd782612c58565b92915050565b606060028054610bec90614f06565b80601f0160208091040260200160405190810160405280929190818152602001828054610c1890614f06565b8015610c655780601f10610c3a57610100808354040283529160200191610c65565b820191906000526020600020905b815481529060010190602001808311610c4857829003601f168201915b5050505050905090565b6000610c7a82612cae565b5060009081526006602052604090205473ffffffffffffffffffffffffffffffffffffffff1690565b6000610cae82611579565b90508073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603610d6b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560448201527f72000000000000000000000000000000000000000000000000000000000000006064820152608401610b5b565b3373ffffffffffffffffffffffffffffffffffffffff82161480610d945750610d948133610a1e565b610e20576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603d60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206f7220617070726f76656420666f7220616c6c0000006064820152608401610b5b565b610e2a8383612d39565b505050565b610e37612a44565b610e418282612dd9565b610bc860018055565b610e526132ba565b6000805460405173ffffffffffffffffffffffffffffffffffffffff909116914780156108fc02929091818181858888f19350505050158015610e99573d6000803e3d6000fd5b50565b6000610eed6040518060c00160405280600073ffffffffffffffffffffffffffffffffffffffff16815260200160008152602001600081526020016000815260200160008152602001600081525090565b60175460165410610f5a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f52756e626f743a204e6f206d696e742061736b000000000000000000000000006044820152606401610b5b565b5050601654600081815260156020908152604091829020825160c081018452815473ffffffffffffffffffffffffffffffffffffffff168152600182015492810192909252600281015492820192909252600382015460608201526004820154608082015260059091015460a08201529091565b6000828152601060205260408120805483908110610fee57610fee614e70565b9060005260206000200154905092915050565b6110096132ba565b60005b8c8110156110815761106f8c8c6110238c85614f59565b61102d908e614f70565b6110378b86614f59565b611041908d614f70565b61104b8a87614f59565b611055908c614f70565b61105f8988614f59565b611069908b614f70565b8861276b565b8061107981614ece565b91505061100c565b50505050505050505050505050565b6110986132ba565b60005b888110156110c4576110b28888888888888861276b565b806110bc81614ece565b91505061109b565b505050505050505050565b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f52756e626f743a204e4654206e6f74206469726563746c79207472616e73666560448201527f7261626c650000000000000000000000000000000000000000000000000000006064820152608401610b5b565b60006111628361176a565b82106111f0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201527f74206f6620626f756e64730000000000000000000000000000000000000000006064820152608401610b5b565b5073ffffffffffffffffffffffffffffffffffffffff919091166000908152600860209081526040808320938352929052205490565b6000601954601a546112389190614f83565b905090565b6000611248600a5490565b82106112d6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201527f7574206f6620626f756e647300000000000000000000000000000000000000006064820152608401610b5b565b600a82815481106112e9576112e9614e70565b90600052602060002001549050919050565b6113036132ba565b6021610bc88282614fe4565b6113176132ba565b6019548210156113a9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f52756e626f743a205472616e736665722061736b20616c726561647920636f6d60448201527f706c6574656400000000000000000000000000000000000000000000000000006064820152608401610b5b565b601a54821061143a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f52756e626f743a205472616e736665722061736b20646f6573206e6f7420657860448201527f69737400000000000000000000000000000000000000000000000000000000006064820152608401610b5b565b6000828152601860209081526040918290208251606081018452815473ffffffffffffffffffffffffffffffffffffffff90811682526001830154169281019290925260020154918101829052908215611510576114b182600001518360200151836040518060200160405280600081525061333b565b6000818152601b602090815260408083208390559084015184519151849373ffffffffffffffffffffffffffffffffffffffff92831693909216917fdeb3a6837278f6e9914a507e4d73f08e841d8fca434fb97d4307b3b0d3d6b10591a45b600084815260186020526040812080547fffffffffffffffffffffffff00000000000000000000000000000000000000009081168255600180830180549092169091556002909101829055601980549192909161156e908490614f70565b909155505050505050565b60008181526004602052604081205473ffffffffffffffffffffffffffffffffffffffff1680610bd7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f4552433732313a20696e76616c696420746f6b656e20494400000000000000006044820152606401610b5b565b61160d6132ba565b8073ffffffffffffffffffffffffffffffffffffffff1663a9059cbb61164860005473ffffffffffffffffffffffffffffffffffffffff1690565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff8516906370a0823190602401602060405180830381865afa1580156116b2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116d691906150fe565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b16815273ffffffffffffffffffffffffffffffffffffffff909216600483015260248201526044016020604051808303816000875af1158015611746573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bc89190615117565b600073ffffffffffffffffffffffffffffffffffffffff821661180f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f74206120766160448201527f6c6964206f776e657200000000000000000000000000000000000000000000006064820152608401610b5b565b5073ffffffffffffffffffffffffffffffffffffffff1660009081526005602052604090205490565b606060218054610bec90614f06565b61184f6132ba565b61185960006133de565b565b60006016546017546112389190614f83565b611875612a44565b610e418282612ab7565b60408051606081018252600080825260208201819052918101829052601a5460195410611908576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f52756e626f743a204e6f207472616e736665722061736b0000000000000000006044820152606401610b5b565b50506019546000818152601860209081526040918290208251606081018452815473ffffffffffffffffffffffffffffffffffffffff90811682526001830154169281019290925260020154918101919091529091565b606060038054610bec90614f06565b6000838152601160209081526040808320858452909152812080548390811061199957611999614e70565b906000526020600020015490509392505050565b610bc8338383613453565b50505050565b60006119c8612a44565b60225460ff16611a34576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f52756e626f743a204e6f7420696e697469616c697a65640000000000000000006044820152606401610b5b565b60008611611a9e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f52756e626f743a2043616e6e6f74206d696e74203020746f6b656e00000000006044820152606401610b5b565b600d54604080517eec4da1000000000000000000000000000000000000000000000000000000008152905160009273ffffffffffffffffffffffffffffffffffffffff169162ec4da19160048083019260609291908290030181865afa158015611b0c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b309190615134565b50905080871115611bc3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f52756e626f743a2043616e6e6f74206d696e7420736f206d616e7920746f6b6560448201527f6e73206174206f6e6365000000000000000000000000000000000000000000006064820152608401610b5b565b600d546040517fdf110488000000000000000000000000000000000000000000000000000000008152600481018890526024810187905260448101869052600160648201526084810189905260009173ffffffffffffffffffffffffffffffffffffffff169063df1104889060a401602060405180830381865afa158015611c4f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c7391906150fe565b905080341015611cdf576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f52756e626f743a204e6f7420656e6f756768206d696e742066656573000000006044820152606401610b5b565b6040518060c00160405280611cf13390565b73ffffffffffffffffffffffffffffffffffffffff1681526020018981526020018881526020018781526020018681526020018581525060156000601754815260200190815260200160002060008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506020820151816001015560408201518160020155606082015181600301556080820151816004015560a08201518160050155905050600160176000828254611dcc9190614f70565b9091555050600d546040517fd4d2f5d8000000000000000000000000000000000000000000000000000000008152600481018990526024810188905273ffffffffffffffffffffffffffffffffffffffff9091169063d4d2f5d89083906044016000604051808303818588803b158015611e4557600080fd5b505af1158015611e59573d6000803e3d6000fd5b50505050506001601754611e6d9190614f83565b92505050611e7a60018055565b95945050505050565b6060610bd782613580565b6000611e98612a44565b60225460ff16611f04576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f52756e626f743a204e6f7420696e697469616c697a65640000000000000000006044820152606401610b5b565b600d54604080517f0ce906070000000000000000000000000000000000000000000000000000000081529051339260009273ffffffffffffffffffffffffffffffffffffffff90911691630ce90607916004808201926020929091908290030181865afa158015611f79573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f9d91906150fe565b905080341015612009576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f52756e626f743a204e6f7420656e6f756768207472616e7366657220666565736044820152606401610b5b565b8173ffffffffffffffffffffffffffffffffffffffff1661202985611579565b73ffffffffffffffffffffffffffffffffffffffff16146120cc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602160248201527f52756e626f743a2043616c6c6572206973206e6f7420746f6b656e206f776e6560448201527f72000000000000000000000000000000000000000000000000000000000000006064820152608401610b5b565b6000848152602080526040902054421015612168576040517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048201526024808201527f52756e626f743a2043616e6e6f74207472616e73666572206c6f636b6564207460448201527f6f6b656e000000000000000000000000000000000000000000000000000000006064820152608401610b5b565b6040805160608101825273ffffffffffffffffffffffffffffffffffffffff80851682528781166020808401918252838501898152601a805460009081526018909352958220945185549085167fffffffffffffffffffffffff00000000000000000000000000000000000000009182161786559251600180870180549290961691909416179093559151600290930192909255825491929161220c908490614f70565b9091555050600d546000858152601360209081526040808320546014909252918290205491517fd4d2f5d800000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9093169263d4d2f5d892859261228e92909190600401918252602082015260400190565b6000604051808303818588803b1580156122a757600080fd5b505af11580156122bb573d6000803e3d6000fd5b50505050506001601a546122cf9190614f83565b92505050610bd760018055565b6122e46132ba565b601654841015612376576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f52756e626f743a204d696e742061736b20616c726561647920636f6d706c657460448201527f65640000000000000000000000000000000000000000000000000000000000006064820152608401610b5b565b60175484106123e1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f52756e626f743a204d696e742061736b20646f6573206e6f74206578697374006044820152606401610b5b565b6000848152601560209081526040808320815160c081018352815473ffffffffffffffffffffffffffffffffffffffff16815260018201549381019390935260028101549183019190915260038101546060830152600481015460808301526005015460a082015290821561248b5760a08201514286111561246557600060a08401525b61248983602001518460000151856040015186606001518588608001518c8c611090565b505b600086815260156020526040812080547fffffffffffffffffffffffff00000000000000000000000000000000000000001681556001808201839055600282018390556003820183905560048201839055600590910182905560168054919290916124f7908490614f70565b9091555050505050505050565b6000818152601b6020908152604080832054601e835281842054601c845282852054600d546013865284872054601490965293862054929460ff90921693909273ffffffffffffffffffffffffffffffffffffffff9091169163a083909e918686801561257f575060008a8152601f602052604090205460ff165b866125898c613683565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e089901b16815260048101969096526024860194909452604485019290925215156064840152608483015260a482015260c401602060405180830381865afa1580156125fe573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e7a91906150fe565b61262a612a44565b6126343382612dd9565b610e9960018055565b6126456132ba565b600d80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055602280547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055565b6126bf6132ba565b73ffffffffffffffffffffffffffffffffffffffff8116612762576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610b5b565b610e99816133de565b6127736132ba565b60225460ff166127df576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f52756e626f743a204e6f7420696e697469616c697a65640000000000000000006044820152606401610b5b565b42821115806127ec575083155b612878576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603d60248201527f52756e626f743a2043616e6e6f74207365742062696420707269636520616e6460448201527f206c6f636b2074696d656f75742073696d756c6174616e656f75736c790000006064820152608401610b5b565b6012805490600190600061288c8385614f70565b9091555061289c905088826136d8565b6128ae816128a9836136f2565b6137b0565b60008181526013602090815260408083208a905560148252808320899055601b8252808320889055601c8252808320879055601e8252808320805460017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff009182168117909255601f845282852080549091168715151790558280528184208790558a8452600e909252822080549192909161294a908490614f70565b90915550506000878152600f602090815260408083208984529091528120805460019290612979908490614f70565b90915550506000878152601060209081526040808320805460018082018355918552838520018590558a8452601183528184208a85528352818420805491820181558452928290209092018390558151838152908101899052908101879052606081018690526080810185905260a0810184905282151560c082015273ffffffffffffffffffffffffffffffffffffffff8916907fe3dbf380a595a9c8689ffa1f37d50b5893c82476efe9e1c209b8adf628c245a49060e00160405180910390a25050505050505050565b600260015403612ab0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610b5b565b6002600155565b612ac13383613879565b612b4d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f52756e626f743a2043616c6c6572206973206e6f7420746f6b656e206f776e6560448201527f72206f7220617070726f766564000000000000000000000000000000000000006064820152608401610b5b565b6000828152602080526040902054421015612bea576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602960248201527f52756e626f743a2043616e6e6f7420736574206269642070726963652077686960448201527f6c65206c6f636b656400000000000000000000000000000000000000000000006064820152608401610b5b565b6000828152601b6020526040902081905581612c0581611579565b73ffffffffffffffffffffffffffffffffffffffff167ff6883b6e03f0249ee984a32e1a41b3c807eeef7a8874cbf7f807d715632c8a9383604051612c4c91815260200190565b60405180910390a35050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f780e9d63000000000000000000000000000000000000000000000000000000001480610bd75750610bd782613938565b60008181526004602052604090205473ffffffffffffffffffffffffffffffffffffffff16610e99576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f4552433732313a20696e76616c696420746f6b656e20494400000000000000006044820152606401610b5b565b600081815260066020526040902080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff84169081179091558190612d9382611579565b73ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b60225460ff16612e45576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f52756e626f743a204e6f7420696e697469616c697a65640000000000000000006044820152606401610b5b565b6000818152602080526040902054421015612ebc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f52756e626f743a204e4654206c6f636b656400000000000000000000000000006044820152606401610b5b565b6000818152601b6020908152604080832054601e835281842054601c90935292205460ff9091169082612f4b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f52756e626f743a204e4654206e6f7420666f722073616c6500000000000000006044820152606401610b5b565b600d546000858152601360209081526040808320546014909252822054919273ffffffffffffffffffffffffffffffffffffffff169163a083909e919087878015612fa4575060008a8152601f602052604090205460ff165b87612fae8c613683565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e089901b16815260048101969096526024860194909452604485019290925215156064840152608483015260a482015260c401602060405180830381865afa158015613023573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061304791906150fe565b90506130538185614f70565b3410156130bc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f52756e626f743a204e6f7420656e6f7567682066756e647300000000000000006044820152606401610b5b565b6000858152601e602052604090205460ff161561311e576130dd8242614f70565b6000868152601d6020908152604080832093909355601e90522080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690555b6000858152601b60209081526040808320839055600d5460138352818420546014909352928190205490517fe8dbbd3c00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9093169263e8dbbd3c9285926131a292600401918252602082015260400190565b6000604051808303818588803b1580156131bb57600080fd5b505af11580156131cf573d6000803e3d6000fd5b505050505060006131df86611579565b60405190915073ffffffffffffffffffffffffffffffffffffffff82169086156108fc029087906000818181858888f19350505050158015613225573d6000803e3d6000fd5b506132418188886040518060200160405280600081525061333b565b858173ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff167ef93dbdb72854b6b6fb35433086556f2635fc83c37080c667496fecfa650fb488866040516132a9929190918252602082015260400190565b60405180910390a450505050505050565b60005473ffffffffffffffffffffffffffffffffffffffff163314611859576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610b5b565b613346848484613a1b565b61335284848484613d23565b6119b8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608401610b5b565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16036134e8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610b5b565b73ffffffffffffffffffffffffffffffffffffffff83811660008181526007602090815260408083209487168084529482529182902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b606061358b82612cae565b6000828152600c6020526040812080546135a490614f06565b80601f01602080910402602001604051908101604052809291908181526020018280546135d090614f06565b801561361d5780601f106135f25761010080835404028352916020019161361d565b820191906000526020600020905b81548152906001019060200180831161360057829003601f168201915b50505050509050600061362e611838565b90508051600003613640575092915050565b81511561367257808260405160200161365a9291906151be565b60405160208183030381529060405292505050919050565b61367b84613f16565b949350505050565b6000818152601c6020908152604080832054601e90925282205460ff16610bd7576000838152601d6020526040902054428111156136cc576136c54282614f83565b91506136d1565b600091505b5092915050565b610bc8828260405180602001604052806000815250613f7d565b606060006136ff83614020565b600101905060008167ffffffffffffffff81111561371f5761371f614759565b6040519080825280601f01601f191660200182016040528015613749576020820181803683370190505b5090508181016020015b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff017f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a850494508461375357509392505050565b60008281526004602052604090205473ffffffffffffffffffffffffffffffffffffffff16613861576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f45524337323155524953746f726167653a2055524920736574206f66206e6f6e60448201527f6578697374656e7420746f6b656e0000000000000000000000000000000000006064820152608401610b5b565b6000828152600c60205260409020610e2a8282614fe4565b60008061388583611579565b90508073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614806138f3575073ffffffffffffffffffffffffffffffffffffffff80821660009081526007602090815260408083209388168352929052205460ff165b8061367b57508373ffffffffffffffffffffffffffffffffffffffff1661391984610c6f565b73ffffffffffffffffffffffffffffffffffffffff1614949350505050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f80ac58cd0000000000000000000000000000000000000000000000000000000014806139cb57507fffffffff0000000000000000000000000000000000000000000000000000000082167f5b5e139f00000000000000000000000000000000000000000000000000000000145b80610bd757507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff00000000000000000000000000000000000000000000000000000000831614610bd7565b8273ffffffffffffffffffffffffffffffffffffffff16613a3b82611579565b73ffffffffffffffffffffffffffffffffffffffff1614613ade576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201527f6f776e65720000000000000000000000000000000000000000000000000000006064820152608401610b5b565b73ffffffffffffffffffffffffffffffffffffffff8216613b80576040517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152608401610b5b565b613b8d8383836001614102565b8273ffffffffffffffffffffffffffffffffffffffff16613bad82611579565b73ffffffffffffffffffffffffffffffffffffffff1614613c50576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201527f6f776e65720000000000000000000000000000000000000000000000000000006064820152608401610b5b565b600081815260066020908152604080832080547fffffffffffffffffffffffff000000000000000000000000000000000000000090811690915573ffffffffffffffffffffffffffffffffffffffff8781168086526005855283862080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01905590871680865283862080546001019055868652600490945282852080549092168417909155905184937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b600073ffffffffffffffffffffffffffffffffffffffff84163b15613f0b576040517f150b7a0200000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff85169063150b7a0290613d9a9033908990889088906004016151ed565b6020604051808303816000875af1925050508015613df3575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168201909252613df091810190615236565b60015b613ec0573d808015613e21576040519150601f19603f3d011682016040523d82523d6000602084013e613e26565b606091505b508051600003613eb8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608401610b5b565b805181602001fd5b7fffffffff00000000000000000000000000000000000000000000000000000000167f150b7a020000000000000000000000000000000000000000000000000000000014905061367b565b506001949350505050565b6060613f2182612cae565b6000613f2b611838565b90506000815111613f4b5760405180602001604052806000815250613f76565b80613f55846136f2565b604051602001613f669291906151be565b6040516020818303038152906040525b9392505050565b613f87838361410e565b613f946000848484613d23565b610e2a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608401610b5b565b6000807a184f03e93ff9f4daa797ed6e38ed64bf6a1f0100000000000000008310614069577a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000830492506040015b6d04ee2d6d415b85acef81000000008310614095576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc1000083106140b357662386f26fc10000830492506010015b6305f5e10083106140cb576305f5e100830492506008015b61271083106140df57612710830492506004015b606483106140f1576064830492506002015b600a8310610bd75760010192915050565b6119b884848484614341565b73ffffffffffffffffffffffffffffffffffffffff821661418b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610b5b565b60008181526004602052604090205473ffffffffffffffffffffffffffffffffffffffff1615614217576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610b5b565b614225600083836001614102565b60008181526004602052604090205473ffffffffffffffffffffffffffffffffffffffff16156142b1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610b5b565b73ffffffffffffffffffffffffffffffffffffffff8216600081815260056020908152604080832080546001019055848352600490915280822080547fffffffffffffffffffffffff0000000000000000000000000000000000000000168417905551839291907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b61434d848484846144f1565b60018111156143de576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603560248201527f455243373231456e756d657261626c653a20636f6e736563757469766520747260448201527f616e7366657273206e6f7420737570706f7274656400000000000000000000006064820152608401610b5b565b8173ffffffffffffffffffffffffffffffffffffffff85166144475761444281600a80546000838152600b60205260408120829055600182018355919091527fc65a7bb8d6351c1cf70c95a316cc6a92839c986682d98bc35f958f4883f9d2a80155565b614484565b8373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16146144845761448485826145a2565b73ffffffffffffffffffffffffffffffffffffffff84166144ad576144a881614659565b6144ea565b8473ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16146144ea576144ea8482614708565b5050505050565b60018111156119b85773ffffffffffffffffffffffffffffffffffffffff8416156145515773ffffffffffffffffffffffffffffffffffffffff84166000908152600560205260408120805483929061454b908490614f83565b90915550505b73ffffffffffffffffffffffffffffffffffffffff8316156119b85773ffffffffffffffffffffffffffffffffffffffff83166000908152600560205260408120805483929061156e908490614f70565b600060016145af8461176a565b6145b99190614f83565b6000838152600960205260409020549091508082146146195773ffffffffffffffffffffffffffffffffffffffff841660009081526008602090815260408083208584528252808320548484528184208190558352600990915290208190555b50600091825260096020908152604080842084905573ffffffffffffffffffffffffffffffffffffffff9094168352600881528383209183525290812055565b600a5460009061466b90600190614f83565b6000838152600b6020526040812054600a805493945090928490811061469357614693614e70565b9060005260206000200154905080600a83815481106146b4576146b4614e70565b6000918252602080832090910192909255828152600b9091526040808220849055858252812055600a8054806146ec576146ec615253565b6001900381819060005260206000200160009055905550505050565b60006147138361176a565b73ffffffffffffffffffffffffffffffffffffffff9093166000908152600860209081526040808320868452825280832085905593825260099052919091209190915550565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff811182821017156147cf576147cf614759565b604052919050565b600082601f8301126147e857600080fd5b8135602067ffffffffffffffff82111561480457614804614759565b8160051b614813828201614788565b928352848101820192828101908785111561482d57600080fd5b83870192505b8483101561484c57823582529183019190830190614833565b979650505050505050565b6000806040838503121561486a57600080fd5b823567ffffffffffffffff8082111561488257600080fd5b61488e868387016147d7565b935060208501359150808211156148a457600080fd5b506148b1858286016147d7565b9150509250929050565b7fffffffff0000000000000000000000000000000000000000000000000000000081168114610e9957600080fd5b6000602082840312156148fb57600080fd5b8135613f76816148bb565b60005b83811015614921578181015183820152602001614909565b50506000910152565b60008151808452614942816020860160208601614906565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b602081526000613f76602083018461492a565b60006020828403121561499957600080fd5b5035919050565b73ffffffffffffffffffffffffffffffffffffffff81168114610e9957600080fd5b600080604083850312156149d557600080fd5b82356149e0816149a0565b946020939093013593505050565b60008060408385031215614a0157600080fd5b50508035926020909101359150565b8015158114610e9957600080fd5b6000806000806000806000806000806000806101808d8f031215614a4157600080fd5b8c359b5060208d0135614a53816149a0565b9a5060408d0135995060608d0135985060808d0135975060a08d0135965060c08d0135955060e08d013594506101008d013593506101208d013592506101408d013591506101608d0135614aa681614a10565b809150509295989b509295989b509295989b565b600080600080600080600080610100898b031215614ad757600080fd5b883597506020890135614ae9816149a0565b965060408901359550606089013594506080890135935060a0890135925060c0890135915060e0890135614b1c81614a10565b809150509295985092959890939650565b600080600060608486031215614b4257600080fd5b8335614b4d816149a0565b92506020840135614b5d816149a0565b929592945050506040919091013590565b600067ffffffffffffffff831115614b8857614b88614759565b614bb960207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f86011601614788565b9050828152838383011115614bcd57600080fd5b828260208301376000602084830101529392505050565b600060208284031215614bf657600080fd5b813567ffffffffffffffff811115614c0d57600080fd5b8201601f81018413614c1e57600080fd5b61367b84823560208401614b6e565b60008060408385031215614c4057600080fd5b823591506020830135614c5281614a10565b809150509250929050565b600060208284031215614c6f57600080fd5b8135613f76816149a0565b600080600060608486031215614c8f57600080fd5b505081359360208301359350604090920135919050565b60008060408385031215614cb957600080fd5b8235614cc4816149a0565b91506020830135614c5281614a10565b60008060008060808587031215614cea57600080fd5b8435614cf5816149a0565b93506020850135614d05816149a0565b925060408501359150606085013567ffffffffffffffff811115614d2857600080fd5b8501601f81018713614d3957600080fd5b614d4887823560208401614b6e565b91505092959194509250565b600080600080600060a08688031215614d6c57600080fd5b505083359560208501359550604085013594606081013594506080013592509050565b60008060008060808587031215614da557600080fd5b84359350602085013592506040850135614dbe81614a10565b91506060850135614dce81614a10565b939692955090935050565b60008060408385031215614dec57600080fd5b8235614df7816149a0565b91506020830135614c52816149a0565b600080600080600080600060e0888a031215614e2257600080fd5b8735614e2d816149a0565b96506020880135955060408801359450606088013593506080880135925060a0880135915060c0880135614e6081614a10565b8091505092959891949750929550565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203614eff57614eff614e9f565b5060010190565b600181811c90821680614f1a57607f821691505b602082108103614f53577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b8082028115828204841417610bd757610bd7614e9f565b80820180821115610bd757610bd7614e9f565b81810381811115610bd757610bd7614e9f565b601f821115610e2a57600081815260208120601f850160051c81016020861015614fbd5750805b601f850160051c820191505b81811015614fdc57828155600101614fc9565b505050505050565b815167ffffffffffffffff811115614ffe57614ffe614759565b6150128161500c8454614f06565b84614f96565b602080601f831160018114615065576000841561502f5750858301515b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600386901b1c1916600185901b178555614fdc565b6000858152602081207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08616915b828110156150b257888601518255948401946001909101908401615093565b50858210156150ee57878501517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600388901b60f8161c191681555b5050505050600190811b01905550565b60006020828403121561511057600080fd5b5051919050565b60006020828403121561512957600080fd5b8151613f7681614a10565b600080828403606081121561514857600080fd5b8351925060407fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08201121561517c57600080fd5b506040516040810181811067ffffffffffffffff821117156151a0576151a0614759565b60409081526020858101518352940151938101939093525092909150565b600083516151d0818460208801614906565b8351908301906151e4818360208801614906565b01949350505050565b600073ffffffffffffffffffffffffffffffffffffffff80871683528086166020840152508360408301526080606083015261522c608083018461492a565b9695505050505050565b60006020828403121561524857600080fd5b8151613f76816148bb565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fdfea2646970667358221220e25eb3acf89f4987e45a2fb4d81e255e29e0323043fa4d59603df6308e5c688664736f6c63430008110033

Loading...
Loading
Loading...
Loading
[ Download: CSV Export  ]
[ Download: CSV Export  ]

A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.