ETH Price: $3,390.57 (+1.76%)

Token

InfinityKeysAchievement (IKA)
 

Overview

Max Total Supply

7,559 IKA

Holders

2,359

Market

Volume (24H)

N/A

Min Price (24H)

N/A

Max Price (24H)

N/A
Filtered by Token Holder
ludus.eth
0x43ec5640e18f7384761d8817aa55d38c9a03d855
Loading...
Loading
Loading...
Loading
Loading...
Loading

Click here to update the token information / general information
# Exchange Pair Price  24H Volume % Volume

Contract Source Code Verified (Exact Match)

Contract Name:
InfinityKeysAchievement

Compiler Version
v0.8.4+commit.c7e474f2

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 26 : InfinityKeysAchievement.sol
// SPDX-License-Identifier: UNLICENSED
// Infinity Keys 2022
pragma solidity ^0.8.4;

import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/IERC721Enumerable.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "./VerifySigner.sol";
import "./NonblockingReceiver.sol";
import "./CheckExternalNFT.sol";
import "./AbstractIKTraverseChains.sol";

contract InfinityKeysAchievement is 
    NonblockingReceiver, 
    AbstractIKTraverseChains,
    VerifySigner, 
    CheckExternalNFT
{
    using Counters for Counters.Counter;
    Counters.Counter private counter;

    string public name;
    string public symbol; 

    mapping(uint256 => Token) private tokens;

    /** 
    @dev for token gating claims.
    */
    enum GateState {
        noGate,
        internalGate,
        externalGate
    }

    struct Token {
        bool claimable;
        GateState gate;
        uint256[] internalGateIDs;
        address externalGateContract;
        string tokenURI;
        mapping(address => bool) claimed;
    }

    event Claimed(uint indexed _tokenID, address indexed _account);

    constructor(
        string memory _name, 
        string memory _symbol,
        address _signer,
        string memory _secret,
        address _endpoint
    ) ERC1155("https://www.infinitykeys.io") {
        name = _name;
        symbol = _symbol;
        setSecret(_secret);
        setSigner(_signer);

        endpoint = ILayerZeroEndpoint(_endpoint);
        transferOwnership(0xe2e06703D00790D6Af7cC9198CDBa8aAa41a30Ff);
    }

    /**
    @dev Fallback function.
    */
    fallback() external payable {}

    /**
    @dev Receive function.
    */
    receive() external payable virtual {}

    /**
    @dev Returns a token.
     */
    function getToken( uint256 _tokenID ) external view returns ( 
        bool, GateState, uint256[] memory, address, string memory 
    ) {
        require(exists(_tokenID), "getToken: Token ID does not exist");
        return (tokens[_tokenID].claimable, tokens[_tokenID].gate, tokens[_tokenID].internalGateIDs, tokens[_tokenID].externalGateContract, tokens[_tokenID].tokenURI);
    }

    /**
    @dev Adds a new token.
    */
    function addToken(
        bool _claimable,
        GateState _gateState,
        uint256[] memory _internalGateIDs,
        address _externalGateContract,
        string memory _tokenURI
    ) public onlyAuthorized {
        Token storage t = tokens[counter.current()];
        t.claimable = _claimable;
        t.gate = _gateState;
        t.internalGateIDs = _internalGateIDs;
        t.externalGateContract = _externalGateContract;
        t.tokenURI = _tokenURI;

        counter.increment();
    }    

    /**
    @dev Add token caller for default states on gate IDs.
    */
    function addTokenUngated( bool _claimable, string memory _tokenURI ) public onlyAuthorized {
        addToken(_claimable, GateState.noGate, new uint[](0), address(0), _tokenURI);
    }   

    /**
    @dev Edits an existing token.
    */
    function editToken(
        uint256 _tokenID,
        bool _claimable,
        GateState _gateState,
        uint256[] memory _internalGateIDs,
        address _externalGateContract,
        string memory _tokenURI
    ) external onlyAuthorized {
        require(exists(_tokenID), "EditToken: Token ID does not exist");

        Token storage t = tokens[_tokenID];
        t.claimable = _claimable; 
        t.gate = _gateState;
        t.internalGateIDs = _internalGateIDs;
        t.externalGateContract = _externalGateContract;
        t.tokenURI = _tokenURI;  
    }

    /**
    @dev Edits token uri.
     */
    function editTokenURI( uint256 _tokenID, string memory _tokenURI ) external onlyAuthorized {
        require(exists(_tokenID), "EditTokenURI: Token ID does not exist");
        Token storage t = tokens[_tokenID];
        t.tokenURI = _tokenURI;  
    }

    /**
    @dev Sets token claim state.
     */
    function setTokenClaimable( uint256 _tokenID, bool _claimable ) external onlyAuthorized {
        require(exists(_tokenID), "setTokenClaimable: Token ID does not exist");
        Token storage t = tokens[_tokenID];
        t.claimable = _claimable;  
    }

    /**
    @dev Send specified token to specified address.
     */
    function airdrop ( uint256 _tokenID, address _address ) external onlyAuthorized {
        require( exists(_tokenID), "airdrop: token does not exist" );

        _mint(_address, _tokenID, 1, "");
    }

    /**
    @dev Handle token claims.
    */
    function claim ( uint256 _tokenID, bytes memory _signature ) external payable {
        require( exists(_tokenID), "claim: token does not exist" );
        require( isSaleOpen(_tokenID), "claim: sale is closed" );
        require( !checkIfClaimed(_tokenID, msg.sender), "claim: NFT already claimed by address" );
        require( verify(_tokenID, _signature), "claim: Server Verification Failed." );
        require( gateCheck(_tokenID, msg.sender), "claim: Address does not own requisite NFT" );
        
        tokens[_tokenID].claimed[msg.sender] = true;

        _mint(msg.sender, _tokenID, 1, "");

        emit Claimed(_tokenID, msg.sender);
    }

    /**
    @dev Return whether claims are open for a certain tokenID.
    */
    function isSaleOpen( uint256 _tokenID ) public view returns ( bool ) {
        require( exists(_tokenID), "isSaleClosed: token does not exist" );
        return tokens[_tokenID].claimable;
    }

    /**
    @dev Check if specified address has claimed specified tokenID.
    */
    function checkIfClaimed ( uint256 _tokenID, address _address ) public view returns ( bool ) {
        require( exists(_tokenID), "checkIfClaimed: token does not exist" );
        if (tokens[_tokenID].claimed[_address]) return true;
        return false;
    }

    /**
    @dev Return array of totalSupply for all tokens.
    */
    function totalSupplyAll() external view returns ( uint[] memory ) {
        uint[] memory result = new uint[](counter.current());

        for(uint256 i; i < counter.current(); i++) {
            result[i] = totalSupply(i);
        }

        return result;
    }
    
    /**
    @dev Check if msg.sender can claim NFT based on:
    * An Internal Gate (must own another token on this contract)
    * An External Gate (must own a partner NFT)
    */
    function gateCheck ( uint256 _tokenID, address _address ) private view returns ( bool ) {
        GateState gate = tokens[_tokenID].gate;

        if (gate == GateState.noGate) {
            return true;
        } else if (gate == GateState.internalGate) {
            return checkInternalNFTs(_address, tokens[_tokenID].internalGateIDs);
        } else if (gate == GateState.externalGate) {
            return checkExternalNFT(_address, tokens[_tokenID].externalGateContract);
        }
        return false;
    }

    /**
    @dev Checks if specified address owns specified NFT(s) on this contract 
    */
    function checkInternalNFTs ( address _address, uint256[] memory _internalIDs ) internal view returns ( bool ) {
        for (uint256 i; i < _internalIDs.length; ++i) {
            if (balanceOf(_address, _internalIDs[i]) == 0) {
                return false;
            }
        }
        return true;
    }

    /**
    @dev Indicates whether a token exists with a given tokenID.
    */
    function exists( uint256 _tokenID ) public view override returns ( bool ) {
        return counter.current() > _tokenID;
    }  

    /**
    @dev Return URI for existing tokenID.
    */
    function uri( uint256 _tokenID ) public view override returns ( string memory ) {
        require( exists(_tokenID), "URI: nonexistent token" );
        return tokens[_tokenID].tokenURI;
    }

    /**
    @dev onlyOwner- release ETH to given address (onlyOwner)
    */
    function release ( address payable _address, uint256 _amount ) public onlyOwner {
        require( _amount <= address(this).balance, "release: Inavlid amount." );
        Address.sendValue(_address, _amount);
    }

    /**
    @dev onlyOwner- release given ERC20 to given address (onlyOwner)
    */
    function release ( IERC20 _token, address _address, uint256 _amount ) public onlyOwner {
        require( _amount <= _token.balanceOf(address(this)), "release: insufficient tokens ERC20 called." );
        SafeERC20.safeTransfer(_token, _address, _amount);
    }
}

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

pragma solidity ^0.8.0;

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

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

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

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

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

File 3 of 26 : IERC721Enumerable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC721/extensions/IERC721Enumerable.sol)

pragma solidity ^0.8.0;

import "../IERC721.sol";

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

File 4 of 26 : SafeERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/utils/SafeERC20.sol)

pragma solidity ^0.8.0;

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

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

    function safeTransfer(
        IERC20 token,
        address to,
        uint256 value
    ) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
    }

    function safeTransferFrom(
        IERC20 token,
        address from,
        address to,
        uint256 value
    ) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));
    }

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

    function safeIncreaseAllowance(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        uint256 newAllowance = token.allowance(address(this), spender) + value;
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
    }

    function safeDecreaseAllowance(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        unchecked {
            uint256 oldAllowance = token.allowance(address(this), spender);
            require(oldAllowance >= value, "SafeERC20: decreased allowance below zero");
            uint256 newAllowance = oldAllowance - value;
            _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
        }
    }

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

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

File 5 of 26 : VerifySigner.sol
// SPDX-License-Identifier: MIT
// 2022 Infinity Keys Team
pragma solidity ^0.8.4;

/*************************************************************
* @title: Verify Signer                                      *
* @notice: require a valid ECDSA signature of a standardized *
* message signed by signer before mint approval              *
*************************************************************/

import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "./Authorized.sol";

contract VerifySigner is Authorized {
    using ECDSA for bytes32;
    using Strings for uint256;

    string private secret;
    address private signer;

    /**
    * @dev Check ECDSA for server verification to prevent contract mints.
    */
    function verify( uint256 _tokenID, bytes memory _signature ) internal view returns ( bool ) {
        address signerCheck = getAddressSigner( _tokenID.toString(), _signature );
        return signerCheck == signer;
    }

    /**
    * @dev Return address of signer from ECDSA signature message.
    */
    function getAddressSigner( string memory _tokenID, bytes memory _signature ) private view returns ( address ) {
        bytes32 hash = createHash( _tokenID );
        return hash.toEthSignedMessageHash().recover( _signature );
    }

    /**
    * @dev Create hash of information needed.
    */
    function createHash( string memory _tokenID ) private view returns ( bytes32 ) {
        return keccak256( abi.encodePacked( address(this), msg.sender, _tokenID, secret ) );
    }
    
    /**
    * @dev Set the secret used in hash (onlyOwner)
    */
    function setSecret( string memory _secret ) public onlyOwner {
        secret = _secret;
    }

    /**
    * @dev Set the signer used to sign the message (onlyOwner)
    */
    function setSigner( address _signer ) public onlyOwner {
        signer = _signer;
    }

}

File 6 of 26 : NonblockingReceiver.sol
// SPDX-License-Identifier: MIT
// Infinity Keys 2022
pragma solidity ^0.8.4;

import "../interfaces/ILayerZeroReceiver.sol";
import "../interfaces/ILayerZeroEndpoint.sol";
import "./Authorized.sol";

abstract contract NonblockingReceiver is Authorized, ILayerZeroReceiver {
    ILayerZeroEndpoint internal endpoint;

    struct FailedMessages {
        uint256 payloadLength;
        bytes32 payloadHash;
    }

    mapping(uint16 => mapping(bytes => mapping(uint256 => FailedMessages))) public failedMessages;
    mapping(uint16 => bytes) public trustedRemoteLookup;

    event MessageFailed(
        uint16 _srcChainId,
        bytes _srcAddress,
        uint64 _nonce,
        bytes _payload
    );

    /**
    @dev Standard layerzero receive function
    */
    function lzReceive( uint16 _srcChainId, bytes memory _srcAddress, uint64 _nonce, bytes memory _payload ) external override {
        require(msg.sender == address(endpoint)); 
        require(
            _srcAddress.length == trustedRemoteLookup[_srcChainId].length &&
                keccak256(_srcAddress) == keccak256(trustedRemoteLookup[_srcChainId]),
            "NonblockingReceiver: invalid source sending contract"
        );

        try this.onLzReceive(_srcChainId, _srcAddress, _nonce, _payload) {
            // do nothing
        } catch {
            failedMessages[_srcChainId][_srcAddress][_nonce] = FailedMessages(
                _payload.length,
                keccak256(_payload)
            );
            emit MessageFailed(_srcChainId, _srcAddress, _nonce, _payload);
        }
    }

    /**
    @dev Nonblocking receive handler
    */
    function onLzReceive( uint16 _srcChainId, bytes memory _srcAddress, uint64 _nonce, bytes memory _payload ) public {
        require( msg.sender == address(this), "NonblockingReceiver: caller must be Bridge." );
        _LzReceive(_srcChainId, _srcAddress, _nonce, _payload);
    }

    /**
    @dev Abstract fucntion to be overwritten
    */
    function _LzReceive( uint16 _srcChainId, bytes memory _srcAddress, uint64 _nonce, bytes memory _payload ) internal virtual;

    function _lzSend( uint16 _dstChainId, bytes memory _payload, address payable _refundAddress, address _zroPaymentAddress, bytes memory _txParam ) internal {
        endpoint.send{value: msg.value}(
            _dstChainId,
            trustedRemoteLookup[_dstChainId],
            _payload,
            _refundAddress,
            _zroPaymentAddress,
            _txParam
        );
    }

    function retryMessage( uint16 _srcChainId, bytes memory _srcAddress, uint64 _nonce, bytes calldata _payload ) external payable {
        FailedMessages storage failedMsg = failedMessages[_srcChainId][_srcAddress][_nonce];
        require( failedMsg.payloadHash != bytes32(0), "NonblockingReceiver: no stored message" );
        require( _payload.length == failedMsg.payloadLength && keccak256(_payload) == failedMsg.payloadHash, "LayerZero: invalid payload" );
        failedMsg.payloadLength = 0;
        failedMsg.payloadHash = bytes32(0);
        this.onLzReceive(_srcChainId, _srcAddress, _nonce, _payload);
    }

    /**
    @dev Set correct contract address on other chains
    */    
    function setTrustedRemote(uint16 _chainId, bytes calldata _trustedRemote) external onlyOwner {
        trustedRemoteLookup[_chainId] = _trustedRemote;
    }
}

File 7 of 26 : CheckExternalNFT.sol
// SPDX-License-Identifier: MIT
// 2022 Infinity Keys Team
pragma solidity ^0.8.4;

/************************************************************
* @title: CheckExternalNFT                                  *
* @notice: Check if address owns requisite NFT              *
*************************************************************/

contract IExternalNFT {
	function balanceOf( address _address ) external view returns ( uint256 ) {}
}

abstract contract CheckExternalNFT {
    /**
    @dev Checks if specified address owns NFT on specified contract 
    */
    function checkExternalNFT ( address _address, address _contract ) internal view returns ( bool ) {
        IExternalNFT externalNFT = IExternalNFT(_contract);
        return externalNFT.balanceOf(_address) > 0;
    }
}

File 8 of 26 : AbstractIKTraverseChains.sol
// SPDX-License-Identifier: MIT
// 2022 Infinity Keys Team
pragma solidity ^0.8.4;

/*************************************************************
* @title: ABSTRACT IK Traverse Chains                        *
* @notice: Manage leaving this chain for another, and        *
* receiving from another chain, as well as gas               *
*************************************************************/

import "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Supply.sol";
import "./NonblockingReceiver.sol";

abstract contract AbstractIKTraverseChains is NonblockingReceiver, ERC1155Supply {
    uint public gasForDestinationLzReceive = 350000;

    event ReceiveNFT( uint16 _srcChainId, bytes _from, uint256 _tokenId, address _to );
    event MessageFee(uint fee);

    /**
    @dev Traverse specified tokenID to specified chainID
    */
    function traverseChain(uint16 _chainID, uint _tokenID) external payable {
        require(
            balanceOf(msg.sender, _tokenID) > 0,
            "TraverseChain: You must own this token to traverse"
        );
        require(
            trustedRemoteLookup[_chainID].length != 0,
            "TraverseChain: This chain is currently unavailable for travel"
        );
        require(
            _chainID != block.chainid,
            "TraverseChain: Destination blockchain can't be the same as source"
        );

        _burn(msg.sender, _tokenID, 1); // Eliminate NFT from source chain

        bytes memory payload = abi.encode(msg.sender, _tokenID); // Encode the payload

        uint16 version = 1;
        bytes memory adapterParams = abi.encodePacked(
            version,
            gasForDestinationLzReceive
        );

        // Get the fees we need to pay to LayerZero + Relayer to cover message delivery
        // Extra Gas will be refunded
        (uint256 messageFee, ) = endpoint.estimateFees(
            _chainID,
            address(this),
            payload,
            false,
            // bytes("")
            adapterParams
        );

        emit MessageFee(messageFee);

        require(
            msg.value >= messageFee,
            "TraverseChain: value sent is not enough to cover messageFee. Increase gas for message fees"
        );

        endpoint.send{value: msg.value}(
            _chainID, 
            trustedRemoteLookup[_chainID], 
            payload, 
            payable(msg.sender), 
            address(0x0), 
            adapterParams 
        );
    }

    /**
    @dev Set the gas for receive function on destination chain
    */
    function setGasForDestinationLzReceive(uint256 newVal) external onlyOwner {
        gasForDestinationLzReceive = newVal;
    }

    /**
    @dev Handle receiving NFTs sent from other chains
    */
    function _LzReceive( uint16 _srcChainId, bytes memory _srcAddress, uint64 _nonce, bytes memory _payload ) internal override {
        (address toAddr, uint256 tokenId) = abi.decode(
            _payload,
            (address, uint256)
        );

        emit ReceiveNFT( _srcChainId, _srcAddress, tokenId, toAddr );

        _mint(toAddr, tokenId, 1, ""); 
    }
}

File 9 of 26 : IERC721.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

    /**
     * @dev Transfers `tokenId` token from `from` to `to`.
     *
     * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must be owned by `from`.
     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(
        address from,
        address to,
        uint256 tokenId
    ) external;

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

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

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

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

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

pragma solidity ^0.8.0;

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

File 11 of 26 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

File 12 of 26 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol)

pragma solidity ^0.8.1;

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

        return account.code.length > 0;
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

File 13 of 26 : ECDSA.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (utils/cryptography/ECDSA.sol)

pragma solidity ^0.8.0;

import "../Strings.sol";

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

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

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

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

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

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

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

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

        return (signer, RecoverError.NoError);
    }

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

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

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

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

File 14 of 26 : Strings.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Strings.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

File 15 of 26 : Authorized.sol
// SPDX-License-Identifier: MIT
// 2022 Infinity Keys Team
pragma solidity ^0.8.0;

/************************************************************
* @title: Authorized                                        *
* @notice: Allow list of authorized addresses for           *
* certain function calls.  Extension of Ownable             *
************************************************************/

import "@openzeppelin/contracts/access/Ownable.sol";

contract Authorized is Ownable{
  /**
  @dev Set of addresses authorized for certain function calls.
  */
  mapping(address => bool) internal _authorized;

  constructor(){
    _authorized[owner()] = true;
  }

  /**
  @dev Modifier to enforce authorization rules.
  */
  modifier onlyAuthorized {
    require(_authorized[msg.sender], "onlyAuthorized: Invalid address" );
    _;
  }

  /**
  @dev Returns whether or not an address is authorized for function calls.
  */
  function isAuthorized( address addr ) public view returns ( bool ){
    return _authorized[addr];
  }

  /**
  @dev Adds an authorized account (onlyOwner).
  */
  function addAuthorizedAccount( address addr) external onlyOwner{
    require( !isAuthorized(addr), "addAuthorizedAccount: Account is already authorized." );
    _authorized[addr] = true;
  }

  /**
  @dev Removes an authorized account (onlyOwner)
  */
  function removeAuthorizedAccount( address addr) external onlyOwner{
    require( isAuthorized(addr), "removeAuthorizedAccount: Account is not authorized." );
    _authorized[addr] = false;
  }

  /**
  @dev Transfers ownership to new address (onlyOwner)
  */
  function transferOwnership(address newOwner) public virtual override onlyOwner {
    _authorized[newOwner] = true;
    super.transferOwnership( newOwner );
  }
}

File 16 of 26 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        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);
    }
}

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

pragma solidity ^0.8.0;

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

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

File 18 of 26 : ILayerZeroReceiver.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.5.0;

interface ILayerZeroReceiver {
    // @notice LayerZero endpoint will invoke this function to deliver the message on the destination
    // @param _srcChainId - the source endpoint identifier
    // @param _srcAddress - the source sending contract address from the source chain
    // @param _nonce - the ordered message nonce
    // @param _payload - the signed payload is the UA bytes has encoded to be sent
    function lzReceive(uint16 _srcChainId, bytes calldata _srcAddress, uint64 _nonce, bytes calldata _payload) external;
}

File 19 of 26 : ILayerZeroEndpoint.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.5.0;

import "./ILayerZeroUserApplicationConfig.sol";

interface ILayerZeroEndpoint is ILayerZeroUserApplicationConfig {
    // @notice send a LayerZero message to the specified address at a LayerZero endpoint.
    // @param _dstChainId - the destination chain identifier
    // @param _destination - the address on destination chain (in bytes). address length/format may vary by chains
    // @param _payload - a custom bytes payload to send to the destination contract
    // @param _refundAddress - if the source transaction is cheaper than the amount of value passed, refund the additional amount to this address
    // @param _zroPaymentAddress - the address of the ZRO token holder who would pay for the transaction
    // @param _adapterParams - parameters for custom functionality. e.g. receive airdropped native gas from the relayer on destination
    function send(uint16 _dstChainId, bytes calldata _destination, bytes calldata _payload, address payable _refundAddress, address _zroPaymentAddress, bytes calldata _adapterParams) external payable;

    // @notice used by the messaging library to publish verified payload
    // @param _srcChainId - the source chain identifier
    // @param _srcAddress - the source contract (as bytes) at the source chain
    // @param _dstAddress - the address on destination chain
    // @param _nonce - the unbound message ordering nonce
    // @param _gasLimit - the gas limit for external contract execution
    // @param _payload - verified payload to send to the destination contract
    function receivePayload(uint16 _srcChainId, bytes calldata _srcAddress, address _dstAddress, uint64 _nonce, uint _gasLimit, bytes calldata _payload) external;

    // @notice get the inboundNonce of a lzApp from a source chain which could be EVM or non-EVM chain
    // @param _srcChainId - the source chain identifier
    // @param _srcAddress - the source chain contract address
    function getInboundNonce(uint16 _srcChainId, bytes calldata _srcAddress) external view returns (uint64);

    // @notice get the outboundNonce from this source chain which, consequently, is always an EVM
    // @param _srcAddress - the source chain contract address
    function getOutboundNonce(uint16 _dstChainId, address _srcAddress) external view returns (uint64);

    // @notice gets a quote in source native gas, for the amount that send() requires to pay for message delivery
    // @param _dstChainId - the destination chain identifier
    // @param _userApplication - the user app address on this EVM chain
    // @param _payload - the custom message to send over LayerZero
    // @param _payInZRO - if false, user app pays the protocol fee in native token
    // @param _adapterParam - parameters for the adapter service, e.g. send some dust native token to dstChain
    function estimateFees(uint16 _dstChainId, address _userApplication, bytes calldata _payload, bool _payInZRO, bytes calldata _adapterParam) external view returns (uint nativeFee, uint zroFee);

    // @notice get this Endpoint's immutable source identifier
    function getChainId() external view returns (uint16);

    // @notice the interface to retry failed message on this Endpoint destination
    // @param _srcChainId - the source chain identifier
    // @param _srcAddress - the source chain contract address
    // @param _payload - the payload to be retried
    function retryPayload(uint16 _srcChainId, bytes calldata _srcAddress, bytes calldata _payload) external;

    // @notice query if any STORED payload (message blocking) at the endpoint.
    // @param _srcChainId - the source chain identifier
    // @param _srcAddress - the source chain contract address
    function hasStoredPayload(uint16 _srcChainId, bytes calldata _srcAddress) external view returns (bool);

    // @notice query if the _libraryAddress is valid for sending msgs.
    // @param _userApplication - the user app address on this EVM chain
    function getSendLibraryAddress(address _userApplication) external view returns (address);

    // @notice query if the _libraryAddress is valid for receiving msgs.
    // @param _userApplication - the user app address on this EVM chain
    function getReceiveLibraryAddress(address _userApplication) external view returns (address);

    // @notice query if the non-reentrancy guard for send() is on
    // @return true if the guard is on. false otherwise
    function isSendingPayload() external view returns (bool);

    // @notice query if the non-reentrancy guard for receive() is on
    // @return true if the guard is on. false otherwise
    function isReceivingPayload() external view returns (bool);

    // @notice get the configuration of the LayerZero messaging library of the specified version
    // @param _version - messaging library version
    // @param _chainId - the chainId for the pending config change
    // @param _userApplication - the contract address of the user application
    // @param _configType - type of configuration. every messaging library has its own convention.
    function getConfig(uint16 _version, uint16 _chainId, address _userApplication, uint _configType) external view returns (bytes memory);

    // @notice get the send() LayerZero messaging library version
    // @param _userApplication - the contract address of the user application
    function getSendVersion(address _userApplication) external view returns (uint16);

    // @notice get the lzReceive() LayerZero messaging library version
    // @param _userApplication - the contract address of the user application
    function getReceiveVersion(address _userApplication) external view returns (uint16);
}

File 20 of 26 : ILayerZeroUserApplicationConfig.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.5.0;

interface ILayerZeroUserApplicationConfig {
    // @notice set the configuration of the LayerZero messaging library of the specified version
    // @param _version - messaging library version
    // @param _chainId - the chainId for the pending config change
    // @param _configType - type of configuration. every messaging library has its own convention.
    // @param _config - configuration in the bytes. can encode arbitrary content.
    function setConfig(uint16 _version, uint16 _chainId, uint _configType, bytes calldata _config) external;

    // @notice set the send() LayerZero messaging library version to _version
    // @param _version - new messaging library version
    function setSendVersion(uint16 _version) external;

    // @notice set the lzReceive() LayerZero messaging library version to _version
    // @param _version - new messaging library version
    function setReceiveVersion(uint16 _version) external;

    // @notice Only when the UA needs to resume the message flow in blocking mode and clear the stored payload
    // @param _srcChainId - the chainId of the source chain
    // @param _srcAddress - the contract address of the source contract at the source chain
    function forceResumeReceive(uint16 _srcChainId, bytes calldata _srcAddress) external;
}

File 21 of 26 : ERC1155Supply.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC1155/extensions/ERC1155Supply.sol)

pragma solidity ^0.8.0;

import "../ERC1155.sol";

/**
 * @dev Extension of ERC1155 that adds tracking of total supply per id.
 *
 * Useful for scenarios where Fungible and Non-fungible tokens have to be
 * clearly identified. Note: While a totalSupply of 1 might mean the
 * corresponding is an NFT, there is no guarantees that no other token with the
 * same id are not going to be minted.
 */
abstract contract ERC1155Supply is ERC1155 {
    mapping(uint256 => uint256) private _totalSupply;

    /**
     * @dev Total amount of tokens in with a given id.
     */
    function totalSupply(uint256 id) public view virtual returns (uint256) {
        return _totalSupply[id];
    }

    /**
     * @dev Indicates whether any token exist with a given id, or not.
     */
    function exists(uint256 id) public view virtual returns (bool) {
        return ERC1155Supply.totalSupply(id) > 0;
    }

    /**
     * @dev See {ERC1155-_beforeTokenTransfer}.
     */
    function _beforeTokenTransfer(
        address operator,
        address from,
        address to,
        uint256[] memory ids,
        uint256[] memory amounts,
        bytes memory data
    ) internal virtual override {
        super._beforeTokenTransfer(operator, from, to, ids, amounts, data);

        if (from == address(0)) {
            for (uint256 i = 0; i < ids.length; ++i) {
                _totalSupply[ids[i]] += amounts[i];
            }
        }

        if (to == address(0)) {
            for (uint256 i = 0; i < ids.length; ++i) {
                uint256 id = ids[i];
                uint256 amount = amounts[i];
                uint256 supply = _totalSupply[id];
                require(supply >= amount, "ERC1155: burn amount exceeds totalSupply");
                unchecked {
                    _totalSupply[id] = supply - amount;
                }
            }
        }
    }
}

File 22 of 26 : ERC1155.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC1155/ERC1155.sol)

pragma solidity ^0.8.0;

import "./IERC1155.sol";
import "./IERC1155Receiver.sol";
import "./extensions/IERC1155MetadataURI.sol";
import "../../utils/Address.sol";
import "../../utils/Context.sol";
import "../../utils/introspection/ERC165.sol";

/**
 * @dev Implementation of the basic standard multi-token.
 * See https://eips.ethereum.org/EIPS/eip-1155
 * Originally based on code by Enjin: https://github.com/enjin/erc-1155
 *
 * _Available since v3.1._
 */
contract ERC1155 is Context, ERC165, IERC1155, IERC1155MetadataURI {
    using Address for address;

    // Mapping from token ID to account balances
    mapping(uint256 => mapping(address => uint256)) private _balances;

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

    // Used as the URI for all token types by relying on ID substitution, e.g. https://token-cdn-domain/{id}.json
    string private _uri;

    /**
     * @dev See {_setURI}.
     */
    constructor(string memory uri_) {
        _setURI(uri_);
    }

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

    /**
     * @dev See {IERC1155MetadataURI-uri}.
     *
     * This implementation returns the same URI for *all* token types. It relies
     * on the token type ID substitution mechanism
     * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP].
     *
     * Clients calling this function must replace the `\{id\}` substring with the
     * actual token type ID.
     */
    function uri(uint256) public view virtual override returns (string memory) {
        return _uri;
    }

    /**
     * @dev See {IERC1155-balanceOf}.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     */
    function balanceOf(address account, uint256 id) public view virtual override returns (uint256) {
        require(account != address(0), "ERC1155: balance query for the zero address");
        return _balances[id][account];
    }

    /**
     * @dev See {IERC1155-balanceOfBatch}.
     *
     * Requirements:
     *
     * - `accounts` and `ids` must have the same length.
     */
    function balanceOfBatch(address[] memory accounts, uint256[] memory ids)
        public
        view
        virtual
        override
        returns (uint256[] memory)
    {
        require(accounts.length == ids.length, "ERC1155: accounts and ids length mismatch");

        uint256[] memory batchBalances = new uint256[](accounts.length);

        for (uint256 i = 0; i < accounts.length; ++i) {
            batchBalances[i] = balanceOf(accounts[i], ids[i]);
        }

        return batchBalances;
    }

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

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

    /**
     * @dev See {IERC1155-safeTransferFrom}.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 id,
        uint256 amount,
        bytes memory data
    ) public virtual override {
        require(
            from == _msgSender() || isApprovedForAll(from, _msgSender()),
            "ERC1155: caller is not owner nor approved"
        );
        _safeTransferFrom(from, to, id, amount, data);
    }

    /**
     * @dev See {IERC1155-safeBatchTransferFrom}.
     */
    function safeBatchTransferFrom(
        address from,
        address to,
        uint256[] memory ids,
        uint256[] memory amounts,
        bytes memory data
    ) public virtual override {
        require(
            from == _msgSender() || isApprovedForAll(from, _msgSender()),
            "ERC1155: transfer caller is not owner nor approved"
        );
        _safeBatchTransferFrom(from, to, ids, amounts, data);
    }

    /**
     * @dev Transfers `amount` tokens of token type `id` from `from` to `to`.
     *
     * Emits a {TransferSingle} event.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - `from` must have a balance of tokens of type `id` of at least `amount`.
     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the
     * acceptance magic value.
     */
    function _safeTransferFrom(
        address from,
        address to,
        uint256 id,
        uint256 amount,
        bytes memory data
    ) internal virtual {
        require(to != address(0), "ERC1155: transfer to the zero address");

        address operator = _msgSender();
        uint256[] memory ids = _asSingletonArray(id);
        uint256[] memory amounts = _asSingletonArray(amount);

        _beforeTokenTransfer(operator, from, to, ids, amounts, data);

        uint256 fromBalance = _balances[id][from];
        require(fromBalance >= amount, "ERC1155: insufficient balance for transfer");
        unchecked {
            _balances[id][from] = fromBalance - amount;
        }
        _balances[id][to] += amount;

        emit TransferSingle(operator, from, to, id, amount);

        _afterTokenTransfer(operator, from, to, ids, amounts, data);

        _doSafeTransferAcceptanceCheck(operator, from, to, id, amount, data);
    }

    /**
     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_safeTransferFrom}.
     *
     * Emits a {TransferBatch} event.
     *
     * Requirements:
     *
     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the
     * acceptance magic value.
     */
    function _safeBatchTransferFrom(
        address from,
        address to,
        uint256[] memory ids,
        uint256[] memory amounts,
        bytes memory data
    ) internal virtual {
        require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch");
        require(to != address(0), "ERC1155: transfer to the zero address");

        address operator = _msgSender();

        _beforeTokenTransfer(operator, from, to, ids, amounts, data);

        for (uint256 i = 0; i < ids.length; ++i) {
            uint256 id = ids[i];
            uint256 amount = amounts[i];

            uint256 fromBalance = _balances[id][from];
            require(fromBalance >= amount, "ERC1155: insufficient balance for transfer");
            unchecked {
                _balances[id][from] = fromBalance - amount;
            }
            _balances[id][to] += amount;
        }

        emit TransferBatch(operator, from, to, ids, amounts);

        _afterTokenTransfer(operator, from, to, ids, amounts, data);

        _doSafeBatchTransferAcceptanceCheck(operator, from, to, ids, amounts, data);
    }

    /**
     * @dev Sets a new URI for all token types, by relying on the token type ID
     * substitution mechanism
     * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP].
     *
     * By this mechanism, any occurrence of the `\{id\}` substring in either the
     * URI or any of the amounts in the JSON file at said URI will be replaced by
     * clients with the token type ID.
     *
     * For example, the `https://token-cdn-domain/\{id\}.json` URI would be
     * interpreted by clients as
     * `https://token-cdn-domain/000000000000000000000000000000000000000000000000000000000004cce0.json`
     * for token type ID 0x4cce0.
     *
     * See {uri}.
     *
     * Because these URIs cannot be meaningfully represented by the {URI} event,
     * this function emits no events.
     */
    function _setURI(string memory newuri) internal virtual {
        _uri = newuri;
    }

    /**
     * @dev Creates `amount` tokens of token type `id`, and assigns them to `to`.
     *
     * Emits a {TransferSingle} event.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the
     * acceptance magic value.
     */
    function _mint(
        address to,
        uint256 id,
        uint256 amount,
        bytes memory data
    ) internal virtual {
        require(to != address(0), "ERC1155: mint to the zero address");

        address operator = _msgSender();
        uint256[] memory ids = _asSingletonArray(id);
        uint256[] memory amounts = _asSingletonArray(amount);

        _beforeTokenTransfer(operator, address(0), to, ids, amounts, data);

        _balances[id][to] += amount;
        emit TransferSingle(operator, address(0), to, id, amount);

        _afterTokenTransfer(operator, address(0), to, ids, amounts, data);

        _doSafeTransferAcceptanceCheck(operator, address(0), to, id, amount, data);
    }

    /**
     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_mint}.
     *
     * Requirements:
     *
     * - `ids` and `amounts` must have the same length.
     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the
     * acceptance magic value.
     */
    function _mintBatch(
        address to,
        uint256[] memory ids,
        uint256[] memory amounts,
        bytes memory data
    ) internal virtual {
        require(to != address(0), "ERC1155: mint to the zero address");
        require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch");

        address operator = _msgSender();

        _beforeTokenTransfer(operator, address(0), to, ids, amounts, data);

        for (uint256 i = 0; i < ids.length; i++) {
            _balances[ids[i]][to] += amounts[i];
        }

        emit TransferBatch(operator, address(0), to, ids, amounts);

        _afterTokenTransfer(operator, address(0), to, ids, amounts, data);

        _doSafeBatchTransferAcceptanceCheck(operator, address(0), to, ids, amounts, data);
    }

    /**
     * @dev Destroys `amount` tokens of token type `id` from `from`
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `from` must have at least `amount` tokens of token type `id`.
     */
    function _burn(
        address from,
        uint256 id,
        uint256 amount
    ) internal virtual {
        require(from != address(0), "ERC1155: burn from the zero address");

        address operator = _msgSender();
        uint256[] memory ids = _asSingletonArray(id);
        uint256[] memory amounts = _asSingletonArray(amount);

        _beforeTokenTransfer(operator, from, address(0), ids, amounts, "");

        uint256 fromBalance = _balances[id][from];
        require(fromBalance >= amount, "ERC1155: burn amount exceeds balance");
        unchecked {
            _balances[id][from] = fromBalance - amount;
        }

        emit TransferSingle(operator, from, address(0), id, amount);

        _afterTokenTransfer(operator, from, address(0), ids, amounts, "");
    }

    /**
     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_burn}.
     *
     * Requirements:
     *
     * - `ids` and `amounts` must have the same length.
     */
    function _burnBatch(
        address from,
        uint256[] memory ids,
        uint256[] memory amounts
    ) internal virtual {
        require(from != address(0), "ERC1155: burn from the zero address");
        require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch");

        address operator = _msgSender();

        _beforeTokenTransfer(operator, from, address(0), ids, amounts, "");

        for (uint256 i = 0; i < ids.length; i++) {
            uint256 id = ids[i];
            uint256 amount = amounts[i];

            uint256 fromBalance = _balances[id][from];
            require(fromBalance >= amount, "ERC1155: burn amount exceeds balance");
            unchecked {
                _balances[id][from] = fromBalance - amount;
            }
        }

        emit TransferBatch(operator, from, address(0), ids, amounts);

        _afterTokenTransfer(operator, from, address(0), ids, amounts, "");
    }

    /**
     * @dev Approve `operator` to operate on all of `owner` tokens
     *
     * Emits a {ApprovalForAll} event.
     */
    function _setApprovalForAll(
        address owner,
        address operator,
        bool approved
    ) internal virtual {
        require(owner != operator, "ERC1155: setting approval status for self");
        _operatorApprovals[owner][operator] = approved;
        emit ApprovalForAll(owner, operator, approved);
    }

    /**
     * @dev Hook that is called before any token transfer. This includes minting
     * and burning, as well as batched variants.
     *
     * The same hook is called on both single and batched variants. For single
     * transfers, the length of the `id` and `amount` arrays will be 1.
     *
     * Calling conditions (for each `id` and `amount` pair):
     *
     * - When `from` and `to` are both non-zero, `amount` of ``from``'s tokens
     * of token type `id` will be  transferred to `to`.
     * - When `from` is zero, `amount` tokens of token type `id` will be minted
     * for `to`.
     * - when `to` is zero, `amount` of ``from``'s tokens of token type `id`
     * will be burned.
     * - `from` and `to` are never both zero.
     * - `ids` and `amounts` have the same, non-zero length.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _beforeTokenTransfer(
        address operator,
        address from,
        address to,
        uint256[] memory ids,
        uint256[] memory amounts,
        bytes memory data
    ) internal virtual {}

    /**
     * @dev Hook that is called after any token transfer. This includes minting
     * and burning, as well as batched variants.
     *
     * The same hook is called on both single and batched variants. For single
     * transfers, the length of the `id` and `amount` arrays will be 1.
     *
     * Calling conditions (for each `id` and `amount` pair):
     *
     * - When `from` and `to` are both non-zero, `amount` of ``from``'s tokens
     * of token type `id` will be  transferred to `to`.
     * - When `from` is zero, `amount` tokens of token type `id` will be minted
     * for `to`.
     * - when `to` is zero, `amount` of ``from``'s tokens of token type `id`
     * will be burned.
     * - `from` and `to` are never both zero.
     * - `ids` and `amounts` have the same, non-zero length.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _afterTokenTransfer(
        address operator,
        address from,
        address to,
        uint256[] memory ids,
        uint256[] memory amounts,
        bytes memory data
    ) internal virtual {}

    function _doSafeTransferAcceptanceCheck(
        address operator,
        address from,
        address to,
        uint256 id,
        uint256 amount,
        bytes memory data
    ) private {
        if (to.isContract()) {
            try IERC1155Receiver(to).onERC1155Received(operator, from, id, amount, data) returns (bytes4 response) {
                if (response != IERC1155Receiver.onERC1155Received.selector) {
                    revert("ERC1155: ERC1155Receiver rejected tokens");
                }
            } catch Error(string memory reason) {
                revert(reason);
            } catch {
                revert("ERC1155: transfer to non ERC1155Receiver implementer");
            }
        }
    }

    function _doSafeBatchTransferAcceptanceCheck(
        address operator,
        address from,
        address to,
        uint256[] memory ids,
        uint256[] memory amounts,
        bytes memory data
    ) private {
        if (to.isContract()) {
            try IERC1155Receiver(to).onERC1155BatchReceived(operator, from, ids, amounts, data) returns (
                bytes4 response
            ) {
                if (response != IERC1155Receiver.onERC1155BatchReceived.selector) {
                    revert("ERC1155: ERC1155Receiver rejected tokens");
                }
            } catch Error(string memory reason) {
                revert(reason);
            } catch {
                revert("ERC1155: transfer to non ERC1155Receiver implementer");
            }
        }
    }

    function _asSingletonArray(uint256 element) private pure returns (uint256[] memory) {
        uint256[] memory array = new uint256[](1);
        array[0] = element;

        return array;
    }
}

File 23 of 26 : IERC1155.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC1155/IERC1155.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

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

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

pragma solidity ^0.8.0;

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

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

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

File 25 of 26 : IERC1155MetadataURI.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC1155/extensions/IERC1155MetadataURI.sol)

pragma solidity ^0.8.0;

import "../IERC1155.sol";

/**
 * @dev Interface of the optional ERC1155MetadataExtension interface, as defined
 * in the https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[EIP].
 *
 * _Available since v3.1._
 */
interface IERC1155MetadataURI is IERC1155 {
    /**
     * @dev Returns the URI for token type `id`.
     *
     * If the `\{id\}` substring is present in the URI, it must be replaced by
     * clients with the actual token type ID.
     */
    function uri(uint256 id) external view returns (string memory);
}

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

pragma solidity ^0.8.0;

import "./IERC165.sol";

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

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"string","name":"_name","type":"string"},{"internalType":"string","name":"_symbol","type":"string"},{"internalType":"address","name":"_signer","type":"address"},{"internalType":"string","name":"_secret","type":"string"},{"internalType":"address","name":"_endpoint","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","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":"uint256","name":"_tokenID","type":"uint256"},{"indexed":true,"internalType":"address","name":"_account","type":"address"}],"name":"Claimed","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint16","name":"_srcChainId","type":"uint16"},{"indexed":false,"internalType":"bytes","name":"_srcAddress","type":"bytes"},{"indexed":false,"internalType":"uint64","name":"_nonce","type":"uint64"},{"indexed":false,"internalType":"bytes","name":"_payload","type":"bytes"}],"name":"MessageFailed","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"fee","type":"uint256"}],"name":"MessageFee","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint16","name":"_srcChainId","type":"uint16"},{"indexed":false,"internalType":"bytes","name":"_from","type":"bytes"},{"indexed":false,"internalType":"uint256","name":"_tokenId","type":"uint256"},{"indexed":false,"internalType":"address","name":"_to","type":"address"}],"name":"ReceiveNFT","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"indexed":false,"internalType":"uint256[]","name":"values","type":"uint256[]"}],"name":"TransferBatch","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"TransferSingle","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"value","type":"string"},{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"}],"name":"URI","type":"event"},{"stateMutability":"payable","type":"fallback"},{"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"addAuthorizedAccount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_claimable","type":"bool"},{"internalType":"enum InfinityKeysAchievement.GateState","name":"_gateState","type":"uint8"},{"internalType":"uint256[]","name":"_internalGateIDs","type":"uint256[]"},{"internalType":"address","name":"_externalGateContract","type":"address"},{"internalType":"string","name":"_tokenURI","type":"string"}],"name":"addToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_claimable","type":"bool"},{"internalType":"string","name":"_tokenURI","type":"string"}],"name":"addTokenUngated","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenID","type":"uint256"},{"internalType":"address","name":"_address","type":"address"}],"name":"airdrop","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"accounts","type":"address[]"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"}],"name":"balanceOfBatch","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenID","type":"uint256"},{"internalType":"address","name":"_address","type":"address"}],"name":"checkIfClaimed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenID","type":"uint256"},{"internalType":"bytes","name":"_signature","type":"bytes"}],"name":"claim","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenID","type":"uint256"},{"internalType":"bool","name":"_claimable","type":"bool"},{"internalType":"enum InfinityKeysAchievement.GateState","name":"_gateState","type":"uint8"},{"internalType":"uint256[]","name":"_internalGateIDs","type":"uint256[]"},{"internalType":"address","name":"_externalGateContract","type":"address"},{"internalType":"string","name":"_tokenURI","type":"string"}],"name":"editToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenID","type":"uint256"},{"internalType":"string","name":"_tokenURI","type":"string"}],"name":"editTokenURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenID","type":"uint256"}],"name":"exists","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint16","name":"","type":"uint16"},{"internalType":"bytes","name":"","type":"bytes"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"failedMessages","outputs":[{"internalType":"uint256","name":"payloadLength","type":"uint256"},{"internalType":"bytes32","name":"payloadHash","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"gasForDestinationLzReceive","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenID","type":"uint256"}],"name":"getToken","outputs":[{"internalType":"bool","name":"","type":"bool"},{"internalType":"enum InfinityKeysAchievement.GateState","name":"","type":"uint8"},{"internalType":"uint256[]","name":"","type":"uint256[]"},{"internalType":"address","name":"","type":"address"},{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"isAuthorized","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenID","type":"uint256"}],"name":"isSaleOpen","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint16","name":"_srcChainId","type":"uint16"},{"internalType":"bytes","name":"_srcAddress","type":"bytes"},{"internalType":"uint64","name":"_nonce","type":"uint64"},{"internalType":"bytes","name":"_payload","type":"bytes"}],"name":"lzReceive","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint16","name":"_srcChainId","type":"uint16"},{"internalType":"bytes","name":"_srcAddress","type":"bytes"},{"internalType":"uint64","name":"_nonce","type":"uint64"},{"internalType":"bytes","name":"_payload","type":"bytes"}],"name":"onLzReceive","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address payable","name":"_address","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"release","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"_token","type":"address"},{"internalType":"address","name":"_address","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"release","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"removeAuthorizedAccount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"_srcChainId","type":"uint16"},{"internalType":"bytes","name":"_srcAddress","type":"bytes"},{"internalType":"uint64","name":"_nonce","type":"uint64"},{"internalType":"bytes","name":"_payload","type":"bytes"}],"name":"retryMessage","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeBatchTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"amount","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":"uint256","name":"newVal","type":"uint256"}],"name":"setGasForDestinationLzReceive","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_secret","type":"string"}],"name":"setSecret","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_signer","type":"address"}],"name":"setSigner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenID","type":"uint256"},{"internalType":"bool","name":"_claimable","type":"bool"}],"name":"setTokenClaimable","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"_chainId","type":"uint16"},{"internalType":"bytes","name":"_trustedRemote","type":"bytes"}],"name":"setTrustedRemote","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":"id","type":"uint256"}],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupplyAll","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"_chainID","type":"uint16"},{"internalType":"uint256","name":"_tokenID","type":"uint256"}],"name":"traverseChain","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint16","name":"","type":"uint16"}],"name":"trustedRemoteLookup","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenID","type":"uint256"}],"name":"uri","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]

6080604052620557306009553480156200001857600080fd5b50604051620054fd380380620054fd8339810160408190526200003b9162000544565b60408051808201909152601b81527f68747470733a2f2f7777772e696e66696e6974796b6579732e696f000000000060208201526200007a336200014d565b6001806000620000926000546001600160a01b031690565b6001600160a01b031681526020810191909152604001600020805460ff1916911515919091179055620000c5816200019d565b508451620000db90600d906020880190620003ce565b508351620000f190600e906020870190620003ce565b50620000fd82620001b6565b62000108836200021a565b600280546001600160a01b0319166001600160a01b0383161790556200014273e2e06703d00790d6af7cc9198cdba8aaa41a30ff62000287565b50505050506200064a565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b8051620001b2906007906020840190620003ce565b5050565b6000546001600160a01b03163314620002055760405162461bcd60e51b81526020600482018190526024820152600080516020620054dd83398151915260448201526064015b60405180910390fd5b8051620001b290600a906020840190620003ce565b6000546001600160a01b03163314620002655760405162461bcd60e51b81526020600482018190526024820152600080516020620054dd8339815191526044820152606401620001fc565b600b80546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b03163314620002d25760405162461bcd60e51b81526020600482018190526024820152600080516020620054dd8339815191526044820152606401620001fc565b6001600160a01b0381166000908152600160208181526040909220805460ff191690911790556200030e9082906200240962000311821b17901c565b50565b6000546001600160a01b031633146200035c5760405162461bcd60e51b81526020600482018190526024820152600080516020620054dd8339815191526044820152606401620001fc565b6001600160a01b038116620003c35760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401620001fc565b6200030e816200014d565b828054620003dc90620005f7565b90600052602060002090601f0160209004810192826200040057600085556200044b565b82601f106200041b57805160ff19168380011785556200044b565b828001600101855582156200044b579182015b828111156200044b5782518255916020019190600101906200042e565b50620004599291506200045d565b5090565b5b808211156200045957600081556001016200045e565b80516001600160a01b03811681146200048c57600080fd5b919050565b600082601f830112620004a2578081fd5b81516001600160401b0380821115620004bf57620004bf62000634565b604051601f8301601f19908116603f01168101908282118183101715620004ea57620004ea62000634565b8160405283815260209250868385880101111562000506578485fd5b8491505b838210156200052957858201830151818301840152908201906200050a565b838211156200053a57848385830101525b9695505050505050565b600080600080600060a086880312156200055c578081fd5b85516001600160401b038082111562000573578283fd5b6200058189838a0162000491565b9650602088015191508082111562000597578283fd5b620005a589838a0162000491565b9550620005b56040890162000474565b94506060880151915080821115620005cb578283fd5b50620005da8882890162000491565b925050620005eb6080870162000474565b90509295509295909350565b600181811c908216806200060c57607f821691505b602082108114156200062e57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052604160045260246000fd5b614e83806200065a6000396000f3fe60806040526004361061023b5760003560e01c80638da5cb5b1161012d578063cfa9849d116100b0578063eb8d72b711610077578063eb8d72b714610748578063f242432a14610768578063f2fde38b14610788578063f3234f40146107a8578063f32a4e1d146107be578063fe9fbb80146107de57005b8063cfa9849d14610688578063d1deba1f1461069b578063d83318ca146106ae578063e4b50cb8146106ce578063e985e9c5146106ff57005b8063a924c043116100f4578063a924c043146105e6578063b42394f114610606578063bc63f02e1461061b578063bd85b0391461063b578063be47aa091461066857005b80638da5cb5b146104fe5780638ee7491214610526578063943fb8721461059157806395d89b41146105b1578063a22cb465146105c657005b806336692c02116101c05780634f558e79116101875780634f558e79146104495780636c19e78314610469578063715018a6146104895780637533d7881461049e5780637ed6c926146104be5780638bfb07c9146104de57005b806336692c02146103a957806338926b6d146103c95780634044556d146103dc5780634dfc5cbc146103fc5780634e1273f41461041c57005b80630e89341c116102045780630e89341c146103095780631c37a8221461032957806321718a1614610349578063234344a2146103695780632eb2c2d61461038957005b80621d356714610244578062fdd58e1461026457806301ffc9a7146102975780630357371d146102c757806306fdde03146102e757005b3661024257005b005b34801561025057600080fd5b5061024261025f36600461442a565b610817565b34801561027057600080fd5b5061028461027f36600461407f565b610a11565b6040519081526020015b60405180910390f35b3480156102a357600080fd5b506102b76102b236600461423a565b610aa8565b604051901515815260200161028e565b3480156102d357600080fd5b506102426102e2366004613eb3565b610af8565b3480156102f357600080fd5b506102fc610b80565b60405161028e91906148b9565b34801561031557600080fd5b506102fc6103243660046144c6565b610c0e565b34801561033557600080fd5b5061024261034436600461442a565b610cff565b34801561035557600080fd5b506102426103643660046145de565b610d6e565b34801561037557600080fd5b50610242610384366004614179565b610e26565b34801561039557600080fd5b506102426103a4366004613f43565b610f1e565b3480156103b557600080fd5b506102426103c43660046141f7565b610fb5565b6102426103d73660046145de565b611002565b3480156103e857600080fd5b506102b76103f73660046144c6565b611248565b34801561040857600080fd5b5061024261041736600461453e565b6112c0565b34801561042857600080fd5b5061043c610437366004614091565b6113f6565b60405161028e919061481a565b34801561045557600080fd5b506102b76104643660046144c6565b611557565b34801561047557600080fd5b50610242610484366004613e97565b61156a565b34801561049557600080fd5b506102426115b6565b3480156104aa57600080fd5b506102fc6104b93660046142e4565b6115ec565b3480156104ca57600080fd5b506102426104d93660046142b2565b611605565b3480156104ea57600080fd5b506102426104f9366004614272565b611642565b34801561050a57600080fd5b506000546040516001600160a01b03909116815260200161028e565b34801561053257600080fd5b5061057c61054136600461434e565b600360209081526000938452604080852084518086018401805192815290840195840195909520945292905282529020805460019091015482565b6040805192835260208301919091520161028e565b34801561059d57600080fd5b506102426105ac3660046144c6565b611755565b3480156105bd57600080fd5b506102fc611784565b3480156105d257600080fd5b506102426105e1366004614052565b611791565b3480156105f257600080fd5b50610242610601366004613e97565b61179c565b34801561061257600080fd5b5061043c611873565b34801561062757600080fd5b506102426106363660046144f6565b611930565b34801561064757600080fd5b506102846106563660046144c6565b60009081526008602052604090205490565b34801561067457600080fd5b50610242610683366004613e97565b6119d0565b6102426106963660046144ab565b611a9f565b6102426106a93660046143a2565b611e67565b3480156106ba57600080fd5b506102b76106c93660046144f6565b611ff4565b3480156106da57600080fd5b506106ee6106e93660046144c6565b612096565b60405161028e95949392919061485b565b34801561070b57600080fd5b506102b761071a366004613f0b565b6001600160a01b03918216600090815260066020908152604080832093909416825291909152205460ff1690565b34801561075457600080fd5b506102426107633660046142fe565b612227565b34801561077457600080fd5b50610242610783366004613fec565b61226f565b34801561079457600080fd5b506102426107a3366004613e97565b6122f6565b3480156107b457600080fd5b5061028460095481565b3480156107ca57600080fd5b506102426107d936600461451a565b612352565b3480156107ea57600080fd5b506102b76107f9366004613e97565b6001600160a01b031660009081526001602052604090205460ff1690565b6002546001600160a01b0316331461082e57600080fd5b61ffff84166000908152600460205260409020805461084c90614ca1565b9050835114801561088b575061ffff84166000908152600460205260409081902090516108799190614776565b60405180910390208380519060200120145b6108f95760405162461bcd60e51b815260206004820152603460248201527f4e6f6e626c6f636b696e6752656365697665723a20696e76616c696420736f756044820152731c98d9481cd95b991a5b99c818dbdb9d1c9858dd60621b60648201526084015b60405180910390fd5b604051630e1bd41160e11b81523090631c37a82290610922908790879087908790600401614af5565b600060405180830381600087803b15801561093c57600080fd5b505af192505050801561094d575060015b610a0b576040518060400160405280825181526020018280519060200120815250600360008661ffff1661ffff16815260200190815260200160002084604051610997919061475a565b9081526040805191829003602090810183206001600160401b038716600090815290825291909120835181559201516001909201919091557fe6f254030bcb01ffd20558175c13fcaed6d1520be7becee4c961b65f79243b0d90610a02908690869086908690614af5565b60405180910390a15b50505050565b60006001600160a01b038316610a7d5760405162461bcd60e51b815260206004820152602b60248201527f455243313135353a2062616c616e636520717565727920666f7220746865207a60448201526a65726f206164647265737360a81b60648201526084016108f0565b5060008181526005602090815260408083206001600160a01b03861684529091529020545b92915050565b60006001600160e01b03198216636cdb3d1360e11b1480610ad957506001600160e01b031982166303a24d0760e21b145b80610aa257506301ffc9a760e01b6001600160e01b0319831614610aa2565b6000546001600160a01b03163314610b225760405162461bcd60e51b81526004016108f0906149da565b47811115610b725760405162461bcd60e51b815260206004820152601860248201527f72656c656173653a20496e61766c696420616d6f756e742e000000000000000060448201526064016108f0565b610b7c82826124a1565b5050565b600d8054610b8d90614ca1565b80601f0160208091040260200160405190810160405280929190818152602001828054610bb990614ca1565b8015610c065780601f10610bdb57610100808354040283529160200191610c06565b820191906000526020600020905b815481529060010190602001808311610be957829003601f168201915b505050505081565b6060610c1982611557565b610c5e5760405162461bcd60e51b81526020600482015260166024820152752aa9249d103737b732bc34b9ba32b73a103a37b5b2b760511b60448201526064016108f0565b6000828152600f602052604090206003018054610c7a90614ca1565b80601f0160208091040260200160405190810160405280929190818152602001828054610ca690614ca1565b8015610cf35780601f10610cc857610100808354040283529160200191610cf3565b820191906000526020600020905b815481529060010190602001808311610cd657829003601f168201915b50505050509050919050565b333014610d625760405162461bcd60e51b815260206004820152602b60248201527f4e6f6e626c6f636b696e6752656365697665723a2063616c6c6572206d75737460448201526a10313290213934b233b29760a91b60648201526084016108f0565b610a0b848484846125ba565b3360009081526001602052604090205460ff16610d9d5760405162461bcd60e51b81526004016108f090614914565b610da682611557565b610e005760405162461bcd60e51b815260206004820152602560248201527f45646974546f6b656e5552493a20546f6b656e20494420646f6573206e6f7420604482015264195e1a5cdd60da1b60648201526084016108f0565b6000828152600f6020908152604090912082519091610a0b916003840191850190613bf2565b3360009081526001602052604090205460ff16610e555760405162461bcd60e51b81526004016108f090614914565b6000600f6000610e64600c5490565b81526020810191909152604001600020805460ff19811688151590811783559192508691839161ffff191661ff001990911617610100836002811115610eba57634e487b7160e01b600052602160045260246000fd5b02179055508351610ed49060018301906020870190613c76565b506002810180546001600160a01b0319166001600160a01b0385161790558151610f079060038301906020850190613bf2565b50610f16600c80546001019055565b505050505050565b6001600160a01b038516331480610f3a5750610f3a853361071a565b610fa15760405162461bcd60e51b815260206004820152603260248201527f455243313135353a207472616e736665722063616c6c6572206973206e6f74206044820152711bdddb995c881b9bdc88185c1c1c9bdd995960721b60648201526084016108f0565b610fae858585858561262e565b5050505050565b3360009081526001602052604090205460ff16610fe45760405162461bcd60e51b81526004016108f090614914565b60408051600080825260208201909252610b7c918491600085610e26565b61100b82611557565b6110575760405162461bcd60e51b815260206004820152601b60248201527f636c61696d3a20746f6b656e20646f6573206e6f74206578697374000000000060448201526064016108f0565b61106082611248565b6110a45760405162461bcd60e51b815260206004820152601560248201527418db185a5b4e881cd85b19481a5cc818db1bdcd959605a1b60448201526064016108f0565b6110ae8233611ff4565b156111095760405162461bcd60e51b815260206004820152602560248201527f636c61696d3a204e465420616c726561647920636c61696d6564206279206164604482015264647265737360d81b60648201526084016108f0565b6111138282612830565b61116a5760405162461bcd60e51b815260206004820152602260248201527f636c61696d3a2053657276657220566572696669636174696f6e204661696c65604482015261321760f11b60648201526084016108f0565b611174823361285e565b6111d25760405162461bcd60e51b815260206004820152602960248201527f636c61696d3a204164647265737320646f6573206e6f74206f776e20726571756044820152681a5cda5d194813919560ba1b60648201526084016108f0565b6000828152600f602090815260408083203380855260049091018352818420805460ff191660019081179091558251938401909252928252611217929185919061299c565b604051339083907f6aa3eac93d079e5e100b1029be716caa33586c96aa4baac390669fb5c2a2121290600090a35050565b600061125382611557565b6112aa5760405162461bcd60e51b815260206004820152602260248201527f697353616c65436c6f7365643a20746f6b656e20646f6573206e6f74206578696044820152611cdd60f21b60648201526084016108f0565b506000908152600f602052604090205460ff1690565b3360009081526001602052604090205460ff166112ef5760405162461bcd60e51b81526004016108f090614914565b6112f886611557565b61134f5760405162461bcd60e51b815260206004820152602260248201527f45646974546f6b656e3a20546f6b656e20494420646f6573206e6f74206578696044820152611cdd60f21b60648201526084016108f0565b6000868152600f60205260409020805486151560ff198216811783558691839161ff00191661ffff199091161761010083600281111561139f57634e487b7160e01b600052602160045260246000fd5b021790555083516113b99060018301906020870190613c76565b506002810180546001600160a01b0319166001600160a01b03851617905581516113ec9060038301906020850190613bf2565b5050505050505050565b6060815183511461145b5760405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e677468604482015268040dad2e6dac2e8c6d60bb1b60648201526084016108f0565b600083516001600160401b0381111561148457634e487b7160e01b600052604160045260246000fd5b6040519080825280602002602001820160405280156114ad578160200160208202803683370190505b50905060005b845181101561154f576115148582815181106114df57634e487b7160e01b600052603260045260246000fd5b602002602001015185838151811061150757634e487b7160e01b600052603260045260246000fd5b6020026020010151610a11565b82828151811061153457634e487b7160e01b600052603260045260246000fd5b602090810291909101015261154881614d02565b90506114b3565b509392505050565b600081611563600c5490565b1192915050565b6000546001600160a01b031633146115945760405162461bcd60e51b81526004016108f0906149da565b600b80546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b031633146115e05760405162461bcd60e51b81526004016108f0906149da565b6115ea6000612ac1565b565b60046020526000908152604090208054610b8d90614ca1565b6000546001600160a01b0316331461162f5760405162461bcd60e51b81526004016108f0906149da565b8051610b7c90600a906020840190613bf2565b6000546001600160a01b0316331461166c5760405162461bcd60e51b81526004016108f0906149da565b6040516370a0823160e01b81523060048201526001600160a01b038416906370a082319060240160206040518083038186803b1580156116ab57600080fd5b505afa1580156116bf573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116e391906144de565b8111156117455760405162461bcd60e51b815260206004820152602a60248201527f72656c656173653a20696e73756666696369656e7420746f6b656e732045524360448201526919181031b0b63632b21760b11b60648201526084016108f0565b611750838383612b11565b505050565b6000546001600160a01b0316331461177f5760405162461bcd60e51b81526004016108f0906149da565b600955565b600e8054610b8d90614ca1565b610b7c338383612b63565b6000546001600160a01b031633146117c65760405162461bcd60e51b81526004016108f0906149da565b6001600160a01b03811660009081526001602052604090205460ff161561184c5760405162461bcd60e51b815260206004820152603460248201527f616464417574686f72697a65644163636f756e743a204163636f756e742069736044820152731030b63932b0b23c9030baba3437b934bd32b21760611b60648201526084016108f0565b6001600160a01b03166000908152600160208190526040909120805460ff19169091179055565b60606000611880600c5490565b6001600160401b038111156118a557634e487b7160e01b600052604160045260246000fd5b6040519080825280602002602001820160405280156118ce578160200160208202803683370190505b50905060005b600c5481101561192a5760008181526008602052604090205482828151811061190d57634e487b7160e01b600052603260045260246000fd5b60209081029190910101528061192281614d02565b9150506118d4565b50919050565b3360009081526001602052604090205460ff1661195f5760405162461bcd60e51b81526004016108f090614914565b61196882611557565b6119b45760405162461bcd60e51b815260206004820152601d60248201527f61697264726f703a20746f6b656e20646f6573206e6f7420657869737400000060448201526064016108f0565b610b7c818360016040518060200160405280600081525061299c565b6000546001600160a01b031633146119fa5760405162461bcd60e51b81526004016108f0906149da565b6001600160a01b03811660009081526001602052604090205460ff16611a7e5760405162461bcd60e51b815260206004820152603360248201527f72656d6f7665417574686f72697a65644163636f756e743a204163636f756e746044820152721034b9903737ba1030baba3437b934bd32b21760691b60648201526084016108f0565b6001600160a01b03166000908152600160205260409020805460ff19169055565b6000611aab3383610a11565b11611b135760405162461bcd60e51b815260206004820152603260248201527f5472617665727365436861696e3a20596f75206d757374206f776e207468697360448201527120746f6b656e20746f20747261766572736560701b60648201526084016108f0565b61ffff821660009081526004602052604090208054611b3190614ca1565b15159050611ba75760405162461bcd60e51b815260206004820152603d60248201527f5472617665727365436861696e3a205468697320636861696e2069732063757260448201527f72656e746c7920756e617661696c61626c6520666f722074726176656c00000060648201526084016108f0565b468261ffff161415611c2b5760405162461bcd60e51b815260206004820152604160248201527f5472617665727365436861696e3a2044657374696e6174696f6e20626c6f636b60448201527f636861696e2063616e2774206265207468652073616d6520617320736f7572636064820152606560f81b608482015260a4016108f0565b611c3733826001612c44565b60408051336020820152808201839052815180820383018152606082018352600954600160f01b60808401526082808401919091528351808403909101815260a283019384905260025463040a7bb160e41b90945290926001926000916001600160a01b0316906340a7bb1090611cba908990309089908790899060a601614a0f565b604080518083038186803b158015611cd157600080fd5b505afa158015611ce5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d09919061460c565b5090507f5b6dd3cd292e9992e63f15316b4cff04aa4a1b86b888b7a53cbfa83a92916cce81604051611d3d91815260200190565b60405180910390a180341015611de15760405162461bcd60e51b815260206004820152605a60248201527f5472617665727365436861696e3a2076616c75652073656e74206973206e6f7460448201527f20656e6f75676820746f20636f766572206d6573736167654665652e20496e6360648201527f72656173652067617320666f72206d6573736167652066656573000000000000608482015260a4016108f0565b60025461ffff87166000908152600460208190526040808320905162c5803160e81b81526001600160a01b039094169363c5803100933493611e2d938d9390928c9233928c9101614b33565b6000604051808303818588803b158015611e4657600080fd5b505af1158015611e5a573d6000803e3d6000fd5b5050505050505050505050565b61ffff85166000908152600360205260408082209051611e8890879061475a565b90815260408051602092819003830190206001600160401b0387166000908152925290206001810154909150611f0f5760405162461bcd60e51b815260206004820152602660248201527f4e6f6e626c6f636b696e6752656365697665723a206e6f2073746f726564206d60448201526565737361676560d01b60648201526084016108f0565b805482148015611f39575080600101548383604051611f2f92919061474a565b6040518091039020145b611f855760405162461bcd60e51b815260206004820152601a60248201527f4c617965725a65726f3a20696e76616c6964207061796c6f616400000000000060448201526064016108f0565b60008082556001820155604051630e1bd41160e11b81523090631c37a82290611fba9089908990899089908990600401614a95565b600060405180830381600087803b158015611fd457600080fd5b505af1158015611fe8573d6000803e3d6000fd5b50505050505050505050565b6000611fff83611557565b6120575760405162461bcd60e51b8152602060048201526024808201527f636865636b4966436c61696d65643a20746f6b656e20646f6573206e6f7420656044820152631e1a5cdd60e21b60648201526084016108f0565b6000838152600f602090815260408083206001600160a01b038616845260040190915290205460ff161561208d57506001610aa2565b50600092915050565b6000806060600060606120a886611557565b6120fe5760405162461bcd60e51b815260206004820152602160248201527f676574546f6b656e3a20546f6b656e20494420646f6573206e6f7420657869736044820152601d60fa1b60648201526084016108f0565b6000868152600f60209081526040918290208054600282015460018301805486518187028101870190975280875260ff80851697610100909504169591946001600160a01b03909316936003909301929185919083018282801561218157602002820191906000526020600020905b81548152602001906001019080831161216d575b5050505050925080805461219490614ca1565b80601f01602080910402602001604051908101604052809291908181526020018280546121c090614ca1565b801561220d5780601f106121e25761010080835404028352916020019161220d565b820191906000526020600020905b8154815290600101906020018083116121f057829003601f168201915b505050505090509450945094509450945091939590929450565b6000546001600160a01b031633146122515760405162461bcd60e51b81526004016108f0906149da565b61ffff83166000908152600460205260409020610a0b908383613cb0565b6001600160a01b03851633148061228b575061228b853361071a565b6122e95760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2063616c6c6572206973206e6f74206f776e6572206e6f7260448201526808185c1c1c9bdd995960ba1b60648201526084016108f0565b610fae8585858585612dd8565b6000546001600160a01b031633146123205760405162461bcd60e51b81526004016108f0906149da565b6001600160a01b0381166000908152600160208190526040909120805460ff1916909117905561234f81612409565b50565b3360009081526001602052604090205460ff166123815760405162461bcd60e51b81526004016108f090614914565b61238a82611557565b6123e95760405162461bcd60e51b815260206004820152602a60248201527f736574546f6b656e436c61696d61626c653a20546f6b656e20494420646f6573604482015269081b9bdd08195e1a5cdd60b21b60648201526084016108f0565b6000918252600f6020526040909120805460ff1916911515919091179055565b6000546001600160a01b031633146124335760405162461bcd60e51b81526004016108f0906149da565b6001600160a01b0381166124985760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016108f0565b61234f81612ac1565b804710156124f15760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e636500000060448201526064016108f0565b6000826001600160a01b03168260405160006040518083038185875af1925050503d806000811461253e576040519150601f19603f3d011682016040523d82523d6000602084013e612543565b606091505b50509050806117505760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d6179206861766520726576657274656400000000000060648201526084016108f0565b600080828060200190518101906125d19190613ede565b915091507f8907acb071a04e4771f0aefe2cd026f2ceb820d8ceb32f566be3066b0e4f3ae78686838560405161260a9493929190614a57565b60405180910390a1610f16828260016040518060200160405280600081525061299c565b81518351146126905760405162461bcd60e51b815260206004820152602860248201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206044820152670dad2e6dac2e8c6d60c31b60648201526084016108f0565b6001600160a01b0384166126b65760405162461bcd60e51b81526004016108f09061494b565b336126c5818787878787612f14565b60005b84518110156127ca5760008582815181106126f357634e487b7160e01b600052603260045260246000fd5b60200260200101519050600085838151811061271f57634e487b7160e01b600052603260045260246000fd5b60209081029190910181015160008481526005835260408082206001600160a01b038e1683529093529190912054909150818110156127705760405162461bcd60e51b81526004016108f090614990565b60008381526005602090815260408083206001600160a01b038e8116855292528083208585039055908b168252812080548492906127af908490614c32565b92505081905550505050806127c390614d02565b90506126c8565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb878760405161281a92919061482d565b60405180910390a4610f168187878787876130c5565b60008061284561283f85613230565b84613351565b600b546001600160a01b03908116911614949350505050565b6000828152600f6020526040812054610100900460ff168181600281111561289657634e487b7160e01b600052602160045260246000fd5b14156128a6576001915050610aa2565b60018160028111156128c857634e487b7160e01b600052602160045260246000fd5b14156129445761293c83600f600087815260200190815260200160002060010180548060200260200160405190810160405280929190818152602001828054801561293257602002820191906000526020600020905b81548152602001906001019080831161291e575b5050505050613372565b915050610aa2565b600281600281111561296657634e487b7160e01b600052602160045260246000fd5b1415612992576000848152600f602052604090206002015461293c9084906001600160a01b03166133cb565b5060009392505050565b6001600160a01b0384166129fc5760405162461bcd60e51b815260206004820152602160248201527f455243313135353a206d696e7420746f20746865207a65726f206164647265736044820152607360f81b60648201526084016108f0565b336000612a0885613455565b90506000612a1585613455565b9050612a2683600089858589612f14565b60008681526005602090815260408083206001600160a01b038b16845290915281208054879290612a58908490614c32565b909155505060408051878152602081018790526001600160a01b03808a1692600092918716917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4612ab8836000898989896134ae565b50505050505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052611750908490613578565b816001600160a01b0316836001600160a01b03161415612bd75760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c20737461747573604482015268103337b91039b2b63360b91b60648201526084016108f0565b6001600160a01b03838116600081815260066020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6001600160a01b038316612ca65760405162461bcd60e51b815260206004820152602360248201527f455243313135353a206275726e2066726f6d20746865207a65726f206164647260448201526265737360e81b60648201526084016108f0565b336000612cb284613455565b90506000612cbf84613455565b9050612cdf83876000858560405180602001604052806000815250612f14565b60008581526005602090815260408083206001600160a01b038a16845290915290205484811015612d5e5760405162461bcd60e51b8152602060048201526024808201527f455243313135353a206275726e20616d6f756e7420657863656564732062616c604482015263616e636560e01b60648201526084016108f0565b60008681526005602090815260408083206001600160a01b038b81168086529184528285208a8703905582518b81529384018a90529092908816917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4604080516020810190915260009052612ab8565b6001600160a01b038416612dfe5760405162461bcd60e51b81526004016108f09061494b565b336000612e0a85613455565b90506000612e1785613455565b9050612e27838989858589612f14565b60008681526005602090815260408083206001600160a01b038c16845290915290205485811015612e6a5760405162461bcd60e51b81526004016108f090614990565b60008781526005602090815260408083206001600160a01b038d8116855292528083208985039055908a16825281208054889290612ea9908490614c32565b909155505060408051888152602081018890526001600160a01b03808b16928c821692918816917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4612f09848a8a8a8a8a6134ae565b505050505050505050565b6001600160a01b038516612fb75760005b8351811015612fb557828181518110612f4e57634e487b7160e01b600052603260045260246000fd5b602002602001015160086000868481518110612f7a57634e487b7160e01b600052603260045260246000fd5b602002602001015181526020019081526020016000206000828254612f9f9190614c32565b90915550612fae905081614d02565b9050612f25565b505b6001600160a01b038416610f165760005b8351811015612ab8576000848281518110612ff357634e487b7160e01b600052603260045260246000fd5b60200260200101519050600084838151811061301f57634e487b7160e01b600052603260045260246000fd5b60200260200101519050600060086000848152602001908152602001600020549050818110156130a25760405162461bcd60e51b815260206004820152602860248201527f455243313135353a206275726e20616d6f756e74206578636565647320746f74604482015267616c537570706c7960c01b60648201526084016108f0565b600092835260086020526040909220910390556130be81614d02565b9050612fc8565b6001600160a01b0384163b15610f165760405163bc197c8160e01b81526001600160a01b0385169063bc197c81906131099089908990889088908890600401614782565b602060405180830381600087803b15801561312357600080fd5b505af1925050508015613153575060408051601f3d908101601f1916820190925261315091810190614256565b60015b6132005761315f614d73565b806308c379a014156131995750613174614d8b565b8061317f575061319b565b8060405162461bcd60e51b81526004016108f091906148b9565b505b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e20455243313135356044820152732932b1b2b4bb32b91034b6b83632b6b2b73a32b960611b60648201526084016108f0565b6001600160e01b0319811663bc197c8160e01b14612ab85760405162461bcd60e51b81526004016108f0906148cc565b6060816132545750506040805180820190915260018152600360fc1b602082015290565b8160005b811561327e578061326881614d02565b91506132779050600a83614c4a565b9150613258565b6000816001600160401b038111156132a657634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f1916602001820160405280156132d0576020820181803683370190505b5090505b8415613349576132e5600183614c5e565b91506132f2600a86614d1d565b6132fd906030614c32565b60f81b81838151811061332057634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350613342600a86614c4a565b94506132d4565b949350505050565b60008061335d8461364a565b90506133498361336c83613681565b906136bc565b6000805b82518110156133c1576133a38484838151811061150757634e487b7160e01b600052603260045260246000fd5b6133b1576000915050610aa2565b6133ba81614d02565b9050613376565b5060019392505050565b6040516370a0823160e01b81526001600160a01b03838116600483015260009183918391908316906370a082319060240160206040518083038186803b15801561341457600080fd5b505afa158015613428573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061344c91906144de565b11949350505050565b6040805160018082528183019092526060916000919060208083019080368337019050509050828160008151811061349d57634e487b7160e01b600052603260045260246000fd5b602090810291909101015292915050565b6001600160a01b0384163b15610f165760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e61906134f290899089908890889088906004016147e0565b602060405180830381600087803b15801561350c57600080fd5b505af192505050801561353c575060408051601f3d908101601f1916820190925261353991810190614256565b60015b6135485761315f614d73565b6001600160e01b0319811663f23a6e6160e01b14612ab85760405162461bcd60e51b81526004016108f0906148cc565b60006135cd826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166136d89092919063ffffffff16565b80519091501561175057808060200190518101906135eb919061415d565b6117505760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016108f0565b6000303383600a6040516020016136649493929190614704565b604051602081830303815290604052805190602001209050919050565b6040517f19457468657265756d205369676e6564204d6573736167653a0a3332000000006020820152603c8101829052600090605c01613664565b60008060006136cb85856136f1565b9150915061154f81613761565b60606136e78484600085613962565b90505b9392505050565b6000808251604114156137285760208301516040840151606085015160001a61371c87828585613a93565b9450945050505061375a565b8251604014156137525760208301516040840151613747868383613b80565b93509350505061375a565b506000905060025b9250929050565b600081600481111561378357634e487b7160e01b600052602160045260246000fd5b141561378c5750565b60018160048111156137ae57634e487b7160e01b600052602160045260246000fd5b14156137fc5760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e6174757265000000000000000060448201526064016108f0565b600281600481111561381e57634e487b7160e01b600052602160045260246000fd5b141561386c5760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e6774680060448201526064016108f0565b600381600481111561388e57634e487b7160e01b600052602160045260246000fd5b14156138e75760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b60648201526084016108f0565b600481600481111561390957634e487b7160e01b600052602160045260246000fd5b141561234f5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b60648201526084016108f0565b6060824710156139c35760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b60648201526084016108f0565b6001600160a01b0385163b613a1a5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016108f0565b600080866001600160a01b03168587604051613a36919061475a565b60006040518083038185875af1925050503d8060008114613a73576040519150601f19603f3d011682016040523d82523d6000602084013e613a78565b606091505b5091509150613a88828286613bb9565b979650505050505050565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0831115613aca5750600090506003613b77565b8460ff16601b14158015613ae257508460ff16601c14155b15613af35750600090506004613b77565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015613b47573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116613b7057600060019250925050613b77565b9150600090505b94509492505050565b6000806001600160ff1b03831681613b9d60ff86901c601b614c32565b9050613bab87828885613a93565b935093505050935093915050565b60608315613bc85750816136ea565b825115613bd85782518084602001fd5b8160405162461bcd60e51b81526004016108f091906148b9565b828054613bfe90614ca1565b90600052602060002090601f016020900481019282613c205760008555613c66565b82601f10613c3957805160ff1916838001178555613c66565b82800160010185558215613c66579182015b82811115613c66578251825591602001919060010190613c4b565b50613c72929150613d24565b5090565b828054828255906000526020600020908101928215613c665791602002820182811115613c66578251825591602001919060010190613c4b565b828054613cbc90614ca1565b90600052602060002090601f016020900481019282613cde5760008555613c66565b82601f10613cf75782800160ff19823516178555613c66565b82800160010185558215613c66579182015b82811115613c66578235825591602001919060010190613d09565b5b80821115613c725760008155600101613d25565b600082601f830112613d49578081fd5b81356020613d5682614c0f565b604051613d638282614cd6565b8381528281019150858301600585901b87018401881015613d82578586fd5b855b85811015613da057813584529284019290840190600101613d84565b5090979650505050505050565b60008083601f840112613dbe578182fd5b5081356001600160401b03811115613dd4578182fd5b60208301915083602082850101111561375a57600080fd5b600082601f830112613dfc578081fd5b81356001600160401b03811115613e1557613e15614d5d565b604051613e2c601f8301601f191660200182614cd6565b818152846020838601011115613e40578283fd5b816020850160208301379081016020019190915292915050565b803560038110613e6957600080fd5b919050565b803561ffff81168114613e6957600080fd5b80356001600160401b0381168114613e6957600080fd5b600060208284031215613ea8578081fd5b81356136ea81614e14565b60008060408385031215613ec5578081fd5b8235613ed081614e14565b946020939093013593505050565b60008060408385031215613ef0578182fd5b8251613efb81614e14565b6020939093015192949293505050565b60008060408385031215613f1d578182fd5b8235613f2881614e14565b91506020830135613f3881614e14565b809150509250929050565b600080600080600060a08688031215613f5a578081fd5b8535613f6581614e14565b94506020860135613f7581614e14565b935060408601356001600160401b0380821115613f90578283fd5b613f9c89838a01613d39565b94506060880135915080821115613fb1578283fd5b613fbd89838a01613d39565b93506080880135915080821115613fd2578283fd5b50613fdf88828901613dec565b9150509295509295909350565b600080600080600060a08688031215614003578283fd5b853561400e81614e14565b9450602086013561401e81614e14565b9350604086013592506060860135915060808601356001600160401b03811115614046578182fd5b613fdf88828901613dec565b60008060408385031215614064578182fd5b823561406f81614e14565b91506020830135613f3881614e29565b60008060408385031215613ec5578182fd5b600080604083850312156140a3578182fd5b82356001600160401b03808211156140b9578384fd5b818501915085601f8301126140cc578384fd5b813560206140d982614c0f565b6040516140e68282614cd6565b8381528281019150858301600585901b870184018b1015614105578889fd5b8896505b8487101561413057803561411c81614e14565b835260019690960195918301918301614109565b5096505086013592505080821115614146578283fd5b5061415385828601613d39565b9150509250929050565b60006020828403121561416e578081fd5b81516136ea81614e29565b600080600080600060a08688031215614190578283fd5b853561419b81614e29565b94506141a960208701613e5a565b935060408601356001600160401b03808211156141c4578485fd5b6141d089838a01613d39565b9450606088013591506141e282614e14565b90925060808701359080821115613fd2578283fd5b60008060408385031215614209578182fd5b823561421481614e29565b915060208301356001600160401b0381111561422e578182fd5b61415385828601613dec565b60006020828403121561424b578081fd5b81356136ea81614e37565b600060208284031215614267578081fd5b81516136ea81614e37565b600080600060608486031215614286578081fd5b833561429181614e14565b925060208401356142a181614e14565b929592945050506040919091013590565b6000602082840312156142c3578081fd5b81356001600160401b038111156142d8578182fd5b61334984828501613dec565b6000602082840312156142f5578081fd5b6136ea82613e6e565b600080600060408486031215614312578081fd5b61431b84613e6e565b925060208401356001600160401b03811115614335578182fd5b61434186828701613dad565b9497909650939450505050565b600080600060608486031215614362578081fd5b61436b84613e6e565b925060208401356001600160401b03811115614385578182fd5b61439186828701613dec565b925050604084013590509250925092565b6000806000806000608086880312156143b9578283fd5b6143c286613e6e565b945060208601356001600160401b03808211156143dd578485fd5b6143e989838a01613dec565b95506143f760408901613e80565b9450606088013591508082111561440c578283fd5b5061441988828901613dad565b969995985093965092949392505050565b6000806000806080858703121561443f578182fd5b61444885613e6e565b935060208501356001600160401b0380821115614463578384fd5b61446f88838901613dec565b945061447d60408801613e80565b93506060870135915080821115614492578283fd5b5061449f87828801613dec565b91505092959194509250565b600080604083850312156144bd578182fd5b613ed083613e6e565b6000602082840312156144d7578081fd5b5035919050565b6000602082840312156144ef578081fd5b5051919050565b60008060408385031215614508578182fd5b823591506020830135613f3881614e14565b6000806040838503121561452c578182fd5b823591506020830135613f3881614e29565b60008060008060008060c08789031215614556578384fd5b86359550602087013561456881614e29565b945061457660408801613e5a565b935060608701356001600160401b0380821115614591578283fd5b61459d8a838b01613d39565b9450608089013591506145af82614e14565b90925060a088013590808211156145c4578283fd5b506145d189828a01613dec565b9150509295509295509295565b600080604083850312156145f0578182fd5b8235915060208301356001600160401b0381111561422e578182fd5b6000806040838503121561461e578182fd5b505080516020909101519092909150565b6000815180845260208085019450808401835b8381101561465e57815187529582019590820190600101614642565b509495945050505050565b60008151808452614681816020860160208601614c75565b601f01601f19169290920160200192915050565b600081546146a281614ca1565b600182811680156146ba57600181146146cb576146fa565b60ff198416875282870194506146fa565b8560005260208060002060005b858110156146f15781548a8201529084019082016146d8565b50505082870194505b5050505092915050565b60006bffffffffffffffffffffffff19808760601b168352808660601b16601484015250835161473b816028850160208801614c75565b613a8860288285010185614695565b8183823760009101908152919050565b6000825161476c818460208701614c75565b9190910192915050565b60006136ea8284614695565b6001600160a01b0386811682528516602082015260a0604082018190526000906147ae9083018661462f565b82810360608401526147c0818661462f565b905082810360808401526147d48185614669565b98975050505050505050565b6001600160a01b03868116825285166020820152604081018490526060810183905260a060808201819052600090613a8890830184614669565b6020815260006136ea602083018461462f565b604081526000614840604083018561462f565b8281036020840152614852818561462f565b95945050505050565b851515815260006003861061487e57634e487b7160e01b81526021600452602481fd5b85602083015260a0604083015261489860a083018661462f565b6001600160a01b038516606084015282810360808401526147d48185614669565b6020815260006136ea6020830184614669565b60208082526028908201527f455243313135353a204552433131353552656365697665722072656a656374656040820152676420746f6b656e7360c01b606082015260800190565b6020808252601f908201527f6f6e6c79417574686f72697a65643a20496e76616c6964206164647265737300604082015260600190565b60208082526025908201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604082015264647265737360d81b606082015260800190565b6020808252602a908201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60408201526939103a3930b739b332b960b11b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b61ffff861681526001600160a01b038516602082015260a060408201819052600090614a3d90830186614669565b841515606084015282810360808401526147d48185614669565b61ffff85168152608060208201526000614a746080830186614669565b6040830194909452506001600160a01b039190911660609091015292915050565b61ffff86168152608060208201526000614ab26080830187614669565b6001600160401b038616604084015282810360608401528381528385602083013781602085830101526020601f19601f8601168201019150509695505050505050565b61ffff85168152608060208201526000614b126080830186614669565b6001600160401b03851660408401528281036060840152613a888185614669565b61ffff871681526000602060c081840152818854614b5081614ca1565b8060c087015260e0600180841660008114614b725760018114614b8757614bb2565b60ff1985168984015261010089019550614bb2565b8d8852868820885b85811015614baa5781548b8201860152908301908801614b8f565b8a0184019650505b50505050508381036040850152614bc98189614669565b915050614be160608401876001600160a01b03169052565b6001600160a01b038516608084015282810360a0840152614c028185614669565b9998505050505050505050565b60006001600160401b03821115614c2857614c28614d5d565b5060051b60200190565b60008219821115614c4557614c45614d31565b500190565b600082614c5957614c59614d47565b500490565b600082821015614c7057614c70614d31565b500390565b60005b83811015614c90578181015183820152602001614c78565b83811115610a0b5750506000910152565b600181811c90821680614cb557607f821691505b6020821081141561192a57634e487b7160e01b600052602260045260246000fd5b601f8201601f191681016001600160401b0381118282101715614cfb57614cfb614d5d565b6040525050565b6000600019821415614d1657614d16614d31565b5060010190565b600082614d2c57614d2c614d47565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b600060033d1115614d8857600481823e5160e01c5b90565b600060443d1015614d995790565b6040516003193d81016004833e81513d6001600160401b038160248401118184111715614dc857505050505090565b8285019150815181811115614de05750505050505090565b843d8701016020828501011115614dfa5750505050505090565b614e0960208286010187614cd6565b509095945050505050565b6001600160a01b038116811461234f57600080fd5b801515811461234f57600080fd5b6001600160e01b03198116811461234f57600080fdfea2646970667358221220fcd10aa48722ce51e587f85643e74fa4ba765513bfed56e168c9204de091ab6d64736f6c634300080400334f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657200000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000247fefef45134228093ac6ce41ee615d327b957e000000000000000000000000000000000000000000000000000000000000012000000000000000000000000066a71dcef29a0ffbdbe3c6a460a3b5bc225cd6750000000000000000000000000000000000000000000000000000000000000017496e66696e6974794b657973416368696576656d656e740000000000000000000000000000000000000000000000000000000000000000000000000000000003494b41000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000056d61676963000000000000000000000000000000000000000000000000000000

Deployed Bytecode

0x60806040526004361061023b5760003560e01c80638da5cb5b1161012d578063cfa9849d116100b0578063eb8d72b711610077578063eb8d72b714610748578063f242432a14610768578063f2fde38b14610788578063f3234f40146107a8578063f32a4e1d146107be578063fe9fbb80146107de57005b8063cfa9849d14610688578063d1deba1f1461069b578063d83318ca146106ae578063e4b50cb8146106ce578063e985e9c5146106ff57005b8063a924c043116100f4578063a924c043146105e6578063b42394f114610606578063bc63f02e1461061b578063bd85b0391461063b578063be47aa091461066857005b80638da5cb5b146104fe5780638ee7491214610526578063943fb8721461059157806395d89b41146105b1578063a22cb465146105c657005b806336692c02116101c05780634f558e79116101875780634f558e79146104495780636c19e78314610469578063715018a6146104895780637533d7881461049e5780637ed6c926146104be5780638bfb07c9146104de57005b806336692c02146103a957806338926b6d146103c95780634044556d146103dc5780634dfc5cbc146103fc5780634e1273f41461041c57005b80630e89341c116102045780630e89341c146103095780631c37a8221461032957806321718a1614610349578063234344a2146103695780632eb2c2d61461038957005b80621d356714610244578062fdd58e1461026457806301ffc9a7146102975780630357371d146102c757806306fdde03146102e757005b3661024257005b005b34801561025057600080fd5b5061024261025f36600461442a565b610817565b34801561027057600080fd5b5061028461027f36600461407f565b610a11565b6040519081526020015b60405180910390f35b3480156102a357600080fd5b506102b76102b236600461423a565b610aa8565b604051901515815260200161028e565b3480156102d357600080fd5b506102426102e2366004613eb3565b610af8565b3480156102f357600080fd5b506102fc610b80565b60405161028e91906148b9565b34801561031557600080fd5b506102fc6103243660046144c6565b610c0e565b34801561033557600080fd5b5061024261034436600461442a565b610cff565b34801561035557600080fd5b506102426103643660046145de565b610d6e565b34801561037557600080fd5b50610242610384366004614179565b610e26565b34801561039557600080fd5b506102426103a4366004613f43565b610f1e565b3480156103b557600080fd5b506102426103c43660046141f7565b610fb5565b6102426103d73660046145de565b611002565b3480156103e857600080fd5b506102b76103f73660046144c6565b611248565b34801561040857600080fd5b5061024261041736600461453e565b6112c0565b34801561042857600080fd5b5061043c610437366004614091565b6113f6565b60405161028e919061481a565b34801561045557600080fd5b506102b76104643660046144c6565b611557565b34801561047557600080fd5b50610242610484366004613e97565b61156a565b34801561049557600080fd5b506102426115b6565b3480156104aa57600080fd5b506102fc6104b93660046142e4565b6115ec565b3480156104ca57600080fd5b506102426104d93660046142b2565b611605565b3480156104ea57600080fd5b506102426104f9366004614272565b611642565b34801561050a57600080fd5b506000546040516001600160a01b03909116815260200161028e565b34801561053257600080fd5b5061057c61054136600461434e565b600360209081526000938452604080852084518086018401805192815290840195840195909520945292905282529020805460019091015482565b6040805192835260208301919091520161028e565b34801561059d57600080fd5b506102426105ac3660046144c6565b611755565b3480156105bd57600080fd5b506102fc611784565b3480156105d257600080fd5b506102426105e1366004614052565b611791565b3480156105f257600080fd5b50610242610601366004613e97565b61179c565b34801561061257600080fd5b5061043c611873565b34801561062757600080fd5b506102426106363660046144f6565b611930565b34801561064757600080fd5b506102846106563660046144c6565b60009081526008602052604090205490565b34801561067457600080fd5b50610242610683366004613e97565b6119d0565b6102426106963660046144ab565b611a9f565b6102426106a93660046143a2565b611e67565b3480156106ba57600080fd5b506102b76106c93660046144f6565b611ff4565b3480156106da57600080fd5b506106ee6106e93660046144c6565b612096565b60405161028e95949392919061485b565b34801561070b57600080fd5b506102b761071a366004613f0b565b6001600160a01b03918216600090815260066020908152604080832093909416825291909152205460ff1690565b34801561075457600080fd5b506102426107633660046142fe565b612227565b34801561077457600080fd5b50610242610783366004613fec565b61226f565b34801561079457600080fd5b506102426107a3366004613e97565b6122f6565b3480156107b457600080fd5b5061028460095481565b3480156107ca57600080fd5b506102426107d936600461451a565b612352565b3480156107ea57600080fd5b506102b76107f9366004613e97565b6001600160a01b031660009081526001602052604090205460ff1690565b6002546001600160a01b0316331461082e57600080fd5b61ffff84166000908152600460205260409020805461084c90614ca1565b9050835114801561088b575061ffff84166000908152600460205260409081902090516108799190614776565b60405180910390208380519060200120145b6108f95760405162461bcd60e51b815260206004820152603460248201527f4e6f6e626c6f636b696e6752656365697665723a20696e76616c696420736f756044820152731c98d9481cd95b991a5b99c818dbdb9d1c9858dd60621b60648201526084015b60405180910390fd5b604051630e1bd41160e11b81523090631c37a82290610922908790879087908790600401614af5565b600060405180830381600087803b15801561093c57600080fd5b505af192505050801561094d575060015b610a0b576040518060400160405280825181526020018280519060200120815250600360008661ffff1661ffff16815260200190815260200160002084604051610997919061475a565b9081526040805191829003602090810183206001600160401b038716600090815290825291909120835181559201516001909201919091557fe6f254030bcb01ffd20558175c13fcaed6d1520be7becee4c961b65f79243b0d90610a02908690869086908690614af5565b60405180910390a15b50505050565b60006001600160a01b038316610a7d5760405162461bcd60e51b815260206004820152602b60248201527f455243313135353a2062616c616e636520717565727920666f7220746865207a60448201526a65726f206164647265737360a81b60648201526084016108f0565b5060008181526005602090815260408083206001600160a01b03861684529091529020545b92915050565b60006001600160e01b03198216636cdb3d1360e11b1480610ad957506001600160e01b031982166303a24d0760e21b145b80610aa257506301ffc9a760e01b6001600160e01b0319831614610aa2565b6000546001600160a01b03163314610b225760405162461bcd60e51b81526004016108f0906149da565b47811115610b725760405162461bcd60e51b815260206004820152601860248201527f72656c656173653a20496e61766c696420616d6f756e742e000000000000000060448201526064016108f0565b610b7c82826124a1565b5050565b600d8054610b8d90614ca1565b80601f0160208091040260200160405190810160405280929190818152602001828054610bb990614ca1565b8015610c065780601f10610bdb57610100808354040283529160200191610c06565b820191906000526020600020905b815481529060010190602001808311610be957829003601f168201915b505050505081565b6060610c1982611557565b610c5e5760405162461bcd60e51b81526020600482015260166024820152752aa9249d103737b732bc34b9ba32b73a103a37b5b2b760511b60448201526064016108f0565b6000828152600f602052604090206003018054610c7a90614ca1565b80601f0160208091040260200160405190810160405280929190818152602001828054610ca690614ca1565b8015610cf35780601f10610cc857610100808354040283529160200191610cf3565b820191906000526020600020905b815481529060010190602001808311610cd657829003601f168201915b50505050509050919050565b333014610d625760405162461bcd60e51b815260206004820152602b60248201527f4e6f6e626c6f636b696e6752656365697665723a2063616c6c6572206d75737460448201526a10313290213934b233b29760a91b60648201526084016108f0565b610a0b848484846125ba565b3360009081526001602052604090205460ff16610d9d5760405162461bcd60e51b81526004016108f090614914565b610da682611557565b610e005760405162461bcd60e51b815260206004820152602560248201527f45646974546f6b656e5552493a20546f6b656e20494420646f6573206e6f7420604482015264195e1a5cdd60da1b60648201526084016108f0565b6000828152600f6020908152604090912082519091610a0b916003840191850190613bf2565b3360009081526001602052604090205460ff16610e555760405162461bcd60e51b81526004016108f090614914565b6000600f6000610e64600c5490565b81526020810191909152604001600020805460ff19811688151590811783559192508691839161ffff191661ff001990911617610100836002811115610eba57634e487b7160e01b600052602160045260246000fd5b02179055508351610ed49060018301906020870190613c76565b506002810180546001600160a01b0319166001600160a01b0385161790558151610f079060038301906020850190613bf2565b50610f16600c80546001019055565b505050505050565b6001600160a01b038516331480610f3a5750610f3a853361071a565b610fa15760405162461bcd60e51b815260206004820152603260248201527f455243313135353a207472616e736665722063616c6c6572206973206e6f74206044820152711bdddb995c881b9bdc88185c1c1c9bdd995960721b60648201526084016108f0565b610fae858585858561262e565b5050505050565b3360009081526001602052604090205460ff16610fe45760405162461bcd60e51b81526004016108f090614914565b60408051600080825260208201909252610b7c918491600085610e26565b61100b82611557565b6110575760405162461bcd60e51b815260206004820152601b60248201527f636c61696d3a20746f6b656e20646f6573206e6f74206578697374000000000060448201526064016108f0565b61106082611248565b6110a45760405162461bcd60e51b815260206004820152601560248201527418db185a5b4e881cd85b19481a5cc818db1bdcd959605a1b60448201526064016108f0565b6110ae8233611ff4565b156111095760405162461bcd60e51b815260206004820152602560248201527f636c61696d3a204e465420616c726561647920636c61696d6564206279206164604482015264647265737360d81b60648201526084016108f0565b6111138282612830565b61116a5760405162461bcd60e51b815260206004820152602260248201527f636c61696d3a2053657276657220566572696669636174696f6e204661696c65604482015261321760f11b60648201526084016108f0565b611174823361285e565b6111d25760405162461bcd60e51b815260206004820152602960248201527f636c61696d3a204164647265737320646f6573206e6f74206f776e20726571756044820152681a5cda5d194813919560ba1b60648201526084016108f0565b6000828152600f602090815260408083203380855260049091018352818420805460ff191660019081179091558251938401909252928252611217929185919061299c565b604051339083907f6aa3eac93d079e5e100b1029be716caa33586c96aa4baac390669fb5c2a2121290600090a35050565b600061125382611557565b6112aa5760405162461bcd60e51b815260206004820152602260248201527f697353616c65436c6f7365643a20746f6b656e20646f6573206e6f74206578696044820152611cdd60f21b60648201526084016108f0565b506000908152600f602052604090205460ff1690565b3360009081526001602052604090205460ff166112ef5760405162461bcd60e51b81526004016108f090614914565b6112f886611557565b61134f5760405162461bcd60e51b815260206004820152602260248201527f45646974546f6b656e3a20546f6b656e20494420646f6573206e6f74206578696044820152611cdd60f21b60648201526084016108f0565b6000868152600f60205260409020805486151560ff198216811783558691839161ff00191661ffff199091161761010083600281111561139f57634e487b7160e01b600052602160045260246000fd5b021790555083516113b99060018301906020870190613c76565b506002810180546001600160a01b0319166001600160a01b03851617905581516113ec9060038301906020850190613bf2565b5050505050505050565b6060815183511461145b5760405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e677468604482015268040dad2e6dac2e8c6d60bb1b60648201526084016108f0565b600083516001600160401b0381111561148457634e487b7160e01b600052604160045260246000fd5b6040519080825280602002602001820160405280156114ad578160200160208202803683370190505b50905060005b845181101561154f576115148582815181106114df57634e487b7160e01b600052603260045260246000fd5b602002602001015185838151811061150757634e487b7160e01b600052603260045260246000fd5b6020026020010151610a11565b82828151811061153457634e487b7160e01b600052603260045260246000fd5b602090810291909101015261154881614d02565b90506114b3565b509392505050565b600081611563600c5490565b1192915050565b6000546001600160a01b031633146115945760405162461bcd60e51b81526004016108f0906149da565b600b80546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b031633146115e05760405162461bcd60e51b81526004016108f0906149da565b6115ea6000612ac1565b565b60046020526000908152604090208054610b8d90614ca1565b6000546001600160a01b0316331461162f5760405162461bcd60e51b81526004016108f0906149da565b8051610b7c90600a906020840190613bf2565b6000546001600160a01b0316331461166c5760405162461bcd60e51b81526004016108f0906149da565b6040516370a0823160e01b81523060048201526001600160a01b038416906370a082319060240160206040518083038186803b1580156116ab57600080fd5b505afa1580156116bf573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116e391906144de565b8111156117455760405162461bcd60e51b815260206004820152602a60248201527f72656c656173653a20696e73756666696369656e7420746f6b656e732045524360448201526919181031b0b63632b21760b11b60648201526084016108f0565b611750838383612b11565b505050565b6000546001600160a01b0316331461177f5760405162461bcd60e51b81526004016108f0906149da565b600955565b600e8054610b8d90614ca1565b610b7c338383612b63565b6000546001600160a01b031633146117c65760405162461bcd60e51b81526004016108f0906149da565b6001600160a01b03811660009081526001602052604090205460ff161561184c5760405162461bcd60e51b815260206004820152603460248201527f616464417574686f72697a65644163636f756e743a204163636f756e742069736044820152731030b63932b0b23c9030baba3437b934bd32b21760611b60648201526084016108f0565b6001600160a01b03166000908152600160208190526040909120805460ff19169091179055565b60606000611880600c5490565b6001600160401b038111156118a557634e487b7160e01b600052604160045260246000fd5b6040519080825280602002602001820160405280156118ce578160200160208202803683370190505b50905060005b600c5481101561192a5760008181526008602052604090205482828151811061190d57634e487b7160e01b600052603260045260246000fd5b60209081029190910101528061192281614d02565b9150506118d4565b50919050565b3360009081526001602052604090205460ff1661195f5760405162461bcd60e51b81526004016108f090614914565b61196882611557565b6119b45760405162461bcd60e51b815260206004820152601d60248201527f61697264726f703a20746f6b656e20646f6573206e6f7420657869737400000060448201526064016108f0565b610b7c818360016040518060200160405280600081525061299c565b6000546001600160a01b031633146119fa5760405162461bcd60e51b81526004016108f0906149da565b6001600160a01b03811660009081526001602052604090205460ff16611a7e5760405162461bcd60e51b815260206004820152603360248201527f72656d6f7665417574686f72697a65644163636f756e743a204163636f756e746044820152721034b9903737ba1030baba3437b934bd32b21760691b60648201526084016108f0565b6001600160a01b03166000908152600160205260409020805460ff19169055565b6000611aab3383610a11565b11611b135760405162461bcd60e51b815260206004820152603260248201527f5472617665727365436861696e3a20596f75206d757374206f776e207468697360448201527120746f6b656e20746f20747261766572736560701b60648201526084016108f0565b61ffff821660009081526004602052604090208054611b3190614ca1565b15159050611ba75760405162461bcd60e51b815260206004820152603d60248201527f5472617665727365436861696e3a205468697320636861696e2069732063757260448201527f72656e746c7920756e617661696c61626c6520666f722074726176656c00000060648201526084016108f0565b468261ffff161415611c2b5760405162461bcd60e51b815260206004820152604160248201527f5472617665727365436861696e3a2044657374696e6174696f6e20626c6f636b60448201527f636861696e2063616e2774206265207468652073616d6520617320736f7572636064820152606560f81b608482015260a4016108f0565b611c3733826001612c44565b60408051336020820152808201839052815180820383018152606082018352600954600160f01b60808401526082808401919091528351808403909101815260a283019384905260025463040a7bb160e41b90945290926001926000916001600160a01b0316906340a7bb1090611cba908990309089908790899060a601614a0f565b604080518083038186803b158015611cd157600080fd5b505afa158015611ce5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d09919061460c565b5090507f5b6dd3cd292e9992e63f15316b4cff04aa4a1b86b888b7a53cbfa83a92916cce81604051611d3d91815260200190565b60405180910390a180341015611de15760405162461bcd60e51b815260206004820152605a60248201527f5472617665727365436861696e3a2076616c75652073656e74206973206e6f7460448201527f20656e6f75676820746f20636f766572206d6573736167654665652e20496e6360648201527f72656173652067617320666f72206d6573736167652066656573000000000000608482015260a4016108f0565b60025461ffff87166000908152600460208190526040808320905162c5803160e81b81526001600160a01b039094169363c5803100933493611e2d938d9390928c9233928c9101614b33565b6000604051808303818588803b158015611e4657600080fd5b505af1158015611e5a573d6000803e3d6000fd5b5050505050505050505050565b61ffff85166000908152600360205260408082209051611e8890879061475a565b90815260408051602092819003830190206001600160401b0387166000908152925290206001810154909150611f0f5760405162461bcd60e51b815260206004820152602660248201527f4e6f6e626c6f636b696e6752656365697665723a206e6f2073746f726564206d60448201526565737361676560d01b60648201526084016108f0565b805482148015611f39575080600101548383604051611f2f92919061474a565b6040518091039020145b611f855760405162461bcd60e51b815260206004820152601a60248201527f4c617965725a65726f3a20696e76616c6964207061796c6f616400000000000060448201526064016108f0565b60008082556001820155604051630e1bd41160e11b81523090631c37a82290611fba9089908990899089908990600401614a95565b600060405180830381600087803b158015611fd457600080fd5b505af1158015611fe8573d6000803e3d6000fd5b50505050505050505050565b6000611fff83611557565b6120575760405162461bcd60e51b8152602060048201526024808201527f636865636b4966436c61696d65643a20746f6b656e20646f6573206e6f7420656044820152631e1a5cdd60e21b60648201526084016108f0565b6000838152600f602090815260408083206001600160a01b038616845260040190915290205460ff161561208d57506001610aa2565b50600092915050565b6000806060600060606120a886611557565b6120fe5760405162461bcd60e51b815260206004820152602160248201527f676574546f6b656e3a20546f6b656e20494420646f6573206e6f7420657869736044820152601d60fa1b60648201526084016108f0565b6000868152600f60209081526040918290208054600282015460018301805486518187028101870190975280875260ff80851697610100909504169591946001600160a01b03909316936003909301929185919083018282801561218157602002820191906000526020600020905b81548152602001906001019080831161216d575b5050505050925080805461219490614ca1565b80601f01602080910402602001604051908101604052809291908181526020018280546121c090614ca1565b801561220d5780601f106121e25761010080835404028352916020019161220d565b820191906000526020600020905b8154815290600101906020018083116121f057829003601f168201915b505050505090509450945094509450945091939590929450565b6000546001600160a01b031633146122515760405162461bcd60e51b81526004016108f0906149da565b61ffff83166000908152600460205260409020610a0b908383613cb0565b6001600160a01b03851633148061228b575061228b853361071a565b6122e95760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2063616c6c6572206973206e6f74206f776e6572206e6f7260448201526808185c1c1c9bdd995960ba1b60648201526084016108f0565b610fae8585858585612dd8565b6000546001600160a01b031633146123205760405162461bcd60e51b81526004016108f0906149da565b6001600160a01b0381166000908152600160208190526040909120805460ff1916909117905561234f81612409565b50565b3360009081526001602052604090205460ff166123815760405162461bcd60e51b81526004016108f090614914565b61238a82611557565b6123e95760405162461bcd60e51b815260206004820152602a60248201527f736574546f6b656e436c61696d61626c653a20546f6b656e20494420646f6573604482015269081b9bdd08195e1a5cdd60b21b60648201526084016108f0565b6000918252600f6020526040909120805460ff1916911515919091179055565b6000546001600160a01b031633146124335760405162461bcd60e51b81526004016108f0906149da565b6001600160a01b0381166124985760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016108f0565b61234f81612ac1565b804710156124f15760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e636500000060448201526064016108f0565b6000826001600160a01b03168260405160006040518083038185875af1925050503d806000811461253e576040519150601f19603f3d011682016040523d82523d6000602084013e612543565b606091505b50509050806117505760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d6179206861766520726576657274656400000000000060648201526084016108f0565b600080828060200190518101906125d19190613ede565b915091507f8907acb071a04e4771f0aefe2cd026f2ceb820d8ceb32f566be3066b0e4f3ae78686838560405161260a9493929190614a57565b60405180910390a1610f16828260016040518060200160405280600081525061299c565b81518351146126905760405162461bcd60e51b815260206004820152602860248201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206044820152670dad2e6dac2e8c6d60c31b60648201526084016108f0565b6001600160a01b0384166126b65760405162461bcd60e51b81526004016108f09061494b565b336126c5818787878787612f14565b60005b84518110156127ca5760008582815181106126f357634e487b7160e01b600052603260045260246000fd5b60200260200101519050600085838151811061271f57634e487b7160e01b600052603260045260246000fd5b60209081029190910181015160008481526005835260408082206001600160a01b038e1683529093529190912054909150818110156127705760405162461bcd60e51b81526004016108f090614990565b60008381526005602090815260408083206001600160a01b038e8116855292528083208585039055908b168252812080548492906127af908490614c32565b92505081905550505050806127c390614d02565b90506126c8565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb878760405161281a92919061482d565b60405180910390a4610f168187878787876130c5565b60008061284561283f85613230565b84613351565b600b546001600160a01b03908116911614949350505050565b6000828152600f6020526040812054610100900460ff168181600281111561289657634e487b7160e01b600052602160045260246000fd5b14156128a6576001915050610aa2565b60018160028111156128c857634e487b7160e01b600052602160045260246000fd5b14156129445761293c83600f600087815260200190815260200160002060010180548060200260200160405190810160405280929190818152602001828054801561293257602002820191906000526020600020905b81548152602001906001019080831161291e575b5050505050613372565b915050610aa2565b600281600281111561296657634e487b7160e01b600052602160045260246000fd5b1415612992576000848152600f602052604090206002015461293c9084906001600160a01b03166133cb565b5060009392505050565b6001600160a01b0384166129fc5760405162461bcd60e51b815260206004820152602160248201527f455243313135353a206d696e7420746f20746865207a65726f206164647265736044820152607360f81b60648201526084016108f0565b336000612a0885613455565b90506000612a1585613455565b9050612a2683600089858589612f14565b60008681526005602090815260408083206001600160a01b038b16845290915281208054879290612a58908490614c32565b909155505060408051878152602081018790526001600160a01b03808a1692600092918716917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4612ab8836000898989896134ae565b50505050505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052611750908490613578565b816001600160a01b0316836001600160a01b03161415612bd75760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c20737461747573604482015268103337b91039b2b63360b91b60648201526084016108f0565b6001600160a01b03838116600081815260066020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6001600160a01b038316612ca65760405162461bcd60e51b815260206004820152602360248201527f455243313135353a206275726e2066726f6d20746865207a65726f206164647260448201526265737360e81b60648201526084016108f0565b336000612cb284613455565b90506000612cbf84613455565b9050612cdf83876000858560405180602001604052806000815250612f14565b60008581526005602090815260408083206001600160a01b038a16845290915290205484811015612d5e5760405162461bcd60e51b8152602060048201526024808201527f455243313135353a206275726e20616d6f756e7420657863656564732062616c604482015263616e636560e01b60648201526084016108f0565b60008681526005602090815260408083206001600160a01b038b81168086529184528285208a8703905582518b81529384018a90529092908816917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4604080516020810190915260009052612ab8565b6001600160a01b038416612dfe5760405162461bcd60e51b81526004016108f09061494b565b336000612e0a85613455565b90506000612e1785613455565b9050612e27838989858589612f14565b60008681526005602090815260408083206001600160a01b038c16845290915290205485811015612e6a5760405162461bcd60e51b81526004016108f090614990565b60008781526005602090815260408083206001600160a01b038d8116855292528083208985039055908a16825281208054889290612ea9908490614c32565b909155505060408051888152602081018890526001600160a01b03808b16928c821692918816917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4612f09848a8a8a8a8a6134ae565b505050505050505050565b6001600160a01b038516612fb75760005b8351811015612fb557828181518110612f4e57634e487b7160e01b600052603260045260246000fd5b602002602001015160086000868481518110612f7a57634e487b7160e01b600052603260045260246000fd5b602002602001015181526020019081526020016000206000828254612f9f9190614c32565b90915550612fae905081614d02565b9050612f25565b505b6001600160a01b038416610f165760005b8351811015612ab8576000848281518110612ff357634e487b7160e01b600052603260045260246000fd5b60200260200101519050600084838151811061301f57634e487b7160e01b600052603260045260246000fd5b60200260200101519050600060086000848152602001908152602001600020549050818110156130a25760405162461bcd60e51b815260206004820152602860248201527f455243313135353a206275726e20616d6f756e74206578636565647320746f74604482015267616c537570706c7960c01b60648201526084016108f0565b600092835260086020526040909220910390556130be81614d02565b9050612fc8565b6001600160a01b0384163b15610f165760405163bc197c8160e01b81526001600160a01b0385169063bc197c81906131099089908990889088908890600401614782565b602060405180830381600087803b15801561312357600080fd5b505af1925050508015613153575060408051601f3d908101601f1916820190925261315091810190614256565b60015b6132005761315f614d73565b806308c379a014156131995750613174614d8b565b8061317f575061319b565b8060405162461bcd60e51b81526004016108f091906148b9565b505b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e20455243313135356044820152732932b1b2b4bb32b91034b6b83632b6b2b73a32b960611b60648201526084016108f0565b6001600160e01b0319811663bc197c8160e01b14612ab85760405162461bcd60e51b81526004016108f0906148cc565b6060816132545750506040805180820190915260018152600360fc1b602082015290565b8160005b811561327e578061326881614d02565b91506132779050600a83614c4a565b9150613258565b6000816001600160401b038111156132a657634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f1916602001820160405280156132d0576020820181803683370190505b5090505b8415613349576132e5600183614c5e565b91506132f2600a86614d1d565b6132fd906030614c32565b60f81b81838151811061332057634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350613342600a86614c4a565b94506132d4565b949350505050565b60008061335d8461364a565b90506133498361336c83613681565b906136bc565b6000805b82518110156133c1576133a38484838151811061150757634e487b7160e01b600052603260045260246000fd5b6133b1576000915050610aa2565b6133ba81614d02565b9050613376565b5060019392505050565b6040516370a0823160e01b81526001600160a01b03838116600483015260009183918391908316906370a082319060240160206040518083038186803b15801561341457600080fd5b505afa158015613428573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061344c91906144de565b11949350505050565b6040805160018082528183019092526060916000919060208083019080368337019050509050828160008151811061349d57634e487b7160e01b600052603260045260246000fd5b602090810291909101015292915050565b6001600160a01b0384163b15610f165760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e61906134f290899089908890889088906004016147e0565b602060405180830381600087803b15801561350c57600080fd5b505af192505050801561353c575060408051601f3d908101601f1916820190925261353991810190614256565b60015b6135485761315f614d73565b6001600160e01b0319811663f23a6e6160e01b14612ab85760405162461bcd60e51b81526004016108f0906148cc565b60006135cd826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166136d89092919063ffffffff16565b80519091501561175057808060200190518101906135eb919061415d565b6117505760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016108f0565b6000303383600a6040516020016136649493929190614704565b604051602081830303815290604052805190602001209050919050565b6040517f19457468657265756d205369676e6564204d6573736167653a0a3332000000006020820152603c8101829052600090605c01613664565b60008060006136cb85856136f1565b9150915061154f81613761565b60606136e78484600085613962565b90505b9392505050565b6000808251604114156137285760208301516040840151606085015160001a61371c87828585613a93565b9450945050505061375a565b8251604014156137525760208301516040840151613747868383613b80565b93509350505061375a565b506000905060025b9250929050565b600081600481111561378357634e487b7160e01b600052602160045260246000fd5b141561378c5750565b60018160048111156137ae57634e487b7160e01b600052602160045260246000fd5b14156137fc5760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e6174757265000000000000000060448201526064016108f0565b600281600481111561381e57634e487b7160e01b600052602160045260246000fd5b141561386c5760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e6774680060448201526064016108f0565b600381600481111561388e57634e487b7160e01b600052602160045260246000fd5b14156138e75760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b60648201526084016108f0565b600481600481111561390957634e487b7160e01b600052602160045260246000fd5b141561234f5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b60648201526084016108f0565b6060824710156139c35760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b60648201526084016108f0565b6001600160a01b0385163b613a1a5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016108f0565b600080866001600160a01b03168587604051613a36919061475a565b60006040518083038185875af1925050503d8060008114613a73576040519150601f19603f3d011682016040523d82523d6000602084013e613a78565b606091505b5091509150613a88828286613bb9565b979650505050505050565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0831115613aca5750600090506003613b77565b8460ff16601b14158015613ae257508460ff16601c14155b15613af35750600090506004613b77565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015613b47573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116613b7057600060019250925050613b77565b9150600090505b94509492505050565b6000806001600160ff1b03831681613b9d60ff86901c601b614c32565b9050613bab87828885613a93565b935093505050935093915050565b60608315613bc85750816136ea565b825115613bd85782518084602001fd5b8160405162461bcd60e51b81526004016108f091906148b9565b828054613bfe90614ca1565b90600052602060002090601f016020900481019282613c205760008555613c66565b82601f10613c3957805160ff1916838001178555613c66565b82800160010185558215613c66579182015b82811115613c66578251825591602001919060010190613c4b565b50613c72929150613d24565b5090565b828054828255906000526020600020908101928215613c665791602002820182811115613c66578251825591602001919060010190613c4b565b828054613cbc90614ca1565b90600052602060002090601f016020900481019282613cde5760008555613c66565b82601f10613cf75782800160ff19823516178555613c66565b82800160010185558215613c66579182015b82811115613c66578235825591602001919060010190613d09565b5b80821115613c725760008155600101613d25565b600082601f830112613d49578081fd5b81356020613d5682614c0f565b604051613d638282614cd6565b8381528281019150858301600585901b87018401881015613d82578586fd5b855b85811015613da057813584529284019290840190600101613d84565b5090979650505050505050565b60008083601f840112613dbe578182fd5b5081356001600160401b03811115613dd4578182fd5b60208301915083602082850101111561375a57600080fd5b600082601f830112613dfc578081fd5b81356001600160401b03811115613e1557613e15614d5d565b604051613e2c601f8301601f191660200182614cd6565b818152846020838601011115613e40578283fd5b816020850160208301379081016020019190915292915050565b803560038110613e6957600080fd5b919050565b803561ffff81168114613e6957600080fd5b80356001600160401b0381168114613e6957600080fd5b600060208284031215613ea8578081fd5b81356136ea81614e14565b60008060408385031215613ec5578081fd5b8235613ed081614e14565b946020939093013593505050565b60008060408385031215613ef0578182fd5b8251613efb81614e14565b6020939093015192949293505050565b60008060408385031215613f1d578182fd5b8235613f2881614e14565b91506020830135613f3881614e14565b809150509250929050565b600080600080600060a08688031215613f5a578081fd5b8535613f6581614e14565b94506020860135613f7581614e14565b935060408601356001600160401b0380821115613f90578283fd5b613f9c89838a01613d39565b94506060880135915080821115613fb1578283fd5b613fbd89838a01613d39565b93506080880135915080821115613fd2578283fd5b50613fdf88828901613dec565b9150509295509295909350565b600080600080600060a08688031215614003578283fd5b853561400e81614e14565b9450602086013561401e81614e14565b9350604086013592506060860135915060808601356001600160401b03811115614046578182fd5b613fdf88828901613dec565b60008060408385031215614064578182fd5b823561406f81614e14565b91506020830135613f3881614e29565b60008060408385031215613ec5578182fd5b600080604083850312156140a3578182fd5b82356001600160401b03808211156140b9578384fd5b818501915085601f8301126140cc578384fd5b813560206140d982614c0f565b6040516140e68282614cd6565b8381528281019150858301600585901b870184018b1015614105578889fd5b8896505b8487101561413057803561411c81614e14565b835260019690960195918301918301614109565b5096505086013592505080821115614146578283fd5b5061415385828601613d39565b9150509250929050565b60006020828403121561416e578081fd5b81516136ea81614e29565b600080600080600060a08688031215614190578283fd5b853561419b81614e29565b94506141a960208701613e5a565b935060408601356001600160401b03808211156141c4578485fd5b6141d089838a01613d39565b9450606088013591506141e282614e14565b90925060808701359080821115613fd2578283fd5b60008060408385031215614209578182fd5b823561421481614e29565b915060208301356001600160401b0381111561422e578182fd5b61415385828601613dec565b60006020828403121561424b578081fd5b81356136ea81614e37565b600060208284031215614267578081fd5b81516136ea81614e37565b600080600060608486031215614286578081fd5b833561429181614e14565b925060208401356142a181614e14565b929592945050506040919091013590565b6000602082840312156142c3578081fd5b81356001600160401b038111156142d8578182fd5b61334984828501613dec565b6000602082840312156142f5578081fd5b6136ea82613e6e565b600080600060408486031215614312578081fd5b61431b84613e6e565b925060208401356001600160401b03811115614335578182fd5b61434186828701613dad565b9497909650939450505050565b600080600060608486031215614362578081fd5b61436b84613e6e565b925060208401356001600160401b03811115614385578182fd5b61439186828701613dec565b925050604084013590509250925092565b6000806000806000608086880312156143b9578283fd5b6143c286613e6e565b945060208601356001600160401b03808211156143dd578485fd5b6143e989838a01613dec565b95506143f760408901613e80565b9450606088013591508082111561440c578283fd5b5061441988828901613dad565b969995985093965092949392505050565b6000806000806080858703121561443f578182fd5b61444885613e6e565b935060208501356001600160401b0380821115614463578384fd5b61446f88838901613dec565b945061447d60408801613e80565b93506060870135915080821115614492578283fd5b5061449f87828801613dec565b91505092959194509250565b600080604083850312156144bd578182fd5b613ed083613e6e565b6000602082840312156144d7578081fd5b5035919050565b6000602082840312156144ef578081fd5b5051919050565b60008060408385031215614508578182fd5b823591506020830135613f3881614e14565b6000806040838503121561452c578182fd5b823591506020830135613f3881614e29565b60008060008060008060c08789031215614556578384fd5b86359550602087013561456881614e29565b945061457660408801613e5a565b935060608701356001600160401b0380821115614591578283fd5b61459d8a838b01613d39565b9450608089013591506145af82614e14565b90925060a088013590808211156145c4578283fd5b506145d189828a01613dec565b9150509295509295509295565b600080604083850312156145f0578182fd5b8235915060208301356001600160401b0381111561422e578182fd5b6000806040838503121561461e578182fd5b505080516020909101519092909150565b6000815180845260208085019450808401835b8381101561465e57815187529582019590820190600101614642565b509495945050505050565b60008151808452614681816020860160208601614c75565b601f01601f19169290920160200192915050565b600081546146a281614ca1565b600182811680156146ba57600181146146cb576146fa565b60ff198416875282870194506146fa565b8560005260208060002060005b858110156146f15781548a8201529084019082016146d8565b50505082870194505b5050505092915050565b60006bffffffffffffffffffffffff19808760601b168352808660601b16601484015250835161473b816028850160208801614c75565b613a8860288285010185614695565b8183823760009101908152919050565b6000825161476c818460208701614c75565b9190910192915050565b60006136ea8284614695565b6001600160a01b0386811682528516602082015260a0604082018190526000906147ae9083018661462f565b82810360608401526147c0818661462f565b905082810360808401526147d48185614669565b98975050505050505050565b6001600160a01b03868116825285166020820152604081018490526060810183905260a060808201819052600090613a8890830184614669565b6020815260006136ea602083018461462f565b604081526000614840604083018561462f565b8281036020840152614852818561462f565b95945050505050565b851515815260006003861061487e57634e487b7160e01b81526021600452602481fd5b85602083015260a0604083015261489860a083018661462f565b6001600160a01b038516606084015282810360808401526147d48185614669565b6020815260006136ea6020830184614669565b60208082526028908201527f455243313135353a204552433131353552656365697665722072656a656374656040820152676420746f6b656e7360c01b606082015260800190565b6020808252601f908201527f6f6e6c79417574686f72697a65643a20496e76616c6964206164647265737300604082015260600190565b60208082526025908201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604082015264647265737360d81b606082015260800190565b6020808252602a908201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60408201526939103a3930b739b332b960b11b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b61ffff861681526001600160a01b038516602082015260a060408201819052600090614a3d90830186614669565b841515606084015282810360808401526147d48185614669565b61ffff85168152608060208201526000614a746080830186614669565b6040830194909452506001600160a01b039190911660609091015292915050565b61ffff86168152608060208201526000614ab26080830187614669565b6001600160401b038616604084015282810360608401528381528385602083013781602085830101526020601f19601f8601168201019150509695505050505050565b61ffff85168152608060208201526000614b126080830186614669565b6001600160401b03851660408401528281036060840152613a888185614669565b61ffff871681526000602060c081840152818854614b5081614ca1565b8060c087015260e0600180841660008114614b725760018114614b8757614bb2565b60ff1985168984015261010089019550614bb2565b8d8852868820885b85811015614baa5781548b8201860152908301908801614b8f565b8a0184019650505b50505050508381036040850152614bc98189614669565b915050614be160608401876001600160a01b03169052565b6001600160a01b038516608084015282810360a0840152614c028185614669565b9998505050505050505050565b60006001600160401b03821115614c2857614c28614d5d565b5060051b60200190565b60008219821115614c4557614c45614d31565b500190565b600082614c5957614c59614d47565b500490565b600082821015614c7057614c70614d31565b500390565b60005b83811015614c90578181015183820152602001614c78565b83811115610a0b5750506000910152565b600181811c90821680614cb557607f821691505b6020821081141561192a57634e487b7160e01b600052602260045260246000fd5b601f8201601f191681016001600160401b0381118282101715614cfb57614cfb614d5d565b6040525050565b6000600019821415614d1657614d16614d31565b5060010190565b600082614d2c57614d2c614d47565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b600060033d1115614d8857600481823e5160e01c5b90565b600060443d1015614d995790565b6040516003193d81016004833e81513d6001600160401b038160248401118184111715614dc857505050505090565b8285019150815181811115614de05750505050505090565b843d8701016020828501011115614dfa5750505050505090565b614e0960208286010187614cd6565b509095945050505050565b6001600160a01b038116811461234f57600080fd5b801515811461234f57600080fd5b6001600160e01b03198116811461234f57600080fdfea2646970667358221220fcd10aa48722ce51e587f85643e74fa4ba765513bfed56e168c9204de091ab6d64736f6c63430008040033

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

00000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000247fefef45134228093ac6ce41ee615d327b957e000000000000000000000000000000000000000000000000000000000000012000000000000000000000000066a71dcef29a0ffbdbe3c6a460a3b5bc225cd6750000000000000000000000000000000000000000000000000000000000000017496e66696e6974794b657973416368696576656d656e740000000000000000000000000000000000000000000000000000000000000000000000000000000003494b41000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000056d61676963000000000000000000000000000000000000000000000000000000

-----Decoded View---------------
Arg [0] : _name (string): InfinityKeysAchievement
Arg [1] : _symbol (string): IKA
Arg [2] : _signer (address): 0x247fEfEF45134228093Ac6ce41Ee615D327b957E
Arg [3] : _secret (string): magic
Arg [4] : _endpoint (address): 0x66A71Dcef29A0fFBDBE3c6a460a3B5BC225Cd675

-----Encoded View---------------
11 Constructor Arguments found :
Arg [0] : 00000000000000000000000000000000000000000000000000000000000000a0
Arg [1] : 00000000000000000000000000000000000000000000000000000000000000e0
Arg [2] : 000000000000000000000000247fefef45134228093ac6ce41ee615d327b957e
Arg [3] : 0000000000000000000000000000000000000000000000000000000000000120
Arg [4] : 00000000000000000000000066a71dcef29a0ffbdbe3c6a460a3b5bc225cd675
Arg [5] : 0000000000000000000000000000000000000000000000000000000000000017
Arg [6] : 496e66696e6974794b657973416368696576656d656e74000000000000000000
Arg [7] : 0000000000000000000000000000000000000000000000000000000000000003
Arg [8] : 494b410000000000000000000000000000000000000000000000000000000000
Arg [9] : 0000000000000000000000000000000000000000000000000000000000000005
Arg [10] : 6d61676963000000000000000000000000000000000000000000000000000000


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.