ERC-721
Overview
Max Total Supply
972 OMNICAT
Holders
206
Market
Volume (24H)
N/A
Min Price (24H)
N/A
Max Price (24H)
N/A
Other Info
Token Contract
Balance
5 OMNICATLoading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
Omnicats
Compiler Version
v0.8.10+commit.fc410830
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
pragma solidity ^0.8.0; import '../LayerZero/LayerZeroERC721.sol'; contract Omnicats is LayerZeroERC721 { constructor( string memory _name, string memory _token, uint256 _nextTokenId, uint256 _maxMint, uint256 _mintPerWallet, string memory baseURI_, address _layerZeroEndpoint, uint256 _startTimestamp ) LayerZeroERC721( _name, _token, _nextTokenId, _maxMint, _mintPerWallet, baseURI_, _layerZeroEndpoint, _startTimestamp ) {} function reserveMints(uint256 quantity) public onlyOwner { _safeMint(msg.sender, quantity); } }
pragma solidity ^0.8.0; import '@openzeppelin/contracts/access/Ownable.sol'; import '@openzeppelin/contracts/security/ReentrancyGuard.sol'; import '../LayerZero/NonblockingReceiver.sol'; import 'erc721a/contracts/ERC721A.sol'; contract LayerZeroERC721 is Ownable, ERC721A, NonblockingReceiver { address public _owner; string private baseURI; uint256 startId = 0; uint256 public MAX_MINT; uint256 public mintPerWallet; mapping(address => uint256) public giveawayAddresses; uint256 public reservedAmount = 0; uint256 public startTimestamp; uint256 gasForDestinationLzReceive = 350000; constructor( string memory _name, string memory _symbol, uint256 _nextTokenId, uint256 _maxMint, uint256 _mintPerWallet, string memory baseURI_, address _layerZeroEndpoint, uint256 _startTimestamp ) ERC721A(_name, _symbol) { _owner = msg.sender; endpoint = ILayerZeroEndpoint(_layerZeroEndpoint); baseURI = baseURI_; MAX_MINT = _maxMint; mintPerWallet = _mintPerWallet; //Overrides currentIndex set from ERC721A constructor _currentIndex = _nextTokenId; startId = _nextTokenId; startTimestamp = _startTimestamp; } function _startTokenId() internal view override returns (uint256) { return startId; } // mint function // you can choose to mint 1 or 2 // mint is free, but payments are accepted function mint(uint8 numTokens) external payable { require(block.timestamp >= startTimestamp, 'Not live'); require(balanceOf(msg.sender) + numTokens <= mintPerWallet, 'Exceeds max NFTs per wallet'); require(_currentIndex + numTokens + reservedAmount <= MAX_MINT, 'Mint exceeds supply'); _safeMint(msg.sender, numTokens); } function mintGiveaway() external { require(block.timestamp >= startTimestamp, 'Not live'); uint256 count = giveawayAddresses[msg.sender]; require(count > 0, 'You dont have any giveaway mints'); require(_currentIndex + count <= MAX_MINT, 'Mint exceeds supply'); delete giveawayAddresses[msg.sender]; reservedAmount -= count; _safeMint(msg.sender, count); } function setGiveawayAddresses(address[] memory addresses, uint256[] memory counts) external onlyOwner { require(addresses.length == counts.length, 'addresses does not match numSlots length'); for (uint256 i = 0; i < addresses.length; i++) { reservedAmount += counts[i]; giveawayAddresses[addresses[i]] = counts[i]; } } // This function transfers the nft from your address on the // source chain to the same address on the destination chain function traverseChains(uint16 _chainId, uint256 tokenId) public payable { require(msg.sender == ownerOf(tokenId), 'You must own the token to traverse'); require(trustedRemoteLookup[_chainId].length > 0, 'This chain is currently unavailable for travel'); // burn NFT, eliminating it from circulation on src chain _burn(tokenId); // abi.encode() the payload with the values to send bytes memory payload = abi.encode(msg.sender, tokenId); // encode adapterParams to specify more gas for the destination uint16 version = 1; bytes memory adapterParams = abi.encodePacked(version, gasForDestinationLzReceive); // get the fees we need to pay to LayerZero + Relayer to cover message delivery // you will be refunded for extra gas paid (uint256 messageFee, ) = endpoint.estimateFees(_chainId, address(this), payload, false, adapterParams); require(msg.value >= messageFee, 'msg.value not enough to cover messageFee. Send gas for message fees'); endpoint.send{value: msg.value}( _chainId, // destination chainId trustedRemoteLookup[_chainId], // destination address of nft contract payload, // abi.encoded()'ed bytes payable(msg.sender), // refund address address(0x0), // 'zroPaymentAddress' unused for this adapterParams // txParameters ); } function setBaseURI(string memory URI) external onlyOwner { baseURI = URI; } function setNextTokenId(uint256 _nextTokenId) external onlyOwner { _currentIndex = _nextTokenId; } function setMaxMint(uint256 _MAX_MINT) external onlyOwner { MAX_MINT = _MAX_MINT; } function estimateFees(uint16 _chainId, uint256 tokenId) public view returns (uint256) { uint16 version = 1; (uint256 messageFee, ) = endpoint.estimateFees( _chainId, address(this), abi.encode(msg.sender, tokenId), false, abi.encodePacked(version, gasForDestinationLzReceive) ); return messageFee; } function donate() external payable { // thank you } // This allows the devs to receive kind donations function withdraw(uint256 amt) external onlyOwner { (bool sent, ) = payable(_owner).call{value: amt}(''); require(sent, 'Failed to withdraw Ether'); } // just in case this fixed variable limits us from future integrations function setGasForDestinationLzReceive(uint256 newVal) external onlyOwner { gasForDestinationLzReceive = newVal; } function maxMint() external view returns (uint256) { return MAX_MINT - startId; } // ------------------ // Internal Functions // ------------------ function _LzReceive( uint16 _srcChainId, bytes memory _srcAddress, uint64 _nonce, bytes memory _payload ) internal override { // decode (address toAddr, uint256 tokenId) = abi.decode(_payload, (address, uint256)); // mint the tokens back into existence on destination chain _safeMint(toAddr, tokenId); } function _baseURI() internal view override returns (string memory) { return baseURI; } }
// 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 // 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; } }
pragma solidity ^0.8.6; import '@openzeppelin/contracts/access/Ownable.sol'; import './ILayerZeroReceiver.sol'; import './ILayerZeroEndpoint.sol'; abstract contract NonblockingReceiver is Ownable, ILayerZeroReceiver { ILayerZeroEndpoint internal endpoint; struct FailedMessages { uint256 payloadLength; bytes32 payloadHash; } mapping(uint16 => mapping(bytes => mapping(uint256 => FailedMessages))) public failedMessages; mapping(uint16 => bytes) public trustedRemoteLookup; event MessageFailed(uint16 _srcChainId, bytes _srcAddress, uint64 _nonce, bytes _payload); function lzReceive( uint16 _srcChainId, bytes memory _srcAddress, uint64 _nonce, bytes memory _payload ) external override { require(msg.sender == address(endpoint)); // boilerplate! lzReceive must be called by the endpoint for security require( _srcAddress.length == trustedRemoteLookup[_srcChainId].length && keccak256(_srcAddress) == keccak256(trustedRemoteLookup[_srcChainId]), 'NonblockingReceiver: invalid source sending contract' ); // try-catch all errors/exceptions // having failed messages does not block messages passing try this.onLzReceive(_srcChainId, _srcAddress, _nonce, _payload) { // do nothing } catch { // error / exception failedMessages[_srcChainId][_srcAddress][_nonce] = FailedMessages(_payload.length, keccak256(_payload)); emit MessageFailed(_srcChainId, _srcAddress, _nonce, _payload); } } function onLzReceive( uint16 _srcChainId, bytes memory _srcAddress, uint64 _nonce, bytes memory _payload ) public { // only internal transaction require(msg.sender == address(this), 'NonblockingReceiver: caller must be Bridge.'); // handle incoming message _LzReceive(_srcChainId, _srcAddress, _nonce, _payload); } // abstract function function _LzReceive( uint16 _srcChainId, bytes memory _srcAddress, uint64 _nonce, bytes memory _payload ) internal virtual; function _lzSend( uint16 _dstChainId, bytes memory _payload, address payable _refundAddress, address _zroPaymentAddress, bytes memory _txParam ) internal { endpoint.send{value: msg.value}( _dstChainId, trustedRemoteLookup[_dstChainId], _payload, _refundAddress, _zroPaymentAddress, _txParam ); } function retryMessage( uint16 _srcChainId, bytes memory _srcAddress, uint64 _nonce, bytes calldata _payload ) external payable { // assert there is message to retry FailedMessages storage failedMsg = failedMessages[_srcChainId][_srcAddress][_nonce]; require(failedMsg.payloadHash != bytes32(0), 'NonblockingReceiver: no stored message'); require( _payload.length == failedMsg.payloadLength && keccak256(_payload) == failedMsg.payloadHash, 'LayerZero: invalid payload' ); // clear the stored message failedMsg.payloadLength = 0; failedMsg.payloadHash = bytes32(0); // execute the message. revert if it fails again this.onLzReceive(_srcChainId, _srcAddress, _nonce, _payload); } function setTrustedRemote(uint16 _chainId, bytes calldata _trustedRemote) external onlyOwner { trustedRemoteLookup[_chainId] = _trustedRemote; } }
// SPDX-License-Identifier: MIT // Creator: Chiru Labs pragma solidity ^0.8.4; import '@openzeppelin/contracts/token/ERC721/IERC721.sol'; import '@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol'; import '@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol'; import '@openzeppelin/contracts/utils/Address.sol'; import '@openzeppelin/contracts/utils/Context.sol'; import '@openzeppelin/contracts/utils/Strings.sol'; import '@openzeppelin/contracts/utils/introspection/ERC165.sol'; error ApprovalCallerNotOwnerNorApproved(); error ApprovalQueryForNonexistentToken(); error ApproveToCaller(); error ApprovalToCurrentOwner(); error BalanceQueryForZeroAddress(); error MintToZeroAddress(); error MintZeroQuantity(); error OwnerQueryForNonexistentToken(); error TransferCallerNotOwnerNorApproved(); error TransferFromIncorrectOwner(); error TransferToNonERC721ReceiverImplementer(); error TransferToZeroAddress(); error URIQueryForNonexistentToken(); /** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension. Built to optimize for lower gas during batch mints. * * Assumes serials are sequentially minted starting at _startTokenId() (defaults to 0, e.g. 0, 1, 2, 3..). * * Assumes that an owner cannot have more than 2**64 - 1 (max value of uint64) of supply. * * Assumes that the maximum token id cannot exceed 2**256 - 1 (max value of uint256). */ contract ERC721A is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Compiler will pack this into a single 256bit word. struct TokenOwnership { // The address of the owner. address addr; // Keeps track of the start time of ownership with minimal overhead for tokenomics. uint64 startTimestamp; // Whether the token has been burned. bool burned; } // Compiler will pack this into a single 256bit word. struct AddressData { // Realistically, 2**64-1 is more than enough. uint64 balance; // Keeps track of mint count with minimal overhead for tokenomics. uint64 numberMinted; // Keeps track of burn count with minimal overhead for tokenomics. uint64 numberBurned; // For miscellaneous variable(s) pertaining to the address // (e.g. number of whitelist mint slots used). // If there are multiple variables, please pack them into a uint64. uint64 aux; } // The tokenId of the next token to be minted. uint256 internal _currentIndex; // The number of tokens burned. uint256 internal _burnCounter; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to ownership details // An empty struct value does not necessarily mean the token is unowned. See _ownershipOf implementation for details. mapping(uint256 => TokenOwnership) internal _ownerships; // Mapping owner address to address data mapping(address => AddressData) private _addressData; // 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; constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; _currentIndex = _startTokenId(); } /** * To change the starting tokenId, please override this function. */ function _startTokenId() internal view virtual returns (uint256) { return 0; } /** * @dev Burned tokens are calculated here, use _totalMinted() if you want to count just minted tokens. */ function totalSupply() public view returns (uint256) { // Counter underflow is impossible as _burnCounter cannot be incremented // more than _currentIndex - _startTokenId() times unchecked { return _currentIndex - _burnCounter - _startTokenId(); } } /** * Returns the total amount of tokens minted in the contract. */ function _totalMinted() internal view returns (uint256) { // Counter underflow is impossible as _currentIndex does not decrement, // and it is initialized to _startTokenId() unchecked { return _currentIndex - _startTokenId(); } } /** * @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 override returns (uint256) { if (owner == address(0)) revert BalanceQueryForZeroAddress(); return uint256(_addressData[owner].balance); } /** * Returns the number of tokens minted by `owner`. */ function _numberMinted(address owner) internal view returns (uint256) { return uint256(_addressData[owner].numberMinted); } /** * Returns the number of tokens burned by or on behalf of `owner`. */ function _numberBurned(address owner) internal view returns (uint256) { return uint256(_addressData[owner].numberBurned); } /** * Returns the auxillary data for `owner`. (e.g. number of whitelist mint slots used). */ function _getAux(address owner) internal view returns (uint64) { return _addressData[owner].aux; } /** * Sets the auxillary data for `owner`. (e.g. number of whitelist mint slots used). * If there are multiple variables, please pack them into a uint64. */ function _setAux(address owner, uint64 aux) internal { _addressData[owner].aux = aux; } /** * Gas spent here starts off proportional to the maximum mint batch size. * It gradually moves to O(1) as tokens get transferred around in the collection over time. */ function _ownershipOf(uint256 tokenId) internal view returns (TokenOwnership memory) { uint256 curr = tokenId; unchecked { if (_startTokenId() <= curr && curr < _currentIndex) { TokenOwnership memory ownership = _ownerships[curr]; if (!ownership.burned) { if (ownership.addr != address(0)) { return ownership; } // Invariant: // There will always be an ownership that has an address and is not burned // before an ownership that does not have an address and is not burned. // Hence, curr will not underflow. while (true) { curr--; ownership = _ownerships[curr]; if (ownership.addr != address(0)) { return ownership; } } } } } revert OwnerQueryForNonexistentToken(); } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view override returns (address) { return _ownershipOf(tokenId).addr; } /** * @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) { if (!_exists(tokenId)) revert URIQueryForNonexistentToken(); 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 override { address owner = ERC721A.ownerOf(tokenId); if (to == owner) revert ApprovalToCurrentOwner(); if (_msgSender() != owner && !isApprovedForAll(owner, _msgSender())) { revert ApprovalCallerNotOwnerNorApproved(); } _approve(to, tokenId, owner); } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view override returns (address) { if (!_exists(tokenId)) revert ApprovalQueryForNonexistentToken(); return _tokenApprovals[tokenId]; } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { if (operator == _msgSender()) revert ApproveToCaller(); _operatorApprovals[_msgSender()][operator] = approved; emit ApprovalForAll(_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 { _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 { _transfer(from, to, tokenId); if (to.isContract() && !_checkContractOnERC721Received(from, to, tokenId, _data)) { revert TransferToNonERC721ReceiverImplementer(); } } /** * @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`), */ function _exists(uint256 tokenId) internal view returns (bool) { return _startTokenId() <= tokenId && tokenId < _currentIndex && !_ownerships[tokenId].burned; } function _safeMint(address to, uint256 quantity) internal { _safeMint(to, quantity, ''); } /** * @dev Safely mints `quantity` tokens and transfers them to `to`. * * Requirements: * * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called for each safe transfer. * - `quantity` must be greater than 0. * * Emits a {Transfer} event. */ function _safeMint( address to, uint256 quantity, bytes memory _data ) internal { _mint(to, quantity, _data, true); } /** * @dev Mints `quantity` tokens and transfers them to `to`. * * Requirements: * * - `to` cannot be the zero address. * - `quantity` must be greater than 0. * * Emits a {Transfer} event. */ function _mint( address to, uint256 quantity, bytes memory _data, bool safe ) internal { uint256 startTokenId = _currentIndex; if (to == address(0)) revert MintToZeroAddress(); if (quantity == 0) revert MintZeroQuantity(); _beforeTokenTransfers(address(0), to, startTokenId, quantity); // Overflows are incredibly unrealistic. // balance or numberMinted overflow if current value of either + quantity > 1.8e19 (2**64) - 1 // updatedIndex overflows if _currentIndex + quantity > 1.2e77 (2**256) - 1 unchecked { _addressData[to].balance += uint64(quantity); _addressData[to].numberMinted += uint64(quantity); _ownerships[startTokenId].addr = to; _ownerships[startTokenId].startTimestamp = uint64(block.timestamp); uint256 updatedIndex = startTokenId; uint256 end = updatedIndex + quantity; if (safe && to.isContract()) { do { emit Transfer(address(0), to, updatedIndex); if (!_checkContractOnERC721Received(address(0), to, updatedIndex++, _data)) { revert TransferToNonERC721ReceiverImplementer(); } } while (updatedIndex != end); // Reentrancy protection if (_currentIndex != startTokenId) revert(); } else { do { emit Transfer(address(0), to, updatedIndex++); } while (updatedIndex != end); } _currentIndex = updatedIndex; } _afterTokenTransfers(address(0), to, startTokenId, quantity); } /** * @dev Transfers `tokenId` from `from` to `to`. * * 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 ) private { TokenOwnership memory prevOwnership = _ownershipOf(tokenId); if (prevOwnership.addr != from) revert TransferFromIncorrectOwner(); bool isApprovedOrOwner = (_msgSender() == from || isApprovedForAll(from, _msgSender()) || getApproved(tokenId) == _msgSender()); if (!isApprovedOrOwner) revert TransferCallerNotOwnerNorApproved(); if (to == address(0)) revert TransferToZeroAddress(); _beforeTokenTransfers(from, to, tokenId, 1); // Clear approvals from the previous owner _approve(address(0), tokenId, from); // Underflow of the sender's balance is impossible because we check for // ownership above and the recipient's balance can't realistically overflow. // Counter overflow is incredibly unrealistic as tokenId would have to be 2**256. unchecked { _addressData[from].balance -= 1; _addressData[to].balance += 1; TokenOwnership storage currSlot = _ownerships[tokenId]; currSlot.addr = to; currSlot.startTimestamp = uint64(block.timestamp); // If the ownership slot of tokenId+1 is not explicitly set, that means the transfer initiator owns it. // Set the slot of tokenId+1 explicitly in storage to maintain correctness for ownerOf(tokenId+1) calls. uint256 nextTokenId = tokenId + 1; TokenOwnership storage nextSlot = _ownerships[nextTokenId]; if (nextSlot.addr == address(0)) { // This will suffice for checking _exists(nextTokenId), // as a burned slot cannot contain the zero address. if (nextTokenId != _currentIndex) { nextSlot.addr = from; nextSlot.startTimestamp = prevOwnership.startTimestamp; } } } emit Transfer(from, to, tokenId); _afterTokenTransfers(from, to, tokenId, 1); } /** * @dev This is equivalent to _burn(tokenId, false) */ function _burn(uint256 tokenId) internal virtual { _burn(tokenId, false); } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId, bool approvalCheck) internal virtual { TokenOwnership memory prevOwnership = _ownershipOf(tokenId); address from = prevOwnership.addr; if (approvalCheck) { bool isApprovedOrOwner = (_msgSender() == from || isApprovedForAll(from, _msgSender()) || getApproved(tokenId) == _msgSender()); if (!isApprovedOrOwner) revert TransferCallerNotOwnerNorApproved(); } _beforeTokenTransfers(from, address(0), tokenId, 1); // Clear approvals from the previous owner _approve(address(0), tokenId, from); // Underflow of the sender's balance is impossible because we check for // ownership above and the recipient's balance can't realistically overflow. // Counter overflow is incredibly unrealistic as tokenId would have to be 2**256. unchecked { AddressData storage addressData = _addressData[from]; addressData.balance -= 1; addressData.numberBurned += 1; // Keep track of who burned the token, and the timestamp of burning. TokenOwnership storage currSlot = _ownerships[tokenId]; currSlot.addr = from; currSlot.startTimestamp = uint64(block.timestamp); currSlot.burned = true; // If the ownership slot of tokenId+1 is not explicitly set, that means the burn initiator owns it. // Set the slot of tokenId+1 explicitly in storage to maintain correctness for ownerOf(tokenId+1) calls. uint256 nextTokenId = tokenId + 1; TokenOwnership storage nextSlot = _ownerships[nextTokenId]; if (nextSlot.addr == address(0)) { // This will suffice for checking _exists(nextTokenId), // as a burned slot cannot contain the zero address. if (nextTokenId != _currentIndex) { nextSlot.addr = from; nextSlot.startTimestamp = prevOwnership.startTimestamp; } } } emit Transfer(from, address(0), tokenId); _afterTokenTransfers(from, address(0), tokenId, 1); // Overflow not possible, as _burnCounter cannot be exceed _currentIndex times. unchecked { _burnCounter++; } } /** * @dev Approve `to` to operate on `tokenId` * * Emits a {Approval} event. */ function _approve( address to, uint256 tokenId, address owner ) private { _tokenApprovals[tokenId] = to; emit Approval(owner, to, tokenId); } /** * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target 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 _checkContractOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) private returns (bool) { try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) { return retval == IERC721Receiver(to).onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert TransferToNonERC721ReceiverImplementer(); } else { assembly { revert(add(32, reason), mload(reason)) } } } } /** * @dev Hook that is called before a set of serially-ordered token ids are about to be transferred. This includes minting. * And also called before burning one token. * * startTokenId - the first token id to be transferred * quantity - the amount to be transferred * * 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, `tokenId` will be burned by `from`. * - `from` and `to` are never both zero. */ function _beforeTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual {} /** * @dev Hook that is called after a set of serially-ordered token ids have been transferred. This includes * minting. * And also called after one token has been burned. * * startTokenId - the first token id to be transferred * quantity - the amount to be transferred * * Calling conditions: * * - When `from` and `to` are both non-zero, `from`'s `tokenId` has been * transferred to `to`. * - When `from` is zero, `tokenId` has been minted for `to`. * - When `to` is zero, `tokenId` has been burned by `from`. * - `from` and `to` are never both zero. */ function _afterTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual {} }
// 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 pragma solidity >=0.5.0; interface ILayerZeroReceiver { // @notice LayerZero endpoint will invoke this function to deliver the message on the destination // @param _srcChainId - the source endpoint identifier // @param _srcAddress - the source sending contract address from the source chain // @param _nonce - the ordered message nonce // @param _payload - the signed payload is the UA bytes has encoded to be sent function lzReceive(uint16 _srcChainId, bytes calldata _srcAddress, uint64 _nonce, bytes calldata _payload) external; }
// SPDX-License-Identifier: MIT pragma solidity >=0.5.0; import "./ILayerZeroUserApplicationConfig.sol"; interface ILayerZeroEndpoint is ILayerZeroUserApplicationConfig { // @notice send a LayerZero message to the specified address at a LayerZero endpoint. // @param _dstChainId - the destination chain identifier // @param _destination - the address on destination chain (in bytes). address length/format may vary by chains // @param _payload - a custom bytes payload to send to the destination contract // @param _refundAddress - if the source transaction is cheaper than the amount of value passed, refund the additional amount to this address // @param _zroPaymentAddress - the address of the ZRO token holder who would pay for the transaction // @param _adapterParams - parameters for custom functionality. e.g. receive airdropped native gas from the relayer on destination function send(uint16 _dstChainId, bytes calldata _destination, bytes calldata _payload, address payable _refundAddress, address _zroPaymentAddress, bytes calldata _adapterParams) external payable; // @notice used by the messaging library to publish verified payload // @param _srcChainId - the source chain identifier // @param _srcAddress - the source contract (as bytes) at the source chain // @param _dstAddress - the address on destination chain // @param _nonce - the unbound message ordering nonce // @param _gasLimit - the gas limit for external contract execution // @param _payload - verified payload to send to the destination contract function receivePayload(uint16 _srcChainId, bytes calldata _srcAddress, address _dstAddress, uint64 _nonce, uint _gasLimit, bytes calldata _payload) external; // @notice get the inboundNonce of a lzApp from a source chain which could be EVM or non-EVM chain // @param _srcChainId - the source chain identifier // @param _srcAddress - the source chain contract address function getInboundNonce(uint16 _srcChainId, bytes calldata _srcAddress) external view returns (uint64); // @notice get the outboundNonce from this source chain which, consequently, is always an EVM // @param _srcAddress - the source chain contract address function getOutboundNonce(uint16 _dstChainId, address _srcAddress) external view returns (uint64); // @notice gets a quote in source native gas, for the amount that send() requires to pay for message delivery // @param _dstChainId - the destination chain identifier // @param _userApplication - the user app address on this EVM chain // @param _payload - the custom message to send over LayerZero // @param _payInZRO - if false, user app pays the protocol fee in native token // @param _adapterParam - parameters for the adapter service, e.g. send some dust native token to dstChain function estimateFees(uint16 _dstChainId, address _userApplication, bytes calldata _payload, bool _payInZRO, bytes calldata _adapterParam) external view returns (uint nativeFee, uint zroFee); // @notice get this Endpoint's immutable source identifier function getChainId() external view returns (uint16); // @notice the interface to retry failed message on this Endpoint destination // @param _srcChainId - the source chain identifier // @param _srcAddress - the source chain contract address // @param _payload - the payload to be retried function retryPayload(uint16 _srcChainId, bytes calldata _srcAddress, bytes calldata _payload) external; // @notice query if any STORED payload (message blocking) at the endpoint. // @param _srcChainId - the source chain identifier // @param _srcAddress - the source chain contract address function hasStoredPayload(uint16 _srcChainId, bytes calldata _srcAddress) external view returns (bool); // @notice query if the _libraryAddress is valid for sending msgs. // @param _userApplication - the user app address on this EVM chain function getSendLibraryAddress(address _userApplication) external view returns (address); // @notice query if the _libraryAddress is valid for receiving msgs. // @param _userApplication - the user app address on this EVM chain function getReceiveLibraryAddress(address _userApplication) external view returns (address); // @notice query if the non-reentrancy guard for send() is on // @return true if the guard is on. false otherwise function isSendingPayload() external view returns (bool); // @notice query if the non-reentrancy guard for receive() is on // @return true if the guard is on. false otherwise function isReceivingPayload() external view returns (bool); // @notice get the configuration of the LayerZero messaging library of the specified version // @param _version - messaging library version // @param _chainId - the chainId for the pending config change // @param _userApplication - the contract address of the user application // @param _configType - type of configuration. every messaging library has its own convention. function getConfig(uint16 _version, uint16 _chainId, address _userApplication, uint _configType) external view returns (bytes memory); // @notice get the send() LayerZero messaging library version // @param _userApplication - the contract address of the user application function getSendVersion(address _userApplication) external view returns (uint16); // @notice get the lzReceive() LayerZero messaging library version // @param _userApplication - the contract address of the user application function getReceiveVersion(address _userApplication) external view returns (uint16); }
// SPDX-License-Identifier: MIT pragma solidity >=0.5.0; interface ILayerZeroUserApplicationConfig { // @notice set the configuration of the LayerZero messaging library of the specified version // @param _version - messaging library version // @param _chainId - the chainId for the pending config change // @param _configType - type of configuration. every messaging library has its own convention. // @param _config - configuration in the bytes. can encode arbitrary content. function setConfig(uint16 _version, uint16 _chainId, uint _configType, bytes calldata _config) external; // @notice set the send() LayerZero messaging library version to _version // @param _version - new messaging library version function setSendVersion(uint16 _version) external; // @notice set the lzReceive() LayerZero messaging library version to _version // @param _version - new messaging library version function setReceiveVersion(uint16 _version) external; // @notice Only when the UA needs to resume the message flow in blocking mode and clear the stored payload // @param _srcChainId - the chainId of the source chain // @param _srcAddress - the contract address of the source contract at the source chain function forceResumeReceive(uint16 _srcChainId, bytes calldata _srcAddress) external; }
// 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 // 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 v4.4.1 (utils/Address.sol) pragma solidity ^0.8.0; /** * @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 * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; assembly { size := extcodesize(account) } return size > 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); } }
// 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 // 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); }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"string","name":"_name","type":"string"},{"internalType":"string","name":"_token","type":"string"},{"internalType":"uint256","name":"_nextTokenId","type":"uint256"},{"internalType":"uint256","name":"_maxMint","type":"uint256"},{"internalType":"uint256","name":"_mintPerWallet","type":"uint256"},{"internalType":"string","name":"baseURI_","type":"string"},{"internalType":"address","name":"_layerZeroEndpoint","type":"address"},{"internalType":"uint256","name":"_startTimestamp","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"ApprovalCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"ApprovalQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"ApprovalToCurrentOwner","type":"error"},{"inputs":[],"name":"ApproveToCaller","type":"error"},{"inputs":[],"name":"BalanceQueryForZeroAddress","type":"error"},{"inputs":[],"name":"MintToZeroAddress","type":"error"},{"inputs":[],"name":"MintZeroQuantity","type":"error"},{"inputs":[],"name":"OwnerQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"TransferCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"TransferFromIncorrectOwner","type":"error"},{"inputs":[],"name":"TransferToNonERC721ReceiverImplementer","type":"error"},{"inputs":[],"name":"TransferToZeroAddress","type":"error"},{"inputs":[],"name":"URIQueryForNonexistentToken","type":"error"},{"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":"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":[],"name":"MAX_MINT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_owner","outputs":[{"internalType":"address","name":"","type":"address"}],"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":"donate","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint16","name":"_chainId","type":"uint16"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"estimateFees","outputs":[{"internalType":"uint256","name":"","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":"uint256","name":"payloadLength","type":"uint256"},{"internalType":"bytes32","name":"payloadHash","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"giveawayAddresses","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"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":"maxMint","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint8","name":"numTokens","type":"uint8"}],"name":"mint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"mintGiveaway","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"mintPerWallet","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint16","name":"_srcChainId","type":"uint16"},{"internalType":"bytes","name":"_srcAddress","type":"bytes"},{"internalType":"uint64","name":"_nonce","type":"uint64"},{"internalType":"bytes","name":"_payload","type":"bytes"}],"name":"onLzReceive","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"quantity","type":"uint256"}],"name":"reserveMints","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"reservedAmount","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":"retryMessage","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"URI","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newVal","type":"uint256"}],"name":"setGasForDestinationLzReceive","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"addresses","type":"address[]"},{"internalType":"uint256[]","name":"counts","type":"uint256[]"}],"name":"setGiveawayAddresses","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_MAX_MINT","type":"uint256"}],"name":"setMaxMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_nextTokenId","type":"uint256"}],"name":"setNextTokenId","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"_chainId","type":"uint16"},{"internalType":"bytes","name":"_trustedRemote","type":"bytes"}],"name":"setTrustedRemote","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"startTimestamp","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","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":"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":[{"internalType":"uint16","name":"_chainId","type":"uint16"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"traverseChains","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint16","name":"","type":"uint16"}],"name":"trustedRemoteLookup","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amt","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60806040526000600e556000601255620557306014553480156200002257600080fd5b5060405162003486380380620034868339810160408190526200004591620002d7565b878787878787878787876200005a33620000f7565b81516200006f90600390602085019062000147565b5080516200008590600490602084019062000147565b50600e546001555050600c8054336001600160a01b031991821617909155600980549091166001600160a01b0384161790558251620000cc90600d90602086019062000147565b50600f9490945550506010556001829055600e9190915560135550620003df98505050505050505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b8280546200015590620003a2565b90600052602060002090601f016020900481019282620001795760008555620001c4565b82601f106200019457805160ff1916838001178555620001c4565b82800160010185558215620001c4579182015b82811115620001c4578251825591602001919060010190620001a7565b50620001d2929150620001d6565b5090565b5b80821115620001d25760008155600101620001d7565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126200021557600080fd5b81516001600160401b0380821115620002325762000232620001ed565b604051601f8301601f19908116603f011681019082821181831017156200025d576200025d620001ed565b816040528381526020925086838588010111156200027a57600080fd5b600091505b838210156200029e57858201830151818301840152908201906200027f565b83821115620002b05760008385830101525b9695505050505050565b80516001600160a01b0381168114620002d257600080fd5b919050565b600080600080600080600080610100898b031215620002f557600080fd5b88516001600160401b03808211156200030d57600080fd5b6200031b8c838d0162000203565b995060208b01519150808211156200033257600080fd5b620003408c838d0162000203565b985060408b0151975060608b0151965060808b0151955060a08b01519150808211156200036c57600080fd5b506200037b8b828c0162000203565b9350506200038c60c08a01620002ba565b915060e089015190509295985092959890939650565b600181811c90821680620003b757607f821691505b60208210811415620003d957634e487b7160e01b600052602260045260246000fd5b50919050565b61309780620003ef6000396000f3fe6080604052600436106102505760003560e01c80637533d78811610139578063b88d4fde116100b6578063e985e9c51161007a578063e985e9c5146106f8578063eb8d72b714610741578063ed88c68e14610275578063f0292a0314610761578063f2fde38b14610777578063f92c45b71461079757600080fd5b8063b88d4fde1461067c578063c87b56dd1461069c578063cf89fa03146106bc578063d1deba1f146106cf578063e6fd48bc146106e257600080fd5b806395d89b41116100fd57806395d89b41146105f25780639ab6f6c9146106075780639ff048fc14610627578063a22cb4651461063c578063b2bdfa7b1461065c57600080fd5b80637533d7881461050957806383e3500f146105295780638da5cb5b146105495780638ee7491214610567578063943fb872146105d257600080fd5b8063362790f6116101d25780636352211e116101965780636352211e146104765780636ecd230614610496578063700c35d2146104a957806370a08231146104bf578063715018a6146104df5780637501f741146104f457600080fd5b8063362790f6146103c95780634001d92c146103e957806342842e0e14610416578063547520fe1461043657806355f804b31461045657600080fd5b806318160ddd1161021957806318160ddd146103265780631c37a82214610349578063226eb3d81461036957806323b872dd146103895780632e1a7d4d146103a957600080fd5b80621d35671461025557806301ffc9a71461027757806306fdde03146102ac578063081812fc146102ce578063095ea7b314610306575b600080fd5b34801561026157600080fd5b506102756102703660046125b5565b6107ad565b005b34801561028357600080fd5b5061029761029236600461264f565b6109a7565b60405190151581526020015b60405180910390f35b3480156102b857600080fd5b506102c16109f9565b6040516102a391906126c4565b3480156102da57600080fd5b506102ee6102e93660046126d7565b610a8b565b6040516001600160a01b0390911681526020016102a3565b34801561031257600080fd5b50610275610321366004612705565b610acf565b34801561033257600080fd5b5061033b610b5d565b6040519081526020016102a3565b34801561035557600080fd5b506102756103643660046125b5565b610b75565b34801561037557600080fd5b506102756103843660046126d7565b610be4565b34801561039557600080fd5b506102756103a4366004612731565b610c1b565b3480156103b557600080fd5b506102756103c43660046126d7565b610c26565b3480156103d557600080fd5b5061033b6103e4366004612772565b610cf7565b3480156103f557600080fd5b5061033b61040436600461278e565b60116020526000908152604090205481565b34801561042257600080fd5b50610275610431366004612731565b610dc4565b34801561044257600080fd5b506102756104513660046126d7565b610ddf565b34801561046257600080fd5b506102756104713660046127ab565b610e0e565b34801561048257600080fd5b506102ee6104913660046126d7565b610e4b565b6102756104a43660046127f3565b610e5d565b3480156104b557600080fd5b5061033b60105481565b3480156104cb57600080fd5b5061033b6104da36600461278e565b610f74565b3480156104eb57600080fd5b50610275610fc2565b34801561050057600080fd5b5061033b610ff8565b34801561051557600080fd5b506102c1610524366004612816565b61100f565b34801561053557600080fd5b506102756105443660046126d7565b6110a9565b34801561055557600080fd5b506000546001600160a01b03166102ee565b34801561057357600080fd5b506105bd610582366004612831565b600a60209081526000938452604080852084518086018401805192815290840195840195909520945292905282529020805460019091015482565b604080519283526020830191909152016102a3565b3480156105de57600080fd5b506102756105ed3660046126d7565b6110d8565b3480156105fe57600080fd5b506102c1611107565b34801561061357600080fd5b50610275610622366004612915565b611116565b34801561063357600080fd5b5061027561124f565b34801561064857600080fd5b506102756106573660046129d6565b611372565b34801561066857600080fd5b50600c546102ee906001600160a01b031681565b34801561068857600080fd5b50610275610697366004612a14565b611408565b3480156106a857600080fd5b506102c16106b73660046126d7565b611453565b6102756106ca366004612772565b6114d8565b6102756106dd366004612abb565b6117a6565b3480156106ee57600080fd5b5061033b60135481565b34801561070457600080fd5b50610297610713366004612b46565b6001600160a01b03918216600090815260086020908152604080832093909416825291909152205460ff1690565b34801561074d57600080fd5b5061027561075c366004612b74565b611933565b34801561076d57600080fd5b5061033b600f5481565b34801561078357600080fd5b5061027561079236600461278e565b61197b565b3480156107a357600080fd5b5061033b60125481565b6009546001600160a01b031633146107c457600080fd5b61ffff84166000908152600b6020526040902080546107e290612bc6565b90508351148015610821575061ffff84166000908152600b602052604090819020905161080f9190612c01565b60405180910390208380519060200120145b61088f5760405162461bcd60e51b815260206004820152603460248201527f4e6f6e626c6f636b696e6752656365697665723a20696e76616c696420736f756044820152731c98d9481cd95b991a5b99c818dbdb9d1c9858dd60621b60648201526084015b60405180910390fd5b604051630e1bd41160e11b81523090631c37a822906108b8908790879087908790600401612c73565b600060405180830381600087803b1580156108d257600080fd5b505af19250505080156108e3575060015b6109a1576040518060400160405280825181526020018280519060200120815250600a60008661ffff1661ffff1681526020019081526020016000208460405161092d9190612cbc565b9081526040805191829003602090810183206001600160401b038716600090815290825291909120835181559201516001909201919091557fe6f254030bcb01ffd20558175c13fcaed6d1520be7becee4c961b65f79243b0d90610998908690869086908690612c73565b60405180910390a15b50505050565b60006001600160e01b031982166380ac58cd60e01b14806109d857506001600160e01b03198216635b5e139f60e01b145b806109f357506301ffc9a760e01b6001600160e01b03198316145b92915050565b606060038054610a0890612bc6565b80601f0160208091040260200160405190810160405280929190818152602001828054610a3490612bc6565b8015610a815780601f10610a5657610100808354040283529160200191610a81565b820191906000526020600020905b815481529060010190602001808311610a6457829003601f168201915b5050505050905090565b6000610a9682611a13565b610ab3576040516333d1c03960e21b815260040160405180910390fd5b506000908152600760205260409020546001600160a01b031690565b6000610ada82610e4b565b9050806001600160a01b0316836001600160a01b03161415610b0f5760405163250fdee360e21b815260040160405180910390fd5b336001600160a01b03821614801590610b2f5750610b2d8133610713565b155b15610b4d576040516367d9dca160e11b815260040160405180910390fd5b610b58838383611a53565b505050565b6000610b68600e5490565b6002546001540303905090565b333014610bd85760405162461bcd60e51b815260206004820152602b60248201527f4e6f6e626c6f636b696e6752656365697665723a2063616c6c6572206d75737460448201526a10313290213934b233b29760a91b6064820152608401610886565b6109a184848484611aaf565b6000546001600160a01b03163314610c0e5760405162461bcd60e51b815260040161088690612cd8565b610c183382611adc565b50565b610b58838383611af6565b6000546001600160a01b03163314610c505760405162461bcd60e51b815260040161088690612cd8565b600c546040516000916001600160a01b03169083908381818185875af1925050503d8060008114610c9d576040519150601f19603f3d011682016040523d82523d6000602084013e610ca2565b606091505b5050905080610cf35760405162461bcd60e51b815260206004820152601860248201527f4661696c656420746f20776974686472617720457468657200000000000000006044820152606401610886565b5050565b60095460408051336020820152808201849052815180820383018152606082018352601454600160f01b60808401526082808401919091528351808403909101815260a283019384905263040a7bb160e41b90935260009360019385936001600160a01b03909216926340a7bb1092610d7a928a9230929091889160a601612d0d565b6040805180830381865afa158015610d96573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610dba9190612d61565b5095945050505050565b610b5883838360405180602001604052806000815250611408565b6000546001600160a01b03163314610e095760405162461bcd60e51b815260040161088690612cd8565b600f55565b6000546001600160a01b03163314610e385760405162461bcd60e51b815260040161088690612cd8565b8051610cf390600d9060208401906123bd565b6000610e5682611cd2565b5192915050565b601354421015610e9a5760405162461bcd60e51b81526020600482015260086024820152674e6f74206c69766560c01b6044820152606401610886565b6010548160ff16610eaa33610f74565b610eb49190612d9b565b1115610f025760405162461bcd60e51b815260206004820152601b60248201527f45786365656473206d6178204e465473207065722077616c6c657400000000006044820152606401610886565b600f546012548260ff16600154610f199190612d9b565b610f239190612d9b565b1115610f675760405162461bcd60e51b81526020600482015260136024820152724d696e74206578636565647320737570706c7960681b6044820152606401610886565b610c18338260ff16611adc565b60006001600160a01b038216610f9d576040516323d3ad8160e21b815260040160405180910390fd5b506001600160a01b03166000908152600660205260409020546001600160401b031690565b6000546001600160a01b03163314610fec5760405162461bcd60e51b815260040161088690612cd8565b610ff66000611e00565b565b6000600e54600f5461100a9190612db3565b905090565b600b602052600090815260409020805461102890612bc6565b80601f016020809104026020016040519081016040528092919081815260200182805461105490612bc6565b80156110a15780601f10611076576101008083540402835291602001916110a1565b820191906000526020600020905b81548152906001019060200180831161108457829003601f168201915b505050505081565b6000546001600160a01b031633146110d35760405162461bcd60e51b815260040161088690612cd8565b600155565b6000546001600160a01b031633146111025760405162461bcd60e51b815260040161088690612cd8565b601455565b606060048054610a0890612bc6565b6000546001600160a01b031633146111405760405162461bcd60e51b815260040161088690612cd8565b80518251146111a25760405162461bcd60e51b815260206004820152602860248201527f61646472657373657320646f6573206e6f74206d61746368206e756d536c6f746044820152670e640d8cadccee8d60c31b6064820152608401610886565b60005b8251811015610b58578181815181106111c0576111c0612dca565b6020026020010151601260008282546111d99190612d9b565b925050819055508181815181106111f2576111f2612dca565b60200260200101516011600085848151811061121057611210612dca565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002081905550808061124790612de0565b9150506111a5565b60135442101561128c5760405162461bcd60e51b81526020600482015260086024820152674e6f74206c69766560c01b6044820152606401610886565b33600090815260116020526040902054806112e95760405162461bcd60e51b815260206004820181905260248201527f596f7520646f6e74206861766520616e79206769766561776179206d696e74736044820152606401610886565b600f54816001546112fa9190612d9b565b111561133e5760405162461bcd60e51b81526020600482015260136024820152724d696e74206578636565647320737570706c7960681b6044820152606401610886565b33600090815260116020526040812081905560128054839290611362908490612db3565b90915550610c1890503382611adc565b6001600160a01b03821633141561139c5760405163b06307db60e01b815260040160405180910390fd5b3360008181526008602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b611413848484611af6565b6001600160a01b0383163b15158015611435575061143384848484611e50565b155b156109a1576040516368d2bf6b60e11b815260040160405180910390fd5b606061145e82611a13565b61147b57604051630a14c4b560e41b815260040160405180910390fd5b6000611485611f39565b90508051600014156114a657604051806020016040528060008152506114d1565b806114b084611f48565b6040516020016114c1929190612dfb565b6040516020818303038152906040525b9392505050565b6114e181610e4b565b6001600160a01b0316336001600160a01b03161461154c5760405162461bcd60e51b815260206004820152602260248201527f596f75206d757374206f776e2074686520746f6b656e20746f20747261766572604482015261736560f01b6064820152608401610886565b61ffff82166000908152600b60205260408120805461156a90612bc6565b9050116115d05760405162461bcd60e51b815260206004820152602e60248201527f5468697320636861696e2069732063757272656e746c7920756e617661696c6160448201526d189b1948199bdc881d1c985d995b60921b6064820152608401610886565b6115d981612045565b60408051336020820152808201839052815180820383018152606082018352601454600160f01b60808401526082808401919091528351808403909101815260a283019384905260095463040a7bb160e41b90945290926001926000916001600160a01b0316906340a7bb109061165c908990309089908790899060a601612d0d565b6040805180830381865afa158015611678573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061169c9190612d61565b509050803410156117215760405162461bcd60e51b815260206004820152604360248201527f6d73672e76616c7565206e6f7420656e6f75676820746f20636f766572206d6560448201527f73736167654665652e2053656e642067617320666f72206d657373616765206660648201526265657360e81b608482015260a401610886565b60095461ffff87166000908152600b6020526040808220905162c5803160e81b81526001600160a01b039093169263c580310092349261176c928c928b913391908b90600401612e2a565b6000604051808303818588803b15801561178557600080fd5b505af1158015611799573d6000803e3d6000fd5b5050505050505050505050565b61ffff85166000908152600a602052604080822090516117c7908790612cbc565b90815260408051602092819003830190206001600160401b038716600090815292529020600181015490915061184e5760405162461bcd60e51b815260206004820152602660248201527f4e6f6e626c6f636b696e6752656365697665723a206e6f2073746f726564206d60448201526565737361676560d01b6064820152608401610886565b80548214801561187857508060010154838360405161186e929190612f0a565b6040518091039020145b6118c45760405162461bcd60e51b815260206004820152601a60248201527f4c617965725a65726f3a20696e76616c6964207061796c6f61640000000000006044820152606401610886565b60008082556001820155604051630e1bd41160e11b81523090631c37a822906118f99089908990899089908990600401612f1a565b600060405180830381600087803b15801561191357600080fd5b505af1158015611927573d6000803e3d6000fd5b50505050505050505050565b6000546001600160a01b0316331461195d5760405162461bcd60e51b815260040161088690612cd8565b61ffff83166000908152600b602052604090206109a1908383612441565b6000546001600160a01b031633146119a55760405162461bcd60e51b815260040161088690612cd8565b6001600160a01b038116611a0a5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610886565b610c1881611e00565b600081611a1f600e5490565b11158015611a2e575060015482105b80156109f3575050600090815260056020526040902054600160e01b900460ff161590565b60008281526007602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b60008082806020019051810190611ac69190612f7b565b91509150611ad48282611adc565b505050505050565b610cf3828260405180602001604052806000815250612050565b6000611b0182611cd2565b9050836001600160a01b031681600001516001600160a01b031614611b385760405162a1148160e81b815260040160405180910390fd5b6000336001600160a01b0386161480611b565750611b568533610713565b80611b71575033611b6684610a8b565b6001600160a01b0316145b905080611b9157604051632ce44b5f60e11b815260040160405180910390fd5b6001600160a01b038416611bb857604051633a954ecd60e21b815260040160405180910390fd5b611bc460008487611a53565b6001600160a01b038581166000908152600660209081526040808320805467ffffffffffffffff198082166001600160401b0392831660001901831617909255898616808652838620805493841693831660019081018416949094179055898652600590945282852080546001600160e01b031916909417600160a01b42909216919091021783558701808452922080549193909116611c98576001548214611c9857805460208601516001600160401b0316600160a01b026001600160e01b03199091166001600160a01b038a16171781555b50505082846001600160a01b0316866001600160a01b031660008051602061304283398151915260405160405180910390a45b5050505050565b60408051606081018252600080825260208201819052918101919091528180611cfa600e5490565b11158015611d09575060015481105b15611de757600081815260056020908152604091829020825160608101845290546001600160a01b0381168252600160a01b81046001600160401b031692820192909252600160e01b90910460ff16151591810182905290611de55780516001600160a01b031615611d7c579392505050565b5060001901600081815260056020908152604091829020825160608101845290546001600160a01b038116808352600160a01b82046001600160401b031693830193909352600160e01b900460ff1615159281019290925215611de0579392505050565b611d7c565b505b604051636f96cda160e11b815260040160405180910390fd5b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a0290611e85903390899088908890600401612fa9565b6020604051808303816000875af1925050508015611ec0575060408051601f3d908101601f19168201909252611ebd91810190612fe6565b60015b611f1b573d808015611eee576040519150601f19603f3d011682016040523d82523d6000602084013e611ef3565b606091505b508051611f13576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490505b949350505050565b6060600d8054610a0890612bc6565b606081611f6c5750506040805180820190915260018152600360fc1b602082015290565b8160005b8115611f965780611f8081612de0565b9150611f8f9050600a83613019565b9150611f70565b6000816001600160401b03811115611fb057611fb06124e1565b6040519080825280601f01601f191660200182016040528015611fda576020820181803683370190505b5090505b8415611f3157611fef600183612db3565b9150611ffc600a8661302d565b612007906030612d9b565b60f81b81838151811061201c5761201c612dca565b60200101906001600160f81b031916908160001a90535061203e600a86613019565b9450611fde565b610c1881600061205d565b610b588383836001612211565b600061206883611cd2565b805190915082156120ce576000336001600160a01b038316148061209157506120918233610713565b806120ac5750336120a186610a8b565b6001600160a01b0316145b9050806120cc57604051632ce44b5f60e11b815260040160405180910390fd5b505b6120da60008583611a53565b6001600160a01b0380821660008181526006602090815260408083208054600160801b6000196001600160401b0380841691909101811667ffffffffffffffff198416811783900482166001908101831690930277ffffffffffffffff0000000000000000ffffffffffffffff19909416179290921783558b86526005909452828520805460ff60e01b1942909316600160a01b026001600160e01b03199091169097179690961716600160e01b1785559189018084529220805491949091166121d85760015482146121d857805460208701516001600160401b0316600160a01b026001600160e01b03199091166001600160a01b038716171781555b5050604051869250600091506001600160a01b03841690600080516020613042833981519152908390a450506002805460010190555050565b6001546001600160a01b03851661223a57604051622e076360e81b815260040160405180910390fd5b836122585760405163b562e8dd60e01b815260040160405180910390fd5b6001600160a01b038516600081815260066020908152604080832080546fffffffffffffffffffffffffffffffff1981166001600160401b038083168c0181169182176801000000000000000067ffffffffffffffff1990941690921783900481168c01811690920217909155858452600590925290912080546001600160e01b031916909217600160a01b42909216919091021790558080850183801561230957506001600160a01b0387163b15155b15612380575b60405182906001600160a01b03891690600090600080516020613042833981519152908290a46123486000888480600101955088611e50565b612365576040516368d2bf6b60e11b815260040160405180910390fd5b8082141561230f57826001541461237b57600080fd5b6123b4565b5b6040516001830192906001600160a01b03891690600090600080516020613042833981519152908290a480821415612381575b50600155611ccb565b8280546123c990612bc6565b90600052602060002090601f0160209004810192826123eb5760008555612431565b82601f1061240457805160ff1916838001178555612431565b82800160010185558215612431579182015b82811115612431578251825591602001919060010190612416565b5061243d9291506124b5565b5090565b82805461244d90612bc6565b90600052602060002090601f01602090048101928261246f5760008555612431565b82601f106124885782800160ff19823516178555612431565b82800160010185558215612431579182015b8281111561243157823582559160200191906001019061249a565b5b8082111561243d57600081556001016124b6565b803561ffff811681146124dc57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b038111828210171561251f5761251f6124e1565b604052919050565b60006001600160401b03831115612540576125406124e1565b612553601f8401601f19166020016124f7565b905082815283838301111561256757600080fd5b828260208301376000602084830101529392505050565b600082601f83011261258f57600080fd5b6114d183833560208501612527565b80356001600160401b03811681146124dc57600080fd5b600080600080608085870312156125cb57600080fd5b6125d4856124ca565b935060208501356001600160401b03808211156125f057600080fd5b6125fc8883890161257e565b945061260a6040880161259e565b9350606087013591508082111561262057600080fd5b5061262d8782880161257e565b91505092959194509250565b6001600160e01b031981168114610c1857600080fd5b60006020828403121561266157600080fd5b81356114d181612639565b60005b8381101561268757818101518382015260200161266f565b838111156109a15750506000910152565b600081518084526126b081602086016020860161266c565b601f01601f19169290920160200192915050565b6020815260006114d16020830184612698565b6000602082840312156126e957600080fd5b5035919050565b6001600160a01b0381168114610c1857600080fd5b6000806040838503121561271857600080fd5b8235612723816126f0565b946020939093013593505050565b60008060006060848603121561274657600080fd5b8335612751816126f0565b92506020840135612761816126f0565b929592945050506040919091013590565b6000806040838503121561278557600080fd5b612723836124ca565b6000602082840312156127a057600080fd5b81356114d1816126f0565b6000602082840312156127bd57600080fd5b81356001600160401b038111156127d357600080fd5b8201601f810184136127e457600080fd5b611f3184823560208401612527565b60006020828403121561280557600080fd5b813560ff811681146114d157600080fd5b60006020828403121561282857600080fd5b6114d1826124ca565b60008060006060848603121561284657600080fd5b61284f846124ca565b925060208401356001600160401b0381111561286a57600080fd5b6128768682870161257e565b925050604084013590509250925092565b60006001600160401b038211156128a0576128a06124e1565b5060051b60200190565b600082601f8301126128bb57600080fd5b813560206128d06128cb83612887565b6124f7565b82815260059290921b840181019181810190868411156128ef57600080fd5b8286015b8481101561290a57803583529183019183016128f3565b509695505050505050565b6000806040838503121561292857600080fd5b82356001600160401b038082111561293f57600080fd5b818501915085601f83011261295357600080fd5b813560206129636128cb83612887565b82815260059290921b8401810191818101908984111561298257600080fd5b948201945b838610156129a957853561299a816126f0565b82529482019490820190612987565b965050860135925050808211156129bf57600080fd5b506129cc858286016128aa565b9150509250929050565b600080604083850312156129e957600080fd5b82356129f4816126f0565b915060208301358015158114612a0957600080fd5b809150509250929050565b60008060008060808587031215612a2a57600080fd5b8435612a35816126f0565b93506020850135612a45816126f0565b92506040850135915060608501356001600160401b03811115612a6757600080fd5b61262d8782880161257e565b60008083601f840112612a8557600080fd5b5081356001600160401b03811115612a9c57600080fd5b602083019150836020828501011115612ab457600080fd5b9250929050565b600080600080600060808688031215612ad357600080fd5b612adc866124ca565b945060208601356001600160401b0380821115612af857600080fd5b612b0489838a0161257e565b9550612b126040890161259e565b94506060880135915080821115612b2857600080fd5b50612b3588828901612a73565b969995985093965092949392505050565b60008060408385031215612b5957600080fd5b8235612b64816126f0565b91506020830135612a09816126f0565b600080600060408486031215612b8957600080fd5b612b92846124ca565b925060208401356001600160401b03811115612bad57600080fd5b612bb986828701612a73565b9497909650939450505050565b600181811c90821680612bda57607f821691505b60208210811415612bfb57634e487b7160e01b600052602260045260246000fd5b50919050565b6000808354612c0f81612bc6565b60018281168015612c275760018114612c3857612c67565b60ff19841687528287019450612c67565b8760005260208060002060005b85811015612c5e5781548a820152908401908201612c45565b50505082870194505b50929695505050505050565b61ffff85168152608060208201526000612c906080830186612698565b6001600160401b03851660408401528281036060840152612cb18185612698565b979650505050505050565b60008251612cce81846020870161266c565b9190910192915050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b61ffff861681526001600160a01b038516602082015260a060408201819052600090612d3b90830186612698565b84151560608401528281036080840152612d558185612698565b98975050505050505050565b60008060408385031215612d7457600080fd5b505080516020909101519092909150565b634e487b7160e01b600052601160045260246000fd5b60008219821115612dae57612dae612d85565b500190565b600082821015612dc557612dc5612d85565b500390565b634e487b7160e01b600052603260045260246000fd5b6000600019821415612df457612df4612d85565b5060010190565b60008351612e0d81846020880161266c565b835190830190612e2181836020880161266c565b01949350505050565b61ffff871681526000602060c08184015260008854612e4881612bc6565b8060c087015260e0600180841660008114612e6a5760018114612e7f57612ead565b60ff1985168984015261010089019550612ead565b8d6000528660002060005b85811015612ea55781548b8201860152908301908801612e8a565b8a0184019650505b50505050508381036040850152612ec48189612698565b915050612edc60608401876001600160a01b03169052565b6001600160a01b038516608084015282810360a0840152612efd8185612698565b9998505050505050505050565b8183823760009101908152919050565b61ffff86168152608060208201526000612f376080830187612698565b6001600160401b03861660408401528281036060840152838152838560208301376000602085830101526020601f19601f8601168201019150509695505050505050565b60008060408385031215612f8e57600080fd5b8251612f99816126f0565b6020939093015192949293505050565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090612fdc90830184612698565b9695505050505050565b600060208284031215612ff857600080fd5b81516114d181612639565b634e487b7160e01b600052601260045260246000fd5b60008261302857613028613003565b500490565b60008261303c5761303c613003565b50069056feddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa26469706673582212207dd69ed0da1d5703bbfc702b041f56cd5c694c6f82fa77ef2d7755ab85a6ffbb64736f6c634300080a003300000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000140000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000003e90000000000000000000000000000000000000000000000000000000000000005000000000000000000000000000000000000000000000000000000000000018000000000000000000000000066a71dcef29a0ffbdbe3c6a460a3b5bc225cd67500000000000000000000000000000000000000000000000000000000626468d000000000000000000000000000000000000000000000000000000000000000084f6d6e696361747300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000074f4d4e4943415400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005a68747470733a2f2f697066732e696f2f697066732f6261667962656964626b7a7865687935336435677162716e636175346d33726e776f696734646b6b6d6478697a34336f6437376f327068656474612f6d657461646174612f000000000000
Deployed Bytecode
0x6080604052600436106102505760003560e01c80637533d78811610139578063b88d4fde116100b6578063e985e9c51161007a578063e985e9c5146106f8578063eb8d72b714610741578063ed88c68e14610275578063f0292a0314610761578063f2fde38b14610777578063f92c45b71461079757600080fd5b8063b88d4fde1461067c578063c87b56dd1461069c578063cf89fa03146106bc578063d1deba1f146106cf578063e6fd48bc146106e257600080fd5b806395d89b41116100fd57806395d89b41146105f25780639ab6f6c9146106075780639ff048fc14610627578063a22cb4651461063c578063b2bdfa7b1461065c57600080fd5b80637533d7881461050957806383e3500f146105295780638da5cb5b146105495780638ee7491214610567578063943fb872146105d257600080fd5b8063362790f6116101d25780636352211e116101965780636352211e146104765780636ecd230614610496578063700c35d2146104a957806370a08231146104bf578063715018a6146104df5780637501f741146104f457600080fd5b8063362790f6146103c95780634001d92c146103e957806342842e0e14610416578063547520fe1461043657806355f804b31461045657600080fd5b806318160ddd1161021957806318160ddd146103265780631c37a82214610349578063226eb3d81461036957806323b872dd146103895780632e1a7d4d146103a957600080fd5b80621d35671461025557806301ffc9a71461027757806306fdde03146102ac578063081812fc146102ce578063095ea7b314610306575b600080fd5b34801561026157600080fd5b506102756102703660046125b5565b6107ad565b005b34801561028357600080fd5b5061029761029236600461264f565b6109a7565b60405190151581526020015b60405180910390f35b3480156102b857600080fd5b506102c16109f9565b6040516102a391906126c4565b3480156102da57600080fd5b506102ee6102e93660046126d7565b610a8b565b6040516001600160a01b0390911681526020016102a3565b34801561031257600080fd5b50610275610321366004612705565b610acf565b34801561033257600080fd5b5061033b610b5d565b6040519081526020016102a3565b34801561035557600080fd5b506102756103643660046125b5565b610b75565b34801561037557600080fd5b506102756103843660046126d7565b610be4565b34801561039557600080fd5b506102756103a4366004612731565b610c1b565b3480156103b557600080fd5b506102756103c43660046126d7565b610c26565b3480156103d557600080fd5b5061033b6103e4366004612772565b610cf7565b3480156103f557600080fd5b5061033b61040436600461278e565b60116020526000908152604090205481565b34801561042257600080fd5b50610275610431366004612731565b610dc4565b34801561044257600080fd5b506102756104513660046126d7565b610ddf565b34801561046257600080fd5b506102756104713660046127ab565b610e0e565b34801561048257600080fd5b506102ee6104913660046126d7565b610e4b565b6102756104a43660046127f3565b610e5d565b3480156104b557600080fd5b5061033b60105481565b3480156104cb57600080fd5b5061033b6104da36600461278e565b610f74565b3480156104eb57600080fd5b50610275610fc2565b34801561050057600080fd5b5061033b610ff8565b34801561051557600080fd5b506102c1610524366004612816565b61100f565b34801561053557600080fd5b506102756105443660046126d7565b6110a9565b34801561055557600080fd5b506000546001600160a01b03166102ee565b34801561057357600080fd5b506105bd610582366004612831565b600a60209081526000938452604080852084518086018401805192815290840195840195909520945292905282529020805460019091015482565b604080519283526020830191909152016102a3565b3480156105de57600080fd5b506102756105ed3660046126d7565b6110d8565b3480156105fe57600080fd5b506102c1611107565b34801561061357600080fd5b50610275610622366004612915565b611116565b34801561063357600080fd5b5061027561124f565b34801561064857600080fd5b506102756106573660046129d6565b611372565b34801561066857600080fd5b50600c546102ee906001600160a01b031681565b34801561068857600080fd5b50610275610697366004612a14565b611408565b3480156106a857600080fd5b506102c16106b73660046126d7565b611453565b6102756106ca366004612772565b6114d8565b6102756106dd366004612abb565b6117a6565b3480156106ee57600080fd5b5061033b60135481565b34801561070457600080fd5b50610297610713366004612b46565b6001600160a01b03918216600090815260086020908152604080832093909416825291909152205460ff1690565b34801561074d57600080fd5b5061027561075c366004612b74565b611933565b34801561076d57600080fd5b5061033b600f5481565b34801561078357600080fd5b5061027561079236600461278e565b61197b565b3480156107a357600080fd5b5061033b60125481565b6009546001600160a01b031633146107c457600080fd5b61ffff84166000908152600b6020526040902080546107e290612bc6565b90508351148015610821575061ffff84166000908152600b602052604090819020905161080f9190612c01565b60405180910390208380519060200120145b61088f5760405162461bcd60e51b815260206004820152603460248201527f4e6f6e626c6f636b696e6752656365697665723a20696e76616c696420736f756044820152731c98d9481cd95b991a5b99c818dbdb9d1c9858dd60621b60648201526084015b60405180910390fd5b604051630e1bd41160e11b81523090631c37a822906108b8908790879087908790600401612c73565b600060405180830381600087803b1580156108d257600080fd5b505af19250505080156108e3575060015b6109a1576040518060400160405280825181526020018280519060200120815250600a60008661ffff1661ffff1681526020019081526020016000208460405161092d9190612cbc565b9081526040805191829003602090810183206001600160401b038716600090815290825291909120835181559201516001909201919091557fe6f254030bcb01ffd20558175c13fcaed6d1520be7becee4c961b65f79243b0d90610998908690869086908690612c73565b60405180910390a15b50505050565b60006001600160e01b031982166380ac58cd60e01b14806109d857506001600160e01b03198216635b5e139f60e01b145b806109f357506301ffc9a760e01b6001600160e01b03198316145b92915050565b606060038054610a0890612bc6565b80601f0160208091040260200160405190810160405280929190818152602001828054610a3490612bc6565b8015610a815780601f10610a5657610100808354040283529160200191610a81565b820191906000526020600020905b815481529060010190602001808311610a6457829003601f168201915b5050505050905090565b6000610a9682611a13565b610ab3576040516333d1c03960e21b815260040160405180910390fd5b506000908152600760205260409020546001600160a01b031690565b6000610ada82610e4b565b9050806001600160a01b0316836001600160a01b03161415610b0f5760405163250fdee360e21b815260040160405180910390fd5b336001600160a01b03821614801590610b2f5750610b2d8133610713565b155b15610b4d576040516367d9dca160e11b815260040160405180910390fd5b610b58838383611a53565b505050565b6000610b68600e5490565b6002546001540303905090565b333014610bd85760405162461bcd60e51b815260206004820152602b60248201527f4e6f6e626c6f636b696e6752656365697665723a2063616c6c6572206d75737460448201526a10313290213934b233b29760a91b6064820152608401610886565b6109a184848484611aaf565b6000546001600160a01b03163314610c0e5760405162461bcd60e51b815260040161088690612cd8565b610c183382611adc565b50565b610b58838383611af6565b6000546001600160a01b03163314610c505760405162461bcd60e51b815260040161088690612cd8565b600c546040516000916001600160a01b03169083908381818185875af1925050503d8060008114610c9d576040519150601f19603f3d011682016040523d82523d6000602084013e610ca2565b606091505b5050905080610cf35760405162461bcd60e51b815260206004820152601860248201527f4661696c656420746f20776974686472617720457468657200000000000000006044820152606401610886565b5050565b60095460408051336020820152808201849052815180820383018152606082018352601454600160f01b60808401526082808401919091528351808403909101815260a283019384905263040a7bb160e41b90935260009360019385936001600160a01b03909216926340a7bb1092610d7a928a9230929091889160a601612d0d565b6040805180830381865afa158015610d96573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610dba9190612d61565b5095945050505050565b610b5883838360405180602001604052806000815250611408565b6000546001600160a01b03163314610e095760405162461bcd60e51b815260040161088690612cd8565b600f55565b6000546001600160a01b03163314610e385760405162461bcd60e51b815260040161088690612cd8565b8051610cf390600d9060208401906123bd565b6000610e5682611cd2565b5192915050565b601354421015610e9a5760405162461bcd60e51b81526020600482015260086024820152674e6f74206c69766560c01b6044820152606401610886565b6010548160ff16610eaa33610f74565b610eb49190612d9b565b1115610f025760405162461bcd60e51b815260206004820152601b60248201527f45786365656473206d6178204e465473207065722077616c6c657400000000006044820152606401610886565b600f546012548260ff16600154610f199190612d9b565b610f239190612d9b565b1115610f675760405162461bcd60e51b81526020600482015260136024820152724d696e74206578636565647320737570706c7960681b6044820152606401610886565b610c18338260ff16611adc565b60006001600160a01b038216610f9d576040516323d3ad8160e21b815260040160405180910390fd5b506001600160a01b03166000908152600660205260409020546001600160401b031690565b6000546001600160a01b03163314610fec5760405162461bcd60e51b815260040161088690612cd8565b610ff66000611e00565b565b6000600e54600f5461100a9190612db3565b905090565b600b602052600090815260409020805461102890612bc6565b80601f016020809104026020016040519081016040528092919081815260200182805461105490612bc6565b80156110a15780601f10611076576101008083540402835291602001916110a1565b820191906000526020600020905b81548152906001019060200180831161108457829003601f168201915b505050505081565b6000546001600160a01b031633146110d35760405162461bcd60e51b815260040161088690612cd8565b600155565b6000546001600160a01b031633146111025760405162461bcd60e51b815260040161088690612cd8565b601455565b606060048054610a0890612bc6565b6000546001600160a01b031633146111405760405162461bcd60e51b815260040161088690612cd8565b80518251146111a25760405162461bcd60e51b815260206004820152602860248201527f61646472657373657320646f6573206e6f74206d61746368206e756d536c6f746044820152670e640d8cadccee8d60c31b6064820152608401610886565b60005b8251811015610b58578181815181106111c0576111c0612dca565b6020026020010151601260008282546111d99190612d9b565b925050819055508181815181106111f2576111f2612dca565b60200260200101516011600085848151811061121057611210612dca565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002081905550808061124790612de0565b9150506111a5565b60135442101561128c5760405162461bcd60e51b81526020600482015260086024820152674e6f74206c69766560c01b6044820152606401610886565b33600090815260116020526040902054806112e95760405162461bcd60e51b815260206004820181905260248201527f596f7520646f6e74206861766520616e79206769766561776179206d696e74736044820152606401610886565b600f54816001546112fa9190612d9b565b111561133e5760405162461bcd60e51b81526020600482015260136024820152724d696e74206578636565647320737570706c7960681b6044820152606401610886565b33600090815260116020526040812081905560128054839290611362908490612db3565b90915550610c1890503382611adc565b6001600160a01b03821633141561139c5760405163b06307db60e01b815260040160405180910390fd5b3360008181526008602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b611413848484611af6565b6001600160a01b0383163b15158015611435575061143384848484611e50565b155b156109a1576040516368d2bf6b60e11b815260040160405180910390fd5b606061145e82611a13565b61147b57604051630a14c4b560e41b815260040160405180910390fd5b6000611485611f39565b90508051600014156114a657604051806020016040528060008152506114d1565b806114b084611f48565b6040516020016114c1929190612dfb565b6040516020818303038152906040525b9392505050565b6114e181610e4b565b6001600160a01b0316336001600160a01b03161461154c5760405162461bcd60e51b815260206004820152602260248201527f596f75206d757374206f776e2074686520746f6b656e20746f20747261766572604482015261736560f01b6064820152608401610886565b61ffff82166000908152600b60205260408120805461156a90612bc6565b9050116115d05760405162461bcd60e51b815260206004820152602e60248201527f5468697320636861696e2069732063757272656e746c7920756e617661696c6160448201526d189b1948199bdc881d1c985d995b60921b6064820152608401610886565b6115d981612045565b60408051336020820152808201839052815180820383018152606082018352601454600160f01b60808401526082808401919091528351808403909101815260a283019384905260095463040a7bb160e41b90945290926001926000916001600160a01b0316906340a7bb109061165c908990309089908790899060a601612d0d565b6040805180830381865afa158015611678573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061169c9190612d61565b509050803410156117215760405162461bcd60e51b815260206004820152604360248201527f6d73672e76616c7565206e6f7420656e6f75676820746f20636f766572206d6560448201527f73736167654665652e2053656e642067617320666f72206d657373616765206660648201526265657360e81b608482015260a401610886565b60095461ffff87166000908152600b6020526040808220905162c5803160e81b81526001600160a01b039093169263c580310092349261176c928c928b913391908b90600401612e2a565b6000604051808303818588803b15801561178557600080fd5b505af1158015611799573d6000803e3d6000fd5b5050505050505050505050565b61ffff85166000908152600a602052604080822090516117c7908790612cbc565b90815260408051602092819003830190206001600160401b038716600090815292529020600181015490915061184e5760405162461bcd60e51b815260206004820152602660248201527f4e6f6e626c6f636b696e6752656365697665723a206e6f2073746f726564206d60448201526565737361676560d01b6064820152608401610886565b80548214801561187857508060010154838360405161186e929190612f0a565b6040518091039020145b6118c45760405162461bcd60e51b815260206004820152601a60248201527f4c617965725a65726f3a20696e76616c6964207061796c6f61640000000000006044820152606401610886565b60008082556001820155604051630e1bd41160e11b81523090631c37a822906118f99089908990899089908990600401612f1a565b600060405180830381600087803b15801561191357600080fd5b505af1158015611927573d6000803e3d6000fd5b50505050505050505050565b6000546001600160a01b0316331461195d5760405162461bcd60e51b815260040161088690612cd8565b61ffff83166000908152600b602052604090206109a1908383612441565b6000546001600160a01b031633146119a55760405162461bcd60e51b815260040161088690612cd8565b6001600160a01b038116611a0a5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610886565b610c1881611e00565b600081611a1f600e5490565b11158015611a2e575060015482105b80156109f3575050600090815260056020526040902054600160e01b900460ff161590565b60008281526007602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b60008082806020019051810190611ac69190612f7b565b91509150611ad48282611adc565b505050505050565b610cf3828260405180602001604052806000815250612050565b6000611b0182611cd2565b9050836001600160a01b031681600001516001600160a01b031614611b385760405162a1148160e81b815260040160405180910390fd5b6000336001600160a01b0386161480611b565750611b568533610713565b80611b71575033611b6684610a8b565b6001600160a01b0316145b905080611b9157604051632ce44b5f60e11b815260040160405180910390fd5b6001600160a01b038416611bb857604051633a954ecd60e21b815260040160405180910390fd5b611bc460008487611a53565b6001600160a01b038581166000908152600660209081526040808320805467ffffffffffffffff198082166001600160401b0392831660001901831617909255898616808652838620805493841693831660019081018416949094179055898652600590945282852080546001600160e01b031916909417600160a01b42909216919091021783558701808452922080549193909116611c98576001548214611c9857805460208601516001600160401b0316600160a01b026001600160e01b03199091166001600160a01b038a16171781555b50505082846001600160a01b0316866001600160a01b031660008051602061304283398151915260405160405180910390a45b5050505050565b60408051606081018252600080825260208201819052918101919091528180611cfa600e5490565b11158015611d09575060015481105b15611de757600081815260056020908152604091829020825160608101845290546001600160a01b0381168252600160a01b81046001600160401b031692820192909252600160e01b90910460ff16151591810182905290611de55780516001600160a01b031615611d7c579392505050565b5060001901600081815260056020908152604091829020825160608101845290546001600160a01b038116808352600160a01b82046001600160401b031693830193909352600160e01b900460ff1615159281019290925215611de0579392505050565b611d7c565b505b604051636f96cda160e11b815260040160405180910390fd5b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a0290611e85903390899088908890600401612fa9565b6020604051808303816000875af1925050508015611ec0575060408051601f3d908101601f19168201909252611ebd91810190612fe6565b60015b611f1b573d808015611eee576040519150601f19603f3d011682016040523d82523d6000602084013e611ef3565b606091505b508051611f13576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490505b949350505050565b6060600d8054610a0890612bc6565b606081611f6c5750506040805180820190915260018152600360fc1b602082015290565b8160005b8115611f965780611f8081612de0565b9150611f8f9050600a83613019565b9150611f70565b6000816001600160401b03811115611fb057611fb06124e1565b6040519080825280601f01601f191660200182016040528015611fda576020820181803683370190505b5090505b8415611f3157611fef600183612db3565b9150611ffc600a8661302d565b612007906030612d9b565b60f81b81838151811061201c5761201c612dca565b60200101906001600160f81b031916908160001a90535061203e600a86613019565b9450611fde565b610c1881600061205d565b610b588383836001612211565b600061206883611cd2565b805190915082156120ce576000336001600160a01b038316148061209157506120918233610713565b806120ac5750336120a186610a8b565b6001600160a01b0316145b9050806120cc57604051632ce44b5f60e11b815260040160405180910390fd5b505b6120da60008583611a53565b6001600160a01b0380821660008181526006602090815260408083208054600160801b6000196001600160401b0380841691909101811667ffffffffffffffff198416811783900482166001908101831690930277ffffffffffffffff0000000000000000ffffffffffffffff19909416179290921783558b86526005909452828520805460ff60e01b1942909316600160a01b026001600160e01b03199091169097179690961716600160e01b1785559189018084529220805491949091166121d85760015482146121d857805460208701516001600160401b0316600160a01b026001600160e01b03199091166001600160a01b038716171781555b5050604051869250600091506001600160a01b03841690600080516020613042833981519152908390a450506002805460010190555050565b6001546001600160a01b03851661223a57604051622e076360e81b815260040160405180910390fd5b836122585760405163b562e8dd60e01b815260040160405180910390fd5b6001600160a01b038516600081815260066020908152604080832080546fffffffffffffffffffffffffffffffff1981166001600160401b038083168c0181169182176801000000000000000067ffffffffffffffff1990941690921783900481168c01811690920217909155858452600590925290912080546001600160e01b031916909217600160a01b42909216919091021790558080850183801561230957506001600160a01b0387163b15155b15612380575b60405182906001600160a01b03891690600090600080516020613042833981519152908290a46123486000888480600101955088611e50565b612365576040516368d2bf6b60e11b815260040160405180910390fd5b8082141561230f57826001541461237b57600080fd5b6123b4565b5b6040516001830192906001600160a01b03891690600090600080516020613042833981519152908290a480821415612381575b50600155611ccb565b8280546123c990612bc6565b90600052602060002090601f0160209004810192826123eb5760008555612431565b82601f1061240457805160ff1916838001178555612431565b82800160010185558215612431579182015b82811115612431578251825591602001919060010190612416565b5061243d9291506124b5565b5090565b82805461244d90612bc6565b90600052602060002090601f01602090048101928261246f5760008555612431565b82601f106124885782800160ff19823516178555612431565b82800160010185558215612431579182015b8281111561243157823582559160200191906001019061249a565b5b8082111561243d57600081556001016124b6565b803561ffff811681146124dc57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b038111828210171561251f5761251f6124e1565b604052919050565b60006001600160401b03831115612540576125406124e1565b612553601f8401601f19166020016124f7565b905082815283838301111561256757600080fd5b828260208301376000602084830101529392505050565b600082601f83011261258f57600080fd5b6114d183833560208501612527565b80356001600160401b03811681146124dc57600080fd5b600080600080608085870312156125cb57600080fd5b6125d4856124ca565b935060208501356001600160401b03808211156125f057600080fd5b6125fc8883890161257e565b945061260a6040880161259e565b9350606087013591508082111561262057600080fd5b5061262d8782880161257e565b91505092959194509250565b6001600160e01b031981168114610c1857600080fd5b60006020828403121561266157600080fd5b81356114d181612639565b60005b8381101561268757818101518382015260200161266f565b838111156109a15750506000910152565b600081518084526126b081602086016020860161266c565b601f01601f19169290920160200192915050565b6020815260006114d16020830184612698565b6000602082840312156126e957600080fd5b5035919050565b6001600160a01b0381168114610c1857600080fd5b6000806040838503121561271857600080fd5b8235612723816126f0565b946020939093013593505050565b60008060006060848603121561274657600080fd5b8335612751816126f0565b92506020840135612761816126f0565b929592945050506040919091013590565b6000806040838503121561278557600080fd5b612723836124ca565b6000602082840312156127a057600080fd5b81356114d1816126f0565b6000602082840312156127bd57600080fd5b81356001600160401b038111156127d357600080fd5b8201601f810184136127e457600080fd5b611f3184823560208401612527565b60006020828403121561280557600080fd5b813560ff811681146114d157600080fd5b60006020828403121561282857600080fd5b6114d1826124ca565b60008060006060848603121561284657600080fd5b61284f846124ca565b925060208401356001600160401b0381111561286a57600080fd5b6128768682870161257e565b925050604084013590509250925092565b60006001600160401b038211156128a0576128a06124e1565b5060051b60200190565b600082601f8301126128bb57600080fd5b813560206128d06128cb83612887565b6124f7565b82815260059290921b840181019181810190868411156128ef57600080fd5b8286015b8481101561290a57803583529183019183016128f3565b509695505050505050565b6000806040838503121561292857600080fd5b82356001600160401b038082111561293f57600080fd5b818501915085601f83011261295357600080fd5b813560206129636128cb83612887565b82815260059290921b8401810191818101908984111561298257600080fd5b948201945b838610156129a957853561299a816126f0565b82529482019490820190612987565b965050860135925050808211156129bf57600080fd5b506129cc858286016128aa565b9150509250929050565b600080604083850312156129e957600080fd5b82356129f4816126f0565b915060208301358015158114612a0957600080fd5b809150509250929050565b60008060008060808587031215612a2a57600080fd5b8435612a35816126f0565b93506020850135612a45816126f0565b92506040850135915060608501356001600160401b03811115612a6757600080fd5b61262d8782880161257e565b60008083601f840112612a8557600080fd5b5081356001600160401b03811115612a9c57600080fd5b602083019150836020828501011115612ab457600080fd5b9250929050565b600080600080600060808688031215612ad357600080fd5b612adc866124ca565b945060208601356001600160401b0380821115612af857600080fd5b612b0489838a0161257e565b9550612b126040890161259e565b94506060880135915080821115612b2857600080fd5b50612b3588828901612a73565b969995985093965092949392505050565b60008060408385031215612b5957600080fd5b8235612b64816126f0565b91506020830135612a09816126f0565b600080600060408486031215612b8957600080fd5b612b92846124ca565b925060208401356001600160401b03811115612bad57600080fd5b612bb986828701612a73565b9497909650939450505050565b600181811c90821680612bda57607f821691505b60208210811415612bfb57634e487b7160e01b600052602260045260246000fd5b50919050565b6000808354612c0f81612bc6565b60018281168015612c275760018114612c3857612c67565b60ff19841687528287019450612c67565b8760005260208060002060005b85811015612c5e5781548a820152908401908201612c45565b50505082870194505b50929695505050505050565b61ffff85168152608060208201526000612c906080830186612698565b6001600160401b03851660408401528281036060840152612cb18185612698565b979650505050505050565b60008251612cce81846020870161266c565b9190910192915050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b61ffff861681526001600160a01b038516602082015260a060408201819052600090612d3b90830186612698565b84151560608401528281036080840152612d558185612698565b98975050505050505050565b60008060408385031215612d7457600080fd5b505080516020909101519092909150565b634e487b7160e01b600052601160045260246000fd5b60008219821115612dae57612dae612d85565b500190565b600082821015612dc557612dc5612d85565b500390565b634e487b7160e01b600052603260045260246000fd5b6000600019821415612df457612df4612d85565b5060010190565b60008351612e0d81846020880161266c565b835190830190612e2181836020880161266c565b01949350505050565b61ffff871681526000602060c08184015260008854612e4881612bc6565b8060c087015260e0600180841660008114612e6a5760018114612e7f57612ead565b60ff1985168984015261010089019550612ead565b8d6000528660002060005b85811015612ea55781548b8201860152908301908801612e8a565b8a0184019650505b50505050508381036040850152612ec48189612698565b915050612edc60608401876001600160a01b03169052565b6001600160a01b038516608084015282810360a0840152612efd8185612698565b9998505050505050505050565b8183823760009101908152919050565b61ffff86168152608060208201526000612f376080830187612698565b6001600160401b03861660408401528281036060840152838152838560208301376000602085830101526020601f19601f8601168201019150509695505050505050565b60008060408385031215612f8e57600080fd5b8251612f99816126f0565b6020939093015192949293505050565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090612fdc90830184612698565b9695505050505050565b600060208284031215612ff857600080fd5b81516114d181612639565b634e487b7160e01b600052601260045260246000fd5b60008261302857613028613003565b500490565b60008261303c5761303c613003565b50069056feddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa26469706673582212207dd69ed0da1d5703bbfc702b041f56cd5c694c6f82fa77ef2d7755ab85a6ffbb64736f6c634300080a0033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000140000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000003e90000000000000000000000000000000000000000000000000000000000000005000000000000000000000000000000000000000000000000000000000000018000000000000000000000000066a71dcef29a0ffbdbe3c6a460a3b5bc225cd67500000000000000000000000000000000000000000000000000000000626468d000000000000000000000000000000000000000000000000000000000000000084f6d6e696361747300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000074f4d4e4943415400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005a68747470733a2f2f697066732e696f2f697066732f6261667962656964626b7a7865687935336435677162716e636175346d33726e776f696734646b6b6d6478697a34336f6437376f327068656474612f6d657461646174612f000000000000
-----Decoded View---------------
Arg [0] : _name (string): Omnicats
Arg [1] : _token (string): OMNICAT
Arg [2] : _nextTokenId (uint256): 1
Arg [3] : _maxMint (uint256): 1001
Arg [4] : _mintPerWallet (uint256): 5
Arg [5] : baseURI_ (string): https://ipfs.io/ipfs/bafybeidbkzxehy53d5gqbqncau4m3rnwoig4dkkmdxiz43od77o2phedta/metadata/
Arg [6] : _layerZeroEndpoint (address): 0x66A71Dcef29A0fFBDBE3c6a460a3B5BC225Cd675
Arg [7] : _startTimestamp (uint256): 1650747600
-----Encoded View---------------
16 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000100
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000140
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000001
Arg [3] : 00000000000000000000000000000000000000000000000000000000000003e9
Arg [4] : 0000000000000000000000000000000000000000000000000000000000000005
Arg [5] : 0000000000000000000000000000000000000000000000000000000000000180
Arg [6] : 00000000000000000000000066a71dcef29a0ffbdbe3c6a460a3b5bc225cd675
Arg [7] : 00000000000000000000000000000000000000000000000000000000626468d0
Arg [8] : 0000000000000000000000000000000000000000000000000000000000000008
Arg [9] : 4f6d6e6963617473000000000000000000000000000000000000000000000000
Arg [10] : 0000000000000000000000000000000000000000000000000000000000000007
Arg [11] : 4f4d4e4943415400000000000000000000000000000000000000000000000000
Arg [12] : 000000000000000000000000000000000000000000000000000000000000005a
Arg [13] : 68747470733a2f2f697066732e696f2f697066732f6261667962656964626b7a
Arg [14] : 7865687935336435677162716e636175346d33726e776f696734646b6b6d6478
Arg [15] : 697a34336f6437376f327068656474612f6d657461646174612f000000000000
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.