ERC-721
Overview
Max Total Supply
252 GREG
Holders
216
Market
Volume (24H)
N/A
Min Price (24H)
N/A
Max Price (24H)
N/A
Other Info
Token Contract
Balance
1 GREGLoading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
AdvancedONFT721
Compiler Version
v0.8.4+commit.c7e474f2
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8; import "../ONFT721Enumerable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; /// @title Interface of the AdvancedONFT standard /// @author exakoss /// @notice this implementation supports: batch mint, payable public and private mint, reveal of metadata and EIP-2981 on-chain royalties contract AdvancedONFT721 is ONFT721Enumerable, ReentrancyGuard { using Strings for uint; uint public price = 0; uint public nextMintId; uint public maxMintId; uint public maxTokensPerMint; // royalty fee in basis points (i.e. 100% = 10000, 1% = 100) uint royaltyBasisPoints = 500; // address for withdrawing money and receiving royalties, separate from owner address payable beneficiary; // Merkle Root for WL implementation bytes32 public merkleRoot; string public contractURI; string private baseURI; string private hiddenMetadataURI; mapping(address => uint) public _boughtCount; bool public _publicSaleStarted; bool public _saleStarted; bool revealed; /// @notice Constructor for the AdvancedONFT /// @param _name the name of the token /// @param _symbol the token symbol /// @param _layerZeroEndpoint handles message transmission across chains /// @param _startMintId the starting mint number on this chain, excluded /// @param _endMintId the max number of mints on this chain /// @param _maxTokensPerMint the max number of tokens that could be minted in a single transaction /// @param _baseTokenURI the base URI for computing the tokenURI /// @param _hiddenURI the URI for computing the hiddenMetadataUri constructor(string memory _name, string memory _symbol, address _layerZeroEndpoint, uint _startMintId, uint _endMintId, uint _maxTokensPerMint, string memory _baseTokenURI, string memory _hiddenURI) ONFT721Enumerable(_name, _symbol, _layerZeroEndpoint) { nextMintId = _startMintId; maxMintId = _endMintId; maxTokensPerMint = _maxTokensPerMint; //set default beneficiary to owner beneficiary = payable(msg.sender); baseURI = _baseTokenURI; hiddenMetadataURI = _hiddenURI; } /// @notice Mint your ONFTs function publicMint(uint _nbTokens) external payable { require(_publicSaleStarted == true, "AdvancedONFT721: Public sale has not started yet!"); require(_saleStarted == true, "AdvancedONFT721: Sale has not started yet!"); require(_nbTokens != 0, "AdvancedONFT721: Cannot mint 0 tokens!"); require(_nbTokens <= maxTokensPerMint, "AdvancedONFT721: You cannot mint more than maxTokensPerMint tokens at once!"); require(nextMintId + _nbTokens <= maxMintId, "AdvancedONFT721: max mint limit reached"); require(_nbTokens * price <= msg.value, "AdvancedONFT721: Inconsistent amount sent!"); //using a local variable, _mint and ++X pattern to save gas uint local_nextMintId = nextMintId; for (uint i; i < _nbTokens; i++) { _mint(msg.sender, ++local_nextMintId); } nextMintId = local_nextMintId; } /// @notice Mint your ONFTs, whitelisted addresses only function mint(uint _nbTokens, bytes32[] calldata _merkleProof) external payable { require(_saleStarted == true, "AdvancedONFT721: Sale has not started yet!"); require(_nbTokens != 0, "AdvancedONFT721: Cannot mint 0 tokens!"); require(_nbTokens <= maxTokensPerMint, "AdvancedONFT721: You cannot mint more than maxTokensPerMint tokens at once!"); require(nextMintId + _nbTokens <= maxMintId, "AdvancedONFT721: max mint limit reached"); require(_nbTokens * price <= msg.value, "AdvancedONFT721: Inconsistent amount sent!"); require(_boughtCount[msg.sender] + _nbTokens <= maxTokensPerMint, "AdvancedONFT721: You exceeded your token limit."); bool isWL = MerkleProof.verify(_merkleProof, merkleRoot, keccak256(abi.encodePacked(_msgSender()))); require(isWL == true, "AdvancedONFT721: Invalid Merkle Proof"); _boughtCount[msg.sender] += _nbTokens; //using a local variable, _mint and ++X pattern to save gas uint local_nextMintId = nextMintId; for (uint i; i < _nbTokens; i++) { _mint(msg.sender, ++local_nextMintId); } nextMintId = local_nextMintId; } function setMerkleRoot(bytes32 _merkleRoot) external onlyOwner { merkleRoot = _merkleRoot; } function setPrice(uint newPrice) external onlyOwner { price = newPrice; } function withdraw() public virtual onlyOwner { require(beneficiary != address(0), "AdvancedONFT721: Beneficiary not set!"); uint _balance = address(this).balance; require(payable(beneficiary).send(_balance)); } function royaltyInfo(uint, uint salePrice) external view returns (address receiver, uint royaltyAmount) { receiver = beneficiary; royaltyAmount = (salePrice * royaltyBasisPoints) / 10000; } function setContractURI(string memory _contractURI) public onlyOwner { contractURI = _contractURI; } function setBaseURI(string memory uri) public onlyOwner { baseURI = uri; } function setRoyaltyFee(uint _royaltyBasisPoints) external onlyOwner { royaltyBasisPoints = _royaltyBasisPoints; } function setBeneficiary(address payable _beneficiary) external onlyOwner { beneficiary = _beneficiary; } function setHiddenMetadataUri(string memory _hiddenMetadataUri) external onlyOwner { hiddenMetadataURI = _hiddenMetadataUri; } function flipRevealed() external onlyOwner { revealed = !revealed; } function flipSaleStarted() external onlyOwner { _saleStarted = !_saleStarted; } function flipPublicSaleStarted() external onlyOwner { _publicSaleStarted = !_publicSaleStarted; } // The following functions are overrides required by Solidity. function _baseURI() internal view override returns (string memory) { return baseURI; } function tokenURI(uint tokenId) public view override(ERC721) returns (string memory) { require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token"); if (!revealed) { return hiddenMetadataURI; } return string(abi.encodePacked(_baseURI(), tokenId.toString())); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./IONFT721Enumerable.sol"; import "./ONFT721Core.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; // NOTE: this ONFT contract has no public minting logic. // must implement your own minting logic in child classes contract ONFT721Enumerable is ONFT721Core, ERC721Enumerable, IONFT721Enumerable { constructor(string memory _name, string memory _symbol, address _lzEndpoint) ERC721(_name, _symbol) ONFT721Core(_lzEndpoint) {} function supportsInterface(bytes4 interfaceId) public view virtual override(ONFT721Core, ERC721Enumerable, IERC165) returns (bool) { return interfaceId == type(IONFT721Enumerable).interfaceId || super.supportsInterface(interfaceId); } function _debitFrom(address _from, uint16, bytes memory, uint _tokenId) internal virtual override { require(_isApprovedOrOwner(_msgSender(), _tokenId), "ONFT721Enumerable: send caller is not owner nor approved"); require(ERC721.ownerOf(_tokenId) == _from, "ONFT721Enumerable: send from incorrect owner"); _burn(_tokenId); } function _creditTo(uint16, address _toAddress, uint _tokenId) internal virtual override { _safeMint(_toAddress, _tokenId); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol) pragma solidity ^0.8.0; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuard { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; constructor() { _status = _NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and making it call a * `private` function that does the actual work. */ modifier nonReentrant() { // On the first call to nonReentrant, _notEntered will be true require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; _; // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (utils/cryptography/MerkleProof.sol) pragma solidity ^0.8.0; /** * @dev These functions deal with verification of Merkle Trees proofs. * * The proofs can be generated using the JavaScript library * https://github.com/miguelmota/merkletreejs[merkletreejs]. * Note: the hashing algorithm should be keccak256 and pair sorting should be enabled. * * See `test/utils/cryptography/MerkleProof.test.js` for some examples. */ library MerkleProof { /** * @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree * defined by `root`. For this, a `proof` must be provided, containing * sibling hashes on the branch from the leaf to the root of the tree. Each * pair of leaves and each pair of pre-images are assumed to be sorted. */ function verify( bytes32[] memory proof, bytes32 root, bytes32 leaf ) internal pure returns (bool) { return processProof(proof, leaf) == root; } /** * @dev Returns the rebuilt hash obtained by traversing a Merklee tree up * from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt * hash matches the root of the tree. When processing the proof, the pairs * of leafs & pre-images are assumed to be sorted. * * _Available since v4.4._ */ function processProof(bytes32[] memory proof, bytes32 leaf) internal pure returns (bytes32) { bytes32 computedHash = leaf; for (uint256 i = 0; i < proof.length; i++) { bytes32 proofElement = proof[i]; if (computedHash <= proofElement) { // Hash(current computed hash + current element of the proof) computedHash = _efficientHash(computedHash, proofElement); } else { // Hash(current element of the proof + current computed hash) computedHash = _efficientHash(proofElement, computedHash); } } return computedHash; } function _efficientHash(bytes32 a, bytes32 b) private pure returns (bytes32 value) { assembly { mstore(0x00, a) mstore(0x20, b) value := keccak256(0x00, 0x40) } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./IONFT721Core.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/IERC721Enumerable.sol"; /** * @dev Interface of the ONFTEnumerable standard */ interface IONFT721Enumerable is IONFT721Core, IERC721Enumerable { }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./IONFT721Core.sol"; import "../../lzApp/NonblockingLzApp.sol"; import "@openzeppelin/contracts/utils/introspection/ERC165.sol"; abstract contract ONFT721Core is NonblockingLzApp, ERC165, IONFT721Core { constructor(address _lzEndpoint) NonblockingLzApp(_lzEndpoint) {} function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { return interfaceId == type(IONFT721Core).interfaceId || super.supportsInterface(interfaceId); } function estimateSendFee(uint16 _dstChainId, bytes memory _toAddress, uint _tokenId, bool _useZro, bytes memory _adapterParams) public view virtual override returns (uint nativeFee, uint zroFee) { // mock the payload for send() bytes memory payload = abi.encode(_toAddress, _tokenId); return lzEndpoint.estimateFees(_dstChainId, address(this), payload, _useZro, _adapterParams); } function sendFrom(address _from, uint16 _dstChainId, bytes memory _toAddress, uint _tokenId, address payable _refundAddress, address _zroPaymentAddress, bytes memory _adapterParams) public payable virtual override { _send(_from, _dstChainId, _toAddress, _tokenId, _refundAddress, _zroPaymentAddress, _adapterParams); } function _send(address _from, uint16 _dstChainId, bytes memory _toAddress, uint _tokenId, address payable _refundAddress, address _zroPaymentAddress, bytes memory _adapterParams) internal virtual { _debitFrom(_from, _dstChainId, _toAddress, _tokenId); bytes memory payload = abi.encode(_toAddress, _tokenId); _lzSend(_dstChainId, payload, _refundAddress, _zroPaymentAddress, _adapterParams); uint64 nonce = lzEndpoint.getOutboundNonce(_dstChainId, address(this)); emit SendToChain(_from, _dstChainId, _toAddress, _tokenId, nonce); } function _nonblockingLzReceive(uint16 _srcChainId, bytes memory _srcAddress, uint64 _nonce, bytes memory _payload) internal virtual override { // decode and load the toAddress (bytes memory toAddressBytes, uint tokenId) = abi.decode(_payload, (bytes, uint)); address toAddress; assembly { toAddress := mload(add(toAddressBytes, 20)) } _creditTo(_srcChainId, toAddress, tokenId); emit ReceiveFromChain(_srcChainId, _srcAddress, toAddress, tokenId, _nonce); } function _debitFrom(address _from, uint16 _dstChainId, bytes memory _toAddress, uint _tokenId) internal virtual; function _creditTo(uint16 _srcChainId, address _toAddress, uint _tokenId) internal virtual; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/ERC721Enumerable.sol) pragma solidity ^0.8.0; import "../ERC721.sol"; import "./IERC721Enumerable.sol"; /** * @dev This implements an optional extension of {ERC721} defined in the EIP that adds * enumerability of all the token ids in the contract as well as all token ids owned by each * account. */ abstract contract ERC721Enumerable is ERC721, IERC721Enumerable { // Mapping from owner to list of owned token IDs mapping(address => mapping(uint256 => uint256)) private _ownedTokens; // Mapping from token ID to index of the owner tokens list mapping(uint256 => uint256) private _ownedTokensIndex; // Array with all token ids, used for enumeration uint256[] private _allTokens; // Mapping from token id to position in the allTokens array mapping(uint256 => uint256) private _allTokensIndex; /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC721) returns (bool) { return interfaceId == type(IERC721Enumerable).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}. */ function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256) { require(index < ERC721.balanceOf(owner), "ERC721Enumerable: owner index out of bounds"); return _ownedTokens[owner][index]; } /** * @dev See {IERC721Enumerable-totalSupply}. */ function totalSupply() public view virtual override returns (uint256) { return _allTokens.length; } /** * @dev See {IERC721Enumerable-tokenByIndex}. */ function tokenByIndex(uint256 index) public view virtual override returns (uint256) { require(index < ERC721Enumerable.totalSupply(), "ERC721Enumerable: global index out of bounds"); return _allTokens[index]; } /** * @dev Hook that is called before any token transfer. This includes minting * and burning. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, ``from``'s `tokenId` will be burned. * - `from` cannot be the zero address. * - `to` cannot be the zero address. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual override { super._beforeTokenTransfer(from, to, tokenId); if (from == address(0)) { _addTokenToAllTokensEnumeration(tokenId); } else if (from != to) { _removeTokenFromOwnerEnumeration(from, tokenId); } if (to == address(0)) { _removeTokenFromAllTokensEnumeration(tokenId); } else if (to != from) { _addTokenToOwnerEnumeration(to, tokenId); } } /** * @dev Private function to add a token to this extension's ownership-tracking data structures. * @param to address representing the new owner of the given token ID * @param tokenId uint256 ID of the token to be added to the tokens list of the given address */ function _addTokenToOwnerEnumeration(address to, uint256 tokenId) private { uint256 length = ERC721.balanceOf(to); _ownedTokens[to][length] = tokenId; _ownedTokensIndex[tokenId] = length; } /** * @dev Private function to add a token to this extension's token tracking data structures. * @param tokenId uint256 ID of the token to be added to the tokens list */ function _addTokenToAllTokensEnumeration(uint256 tokenId) private { _allTokensIndex[tokenId] = _allTokens.length; _allTokens.push(tokenId); } /** * @dev Private function to remove a token from this extension's ownership-tracking data structures. Note that * while the token is not assigned a new owner, the `_ownedTokensIndex` mapping is _not_ updated: this allows for * gas optimizations e.g. when performing a transfer operation (avoiding double writes). * This has O(1) time complexity, but alters the order of the _ownedTokens array. * @param from address representing the previous owner of the given token ID * @param tokenId uint256 ID of the token to be removed from the tokens list of the given address */ function _removeTokenFromOwnerEnumeration(address from, uint256 tokenId) private { // To prevent a gap in from's tokens array, we store the last token in the index of the token to delete, and // then delete the last slot (swap and pop). uint256 lastTokenIndex = ERC721.balanceOf(from) - 1; uint256 tokenIndex = _ownedTokensIndex[tokenId]; // When the token to delete is the last token, the swap operation is unnecessary if (tokenIndex != lastTokenIndex) { uint256 lastTokenId = _ownedTokens[from][lastTokenIndex]; _ownedTokens[from][tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token _ownedTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index } // This also deletes the contents at the last position of the array delete _ownedTokensIndex[tokenId]; delete _ownedTokens[from][lastTokenIndex]; } /** * @dev Private function to remove a token from this extension's token tracking data structures. * This has O(1) time complexity, but alters the order of the _allTokens array. * @param tokenId uint256 ID of the token to be removed from the tokens list */ function _removeTokenFromAllTokensEnumeration(uint256 tokenId) private { // To prevent a gap in the tokens array, we store the last token in the index of the token to delete, and // then delete the last slot (swap and pop). uint256 lastTokenIndex = _allTokens.length - 1; uint256 tokenIndex = _allTokensIndex[tokenId]; // When the token to delete is the last token, the swap operation is unnecessary. However, since this occurs so // rarely (when the last minted token is burnt) that we still do the swap here to avoid the gas cost of adding // an 'if' statement (like in _removeTokenFromOwnerEnumeration) uint256 lastTokenId = _allTokens[lastTokenIndex]; _allTokens[tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token _allTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index // This also deletes the contents at the last position of the array delete _allTokensIndex[tokenId]; _allTokens.pop(); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/utils/introspection/IERC165.sol"; /** * @dev Interface of the ONFT Core standard */ interface IONFT721Core is IERC165 { /** * @dev estimate send token `_tokenId` to (`_dstChainId`, `_toAddress`) * _dstChainId - L0 defined chain id to send tokens too * _toAddress - dynamic bytes array which contains the address to whom you are sending tokens to on the dstChain * _tokenId - token Id to transfer * _useZro - indicates to use zro to pay L0 fees * _adapterParams - flexible bytes array to indicate messaging adapter services in L0 */ function estimateSendFee(uint16 _dstChainId, bytes calldata _toAddress, uint _tokenId, bool _useZro, bytes calldata _adapterParams) external view returns (uint nativeFee, uint zroFee); /** * @dev send token `_tokenId` to (`_dstChainId`, `_toAddress`) from `_from` * `_toAddress` can be any size depending on the `dstChainId`. * `_zroPaymentAddress` set to address(0x0) if not paying in ZRO (LayerZero Token) * `_adapterParams` is a flexible bytes array to indicate messaging adapter services */ function sendFrom(address _from, uint16 _dstChainId, bytes calldata _toAddress, uint _tokenId, address payable _refundAddress, address _zroPaymentAddress, bytes calldata _adapterParams) external payable; /** * @dev Emitted when `_tokenId` are moved from the `_sender` to (`_dstChainId`, `_toAddress`) * `_nonce` is the outbound nonce from */ event SendToChain(address indexed _sender, uint16 indexed _dstChainId, bytes indexed _toAddress, uint _tokenId, uint64 _nonce); /** * @dev Emitted when `_tokenId` are sent from `_srcChainId` to the `_toAddress` at this chain. `_nonce` is the inbound nonce. */ event ReceiveFromChain(uint16 indexed _srcChainId, bytes indexed _srcAddress, address indexed _toAddress, uint _tokenId, uint64 _nonce); }
// 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); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (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`, 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 Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @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 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); /** * @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; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./LzApp.sol"; /* * the default LayerZero messaging behaviour is blocking, i.e. any failed message will block the channel * this abstract class try-catch all fail messages and store locally for future retry. hence, non-blocking * NOTE: if the srcAddress is not configured properly, it will still block the message pathway from (srcChainId, srcAddress) */ abstract contract NonblockingLzApp is LzApp { constructor(address _endpoint) LzApp(_endpoint) {} mapping(uint16 => mapping(bytes => mapping(uint => bytes32))) public failedMessages; event MessageFailed(uint16 _srcChainId, bytes _srcAddress, uint64 _nonce, bytes _payload); // overriding the virtual function in LzReceiver function _blockingLzReceive(uint16 _srcChainId, bytes memory _srcAddress, uint64 _nonce, bytes memory _payload) internal virtual override { // try-catch all errors/exceptions try this.nonblockingLzReceive(_srcChainId, _srcAddress, _nonce, _payload) { // do nothing } catch { // error / exception failedMessages[_srcChainId][_srcAddress][_nonce] = keccak256(_payload); emit MessageFailed(_srcChainId, _srcAddress, _nonce, _payload); } } function nonblockingLzReceive(uint16 _srcChainId, bytes memory _srcAddress, uint64 _nonce, bytes memory _payload) public virtual { // only internal transaction require(_msgSender() == address(this), "LzReceiver: caller must be LzApp"); _nonblockingLzReceive(_srcChainId, _srcAddress, _nonce, _payload); } //@notice override this function function _nonblockingLzReceive(uint16 _srcChainId, bytes memory _srcAddress, uint64 _nonce, bytes memory _payload) internal virtual; function retryMessage(uint16 _srcChainId, bytes memory _srcAddress, uint64 _nonce, bytes calldata _payload) external payable virtual { // assert there is message to retry bytes32 payloadHash = failedMessages[_srcChainId][_srcAddress][_nonce]; require(payloadHash != bytes32(0), "LzReceiver: no stored message"); require(keccak256(_payload) == payloadHash, "LzReceiver: invalid payload"); // clear the stored message failedMessages[_srcChainId][_srcAddress][_nonce] = bytes32(0); // execute the message. revert if it fails again this.nonblockingLzReceive(_srcChainId, _srcAddress, _nonce, _payload); } }
// 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; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/access/Ownable.sol"; import "../interfaces/ILayerZeroReceiver.sol"; import "../interfaces/ILayerZeroUserApplicationConfig.sol"; import "../interfaces/ILayerZeroEndpoint.sol"; /* * a generic LzReceiver implementation */ abstract contract LzApp is Ownable, ILayerZeroReceiver, ILayerZeroUserApplicationConfig { ILayerZeroEndpoint internal immutable lzEndpoint; mapping(uint16 => bytes) internal trustedRemoteLookup; event SetTrustedRemote(uint16 _srcChainId, bytes _srcAddress); constructor(address _endpoint) { lzEndpoint = ILayerZeroEndpoint(_endpoint); } function lzReceive(uint16 _srcChainId, bytes memory _srcAddress, uint64 _nonce, bytes memory _payload) external override { // lzReceive must be called by the endpoint for security require(_msgSender() == address(lzEndpoint)); // if will still block the message pathway from (srcChainId, srcAddress). should not receive message from untrusted remote. require(_srcAddress.length == trustedRemoteLookup[_srcChainId].length && keccak256(_srcAddress) == keccak256(trustedRemoteLookup[_srcChainId]), "LzReceiver: invalid source sending contract"); _blockingLzReceive(_srcChainId, _srcAddress, _nonce, _payload); } // abstract function - the default behaviour of LayerZero is blocking. See: NonblockingLzApp if you dont need to enforce ordered messaging function _blockingLzReceive(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 _adapterParam) internal { require(trustedRemoteLookup[_dstChainId].length != 0, "LzSend: destination chain is not a trusted source."); lzEndpoint.send{value: msg.value}(_dstChainId, trustedRemoteLookup[_dstChainId], _payload, _refundAddress, _zroPaymentAddress, _adapterParam); } //---------------------------UserApplication config---------------------------------------- function getConfig(uint16, uint16 _chainId, address, uint _configType) external view returns (bytes memory) { return lzEndpoint.getConfig(lzEndpoint.getSendVersion(address(this)), _chainId, address(this), _configType); } // generic config for LayerZero user Application function setConfig(uint16 _version, uint16 _chainId, uint _configType, bytes calldata _config) external override onlyOwner { lzEndpoint.setConfig(_version, _chainId, _configType, _config); } function setSendVersion(uint16 _version) external override onlyOwner { lzEndpoint.setSendVersion(_version); } function setReceiveVersion(uint16 _version) external override onlyOwner { lzEndpoint.setReceiveVersion(_version); } function forceResumeReceive(uint16 _srcChainId, bytes calldata _srcAddress) external override onlyOwner { lzEndpoint.forceResumeReceive(_srcChainId, _srcAddress); } // allow owner to set it multiple times. function setTrustedRemote(uint16 _srcChainId, bytes calldata _srcAddress) external onlyOwner { trustedRemoteLookup[_srcChainId] = _srcAddress; emit SetTrustedRemote(_srcChainId, _srcAddress); } function isTrustedRemote(uint16 _srcChainId, bytes calldata _srcAddress) external view returns (bool) { bytes memory trustedSource = trustedRemoteLookup[_srcChainId]; return keccak256(trustedSource) == keccak256(_srcAddress); } //--------------------------- VIEW FUNCTION ---------------------------------------- // interacting with the LayerZero Endpoint and remote contracts function getTrustedRemote(uint16 _chainId) external view returns (bytes memory) { return trustedRemoteLookup[_chainId]; } function getLzEndpoint() external view returns (address) { return address(lzEndpoint); } }
// 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); } }
// SPDX-License-Identifier: MIT pragma solidity >=0.8.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; }
// SPDX-License-Identifier: MIT pragma solidity >=0.8.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; }
// SPDX-License-Identifier: MIT pragma solidity >=0.8.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); }
// 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; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (token/ERC721/ERC721.sol) pragma solidity ^0.8.0; import "./IERC721.sol"; import "./IERC721Receiver.sol"; import "./extensions/IERC721Metadata.sol"; import "../../utils/Address.sol"; import "../../utils/Context.sol"; import "../../utils/Strings.sol"; import "../../utils/introspection/ERC165.sol"; /** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */ contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _owners; // Mapping owner address to token count mapping(address => uint256) private _balances; // Mapping from token ID to approved address mapping(uint256 => address) private _tokenApprovals; // Mapping from owner to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; /** * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection. */ constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { return interfaceId == type(IERC721).interfaceId || interfaceId == type(IERC721Metadata).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721-balanceOf}. */ function balanceOf(address owner) public view virtual override returns (uint256) { require(owner != address(0), "ERC721: balance query for the zero address"); return _balances[owner]; } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view virtual override returns (address) { address owner = _owners[tokenId]; require(owner != address(0), "ERC721: owner query for nonexistent token"); return owner; } /** * @dev See {IERC721Metadata-name}. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev See {IERC721Metadata-symbol}. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token"); string memory baseURI = _baseURI(); return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : ""; } /** * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each * token will be the concatenation of the `baseURI` and the `tokenId`. Empty * by default, can be overriden in child contracts. */ function _baseURI() internal view virtual returns (string memory) { return ""; } /** * @dev See {IERC721-approve}. */ function approve(address to, uint256 tokenId) public virtual override { address owner = ERC721.ownerOf(tokenId); require(to != owner, "ERC721: approval to current owner"); require( _msgSender() == owner || isApprovedForAll(owner, _msgSender()), "ERC721: approve caller is not owner nor approved for all" ); _approve(to, tokenId); } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view virtual override returns (address) { require(_exists(tokenId), "ERC721: approved query for nonexistent token"); return _tokenApprovals[tokenId]; } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { _setApprovalForAll(_msgSender(), operator, approved); } /** * @dev See {IERC721-isApprovedForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return _operatorApprovals[owner][operator]; } /** * @dev See {IERC721-transferFrom}. */ function transferFrom( address from, address to, uint256 tokenId ) public virtual override { //solhint-disable-next-line max-line-length require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); _transfer(from, to, tokenId); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId ) public virtual override { safeTransferFrom(from, to, tokenId, ""); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory _data ) public virtual override { require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); _safeTransfer(from, to, tokenId, _data); } /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * `_data` is additional data, it has no specified format and it is sent in call to `to`. * * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g. * implement alternative mechanisms to perform token transfer, such as signature-based. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeTransfer( address from, address to, uint256 tokenId, bytes memory _data ) internal virtual { _transfer(from, to, tokenId); require(_checkOnERC721Received(from, to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer"); } /** * @dev Returns whether `tokenId` exists. * * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. * * Tokens start existing when they are minted (`_mint`), * and stop existing when they are burned (`_burn`). */ function _exists(uint256 tokenId) internal view virtual returns (bool) { return _owners[tokenId] != address(0); } /** * @dev Returns whether `spender` is allowed to manage `tokenId`. * * Requirements: * * - `tokenId` must exist. */ function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) { require(_exists(tokenId), "ERC721: operator query for nonexistent token"); address owner = ERC721.ownerOf(tokenId); return (spender == owner || getApproved(tokenId) == spender || isApprovedForAll(owner, spender)); } /** * @dev Safely mints `tokenId` and transfers it to `to`. * * Requirements: * * - `tokenId` must not exist. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeMint(address to, uint256 tokenId) internal virtual { _safeMint(to, tokenId, ""); } /** * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is * forwarded in {IERC721Receiver-onERC721Received} to contract recipients. */ function _safeMint( address to, uint256 tokenId, bytes memory _data ) internal virtual { _mint(to, tokenId); require( _checkOnERC721Received(address(0), to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer" ); } /** * @dev Mints `tokenId` and transfers it to `to`. * * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible * * Requirements: * * - `tokenId` must not exist. * - `to` cannot be the zero address. * * Emits a {Transfer} event. */ function _mint(address to, uint256 tokenId) internal virtual { require(to != address(0), "ERC721: mint to the zero address"); require(!_exists(tokenId), "ERC721: token already minted"); _beforeTokenTransfer(address(0), to, tokenId); _balances[to] += 1; _owners[tokenId] = to; emit Transfer(address(0), to, tokenId); _afterTokenTransfer(address(0), to, tokenId); } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId) internal virtual { address owner = ERC721.ownerOf(tokenId); _beforeTokenTransfer(owner, address(0), tokenId); // Clear approvals _approve(address(0), tokenId); _balances[owner] -= 1; delete _owners[tokenId]; emit Transfer(owner, address(0), tokenId); _afterTokenTransfer(owner, address(0), tokenId); } /** * @dev Transfers `tokenId` from `from` to `to`. * As opposed to {transferFrom}, this imposes no restrictions on msg.sender. * * Requirements: * * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * * Emits a {Transfer} event. */ function _transfer( address from, address to, uint256 tokenId ) internal virtual { require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer from incorrect owner"); require(to != address(0), "ERC721: transfer to the zero address"); _beforeTokenTransfer(from, to, tokenId); // Clear approvals from the previous owner _approve(address(0), tokenId); _balances[from] -= 1; _balances[to] += 1; _owners[tokenId] = to; emit Transfer(from, to, tokenId); _afterTokenTransfer(from, to, tokenId); } /** * @dev Approve `to` to operate on `tokenId` * * Emits a {Approval} event. */ function _approve(address to, uint256 tokenId) internal virtual { _tokenApprovals[tokenId] = to; emit Approval(ERC721.ownerOf(tokenId), to, tokenId); } /** * @dev Approve `operator` to operate on all of `owner` tokens * * Emits a {ApprovalForAll} event. */ function _setApprovalForAll( address owner, address operator, bool approved ) internal virtual { require(owner != operator, "ERC721: approve to caller"); _operatorApprovals[owner][operator] = approved; emit ApprovalForAll(owner, operator, approved); } /** * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address. * The call is not executed if the target address is not a contract. * * @param from address representing the previous owner of the given token ID * @param to target address that will receive the tokens * @param tokenId uint256 ID of the token to be transferred * @param _data bytes optional data to send along with the call * @return bool whether the call correctly returned the expected magic value */ function _checkOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) private returns (bool) { if (to.isContract()) { try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) { return retval == IERC721Receiver.onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert("ERC721: transfer to non ERC721Receiver implementer"); } else { assembly { revert(add(32, reason), mload(reason)) } } } } else { return true; } } /** * @dev Hook that is called before any token transfer. This includes minting * and burning. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, ``from``'s `tokenId` will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual {} /** * @dev Hook that is called after any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _afterTokenTransfer( address from, address to, uint256 tokenId ) internal virtual {} }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721Receiver.sol) pragma solidity ^0.8.0; /** * @title ERC721 token receiver interface * @dev Interface for any contract that wants to support safeTransfers * from ERC721 asset contracts. */ interface IERC721Receiver { /** * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} * by `operator` from `from`, this function is called. * * It must return its Solidity selector to confirm the token transfer. * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted. * * The selector can be obtained in Solidity with `IERC721.onERC721Received.selector`. */ function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol) pragma solidity ^0.8.0; import "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional metadata extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Metadata is IERC721 { /** * @dev Returns the token collection name. */ function name() external view returns (string memory); /** * @dev Returns the token collection symbol. */ function symbol() external view returns (string memory); /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) external view returns (string memory); }
// 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); } } } }
// 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); } }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "metadata": { "useLiteralContent": true }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"string","name":"_name","type":"string"},{"internalType":"string","name":"_symbol","type":"string"},{"internalType":"address","name":"_layerZeroEndpoint","type":"address"},{"internalType":"uint256","name":"_startMintId","type":"uint256"},{"internalType":"uint256","name":"_endMintId","type":"uint256"},{"internalType":"uint256","name":"_maxTokensPerMint","type":"uint256"},{"internalType":"string","name":"_baseTokenURI","type":"string"},{"internalType":"string","name":"_hiddenURI","type":"string"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":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":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint16","name":"_srcChainId","type":"uint16"},{"indexed":true,"internalType":"bytes","name":"_srcAddress","type":"bytes"},{"indexed":true,"internalType":"address","name":"_toAddress","type":"address"},{"indexed":false,"internalType":"uint256","name":"_tokenId","type":"uint256"},{"indexed":false,"internalType":"uint64","name":"_nonce","type":"uint64"}],"name":"ReceiveFromChain","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_sender","type":"address"},{"indexed":true,"internalType":"uint16","name":"_dstChainId","type":"uint16"},{"indexed":true,"internalType":"bytes","name":"_toAddress","type":"bytes"},{"indexed":false,"internalType":"uint256","name":"_tokenId","type":"uint256"},{"indexed":false,"internalType":"uint64","name":"_nonce","type":"uint64"}],"name":"SendToChain","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint16","name":"_srcChainId","type":"uint16"},{"indexed":false,"internalType":"bytes","name":"_srcAddress","type":"bytes"}],"name":"SetTrustedRemote","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"_boughtCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_publicSaleStarted","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_saleStarted","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"contractURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint16","name":"_dstChainId","type":"uint16"},{"internalType":"bytes","name":"_toAddress","type":"bytes"},{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"bool","name":"_useZro","type":"bool"},{"internalType":"bytes","name":"_adapterParams","type":"bytes"}],"name":"estimateSendFee","outputs":[{"internalType":"uint256","name":"nativeFee","type":"uint256"},{"internalType":"uint256","name":"zroFee","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint16","name":"","type":"uint16"},{"internalType":"bytes","name":"","type":"bytes"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"failedMessages","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"flipPublicSaleStarted","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"flipRevealed","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"flipSaleStarted","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"_srcChainId","type":"uint16"},{"internalType":"bytes","name":"_srcAddress","type":"bytes"}],"name":"forceResumeReceive","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint16","name":"","type":"uint16"},{"internalType":"uint16","name":"_chainId","type":"uint16"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"_configType","type":"uint256"}],"name":"getConfig","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getLzEndpoint","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint16","name":"_chainId","type":"uint16"}],"name":"getTrustedRemote","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint16","name":"_srcChainId","type":"uint16"},{"internalType":"bytes","name":"_srcAddress","type":"bytes"}],"name":"isTrustedRemote","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":"maxMintId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxTokensPerMint","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"merkleRoot","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_nbTokens","type":"uint256"},{"internalType":"bytes32[]","name":"_merkleProof","type":"bytes32[]"}],"name":"mint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nextMintId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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":"nonblockingLzReceive","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"price","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_nbTokens","type":"uint256"}],"name":"publicMint","outputs":[],"stateMutability":"payable","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":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"salePrice","type":"uint256"}],"name":"royaltyInfo","outputs":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint256","name":"royaltyAmount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_from","type":"address"},{"internalType":"uint16","name":"_dstChainId","type":"uint16"},{"internalType":"bytes","name":"_toAddress","type":"bytes"},{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"address payable","name":"_refundAddress","type":"address"},{"internalType":"address","name":"_zroPaymentAddress","type":"address"},{"internalType":"bytes","name":"_adapterParams","type":"bytes"}],"name":"sendFrom","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"uri","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable","name":"_beneficiary","type":"address"}],"name":"setBeneficiary","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"_version","type":"uint16"},{"internalType":"uint16","name":"_chainId","type":"uint16"},{"internalType":"uint256","name":"_configType","type":"uint256"},{"internalType":"bytes","name":"_config","type":"bytes"}],"name":"setConfig","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_contractURI","type":"string"}],"name":"setContractURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_hiddenMetadataUri","type":"string"}],"name":"setHiddenMetadataUri","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_merkleRoot","type":"bytes32"}],"name":"setMerkleRoot","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newPrice","type":"uint256"}],"name":"setPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"_version","type":"uint16"}],"name":"setReceiveVersion","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_royaltyBasisPoints","type":"uint256"}],"name":"setRoyaltyFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"_version","type":"uint16"}],"name":"setSendVersion","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"_srcChainId","type":"uint16"},{"internalType":"bytes","name":"_srcAddress","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":"index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60a06040526000600e556101f46012553480156200001c57600080fd5b5060405162004a1338038062004a138339810160408190526200003f91620002bb565b87878782828280806200005233620000f5565b60601b6001600160601b031916608052505081516200007990600390602085019062000145565b5080516200008f90600490602084019062000145565b50506001600d55505050600f8690555060108490556011839055601380546001600160a01b031916331790558151620000d090601690602085019062000145565b508051620000e690601790602084019062000145565b505050505050505050620003f2565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b82805462000153906200039f565b90600052602060002090601f016020900481019282620001775760008555620001c2565b82601f106200019257805160ff1916838001178555620001c2565b82800160010185558215620001c2579182015b82811115620001c2578251825591602001919060010190620001a5565b50620001d0929150620001d4565b5090565b5b80821115620001d05760008155600101620001d5565b80516001600160a01b03811681146200020357600080fd5b919050565b600082601f83011262000219578081fd5b81516001600160401b0380821115620002365762000236620003dc565b604051601f8301601f19908116603f01168101908282118183101715620002615762000261620003dc565b816040528381526020925086838588010111156200027d578485fd5b8491505b83821015620002a0578582018301518183018401529082019062000281565b83821115620002b157848385830101525b9695505050505050565b600080600080600080600080610100898b031215620002d8578384fd5b88516001600160401b0380821115620002ef578586fd5b620002fd8c838d0162000208565b995060208b015191508082111562000313578586fd5b620003218c838d0162000208565b98506200033160408c01620001eb565b975060608b0151965060808b0151955060a08b0151945060c08b01519150808211156200035c578384fd5b6200036a8c838d0162000208565b935060e08b015191508082111562000380578283fd5b506200038f8b828c0162000208565b9150509295985092959890939650565b600181811c90821680620003b457607f821691505b60208210811415620003d657634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052604160045260246000fd5b60805160601c6145c362000450600039600081816109c601528181610ac101528181610cbf01528181610f15015281816110470152818161158801528181611e1f01528181612202015281816128ef0152612fbd01526145c36000f3fe6080604052600436106103755760003560e01c8063600e97f6116101d157806395d89b4111610102578063d1deba1f116100a0578063e985e9c51161006f578063e985e9c514610a15578063eb8d72b714610a5e578063f2fde38b14610a7e578063f5ecbdbc14610a9e57600080fd5b8063d1deba1f146109a4578063dacbcbe2146109b7578063e1d4c870146109ea578063e8a3d48514610a0057600080fd5b8063b88d4fde116100dc578063b88d4fde14610931578063ba41b0c614610951578063c87b56dd14610964578063cbed8b9c1461098457600080fd5b806395d89b41146108e6578063a035b1fe146108fb578063a22cb4651461091157600080fd5b80637cb647591161016f5780638da5cb5b116101495780638da5cb5b146108395780638ee749121461085757806391b7f5ed146108a6578063938e3d7b146108c657600080fd5b80637cb64759146107e557806387c348bf14610805578063899d7b381461082457600080fd5b806369b41f95116101ab57806369b41f951461077a5780636aa99da31461079a57806370a08231146107b0578063715018a6146107d057600080fd5b8063600e97f6146107205780636352211e1461073a57806366ad5c8a1461075a57600080fd5b80632a55205a116102ab5780633e4086e5116102495780634f6ccce7116102235780634f6ccce7146106ad5780634fdd43cb146106cd57806351905636146106ed57806355f804b31461070057600080fd5b80633e4086e51461064d57806342842e0e1461066d57806342d65a8d1461068d57600080fd5b80632f745c59116102855780632f745c59146105e35780633b2c3fb6146106035780633ccfd60b146106185780633d8b38f61461062d57600080fd5b80632a55205a1461057b5780632db11544146105ba5780632eb4a7ab146105cd57600080fd5b806310ddb1371161031857806318160ddd116102f257806318160ddd146104f15780631c31f7101461050657806323b872dd146105265780632a205e3d1461054657600080fd5b806310ddb137146104a65780631291e33e146104c657806317465471146104db57600080fd5b806307e0db171161035457806307e0db17146103f3578063081812fc14610413578063095ea7b31461044b57806309dc20ce1461046b57600080fd5b80621d35671461037a57806301ffc9a71461039c57806306fdde03146103d1575b600080fd5b34801561038657600080fd5b5061039a610395366004613baa565b610abe565b005b3480156103a857600080fd5b506103bc6103b73660046138bc565b610bc7565b60405190151581526020015b60405180910390f35b3480156103dd57600080fd5b506103e6610bea565b6040516103c89190613f09565b3480156103ff57600080fd5b5061039a61040e3660046139af565b610c7c565b34801561041f57600080fd5b5061043361042e3660046138a4565b610d27565b6040516001600160a01b0390911681526020016103c8565b34801561045757600080fd5b5061039a610466366004613879565b610dbc565b34801561047757600080fd5b50610498610486366004613699565b60186020526000908152604090205481565b6040519081526020016103c8565b3480156104b257600080fd5b5061039a6104c13660046139af565b610ed2565b3480156104d257600080fd5b5061039a610f4c565b3480156104e757600080fd5b5061049860115481565b3480156104fd57600080fd5b50600b54610498565b34801561051257600080fd5b5061039a610521366004613699565b610f8a565b34801561053257600080fd5b5061039a6105413660046136ed565b610fd6565b34801561055257600080fd5b50610566610561366004613a8f565b611008565b604080519283526020830191909152016103c8565b34801561058757600080fd5b5061059b610596366004613d4d565b6110e2565b604080516001600160a01b0390931683526020830191909152016103c8565b61039a6105c83660046138a4565b611118565b3480156105d957600080fd5b5061049860145481565b3480156105ef57600080fd5b506104986105fe366004613879565b61128d565b34801561060f57600080fd5b5061039a611323565b34801561062457600080fd5b5061039a61136c565b34801561063957600080fd5b506103bc6106483660046139e7565b611431565b34801561065957600080fd5b5061039a6106683660046138a4565b6114fd565b34801561067957600080fd5b5061039a6106883660046136ed565b61152c565b34801561069957600080fd5b5061039a6106a83660046139e7565b611547565b3480156106b957600080fd5b506104986106c83660046138a4565b6115f8565b3480156106d957600080fd5b5061039a6106e836600461396a565b611699565b61039a6106fb3660046137c1565b6116da565b34801561070c57600080fd5b5061039a61071b36600461396a565b6116e9565b34801561072c57600080fd5b506019546103bc9060ff1681565b34801561074657600080fd5b506104336107553660046138a4565b611726565b34801561076657600080fd5b5061039a610775366004613baa565b61179d565b34801561078657600080fd5b506103e66107953660046139af565b6117f8565b3480156107a657600080fd5b50610498600f5481565b3480156107bc57600080fd5b506104986107cb366004613699565b61189f565b3480156107dc57600080fd5b5061039a611926565b3480156107f157600080fd5b5061039a6108003660046138a4565b61195c565b34801561081157600080fd5b506019546103bc90610100900460ff1681565b34801561083057600080fd5b5061039a61198b565b34801561084557600080fd5b506000546001600160a01b0316610433565b34801561086357600080fd5b50610498610872366004613a39565b6002602090815260009384526040808520845180860184018051928152908401958401959095209452929052825290205481565b3480156108b257600080fd5b5061039a6108c13660046138a4565b6119d2565b3480156108d257600080fd5b5061039a6108e136600461396a565b611a01565b3480156108f257600080fd5b506103e6611a3e565b34801561090757600080fd5b50610498600e5481565b34801561091d57600080fd5b5061039a61092c366004613796565b611a4d565b34801561093d57600080fd5b5061039a61094c36600461372d565b611a58565b61039a61095f366004613cd4565b611a8a565b34801561097057600080fd5b506103e661097f3660046138a4565b611d0a565b34801561099057600080fd5b5061039a61099f366004613c75565b611dde565b61039a6109b2366004613b1c565b611e95565b3480156109c357600080fd5b507f0000000000000000000000000000000000000000000000000000000000000000610433565b3480156109f657600080fd5b5061049860105481565b348015610a0c57600080fd5b506103e661203b565b348015610a2157600080fd5b506103bc610a303660046136b5565b6001600160a01b03918216600090815260086020908152604080832093909416825291909152205460ff1690565b348015610a6a57600080fd5b5061039a610a793660046139e7565b6120c9565b348015610a8a57600080fd5b5061039a610a99366004613699565b612152565b348015610aaa57600080fd5b506103e6610ab9366004613c25565b6121ea565b337f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031614610af357600080fd5b61ffff841660009081526001602052604090208054610b1190614491565b90508351148015610b50575061ffff8416600090815260016020526040908190209051610b3e9190613e2e565b60405180910390208380519060200120145b610bb55760405162461bcd60e51b815260206004820152602b60248201527f4c7a52656365697665723a20696e76616c696420736f757263652073656e646960448201526a1b99c818dbdb9d1c9858dd60aa1b60648201526084015b60405180910390fd5b610bc184848484612322565b50505050565b60006001600160e01b031982161580610be45750610be482612413565b92915050565b606060038054610bf990614491565b80601f0160208091040260200160405190810160405280929190818152602001828054610c2590614491565b8015610c725780601f10610c4757610100808354040283529160200191610c72565b820191906000526020600020905b815481529060010190602001808311610c5557829003601f168201915b5050505050905090565b6000546001600160a01b03163314610ca65760405162461bcd60e51b8152600401610bac90614091565b6040516307e0db1760e01b815261ffff821660048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906307e0db17906024015b600060405180830381600087803b158015610d0c57600080fd5b505af1158015610d20573d6000803e3d6000fd5b5050505050565b6000818152600560205260408120546001600160a01b0316610da05760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610bac565b506000908152600760205260409020546001600160a01b031690565b6000610dc782611726565b9050806001600160a01b0316836001600160a01b03161415610e355760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b6064820152608401610bac565b336001600160a01b0382161480610e515750610e518133610a30565b610ec35760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c00000000000000006064820152608401610bac565b610ecd8383612438565b505050565b6000546001600160a01b03163314610efc5760405162461bcd60e51b8152600401610bac90614091565b6040516310ddb13760e01b815261ffff821660048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906310ddb13790602401610cf2565b6000546001600160a01b03163314610f765760405162461bcd60e51b8152600401610bac90614091565b6019805460ff19811660ff90911615179055565b6000546001600160a01b03163314610fb45760405162461bcd60e51b8152600401610bac90614091565b601380546001600160a01b0319166001600160a01b0392909216919091179055565b610fe1335b826124a6565b610ffd5760405162461bcd60e51b8152600401610bac9061410d565b610ecd838383612599565b60008060008686604051602001611020929190613f1c565b60408051601f198184030181529082905263040a7bb160e41b825291506001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906340a7bb1090611084908b90309086908b908b906004016141a8565b604080518083038186803b15801561109b57600080fd5b505afa1580156110af573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110d39190613d6e565b92509250509550959350505050565b6013546012546001600160a01b039091169060009061271090611105908561442f565b61110f919061441b565b90509250929050565b60195460ff1615156001146111895760405162461bcd60e51b815260206004820152603160248201527f416476616e6365644f4e46543732313a205075626c69632073616c6520686173604482015270206e6f742073746172746564207965742160781b6064820152608401610bac565b60195460ff6101009091041615156001146111b65760405162461bcd60e51b8152600401610bac90613f3e565b806111d35760405162461bcd60e51b8152600401610bac90613fda565b6011548111156111f55760405162461bcd60e51b8152600401610bac90614020565b60105481600f546112069190614403565b11156112245760405162461bcd60e51b8152600401610bac906140c6565b34600e5482611233919061442f565b11156112515760405162461bcd60e51b8152600401610bac9061415e565b600f5460005b82811015611286576112743361126c846144cc565b935083612740565b8061127e816144cc565b915050611257565b50600f5550565b60006112988361189f565b82106112fa5760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b6064820152608401610bac565b506001600160a01b03919091166000908152600960209081526040808320938352929052205490565b6000546001600160a01b0316331461134d5760405162461bcd60e51b8152600401610bac90614091565b6019805462ff0000198116620100009182900460ff1615909102179055565b6000546001600160a01b031633146113965760405162461bcd60e51b8152600401610bac90614091565b6013546001600160a01b03166113fc5760405162461bcd60e51b815260206004820152602560248201527f416476616e6365644f4e46543732313a2042656e6566696369617279206e6f74604482015264207365742160d81b6064820152608401610bac565b60135460405147916001600160a01b03169082156108fc029083906000818181858888f1935050505061142e57600080fd5b50565b61ffff83166000908152600160205260408120805482919061145290614491565b80601f016020809104026020016040519081016040528092919081815260200182805461147e90614491565b80156114cb5780601f106114a0576101008083540402835291602001916114cb565b820191906000526020600020905b8154815290600101906020018083116114ae57829003601f168201915b5050505050905083836040516114e2929190613e02565b60405180910390208180519060200120149150509392505050565b6000546001600160a01b031633146115275760405162461bcd60e51b8152600401610bac90614091565b601255565b610ecd83838360405180602001604052806000815250611a58565b6000546001600160a01b031633146115715760405162461bcd60e51b8152600401610bac90614091565b6040516342d65a8d60e01b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906342d65a8d906115c1908690869086906004016141fc565b600060405180830381600087803b1580156115db57600080fd5b505af11580156115ef573d6000803e3d6000fd5b50505050505050565b6000611603600b5490565b82106116665760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b6064820152608401610bac565b600b828154811061168757634e487b7160e01b600052603260045260246000fd5b90600052602060002001549050919050565b6000546001600160a01b031633146116c35760405162461bcd60e51b8152600401610bac90614091565b80516116d690601790602084019061348a565b5050565b6115ef8787878787878761288e565b6000546001600160a01b031633146117135760405162461bcd60e51b8152600401610bac90614091565b80516116d690601690602084019061348a565b6000818152600560205260408120546001600160a01b031680610be45760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b6064820152608401610bac565b3330146117ec5760405162461bcd60e51b815260206004820181905260248201527f4c7a52656365697665723a2063616c6c6572206d757374206265204c7a4170706044820152606401610bac565b610bc1848484846129e5565b61ffff8116600090815260016020526040902080546060919061181a90614491565b80601f016020809104026020016040519081016040528092919081815260200182805461184690614491565b80156118935780601f1061186857610100808354040283529160200191611893565b820191906000526020600020905b81548152906001019060200180831161187657829003601f168201915b50505050509050919050565b60006001600160a01b03821661190a5760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b6064820152608401610bac565b506001600160a01b031660009081526006602052604090205490565b6000546001600160a01b031633146119505760405162461bcd60e51b8152600401610bac90614091565b61195a6000612a80565b565b6000546001600160a01b031633146119865760405162461bcd60e51b8152600401610bac90614091565b601455565b6000546001600160a01b031633146119b55760405162461bcd60e51b8152600401610bac90614091565b6019805461ff001981166101009182900460ff1615909102179055565b6000546001600160a01b031633146119fc5760405162461bcd60e51b8152600401610bac90614091565b600e55565b6000546001600160a01b03163314611a2b5760405162461bcd60e51b8152600401610bac90614091565b80516116d690601590602084019061348a565b606060048054610bf990614491565b6116d6338383612ad0565b611a6233836124a6565b611a7e5760405162461bcd60e51b8152600401610bac9061410d565b610bc184848484612b9f565b60195460ff610100909104161515600114611ab75760405162461bcd60e51b8152600401610bac90613f3e565b82611ad45760405162461bcd60e51b8152600401610bac90613fda565b601154831115611af65760405162461bcd60e51b8152600401610bac90614020565b60105483600f54611b079190614403565b1115611b255760405162461bcd60e51b8152600401610bac906140c6565b34600e5484611b34919061442f565b1115611b525760405162461bcd60e51b8152600401610bac9061415e565b60115433600090815260186020526040902054611b70908590614403565b1115611bd65760405162461bcd60e51b815260206004820152602f60248201527f416476616e6365644f4e46543732313a20596f7520657863656564656420796f60448201526e3ab9103a37b5b2b7103634b6b4ba1760891b6064820152608401610bac565b6000611c4d838380806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250506014546040516bffffffffffffffffffffffff193360601b166020820152909250603401905060405160208183030381529060405280519060200120612bd2565b9050600181151514611caf5760405162461bcd60e51b815260206004820152602560248201527f416476616e6365644f4e46543732313a20496e76616c6964204d65726b6c6520604482015264283937b7b360d91b6064820152608401610bac565b3360009081526018602052604081208054869290611cce908490614403565b9091555050600f5460005b85811015611d0057611cee3361126c846144cc565b80611cf8816144cc565b915050611cd9565b50600f5550505050565b6000818152600560205260409020546060906001600160a01b0316611d895760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b6064820152608401610bac565b60195462010000900460ff16611da6576017805461181a90614491565b611dae612be8565b611db783612bf7565b604051602001611dc8929190613e9d565b6040516020818303038152906040529050919050565b6000546001600160a01b03163314611e085760405162461bcd60e51b8152600401610bac90614091565b6040516332fb62e760e21b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063cbed8b9c90611e5c908890889088908890889060040161437e565b600060405180830381600087803b158015611e7657600080fd5b505af1158015611e8a573d6000803e3d6000fd5b505050505050505050565b61ffff85166000908152600260205260408082209051611eb6908790613e12565b90815260408051602092819003830190206001600160401b03871660009081529252902054905080611f2a5760405162461bcd60e51b815260206004820152601d60248201527f4c7a52656365697665723a206e6f2073746f726564206d6573736167650000006044820152606401610bac565b808383604051611f3b929190613e02565b604051809103902014611f905760405162461bcd60e51b815260206004820152601b60248201527f4c7a52656365697665723a20696e76616c6964207061796c6f616400000000006044820152606401610bac565b61ffff86166000908152600260205260408082209051611fb1908890613e12565b9081526040805191829003602090810183206001600160401b038916600090815291522091909155633356ae4560e11b815230906366ad5c8a90612001908990899089908990899060040161421a565b600060405180830381600087803b15801561201b57600080fd5b505af115801561202f573d6000803e3d6000fd5b50505050505050505050565b6015805461204890614491565b80601f016020809104026020016040519081016040528092919081815260200182805461207490614491565b80156120c15780601f10612096576101008083540402835291602001916120c1565b820191906000526020600020905b8154815290600101906020018083116120a457829003601f168201915b505050505081565b6000546001600160a01b031633146120f35760405162461bcd60e51b8152600401610bac90614091565b61ffff8316600090815260016020526040902061211190838361350e565b507ffa41487ad5d6728f0b19276fa1eddc16558578f5109fc39d2dc33c3230470dab838383604051612145939291906141fc565b60405180910390a1505050565b6000546001600160a01b0316331461217c5760405162461bcd60e51b8152600401610bac90614091565b6001600160a01b0381166121e15760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610bac565b61142e81612a80565b6040516304b2b47b60e11b81523060048201526060907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063f5ecbdbc90829063096568f69060240160206040518083038186803b15801561225457600080fd5b505afa158015612268573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061228c91906139cb565b6040516001600160e01b031960e084901b16815261ffff918216600482015290871660248201523060448201526064810185905260840160006040518083038186803b1580156122db57600080fd5b505afa1580156122ef573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261231791908101906138f4565b90505b949350505050565b604051633356ae4560e11b815230906366ad5c8a9061234b908790879087908790600401614259565b600060405180830381600087803b15801561236557600080fd5b505af1925050508015612376575060015b610bc1578080519060200120600260008661ffff1661ffff168152602001908152602001600020846040516123ab9190613e12565b9081526040805191829003602090810183206001600160401b0387166000908152915220919091557fe6f254030bcb01ffd20558175c13fcaed6d1520be7becee4c961b65f79243b0d90612406908690869086908690614259565b60405180910390a1610bc1565b60006001600160e01b0319821663780e9d6360e01b1480610be45750610be482612d10565b600081815260076020526040902080546001600160a01b0319166001600160a01b038416908117909155819061246d82611726565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000818152600560205260408120546001600160a01b031661251f5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610bac565b600061252a83611726565b9050806001600160a01b0316846001600160a01b031614806125655750836001600160a01b031661255a84610d27565b6001600160a01b0316145b8061231a57506001600160a01b0380821660009081526008602090815260408083209388168352929052205460ff1661231a565b826001600160a01b03166125ac82611726565b6001600160a01b0316146126105760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b6064820152608401610bac565b6001600160a01b0382166126725760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610bac565b61267d838383612d50565b612688600082612438565b6001600160a01b03831660009081526006602052604081208054600192906126b190849061444e565b90915550506001600160a01b03821660009081526006602052604081208054600192906126df908490614403565b909155505060008181526005602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b6001600160a01b0382166127965760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610bac565b6000818152600560205260409020546001600160a01b0316156127fb5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610bac565b61280760008383612d50565b6001600160a01b0382166000908152600660205260408120805460019290612830908490614403565b909155505060008181526005602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b61289a87878787612e08565b600085856040516020016128af929190613f1c565b60405160208183030381529060405290506128cd8782868686612f0a565b604051630f428ae960e31b815261ffff881660048201523060248201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690637a1457489060440160206040518083038186803b15801561293957600080fd5b505afa15801561294d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906129719190613d91565b9050866040516129819190613e12565b604080519182900382208883526001600160401b03841660208401529161ffff8b16916001600160a01b038d16917f024797cc77ce15dc717112d54fb1df125fdfd8c81344fb046c5e074427ce1543910160405180910390a4505050505050505050565b600080828060200190518101906129fc9190613926565b60148201519193509150612a11878284613016565b806001600160a01b031686604051612a299190613e12565b604080519182900382208583526001600160401b03891660208401529161ffff8b16917f64e10c37f404d128982dce114f5d233c14c5c7f6d8db93099e3d99dacb9e27ba910160405180910390a450505050505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b816001600160a01b0316836001600160a01b03161415612b325760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610bac565b6001600160a01b03838116600081815260086020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b612baa848484612599565b612bb684848484613020565b610bc15760405162461bcd60e51b8152600401610bac90613f88565b600082612bdf858461312a565b14949350505050565b606060168054610bf990614491565b606081612c1b5750506040805180820190915260018152600360fc1b602082015290565b8160005b8115612c455780612c2f816144cc565b9150612c3e9050600a8361441b565b9150612c1f565b6000816001600160401b03811115612c6d57634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015612c97576020820181803683370190505b5090505b841561231a57612cac60018361444e565b9150612cb9600a866144e7565b612cc4906030614403565b60f81b818381518110612ce757634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350612d09600a8661441b565b9450612c9b565b60006001600160e01b031982166380ac58cd60e01b1480612d4157506001600160e01b03198216635b5e139f60e01b145b80610be45750610be4826131ac565b6001600160a01b038316612dab57612da681600b80546000838152600c60205260408120829055600182018355919091527f0175b7a638427703f0dbe7bb9bbf987a2551717b34e79f33b5b1008d1fa01db90155565b612dce565b816001600160a01b0316836001600160a01b031614612dce57612dce83826131e1565b6001600160a01b038216612de557610ecd8161327e565b826001600160a01b0316826001600160a01b031614610ecd57610ecd8282613357565b612e1133610fdb565b612e835760405162461bcd60e51b815260206004820152603860248201527f4f4e4654373231456e756d657261626c653a2073656e642063616c6c6572206960448201527f73206e6f74206f776e6572206e6f7220617070726f76656400000000000000006064820152608401610bac565b836001600160a01b0316612e9682611726565b6001600160a01b031614612f015760405162461bcd60e51b815260206004820152602c60248201527f4f4e4654373231456e756d657261626c653a2073656e642066726f6d20696e6360448201526b37b93932b1ba1037bbb732b960a11b6064820152608401610bac565b610bc18161339b565b61ffff851660009081526001602052604090208054612f2890614491565b15159050612f935760405162461bcd60e51b815260206004820152603260248201527f4c7a53656e643a2064657374696e6174696f6e20636861696e206973206e6f746044820152711030903a393ab9ba32b21039b7bab931b29760711b6064820152608401610bac565b61ffff851660009081526001602052604090819020905162c5803160e81b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163c5803100913491612ffd918a91908a908a908a908a906004016142a2565b6000604051808303818588803b15801561201b57600080fd5b610ecd8282613442565b60006001600160a01b0384163b1561312257604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290613064903390899088908890600401613ecc565b602060405180830381600087803b15801561307e57600080fd5b505af19250505080156130ae575060408051601f3d908101601f191682019092526130ab918101906138d8565b60015b613108573d8080156130dc576040519150601f19603f3d011682016040523d82523d6000602084013e6130e1565b606091505b5080516131005760405162461bcd60e51b8152600401610bac90613f88565b805181602001fd5b6001600160e01b031916630a85bd0160e11b14905061231a565b50600161231a565b600081815b84518110156131a457600085828151811061315a57634e487b7160e01b600052603260045260246000fd5b602002602001015190508083116131805760008381526020829052604090209250613191565b600081815260208490526040902092505b508061319c816144cc565b91505061312f565b509392505050565b60006001600160e01b03198216637bb0080b60e01b1480610be457506301ffc9a760e01b6001600160e01b0319831614610be4565b600060016131ee8461189f565b6131f8919061444e565b6000838152600a602052604090205490915080821461324b576001600160a01b03841660009081526009602090815260408083208584528252808320548484528184208190558352600a90915290208190555b506000918252600a602090815260408084208490556001600160a01b039094168352600981528383209183525290812055565b600b546000906132909060019061444e565b6000838152600c6020526040812054600b80549394509092849081106132c657634e487b7160e01b600052603260045260246000fd5b9060005260206000200154905080600b83815481106132f557634e487b7160e01b600052603260045260246000fd5b6000918252602080832090910192909255828152600c9091526040808220849055858252812055600b80548061333b57634e487b7160e01b600052603160045260246000fd5b6001900381819060005260206000200160009055905550505050565b60006133628361189f565b6001600160a01b0390931660009081526009602090815260408083208684528252808320859055938252600a9052919091209190915550565b60006133a682611726565b90506133b481600084612d50565b6133bf600083612438565b6001600160a01b03811660009081526006602052604081208054600192906133e890849061444e565b909155505060008281526005602052604080822080546001600160a01b0319169055518391906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b6116d68282604051806020016040528060008152506134618383612740565b61346e6000848484613020565b610ecd5760405162461bcd60e51b8152600401610bac90613f88565b82805461349690614491565b90600052602060002090601f0160209004810192826134b857600085556134fe565b82601f106134d157805160ff19168380011785556134fe565b828001600101855582156134fe579182015b828111156134fe5782518255916020019190600101906134e3565b5061350a929150613582565b5090565b82805461351a90614491565b90600052602060002090601f01602090048101928261353c57600085556134fe565b82601f106135555782800160ff198235161785556134fe565b828001600101855582156134fe579182015b828111156134fe578235825591602001919060010190613567565b5b8082111561350a5760008155600101613583565b60006135aa6135a5846143dc565b6143ac565b90508281528383830111156135be57600080fd5b828260208301376000602084830101529392505050565b803580151581146135e557600080fd5b919050565b60008083601f8401126135fb578182fd5b5081356001600160401b03811115613611578182fd5b60208301915083602082850101111561362957600080fd5b9250929050565b600082601f830112613640578081fd5b61364f83833560208501613597565b9392505050565b600082601f830112613666578081fd5b81516136746135a5826143dc565b818152846020838601011115613688578283fd5b61231a826020830160208701614465565b6000602082840312156136aa578081fd5b813561364f8161453d565b600080604083850312156136c7578081fd5b82356136d28161453d565b915060208301356136e28161453d565b809150509250929050565b600080600060608486031215613701578081fd5b833561370c8161453d565b9250602084013561371c8161453d565b929592945050506040919091013590565b60008060008060808587031215613742578081fd5b843561374d8161453d565b9350602085013561375d8161453d565b92506040850135915060608501356001600160401b0381111561377e578182fd5b61378a87828801613630565b91505092959194509250565b600080604083850312156137a8578182fd5b82356137b38161453d565b915061110f602084016135d5565b600080600080600080600060e0888a0312156137db578485fd5b87356137e68161453d565b965060208801356137f681614568565b955060408801356001600160401b0380821115613811578687fd5b61381d8b838c01613630565b965060608a0135955060808a013591506138368261453d565b90935060a0890135906138488261453d565b90925060c0890135908082111561385d578283fd5b5061386a8a828b01613630565b91505092959891949750929550565b6000806040838503121561388b578182fd5b82356138968161453d565b946020939093013593505050565b6000602082840312156138b5578081fd5b5035919050565b6000602082840312156138cd578081fd5b813561364f81614552565b6000602082840312156138e9578081fd5b815161364f81614552565b600060208284031215613905578081fd5b81516001600160401b0381111561391a578182fd5b61231a84828501613656565b60008060408385031215613938578182fd5b82516001600160401b0381111561394d578283fd5b61395985828601613656565b925050602083015190509250929050565b60006020828403121561397b578081fd5b81356001600160401b03811115613990578182fd5b8201601f810184136139a0578182fd5b61231a84823560208401613597565b6000602082840312156139c0578081fd5b813561364f81614568565b6000602082840312156139dc578081fd5b815161364f81614568565b6000806000604084860312156139fb578081fd5b8335613a0681614568565b925060208401356001600160401b03811115613a20578182fd5b613a2c868287016135ea565b9497909650939450505050565b600080600060608486031215613a4d578081fd5b8335613a5881614568565b925060208401356001600160401b03811115613a72578182fd5b613a7e86828701613630565b925050604084013590509250925092565b600080600080600060a08688031215613aa6578283fd5b8535613ab181614568565b945060208601356001600160401b0380821115613acc578485fd5b613ad889838a01613630565b955060408801359450613aed606089016135d5565b93506080880135915080821115613b02578283fd5b50613b0f88828901613630565b9150509295509295909350565b600080600080600060808688031215613b33578283fd5b8535613b3e81614568565b945060208601356001600160401b0380821115613b59578485fd5b613b6589838a01613630565b955060408801359150613b7782614578565b90935060608701359080821115613b8c578283fd5b50613b99888289016135ea565b969995985093965092949392505050565b60008060008060808587031215613bbf578182fd5b8435613bca81614568565b935060208501356001600160401b0380821115613be5578384fd5b613bf188838901613630565b945060408701359150613c0382614578565b90925060608601359080821115613c18578283fd5b5061378a87828801613630565b60008060008060808587031215613c3a578182fd5b8435613c4581614568565b93506020850135613c5581614568565b92506040850135613c658161453d565b9396929550929360600135925050565b600080600080600060808688031215613c8c578283fd5b8535613c9781614568565b94506020860135613ca781614568565b93506040860135925060608601356001600160401b03811115613cc8578182fd5b613b99888289016135ea565b600080600060408486031215613ce8578081fd5b8335925060208401356001600160401b0380821115613d05578283fd5b818601915086601f830112613d18578283fd5b813581811115613d26578384fd5b8760208260051b8501011115613d3a578384fd5b6020830194508093505050509250925092565b60008060408385031215613d5f578182fd5b50508035926020909101359150565b60008060408385031215613d80578182fd5b505080516020909101519092909150565b600060208284031215613da2578081fd5b815161364f81614578565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b60008151808452613dee816020860160208601614465565b601f01601f19169290920160200192915050565b8183823760009101908152919050565b60008251613e24818460208701614465565b9190910192915050565b6000808354613e3c81614491565b60018281168015613e545760018114613e6557613e91565b60ff19841687528287019450613e91565b8786526020808720875b85811015613e885781548a820152908401908201613e6f565b50505082870194505b50929695505050505050565b60008351613eaf818460208801614465565b835190830190613ec3818360208801614465565b01949350505050565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090613eff90830184613dd6565b9695505050505050565b60208152600061364f6020830184613dd6565b604081526000613f2f6040830185613dd6565b90508260208301529392505050565b6020808252602a908201527f416476616e6365644f4e46543732313a2053616c6520686173206e6f742073746040820152696172746564207965742160b01b606082015260800190565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b60208082526026908201527f416476616e6365644f4e46543732313a2043616e6e6f74206d696e74203020746040820152656f6b656e732160d01b606082015260800190565b6020808252604b908201527f416476616e6365644f4e46543732313a20596f752063616e6e6f74206d696e7460408201527f206d6f7265207468616e206d6178546f6b656e735065724d696e7420746f6b6560608201526a6e73206174206f6e63652160a81b608082015260a00190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526027908201527f416476616e6365644f4e46543732313a206d6178206d696e74206c696d6974206040820152661c995858da195960ca1b606082015260800190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b6020808252602a908201527f416476616e6365644f4e46543732313a20496e636f6e73697374656e7420616d6040820152696f756e742073656e742160b01b606082015260800190565b61ffff861681526001600160a01b038516602082015260a0604082018190526000906141d690830186613dd6565b841515606084015282810360808401526141f08185613dd6565b98975050505050505050565b61ffff84168152604060208201526000612317604083018486613dad565b61ffff861681526080602082015260006142376080830187613dd6565b6001600160401b038616604084015282810360608401526141f0818587613dad565b61ffff851681526080602082015260006142766080830186613dd6565b6001600160401b038516604084015282810360608401526142978185613dd6565b979650505050505050565b61ffff871681526000602060c0818401528188546142bf81614491565b8060c087015260e06001808416600081146142e157600181146142f657614321565b60ff1985168984015261010089019550614321565b8d8852868820885b858110156143195781548b82018601529083019088016142fe565b8a0184019650505b505050505083810360408501526143388189613dd6565b91505061435060608401876001600160a01b03169052565b6001600160a01b038516608084015282810360a08401526143718185613dd6565b9998505050505050505050565b600061ffff808816835280871660208401525084604083015260806060830152614297608083018486613dad565b604051601f8201601f191681016001600160401b03811182821017156143d4576143d4614527565b604052919050565b60006001600160401b038211156143f5576143f5614527565b50601f01601f191660200190565b60008219821115614416576144166144fb565b500190565b60008261442a5761442a614511565b500490565b6000816000190483118215151615614449576144496144fb565b500290565b600082821015614460576144606144fb565b500390565b60005b83811015614480578181015183820152602001614468565b83811115610bc15750506000910152565b600181811c908216806144a557607f821691505b602082108114156144c657634e487b7160e01b600052602260045260246000fd5b50919050565b60006000198214156144e0576144e06144fb565b5060010190565b6000826144f6576144f6614511565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b038116811461142e57600080fd5b6001600160e01b03198116811461142e57600080fd5b61ffff8116811461142e57600080fd5b6001600160401b038116811461142e57600080fdfea2646970667358221220a2b60a2b525249c771abe08b5e195766b515493550cc2f0b4885df2ce9e9689264736f6c634300080400330000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000014000000000000000000000000066a71dcef29a0ffbdbe3c6a460a3b5bc225cd675000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001f40000000000000000000000000000000000000000000000000000000000000005000000000000000000000000000000000000000000000000000000000000018000000000000000000000000000000000000000000000000000000000000001c0000000000000000000000000000000000000000000000000000000000000000b477265677320284554482900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000044752454700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000b455448546f6b656e555249000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005068747470733a2f2f676174657761792e70696e6174612e636c6f75642f697066732f516d537376414777626934513979414342435a316a4638434334354c6b675a5a7a644a6a69515632666b5a6d546a00000000000000000000000000000000
Deployed Bytecode
0x6080604052600436106103755760003560e01c8063600e97f6116101d157806395d89b4111610102578063d1deba1f116100a0578063e985e9c51161006f578063e985e9c514610a15578063eb8d72b714610a5e578063f2fde38b14610a7e578063f5ecbdbc14610a9e57600080fd5b8063d1deba1f146109a4578063dacbcbe2146109b7578063e1d4c870146109ea578063e8a3d48514610a0057600080fd5b8063b88d4fde116100dc578063b88d4fde14610931578063ba41b0c614610951578063c87b56dd14610964578063cbed8b9c1461098457600080fd5b806395d89b41146108e6578063a035b1fe146108fb578063a22cb4651461091157600080fd5b80637cb647591161016f5780638da5cb5b116101495780638da5cb5b146108395780638ee749121461085757806391b7f5ed146108a6578063938e3d7b146108c657600080fd5b80637cb64759146107e557806387c348bf14610805578063899d7b381461082457600080fd5b806369b41f95116101ab57806369b41f951461077a5780636aa99da31461079a57806370a08231146107b0578063715018a6146107d057600080fd5b8063600e97f6146107205780636352211e1461073a57806366ad5c8a1461075a57600080fd5b80632a55205a116102ab5780633e4086e5116102495780634f6ccce7116102235780634f6ccce7146106ad5780634fdd43cb146106cd57806351905636146106ed57806355f804b31461070057600080fd5b80633e4086e51461064d57806342842e0e1461066d57806342d65a8d1461068d57600080fd5b80632f745c59116102855780632f745c59146105e35780633b2c3fb6146106035780633ccfd60b146106185780633d8b38f61461062d57600080fd5b80632a55205a1461057b5780632db11544146105ba5780632eb4a7ab146105cd57600080fd5b806310ddb1371161031857806318160ddd116102f257806318160ddd146104f15780631c31f7101461050657806323b872dd146105265780632a205e3d1461054657600080fd5b806310ddb137146104a65780631291e33e146104c657806317465471146104db57600080fd5b806307e0db171161035457806307e0db17146103f3578063081812fc14610413578063095ea7b31461044b57806309dc20ce1461046b57600080fd5b80621d35671461037a57806301ffc9a71461039c57806306fdde03146103d1575b600080fd5b34801561038657600080fd5b5061039a610395366004613baa565b610abe565b005b3480156103a857600080fd5b506103bc6103b73660046138bc565b610bc7565b60405190151581526020015b60405180910390f35b3480156103dd57600080fd5b506103e6610bea565b6040516103c89190613f09565b3480156103ff57600080fd5b5061039a61040e3660046139af565b610c7c565b34801561041f57600080fd5b5061043361042e3660046138a4565b610d27565b6040516001600160a01b0390911681526020016103c8565b34801561045757600080fd5b5061039a610466366004613879565b610dbc565b34801561047757600080fd5b50610498610486366004613699565b60186020526000908152604090205481565b6040519081526020016103c8565b3480156104b257600080fd5b5061039a6104c13660046139af565b610ed2565b3480156104d257600080fd5b5061039a610f4c565b3480156104e757600080fd5b5061049860115481565b3480156104fd57600080fd5b50600b54610498565b34801561051257600080fd5b5061039a610521366004613699565b610f8a565b34801561053257600080fd5b5061039a6105413660046136ed565b610fd6565b34801561055257600080fd5b50610566610561366004613a8f565b611008565b604080519283526020830191909152016103c8565b34801561058757600080fd5b5061059b610596366004613d4d565b6110e2565b604080516001600160a01b0390931683526020830191909152016103c8565b61039a6105c83660046138a4565b611118565b3480156105d957600080fd5b5061049860145481565b3480156105ef57600080fd5b506104986105fe366004613879565b61128d565b34801561060f57600080fd5b5061039a611323565b34801561062457600080fd5b5061039a61136c565b34801561063957600080fd5b506103bc6106483660046139e7565b611431565b34801561065957600080fd5b5061039a6106683660046138a4565b6114fd565b34801561067957600080fd5b5061039a6106883660046136ed565b61152c565b34801561069957600080fd5b5061039a6106a83660046139e7565b611547565b3480156106b957600080fd5b506104986106c83660046138a4565b6115f8565b3480156106d957600080fd5b5061039a6106e836600461396a565b611699565b61039a6106fb3660046137c1565b6116da565b34801561070c57600080fd5b5061039a61071b36600461396a565b6116e9565b34801561072c57600080fd5b506019546103bc9060ff1681565b34801561074657600080fd5b506104336107553660046138a4565b611726565b34801561076657600080fd5b5061039a610775366004613baa565b61179d565b34801561078657600080fd5b506103e66107953660046139af565b6117f8565b3480156107a657600080fd5b50610498600f5481565b3480156107bc57600080fd5b506104986107cb366004613699565b61189f565b3480156107dc57600080fd5b5061039a611926565b3480156107f157600080fd5b5061039a6108003660046138a4565b61195c565b34801561081157600080fd5b506019546103bc90610100900460ff1681565b34801561083057600080fd5b5061039a61198b565b34801561084557600080fd5b506000546001600160a01b0316610433565b34801561086357600080fd5b50610498610872366004613a39565b6002602090815260009384526040808520845180860184018051928152908401958401959095209452929052825290205481565b3480156108b257600080fd5b5061039a6108c13660046138a4565b6119d2565b3480156108d257600080fd5b5061039a6108e136600461396a565b611a01565b3480156108f257600080fd5b506103e6611a3e565b34801561090757600080fd5b50610498600e5481565b34801561091d57600080fd5b5061039a61092c366004613796565b611a4d565b34801561093d57600080fd5b5061039a61094c36600461372d565b611a58565b61039a61095f366004613cd4565b611a8a565b34801561097057600080fd5b506103e661097f3660046138a4565b611d0a565b34801561099057600080fd5b5061039a61099f366004613c75565b611dde565b61039a6109b2366004613b1c565b611e95565b3480156109c357600080fd5b507f00000000000000000000000066a71dcef29a0ffbdbe3c6a460a3b5bc225cd675610433565b3480156109f657600080fd5b5061049860105481565b348015610a0c57600080fd5b506103e661203b565b348015610a2157600080fd5b506103bc610a303660046136b5565b6001600160a01b03918216600090815260086020908152604080832093909416825291909152205460ff1690565b348015610a6a57600080fd5b5061039a610a793660046139e7565b6120c9565b348015610a8a57600080fd5b5061039a610a99366004613699565b612152565b348015610aaa57600080fd5b506103e6610ab9366004613c25565b6121ea565b337f00000000000000000000000066a71dcef29a0ffbdbe3c6a460a3b5bc225cd6756001600160a01b031614610af357600080fd5b61ffff841660009081526001602052604090208054610b1190614491565b90508351148015610b50575061ffff8416600090815260016020526040908190209051610b3e9190613e2e565b60405180910390208380519060200120145b610bb55760405162461bcd60e51b815260206004820152602b60248201527f4c7a52656365697665723a20696e76616c696420736f757263652073656e646960448201526a1b99c818dbdb9d1c9858dd60aa1b60648201526084015b60405180910390fd5b610bc184848484612322565b50505050565b60006001600160e01b031982161580610be45750610be482612413565b92915050565b606060038054610bf990614491565b80601f0160208091040260200160405190810160405280929190818152602001828054610c2590614491565b8015610c725780601f10610c4757610100808354040283529160200191610c72565b820191906000526020600020905b815481529060010190602001808311610c5557829003601f168201915b5050505050905090565b6000546001600160a01b03163314610ca65760405162461bcd60e51b8152600401610bac90614091565b6040516307e0db1760e01b815261ffff821660048201527f00000000000000000000000066a71dcef29a0ffbdbe3c6a460a3b5bc225cd6756001600160a01b0316906307e0db17906024015b600060405180830381600087803b158015610d0c57600080fd5b505af1158015610d20573d6000803e3d6000fd5b5050505050565b6000818152600560205260408120546001600160a01b0316610da05760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610bac565b506000908152600760205260409020546001600160a01b031690565b6000610dc782611726565b9050806001600160a01b0316836001600160a01b03161415610e355760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b6064820152608401610bac565b336001600160a01b0382161480610e515750610e518133610a30565b610ec35760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c00000000000000006064820152608401610bac565b610ecd8383612438565b505050565b6000546001600160a01b03163314610efc5760405162461bcd60e51b8152600401610bac90614091565b6040516310ddb13760e01b815261ffff821660048201527f00000000000000000000000066a71dcef29a0ffbdbe3c6a460a3b5bc225cd6756001600160a01b0316906310ddb13790602401610cf2565b6000546001600160a01b03163314610f765760405162461bcd60e51b8152600401610bac90614091565b6019805460ff19811660ff90911615179055565b6000546001600160a01b03163314610fb45760405162461bcd60e51b8152600401610bac90614091565b601380546001600160a01b0319166001600160a01b0392909216919091179055565b610fe1335b826124a6565b610ffd5760405162461bcd60e51b8152600401610bac9061410d565b610ecd838383612599565b60008060008686604051602001611020929190613f1c565b60408051601f198184030181529082905263040a7bb160e41b825291506001600160a01b037f00000000000000000000000066a71dcef29a0ffbdbe3c6a460a3b5bc225cd67516906340a7bb1090611084908b90309086908b908b906004016141a8565b604080518083038186803b15801561109b57600080fd5b505afa1580156110af573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110d39190613d6e565b92509250509550959350505050565b6013546012546001600160a01b039091169060009061271090611105908561442f565b61110f919061441b565b90509250929050565b60195460ff1615156001146111895760405162461bcd60e51b815260206004820152603160248201527f416476616e6365644f4e46543732313a205075626c69632073616c6520686173604482015270206e6f742073746172746564207965742160781b6064820152608401610bac565b60195460ff6101009091041615156001146111b65760405162461bcd60e51b8152600401610bac90613f3e565b806111d35760405162461bcd60e51b8152600401610bac90613fda565b6011548111156111f55760405162461bcd60e51b8152600401610bac90614020565b60105481600f546112069190614403565b11156112245760405162461bcd60e51b8152600401610bac906140c6565b34600e5482611233919061442f565b11156112515760405162461bcd60e51b8152600401610bac9061415e565b600f5460005b82811015611286576112743361126c846144cc565b935083612740565b8061127e816144cc565b915050611257565b50600f5550565b60006112988361189f565b82106112fa5760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b6064820152608401610bac565b506001600160a01b03919091166000908152600960209081526040808320938352929052205490565b6000546001600160a01b0316331461134d5760405162461bcd60e51b8152600401610bac90614091565b6019805462ff0000198116620100009182900460ff1615909102179055565b6000546001600160a01b031633146113965760405162461bcd60e51b8152600401610bac90614091565b6013546001600160a01b03166113fc5760405162461bcd60e51b815260206004820152602560248201527f416476616e6365644f4e46543732313a2042656e6566696369617279206e6f74604482015264207365742160d81b6064820152608401610bac565b60135460405147916001600160a01b03169082156108fc029083906000818181858888f1935050505061142e57600080fd5b50565b61ffff83166000908152600160205260408120805482919061145290614491565b80601f016020809104026020016040519081016040528092919081815260200182805461147e90614491565b80156114cb5780601f106114a0576101008083540402835291602001916114cb565b820191906000526020600020905b8154815290600101906020018083116114ae57829003601f168201915b5050505050905083836040516114e2929190613e02565b60405180910390208180519060200120149150509392505050565b6000546001600160a01b031633146115275760405162461bcd60e51b8152600401610bac90614091565b601255565b610ecd83838360405180602001604052806000815250611a58565b6000546001600160a01b031633146115715760405162461bcd60e51b8152600401610bac90614091565b6040516342d65a8d60e01b81526001600160a01b037f00000000000000000000000066a71dcef29a0ffbdbe3c6a460a3b5bc225cd67516906342d65a8d906115c1908690869086906004016141fc565b600060405180830381600087803b1580156115db57600080fd5b505af11580156115ef573d6000803e3d6000fd5b50505050505050565b6000611603600b5490565b82106116665760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b6064820152608401610bac565b600b828154811061168757634e487b7160e01b600052603260045260246000fd5b90600052602060002001549050919050565b6000546001600160a01b031633146116c35760405162461bcd60e51b8152600401610bac90614091565b80516116d690601790602084019061348a565b5050565b6115ef8787878787878761288e565b6000546001600160a01b031633146117135760405162461bcd60e51b8152600401610bac90614091565b80516116d690601690602084019061348a565b6000818152600560205260408120546001600160a01b031680610be45760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b6064820152608401610bac565b3330146117ec5760405162461bcd60e51b815260206004820181905260248201527f4c7a52656365697665723a2063616c6c6572206d757374206265204c7a4170706044820152606401610bac565b610bc1848484846129e5565b61ffff8116600090815260016020526040902080546060919061181a90614491565b80601f016020809104026020016040519081016040528092919081815260200182805461184690614491565b80156118935780601f1061186857610100808354040283529160200191611893565b820191906000526020600020905b81548152906001019060200180831161187657829003601f168201915b50505050509050919050565b60006001600160a01b03821661190a5760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b6064820152608401610bac565b506001600160a01b031660009081526006602052604090205490565b6000546001600160a01b031633146119505760405162461bcd60e51b8152600401610bac90614091565b61195a6000612a80565b565b6000546001600160a01b031633146119865760405162461bcd60e51b8152600401610bac90614091565b601455565b6000546001600160a01b031633146119b55760405162461bcd60e51b8152600401610bac90614091565b6019805461ff001981166101009182900460ff1615909102179055565b6000546001600160a01b031633146119fc5760405162461bcd60e51b8152600401610bac90614091565b600e55565b6000546001600160a01b03163314611a2b5760405162461bcd60e51b8152600401610bac90614091565b80516116d690601590602084019061348a565b606060048054610bf990614491565b6116d6338383612ad0565b611a6233836124a6565b611a7e5760405162461bcd60e51b8152600401610bac9061410d565b610bc184848484612b9f565b60195460ff610100909104161515600114611ab75760405162461bcd60e51b8152600401610bac90613f3e565b82611ad45760405162461bcd60e51b8152600401610bac90613fda565b601154831115611af65760405162461bcd60e51b8152600401610bac90614020565b60105483600f54611b079190614403565b1115611b255760405162461bcd60e51b8152600401610bac906140c6565b34600e5484611b34919061442f565b1115611b525760405162461bcd60e51b8152600401610bac9061415e565b60115433600090815260186020526040902054611b70908590614403565b1115611bd65760405162461bcd60e51b815260206004820152602f60248201527f416476616e6365644f4e46543732313a20596f7520657863656564656420796f60448201526e3ab9103a37b5b2b7103634b6b4ba1760891b6064820152608401610bac565b6000611c4d838380806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250506014546040516bffffffffffffffffffffffff193360601b166020820152909250603401905060405160208183030381529060405280519060200120612bd2565b9050600181151514611caf5760405162461bcd60e51b815260206004820152602560248201527f416476616e6365644f4e46543732313a20496e76616c6964204d65726b6c6520604482015264283937b7b360d91b6064820152608401610bac565b3360009081526018602052604081208054869290611cce908490614403565b9091555050600f5460005b85811015611d0057611cee3361126c846144cc565b80611cf8816144cc565b915050611cd9565b50600f5550505050565b6000818152600560205260409020546060906001600160a01b0316611d895760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b6064820152608401610bac565b60195462010000900460ff16611da6576017805461181a90614491565b611dae612be8565b611db783612bf7565b604051602001611dc8929190613e9d565b6040516020818303038152906040529050919050565b6000546001600160a01b03163314611e085760405162461bcd60e51b8152600401610bac90614091565b6040516332fb62e760e21b81526001600160a01b037f00000000000000000000000066a71dcef29a0ffbdbe3c6a460a3b5bc225cd675169063cbed8b9c90611e5c908890889088908890889060040161437e565b600060405180830381600087803b158015611e7657600080fd5b505af1158015611e8a573d6000803e3d6000fd5b505050505050505050565b61ffff85166000908152600260205260408082209051611eb6908790613e12565b90815260408051602092819003830190206001600160401b03871660009081529252902054905080611f2a5760405162461bcd60e51b815260206004820152601d60248201527f4c7a52656365697665723a206e6f2073746f726564206d6573736167650000006044820152606401610bac565b808383604051611f3b929190613e02565b604051809103902014611f905760405162461bcd60e51b815260206004820152601b60248201527f4c7a52656365697665723a20696e76616c6964207061796c6f616400000000006044820152606401610bac565b61ffff86166000908152600260205260408082209051611fb1908890613e12565b9081526040805191829003602090810183206001600160401b038916600090815291522091909155633356ae4560e11b815230906366ad5c8a90612001908990899089908990899060040161421a565b600060405180830381600087803b15801561201b57600080fd5b505af115801561202f573d6000803e3d6000fd5b50505050505050505050565b6015805461204890614491565b80601f016020809104026020016040519081016040528092919081815260200182805461207490614491565b80156120c15780601f10612096576101008083540402835291602001916120c1565b820191906000526020600020905b8154815290600101906020018083116120a457829003601f168201915b505050505081565b6000546001600160a01b031633146120f35760405162461bcd60e51b8152600401610bac90614091565b61ffff8316600090815260016020526040902061211190838361350e565b507ffa41487ad5d6728f0b19276fa1eddc16558578f5109fc39d2dc33c3230470dab838383604051612145939291906141fc565b60405180910390a1505050565b6000546001600160a01b0316331461217c5760405162461bcd60e51b8152600401610bac90614091565b6001600160a01b0381166121e15760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610bac565b61142e81612a80565b6040516304b2b47b60e11b81523060048201526060907f00000000000000000000000066a71dcef29a0ffbdbe3c6a460a3b5bc225cd6756001600160a01b03169063f5ecbdbc90829063096568f69060240160206040518083038186803b15801561225457600080fd5b505afa158015612268573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061228c91906139cb565b6040516001600160e01b031960e084901b16815261ffff918216600482015290871660248201523060448201526064810185905260840160006040518083038186803b1580156122db57600080fd5b505afa1580156122ef573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261231791908101906138f4565b90505b949350505050565b604051633356ae4560e11b815230906366ad5c8a9061234b908790879087908790600401614259565b600060405180830381600087803b15801561236557600080fd5b505af1925050508015612376575060015b610bc1578080519060200120600260008661ffff1661ffff168152602001908152602001600020846040516123ab9190613e12565b9081526040805191829003602090810183206001600160401b0387166000908152915220919091557fe6f254030bcb01ffd20558175c13fcaed6d1520be7becee4c961b65f79243b0d90612406908690869086908690614259565b60405180910390a1610bc1565b60006001600160e01b0319821663780e9d6360e01b1480610be45750610be482612d10565b600081815260076020526040902080546001600160a01b0319166001600160a01b038416908117909155819061246d82611726565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000818152600560205260408120546001600160a01b031661251f5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610bac565b600061252a83611726565b9050806001600160a01b0316846001600160a01b031614806125655750836001600160a01b031661255a84610d27565b6001600160a01b0316145b8061231a57506001600160a01b0380821660009081526008602090815260408083209388168352929052205460ff1661231a565b826001600160a01b03166125ac82611726565b6001600160a01b0316146126105760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b6064820152608401610bac565b6001600160a01b0382166126725760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610bac565b61267d838383612d50565b612688600082612438565b6001600160a01b03831660009081526006602052604081208054600192906126b190849061444e565b90915550506001600160a01b03821660009081526006602052604081208054600192906126df908490614403565b909155505060008181526005602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b6001600160a01b0382166127965760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610bac565b6000818152600560205260409020546001600160a01b0316156127fb5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610bac565b61280760008383612d50565b6001600160a01b0382166000908152600660205260408120805460019290612830908490614403565b909155505060008181526005602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b61289a87878787612e08565b600085856040516020016128af929190613f1c565b60405160208183030381529060405290506128cd8782868686612f0a565b604051630f428ae960e31b815261ffff881660048201523060248201526000907f00000000000000000000000066a71dcef29a0ffbdbe3c6a460a3b5bc225cd6756001600160a01b031690637a1457489060440160206040518083038186803b15801561293957600080fd5b505afa15801561294d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906129719190613d91565b9050866040516129819190613e12565b604080519182900382208883526001600160401b03841660208401529161ffff8b16916001600160a01b038d16917f024797cc77ce15dc717112d54fb1df125fdfd8c81344fb046c5e074427ce1543910160405180910390a4505050505050505050565b600080828060200190518101906129fc9190613926565b60148201519193509150612a11878284613016565b806001600160a01b031686604051612a299190613e12565b604080519182900382208583526001600160401b03891660208401529161ffff8b16917f64e10c37f404d128982dce114f5d233c14c5c7f6d8db93099e3d99dacb9e27ba910160405180910390a450505050505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b816001600160a01b0316836001600160a01b03161415612b325760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610bac565b6001600160a01b03838116600081815260086020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b612baa848484612599565b612bb684848484613020565b610bc15760405162461bcd60e51b8152600401610bac90613f88565b600082612bdf858461312a565b14949350505050565b606060168054610bf990614491565b606081612c1b5750506040805180820190915260018152600360fc1b602082015290565b8160005b8115612c455780612c2f816144cc565b9150612c3e9050600a8361441b565b9150612c1f565b6000816001600160401b03811115612c6d57634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015612c97576020820181803683370190505b5090505b841561231a57612cac60018361444e565b9150612cb9600a866144e7565b612cc4906030614403565b60f81b818381518110612ce757634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350612d09600a8661441b565b9450612c9b565b60006001600160e01b031982166380ac58cd60e01b1480612d4157506001600160e01b03198216635b5e139f60e01b145b80610be45750610be4826131ac565b6001600160a01b038316612dab57612da681600b80546000838152600c60205260408120829055600182018355919091527f0175b7a638427703f0dbe7bb9bbf987a2551717b34e79f33b5b1008d1fa01db90155565b612dce565b816001600160a01b0316836001600160a01b031614612dce57612dce83826131e1565b6001600160a01b038216612de557610ecd8161327e565b826001600160a01b0316826001600160a01b031614610ecd57610ecd8282613357565b612e1133610fdb565b612e835760405162461bcd60e51b815260206004820152603860248201527f4f4e4654373231456e756d657261626c653a2073656e642063616c6c6572206960448201527f73206e6f74206f776e6572206e6f7220617070726f76656400000000000000006064820152608401610bac565b836001600160a01b0316612e9682611726565b6001600160a01b031614612f015760405162461bcd60e51b815260206004820152602c60248201527f4f4e4654373231456e756d657261626c653a2073656e642066726f6d20696e6360448201526b37b93932b1ba1037bbb732b960a11b6064820152608401610bac565b610bc18161339b565b61ffff851660009081526001602052604090208054612f2890614491565b15159050612f935760405162461bcd60e51b815260206004820152603260248201527f4c7a53656e643a2064657374696e6174696f6e20636861696e206973206e6f746044820152711030903a393ab9ba32b21039b7bab931b29760711b6064820152608401610bac565b61ffff851660009081526001602052604090819020905162c5803160e81b81526001600160a01b037f00000000000000000000000066a71dcef29a0ffbdbe3c6a460a3b5bc225cd675169163c5803100913491612ffd918a91908a908a908a908a906004016142a2565b6000604051808303818588803b15801561201b57600080fd5b610ecd8282613442565b60006001600160a01b0384163b1561312257604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290613064903390899088908890600401613ecc565b602060405180830381600087803b15801561307e57600080fd5b505af19250505080156130ae575060408051601f3d908101601f191682019092526130ab918101906138d8565b60015b613108573d8080156130dc576040519150601f19603f3d011682016040523d82523d6000602084013e6130e1565b606091505b5080516131005760405162461bcd60e51b8152600401610bac90613f88565b805181602001fd5b6001600160e01b031916630a85bd0160e11b14905061231a565b50600161231a565b600081815b84518110156131a457600085828151811061315a57634e487b7160e01b600052603260045260246000fd5b602002602001015190508083116131805760008381526020829052604090209250613191565b600081815260208490526040902092505b508061319c816144cc565b91505061312f565b509392505050565b60006001600160e01b03198216637bb0080b60e01b1480610be457506301ffc9a760e01b6001600160e01b0319831614610be4565b600060016131ee8461189f565b6131f8919061444e565b6000838152600a602052604090205490915080821461324b576001600160a01b03841660009081526009602090815260408083208584528252808320548484528184208190558352600a90915290208190555b506000918252600a602090815260408084208490556001600160a01b039094168352600981528383209183525290812055565b600b546000906132909060019061444e565b6000838152600c6020526040812054600b80549394509092849081106132c657634e487b7160e01b600052603260045260246000fd5b9060005260206000200154905080600b83815481106132f557634e487b7160e01b600052603260045260246000fd5b6000918252602080832090910192909255828152600c9091526040808220849055858252812055600b80548061333b57634e487b7160e01b600052603160045260246000fd5b6001900381819060005260206000200160009055905550505050565b60006133628361189f565b6001600160a01b0390931660009081526009602090815260408083208684528252808320859055938252600a9052919091209190915550565b60006133a682611726565b90506133b481600084612d50565b6133bf600083612438565b6001600160a01b03811660009081526006602052604081208054600192906133e890849061444e565b909155505060008281526005602052604080822080546001600160a01b0319169055518391906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b6116d68282604051806020016040528060008152506134618383612740565b61346e6000848484613020565b610ecd5760405162461bcd60e51b8152600401610bac90613f88565b82805461349690614491565b90600052602060002090601f0160209004810192826134b857600085556134fe565b82601f106134d157805160ff19168380011785556134fe565b828001600101855582156134fe579182015b828111156134fe5782518255916020019190600101906134e3565b5061350a929150613582565b5090565b82805461351a90614491565b90600052602060002090601f01602090048101928261353c57600085556134fe565b82601f106135555782800160ff198235161785556134fe565b828001600101855582156134fe579182015b828111156134fe578235825591602001919060010190613567565b5b8082111561350a5760008155600101613583565b60006135aa6135a5846143dc565b6143ac565b90508281528383830111156135be57600080fd5b828260208301376000602084830101529392505050565b803580151581146135e557600080fd5b919050565b60008083601f8401126135fb578182fd5b5081356001600160401b03811115613611578182fd5b60208301915083602082850101111561362957600080fd5b9250929050565b600082601f830112613640578081fd5b61364f83833560208501613597565b9392505050565b600082601f830112613666578081fd5b81516136746135a5826143dc565b818152846020838601011115613688578283fd5b61231a826020830160208701614465565b6000602082840312156136aa578081fd5b813561364f8161453d565b600080604083850312156136c7578081fd5b82356136d28161453d565b915060208301356136e28161453d565b809150509250929050565b600080600060608486031215613701578081fd5b833561370c8161453d565b9250602084013561371c8161453d565b929592945050506040919091013590565b60008060008060808587031215613742578081fd5b843561374d8161453d565b9350602085013561375d8161453d565b92506040850135915060608501356001600160401b0381111561377e578182fd5b61378a87828801613630565b91505092959194509250565b600080604083850312156137a8578182fd5b82356137b38161453d565b915061110f602084016135d5565b600080600080600080600060e0888a0312156137db578485fd5b87356137e68161453d565b965060208801356137f681614568565b955060408801356001600160401b0380821115613811578687fd5b61381d8b838c01613630565b965060608a0135955060808a013591506138368261453d565b90935060a0890135906138488261453d565b90925060c0890135908082111561385d578283fd5b5061386a8a828b01613630565b91505092959891949750929550565b6000806040838503121561388b578182fd5b82356138968161453d565b946020939093013593505050565b6000602082840312156138b5578081fd5b5035919050565b6000602082840312156138cd578081fd5b813561364f81614552565b6000602082840312156138e9578081fd5b815161364f81614552565b600060208284031215613905578081fd5b81516001600160401b0381111561391a578182fd5b61231a84828501613656565b60008060408385031215613938578182fd5b82516001600160401b0381111561394d578283fd5b61395985828601613656565b925050602083015190509250929050565b60006020828403121561397b578081fd5b81356001600160401b03811115613990578182fd5b8201601f810184136139a0578182fd5b61231a84823560208401613597565b6000602082840312156139c0578081fd5b813561364f81614568565b6000602082840312156139dc578081fd5b815161364f81614568565b6000806000604084860312156139fb578081fd5b8335613a0681614568565b925060208401356001600160401b03811115613a20578182fd5b613a2c868287016135ea565b9497909650939450505050565b600080600060608486031215613a4d578081fd5b8335613a5881614568565b925060208401356001600160401b03811115613a72578182fd5b613a7e86828701613630565b925050604084013590509250925092565b600080600080600060a08688031215613aa6578283fd5b8535613ab181614568565b945060208601356001600160401b0380821115613acc578485fd5b613ad889838a01613630565b955060408801359450613aed606089016135d5565b93506080880135915080821115613b02578283fd5b50613b0f88828901613630565b9150509295509295909350565b600080600080600060808688031215613b33578283fd5b8535613b3e81614568565b945060208601356001600160401b0380821115613b59578485fd5b613b6589838a01613630565b955060408801359150613b7782614578565b90935060608701359080821115613b8c578283fd5b50613b99888289016135ea565b969995985093965092949392505050565b60008060008060808587031215613bbf578182fd5b8435613bca81614568565b935060208501356001600160401b0380821115613be5578384fd5b613bf188838901613630565b945060408701359150613c0382614578565b90925060608601359080821115613c18578283fd5b5061378a87828801613630565b60008060008060808587031215613c3a578182fd5b8435613c4581614568565b93506020850135613c5581614568565b92506040850135613c658161453d565b9396929550929360600135925050565b600080600080600060808688031215613c8c578283fd5b8535613c9781614568565b94506020860135613ca781614568565b93506040860135925060608601356001600160401b03811115613cc8578182fd5b613b99888289016135ea565b600080600060408486031215613ce8578081fd5b8335925060208401356001600160401b0380821115613d05578283fd5b818601915086601f830112613d18578283fd5b813581811115613d26578384fd5b8760208260051b8501011115613d3a578384fd5b6020830194508093505050509250925092565b60008060408385031215613d5f578182fd5b50508035926020909101359150565b60008060408385031215613d80578182fd5b505080516020909101519092909150565b600060208284031215613da2578081fd5b815161364f81614578565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b60008151808452613dee816020860160208601614465565b601f01601f19169290920160200192915050565b8183823760009101908152919050565b60008251613e24818460208701614465565b9190910192915050565b6000808354613e3c81614491565b60018281168015613e545760018114613e6557613e91565b60ff19841687528287019450613e91565b8786526020808720875b85811015613e885781548a820152908401908201613e6f565b50505082870194505b50929695505050505050565b60008351613eaf818460208801614465565b835190830190613ec3818360208801614465565b01949350505050565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090613eff90830184613dd6565b9695505050505050565b60208152600061364f6020830184613dd6565b604081526000613f2f6040830185613dd6565b90508260208301529392505050565b6020808252602a908201527f416476616e6365644f4e46543732313a2053616c6520686173206e6f742073746040820152696172746564207965742160b01b606082015260800190565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b60208082526026908201527f416476616e6365644f4e46543732313a2043616e6e6f74206d696e74203020746040820152656f6b656e732160d01b606082015260800190565b6020808252604b908201527f416476616e6365644f4e46543732313a20596f752063616e6e6f74206d696e7460408201527f206d6f7265207468616e206d6178546f6b656e735065724d696e7420746f6b6560608201526a6e73206174206f6e63652160a81b608082015260a00190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526027908201527f416476616e6365644f4e46543732313a206d6178206d696e74206c696d6974206040820152661c995858da195960ca1b606082015260800190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b6020808252602a908201527f416476616e6365644f4e46543732313a20496e636f6e73697374656e7420616d6040820152696f756e742073656e742160b01b606082015260800190565b61ffff861681526001600160a01b038516602082015260a0604082018190526000906141d690830186613dd6565b841515606084015282810360808401526141f08185613dd6565b98975050505050505050565b61ffff84168152604060208201526000612317604083018486613dad565b61ffff861681526080602082015260006142376080830187613dd6565b6001600160401b038616604084015282810360608401526141f0818587613dad565b61ffff851681526080602082015260006142766080830186613dd6565b6001600160401b038516604084015282810360608401526142978185613dd6565b979650505050505050565b61ffff871681526000602060c0818401528188546142bf81614491565b8060c087015260e06001808416600081146142e157600181146142f657614321565b60ff1985168984015261010089019550614321565b8d8852868820885b858110156143195781548b82018601529083019088016142fe565b8a0184019650505b505050505083810360408501526143388189613dd6565b91505061435060608401876001600160a01b03169052565b6001600160a01b038516608084015282810360a08401526143718185613dd6565b9998505050505050505050565b600061ffff808816835280871660208401525084604083015260806060830152614297608083018486613dad565b604051601f8201601f191681016001600160401b03811182821017156143d4576143d4614527565b604052919050565b60006001600160401b038211156143f5576143f5614527565b50601f01601f191660200190565b60008219821115614416576144166144fb565b500190565b60008261442a5761442a614511565b500490565b6000816000190483118215151615614449576144496144fb565b500290565b600082821015614460576144606144fb565b500390565b60005b83811015614480578181015183820152602001614468565b83811115610bc15750506000910152565b600181811c908216806144a557607f821691505b602082108114156144c657634e487b7160e01b600052602260045260246000fd5b50919050565b60006000198214156144e0576144e06144fb565b5060010190565b6000826144f6576144f6614511565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b038116811461142e57600080fd5b6001600160e01b03198116811461142e57600080fd5b61ffff8116811461142e57600080fd5b6001600160401b038116811461142e57600080fdfea2646970667358221220a2b60a2b525249c771abe08b5e195766b515493550cc2f0b4885df2ce9e9689264736f6c63430008040033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000014000000000000000000000000066a71dcef29a0ffbdbe3c6a460a3b5bc225cd675000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001f40000000000000000000000000000000000000000000000000000000000000005000000000000000000000000000000000000000000000000000000000000018000000000000000000000000000000000000000000000000000000000000001c0000000000000000000000000000000000000000000000000000000000000000b477265677320284554482900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000044752454700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000b455448546f6b656e555249000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005068747470733a2f2f676174657761792e70696e6174612e636c6f75642f697066732f516d537376414777626934513979414342435a316a4638434334354c6b675a5a7a644a6a69515632666b5a6d546a00000000000000000000000000000000
-----Decoded View---------------
Arg [0] : _name (string): Gregs (ETH)
Arg [1] : _symbol (string): GREG
Arg [2] : _layerZeroEndpoint (address): 0x66A71Dcef29A0fFBDBE3c6a460a3B5BC225Cd675
Arg [3] : _startMintId (uint256): 0
Arg [4] : _endMintId (uint256): 500
Arg [5] : _maxTokensPerMint (uint256): 5
Arg [6] : _baseTokenURI (string): ETHTokenURI
Arg [7] : _hiddenURI (string): https://gateway.pinata.cloud/ipfs/QmSsvAGwbi4Q9yACBCZ1jF8CC45LkgZZzdJjiQV2fkZmTj
-----Encoded View---------------
18 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000100
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000140
Arg [2] : 00000000000000000000000066a71dcef29a0ffbdbe3c6a460a3b5bc225cd675
Arg [3] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [4] : 00000000000000000000000000000000000000000000000000000000000001f4
Arg [5] : 0000000000000000000000000000000000000000000000000000000000000005
Arg [6] : 0000000000000000000000000000000000000000000000000000000000000180
Arg [7] : 00000000000000000000000000000000000000000000000000000000000001c0
Arg [8] : 000000000000000000000000000000000000000000000000000000000000000b
Arg [9] : 4772656773202845544829000000000000000000000000000000000000000000
Arg [10] : 0000000000000000000000000000000000000000000000000000000000000004
Arg [11] : 4752454700000000000000000000000000000000000000000000000000000000
Arg [12] : 000000000000000000000000000000000000000000000000000000000000000b
Arg [13] : 455448546f6b656e555249000000000000000000000000000000000000000000
Arg [14] : 0000000000000000000000000000000000000000000000000000000000000050
Arg [15] : 68747470733a2f2f676174657761792e70696e6174612e636c6f75642f697066
Arg [16] : 732f516d537376414777626934513979414342435a316a4638434334354c6b67
Arg [17] : 5a5a7a644a6a69515632666b5a6d546a00000000000000000000000000000000
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.