ERC-721
Overview
Max Total Supply
56,741 ZORB
Holders
37,783
Market
Volume (24H)
0.0053 ETH
Min Price (24H)
$17.62 @ 0.005300 ETH
Max Price (24H)
$17.62 @ 0.005300 ETH
Other Info
Token Contract
Balance
1 ZORBLoading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
ZorbNFT
Compiler Version
v0.8.9+commit.e5eed63a
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: GPL-3.0 pragma solidity 0.8.9; /** @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@BBB#RROOOOOOOOOOOOOOORR#BBB@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@BBROOOOOOOOZZZZZZZZZZZZZZZZZZZZZZZOORBB@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@BB#ROOOOOOOOOOOZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZORB@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@B#ROOOOOOOOOOOOOZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZORB@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@BRROOOOOOOOOOOOOOOZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZOB@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@BBRRROOOOOOOOOOOOOOOOZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZO#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@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OOOOOOOOOOOOORRRR@@@@@@@@@ @@@@@@@BBBBBBBBBBBBBBBBBBBBBB########RRRRRRRRRRRROOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOORRRRRB@@@@@@@@@ @@@@@@@@BBBBBBBBBBBBBBBBBBBBBBB########RRRRRRRRRRRRROOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOORRRRRRR#@@@@@@@@@@ @@@@@@@@BBBBBBBBBBBBBBBBBBBBBBBBB########RRRRRRRRRRRRRROOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOORRRRRRRRRRB@@@@@@@@@@ @@@@@@@@@BBBBBBBBBBBBBBBBBBBBBBBBBB########RRRRRRRRRRRRRRRRROOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOORRRRRRRRRRRRRRB@@@@@@@@@@@ @@@@@@@@@@BBBBBBBBBBBBBBBBBBBBBBBBBBB#########RRRRRRRRRRRRRRRRRRROOOOOOOOOOOOOOOOOOOOOOOOOORRRRRRRRRRRRRRRRRR##@@@@@@@@@@@@ @@@@@@@@@@@BBBBBBBBBBBBBBBBBBBBBBBBBBBBB#########RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR###B@@@@@@@@@@@@ @@@@@@@@@@@BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB###########RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR######B@@@@@@@@@@@@@ @@@@@@@@@@@@BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB#############RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR########BB@@@@@@@@@@@@@@ @@@@@@@@@@@@@@BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB###############RRRRRRRRRRRRRRRRRRRRRRRRRRR#############BB@@@@@@@@@@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@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@BBBBBBBBBBBBBBBBBBBBBBBBBBBB@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ */ import {Counters} from "@openzeppelin/contracts/utils/Counters.sol"; import {ERC721} from "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol"; import {IPublicSharedMetadata} from "@zoralabs/nft-editions-contracts/contracts/IPublicSharedMetadata.sol"; import {ColorLib} from "./ColorLib.sol"; interface INFT { function ownerOf(uint256 tokenId) external view returns (address); } /// ZorbNFT /// Design and Project: tw: lily___digital /// Solidity: tw: isiain /// ZORA LABS contract ZorbNFT is ERC721, Ownable { using Counters for Counters.Counter; /// Production mint start = 2022 EST new years uint256 private constant MINT_START_AT = 1641013200; /// Production mint duration = 20 + 22 hours uint256 private constant MINT_DURATION = 42 hours; /// Mapping that stores known marketplace contracts (escrow/auction/staking etc) mapping(address => bool) private knownMarketplace; /// Last owner lookup to preserve last known zorb while NFT is escrowed mapping(uint256 => address) private lastOwner; /// Counter keeping track of last minted token id Counters.Counter currentTokenId; /// Metadata helper library IPublicSharedMetadata private immutable sharedMetadata; /// Checks if a contract interation is approved or by owner modifier onlyApproved(uint256 tokenId) { require(_isApprovedOrOwner(msg.sender, tokenId), "Ony approved"); _; } /// Make the Zorb contract /// @param _sharedMetadata linked metadata contract constructor(IPublicSharedMetadata _sharedMetadata) ERC721("Zorbs", "ZORB") { sharedMetadata = _sharedMetadata; currentTokenId.increment(); } /// Set known marketplace contracts /// @param marketPlaces list of addresses /// @param isKnown flag if the above marketplaces are known function setKnownMarketplaces(address[] calldata marketPlaces, bool isKnown) external onlyOwner { for (uint256 i = 0; i < marketPlaces.length; i++) { knownMarketplace[marketPlaces[i]] = isKnown; } } /// Informational function returning if the mint is currently ongoing function mintIsOpen() public view returns (bool) { return block.timestamp > MINT_START_AT && block.timestamp <= MINT_START_AT + MINT_DURATION; } /// Simple public mint function function mint() public { require(mintIsOpen(), "Mint not open"); _mint(msg.sender, currentTokenId.current()); currentTokenId.increment(); } /// Number of minted tokens. function totalSupply() public view returns (uint256) { // starts at 1 then goes to the next token id return currentTokenId.current() - 1; } /// Public airdrop of tokens to _other_ addresses /// @param to list of addresses to airdrop to function airdrop(address[] memory to) public { require(mintIsOpen(), "Mint not open"); for (uint256 i = 0; i < to.length; i++) { _mint(to[i], currentTokenId.current()); currentTokenId.increment(); } } function gradientForAddress(address user) public pure returns (bytes[5] memory) { return ColorLib.gradientForAddress(user); } /// Public getter for getting the given Zorb for an address /// @param user address to get Zorb SVG for function zorbForAddress(address user) public view returns (string memory) { bytes[5] memory colors = gradientForAddress(user); string memory encoded = sharedMetadata.base64Encode( abi.encodePacked( '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 110 110"><defs>' // new gradient fix – test '<radialGradient id="gzr" gradientTransform="translate(66.4578 24.3575) scale(75.2908)" gradientUnits="userSpaceOnUse" r="1" cx="0" cy="0%">' // '<radialGradient fx="66.46%" fy="24.36%" id="grad">' '<stop offset="15.62%" stop-color="', colors[0], '" /><stop offset="39.58%" stop-color="', colors[1], '" /><stop offset="72.92%" stop-color="', colors[2], '" /><stop offset="90.63%" stop-color="', colors[3], '" /><stop offset="100%" stop-color="', colors[4], '" /></radialGradient></defs><g transform="translate(5,5)">' '<path d="M100 50C100 22.3858 77.6142 0 50 0C22.3858 0 0 22.3858 0 50C0 77.6142 22.3858 100 50 100C77.6142 100 100 77.6142 100 50Z" fill="url(#gzr)" /><path stroke="rgba(0,0,0,0.075)" fill="transparent" stroke-width="1" d="M50,0.5c27.3,0,49.5,22.2,49.5,49.5S77.3,99.5,50,99.5S0.5,77.3,0.5,50S22.7,0.5,50,0.5z" />' "</g></svg>" ) ); return string(abi.encodePacked("data:image/svg+xml;base64,", encoded)); } /// Used to implement known marketplace functionality /// @param from token transfer from /// @param to token transfer to /// @param tokenId token being transferred function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal override { if (knownMarketplace[to]) { lastOwner[tokenId] = from; } } /// Determines the actual rendering address instead of just owner address for given zorb id /// @param tokenId id of token to get render address for function getZorbRenderAddress(uint256 tokenId) public view returns (address) { address zorbFor = INFT(address(this)).ownerOf(tokenId); if (knownMarketplace[zorbFor] && lastOwner[tokenId] != address(0x0)) { zorbFor = lastOwner[tokenId]; } return zorbFor; } /// TokenURI function returning on-chain encoded SVG for each Zorb /// @param tokenId token id to render function tokenURI(uint256 tokenId) public view override returns (string memory) { require(_exists(tokenId), "No token"); string memory idString = sharedMetadata.numberToString(tokenId); return sharedMetadata.encodeMetadataJSON( abi.encodePacked( '{"name": "Zorb #', idString, unicode'", "description": "Zorbs were distributed for free by ZORA on New Year’s 2022. Each NFT imbues the properties of its wallet holder, and when sent to someone else, will transform.\\n\\nView this NFT at [zorb.dev/nft/', idString, '](https://zorb.dev/nft/',idString, ')", "image": "', zorbForAddress(getZorbRenderAddress(tokenId)), '"}' ) ); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/ERC721.sol) pragma solidity ^0.8.0; import "./IERC721.sol"; import "./IERC721Receiver.sol"; import "./extensions/IERC721Metadata.sol"; import "../../utils/Address.sol"; import "../../utils/Context.sol"; import "../../utils/Strings.sol"; import "../../utils/introspection/ERC165.sol"; /** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */ contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _owners; // Mapping owner address to token count mapping(address => uint256) private _balances; // Mapping from token ID to approved address mapping(uint256 => address) private _tokenApprovals; // Mapping from owner to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; /** * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection. */ constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { return interfaceId == type(IERC721).interfaceId || interfaceId == type(IERC721Metadata).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721-balanceOf}. */ function balanceOf(address owner) public view virtual override returns (uint256) { require(owner != address(0), "ERC721: balance query for the zero address"); return _balances[owner]; } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view virtual override returns (address) { address owner = _owners[tokenId]; require(owner != address(0), "ERC721: owner query for nonexistent token"); return owner; } /** * @dev See {IERC721Metadata-name}. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev See {IERC721Metadata-symbol}. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token"); string memory baseURI = _baseURI(); return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : ""; } /** * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each * token will be the concatenation of the `baseURI` and the `tokenId`. Empty * by default, can be overriden in child contracts. */ function _baseURI() internal view virtual returns (string memory) { return ""; } /** * @dev See {IERC721-approve}. */ function approve(address to, uint256 tokenId) public virtual override { address owner = ERC721.ownerOf(tokenId); require(to != owner, "ERC721: approval to current owner"); require( _msgSender() == owner || isApprovedForAll(owner, _msgSender()), "ERC721: approve caller is not owner nor approved for all" ); _approve(to, tokenId); } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view virtual override returns (address) { require(_exists(tokenId), "ERC721: approved query for nonexistent token"); return _tokenApprovals[tokenId]; } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { _setApprovalForAll(_msgSender(), operator, approved); } /** * @dev See {IERC721-isApprovedForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return _operatorApprovals[owner][operator]; } /** * @dev See {IERC721-transferFrom}. */ function transferFrom( address from, address to, uint256 tokenId ) public virtual override { //solhint-disable-next-line max-line-length require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); _transfer(from, to, tokenId); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId ) public virtual override { safeTransferFrom(from, to, tokenId, ""); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory _data ) public virtual override { require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); _safeTransfer(from, to, tokenId, _data); } /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * `_data` is additional data, it has no specified format and it is sent in call to `to`. * * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g. * implement alternative mechanisms to perform token transfer, such as signature-based. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeTransfer( address from, address to, uint256 tokenId, bytes memory _data ) internal virtual { _transfer(from, to, tokenId); require(_checkOnERC721Received(from, to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer"); } /** * @dev Returns whether `tokenId` exists. * * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. * * Tokens start existing when they are minted (`_mint`), * and stop existing when they are burned (`_burn`). */ function _exists(uint256 tokenId) internal view virtual returns (bool) { return _owners[tokenId] != address(0); } /** * @dev Returns whether `spender` is allowed to manage `tokenId`. * * Requirements: * * - `tokenId` must exist. */ function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) { require(_exists(tokenId), "ERC721: operator query for nonexistent token"); address owner = ERC721.ownerOf(tokenId); return (spender == owner || getApproved(tokenId) == spender || isApprovedForAll(owner, spender)); } /** * @dev Safely mints `tokenId` and transfers it to `to`. * * Requirements: * * - `tokenId` must not exist. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeMint(address to, uint256 tokenId) internal virtual { _safeMint(to, tokenId, ""); } /** * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is * forwarded in {IERC721Receiver-onERC721Received} to contract recipients. */ function _safeMint( address to, uint256 tokenId, bytes memory _data ) internal virtual { _mint(to, tokenId); require( _checkOnERC721Received(address(0), to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer" ); } /** * @dev Mints `tokenId` and transfers it to `to`. * * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible * * Requirements: * * - `tokenId` must not exist. * - `to` cannot be the zero address. * * Emits a {Transfer} event. */ function _mint(address to, uint256 tokenId) internal virtual { require(to != address(0), "ERC721: mint to the zero address"); require(!_exists(tokenId), "ERC721: token already minted"); _beforeTokenTransfer(address(0), to, tokenId); _balances[to] += 1; _owners[tokenId] = to; emit Transfer(address(0), to, tokenId); } /** * @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 Approve `operator` to operate on all of `owner` tokens * * Emits a {ApprovalForAll} event. */ function _setApprovalForAll( address owner, address operator, bool approved ) internal virtual { require(owner != operator, "ERC721: approve to caller"); _operatorApprovals[owner][operator] = approved; emit ApprovalForAll(owner, operator, approved); } /** * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address. * The call is not executed if the target address is not a contract. * * @param from address representing the previous owner of the given token ID * @param to target address that will receive the tokens * @param tokenId uint256 ID of the token to be transferred * @param _data bytes optional data to send along with the call * @return bool whether the call correctly returned the expected magic value */ function _checkOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) private returns (bool) { if (to.isContract()) { try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) { return retval == IERC721Receiver.onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert("ERC721: transfer to non ERC721Receiver implementer"); } else { assembly { revert(add(32, reason), mload(reason)) } } } } else { return true; } } /** * @dev Hook that is called before any token transfer. This includes minting * and burning. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, ``from``'s `tokenId` will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual {} }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721Receiver.sol) pragma solidity ^0.8.0; /** * @title ERC721 token receiver interface * @dev Interface for any contract that wants to support safeTransfers * from ERC721 asset contracts. */ interface IERC721Receiver { /** * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} * by `operator` from `from`, this function is called. * * It must return its Solidity selector to confirm the token transfer. * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted. * * The selector can be obtained in Solidity with `IERC721.onERC721Received.selector`. */ function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol) pragma solidity ^0.8.0; import "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional metadata extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Metadata is IERC721 { /** * @dev Returns the token collection name. */ function name() external view returns (string memory); /** * @dev Returns the token collection symbol. */ function symbol() external view returns (string memory); /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) external view returns (string memory); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Address.sol) pragma solidity ^0.8.0; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; assembly { size := extcodesize(account) } return size > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Counters.sol) pragma solidity ^0.8.0; /** * @title Counters * @author Matt Condon (@shrugs) * @dev Provides counters that can only be incremented, decremented or reset. This can be used e.g. to track the number * of elements in a mapping, issuing ERC721 ids, or counting request ids. * * Include with `using Counters for Counters.Counter;` */ library Counters { struct Counter { // This variable should never be directly accessed by users of the library: interactions must be restricted to // the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add // this feature: see https://github.com/ethereum/solidity/issues/4637 uint256 _value; // default: 0 } function current(Counter storage counter) internal view returns (uint256) { return counter._value; } function increment(Counter storage counter) internal { unchecked { counter._value += 1; } } function decrement(Counter storage counter) internal { uint256 value = counter._value; require(value > 0, "Counter: decrement overflow"); unchecked { counter._value = value - 1; } } function reset(Counter storage counter) internal { counter._value = 0; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Strings.sol) pragma solidity ^0.8.0; /** * @dev String operations. */ library Strings { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { // Inspired by OraclizeAPI's implementation - MIT licence // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol if (value == 0) { return "0"; } uint256 temp = value; uint256 digits; while (temp != 0) { digits++; temp /= 10; } bytes memory buffer = new bytes(digits); while (value != 0) { digits -= 1; buffer[digits] = bytes1(uint8(48 + uint256(value % 10))); value /= 10; } return string(buffer); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { if (value == 0) { return "0x00"; } uint256 temp = value; uint256 length = 0; while (temp != 0) { length++; temp >>= 8; } return toHexString(value, length); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _HEX_SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol) pragma solidity ^0.8.0; import "./IERC165.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: GPL-3.0 pragma solidity ^0.8.6; /// Shared public library for on-chain NFT functions interface IPublicSharedMetadata { /// @param unencoded bytes to base64-encode function base64Encode(bytes memory unencoded) external pure returns (string memory); /// Encodes the argument json bytes into base64-data uri format /// @param json Raw json to base64 and turn into a data-uri function encodeMetadataJSON(bytes memory json) external pure returns (string memory); /// Proxy to openzeppelin's toString function /// @param value number to return as a string function numberToString(uint256 value) external pure returns (string memory); }
// SPDX-License-Identifier: GPL-3.0 pragma solidity 0.8.9; /** @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@BBB#RROOOOOOOOOOOOOOORR#BBB@@@@@@@@@@@@@@@@@@@@@@@@@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BBBBBBBBBBBBBBBBBBBBBBBBBB########RRRRRRRRRRRRRRRRROOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOORRRRRRRRRRRRRRB@@@@@@@@@@@ @@@@@@@@@@BBBBBBBBBBBBBBBBBBBBBBBBBBB#########RRRRRRRRRRRRRRRRRRROOOOOOOOOOOOOOOOOOOOOOOOOORRRRRRRRRRRRRRRRRR##@@@@@@@@@@@@ @@@@@@@@@@@BBBBBBBBBBBBBBBBBBBBBBBBBBBBB#########RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR###B@@@@@@@@@@@@ @@@@@@@@@@@BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB###########RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR######B@@@@@@@@@@@@@ @@@@@@@@@@@@BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB#############RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR########BB@@@@@@@@@@@@@@ @@@@@@@@@@@@@@BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB###############RRRRRRRRRRRRRRRRRRRRRRRRRRR#############BB@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB#################################################BBB@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB#######################################BBBBBBB@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB########################BBBBBBBBBBBBB@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB@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@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ */ import {Strings} from "@openzeppelin/contracts/utils/Strings.sol"; /// Color lib is a custom library for handling the math functions required to generate the gradient step colors /// Originally written in javascript, this is a solidity port. library ColorLib { struct HSL { uint256 h; uint256 s; uint256 l; } /// Lookup table for cubicinout range 0-99 function cubicInOut(uint16 p) internal pure returns (int256) { if (p < 13) { return 0; } if (p < 17) { return 1; } if (p < 19) { return 2; } if (p < 21) { return 3; } if (p < 23) { return 4; } if (p < 24) { return 5; } if (p < 25) { return 6; } if (p < 27) { return 7; } if (p < 28) { return 8; } if (p < 29) { return 9; } if (p < 30) { return 10; } if (p < 31) { return 11; } if (p < 32) { return 13; } if (p < 33) { return 14; } if (p < 34) { return 15; } if (p < 35) { return 17; } if (p < 36) { return 18; } if (p < 37) { return 20; } if (p < 38) { return 21; } if (p < 39) { return 23; } if (p < 40) { return 25; } if (p < 41) { return 27; } if (p < 42) { return 29; } if (p < 43) { return 31; } if (p < 44) { return 34; } if (p < 45) { return 36; } if (p < 46) { return 38; } if (p < 47) { return 41; } if (p < 48) { return 44; } if (p < 49) { return 47; } if (p < 50) { return 50; } if (p < 51) { return 52; } if (p < 52) { return 55; } if (p < 53) { return 58; } if (p < 54) { return 61; } if (p < 55) { return 63; } if (p < 56) { return 65; } if (p < 57) { return 68; } if (p < 58) { return 70; } if (p < 59) { return 72; } if (p < 60) { return 74; } if (p < 61) { return 76; } if (p < 62) { return 78; } if (p < 63) { return 79; } if (p < 64) { return 81; } if (p < 65) { return 82; } if (p < 66) { return 84; } if (p < 67) { return 85; } if (p < 68) { return 86; } if (p < 69) { return 88; } if (p < 70) { return 89; } if (p < 71) { return 90; } if (p < 72) { return 91; } if (p < 74) { return 92; } if (p < 75) { return 93; } if (p < 76) { return 94; } if (p < 78) { return 95; } if (p < 80) { return 96; } if (p < 82) { return 97; } if (p < 86) { return 98; } return 99; } /// Lookup table for cubicid range 0-99 function cubicIn(uint256 p) internal pure returns (uint8) { if (p < 22) { return 0; } if (p < 28) { return 1; } if (p < 32) { return 2; } if (p < 32) { return 3; } if (p < 34) { return 3; } if (p < 36) { return 4; } if (p < 39) { return 5; } if (p < 41) { return 6; } if (p < 43) { return 7; } if (p < 46) { return 9; } if (p < 47) { return 10; } if (p < 49) { return 11; } if (p < 50) { return 12; } if (p < 51) { return 13; } if (p < 53) { return 14; } if (p < 54) { return 15; } if (p < 55) { return 16; } if (p < 56) { return 17; } if (p < 57) { return 18; } if (p < 58) { return 19; } if (p < 59) { return 20; } if (p < 60) { return 21; } if (p < 61) { return 22; } if (p < 62) { return 23; } if (p < 63) { return 25; } if (p < 64) { return 26; } if (p < 65) { return 27; } if (p < 66) { return 28; } if (p < 67) { return 30; } if (p < 68) { return 31; } if (p < 69) { return 32; } if (p < 70) { return 34; } if (p < 71) { return 35; } if (p < 72) { return 37; } if (p < 73) { return 38; } if (p < 74) { return 40; } if (p < 75) { return 42; } if (p < 76) { return 43; } if (p < 77) { return 45; } if (p < 78) { return 47; } if (p < 79) { return 49; } if (p < 80) { return 51; } if (p < 81) { return 53; } if (p < 82) { return 55; } if (p < 83) { return 57; } if (p < 84) { return 59; } if (p < 85) { return 61; } if (p < 86) { return 63; } if (p < 87) { return 65; } if (p < 88) { return 68; } if (p < 89) { return 70; } if (p < 90) { return 72; } if (p < 91) { return 75; } if (p < 92) { return 77; } if (p < 93) { return 80; } if (p < 94) { return 83; } if (p < 95) { return 85; } if (p < 96) { return 88; } if (p < 97) { return 91; } if (p < 98) { return 94; } return 97; } /// Lookup table for quintin range 0-99 function quintIn(uint256 p) internal pure returns (uint8) { if (p < 39) { return 0; } if (p < 45) { return 1; } if (p < 49) { return 2; } if (p < 52) { return 3; } if (p < 53) { return 4; } if (p < 54) { return 4; } if (p < 55) { return 5; } if (p < 56) { return 5; } if (p < 57) { return 6; } if (p < 58) { return 6; } if (p < 59) { return 7; } if (p < 60) { return 7; } if (p < 61) { return 8; } if (p < 62) { return 9; } if (p < 63) { return 9; } if (p < 64) { return 10; } if (p < 65) { return 11; } if (p < 66) { return 12; } if (p < 67) { return 13; } if (p < 68) { return 14; } if (p < 69) { return 15; } if (p < 70) { return 16; } if (p < 71) { return 18; } if (p < 72) { return 19; } if (p < 73) { return 20; } if (p < 74) { return 22; } if (p < 75) { return 23; } if (p < 76) { return 25; } if (p < 77) { return 27; } if (p < 78) { return 28; } if (p < 79) { return 30; } if (p < 80) { return 32; } if (p < 81) { return 34; } if (p < 82) { return 37; } if (p < 83) { return 39; } if (p < 84) { return 41; } if (p < 85) { return 44; } if (p < 86) { return 47; } if (p < 87) { return 49; } if (p < 88) { return 52; } if (p < 89) { return 55; } if (p < 90) { return 59; } if (p < 91) { return 62; } if (p < 92) { return 65; } if (p < 93) { return 69; } if (p < 94) { return 73; } if (p < 95) { return 77; } if (p < 96) { return 81; } if (p < 97) { return 85; } if (p < 98) { return 90; } return 95; } // Util for keeping hue range in 0-360 positive function clampHue(int256 h) internal pure returns (uint256) { unchecked { h /= 100; if (h >= 0) { return uint256(h) % 360; } else { return (uint256(-1 * h) % 360); } } } /// find hue within range function lerpHue( uint8 optionNum, uint256 direction, uint256 uhue, uint8 pct ) internal pure returns (uint256) { // unchecked { uint256 option = optionNum % 4; int256 hue = int256(uhue); if (option == 0) { return clampHue( (((100 - int256(uint256(pct))) * hue) + (int256(uint256(pct)) * (direction == 0 ? hue - 10 : hue + 10))) ); } if (option == 1) { return clampHue( (((100 - int256(uint256(pct))) * hue) + (int256(uint256(pct)) * (direction == 0 ? hue - 30 : hue + 30))) ); } if (option == 2) { return clampHue( ( (((100 - cubicInOut(pct)) * hue) + (cubicInOut(pct) * (direction == 0 ? hue - 50 : hue + 50))) ) ); } return clampHue( ((100 - cubicInOut(pct)) * hue) + (cubicInOut(pct) * int256( hue + ((direction == 0 ? int256(-60) : int256(60)) * int256(uint256(optionNum > 128 ? 1 : 0))) + 30 )) ); // } } /// find lightness within range function lerpLightness( uint8 optionNum, uint256 start, uint256 end, uint256 pct ) internal pure returns (uint256) { uint256 lerpPercent; if (optionNum == 0) { lerpPercent = quintIn(pct); } else { lerpPercent = cubicIn(pct); } return 1 + (((100.0 - lerpPercent) * start + (lerpPercent * end)) / 100); } /// find saturation within range function lerpSaturation( uint8 optionNum, uint256 start, uint256 end, uint256 pct ) internal pure returns (uint256) { unchecked { uint256 lerpPercent; if (optionNum == 0) { lerpPercent = quintIn(pct); return 1 + (((100.0 - lerpPercent) * start + lerpPercent * end) / 100); } lerpPercent = pct; return ((100.0 - lerpPercent) * start + lerpPercent * end) / 100; } } /// encode a color string function encodeStr( uint256 h, uint256 s, uint256 l ) internal pure returns (bytes memory) { return abi.encodePacked( "hsl(", Strings.toString(h), ", ", Strings.toString(s), "%, ", Strings.toString(l), "%)" ); } /// get gradient color strings for the given addresss function gradientForAddress(address addr) internal pure returns (bytes[5] memory) { unchecked { bytes32 addrBytes = bytes32(uint256(uint160(addr))); uint256 startHue = (uint256(uint8(addrBytes[31 - 12])) * 24) / 17; // 255 - 360 uint256 startLightness = (uint256(uint8(addrBytes[31 - 2])) * 5) / 34 + 32; // 255 => 37.5 + 32 (32, 69.5) uint256 endLightness = 97; endLightness += (((uint256(uint8(addrBytes[31 - 8])) * 5) / 51) + 72); // 72-97 endLightness /= 2; uint256 startSaturation = uint256(uint8(addrBytes[31 - 7])) / 16 + 81; // 0-16 + 72 uint256 endSaturation = uint256(uint8(addrBytes[31 - 10]) * 11) / 128 + 70; // 0-22 + 70 if (endSaturation > startSaturation - 10) { endSaturation = startSaturation - 10; } return [ // 0 encodeStr( lerpHue( uint8(addrBytes[31 - 3]), uint8(addrBytes[31 - 6]) % 2, startHue, 0 ), lerpSaturation( uint8(addrBytes[31 - 3]) % 2, startSaturation, endSaturation, 100 ), lerpLightness( uint8(addrBytes[31 - 5]) % 2, startLightness, endLightness, 100 ) ), // 1 encodeStr( lerpHue( uint8(addrBytes[31 - 3]), uint8(addrBytes[31 - 6]) % 2, startHue, 10 ), lerpSaturation( uint8(addrBytes[31 - 3]) % 2, startSaturation, endSaturation, 90 ), lerpLightness( uint8(addrBytes[31 - 5]) % 2, startLightness, endLightness, 90 ) ), // 2 encodeStr( lerpHue( uint8(addrBytes[31 - 3]), uint8(addrBytes[31 - 6]) % 2, startHue, 70 ), lerpSaturation( uint8(addrBytes[31 - 3]) % 2, startSaturation, endSaturation, 70 ), lerpLightness( uint8(addrBytes[31 - 5]) % 2, startLightness, endLightness, 70 ) ), // 3 encodeStr( lerpHue( uint8(addrBytes[31 - 3]), uint8(addrBytes[31 - 6]) % 2, startHue, 90 ), lerpSaturation( uint8(addrBytes[31 - 3]) % 2, startSaturation, endSaturation, 20 ), lerpLightness( uint8(addrBytes[31 - 5]) % 2, startLightness, endLightness, 20 ) ), // 4 encodeStr( lerpHue( uint8(addrBytes[31 - 3]), uint8(addrBytes[31 - 6]) % 2, startHue, 100 ), lerpSaturation( uint8(addrBytes[31 - 3]) % 2, startSaturation, endSaturation, 0 ), startLightness ) ]; } } }
{ "evmVersion": "london", "libraries": {}, "metadata": { "bytecodeHash": "ipfs", "useLiteralContent": true }, "optimizer": { "enabled": true, "runs": 100 }, "remappings": [], "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"contract IPublicSharedMetadata","name":"_sharedMetadata","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":[{"internalType":"address[]","name":"to","type":"address[]"}],"name":"airdrop","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":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getZorbRenderAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"gradientForAddress","outputs":[{"internalType":"bytes[5]","name":"","type":"bytes[5]"}],"stateMutability":"pure","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":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"mintIsOpen","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"marketPlaces","type":"address[]"},{"internalType":"bool","name":"isKnown","type":"bool"}],"name":"setKnownMarketplaces","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":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"zorbForAddress","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
60a06040523480156200001157600080fd5b5060405162003974380380620039748339810160408190526200003491620001e1565b60408051808201825260058152645a6f72627360d81b6020808301918252835180850190945260048452632d27a92160e11b9084015281519192916200007d916000916200013b565b508051620000939060019060208401906200013b565b505050620000b0620000aa620000dc60201b60201c565b620000e0565b6001600160a01b038116608052620000d5600962000132602090811b62000dac17901c565b5062000250565b3390565b600680546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b80546001019055565b828054620001499062000213565b90600052602060002090601f0160209004810192826200016d5760008555620001b8565b82601f106200018857805160ff1916838001178555620001b8565b82800160010185558215620001b8579182015b82811115620001b85782518255916020019190600101906200019b565b50620001c6929150620001ca565b5090565b5b80821115620001c65760008155600101620001cb565b600060208284031215620001f457600080fd5b81516001600160a01b03811681146200020c57600080fd5b9392505050565b600181811c908216806200022857607f821691505b602082108114156200024a57634e487b7160e01b600052602260045260246000fd5b50919050565b6080516136fa6200027a60003960008181610a6c01528181610af60152610bfa01526136fa6000f3fe608060405234801561001057600080fd5b50600436106101585760003560e01c8063715018a6116100c3578063aa1152ab1161007c578063aa1152ab146102d1578063b88d4fde146102d9578063c87b56dd146102ec578063de909942146102ff578063e985e9c514610312578063f2fde38b1461032557600080fd5b8063715018a614610277578063729ad39e1461027f5780638da5cb5b1461029257806391557ac4146102a357806395d89b41146102b6578063a22cb465146102be57600080fd5b806318160ddd1161011557806318160ddd1461020257806323b872dd1461021857806342842e0e1461022b5780636352211e1461023e5780636411fb451461025157806370a082311461026457600080fd5b806301ffc9a71461015d57806303ff85ff1461018557806306fdde03146101a5578063081812fc146101ba578063095ea7b3146101e55780631249c58b146101fa575b600080fd5b61017061016b3660046127a1565b610338565b60405190151581526020015b60405180910390f35b6101986101933660046127d3565b61038a565b60405161017c9190612848565b6101ad61039b565b60405161017c9190612895565b6101cd6101c83660046128a8565b61042d565b6040516001600160a01b03909116815260200161017c565b6101f86101f33660046128c1565b6104ba565b005b6101f86105cb565b61020a610611565b60405190815260200161017c565b6101f86102263660046128ed565b61062d565b6101f86102393660046128ed565b61065e565b6101cd61024c3660046128a8565b610679565b6101f861025f36600461293e565b6106f0565b61020a6102723660046127d3565b610791565b6101f8610818565b6101f861028d366004612a07565b61084c565b6006546001600160a01b03166101cd565b6101cd6102b13660046128a8565b6108c6565b6101ad61099d565b6101f86102cc366004612ab8565b6109ac565b6101706109b7565b6101f86102e7366004612b14565b6109e0565b6101ad6102fa3660046128a8565b610a12565b6101ad61030d3660046127d3565b610bcb565b610170610320366004612bc2565b610ce3565b6101f86103333660046127d3565b610d11565b60006001600160e01b031982166380ac58cd60e01b148061036957506001600160e01b03198216635b5e139f60e01b145b8061038457506301ffc9a760e01b6001600160e01b03198316145b92915050565b610392612764565b61038482610db5565b6060600080546103aa90612bfb565b80601f01602080910402602001604051908101604052809291908181526020018280546103d690612bfb565b80156104235780601f106103f857610100808354040283529160200191610423565b820191906000526020600020905b81548152906001019060200180831161040657829003601f168201915b5050505050905090565b600061043882611099565b61049e5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084015b60405180910390fd5b506000908152600460205260409020546001600160a01b031690565b60006104c582610679565b9050806001600160a01b0316836001600160a01b031614156105335760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b6064820152608401610495565b336001600160a01b038216148061054f575061054f8133610ce3565b6105bc5760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f776044820152771b995c881b9bdc88185c1c1c9bdd995908199bdc88185b1b60421b6064820152608401610495565b6105c683836110b6565b505050565b6105d36109b7565b6105ef5760405162461bcd60e51b815260040161049590612c36565b610601336105fc60095490565b611124565b61060f600980546001019055565b565b6000600161061e60095490565b6106289190612c73565b905090565b6106373382611263565b6106535760405162461bcd60e51b815260040161049590612c8a565b6105c683838361132d565b6105c6838383604051806020016040528060008152506109e0565b6000818152600260205260408120546001600160a01b0316806103845760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b6064820152608401610495565b6006546001600160a01b0316331461071a5760405162461bcd60e51b815260040161049590612cdb565b60005b8281101561078b57816007600086868581811061073c5761073c612d10565b905060200201602081019061075191906127d3565b6001600160a01b031681526020810191909152604001600020805460ff19169115159190911790558061078381612d26565b91505061071d565b50505050565b60006001600160a01b0382166107fc5760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b6064820152608401610495565b506001600160a01b031660009081526003602052604090205490565b6006546001600160a01b031633146108425760405162461bcd60e51b815260040161049590612cdb565b61060f60006114d8565b6108546109b7565b6108705760405162461bcd60e51b815260040161049590612c36565b60005b81518110156108c2576108a282828151811061089157610891612d10565b60200260200101516105fc60095490565b6108b0600980546001019055565b806108ba81612d26565b915050610873565b5050565b6040516331a9108f60e11b81526004810182905260009081903090636352211e9060240160206040518083038186803b15801561090257600080fd5b505afa158015610916573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061093a9190612d41565b6001600160a01b03811660009081526007602052604090205490915060ff16801561097b57506000838152600860205260409020546001600160a01b031615155b156103845750506000908152600860205260409020546001600160a01b031690565b6060600180546103aa90612bfb565b6108c233838361152a565b60006361cfdfd04211801561062857506109d862024ea06361cfdfd0612d5e565b421115905090565b6109ea3383611263565b610a065760405162461bcd60e51b815260040161049590612c8a565b61078b848484846115f5565b6060610a1d82611099565b610a545760405162461bcd60e51b81526020600482015260086024820152672737903a37b5b2b760c11b6044820152606401610495565b60405162b86e3360e51b8152600481018390526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063170dc6609060240160006040518083038186803b158015610ab657600080fd5b505afa158015610aca573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610af29190810190612d76565b90507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d01fde8c828384610b3261030d896108c6565b604051602001610b459493929190612e08565b6040516020818303038152906040526040518263ffffffff1660e01b8152600401610b709190612895565b60006040518083038186803b158015610b8857600080fd5b505afa158015610b9c573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610bc49190810190612d76565b9392505050565b60606000610bd88361038a565b80516020808301516040808501516060860151608087015192519697506000967f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169663d5fb1b1996610c399691959194939201612fbb565b6040516020818303038152906040526040518263ffffffff1660e01b8152600401610c649190612895565b60006040518083038186803b158015610c7c57600080fd5b505afa158015610c90573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610cb89190810190612d76565b905080604051602001610ccb91906133d8565b60405160208183030381529060405292505050919050565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b6006546001600160a01b03163314610d3b5760405162461bcd60e51b815260040161049590612cdb565b6001600160a01b038116610da05760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610495565b610da9816114d8565b50565b80546001019055565b610dbd612764565b6001600160a01b038216600060118260131a60180281610ddf57610ddf61341d565b0490506000602283601d1a60050281610dfa57610dfa61341d565b046020019050606160338460171a60050281610e1857610e1861341d565b0401604801600281049050600060108560181a81610e3857610e3861341d565b04605101905060006080866015600b91901a0260ff1681610e5b57610e5b61341d565b046046019050600a8203811115610e73575060091981015b6040805160a0810190915280610eed610ea889601c1a60028b60191a81610e9c57610e9c61341d565b0660ff168a6000611628565b610ec860028b601c1a81610ebe57610ebe61341d565b068787606461177c565b610ee860028c601a1a81610ede57610ede61341d565b068a8a60646117c4565b61183c565b8152602001610f5b610f1b89601c1a60028b60191a81610f0f57610f0f61341d565b0660ff168a600a611628565b610f3b60028b601c1a81610f3157610f3161341d565b068787605a61177c565b610ee860028c601a1a81610f5157610f5161341d565b068a8a605a6117c4565b8152602001610fc9610f8989601c1a60028b60191a81610f7d57610f7d61341d565b0660ff168a6046611628565b610fa960028b601c1a81610f9f57610f9f61341d565b068787604661177c565b610ee860028c601a1a81610fbf57610fbf61341d565b068a8a60466117c4565b8152602001611037610ff789601c1a60028b60191a81610feb57610feb61341d565b0660ff168a605a611628565b61101760028b601c1a8161100d5761100d61341d565b068787601461177c565b610ee860028c601a1a8161102d5761102d61341d565b068a8a60146117c4565b815260200161108b61106589601c1a60028b60191a816110595761105961341d565b0660ff168a6064611628565b61108560028b601c1a8161107b5761107b61341d565b068787600061177c565b8861183c565b905298975050505050505050565b6000908152600260205260409020546001600160a01b0316151590565b600081815260046020526040902080546001600160a01b0319166001600160a01b03841690811790915581906110eb82610679565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6001600160a01b03821661117a5760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610495565b61118381611099565b156111d05760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610495565b6111dc60008383611883565b6001600160a01b0382166000908152600360205260408120805460019290611205908490612d5e565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b600061126e82611099565b6112cf5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610495565b60006112da83610679565b9050806001600160a01b0316846001600160a01b031614806113155750836001600160a01b031661130a8461042d565b6001600160a01b0316145b8061132557506113258185610ce3565b949350505050565b826001600160a01b031661134082610679565b6001600160a01b0316146113a85760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201526839903737ba1037bbb760b91b6064820152608401610495565b6001600160a01b03821661140a5760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610495565b611415838383611883565b6114206000826110b6565b6001600160a01b0383166000908152600360205260408120805460019290611449908490612c73565b90915550506001600160a01b0382166000908152600360205260408120805460019290611477908490612d5e565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b600680546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b816001600160a01b0316836001600160a01b031614156115885760405162461bcd60e51b815260206004820152601960248201527822a9219b99189d1030b8383937bb32903a379031b0b63632b960391b6044820152606401610495565b6001600160a01b03838116600081815260056020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b61160084848461132d565b61160c848484846118d2565b61078b5760405162461bcd60e51b815260040161049590613433565b600080611636600487613485565b60ff16905083816116a35761169a861561165a5761165582600a6134a7565b611665565b611665600a836134e8565b6116729060ff8716613527565b8261168160ff881660646134e8565b61168b9190613527565b61169591906134a7565b6119dc565b92505050611325565b81600114156116cb5761169a86156116c05761165582601e6134a7565b611665601e836134e8565b81600214156117265761169a86156116ed576116e88260326134a7565b6116f8565b6116f86032836134e8565b6117048660ff16611a0f565b61170e9190613527565b8261171b8760ff16611a0f565b6116819060646134e8565b61177160808860ff161161173b57600061173e565b60015b60ff16871561174e57603c611752565b603b195b61175c9190613527565b61176690836134a7565b6116f890601e6134a7565b979650505050505050565b60008060ff86166117ac5761179083611f05565b60ff169050606481810386028583020104600101915050611325565b50816064818103860285830201049695505050505050565b60008060ff86166117e2576117d883611f05565b60ff1690506117f1565b6117eb83612261565b60ff1690505b60646117fd85836135ac565b86611809846064612c73565b61181391906135ac565b61181d9190612d5e565b61182791906135cb565b611832906001612d5e565b9695505050505050565b606061184784612667565b61185084612667565b61185984612667565b60405160200161186b939291906135df565b60405160208183030381529060405290509392505050565b6001600160a01b03821660009081526007602052604090205460ff16156105c657600081815260086020526040902080546001600160a01b0385166001600160a01b0319909116179055505050565b60006001600160a01b0384163b156119d457604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290611916903390899088908890600401613660565b602060405180830381600087803b15801561193057600080fd5b505af1925050508015611960575060408051601f3d908101601f1916820190925261195d91810190613693565b60015b6119ba573d80801561198e576040519150601f19603f3d011682016040523d82523d6000602084013e611993565b606091505b5080516119b25760405162461bcd60e51b815260040161049590613433565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050611325565b506001611325565b6064900560008082126119f557610168825b0692915050565b6101688260001902816119ee576119ee61341d565b919050565b6000600d8261ffff161015611a2657506000919050565b60118261ffff161015611a3b57506001919050565b60138261ffff161015611a5057506002919050565b60158261ffff161015611a6557506003919050565b60178261ffff161015611a7a57506004919050565b60188261ffff161015611a8f57506005919050565b60198261ffff161015611aa457506006919050565b601b8261ffff161015611ab957506007919050565b601c8261ffff161015611ace57506008919050565b601d8261ffff161015611ae357506009919050565b601e8261ffff161015611af85750600a919050565b601f8261ffff161015611b0d5750600b919050565b60208261ffff161015611b225750600d919050565b60218261ffff161015611b375750600e919050565b60228261ffff161015611b4c5750600f919050565b60238261ffff161015611b6157506011919050565b60248261ffff161015611b7657506012919050565b60258261ffff161015611b8b57506014919050565b60268261ffff161015611ba057506015919050565b60278261ffff161015611bb557506017919050565b60288261ffff161015611bca57506019919050565b60298261ffff161015611bdf5750601b919050565b602a8261ffff161015611bf45750601d919050565b602b8261ffff161015611c095750601f919050565b602c8261ffff161015611c1e57506022919050565b602d8261ffff161015611c3357506024919050565b602e8261ffff161015611c4857506026919050565b602f8261ffff161015611c5d57506029919050565b60308261ffff161015611c725750602c919050565b60318261ffff161015611c875750602f919050565b60328261ffff161015611c9c57506032919050565b60338261ffff161015611cb157506034919050565b60348261ffff161015611cc657506037919050565b60358261ffff161015611cdb5750603a919050565b60368261ffff161015611cf05750603d919050565b60378261ffff161015611d055750603f919050565b60388261ffff161015611d1a57506041919050565b60398261ffff161015611d2f57506044919050565b603a8261ffff161015611d4457506046919050565b603b8261ffff161015611d5957506048919050565b603c8261ffff161015611d6e5750604a919050565b603d8261ffff161015611d835750604c919050565b603e8261ffff161015611d985750604e919050565b603f8261ffff161015611dad5750604f919050565b60408261ffff161015611dc257506051919050565b60418261ffff161015611dd757506052919050565b60428261ffff161015611dec57506054919050565b60438261ffff161015611e0157506055919050565b60448261ffff161015611e1657506056919050565b60458261ffff161015611e2b57506058919050565b60468261ffff161015611e4057506059919050565b60478261ffff161015611e555750605a919050565b60488261ffff161015611e6a5750605b919050565b604a8261ffff161015611e7f5750605c919050565b604b8261ffff161015611e945750605d919050565b604c8261ffff161015611ea95750605e919050565b604e8261ffff161015611ebe5750605f919050565b60508261ffff161015611ed357506060919050565b60528261ffff161015611ee857506061919050565b60568261ffff161015611efd57506062919050565b506063919050565b60006027821015611f1857506000919050565b602d821015611f2957506001919050565b6031821015611f3a57506002919050565b6034821015611f4b57506003919050565b6035821015611f5c57506004919050565b6036821015611f6d57506004919050565b6037821015611f7e57506005919050565b6038821015611f8f57506005919050565b6039821015611fa057506006919050565b603a821015611fb157506006919050565b603b821015611fc257506007919050565b603c821015611fd357506007919050565b603d821015611fe457506008919050565b603e821015611ff557506009919050565b603f82101561200657506009919050565b60408210156120175750600a919050565b60418210156120285750600b919050565b60428210156120395750600c919050565b604382101561204a5750600d919050565b604482101561205b5750600e919050565b604582101561206c5750600f919050565b604682101561207d57506010919050565b604782101561208e57506012919050565b604882101561209f57506013919050565b60498210156120b057506014919050565b604a8210156120c157506016919050565b604b8210156120d257506017919050565b604c8210156120e357506019919050565b604d8210156120f45750601b919050565b604e8210156121055750601c919050565b604f8210156121165750601e919050565b605082101561212757506020919050565b605182101561213857506022919050565b605282101561214957506025919050565b605382101561215a57506027919050565b605482101561216b57506029919050565b605582101561217c5750602c919050565b605682101561218d5750602f919050565b605782101561219e57506031919050565b60588210156121af57506034919050565b60598210156121c057506037919050565b605a8210156121d15750603b919050565b605b8210156121e25750603e919050565b605c8210156121f357506041919050565b605d82101561220457506045919050565b605e82101561221557506049919050565b605f8210156122265750604d919050565b606082101561223757506051919050565b606182101561224857506055919050565b60628210156122595750605a919050565b50605f919050565b6000601682101561227457506000919050565b601c82101561228557506001919050565b602082101561229657506002919050565b60208210156122a757506003919050565b60228210156122b857506003919050565b60248210156122c957506004919050565b60278210156122da57506005919050565b60298210156122eb57506006919050565b602b8210156122fc57506007919050565b602e82101561230d57506009919050565b602f82101561231e5750600a919050565b603182101561232f5750600b919050565b60328210156123405750600c919050565b60338210156123515750600d919050565b60358210156123625750600e919050565b60368210156123735750600f919050565b603782101561238457506010919050565b603882101561239557506011919050565b60398210156123a657506012919050565b603a8210156123b757506013919050565b603b8210156123c857506014919050565b603c8210156123d957506015919050565b603d8210156123ea57506016919050565b603e8210156123fb57506017919050565b603f82101561240c57506019919050565b604082101561241d5750601a919050565b604182101561242e5750601b919050565b604282101561243f5750601c919050565b60438210156124505750601e919050565b60448210156124615750601f919050565b604582101561247257506020919050565b604682101561248357506022919050565b604782101561249457506023919050565b60488210156124a557506025919050565b60498210156124b657506026919050565b604a8210156124c757506028919050565b604b8210156124d85750602a919050565b604c8210156124e95750602b919050565b604d8210156124fa5750602d919050565b604e82101561250b5750602f919050565b604f82101561251c57506031919050565b605082101561252d57506033919050565b605182101561253e57506035919050565b605282101561254f57506037919050565b605382101561256057506039919050565b60548210156125715750603b919050565b60558210156125825750603d919050565b60568210156125935750603f919050565b60578210156125a457506041919050565b60588210156125b557506044919050565b60598210156125c657506046919050565b605a8210156125d757506048919050565b605b8210156125e85750604b919050565b605c8210156125f95750604d919050565b605d82101561260a57506050919050565b605e82101561261b57506053919050565b605f82101561262c57506055919050565b606082101561263d57506058919050565b606182101561264e5750605b919050565b606282101561265f5750605e919050565b506061919050565b60608161268b5750506040805180820190915260018152600360fc1b602082015290565b8160005b81156126b5578061269f81612d26565b91506126ae9050600a836135cb565b915061268f565b6000816001600160401b038111156126cf576126cf6129c1565b6040519080825280601f01601f1916602001820160405280156126f9576020820181803683370190505b5090505b84156113255761270e600183612c73565b915061271b600a866136b0565b612726906030612d5e565b60f81b81838151811061273b5761273b612d10565b60200101906001600160f81b031916908160001a90535061275d600a866135cb565b94506126fd565b6040518060a001604052806005905b60608152602001906001900390816127735790505090565b6001600160e01b031981168114610da957600080fd5b6000602082840312156127b357600080fd5b8135610bc48161278b565b6001600160a01b0381168114610da957600080fd5b6000602082840312156127e557600080fd5b8135610bc4816127be565b60005b8381101561280b5781810151838201526020016127f3565b8381111561078b5750506000910152565b600081518084526128348160208601602086016127f0565b601f01601f19169290920160200192915050565b602080825260009060c0830183820185845b600581101561288957601f1987850301835261287784835161281c565b9350918401919084019060010161285a565b50919695505050505050565b602081526000610bc4602083018461281c565b6000602082840312156128ba57600080fd5b5035919050565b600080604083850312156128d457600080fd5b82356128df816127be565b946020939093013593505050565b60008060006060848603121561290257600080fd5b833561290d816127be565b9250602084013561291d816127be565b929592945050506040919091013590565b80358015158114611a0a57600080fd5b60008060006040848603121561295357600080fd5b83356001600160401b038082111561296a57600080fd5b818601915086601f83011261297e57600080fd5b81358181111561298d57600080fd5b8760208260051b85010111156129a257600080fd5b6020928301955093506129b8918601905061292e565b90509250925092565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b03811182821017156129ff576129ff6129c1565b604052919050565b60006020808385031215612a1a57600080fd5b82356001600160401b0380821115612a3157600080fd5b818501915085601f830112612a4557600080fd5b813581811115612a5757612a576129c1565b8060051b9150612a688483016129d7565b8181529183018401918481019088841115612a8257600080fd5b938501935b83851015612aac5784359250612a9c836127be565b8282529385019390850190612a87565b98975050505050505050565b60008060408385031215612acb57600080fd5b8235612ad6816127be565b9150612ae46020840161292e565b90509250929050565b60006001600160401b03821115612b0657612b066129c1565b50601f01601f191660200190565b60008060008060808587031215612b2a57600080fd5b8435612b35816127be565b93506020850135612b45816127be565b92506040850135915060608501356001600160401b03811115612b6757600080fd5b8501601f81018713612b7857600080fd5b8035612b8b612b8682612aed565b6129d7565b818152886020838501011115612ba057600080fd5b8160208401602083013760006020838301015280935050505092959194509250565b60008060408385031215612bd557600080fd5b8235612be0816127be565b91506020830135612bf0816127be565b809150509250929050565b600181811c90821680612c0f57607f821691505b60208210811415612c3057634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252600d908201526c26b4b73a103737ba1037b832b760991b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b600082821015612c8557612c85612c5d565b500390565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b634e487b7160e01b600052603260045260246000fd5b6000600019821415612d3a57612d3a612c5d565b5060010190565b600060208284031215612d5357600080fd5b8151610bc4816127be565b60008219821115612d7157612d71612c5d565b500190565b600060208284031215612d8857600080fd5b81516001600160401b03811115612d9e57600080fd5b8201601f81018413612daf57600080fd5b8051612dbd612b8682612aed565b818152856020838501011115612dd257600080fd5b612de38260208301602086016127f0565b95945050505050565b60008151612dfe8185602086016127f0565b9290920192915050565b6f7b226e616d65223a20225a6f7262202360801b81528451600090612e34816010850160208a016127f0565b7f222c20226465736372697074696f6e223a20225a6f72627320776572652064696010918401918201527f73747269627574656420666f722066726565206279205a4f5241206f6e204e6560308201527f772059656172e280997320323032322e2045616368204e465420696d6275657360508201527f207468652070726f70657274696573206f66206974732077616c6c657420686f60708201527f6c6465722c20616e64207768656e2073656e7420746f20736f6d656f6e65206560908201527f6c73652c2077696c6c207472616e73666f726d2e5c6e5c6e566965772074686960b08201527673204e4654206174205b7a6f72622e6465762f6e66742f60481b60d08201528551612f4f8160e7840160208a016127f0565b612aac612fad612fa7612f8d612f8760e786880101765d2868747470733a2f2f7a6f72622e6465762f6e66742f60481b815260170190565b8a612dec565b6d149116101134b6b0b3b2911d101160911b8152600e0190565b87612dec565b61227d60f01b815260020190565b7f3c73766720786d6c6e733d22687474703a2f2f7777772e77332e6f72672f323081527f30302f737667222076696577426f783d223020302031313020313130223e3c6460208201527f6566733e3c72616469616c4772616469656e742069643d22677a72222067726160408201527f6469656e745472616e73666f726d3d227472616e736c6174652836362e34353760608201527f382032342e3335373529207363616c652837352e32393038292220677261646960808201527f656e74556e6974733d227573657253706163654f6e5573652220723d2231222060a08201527f63783d2230222063793d223025223e3c73746f70206f66667365743d2231352e60c0820152701b1912911039ba37b816b1b7b637b91e9160791b60e0820152600086516130f18160f1850160208b016127f0565b612aac6132086132026131cc6131c661318e61318861315061314a60f18a8d01017f22202f3e3c73746f70206f66667365743d2233392e353825222073746f702d6381526537b637b91e9160d11b602082015260260190565b8f612dec565b7f22202f3e3c73746f70206f66667365743d2237322e393225222073746f702d6381526537b637b91e9160d11b602082015260260190565b8c612dec565b7f22202f3e3c73746f70206f66667365743d2239302e363325222073746f702d6381526537b637b91e9160d11b602082015260260190565b89612dec565b7f22202f3e3c73746f70206f66667365743d2231303025222073746f702d636f6c81526337b91e9160e11b602082015260240190565b86612dec565b7f22202f3e3c2f72616469616c4772616469656e743e3c2f646566733e3c67207481527f72616e73666f726d3d227472616e736c61746528352c3529223e3c706174682060208201527f643d224d313030203530433130302032322e333835382037372e36313432203060408201527f20353020304332322e33383538203020302032322e333835382030203530433060608201527f2037372e363134322032322e3338353820313030203530203130304337372e3660808201527f31343220313030203130302037372e36313432203130302035305a222066696c60a08201527f6c3d2275726c2823677a722922202f3e3c70617468207374726f6b653d22726760c08201527f626128302c302c302c302e30373529222066696c6c3d227472616e737061726560e08201527f6e7422207374726f6b652d77696474683d22312220643d224d35302c302e35636101008201527f32372e332c302c34392e352c32322e322c34392e352c34392e355337372e332c6101208201527f39392e352c35302c39392e3553302e352c37372e332c302e352c35305332322e6101408201527f372c302e352c35302c302e357a22202f3e3c2f673e3c2f7376673e000000000061016082015261017b0190565b7f646174613a696d6167652f7376672b786d6c3b6261736536342c00000000000081526000825161341081601a8501602087016127f0565b91909101601a0192915050565b634e487b7160e01b600052601260045260246000fd5b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b600060ff8316806134985761349861341d565b8060ff84160691505092915050565b600080821280156001600160ff1b03849003851316156134c9576134c9612c5d565b600160ff1b83900384128116156134e2576134e2612c5d565b50500190565b60008083128015600160ff1b85018412161561350657613506612c5d565b6001600160ff1b038401831381161561352157613521612c5d565b50500390565b60006001600160ff1b038184138284138082168684048611161561354d5761354d612c5d565b600160ff1b600087128281168783058912161561356c5761356c612c5d565b6000871292508782058712848416161561358857613588612c5d565b8785058712818416161561359e5761359e612c5d565b505050929093029392505050565b60008160001904831182151516156135c6576135c6612c5d565b500290565b6000826135da576135da61341d565b500490565b630d0e6d8560e31b8152600084516135fe8160048501602089016127f0565b61016160f51b60049184019182015284516136208160068401602089016127f0565b6201296160ed1b6006929091019182015283516136448160098401602088016127f0565b61252960f01b60099290910191820152600b0195945050505050565b6001600160a01b03858116825284166020820152604081018390526080606082018190526000906118329083018461281c565b6000602082840312156136a557600080fd5b8151610bc48161278b565b6000826136bf576136bf61341d565b50069056fea2646970667358221220ccffb94409adb96a7b7fbc564c285818edbfe3a32305d9b022600f6d36c9fb6264736f6c634300080900330000000000000000000000007eb947242dbf042e6388c329a614165d73548670
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106101585760003560e01c8063715018a6116100c3578063aa1152ab1161007c578063aa1152ab146102d1578063b88d4fde146102d9578063c87b56dd146102ec578063de909942146102ff578063e985e9c514610312578063f2fde38b1461032557600080fd5b8063715018a614610277578063729ad39e1461027f5780638da5cb5b1461029257806391557ac4146102a357806395d89b41146102b6578063a22cb465146102be57600080fd5b806318160ddd1161011557806318160ddd1461020257806323b872dd1461021857806342842e0e1461022b5780636352211e1461023e5780636411fb451461025157806370a082311461026457600080fd5b806301ffc9a71461015d57806303ff85ff1461018557806306fdde03146101a5578063081812fc146101ba578063095ea7b3146101e55780631249c58b146101fa575b600080fd5b61017061016b3660046127a1565b610338565b60405190151581526020015b60405180910390f35b6101986101933660046127d3565b61038a565b60405161017c9190612848565b6101ad61039b565b60405161017c9190612895565b6101cd6101c83660046128a8565b61042d565b6040516001600160a01b03909116815260200161017c565b6101f86101f33660046128c1565b6104ba565b005b6101f86105cb565b61020a610611565b60405190815260200161017c565b6101f86102263660046128ed565b61062d565b6101f86102393660046128ed565b61065e565b6101cd61024c3660046128a8565b610679565b6101f861025f36600461293e565b6106f0565b61020a6102723660046127d3565b610791565b6101f8610818565b6101f861028d366004612a07565b61084c565b6006546001600160a01b03166101cd565b6101cd6102b13660046128a8565b6108c6565b6101ad61099d565b6101f86102cc366004612ab8565b6109ac565b6101706109b7565b6101f86102e7366004612b14565b6109e0565b6101ad6102fa3660046128a8565b610a12565b6101ad61030d3660046127d3565b610bcb565b610170610320366004612bc2565b610ce3565b6101f86103333660046127d3565b610d11565b60006001600160e01b031982166380ac58cd60e01b148061036957506001600160e01b03198216635b5e139f60e01b145b8061038457506301ffc9a760e01b6001600160e01b03198316145b92915050565b610392612764565b61038482610db5565b6060600080546103aa90612bfb565b80601f01602080910402602001604051908101604052809291908181526020018280546103d690612bfb565b80156104235780601f106103f857610100808354040283529160200191610423565b820191906000526020600020905b81548152906001019060200180831161040657829003601f168201915b5050505050905090565b600061043882611099565b61049e5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084015b60405180910390fd5b506000908152600460205260409020546001600160a01b031690565b60006104c582610679565b9050806001600160a01b0316836001600160a01b031614156105335760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b6064820152608401610495565b336001600160a01b038216148061054f575061054f8133610ce3565b6105bc5760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f776044820152771b995c881b9bdc88185c1c1c9bdd995908199bdc88185b1b60421b6064820152608401610495565b6105c683836110b6565b505050565b6105d36109b7565b6105ef5760405162461bcd60e51b815260040161049590612c36565b610601336105fc60095490565b611124565b61060f600980546001019055565b565b6000600161061e60095490565b6106289190612c73565b905090565b6106373382611263565b6106535760405162461bcd60e51b815260040161049590612c8a565b6105c683838361132d565b6105c6838383604051806020016040528060008152506109e0565b6000818152600260205260408120546001600160a01b0316806103845760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b6064820152608401610495565b6006546001600160a01b0316331461071a5760405162461bcd60e51b815260040161049590612cdb565b60005b8281101561078b57816007600086868581811061073c5761073c612d10565b905060200201602081019061075191906127d3565b6001600160a01b031681526020810191909152604001600020805460ff19169115159190911790558061078381612d26565b91505061071d565b50505050565b60006001600160a01b0382166107fc5760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b6064820152608401610495565b506001600160a01b031660009081526003602052604090205490565b6006546001600160a01b031633146108425760405162461bcd60e51b815260040161049590612cdb565b61060f60006114d8565b6108546109b7565b6108705760405162461bcd60e51b815260040161049590612c36565b60005b81518110156108c2576108a282828151811061089157610891612d10565b60200260200101516105fc60095490565b6108b0600980546001019055565b806108ba81612d26565b915050610873565b5050565b6040516331a9108f60e11b81526004810182905260009081903090636352211e9060240160206040518083038186803b15801561090257600080fd5b505afa158015610916573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061093a9190612d41565b6001600160a01b03811660009081526007602052604090205490915060ff16801561097b57506000838152600860205260409020546001600160a01b031615155b156103845750506000908152600860205260409020546001600160a01b031690565b6060600180546103aa90612bfb565b6108c233838361152a565b60006361cfdfd04211801561062857506109d862024ea06361cfdfd0612d5e565b421115905090565b6109ea3383611263565b610a065760405162461bcd60e51b815260040161049590612c8a565b61078b848484846115f5565b6060610a1d82611099565b610a545760405162461bcd60e51b81526020600482015260086024820152672737903a37b5b2b760c11b6044820152606401610495565b60405162b86e3360e51b8152600481018390526000907f0000000000000000000000007eb947242dbf042e6388c329a614165d735486706001600160a01b03169063170dc6609060240160006040518083038186803b158015610ab657600080fd5b505afa158015610aca573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610af29190810190612d76565b90507f0000000000000000000000007eb947242dbf042e6388c329a614165d735486706001600160a01b031663d01fde8c828384610b3261030d896108c6565b604051602001610b459493929190612e08565b6040516020818303038152906040526040518263ffffffff1660e01b8152600401610b709190612895565b60006040518083038186803b158015610b8857600080fd5b505afa158015610b9c573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610bc49190810190612d76565b9392505050565b60606000610bd88361038a565b80516020808301516040808501516060860151608087015192519697506000967f0000000000000000000000007eb947242dbf042e6388c329a614165d735486706001600160a01b03169663d5fb1b1996610c399691959194939201612fbb565b6040516020818303038152906040526040518263ffffffff1660e01b8152600401610c649190612895565b60006040518083038186803b158015610c7c57600080fd5b505afa158015610c90573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610cb89190810190612d76565b905080604051602001610ccb91906133d8565b60405160208183030381529060405292505050919050565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b6006546001600160a01b03163314610d3b5760405162461bcd60e51b815260040161049590612cdb565b6001600160a01b038116610da05760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610495565b610da9816114d8565b50565b80546001019055565b610dbd612764565b6001600160a01b038216600060118260131a60180281610ddf57610ddf61341d565b0490506000602283601d1a60050281610dfa57610dfa61341d565b046020019050606160338460171a60050281610e1857610e1861341d565b0401604801600281049050600060108560181a81610e3857610e3861341d565b04605101905060006080866015600b91901a0260ff1681610e5b57610e5b61341d565b046046019050600a8203811115610e73575060091981015b6040805160a0810190915280610eed610ea889601c1a60028b60191a81610e9c57610e9c61341d565b0660ff168a6000611628565b610ec860028b601c1a81610ebe57610ebe61341d565b068787606461177c565b610ee860028c601a1a81610ede57610ede61341d565b068a8a60646117c4565b61183c565b8152602001610f5b610f1b89601c1a60028b60191a81610f0f57610f0f61341d565b0660ff168a600a611628565b610f3b60028b601c1a81610f3157610f3161341d565b068787605a61177c565b610ee860028c601a1a81610f5157610f5161341d565b068a8a605a6117c4565b8152602001610fc9610f8989601c1a60028b60191a81610f7d57610f7d61341d565b0660ff168a6046611628565b610fa960028b601c1a81610f9f57610f9f61341d565b068787604661177c565b610ee860028c601a1a81610fbf57610fbf61341d565b068a8a60466117c4565b8152602001611037610ff789601c1a60028b60191a81610feb57610feb61341d565b0660ff168a605a611628565b61101760028b601c1a8161100d5761100d61341d565b068787601461177c565b610ee860028c601a1a8161102d5761102d61341d565b068a8a60146117c4565b815260200161108b61106589601c1a60028b60191a816110595761105961341d565b0660ff168a6064611628565b61108560028b601c1a8161107b5761107b61341d565b068787600061177c565b8861183c565b905298975050505050505050565b6000908152600260205260409020546001600160a01b0316151590565b600081815260046020526040902080546001600160a01b0319166001600160a01b03841690811790915581906110eb82610679565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6001600160a01b03821661117a5760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610495565b61118381611099565b156111d05760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610495565b6111dc60008383611883565b6001600160a01b0382166000908152600360205260408120805460019290611205908490612d5e565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b600061126e82611099565b6112cf5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610495565b60006112da83610679565b9050806001600160a01b0316846001600160a01b031614806113155750836001600160a01b031661130a8461042d565b6001600160a01b0316145b8061132557506113258185610ce3565b949350505050565b826001600160a01b031661134082610679565b6001600160a01b0316146113a85760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201526839903737ba1037bbb760b91b6064820152608401610495565b6001600160a01b03821661140a5760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610495565b611415838383611883565b6114206000826110b6565b6001600160a01b0383166000908152600360205260408120805460019290611449908490612c73565b90915550506001600160a01b0382166000908152600360205260408120805460019290611477908490612d5e565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b600680546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b816001600160a01b0316836001600160a01b031614156115885760405162461bcd60e51b815260206004820152601960248201527822a9219b99189d1030b8383937bb32903a379031b0b63632b960391b6044820152606401610495565b6001600160a01b03838116600081815260056020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b61160084848461132d565b61160c848484846118d2565b61078b5760405162461bcd60e51b815260040161049590613433565b600080611636600487613485565b60ff16905083816116a35761169a861561165a5761165582600a6134a7565b611665565b611665600a836134e8565b6116729060ff8716613527565b8261168160ff881660646134e8565b61168b9190613527565b61169591906134a7565b6119dc565b92505050611325565b81600114156116cb5761169a86156116c05761165582601e6134a7565b611665601e836134e8565b81600214156117265761169a86156116ed576116e88260326134a7565b6116f8565b6116f86032836134e8565b6117048660ff16611a0f565b61170e9190613527565b8261171b8760ff16611a0f565b6116819060646134e8565b61177160808860ff161161173b57600061173e565b60015b60ff16871561174e57603c611752565b603b195b61175c9190613527565b61176690836134a7565b6116f890601e6134a7565b979650505050505050565b60008060ff86166117ac5761179083611f05565b60ff169050606481810386028583020104600101915050611325565b50816064818103860285830201049695505050505050565b60008060ff86166117e2576117d883611f05565b60ff1690506117f1565b6117eb83612261565b60ff1690505b60646117fd85836135ac565b86611809846064612c73565b61181391906135ac565b61181d9190612d5e565b61182791906135cb565b611832906001612d5e565b9695505050505050565b606061184784612667565b61185084612667565b61185984612667565b60405160200161186b939291906135df565b60405160208183030381529060405290509392505050565b6001600160a01b03821660009081526007602052604090205460ff16156105c657600081815260086020526040902080546001600160a01b0385166001600160a01b0319909116179055505050565b60006001600160a01b0384163b156119d457604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290611916903390899088908890600401613660565b602060405180830381600087803b15801561193057600080fd5b505af1925050508015611960575060408051601f3d908101601f1916820190925261195d91810190613693565b60015b6119ba573d80801561198e576040519150601f19603f3d011682016040523d82523d6000602084013e611993565b606091505b5080516119b25760405162461bcd60e51b815260040161049590613433565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050611325565b506001611325565b6064900560008082126119f557610168825b0692915050565b6101688260001902816119ee576119ee61341d565b919050565b6000600d8261ffff161015611a2657506000919050565b60118261ffff161015611a3b57506001919050565b60138261ffff161015611a5057506002919050565b60158261ffff161015611a6557506003919050565b60178261ffff161015611a7a57506004919050565b60188261ffff161015611a8f57506005919050565b60198261ffff161015611aa457506006919050565b601b8261ffff161015611ab957506007919050565b601c8261ffff161015611ace57506008919050565b601d8261ffff161015611ae357506009919050565b601e8261ffff161015611af85750600a919050565b601f8261ffff161015611b0d5750600b919050565b60208261ffff161015611b225750600d919050565b60218261ffff161015611b375750600e919050565b60228261ffff161015611b4c5750600f919050565b60238261ffff161015611b6157506011919050565b60248261ffff161015611b7657506012919050565b60258261ffff161015611b8b57506014919050565b60268261ffff161015611ba057506015919050565b60278261ffff161015611bb557506017919050565b60288261ffff161015611bca57506019919050565b60298261ffff161015611bdf5750601b919050565b602a8261ffff161015611bf45750601d919050565b602b8261ffff161015611c095750601f919050565b602c8261ffff161015611c1e57506022919050565b602d8261ffff161015611c3357506024919050565b602e8261ffff161015611c4857506026919050565b602f8261ffff161015611c5d57506029919050565b60308261ffff161015611c725750602c919050565b60318261ffff161015611c875750602f919050565b60328261ffff161015611c9c57506032919050565b60338261ffff161015611cb157506034919050565b60348261ffff161015611cc657506037919050565b60358261ffff161015611cdb5750603a919050565b60368261ffff161015611cf05750603d919050565b60378261ffff161015611d055750603f919050565b60388261ffff161015611d1a57506041919050565b60398261ffff161015611d2f57506044919050565b603a8261ffff161015611d4457506046919050565b603b8261ffff161015611d5957506048919050565b603c8261ffff161015611d6e5750604a919050565b603d8261ffff161015611d835750604c919050565b603e8261ffff161015611d985750604e919050565b603f8261ffff161015611dad5750604f919050565b60408261ffff161015611dc257506051919050565b60418261ffff161015611dd757506052919050565b60428261ffff161015611dec57506054919050565b60438261ffff161015611e0157506055919050565b60448261ffff161015611e1657506056919050565b60458261ffff161015611e2b57506058919050565b60468261ffff161015611e4057506059919050565b60478261ffff161015611e555750605a919050565b60488261ffff161015611e6a5750605b919050565b604a8261ffff161015611e7f5750605c919050565b604b8261ffff161015611e945750605d919050565b604c8261ffff161015611ea95750605e919050565b604e8261ffff161015611ebe5750605f919050565b60508261ffff161015611ed357506060919050565b60528261ffff161015611ee857506061919050565b60568261ffff161015611efd57506062919050565b506063919050565b60006027821015611f1857506000919050565b602d821015611f2957506001919050565b6031821015611f3a57506002919050565b6034821015611f4b57506003919050565b6035821015611f5c57506004919050565b6036821015611f6d57506004919050565b6037821015611f7e57506005919050565b6038821015611f8f57506005919050565b6039821015611fa057506006919050565b603a821015611fb157506006919050565b603b821015611fc257506007919050565b603c821015611fd357506007919050565b603d821015611fe457506008919050565b603e821015611ff557506009919050565b603f82101561200657506009919050565b60408210156120175750600a919050565b60418210156120285750600b919050565b60428210156120395750600c919050565b604382101561204a5750600d919050565b604482101561205b5750600e919050565b604582101561206c5750600f919050565b604682101561207d57506010919050565b604782101561208e57506012919050565b604882101561209f57506013919050565b60498210156120b057506014919050565b604a8210156120c157506016919050565b604b8210156120d257506017919050565b604c8210156120e357506019919050565b604d8210156120f45750601b919050565b604e8210156121055750601c919050565b604f8210156121165750601e919050565b605082101561212757506020919050565b605182101561213857506022919050565b605282101561214957506025919050565b605382101561215a57506027919050565b605482101561216b57506029919050565b605582101561217c5750602c919050565b605682101561218d5750602f919050565b605782101561219e57506031919050565b60588210156121af57506034919050565b60598210156121c057506037919050565b605a8210156121d15750603b919050565b605b8210156121e25750603e919050565b605c8210156121f357506041919050565b605d82101561220457506045919050565b605e82101561221557506049919050565b605f8210156122265750604d919050565b606082101561223757506051919050565b606182101561224857506055919050565b60628210156122595750605a919050565b50605f919050565b6000601682101561227457506000919050565b601c82101561228557506001919050565b602082101561229657506002919050565b60208210156122a757506003919050565b60228210156122b857506003919050565b60248210156122c957506004919050565b60278210156122da57506005919050565b60298210156122eb57506006919050565b602b8210156122fc57506007919050565b602e82101561230d57506009919050565b602f82101561231e5750600a919050565b603182101561232f5750600b919050565b60328210156123405750600c919050565b60338210156123515750600d919050565b60358210156123625750600e919050565b60368210156123735750600f919050565b603782101561238457506010919050565b603882101561239557506011919050565b60398210156123a657506012919050565b603a8210156123b757506013919050565b603b8210156123c857506014919050565b603c8210156123d957506015919050565b603d8210156123ea57506016919050565b603e8210156123fb57506017919050565b603f82101561240c57506019919050565b604082101561241d5750601a919050565b604182101561242e5750601b919050565b604282101561243f5750601c919050565b60438210156124505750601e919050565b60448210156124615750601f919050565b604582101561247257506020919050565b604682101561248357506022919050565b604782101561249457506023919050565b60488210156124a557506025919050565b60498210156124b657506026919050565b604a8210156124c757506028919050565b604b8210156124d85750602a919050565b604c8210156124e95750602b919050565b604d8210156124fa5750602d919050565b604e82101561250b5750602f919050565b604f82101561251c57506031919050565b605082101561252d57506033919050565b605182101561253e57506035919050565b605282101561254f57506037919050565b605382101561256057506039919050565b60548210156125715750603b919050565b60558210156125825750603d919050565b60568210156125935750603f919050565b60578210156125a457506041919050565b60588210156125b557506044919050565b60598210156125c657506046919050565b605a8210156125d757506048919050565b605b8210156125e85750604b919050565b605c8210156125f95750604d919050565b605d82101561260a57506050919050565b605e82101561261b57506053919050565b605f82101561262c57506055919050565b606082101561263d57506058919050565b606182101561264e5750605b919050565b606282101561265f5750605e919050565b506061919050565b60608161268b5750506040805180820190915260018152600360fc1b602082015290565b8160005b81156126b5578061269f81612d26565b91506126ae9050600a836135cb565b915061268f565b6000816001600160401b038111156126cf576126cf6129c1565b6040519080825280601f01601f1916602001820160405280156126f9576020820181803683370190505b5090505b84156113255761270e600183612c73565b915061271b600a866136b0565b612726906030612d5e565b60f81b81838151811061273b5761273b612d10565b60200101906001600160f81b031916908160001a90535061275d600a866135cb565b94506126fd565b6040518060a001604052806005905b60608152602001906001900390816127735790505090565b6001600160e01b031981168114610da957600080fd5b6000602082840312156127b357600080fd5b8135610bc48161278b565b6001600160a01b0381168114610da957600080fd5b6000602082840312156127e557600080fd5b8135610bc4816127be565b60005b8381101561280b5781810151838201526020016127f3565b8381111561078b5750506000910152565b600081518084526128348160208601602086016127f0565b601f01601f19169290920160200192915050565b602080825260009060c0830183820185845b600581101561288957601f1987850301835261287784835161281c565b9350918401919084019060010161285a565b50919695505050505050565b602081526000610bc4602083018461281c565b6000602082840312156128ba57600080fd5b5035919050565b600080604083850312156128d457600080fd5b82356128df816127be565b946020939093013593505050565b60008060006060848603121561290257600080fd5b833561290d816127be565b9250602084013561291d816127be565b929592945050506040919091013590565b80358015158114611a0a57600080fd5b60008060006040848603121561295357600080fd5b83356001600160401b038082111561296a57600080fd5b818601915086601f83011261297e57600080fd5b81358181111561298d57600080fd5b8760208260051b85010111156129a257600080fd5b6020928301955093506129b8918601905061292e565b90509250925092565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b03811182821017156129ff576129ff6129c1565b604052919050565b60006020808385031215612a1a57600080fd5b82356001600160401b0380821115612a3157600080fd5b818501915085601f830112612a4557600080fd5b813581811115612a5757612a576129c1565b8060051b9150612a688483016129d7565b8181529183018401918481019088841115612a8257600080fd5b938501935b83851015612aac5784359250612a9c836127be565b8282529385019390850190612a87565b98975050505050505050565b60008060408385031215612acb57600080fd5b8235612ad6816127be565b9150612ae46020840161292e565b90509250929050565b60006001600160401b03821115612b0657612b066129c1565b50601f01601f191660200190565b60008060008060808587031215612b2a57600080fd5b8435612b35816127be565b93506020850135612b45816127be565b92506040850135915060608501356001600160401b03811115612b6757600080fd5b8501601f81018713612b7857600080fd5b8035612b8b612b8682612aed565b6129d7565b818152886020838501011115612ba057600080fd5b8160208401602083013760006020838301015280935050505092959194509250565b60008060408385031215612bd557600080fd5b8235612be0816127be565b91506020830135612bf0816127be565b809150509250929050565b600181811c90821680612c0f57607f821691505b60208210811415612c3057634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252600d908201526c26b4b73a103737ba1037b832b760991b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b600082821015612c8557612c85612c5d565b500390565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b634e487b7160e01b600052603260045260246000fd5b6000600019821415612d3a57612d3a612c5d565b5060010190565b600060208284031215612d5357600080fd5b8151610bc4816127be565b60008219821115612d7157612d71612c5d565b500190565b600060208284031215612d8857600080fd5b81516001600160401b03811115612d9e57600080fd5b8201601f81018413612daf57600080fd5b8051612dbd612b8682612aed565b818152856020838501011115612dd257600080fd5b612de38260208301602086016127f0565b95945050505050565b60008151612dfe8185602086016127f0565b9290920192915050565b6f7b226e616d65223a20225a6f7262202360801b81528451600090612e34816010850160208a016127f0565b7f222c20226465736372697074696f6e223a20225a6f72627320776572652064696010918401918201527f73747269627574656420666f722066726565206279205a4f5241206f6e204e6560308201527f772059656172e280997320323032322e2045616368204e465420696d6275657360508201527f207468652070726f70657274696573206f66206974732077616c6c657420686f60708201527f6c6465722c20616e64207768656e2073656e7420746f20736f6d656f6e65206560908201527f6c73652c2077696c6c207472616e73666f726d2e5c6e5c6e566965772074686960b08201527673204e4654206174205b7a6f72622e6465762f6e66742f60481b60d08201528551612f4f8160e7840160208a016127f0565b612aac612fad612fa7612f8d612f8760e786880101765d2868747470733a2f2f7a6f72622e6465762f6e66742f60481b815260170190565b8a612dec565b6d149116101134b6b0b3b2911d101160911b8152600e0190565b87612dec565b61227d60f01b815260020190565b7f3c73766720786d6c6e733d22687474703a2f2f7777772e77332e6f72672f323081527f30302f737667222076696577426f783d223020302031313020313130223e3c6460208201527f6566733e3c72616469616c4772616469656e742069643d22677a72222067726160408201527f6469656e745472616e73666f726d3d227472616e736c6174652836362e34353760608201527f382032342e3335373529207363616c652837352e32393038292220677261646960808201527f656e74556e6974733d227573657253706163654f6e5573652220723d2231222060a08201527f63783d2230222063793d223025223e3c73746f70206f66667365743d2231352e60c0820152701b1912911039ba37b816b1b7b637b91e9160791b60e0820152600086516130f18160f1850160208b016127f0565b612aac6132086132026131cc6131c661318e61318861315061314a60f18a8d01017f22202f3e3c73746f70206f66667365743d2233392e353825222073746f702d6381526537b637b91e9160d11b602082015260260190565b8f612dec565b7f22202f3e3c73746f70206f66667365743d2237322e393225222073746f702d6381526537b637b91e9160d11b602082015260260190565b8c612dec565b7f22202f3e3c73746f70206f66667365743d2239302e363325222073746f702d6381526537b637b91e9160d11b602082015260260190565b89612dec565b7f22202f3e3c73746f70206f66667365743d2231303025222073746f702d636f6c81526337b91e9160e11b602082015260240190565b86612dec565b7f22202f3e3c2f72616469616c4772616469656e743e3c2f646566733e3c67207481527f72616e73666f726d3d227472616e736c61746528352c3529223e3c706174682060208201527f643d224d313030203530433130302032322e333835382037372e36313432203060408201527f20353020304332322e33383538203020302032322e333835382030203530433060608201527f2037372e363134322032322e3338353820313030203530203130304337372e3660808201527f31343220313030203130302037372e36313432203130302035305a222066696c60a08201527f6c3d2275726c2823677a722922202f3e3c70617468207374726f6b653d22726760c08201527f626128302c302c302c302e30373529222066696c6c3d227472616e737061726560e08201527f6e7422207374726f6b652d77696474683d22312220643d224d35302c302e35636101008201527f32372e332c302c34392e352c32322e322c34392e352c34392e355337372e332c6101208201527f39392e352c35302c39392e3553302e352c37372e332c302e352c35305332322e6101408201527f372c302e352c35302c302e357a22202f3e3c2f673e3c2f7376673e000000000061016082015261017b0190565b7f646174613a696d6167652f7376672b786d6c3b6261736536342c00000000000081526000825161341081601a8501602087016127f0565b91909101601a0192915050565b634e487b7160e01b600052601260045260246000fd5b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b600060ff8316806134985761349861341d565b8060ff84160691505092915050565b600080821280156001600160ff1b03849003851316156134c9576134c9612c5d565b600160ff1b83900384128116156134e2576134e2612c5d565b50500190565b60008083128015600160ff1b85018412161561350657613506612c5d565b6001600160ff1b038401831381161561352157613521612c5d565b50500390565b60006001600160ff1b038184138284138082168684048611161561354d5761354d612c5d565b600160ff1b600087128281168783058912161561356c5761356c612c5d565b6000871292508782058712848416161561358857613588612c5d565b8785058712818416161561359e5761359e612c5d565b505050929093029392505050565b60008160001904831182151516156135c6576135c6612c5d565b500290565b6000826135da576135da61341d565b500490565b630d0e6d8560e31b8152600084516135fe8160048501602089016127f0565b61016160f51b60049184019182015284516136208160068401602089016127f0565b6201296160ed1b6006929091019182015283516136448160098401602088016127f0565b61252960f01b60099290910191820152600b0195945050505050565b6001600160a01b03858116825284166020820152604081018390526080606082018190526000906118329083018461281c565b6000602082840312156136a557600080fd5b8151610bc48161278b565b6000826136bf576136bf61341d565b50069056fea2646970667358221220ccffb94409adb96a7b7fbc564c285818edbfe3a32305d9b022600f6d36c9fb6264736f6c63430008090033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000007eb947242dbf042e6388c329a614165d73548670
-----Decoded View---------------
Arg [0] : _sharedMetadata (address): 0x7eB947242dbF042e6388C329A614165d73548670
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 0000000000000000000000007eb947242dbf042e6388c329a614165d73548670
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.