Feature Tip: Add private address tag to any address under My Name Tag !
ERC-721
Overview
Max Total Supply
4,058 CUP
Holders
1,182
Market
Volume (24H)
N/A
Min Price (24H)
N/A
Max Price (24H)
N/A
Other Info
Token Contract
Balance
2 CUPLoading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
LoopyCups
Compiler Version
v0.8.10+commit.fc410830
Optimization Enabled:
Yes with 1000 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import "./tokens/interfaces/IChill.sol"; pragma solidity ^0.8.2; interface NFTContract is IERC721, IERC721Enumerable {} /** * @author Astrid Fox * @title Loopy Cups contract * @dev Extends ERC721 Non-Fungible Token Standard basic implementation * @custom:security-contact [email protected] */ contract LoopyCups is ERC721, ERC721Enumerable, Ownable, ReentrancyGuard { using Strings for uint256; uint256 public immutable MAX_TOKENS; uint256 public immutable MAX_FOR_SALE; uint256 public immutable MAX_FOR_CHILL_SALE; uint256 public immutable OFFSET_START; string public PROVENANCE; uint256 public SALE_END; uint256 public cupPrice = 0.025 ether; uint256 public cupChillPrice = 750 ether; uint public constant maxCupsPurchase = 20; bool public saleIsActive = false; // Base URI string public baseMetadataURI; // Backup URIs mapping (uint256 => string) public backupURIs; // Contract lock - when set, prevents altering the base URLs saved in the smart contract bool public locked = false; // Tracks how many Loopy Cups have been purchased with ETH uint256 public cupsPurchasedWithEth = 0; // Tracks how many Loopy Cups have been purchased with CHILL uint256 public cupsPurchasedWithChill = 0; // Tracks burnt tokens mapping (uint256 => bool) public burntCups; // Loopy Donuts smart contract NFTContract public immutable loopyDonuts; // Chill Token contract IChill public immutable chillToken; /** @param _name - Name of the ERC721 token. @param _symbol - Symbol of the ERC721 token. @param _maxSupply - Maximum number of tokens to allow minting. @param _maxForSale - Maximum number of tokens to allow selling. @param _maxForChillSale - Maximum number of tokens to allow selling with Chills. @param _saleEndTs - Timestamp in seconds of sale end. @param _provenance - The sha256 string of concatenated sha256 of all images in their natural order - AKA Provenance. @param _metadataURI - Base URI for token metadata @param _ldAddress - Address of the Loopy Donuts smart contract. @param _chillToken - Address of the Chill token */ constructor(string memory _name, string memory _symbol, uint256 _maxSupply, uint256 _maxForSale, uint256 _maxForChillSale, uint256 _saleEndTs, string memory _provenance, string memory _metadataURI, address _ldAddress, address _chillToken ) ERC721(_name, _symbol) { MAX_TOKENS = _maxSupply; MAX_FOR_SALE = _maxForSale; MAX_FOR_CHILL_SALE = _maxForChillSale; SALE_END = _saleEndTs; PROVENANCE = _provenance; baseMetadataURI = _metadataURI; loopyDonuts = NFTContract(_ldAddress); chillToken = IChill(_chillToken); OFFSET_START = MAX_TOKENS - MAX_FOR_SALE; } /** * @dev Throws if the contract is already locked */ modifier notLocked() { require(!locked, "Contract already locked."); _; } function withdraw() public onlyOwner { uint balance = address(this).balance; payable(msg.sender).transfer(balance); } function payTo(address to, uint256 amount) public onlyOwner { require(to != address(0), "Not allowed to send to 0 address"); uint balance = address(this).balance; require(amount <= balance, "Not enough balance"); payable(to).transfer(amount); } function _beforeTokenTransfer(address from, address to, uint256 tokenId) internal override(ERC721, ERC721Enumerable) { super._beforeTokenTransfer(from, to, tokenId); } function supportsInterface(bytes4 interfaceId) public view override(ERC721, ERC721Enumerable) returns (bool) { return super.supportsInterface(interfaceId); } /** * Reserve Loopy Cups. */ function reserveCups(address to, uint256 amount) public onlyOwner { uint offset = OFFSET_START + cupsPurchasedWithEth + cupsPurchasedWithChill; require(offset + amount <= MAX_TOKENS, "Reserving would exceed supply."); for (uint i = 0; i < amount; i++) { _safeMint(to, offset + i); } } /** * Sets the sale ending timestamp */ function setSaleEndTimestamp(uint256 newDate) public onlyOwner notLocked { SALE_END = newDate; } /* * Set provenance hash - in case there is an error. * Provenance hash is set in the contract construction time, * ideally there is no reason to ever call it. */ function setProvenanceHash(string memory provenanceHash) public onlyOwner notLocked { PROVENANCE = provenanceHash; } /** * @dev Pause sale if active, activate if paused */ function flipSaleState() public onlyOwner { saleIsActive = !saleIsActive; } /** * @dev Locks the contract - prevents changing it's properties. */ function lock() public onlyOwner notLocked { require(bytes(baseMetadataURI).length > 0, "Thou shall not lock prematurely!"); locked = true; } /** * @dev Sets the price for minting */ function setPrice(uint256 newPrice) external onlyOwner notLocked { require(newPrice > 0, "Invalid price."); cupPrice = newPrice; } /** * @dev Sets the price for minting */ function setChillPrice(uint256 newPrice) external onlyOwner notLocked { require(newPrice > 0, "Invalid price."); cupChillPrice = newPrice; } /** * @dev Sets the Metadata Base URI for computing the {tokenURI}. */ function setMetadataBaseURI(string memory newURI) public onlyOwner notLocked { baseMetadataURI = newURI; } /** * @dev Modifies the backup Base URI of `backupNumber`. */ function modifyBackupBaseURI(uint256 backupNumber, string memory newURI) external onlyOwner notLocked { backupURIs[backupNumber] = newURI; } /** * @dev Adds a new backup Base URI corresponding to `backupNumber`. * Allows adding new backups even after contract is locked. */ function addBackupBaseURI(uint256 backupNumber, string memory newURI) external onlyOwner { require(bytes(backupURIs[backupNumber]).length == 0, "LoopyCups: URI already exists for backupNumber"); backupURIs[backupNumber] = newURI; } /** * @dev Returns the tokenURI if exists. */ function tokenURI(uint256 tokenId) public view virtual override(ERC721) returns (string memory) { require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token"); // Deployer should make sure that the selected base has a trailing '/' return bytes(baseMetadataURI).length > 0 ? string( abi.encodePacked(baseMetadataURI, tokenId.toString(), ".json") ) : ""; } /** * @dev Returns the backup URI to the token's metadata - * as specified by the `backupNumber` */ function getBackupTokenURI(uint256 tokenId, uint256 backupNumber) public view returns (string memory) { require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token"); string memory backupURI = backupURIs[backupNumber]; require(bytes(backupURI).length > 0, "LoopyCups: Invalid backupNumber"); return string( abi.encodePacked(backupURI, tokenId.toString(), ".json") ); } /** * @dev Returns the base URI. Internal override method. */ function _baseURI() internal view override(ERC721) returns (string memory) { return baseMetadataURI; } /** * @dev Returns the base URI. Public facing method. */ function baseURI() public view returns (string memory) { return _baseURI(); } /** * @dev Returns an array of all the tokenIds owned by `ownerToCheck`. */ function tokensOfOwner(address ownerToCheck) public view returns (uint256[] memory) { uint256 balance = balanceOf(ownerToCheck); uint256[] memory tokenIds = new uint256[](balance); for (uint256 i = 0; i < balance; i++) { tokenIds[i] = tokenOfOwnerByIndex(ownerToCheck, i); } return tokenIds; } /** * @dev Claims all Loopy Cups for the Loopy Donuts holder `msg.sender` * which were not already claimed. */ function claimAll() public nonReentrant { require(saleIsActive, "Sale is not active."); uint balance = loopyDonuts.balanceOf(msg.sender); for (uint i = 0; i < balance; i++) { uint donutId = loopyDonuts.tokenOfOwnerByIndex(msg.sender, i); if (!(_exists(donutId) || burntCups[donutId])) { _safeMint(msg.sender, donutId); } } } /** * @dev Claims Loopy Cups for the holder `msg.sender` - * of unclaimed Loopy Donuts specified by `donutIds`. */ function claimSpecific(uint256[] calldata donutIds) external nonReentrant { require(saleIsActive, "Sale is not active."); for (uint i = 0; i < donutIds.length; i++) { uint donutId = donutIds[i]; require(msg.sender == loopyDonuts.ownerOf(donutId), "Not owner of Donut"); if (!(_exists(donutId) || burntCups[donutId])) { _safeMint(msg.sender, donutId); } } } /** * @dev Mints Loopy Cups. * Ether value sent must exactly match. */ function mintCups(uint toMint) public payable nonReentrant { require(saleIsActive && block.timestamp < SALE_END, "Sale is not active."); require(toMint <= maxCupsPurchase, "Can only mint 20 Cups at a time."); require(cupsPurchasedWithEth + cupsPurchasedWithChill + toMint <= MAX_FOR_SALE, "Not enough Cups for sale."); require(cupPrice * toMint == msg.value, "Ether value sent is not correct."); uint offset = OFFSET_START + cupsPurchasedWithEth + cupsPurchasedWithChill; cupsPurchasedWithEth += toMint; for(uint i = 0; i < toMint; i++) { _safeMint(msg.sender, offset + i); } } /** * @dev Mints Loopy Cups with Chill. * Ether value sent must exactly match. */ function mintCupsWithChill(uint toMint, uint fromWallet, uint[] calldata donutIds, uint[] calldata amounts) public nonReentrant { require(saleIsActive, "Sale is not active."); require(toMint <= maxCupsPurchase, "Can only mint 20 Cups at a time."); require(cupsPurchasedWithEth + cupsPurchasedWithChill + toMint <= MAX_FOR_SALE, "Not enough Cups for sale."); require(cupsPurchasedWithChill + toMint <= MAX_FOR_CHILL_SALE, "Not enough Cups for sale with CHILL."); uint totalChill = fromWallet; for(uint i = 0; i < amounts.length; i++) { totalChill += amounts[i]; } require(cupChillPrice * toMint == totalChill, "CHILL value sent is not correct."); if (fromWallet > 0) { chillToken.externalBurnFrom(msg.sender, fromWallet, 0, ""); } if (amounts.length > 0) { chillToken.externalSpendMultiple(msg.sender, donutIds, amounts, 0, ""); } uint offset = OFFSET_START + cupsPurchasedWithEth + cupsPurchasedWithChill; cupsPurchasedWithChill += toMint; for(uint i = 0; i < toMint; i++) { _safeMint(msg.sender, offset + i); } } /** * @dev Burns `tokenId`. See {ERC721-_burn}. * * Requirements: * * - The caller must own `tokenId` or be an approved operator. */ function burn(uint256 tokenId) public virtual { //solhint-disable-next-line max-line-length require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721Burnable: caller is not owner nor approved"); _burn(tokenId); burntCups[tokenId] = true; } }
// SPDX-License-Identifier: MIT 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() { _setOwner(_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 { _setOwner(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"); _setOwner(newOwner); } function _setOwner(address newOwner) private { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT 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 make it call a * `private` function that does the actual work. */ modifier nonReentrant() { // On the first call to nonReentrant, _notEntered will be true require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; _; // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./IERC721.sol"; import "./IERC721Receiver.sol"; import "./extensions/IERC721Metadata.sol"; import "../../utils/Address.sol"; import "../../utils/Context.sol"; import "../../utils/Strings.sol"; import "../../utils/introspection/ERC165.sol"; /** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */ contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _owners; // Mapping owner address to token count mapping(address => uint256) private _balances; // Mapping from token ID to approved address mapping(uint256 => address) private _tokenApprovals; // Mapping from owner to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; /** * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection. */ constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { return interfaceId == type(IERC721).interfaceId || interfaceId == type(IERC721Metadata).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721-balanceOf}. */ function balanceOf(address owner) public view virtual override returns (uint256) { require(owner != address(0), "ERC721: balance query for the zero address"); return _balances[owner]; } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view virtual override returns (address) { address owner = _owners[tokenId]; require(owner != address(0), "ERC721: owner query for nonexistent token"); return owner; } /** * @dev See {IERC721Metadata-name}. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev See {IERC721Metadata-symbol}. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token"); string memory baseURI = _baseURI(); return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : ""; } /** * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each * token will be the concatenation of the `baseURI` and the `tokenId`. Empty * by default, can be overriden in child contracts. */ function _baseURI() internal view virtual returns (string memory) { return ""; } /** * @dev See {IERC721-approve}. */ function approve(address to, uint256 tokenId) public virtual override { address owner = ERC721.ownerOf(tokenId); require(to != owner, "ERC721: approval to current owner"); require( _msgSender() == owner || isApprovedForAll(owner, _msgSender()), "ERC721: approve caller is not owner nor approved for all" ); _approve(to, tokenId); } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view virtual override returns (address) { require(_exists(tokenId), "ERC721: approved query for nonexistent token"); return _tokenApprovals[tokenId]; } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { require(operator != _msgSender(), "ERC721: approve to caller"); _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 { //solhint-disable-next-line max-line-length require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); _transfer(from, to, tokenId); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId ) public virtual override { safeTransferFrom(from, to, tokenId, ""); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory _data ) public virtual override { require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); _safeTransfer(from, to, tokenId, _data); } /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * `_data` is additional data, it has no specified format and it is sent in call to `to`. * * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g. * implement alternative mechanisms to perform token transfer, such as signature-based. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeTransfer( address from, address to, uint256 tokenId, bytes memory _data ) internal virtual { _transfer(from, to, tokenId); require(_checkOnERC721Received(from, to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer"); } /** * @dev Returns whether `tokenId` exists. * * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. * * Tokens start existing when they are minted (`_mint`), * and stop existing when they are burned (`_burn`). */ function _exists(uint256 tokenId) internal view virtual returns (bool) { return _owners[tokenId] != address(0); } /** * @dev Returns whether `spender` is allowed to manage `tokenId`. * * Requirements: * * - `tokenId` must exist. */ function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) { require(_exists(tokenId), "ERC721: operator query for nonexistent token"); address owner = ERC721.ownerOf(tokenId); return (spender == owner || getApproved(tokenId) == spender || isApprovedForAll(owner, spender)); } /** * @dev Safely mints `tokenId` and transfers it to `to`. * * Requirements: * * - `tokenId` must not exist. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeMint(address to, uint256 tokenId) internal virtual { _safeMint(to, tokenId, ""); } /** * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is * forwarded in {IERC721Receiver-onERC721Received} to contract recipients. */ function _safeMint( address to, uint256 tokenId, bytes memory _data ) internal virtual { _mint(to, tokenId); require( _checkOnERC721Received(address(0), to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer" ); } /** * @dev Mints `tokenId` and transfers it to `to`. * * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible * * Requirements: * * - `tokenId` must not exist. * - `to` cannot be the zero address. * * Emits a {Transfer} event. */ function _mint(address to, uint256 tokenId) internal virtual { require(to != address(0), "ERC721: mint to the zero address"); require(!_exists(tokenId), "ERC721: token already minted"); _beforeTokenTransfer(address(0), to, tokenId); _balances[to] += 1; _owners[tokenId] = to; emit Transfer(address(0), to, tokenId); } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId) internal virtual { address owner = ERC721.ownerOf(tokenId); _beforeTokenTransfer(owner, address(0), tokenId); // Clear approvals _approve(address(0), tokenId); _balances[owner] -= 1; delete _owners[tokenId]; emit Transfer(owner, address(0), tokenId); } /** * @dev Transfers `tokenId` from `from` to `to`. * As opposed to {transferFrom}, this imposes no restrictions on msg.sender. * * Requirements: * * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * * Emits a {Transfer} event. */ function _transfer( address from, address to, uint256 tokenId ) internal virtual { require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer of token that is not own"); require(to != address(0), "ERC721: transfer to the zero address"); _beforeTokenTransfer(from, to, tokenId); // Clear approvals from the previous owner _approve(address(0), tokenId); _balances[from] -= 1; _balances[to] += 1; _owners[tokenId] = to; emit Transfer(from, to, tokenId); } /** * @dev Approve `to` to operate on `tokenId` * * Emits a {Approval} event. */ function _approve(address to, uint256 tokenId) internal virtual { _tokenApprovals[tokenId] = to; emit Approval(ERC721.ownerOf(tokenId), to, tokenId); } /** * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address. * The call is not executed if the target address is not a contract. * * @param from address representing the previous owner of the given token ID * @param to target address that will receive the tokens * @param tokenId uint256 ID of the token to be transferred * @param _data bytes optional data to send along with the call * @return bool whether the call correctly returned the expected magic value */ function _checkOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) private returns (bool) { if (to.isContract()) { try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) { return retval == IERC721Receiver.onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert("ERC721: transfer to non ERC721Receiver implementer"); } else { assembly { revert(add(32, reason), mload(reason)) } } } } else { return true; } } /** * @dev Hook that is called before any token transfer. This includes minting * and burning. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, ``from``'s `tokenId` will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual {} }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../ERC721.sol"; import "./IERC721Enumerable.sol"; /** * @dev This implements an optional extension of {ERC721} defined in the EIP that adds * enumerability of all the token ids in the contract as well as all token ids owned by each * account. */ abstract contract ERC721Enumerable is ERC721, IERC721Enumerable { // Mapping from owner to list of owned token IDs mapping(address => mapping(uint256 => uint256)) private _ownedTokens; // Mapping from token ID to index of the owner tokens list mapping(uint256 => uint256) private _ownedTokensIndex; // Array with all token ids, used for enumeration uint256[] private _allTokens; // Mapping from token id to position in the allTokens array mapping(uint256 => uint256) private _allTokensIndex; /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC721) returns (bool) { return interfaceId == type(IERC721Enumerable).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}. */ function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256) { require(index < ERC721.balanceOf(owner), "ERC721Enumerable: owner index out of bounds"); return _ownedTokens[owner][index]; } /** * @dev See {IERC721Enumerable-totalSupply}. */ function totalSupply() public view virtual override returns (uint256) { return _allTokens.length; } /** * @dev See {IERC721Enumerable-tokenByIndex}. */ function tokenByIndex(uint256 index) public view virtual override returns (uint256) { require(index < ERC721Enumerable.totalSupply(), "ERC721Enumerable: global index out of bounds"); return _allTokens[index]; } /** * @dev Hook that is called before any token transfer. This includes minting * and burning. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, ``from``'s `tokenId` will be burned. * - `from` cannot be the zero address. * - `to` cannot be the zero address. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual override { super._beforeTokenTransfer(from, to, tokenId); if (from == address(0)) { _addTokenToAllTokensEnumeration(tokenId); } else if (from != to) { _removeTokenFromOwnerEnumeration(from, tokenId); } if (to == address(0)) { _removeTokenFromAllTokensEnumeration(tokenId); } else if (to != from) { _addTokenToOwnerEnumeration(to, tokenId); } } /** * @dev Private function to add a token to this extension's ownership-tracking data structures. * @param to address representing the new owner of the given token ID * @param tokenId uint256 ID of the token to be added to the tokens list of the given address */ function _addTokenToOwnerEnumeration(address to, uint256 tokenId) private { uint256 length = ERC721.balanceOf(to); _ownedTokens[to][length] = tokenId; _ownedTokensIndex[tokenId] = length; } /** * @dev Private function to add a token to this extension's token tracking data structures. * @param tokenId uint256 ID of the token to be added to the tokens list */ function _addTokenToAllTokensEnumeration(uint256 tokenId) private { _allTokensIndex[tokenId] = _allTokens.length; _allTokens.push(tokenId); } /** * @dev Private function to remove a token from this extension's ownership-tracking data structures. Note that * while the token is not assigned a new owner, the `_ownedTokensIndex` mapping is _not_ updated: this allows for * gas optimizations e.g. when performing a transfer operation (avoiding double writes). * This has O(1) time complexity, but alters the order of the _ownedTokens array. * @param from address representing the previous owner of the given token ID * @param tokenId uint256 ID of the token to be removed from the tokens list of the given address */ function _removeTokenFromOwnerEnumeration(address from, uint256 tokenId) private { // To prevent a gap in from's tokens array, we store the last token in the index of the token to delete, and // then delete the last slot (swap and pop). uint256 lastTokenIndex = ERC721.balanceOf(from) - 1; uint256 tokenIndex = _ownedTokensIndex[tokenId]; // When the token to delete is the last token, the swap operation is unnecessary if (tokenIndex != lastTokenIndex) { uint256 lastTokenId = _ownedTokens[from][lastTokenIndex]; _ownedTokens[from][tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token _ownedTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index } // This also deletes the contents at the last position of the array delete _ownedTokensIndex[tokenId]; delete _ownedTokens[from][lastTokenIndex]; } /** * @dev Private function to remove a token from this extension's token tracking data structures. * This has O(1) time complexity, but alters the order of the _allTokens array. * @param tokenId uint256 ID of the token to be removed from the tokens list */ function _removeTokenFromAllTokensEnumeration(uint256 tokenId) private { // To prevent a gap in the tokens array, we store the last token in the index of the token to delete, and // then delete the last slot (swap and pop). uint256 lastTokenIndex = _allTokens.length - 1; uint256 tokenIndex = _allTokensIndex[tokenId]; // When the token to delete is the last token, the swap operation is unnecessary. However, since this occurs so // rarely (when the last minted token is burnt) that we still do the swap here to avoid the gas cost of adding // an 'if' statement (like in _removeTokenFromOwnerEnumeration) uint256 lastTokenId = _allTokens[lastTokenIndex]; _allTokens[tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token _allTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index // This also deletes the contents at the last position of the array delete _allTokensIndex[tokenId]; _allTokens.pop(); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.2; import "./INFTYieldedToken.sol"; interface IChill is INFTYieldedToken{}
// SPDX-License-Identifier: MIT 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.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @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 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 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 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 pragma solidity ^0.8.0; import "./IERC165.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Enumerable is IERC721 { /** * @dev Returns the total amount of tokens stored by the contract. */ function totalSupply() external view returns (uint256); /** * @dev Returns a token ID owned by `owner` at a given `index` of its token list. * Use along with {balanceOf} to enumerate all of ``owner``'s tokens. */ function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256 tokenId); /** * @dev Returns a token ID at a given `index` of all the tokens stored by the contract. * Use along with {totalSupply} to enumerate all tokens. */ function tokenByIndex(uint256 index) external view returns (uint256); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.2; import "./IUtilityToken.sol"; import "./ITimeYieldedCredit.sol"; interface INFTYieldedToken is IUtilityToken, ITimeYieldedCredit { /** * @dev Returns the amount claimable by the owner of `tokenId`. * * Requirements: * * - `tokenId` must exist. */ function getClaimableAmount(uint256 tokenId) external view returns (uint256); /** * @dev Returns an array of amounts claimable by `addr`. * If `addr` doesn't own any tokens, returns an empty array. */ function getClaimableForAddress(address addr) external view returns (uint256[] memory, uint256[] memory); /** * @dev Spends `amount` credit from `tokenId`'s balance - * for the consumption of an external service identified by `serviceId`. * Optionally sending additional `data`. * * Requirements: * * See {NFTYieldedToken._spend} */ function spend( uint256 tokenId, uint256 amount, uint256 serviceId, bytes calldata data ) external; /** * @dev Claims `amount` credit as tokens from `tokenId`'s balance. * * Requirements: * * See {NFTYieldedToken._spend} */ function claim(uint256 tokenId, uint256 amount) external; /** * @dev Spends `amount` credit from `tokenId`'s balance on behalf of `account`- * for the consumption of an external service identified by `serviceId`. * Optionally sending additional `data`. * * Requirements: * * See {NFTYieldedToken._spendFrom} */ function spendFrom( address account, uint256 tokenId, uint256 amount, uint256 serviceId, bytes calldata data ) external; /** * @dev Claims `amount` credit as tokens from `tokenId`'s balance on behalf of `account`- * The tokens are minted to the address `to`. * * Requirements: * * See {NFTYieldedToken._spendFrom} */ function claimFrom( address account, uint256 tokenId, uint256 amount, address to ) external; /** * @dev Spends credit from multiple `tokenIds` as specified by `amounts`- * for the consumption of an external service identified by `serviceId`. * Optionally sending additional `data`. * * Requirements: * * See {NFTYieldedToken._spendMultiple} */ function spendMultiple( uint256[] calldata tokenIds, uint256[] calldata amounts, uint256 serviceId, bytes calldata data ) external; /** * @dev Spends credit from multiple `tokenIds` - owned by `account` - as specified by `amounts`- * for the consumption of an external service identified by `serviceId`. * Optionally sending additional `data`. * * Requirements: * * See {NFTYieldedToken._spendMultiple} */ function externalSpendMultiple( address account, uint256[] calldata tokenIds, uint256[] calldata amounts, uint256 serviceId, bytes calldata data ) external; /** * @dev Claims credit as tokens from multiple `tokenIds` as specified by `amounts`. * * Requirements: * * See {NFTYieldedToken._spendMultiple} */ function claimMultiple( uint256[] calldata tokenIds, uint256[] calldata amounts ) external; /** * @dev Claims all the available credit as the token for `tokenId`. * * Requirements: * * - The caller must own `tokenId`. * * - `tokenId` must exist. */ function claimAll(uint256 tokenId) external; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.2; import "@openzeppelin/contracts/interfaces/IERC20.sol"; interface IUtilityToken is IERC20{ /** * @dev Destroys `amount` tokens from the caller. * * See {ERC20-_burn}. */ function burn( uint256 amount, uint256 serviceId, bytes calldata data ) external; /** * @dev Destroys `amount` tokens from `account`, deducting from the caller's * allowance. * * See {ERC20-_burn} and {ERC20-allowance}. * * Requirements: * * - the caller must have allowance for ``accounts``'s tokens of at least * `amount`. */ function burnFrom( address account, uint256 amount, uint256 serviceId, bytes calldata data ) external; /** * @dev Destroys `amount` tokens from `account`. * * See {ERC20-_burn}. * * Requirements: * * - The sender must be granted the EXTERNAL_SPENDER_ROLE role. */ function externalBurnFrom( address account, uint256 amount, uint256 serviceId, bytes calldata data ) external; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.2; interface ITimeYieldedCredit { function getCurrentYield() external view returns(uint256); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../token/ERC20/IERC20.sol";
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); }
{ "optimizer": { "enabled": true, "runs": 1000 }, "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":"_symbol","type":"string"},{"internalType":"uint256","name":"_maxSupply","type":"uint256"},{"internalType":"uint256","name":"_maxForSale","type":"uint256"},{"internalType":"uint256","name":"_maxForChillSale","type":"uint256"},{"internalType":"uint256","name":"_saleEndTs","type":"uint256"},{"internalType":"string","name":"_provenance","type":"string"},{"internalType":"string","name":"_metadataURI","type":"string"},{"internalType":"address","name":"_ldAddress","type":"address"},{"internalType":"address","name":"_chillToken","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"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_FOR_CHILL_SALE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_FOR_SALE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_TOKENS","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"OFFSET_START","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PROVENANCE","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"SALE_END","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"backupNumber","type":"uint256"},{"internalType":"string","name":"newURI","type":"string"}],"name":"addBackupBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"backupURIs","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"baseMetadataURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"baseURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"burntCups","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"chillToken","outputs":[{"internalType":"contract IChill","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"claimAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"donutIds","type":"uint256[]"}],"name":"claimSpecific","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"cupChillPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"cupPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"cupsPurchasedWithChill","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"cupsPurchasedWithEth","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"flipSaleState","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"backupNumber","type":"uint256"}],"name":"getBackupTokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lock","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"locked","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"loopyDonuts","outputs":[{"internalType":"contract NFTContract","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxCupsPurchase","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"toMint","type":"uint256"}],"name":"mintCups","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"toMint","type":"uint256"},{"internalType":"uint256","name":"fromWallet","type":"uint256"},{"internalType":"uint256[]","name":"donutIds","type":"uint256[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"name":"mintCupsWithChill","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"backupNumber","type":"uint256"},{"internalType":"string","name":"newURI","type":"string"}],"name":"modifyBackupBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"payTo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"reserveCups","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"saleIsActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newPrice","type":"uint256"}],"name":"setChillPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"newURI","type":"string"}],"name":"setMetadataBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newPrice","type":"uint256"}],"name":"setPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"provenanceHash","type":"string"}],"name":"setProvenanceHash","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newDate","type":"uint256"}],"name":"setSaleEndTimestamp","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"ownerToCheck","type":"address"}],"name":"tokensOfOwner","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
6101406040526658d15e17628000600e556828a857425466f80000600f556010805460ff19908116909155601380549091169055600060148190556015553480156200004a57600080fd5b5060405162004739380380620047398339810160408190526200006d916200031f565b89518a908a90620000869060009060208501906200018f565b5080516200009c9060019060208401906200018f565b505050620000b9620000b36200013960201b60201c565b6200013d565b6001600b55608088905260a087905260c0869052600d8590558351620000e790600c9060208701906200018f565b508251620000fd9060119060208601906200018f565b506001600160a01b038083166101005281166101205260a05160805162000125919062000426565b60e052506200048998505050505050505050565b3390565b600a80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b8280546200019d906200044c565b90600052602060002090601f016020900481019282620001c157600085556200020c565b82601f10620001dc57805160ff19168380011785556200020c565b828001600101855582156200020c579182015b828111156200020c578251825591602001919060010190620001ef565b506200021a9291506200021e565b5090565b5b808211156200021a57600081556001016200021f565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126200025d57600080fd5b81516001600160401b03808211156200027a576200027a62000235565b604051601f8301601f19908116603f01168101908282118183101715620002a557620002a562000235565b81604052838152602092508683858801011115620002c257600080fd5b600091505b83821015620002e65785820183015181830184015290820190620002c7565b83821115620002f85760008385830101525b9695505050505050565b80516001600160a01b03811681146200031a57600080fd5b919050565b6000806000806000806000806000806101408b8d0312156200034057600080fd5b8a516001600160401b03808211156200035857600080fd5b620003668e838f016200024b565b9b5060208d01519150808211156200037d57600080fd5b6200038b8e838f016200024b565b9a5060408d0151995060608d0151985060808d0151975060a08d0151965060c08d0151915080821115620003be57600080fd5b620003cc8e838f016200024b565b955060e08d0151915080821115620003e357600080fd5b50620003f28d828e016200024b565b935050620004046101008c0162000302565b9150620004156101208c0162000302565b90509295989b9194979a5092959850565b6000828210156200044757634e487b7160e01b600052601160045260246000fd5b500390565b600181811c908216806200046157607f821691505b602082108114156200048357634e487b7160e01b600052602260045260246000fd5b50919050565b60805160a05160c05160e051610100516101205161420c6200052d600039600081816104ec01528181612a2b0152612ac601526000818161062501528181611368015281816123bf015261247701526000818161078401528181611a5901528181611f940152612b430152600081816106b8015261289a0152600081816107f601528181611ea60152612810015260008181610a5b0152611a90015261420c6000f3fe6080604052600436106103765760003560e01c80638462151c116101d1578063add1f1af11610102578063d1058e59116100a0578063f47c84c51161006f578063f47c84c514610a49578063f83d08ba14610a7d578063fb47193714610a92578063fb94bd8a14610ab257600080fd5b8063d1058e59146109b1578063e985e9c5146109c6578063eb8d244414610a0f578063f2fde38b14610a2957600080fd5b8063c2149ce3116100dc578063c2149ce31461094c578063c87b56dd14610962578063caf1085914610982578063cf3090121461099757600080fd5b8063add1f1af146108f6578063b0b5d7fb1461090c578063b88d4fde1461092c57600080fd5b806397b1072e1161016f578063a22cb46511610149578063a22cb46514610883578063a3b8edde146108a3578063a8359d87146108c3578063ad7c039e146108d657600080fd5b806397b1072e1461082d578063999437711461084d5780639aa0ff7b1461086d57600080fd5b80638da5cb5b116101ab5780638da5cb5b146107a657806391b7f5ed146107c45780639447e49a146107e457806395d89b411461081857600080fd5b80638462151c1461072f5780638a1170811461075c5780638ab932bd1461077257600080fd5b806342966c68116102ab5780636352211e11610249578063709485741161022357806370948574146106a657806370a08231146106da578063715018a6146106fa5780637bf086211461070f57600080fd5b80636352211e1461065c5780636373a6b11461067c5780636c0360eb1461069157600080fd5b806350f32e1d1161028557806350f32e1d146105d357806353b22feb146105f357806355a3db6d146106135780635b2bd79e1461064757600080fd5b806342966c68146105735780634e1a6552146105935780634f6ccce7146105b357600080fd5b806323b872dd1161031857806335f6f8e1116102f257806335f6f8e1146104da5780633ccfd60b1461050e5780633d7e90721461052357806342842e0e1461055357600080fd5b806323b872dd146104855780632f745c59146104a557806334918dfd146104c557600080fd5b8063095ea7b311610354578063095ea7b31461040a578063109695231461042c57806312f09fac1461044c57806318160ddd1461047057600080fd5b806301ffc9a71461037b57806306fdde03146103b0578063081812fc146103d2575b600080fd5b34801561038757600080fd5b5061039b610396366004613973565b610ad2565b60405190151581526020015b60405180910390f35b3480156103bc57600080fd5b506103c5610ae3565b6040516103a791906139ef565b3480156103de57600080fd5b506103f26103ed366004613a02565b610b75565b6040516001600160a01b0390911681526020016103a7565b34801561041657600080fd5b5061042a610425366004613a30565b610c0f565b005b34801561043857600080fd5b5061042a610447366004613b08565b610d41565b34801561045857600080fd5b5061046260155481565b6040519081526020016103a7565b34801561047c57600080fd5b50600854610462565b34801561049157600080fd5b5061042a6104a0366004613b3d565b610dee565b3480156104b157600080fd5b506104626104c0366004613a30565b610e76565b3480156104d157600080fd5b5061042a610f1e565b3480156104e657600080fd5b506103f27f000000000000000000000000000000000000000000000000000000000000000081565b34801561051a57600080fd5b5061042a610f7a565b34801561052f57600080fd5b5061039b61053e366004613a02565b60166020526000908152604090205460ff1681565b34801561055f57600080fd5b5061042a61056e366004613b3d565b610ff1565b34801561057f57600080fd5b5061042a61058e366004613a02565b61100c565b34801561059f57600080fd5b5061042a6105ae366004613b7e565b6110ab565b3480156105bf57600080fd5b506104626105ce366004613a02565b611160565b3480156105df57600080fd5b506103c56105ee366004613a02565b611204565b3480156105ff57600080fd5b5061042a61060e366004613c11565b61129e565b34801561061f57600080fd5b506103f27f000000000000000000000000000000000000000000000000000000000000000081565b34801561065357600080fd5b506103c56114b3565b34801561066857600080fd5b506103f2610677366004613a02565b6114c0565b34801561068857600080fd5b506103c561154b565b34801561069d57600080fd5b506103c5611558565b3480156106b257600080fd5b506104627f000000000000000000000000000000000000000000000000000000000000000081565b3480156106e657600080fd5b506104626106f5366004613c53565b611567565b34801561070657600080fd5b5061042a611601565b34801561071b57600080fd5b5061042a61072a366004613a30565b611655565b34801561073b57600080fd5b5061074f61074a366004613c53565b611780565b6040516103a79190613c70565b34801561076857600080fd5b5061046260145481565b34801561077e57600080fd5b506104627f000000000000000000000000000000000000000000000000000000000000000081565b3480156107b257600080fd5b50600a546001600160a01b03166103f2565b3480156107d057600080fd5b5061042a6107df366004613a02565b611822565b3480156107f057600080fd5b506104627f000000000000000000000000000000000000000000000000000000000000000081565b34801561082457600080fd5b506103c561190d565b34801561083957600080fd5b5061042a610848366004613a02565b61191c565b34801561085957600080fd5b5061042a610868366004613a30565b611a07565b34801561087957600080fd5b50610462600d5481565b34801561088f57600080fd5b5061042a61089e366004613cb4565b611b37565b3480156108af57600080fd5b506103c56108be366004613cf2565b611bfc565b61042a6108d1366004613a02565b611da6565b3480156108e257600080fd5b5061042a6108f1366004613a02565b61200c565b34801561090257600080fd5b50610462600e5481565b34801561091857600080fd5b5061042a610927366004613b7e565b6120a7565b34801561093857600080fd5b5061042a610947366004613d14565b61217d565b34801561095857600080fd5b50610462600f5481565b34801561096e57600080fd5b506103c561097d366004613a02565b612205565b34801561098e57600080fd5b50610462601481565b3480156109a357600080fd5b5060135461039b9060ff1681565b3480156109bd57600080fd5b5061042a6122ee565b3480156109d257600080fd5b5061039b6109e1366004613d94565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b348015610a1b57600080fd5b5060105461039b9060ff1681565b348015610a3557600080fd5b5061042a610a44366004613c53565b61254a565b348015610a5557600080fd5b506104627f000000000000000000000000000000000000000000000000000000000000000081565b348015610a8957600080fd5b5061042a61261a565b348015610a9e57600080fd5b5061042a610aad366004613dc2565b61271d565b348015610abe57600080fd5b5061042a610acd366004613b08565b612bcb565b6000610add82612c74565b92915050565b606060008054610af290613e45565b80601f0160208091040260200160405190810160405280929190818152602001828054610b1e90613e45565b8015610b6b5780601f10610b4057610100808354040283529160200191610b6b565b820191906000526020600020905b815481529060010190602001808311610b4e57829003601f168201915b5050505050905090565b6000818152600260205260408120546001600160a01b0316610bf35760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084015b60405180910390fd5b506000908152600460205260409020546001600160a01b031690565b6000610c1a826114c0565b9050806001600160a01b0316836001600160a01b03161415610ca45760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560448201527f72000000000000000000000000000000000000000000000000000000000000006064820152608401610bea565b336001600160a01b0382161480610cc05750610cc081336109e1565b610d325760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c00000000000000006064820152608401610bea565b610d3c8383612cb2565b505050565b600a546001600160a01b03163314610d895760405162461bcd60e51b815260206004820181905260248201526000805160206141b78339815191526044820152606401610bea565b60135460ff1615610dd75760405162461bcd60e51b815260206004820152601860248201527721b7b73a3930b1ba1030b63932b0b23c903637b1b5b2b21760411b6044820152606401610bea565b8051610dea90600c9060208401906138c4565b5050565b610df9335b82612d20565b610e6b5760405162461bcd60e51b815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60448201527f776e6572206e6f7220617070726f7665640000000000000000000000000000006064820152608401610bea565b610d3c838383612e17565b6000610e8183611567565b8210610ef55760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201527f74206f6620626f756e64730000000000000000000000000000000000000000006064820152608401610bea565b506001600160a01b03919091166000908152600660209081526040808320938352929052205490565b600a546001600160a01b03163314610f665760405162461bcd60e51b815260206004820181905260248201526000805160206141b78339815191526044820152606401610bea565b6010805460ff19811660ff90911615179055565b600a546001600160a01b03163314610fc25760405162461bcd60e51b815260206004820181905260248201526000805160206141b78339815191526044820152606401610bea565b6040514790339082156108fc029083906000818181858888f19350505050158015610dea573d6000803e3d6000fd5b610d3c8383836040518060200160405280600081525061217d565b61101533610df3565b6110875760405162461bcd60e51b815260206004820152603060248201527f4552433732314275726e61626c653a2063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f766564000000000000000000000000000000006064820152608401610bea565b61109081612fef565b6000908152601660205260409020805460ff19166001179055565b600a546001600160a01b031633146110f35760405162461bcd60e51b815260206004820181905260248201526000805160206141b78339815191526044820152606401610bea565b60135460ff16156111415760405162461bcd60e51b815260206004820152601860248201527721b7b73a3930b1ba1030b63932b0b23c903637b1b5b2b21760411b6044820152606401610bea565b60008281526012602090815260409091208251610d3c928401906138c4565b600061116b60085490565b82106111df5760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201527f7574206f6620626f756e647300000000000000000000000000000000000000006064820152608401610bea565b600882815481106111f2576111f2613e80565b90600052602060002001549050919050565b6012602052600090815260409020805461121d90613e45565b80601f016020809104026020016040519081016040528092919081815260200182805461124990613e45565b80156112965780601f1061126b57610100808354040283529160200191611296565b820191906000526020600020905b81548152906001019060200180831161127957829003601f168201915b505050505081565b6002600b5414156112f15760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610bea565b6002600b5560105460ff1661133e5760405162461bcd60e51b815260206004820152601360248201527229b0b6329034b9903737ba1030b1ba34bb329760691b6044820152606401610bea565b60005b818110156114a957600083838381811061135d5761135d613e80565b9050602002013590507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316636352211e826040518263ffffffff1660e01b81526004016113b491815260200190565b602060405180830381865afa1580156113d1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113f59190613e96565b6001600160a01b0316336001600160a01b0316146114555760405162461bcd60e51b815260206004820152601260248201527f4e6f74206f776e6572206f6620446f6e757400000000000000000000000000006044820152606401610bea565b6000818152600260205260409020546001600160a01b0316151580611488575060008181526016602052604090205460ff165b611496576114963382613096565b50806114a181613ec9565b915050611341565b50506001600b5550565b6011805461121d90613e45565b6000818152600260205260408120546001600160a01b031680610add5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201527f656e7420746f6b656e00000000000000000000000000000000000000000000006064820152608401610bea565b600c805461121d90613e45565b60606115626130b0565b905090565b60006001600160a01b0382166115e55760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a6560448201527f726f2061646472657373000000000000000000000000000000000000000000006064820152608401610bea565b506001600160a01b031660009081526003602052604090205490565b600a546001600160a01b031633146116495760405162461bcd60e51b815260206004820181905260248201526000805160206141b78339815191526044820152606401610bea565b61165360006130bf565b565b600a546001600160a01b0316331461169d5760405162461bcd60e51b815260206004820181905260248201526000805160206141b78339815191526044820152606401610bea565b6001600160a01b0382166116f35760405162461bcd60e51b815260206004820181905260248201527f4e6f7420616c6c6f77656420746f2073656e6420746f203020616464726573736044820152606401610bea565b47808211156117445760405162461bcd60e51b815260206004820152601260248201527f4e6f7420656e6f7567682062616c616e636500000000000000000000000000006044820152606401610bea565b6040516001600160a01b0384169083156108fc029084906000818181858888f1935050505015801561177a573d6000803e3d6000fd5b50505050565b6060600061178d83611567565b905060008167ffffffffffffffff8111156117aa576117aa613a5c565b6040519080825280602002602001820160405280156117d3578160200160208202803683370190505b50905060005b8281101561181a576117eb8582610e76565b8282815181106117fd576117fd613e80565b60209081029190910101528061181281613ec9565b9150506117d9565b509392505050565b600a546001600160a01b0316331461186a5760405162461bcd60e51b815260206004820181905260248201526000805160206141b78339815191526044820152606401610bea565b60135460ff16156118b85760405162461bcd60e51b815260206004820152601860248201527721b7b73a3930b1ba1030b63932b0b23c903637b1b5b2b21760411b6044820152606401610bea565b600081116119085760405162461bcd60e51b815260206004820152600e60248201527f496e76616c69642070726963652e0000000000000000000000000000000000006044820152606401610bea565b600e55565b606060018054610af290613e45565b600a546001600160a01b031633146119645760405162461bcd60e51b815260206004820181905260248201526000805160206141b78339815191526044820152606401610bea565b60135460ff16156119b25760405162461bcd60e51b815260206004820152601860248201527721b7b73a3930b1ba1030b63932b0b23c903637b1b5b2b21760411b6044820152606401610bea565b60008111611a025760405162461bcd60e51b815260206004820152600e60248201527f496e76616c69642070726963652e0000000000000000000000000000000000006044820152606401610bea565b600f55565b600a546001600160a01b03163314611a4f5760405162461bcd60e51b815260206004820181905260248201526000805160206141b78339815191526044820152606401610bea565b60006015546014547f0000000000000000000000000000000000000000000000000000000000000000611a829190613ee4565b611a8c9190613ee4565b90507f0000000000000000000000000000000000000000000000000000000000000000611ab98383613ee4565b1115611b075760405162461bcd60e51b815260206004820152601e60248201527f526573657276696e6720776f756c642065786365656420737570706c792e00006044820152606401610bea565b60005b8281101561177a57611b2584611b208385613ee4565b613096565b80611b2f81613ec9565b915050611b0a565b6001600160a01b038216331415611b905760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610bea565b3360008181526005602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6000828152600260205260409020546060906001600160a01b0316611c895760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201527f6e6578697374656e7420746f6b656e00000000000000000000000000000000006064820152608401610bea565b60008281526012602052604081208054611ca290613e45565b80601f0160208091040260200160405190810160405280929190818152602001828054611cce90613e45565b8015611d1b5780601f10611cf057610100808354040283529160200191611d1b565b820191906000526020600020905b815481529060010190602001808311611cfe57829003601f168201915b505050505090506000815111611d735760405162461bcd60e51b815260206004820152601f60248201527f4c6f6f7079437570733a20496e76616c6964206261636b75704e756d626572006044820152606401610bea565b80611d7d85613111565b604051602001611d8e929190613f18565b60405160208183030381529060405291505092915050565b6002600b541415611df95760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610bea565b6002600b5560105460ff168015611e115750600d5442105b611e535760405162461bcd60e51b815260206004820152601360248201527229b0b6329034b9903737ba1030b1ba34bb329760691b6044820152606401610bea565b6014811115611ea45760405162461bcd60e51b815260206004820181905260248201527f43616e206f6e6c79206d696e74203230204375707320617420612074696d652e6044820152606401610bea565b7f000000000000000000000000000000000000000000000000000000000000000081601554601454611ed69190613ee4565b611ee09190613ee4565b1115611f2e5760405162461bcd60e51b815260206004820152601960248201527f4e6f7420656e6f756768204375707320666f722073616c652e000000000000006044820152606401610bea565b3481600e54611f3d9190613f57565b14611f8a5760405162461bcd60e51b815260206004820181905260248201527f45746865722076616c75652073656e74206973206e6f7420636f72726563742e6044820152606401610bea565b60006015546014547f0000000000000000000000000000000000000000000000000000000000000000611fbd9190613ee4565b611fc79190613ee4565b90508160146000828254611fdb9190613ee4565b90915550600090505b828110156114a957611ffa33611b208385613ee4565b8061200481613ec9565b915050611fe4565b600a546001600160a01b031633146120545760405162461bcd60e51b815260206004820181905260248201526000805160206141b78339815191526044820152606401610bea565b60135460ff16156120a25760405162461bcd60e51b815260206004820152601860248201527721b7b73a3930b1ba1030b63932b0b23c903637b1b5b2b21760411b6044820152606401610bea565b600d55565b600a546001600160a01b031633146120ef5760405162461bcd60e51b815260206004820181905260248201526000805160206141b78339815191526044820152606401610bea565b6000828152601260205260409020805461210890613e45565b1590506111415760405162461bcd60e51b815260206004820152602e60248201527f4c6f6f7079437570733a2055524920616c72656164792065786973747320666f60448201527f72206261636b75704e756d6265720000000000000000000000000000000000006064820152608401610bea565b6121873383612d20565b6121f95760405162461bcd60e51b815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60448201527f776e6572206e6f7220617070726f7665640000000000000000000000000000006064820152608401610bea565b61177a84848484613243565b6000818152600260205260409020546060906001600160a01b03166122925760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201527f6e6578697374656e7420746f6b656e00000000000000000000000000000000006064820152608401610bea565b6000601180546122a190613e45565b9050116122bd5760405180602001604052806000815250610add565b60116122c883613111565b6040516020016122d9929190613f76565b60405160208183030381529060405292915050565b6002600b5414156123415760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610bea565b6002600b5560105460ff1661238e5760405162461bcd60e51b815260206004820152601360248201527229b0b6329034b9903737ba1030b1ba34bb329760691b6044820152606401610bea565b6040517f70a082310000000000000000000000000000000000000000000000000000000081523360048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa15801561240e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124329190614031565b905060005b81811015612541576040517f2f745c59000000000000000000000000000000000000000000000000000000008152336004820152602481018290526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690632f745c5990604401602060405180830381865afa1580156124c6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124ea9190614031565b6000818152600260205260409020549091506001600160a01b0316151580612520575060008181526016602052604090205460ff165b61252e5761252e3382613096565b508061253981613ec9565b915050612437565b50506001600b55565b600a546001600160a01b031633146125925760405162461bcd60e51b815260206004820181905260248201526000805160206141b78339815191526044820152606401610bea565b6001600160a01b03811661260e5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610bea565b612617816130bf565b50565b600a546001600160a01b031633146126625760405162461bcd60e51b815260206004820181905260248201526000805160206141b78339815191526044820152606401610bea565b60135460ff16156126b05760405162461bcd60e51b815260206004820152601860248201527721b7b73a3930b1ba1030b63932b0b23c903637b1b5b2b21760411b6044820152606401610bea565b6000601180546126bf90613e45565b90501161270e5760405162461bcd60e51b815260206004820181905260248201527f54686f75207368616c6c206e6f74206c6f636b207072656d61747572656c79216044820152606401610bea565b6013805460ff19166001179055565b6002600b5414156127705760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610bea565b6002600b5560105460ff166127bd5760405162461bcd60e51b815260206004820152601360248201527229b0b6329034b9903737ba1030b1ba34bb329760691b6044820152606401610bea565b601486111561280e5760405162461bcd60e51b815260206004820181905260248201527f43616e206f6e6c79206d696e74203230204375707320617420612074696d652e6044820152606401610bea565b7f0000000000000000000000000000000000000000000000000000000000000000866015546014546128409190613ee4565b61284a9190613ee4565b11156128985760405162461bcd60e51b815260206004820152601960248201527f4e6f7420656e6f756768204375707320666f722073616c652e000000000000006044820152606401610bea565b7f0000000000000000000000000000000000000000000000000000000000000000866015546128c79190613ee4565b111561293a5760405162461bcd60e51b8152602060048201526024808201527f4e6f7420656e6f756768204375707320666f722073616c65207769746820434860448201527f494c4c2e000000000000000000000000000000000000000000000000000000006064820152608401610bea565b8460005b8281101561297e5783838281811061295857612958613e80565b905060200201358261296a9190613ee4565b91508061297681613ec9565b91505061293e565b508087600f5461298e9190613f57565b146129db5760405162461bcd60e51b815260206004820181905260248201527f4348494c4c2076616c75652073656e74206973206e6f7420636f72726563742e6044820152606401610bea565b8515612a90576040517f03374a8c000000000000000000000000000000000000000000000000000000008152336004820152602481018790526000604482018190526080606483015260848201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906303374a8c9060a401600060405180830381600087803b158015612a7757600080fd5b505af1158015612a8b573d6000803e3d6000fd5b505050505b8115612b39576040517fba73e9f90000000000000000000000000000000000000000000000000000000081526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063ba73e9f990612b069033908990899089908990600090600401614099565b600060405180830381600087803b158015612b2057600080fd5b505af1158015612b34573d6000803e3d6000fd5b505050505b60006015546014547f0000000000000000000000000000000000000000000000000000000000000000612b6c9190613ee4565b612b769190613ee4565b90508760156000828254612b8a9190613ee4565b90915550600090505b88811015612bbb57612ba933611b208385613ee4565b80612bb381613ec9565b915050612b93565b50506001600b5550505050505050565b600a546001600160a01b03163314612c135760405162461bcd60e51b815260206004820181905260248201526000805160206141b78339815191526044820152606401610bea565b60135460ff1615612c615760405162461bcd60e51b815260206004820152601860248201527721b7b73a3930b1ba1030b63932b0b23c903637b1b5b2b21760411b6044820152606401610bea565b8051610dea9060119060208401906138c4565b60006001600160e01b031982167f780e9d63000000000000000000000000000000000000000000000000000000001480610add5750610add826132c1565b600081815260046020526040902080546001600160a01b0319166001600160a01b0384169081179091558190612ce7826114c0565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000818152600260205260408120546001600160a01b0316612d995760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610bea565b6000612da4836114c0565b9050806001600160a01b0316846001600160a01b03161480612ddf5750836001600160a01b0316612dd484610b75565b6001600160a01b0316145b80612e0f57506001600160a01b0380821660009081526005602090815260408083209388168352929052205460ff165b949350505050565b826001600160a01b0316612e2a826114c0565b6001600160a01b031614612ea65760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201527f73206e6f74206f776e00000000000000000000000000000000000000000000006064820152608401610bea565b6001600160a01b038216612f215760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152608401610bea565b612f2c83838361335c565b612f37600082612cb2565b6001600160a01b0383166000908152600360205260408120805460019290612f609084906140f2565b90915550506001600160a01b0382166000908152600360205260408120805460019290612f8e908490613ee4565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b6000612ffa826114c0565b90506130088160008461335c565b613013600083612cb2565b6001600160a01b038116600090815260036020526040812080546001929061303c9084906140f2565b909155505060008281526002602052604080822080546001600160a01b0319169055518391906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b610dea828260405180602001604052806000815250613367565b606060118054610af290613e45565b600a80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60608161315157505060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b8160005b811561317b578061316581613ec9565b91506131749050600a8361411f565b9150613155565b60008167ffffffffffffffff81111561319657613196613a5c565b6040519080825280601f01601f1916602001820160405280156131c0576020820181803683370190505b5090505b8415612e0f576131d56001836140f2565b91506131e2600a86614133565b6131ed906030613ee4565b60f81b81838151811061320257613202613e80565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535061323c600a8661411f565b94506131c4565b61324e848484612e17565b61325a848484846133e5565b61177a5760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b6064820152608401610bea565b60006001600160e01b031982167f80ac58cd00000000000000000000000000000000000000000000000000000000148061332457506001600160e01b031982167f5b5e139f00000000000000000000000000000000000000000000000000000000145b80610add57507f01ffc9a7000000000000000000000000000000000000000000000000000000006001600160e01b0319831614610add565b610d3c83838361352e565b61337183836135e6565b61337e60008484846133e5565b610d3c5760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b6064820152608401610bea565b60006001600160a01b0384163b1561352357604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290613429903390899088908890600401614147565b6020604051808303816000875af1925050508015613464575060408051601f3d908101601f1916820190925261346191810190614183565b60015b613509573d808015613492576040519150601f19603f3d011682016040523d82523d6000602084013e613497565b606091505b5080516135015760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b6064820152608401610bea565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050612e0f565b506001949350505050565b6001600160a01b0383166135895761358481600880546000838152600960205260408120829055600182018355919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b6135ac565b816001600160a01b0316836001600160a01b0316146135ac576135ac8382613734565b6001600160a01b0382166135c357610d3c816137d1565b826001600160a01b0316826001600160a01b031614610d3c57610d3c8282613880565b6001600160a01b03821661363c5760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610bea565b6000818152600260205260409020546001600160a01b0316156136a15760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610bea565b6136ad6000838361335c565b6001600160a01b03821660009081526003602052604081208054600192906136d6908490613ee4565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b6000600161374184611567565b61374b91906140f2565b60008381526007602052604090205490915080821461379e576001600160a01b03841660009081526006602090815260408083208584528252808320548484528184208190558352600790915290208190555b5060009182526007602090815260408084208490556001600160a01b039094168352600681528383209183525290812055565b6008546000906137e3906001906140f2565b6000838152600960205260408120546008805493945090928490811061380b5761380b613e80565b90600052602060002001549050806008838154811061382c5761382c613e80565b6000918252602080832090910192909255828152600990915260408082208490558582528120556008805480613864576138646141a0565b6001900381819060005260206000200160009055905550505050565b600061388b83611567565b6001600160a01b039093166000908152600660209081526040808320868452825280832085905593825260079052919091209190915550565b8280546138d090613e45565b90600052602060002090601f0160209004810192826138f25760008555613938565b82601f1061390b57805160ff1916838001178555613938565b82800160010185558215613938579182015b8281111561393857825182559160200191906001019061391d565b50613944929150613948565b5090565b5b808211156139445760008155600101613949565b6001600160e01b03198116811461261757600080fd5b60006020828403121561398557600080fd5b81356139908161395d565b9392505050565b60005b838110156139b257818101518382015260200161399a565b8381111561177a5750506000910152565b600081518084526139db816020860160208601613997565b601f01601f19169290920160200192915050565b60208152600061399060208301846139c3565b600060208284031215613a1457600080fd5b5035919050565b6001600160a01b038116811461261757600080fd5b60008060408385031215613a4357600080fd5b8235613a4e81613a1b565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b600067ffffffffffffffff80841115613a8d57613a8d613a5c565b604051601f8501601f19908116603f01168101908282118183101715613ab557613ab5613a5c565b81604052809350858152868686011115613ace57600080fd5b858560208301376000602087830101525050509392505050565b600082601f830112613af957600080fd5b61399083833560208501613a72565b600060208284031215613b1a57600080fd5b813567ffffffffffffffff811115613b3157600080fd5b612e0f84828501613ae8565b600080600060608486031215613b5257600080fd5b8335613b5d81613a1b565b92506020840135613b6d81613a1b565b929592945050506040919091013590565b60008060408385031215613b9157600080fd5b82359150602083013567ffffffffffffffff811115613baf57600080fd5b613bbb85828601613ae8565b9150509250929050565b60008083601f840112613bd757600080fd5b50813567ffffffffffffffff811115613bef57600080fd5b6020830191508360208260051b8501011115613c0a57600080fd5b9250929050565b60008060208385031215613c2457600080fd5b823567ffffffffffffffff811115613c3b57600080fd5b613c4785828601613bc5565b90969095509350505050565b600060208284031215613c6557600080fd5b813561399081613a1b565b6020808252825182820181905260009190848201906040850190845b81811015613ca857835183529284019291840191600101613c8c565b50909695505050505050565b60008060408385031215613cc757600080fd5b8235613cd281613a1b565b915060208301358015158114613ce757600080fd5b809150509250929050565b60008060408385031215613d0557600080fd5b50508035926020909101359150565b60008060008060808587031215613d2a57600080fd5b8435613d3581613a1b565b93506020850135613d4581613a1b565b925060408501359150606085013567ffffffffffffffff811115613d6857600080fd5b8501601f81018713613d7957600080fd5b613d8887823560208401613a72565b91505092959194509250565b60008060408385031215613da757600080fd5b8235613db281613a1b565b91506020830135613ce781613a1b565b60008060008060008060808789031215613ddb57600080fd5b8635955060208701359450604087013567ffffffffffffffff80821115613e0157600080fd5b613e0d8a838b01613bc5565b90965094506060890135915080821115613e2657600080fd5b50613e3389828a01613bc5565b979a9699509497509295939492505050565b600181811c90821680613e5957607f821691505b60208210811415613e7a57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052603260045260246000fd5b600060208284031215613ea857600080fd5b815161399081613a1b565b634e487b7160e01b600052601160045260246000fd5b6000600019821415613edd57613edd613eb3565b5060010190565b60008219821115613ef757613ef7613eb3565b500190565b60008151613f0e818560208601613997565b9290920192915050565b60008351613f2a818460208801613997565b835190830190613f3e818360208801613997565b64173539b7b760d91b9101908152600501949350505050565b6000816000190483118215151615613f7157613f71613eb3565b500290565b600080845481600182811c915080831680613f9257607f831692505b6020808410821415613fb257634e487b7160e01b86526022600452602486fd5b818015613fc65760018114613fd757614004565b60ff19861689528489019650614004565b60008b81526020902060005b86811015613ffc5781548b820152908501908301613fe3565b505084890196505b5050505050506140286140178286613efc565b64173539b7b760d91b815260050190565b95945050505050565b60006020828403121561404357600080fd5b5051919050565b81835260007f07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff83111561407c57600080fd5b8260051b8083602087013760009401602001938452509192915050565b6001600160a01b038716815260a0602082015260006140bc60a08301878961404a565b82810360408401526140cf81868861404a565b606084019490945250508082036080909101526000815260200195945050505050565b60008282101561410457614104613eb3565b500390565b634e487b7160e01b600052601260045260246000fd5b60008261412e5761412e614109565b500490565b60008261414257614142614109565b500690565b60006001600160a01b0380871683528086166020840152508360408301526080606083015261417960808301846139c3565b9695505050505050565b60006020828403121561419557600080fd5b81516139908161395d565b634e487b7160e01b600052603160045260246000fdfe4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572a2646970667358221220a8f6aaa053521e345cdcd97d9f1b5025667643e362f8611c4019ddc3e9122d2f64736f6c634300080a0033000000000000000000000000000000000000000000000000000000000000014000000000000000000000000000000000000000000000000000000000000001800000000000000000000000000000000000000000000000000000000000004e20000000000000000000000000000000000000000000000000000000000000271000000000000000000000000000000000000000000000000000000000000013880000000000000000000000000000000000000000000000000000000061b3879000000000000000000000000000000000000000000000000000000000000001c000000000000000000000000000000000000000000000000000000000000002200000000000000000000000002106c00ac7da0a3430ae667879139e832307aeaa000000000000000000000000f672af317f2d05794db6db0001e771d24cf340c9000000000000000000000000000000000000000000000000000000000000000a4c6f6f707920437570730000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000034355500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004034353830646664323766303331616531656265633761303036343364666439666331373437336232386332366138313330346362633461623464313833623536000000000000000000000000000000000000000000000000000000000000002d68747470733a2f2f6c6f6f7079637570732e696f2f6170692f76312f6d657461646174613f746f6b656e49643d00000000000000000000000000000000000000
Deployed Bytecode
0x6080604052600436106103765760003560e01c80638462151c116101d1578063add1f1af11610102578063d1058e59116100a0578063f47c84c51161006f578063f47c84c514610a49578063f83d08ba14610a7d578063fb47193714610a92578063fb94bd8a14610ab257600080fd5b8063d1058e59146109b1578063e985e9c5146109c6578063eb8d244414610a0f578063f2fde38b14610a2957600080fd5b8063c2149ce3116100dc578063c2149ce31461094c578063c87b56dd14610962578063caf1085914610982578063cf3090121461099757600080fd5b8063add1f1af146108f6578063b0b5d7fb1461090c578063b88d4fde1461092c57600080fd5b806397b1072e1161016f578063a22cb46511610149578063a22cb46514610883578063a3b8edde146108a3578063a8359d87146108c3578063ad7c039e146108d657600080fd5b806397b1072e1461082d578063999437711461084d5780639aa0ff7b1461086d57600080fd5b80638da5cb5b116101ab5780638da5cb5b146107a657806391b7f5ed146107c45780639447e49a146107e457806395d89b411461081857600080fd5b80638462151c1461072f5780638a1170811461075c5780638ab932bd1461077257600080fd5b806342966c68116102ab5780636352211e11610249578063709485741161022357806370948574146106a657806370a08231146106da578063715018a6146106fa5780637bf086211461070f57600080fd5b80636352211e1461065c5780636373a6b11461067c5780636c0360eb1461069157600080fd5b806350f32e1d1161028557806350f32e1d146105d357806353b22feb146105f357806355a3db6d146106135780635b2bd79e1461064757600080fd5b806342966c68146105735780634e1a6552146105935780634f6ccce7146105b357600080fd5b806323b872dd1161031857806335f6f8e1116102f257806335f6f8e1146104da5780633ccfd60b1461050e5780633d7e90721461052357806342842e0e1461055357600080fd5b806323b872dd146104855780632f745c59146104a557806334918dfd146104c557600080fd5b8063095ea7b311610354578063095ea7b31461040a578063109695231461042c57806312f09fac1461044c57806318160ddd1461047057600080fd5b806301ffc9a71461037b57806306fdde03146103b0578063081812fc146103d2575b600080fd5b34801561038757600080fd5b5061039b610396366004613973565b610ad2565b60405190151581526020015b60405180910390f35b3480156103bc57600080fd5b506103c5610ae3565b6040516103a791906139ef565b3480156103de57600080fd5b506103f26103ed366004613a02565b610b75565b6040516001600160a01b0390911681526020016103a7565b34801561041657600080fd5b5061042a610425366004613a30565b610c0f565b005b34801561043857600080fd5b5061042a610447366004613b08565b610d41565b34801561045857600080fd5b5061046260155481565b6040519081526020016103a7565b34801561047c57600080fd5b50600854610462565b34801561049157600080fd5b5061042a6104a0366004613b3d565b610dee565b3480156104b157600080fd5b506104626104c0366004613a30565b610e76565b3480156104d157600080fd5b5061042a610f1e565b3480156104e657600080fd5b506103f27f000000000000000000000000f672af317f2d05794db6db0001e771d24cf340c981565b34801561051a57600080fd5b5061042a610f7a565b34801561052f57600080fd5b5061039b61053e366004613a02565b60166020526000908152604090205460ff1681565b34801561055f57600080fd5b5061042a61056e366004613b3d565b610ff1565b34801561057f57600080fd5b5061042a61058e366004613a02565b61100c565b34801561059f57600080fd5b5061042a6105ae366004613b7e565b6110ab565b3480156105bf57600080fd5b506104626105ce366004613a02565b611160565b3480156105df57600080fd5b506103c56105ee366004613a02565b611204565b3480156105ff57600080fd5b5061042a61060e366004613c11565b61129e565b34801561061f57600080fd5b506103f27f0000000000000000000000002106c00ac7da0a3430ae667879139e832307aeaa81565b34801561065357600080fd5b506103c56114b3565b34801561066857600080fd5b506103f2610677366004613a02565b6114c0565b34801561068857600080fd5b506103c561154b565b34801561069d57600080fd5b506103c5611558565b3480156106b257600080fd5b506104627f000000000000000000000000000000000000000000000000000000000000138881565b3480156106e657600080fd5b506104626106f5366004613c53565b611567565b34801561070657600080fd5b5061042a611601565b34801561071b57600080fd5b5061042a61072a366004613a30565b611655565b34801561073b57600080fd5b5061074f61074a366004613c53565b611780565b6040516103a79190613c70565b34801561076857600080fd5b5061046260145481565b34801561077e57600080fd5b506104627f000000000000000000000000000000000000000000000000000000000000271081565b3480156107b257600080fd5b50600a546001600160a01b03166103f2565b3480156107d057600080fd5b5061042a6107df366004613a02565b611822565b3480156107f057600080fd5b506104627f000000000000000000000000000000000000000000000000000000000000271081565b34801561082457600080fd5b506103c561190d565b34801561083957600080fd5b5061042a610848366004613a02565b61191c565b34801561085957600080fd5b5061042a610868366004613a30565b611a07565b34801561087957600080fd5b50610462600d5481565b34801561088f57600080fd5b5061042a61089e366004613cb4565b611b37565b3480156108af57600080fd5b506103c56108be366004613cf2565b611bfc565b61042a6108d1366004613a02565b611da6565b3480156108e257600080fd5b5061042a6108f1366004613a02565b61200c565b34801561090257600080fd5b50610462600e5481565b34801561091857600080fd5b5061042a610927366004613b7e565b6120a7565b34801561093857600080fd5b5061042a610947366004613d14565b61217d565b34801561095857600080fd5b50610462600f5481565b34801561096e57600080fd5b506103c561097d366004613a02565b612205565b34801561098e57600080fd5b50610462601481565b3480156109a357600080fd5b5060135461039b9060ff1681565b3480156109bd57600080fd5b5061042a6122ee565b3480156109d257600080fd5b5061039b6109e1366004613d94565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b348015610a1b57600080fd5b5060105461039b9060ff1681565b348015610a3557600080fd5b5061042a610a44366004613c53565b61254a565b348015610a5557600080fd5b506104627f0000000000000000000000000000000000000000000000000000000000004e2081565b348015610a8957600080fd5b5061042a61261a565b348015610a9e57600080fd5b5061042a610aad366004613dc2565b61271d565b348015610abe57600080fd5b5061042a610acd366004613b08565b612bcb565b6000610add82612c74565b92915050565b606060008054610af290613e45565b80601f0160208091040260200160405190810160405280929190818152602001828054610b1e90613e45565b8015610b6b5780601f10610b4057610100808354040283529160200191610b6b565b820191906000526020600020905b815481529060010190602001808311610b4e57829003601f168201915b5050505050905090565b6000818152600260205260408120546001600160a01b0316610bf35760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084015b60405180910390fd5b506000908152600460205260409020546001600160a01b031690565b6000610c1a826114c0565b9050806001600160a01b0316836001600160a01b03161415610ca45760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560448201527f72000000000000000000000000000000000000000000000000000000000000006064820152608401610bea565b336001600160a01b0382161480610cc05750610cc081336109e1565b610d325760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c00000000000000006064820152608401610bea565b610d3c8383612cb2565b505050565b600a546001600160a01b03163314610d895760405162461bcd60e51b815260206004820181905260248201526000805160206141b78339815191526044820152606401610bea565b60135460ff1615610dd75760405162461bcd60e51b815260206004820152601860248201527721b7b73a3930b1ba1030b63932b0b23c903637b1b5b2b21760411b6044820152606401610bea565b8051610dea90600c9060208401906138c4565b5050565b610df9335b82612d20565b610e6b5760405162461bcd60e51b815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60448201527f776e6572206e6f7220617070726f7665640000000000000000000000000000006064820152608401610bea565b610d3c838383612e17565b6000610e8183611567565b8210610ef55760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201527f74206f6620626f756e64730000000000000000000000000000000000000000006064820152608401610bea565b506001600160a01b03919091166000908152600660209081526040808320938352929052205490565b600a546001600160a01b03163314610f665760405162461bcd60e51b815260206004820181905260248201526000805160206141b78339815191526044820152606401610bea565b6010805460ff19811660ff90911615179055565b600a546001600160a01b03163314610fc25760405162461bcd60e51b815260206004820181905260248201526000805160206141b78339815191526044820152606401610bea565b6040514790339082156108fc029083906000818181858888f19350505050158015610dea573d6000803e3d6000fd5b610d3c8383836040518060200160405280600081525061217d565b61101533610df3565b6110875760405162461bcd60e51b815260206004820152603060248201527f4552433732314275726e61626c653a2063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f766564000000000000000000000000000000006064820152608401610bea565b61109081612fef565b6000908152601660205260409020805460ff19166001179055565b600a546001600160a01b031633146110f35760405162461bcd60e51b815260206004820181905260248201526000805160206141b78339815191526044820152606401610bea565b60135460ff16156111415760405162461bcd60e51b815260206004820152601860248201527721b7b73a3930b1ba1030b63932b0b23c903637b1b5b2b21760411b6044820152606401610bea565b60008281526012602090815260409091208251610d3c928401906138c4565b600061116b60085490565b82106111df5760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201527f7574206f6620626f756e647300000000000000000000000000000000000000006064820152608401610bea565b600882815481106111f2576111f2613e80565b90600052602060002001549050919050565b6012602052600090815260409020805461121d90613e45565b80601f016020809104026020016040519081016040528092919081815260200182805461124990613e45565b80156112965780601f1061126b57610100808354040283529160200191611296565b820191906000526020600020905b81548152906001019060200180831161127957829003601f168201915b505050505081565b6002600b5414156112f15760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610bea565b6002600b5560105460ff1661133e5760405162461bcd60e51b815260206004820152601360248201527229b0b6329034b9903737ba1030b1ba34bb329760691b6044820152606401610bea565b60005b818110156114a957600083838381811061135d5761135d613e80565b9050602002013590507f0000000000000000000000002106c00ac7da0a3430ae667879139e832307aeaa6001600160a01b0316636352211e826040518263ffffffff1660e01b81526004016113b491815260200190565b602060405180830381865afa1580156113d1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113f59190613e96565b6001600160a01b0316336001600160a01b0316146114555760405162461bcd60e51b815260206004820152601260248201527f4e6f74206f776e6572206f6620446f6e757400000000000000000000000000006044820152606401610bea565b6000818152600260205260409020546001600160a01b0316151580611488575060008181526016602052604090205460ff165b611496576114963382613096565b50806114a181613ec9565b915050611341565b50506001600b5550565b6011805461121d90613e45565b6000818152600260205260408120546001600160a01b031680610add5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201527f656e7420746f6b656e00000000000000000000000000000000000000000000006064820152608401610bea565b600c805461121d90613e45565b60606115626130b0565b905090565b60006001600160a01b0382166115e55760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a6560448201527f726f2061646472657373000000000000000000000000000000000000000000006064820152608401610bea565b506001600160a01b031660009081526003602052604090205490565b600a546001600160a01b031633146116495760405162461bcd60e51b815260206004820181905260248201526000805160206141b78339815191526044820152606401610bea565b61165360006130bf565b565b600a546001600160a01b0316331461169d5760405162461bcd60e51b815260206004820181905260248201526000805160206141b78339815191526044820152606401610bea565b6001600160a01b0382166116f35760405162461bcd60e51b815260206004820181905260248201527f4e6f7420616c6c6f77656420746f2073656e6420746f203020616464726573736044820152606401610bea565b47808211156117445760405162461bcd60e51b815260206004820152601260248201527f4e6f7420656e6f7567682062616c616e636500000000000000000000000000006044820152606401610bea565b6040516001600160a01b0384169083156108fc029084906000818181858888f1935050505015801561177a573d6000803e3d6000fd5b50505050565b6060600061178d83611567565b905060008167ffffffffffffffff8111156117aa576117aa613a5c565b6040519080825280602002602001820160405280156117d3578160200160208202803683370190505b50905060005b8281101561181a576117eb8582610e76565b8282815181106117fd576117fd613e80565b60209081029190910101528061181281613ec9565b9150506117d9565b509392505050565b600a546001600160a01b0316331461186a5760405162461bcd60e51b815260206004820181905260248201526000805160206141b78339815191526044820152606401610bea565b60135460ff16156118b85760405162461bcd60e51b815260206004820152601860248201527721b7b73a3930b1ba1030b63932b0b23c903637b1b5b2b21760411b6044820152606401610bea565b600081116119085760405162461bcd60e51b815260206004820152600e60248201527f496e76616c69642070726963652e0000000000000000000000000000000000006044820152606401610bea565b600e55565b606060018054610af290613e45565b600a546001600160a01b031633146119645760405162461bcd60e51b815260206004820181905260248201526000805160206141b78339815191526044820152606401610bea565b60135460ff16156119b25760405162461bcd60e51b815260206004820152601860248201527721b7b73a3930b1ba1030b63932b0b23c903637b1b5b2b21760411b6044820152606401610bea565b60008111611a025760405162461bcd60e51b815260206004820152600e60248201527f496e76616c69642070726963652e0000000000000000000000000000000000006044820152606401610bea565b600f55565b600a546001600160a01b03163314611a4f5760405162461bcd60e51b815260206004820181905260248201526000805160206141b78339815191526044820152606401610bea565b60006015546014547f0000000000000000000000000000000000000000000000000000000000002710611a829190613ee4565b611a8c9190613ee4565b90507f0000000000000000000000000000000000000000000000000000000000004e20611ab98383613ee4565b1115611b075760405162461bcd60e51b815260206004820152601e60248201527f526573657276696e6720776f756c642065786365656420737570706c792e00006044820152606401610bea565b60005b8281101561177a57611b2584611b208385613ee4565b613096565b80611b2f81613ec9565b915050611b0a565b6001600160a01b038216331415611b905760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610bea565b3360008181526005602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6000828152600260205260409020546060906001600160a01b0316611c895760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201527f6e6578697374656e7420746f6b656e00000000000000000000000000000000006064820152608401610bea565b60008281526012602052604081208054611ca290613e45565b80601f0160208091040260200160405190810160405280929190818152602001828054611cce90613e45565b8015611d1b5780601f10611cf057610100808354040283529160200191611d1b565b820191906000526020600020905b815481529060010190602001808311611cfe57829003601f168201915b505050505090506000815111611d735760405162461bcd60e51b815260206004820152601f60248201527f4c6f6f7079437570733a20496e76616c6964206261636b75704e756d626572006044820152606401610bea565b80611d7d85613111565b604051602001611d8e929190613f18565b60405160208183030381529060405291505092915050565b6002600b541415611df95760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610bea565b6002600b5560105460ff168015611e115750600d5442105b611e535760405162461bcd60e51b815260206004820152601360248201527229b0b6329034b9903737ba1030b1ba34bb329760691b6044820152606401610bea565b6014811115611ea45760405162461bcd60e51b815260206004820181905260248201527f43616e206f6e6c79206d696e74203230204375707320617420612074696d652e6044820152606401610bea565b7f000000000000000000000000000000000000000000000000000000000000271081601554601454611ed69190613ee4565b611ee09190613ee4565b1115611f2e5760405162461bcd60e51b815260206004820152601960248201527f4e6f7420656e6f756768204375707320666f722073616c652e000000000000006044820152606401610bea565b3481600e54611f3d9190613f57565b14611f8a5760405162461bcd60e51b815260206004820181905260248201527f45746865722076616c75652073656e74206973206e6f7420636f72726563742e6044820152606401610bea565b60006015546014547f0000000000000000000000000000000000000000000000000000000000002710611fbd9190613ee4565b611fc79190613ee4565b90508160146000828254611fdb9190613ee4565b90915550600090505b828110156114a957611ffa33611b208385613ee4565b8061200481613ec9565b915050611fe4565b600a546001600160a01b031633146120545760405162461bcd60e51b815260206004820181905260248201526000805160206141b78339815191526044820152606401610bea565b60135460ff16156120a25760405162461bcd60e51b815260206004820152601860248201527721b7b73a3930b1ba1030b63932b0b23c903637b1b5b2b21760411b6044820152606401610bea565b600d55565b600a546001600160a01b031633146120ef5760405162461bcd60e51b815260206004820181905260248201526000805160206141b78339815191526044820152606401610bea565b6000828152601260205260409020805461210890613e45565b1590506111415760405162461bcd60e51b815260206004820152602e60248201527f4c6f6f7079437570733a2055524920616c72656164792065786973747320666f60448201527f72206261636b75704e756d6265720000000000000000000000000000000000006064820152608401610bea565b6121873383612d20565b6121f95760405162461bcd60e51b815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60448201527f776e6572206e6f7220617070726f7665640000000000000000000000000000006064820152608401610bea565b61177a84848484613243565b6000818152600260205260409020546060906001600160a01b03166122925760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201527f6e6578697374656e7420746f6b656e00000000000000000000000000000000006064820152608401610bea565b6000601180546122a190613e45565b9050116122bd5760405180602001604052806000815250610add565b60116122c883613111565b6040516020016122d9929190613f76565b60405160208183030381529060405292915050565b6002600b5414156123415760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610bea565b6002600b5560105460ff1661238e5760405162461bcd60e51b815260206004820152601360248201527229b0b6329034b9903737ba1030b1ba34bb329760691b6044820152606401610bea565b6040517f70a082310000000000000000000000000000000000000000000000000000000081523360048201526000907f0000000000000000000000002106c00ac7da0a3430ae667879139e832307aeaa6001600160a01b0316906370a0823190602401602060405180830381865afa15801561240e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124329190614031565b905060005b81811015612541576040517f2f745c59000000000000000000000000000000000000000000000000000000008152336004820152602481018290526000907f0000000000000000000000002106c00ac7da0a3430ae667879139e832307aeaa6001600160a01b031690632f745c5990604401602060405180830381865afa1580156124c6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124ea9190614031565b6000818152600260205260409020549091506001600160a01b0316151580612520575060008181526016602052604090205460ff165b61252e5761252e3382613096565b508061253981613ec9565b915050612437565b50506001600b55565b600a546001600160a01b031633146125925760405162461bcd60e51b815260206004820181905260248201526000805160206141b78339815191526044820152606401610bea565b6001600160a01b03811661260e5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610bea565b612617816130bf565b50565b600a546001600160a01b031633146126625760405162461bcd60e51b815260206004820181905260248201526000805160206141b78339815191526044820152606401610bea565b60135460ff16156126b05760405162461bcd60e51b815260206004820152601860248201527721b7b73a3930b1ba1030b63932b0b23c903637b1b5b2b21760411b6044820152606401610bea565b6000601180546126bf90613e45565b90501161270e5760405162461bcd60e51b815260206004820181905260248201527f54686f75207368616c6c206e6f74206c6f636b207072656d61747572656c79216044820152606401610bea565b6013805460ff19166001179055565b6002600b5414156127705760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610bea565b6002600b5560105460ff166127bd5760405162461bcd60e51b815260206004820152601360248201527229b0b6329034b9903737ba1030b1ba34bb329760691b6044820152606401610bea565b601486111561280e5760405162461bcd60e51b815260206004820181905260248201527f43616e206f6e6c79206d696e74203230204375707320617420612074696d652e6044820152606401610bea565b7f0000000000000000000000000000000000000000000000000000000000002710866015546014546128409190613ee4565b61284a9190613ee4565b11156128985760405162461bcd60e51b815260206004820152601960248201527f4e6f7420656e6f756768204375707320666f722073616c652e000000000000006044820152606401610bea565b7f0000000000000000000000000000000000000000000000000000000000001388866015546128c79190613ee4565b111561293a5760405162461bcd60e51b8152602060048201526024808201527f4e6f7420656e6f756768204375707320666f722073616c65207769746820434860448201527f494c4c2e000000000000000000000000000000000000000000000000000000006064820152608401610bea565b8460005b8281101561297e5783838281811061295857612958613e80565b905060200201358261296a9190613ee4565b91508061297681613ec9565b91505061293e565b508087600f5461298e9190613f57565b146129db5760405162461bcd60e51b815260206004820181905260248201527f4348494c4c2076616c75652073656e74206973206e6f7420636f72726563742e6044820152606401610bea565b8515612a90576040517f03374a8c000000000000000000000000000000000000000000000000000000008152336004820152602481018790526000604482018190526080606483015260848201527f000000000000000000000000f672af317f2d05794db6db0001e771d24cf340c96001600160a01b0316906303374a8c9060a401600060405180830381600087803b158015612a7757600080fd5b505af1158015612a8b573d6000803e3d6000fd5b505050505b8115612b39576040517fba73e9f90000000000000000000000000000000000000000000000000000000081526001600160a01b037f000000000000000000000000f672af317f2d05794db6db0001e771d24cf340c9169063ba73e9f990612b069033908990899089908990600090600401614099565b600060405180830381600087803b158015612b2057600080fd5b505af1158015612b34573d6000803e3d6000fd5b505050505b60006015546014547f0000000000000000000000000000000000000000000000000000000000002710612b6c9190613ee4565b612b769190613ee4565b90508760156000828254612b8a9190613ee4565b90915550600090505b88811015612bbb57612ba933611b208385613ee4565b80612bb381613ec9565b915050612b93565b50506001600b5550505050505050565b600a546001600160a01b03163314612c135760405162461bcd60e51b815260206004820181905260248201526000805160206141b78339815191526044820152606401610bea565b60135460ff1615612c615760405162461bcd60e51b815260206004820152601860248201527721b7b73a3930b1ba1030b63932b0b23c903637b1b5b2b21760411b6044820152606401610bea565b8051610dea9060119060208401906138c4565b60006001600160e01b031982167f780e9d63000000000000000000000000000000000000000000000000000000001480610add5750610add826132c1565b600081815260046020526040902080546001600160a01b0319166001600160a01b0384169081179091558190612ce7826114c0565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000818152600260205260408120546001600160a01b0316612d995760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610bea565b6000612da4836114c0565b9050806001600160a01b0316846001600160a01b03161480612ddf5750836001600160a01b0316612dd484610b75565b6001600160a01b0316145b80612e0f57506001600160a01b0380821660009081526005602090815260408083209388168352929052205460ff165b949350505050565b826001600160a01b0316612e2a826114c0565b6001600160a01b031614612ea65760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201527f73206e6f74206f776e00000000000000000000000000000000000000000000006064820152608401610bea565b6001600160a01b038216612f215760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152608401610bea565b612f2c83838361335c565b612f37600082612cb2565b6001600160a01b0383166000908152600360205260408120805460019290612f609084906140f2565b90915550506001600160a01b0382166000908152600360205260408120805460019290612f8e908490613ee4565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b6000612ffa826114c0565b90506130088160008461335c565b613013600083612cb2565b6001600160a01b038116600090815260036020526040812080546001929061303c9084906140f2565b909155505060008281526002602052604080822080546001600160a01b0319169055518391906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b610dea828260405180602001604052806000815250613367565b606060118054610af290613e45565b600a80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60608161315157505060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b8160005b811561317b578061316581613ec9565b91506131749050600a8361411f565b9150613155565b60008167ffffffffffffffff81111561319657613196613a5c565b6040519080825280601f01601f1916602001820160405280156131c0576020820181803683370190505b5090505b8415612e0f576131d56001836140f2565b91506131e2600a86614133565b6131ed906030613ee4565b60f81b81838151811061320257613202613e80565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535061323c600a8661411f565b94506131c4565b61324e848484612e17565b61325a848484846133e5565b61177a5760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b6064820152608401610bea565b60006001600160e01b031982167f80ac58cd00000000000000000000000000000000000000000000000000000000148061332457506001600160e01b031982167f5b5e139f00000000000000000000000000000000000000000000000000000000145b80610add57507f01ffc9a7000000000000000000000000000000000000000000000000000000006001600160e01b0319831614610add565b610d3c83838361352e565b61337183836135e6565b61337e60008484846133e5565b610d3c5760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b6064820152608401610bea565b60006001600160a01b0384163b1561352357604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290613429903390899088908890600401614147565b6020604051808303816000875af1925050508015613464575060408051601f3d908101601f1916820190925261346191810190614183565b60015b613509573d808015613492576040519150601f19603f3d011682016040523d82523d6000602084013e613497565b606091505b5080516135015760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b6064820152608401610bea565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050612e0f565b506001949350505050565b6001600160a01b0383166135895761358481600880546000838152600960205260408120829055600182018355919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b6135ac565b816001600160a01b0316836001600160a01b0316146135ac576135ac8382613734565b6001600160a01b0382166135c357610d3c816137d1565b826001600160a01b0316826001600160a01b031614610d3c57610d3c8282613880565b6001600160a01b03821661363c5760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610bea565b6000818152600260205260409020546001600160a01b0316156136a15760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610bea565b6136ad6000838361335c565b6001600160a01b03821660009081526003602052604081208054600192906136d6908490613ee4565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b6000600161374184611567565b61374b91906140f2565b60008381526007602052604090205490915080821461379e576001600160a01b03841660009081526006602090815260408083208584528252808320548484528184208190558352600790915290208190555b5060009182526007602090815260408084208490556001600160a01b039094168352600681528383209183525290812055565b6008546000906137e3906001906140f2565b6000838152600960205260408120546008805493945090928490811061380b5761380b613e80565b90600052602060002001549050806008838154811061382c5761382c613e80565b6000918252602080832090910192909255828152600990915260408082208490558582528120556008805480613864576138646141a0565b6001900381819060005260206000200160009055905550505050565b600061388b83611567565b6001600160a01b039093166000908152600660209081526040808320868452825280832085905593825260079052919091209190915550565b8280546138d090613e45565b90600052602060002090601f0160209004810192826138f25760008555613938565b82601f1061390b57805160ff1916838001178555613938565b82800160010185558215613938579182015b8281111561393857825182559160200191906001019061391d565b50613944929150613948565b5090565b5b808211156139445760008155600101613949565b6001600160e01b03198116811461261757600080fd5b60006020828403121561398557600080fd5b81356139908161395d565b9392505050565b60005b838110156139b257818101518382015260200161399a565b8381111561177a5750506000910152565b600081518084526139db816020860160208601613997565b601f01601f19169290920160200192915050565b60208152600061399060208301846139c3565b600060208284031215613a1457600080fd5b5035919050565b6001600160a01b038116811461261757600080fd5b60008060408385031215613a4357600080fd5b8235613a4e81613a1b565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b600067ffffffffffffffff80841115613a8d57613a8d613a5c565b604051601f8501601f19908116603f01168101908282118183101715613ab557613ab5613a5c565b81604052809350858152868686011115613ace57600080fd5b858560208301376000602087830101525050509392505050565b600082601f830112613af957600080fd5b61399083833560208501613a72565b600060208284031215613b1a57600080fd5b813567ffffffffffffffff811115613b3157600080fd5b612e0f84828501613ae8565b600080600060608486031215613b5257600080fd5b8335613b5d81613a1b565b92506020840135613b6d81613a1b565b929592945050506040919091013590565b60008060408385031215613b9157600080fd5b82359150602083013567ffffffffffffffff811115613baf57600080fd5b613bbb85828601613ae8565b9150509250929050565b60008083601f840112613bd757600080fd5b50813567ffffffffffffffff811115613bef57600080fd5b6020830191508360208260051b8501011115613c0a57600080fd5b9250929050565b60008060208385031215613c2457600080fd5b823567ffffffffffffffff811115613c3b57600080fd5b613c4785828601613bc5565b90969095509350505050565b600060208284031215613c6557600080fd5b813561399081613a1b565b6020808252825182820181905260009190848201906040850190845b81811015613ca857835183529284019291840191600101613c8c565b50909695505050505050565b60008060408385031215613cc757600080fd5b8235613cd281613a1b565b915060208301358015158114613ce757600080fd5b809150509250929050565b60008060408385031215613d0557600080fd5b50508035926020909101359150565b60008060008060808587031215613d2a57600080fd5b8435613d3581613a1b565b93506020850135613d4581613a1b565b925060408501359150606085013567ffffffffffffffff811115613d6857600080fd5b8501601f81018713613d7957600080fd5b613d8887823560208401613a72565b91505092959194509250565b60008060408385031215613da757600080fd5b8235613db281613a1b565b91506020830135613ce781613a1b565b60008060008060008060808789031215613ddb57600080fd5b8635955060208701359450604087013567ffffffffffffffff80821115613e0157600080fd5b613e0d8a838b01613bc5565b90965094506060890135915080821115613e2657600080fd5b50613e3389828a01613bc5565b979a9699509497509295939492505050565b600181811c90821680613e5957607f821691505b60208210811415613e7a57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052603260045260246000fd5b600060208284031215613ea857600080fd5b815161399081613a1b565b634e487b7160e01b600052601160045260246000fd5b6000600019821415613edd57613edd613eb3565b5060010190565b60008219821115613ef757613ef7613eb3565b500190565b60008151613f0e818560208601613997565b9290920192915050565b60008351613f2a818460208801613997565b835190830190613f3e818360208801613997565b64173539b7b760d91b9101908152600501949350505050565b6000816000190483118215151615613f7157613f71613eb3565b500290565b600080845481600182811c915080831680613f9257607f831692505b6020808410821415613fb257634e487b7160e01b86526022600452602486fd5b818015613fc65760018114613fd757614004565b60ff19861689528489019650614004565b60008b81526020902060005b86811015613ffc5781548b820152908501908301613fe3565b505084890196505b5050505050506140286140178286613efc565b64173539b7b760d91b815260050190565b95945050505050565b60006020828403121561404357600080fd5b5051919050565b81835260007f07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff83111561407c57600080fd5b8260051b8083602087013760009401602001938452509192915050565b6001600160a01b038716815260a0602082015260006140bc60a08301878961404a565b82810360408401526140cf81868861404a565b606084019490945250508082036080909101526000815260200195945050505050565b60008282101561410457614104613eb3565b500390565b634e487b7160e01b600052601260045260246000fd5b60008261412e5761412e614109565b500490565b60008261414257614142614109565b500690565b60006001600160a01b0380871683528086166020840152508360408301526080606083015261417960808301846139c3565b9695505050505050565b60006020828403121561419557600080fd5b81516139908161395d565b634e487b7160e01b600052603160045260246000fdfe4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572a2646970667358221220a8f6aaa053521e345cdcd97d9f1b5025667643e362f8611c4019ddc3e9122d2f64736f6c634300080a0033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000000000000000000000000000000000000000014000000000000000000000000000000000000000000000000000000000000001800000000000000000000000000000000000000000000000000000000000004e20000000000000000000000000000000000000000000000000000000000000271000000000000000000000000000000000000000000000000000000000000013880000000000000000000000000000000000000000000000000000000061b3879000000000000000000000000000000000000000000000000000000000000001c000000000000000000000000000000000000000000000000000000000000002200000000000000000000000002106c00ac7da0a3430ae667879139e832307aeaa000000000000000000000000f672af317f2d05794db6db0001e771d24cf340c9000000000000000000000000000000000000000000000000000000000000000a4c6f6f707920437570730000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000034355500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004034353830646664323766303331616531656265633761303036343364666439666331373437336232386332366138313330346362633461623464313833623536000000000000000000000000000000000000000000000000000000000000002d68747470733a2f2f6c6f6f7079637570732e696f2f6170692f76312f6d657461646174613f746f6b656e49643d00000000000000000000000000000000000000
-----Decoded View---------------
Arg [0] : _name (string): Loopy Cups
Arg [1] : _symbol (string): CUP
Arg [2] : _maxSupply (uint256): 20000
Arg [3] : _maxForSale (uint256): 10000
Arg [4] : _maxForChillSale (uint256): 5000
Arg [5] : _saleEndTs (uint256): 1639155600
Arg [6] : _provenance (string): 4580dfd27f031ae1ebec7a00643dfd9fc17473b28c26a81304cbc4ab4d183b56
Arg [7] : _metadataURI (string): https://loopycups.io/api/v1/metadata?tokenId=
Arg [8] : _ldAddress (address): 0x2106C00Ac7dA0A3430aE667879139E832307AeAa
Arg [9] : _chillToken (address): 0xf672aF317f2D05794DB6DB0001E771d24cF340c9
-----Encoded View---------------
20 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000140
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000180
Arg [2] : 0000000000000000000000000000000000000000000000000000000000004e20
Arg [3] : 0000000000000000000000000000000000000000000000000000000000002710
Arg [4] : 0000000000000000000000000000000000000000000000000000000000001388
Arg [5] : 0000000000000000000000000000000000000000000000000000000061b38790
Arg [6] : 00000000000000000000000000000000000000000000000000000000000001c0
Arg [7] : 0000000000000000000000000000000000000000000000000000000000000220
Arg [8] : 0000000000000000000000002106c00ac7da0a3430ae667879139e832307aeaa
Arg [9] : 000000000000000000000000f672af317f2d05794db6db0001e771d24cf340c9
Arg [10] : 000000000000000000000000000000000000000000000000000000000000000a
Arg [11] : 4c6f6f7079204375707300000000000000000000000000000000000000000000
Arg [12] : 0000000000000000000000000000000000000000000000000000000000000003
Arg [13] : 4355500000000000000000000000000000000000000000000000000000000000
Arg [14] : 0000000000000000000000000000000000000000000000000000000000000040
Arg [15] : 3435383064666432376630333161653165626563376130303634336466643966
Arg [16] : 6331373437336232386332366138313330346362633461623464313833623536
Arg [17] : 000000000000000000000000000000000000000000000000000000000000002d
Arg [18] : 68747470733a2f2f6c6f6f7079637570732e696f2f6170692f76312f6d657461
Arg [19] : 646174613f746f6b656e49643d00000000000000000000000000000000000000
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.