ERC-721
Overview
Max Total Supply
184 CAPS
Holders
104
Market
Volume (24H)
N/A
Min Price (24H)
N/A
Max Price (24H)
N/A
Other Info
Token Contract
Balance
2 CAPSLoading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
CapsuleToken
Compiler Version
v0.8.12+commit.f00d7308
Optimization Enabled:
Yes with 1000 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: GPL-3.0 /** @title CapsuleToken @author peri @notice Each Capsule token has a unique color and text rendered in the Capsules Typeface as a SVG. Text and font for a Capsule can be updated anytime by its owner. @dev `bytes3` type is used to store the RGB hex-encoded color that is unique to each Capsule. `bytes32[8]` type is used to store 8 lines of 16 text characters, where each line contains 16 2-byte unicodes packed into a bytes32 value. 2 bytes is large enough to encode the unicode for every character in the Basic Multilingual Plane (BMP). To avoid high gas costs, text isn't validated when minting or editing, meaning Capsule text could contain characters that are unsupported by the Capsules Typeface. Instead, we rely on the Renderer contract to render a safe image even if the Capsule text is invalid. Capsules will use the default Renderer contract to render images unless the owner has set a valid renderer for that Capsule. Token metadata for all Capsules is rendered by the upgradeable Metadata contract. */ pragma solidity ^0.8.8; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/interfaces/IERC2981.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/security/Pausable.sol"; import "./ERC721A.sol"; import "./interfaces/ICapsuleMetadata.sol"; import "./interfaces/ICapsuleRenderer.sol"; import "./interfaces/ICapsuleToken.sol"; import "./interfaces/ITypeface.sol"; /* */ /* 000 000 0000 0000 0 0 0 00000 0000 */ /* 0 0 0 0 0 0 0 0 0 0 0 0 */ /* 0 00000 0000 000 0 0 0 0000 000 */ /* 0 0 0 0 0 0 0 0 0 0 0 */ /* 000 0 0 0 0000 000 00000 00000 0000 */ /* */ error ColorAlreadyMinted(uint256 capsuleId); error InvalidColor(); error InvalidFontForRenderer(address renderer); error InvalidRenderer(); error NoGiftAvailable(); error NotCapsuleOwner(address owner); error NotCapsulesTypeface(); error PureColorNotAllowed(); error ValueBelowMintPrice(); contract CapsuleToken is ICapsuleToken, ERC721A, IERC2981, Ownable, Pausable, ReentrancyGuard { /* -------------------------------------------------------------------------- */ /* 0 0 000 0000 00000 00000 00000 00000 0000 0000 */ /* 00 00 0 0 0 0 0 0 0 0 0 0 0 */ /* 0 0 0 0 0 0 0 0 00000 0 00000 0000 000 */ /* 0 0 0 0 0 0 0 0 0 0 0 0 0 */ /* 0 0 000 0000 00000 0 00000 00000 0 0 0000 */ /* -------------------------------------------------------------------------- */ /* -------------------------------- MODIFIERS ------------------------------- */ /* -------------------------------------------------------------------------- */ /// @notice Require that the value sent is at least MINT_PRICE. modifier requireMintPrice() { if (msg.value < MINT_PRICE) revert ValueBelowMintPrice(); _; } /// @notice Require that the gift count of sender is greater than 0. modifier requireGift() { if (giftCountOf(msg.sender) == 0) revert NoGiftAvailable(); _; } /// @notice Require that the font is valid for a given renderer. modifier onlyValidFontForRenderer(Font memory font, address renderer) { if (!isValidFontForRenderer(font, renderer)) revert InvalidFontForRenderer(renderer); _; } /// @notice Require that the font is valid for a given renderer. modifier onlyValidRenderer(address renderer) { if (!isValidRenderer(renderer)) revert InvalidRenderer(); _; } /// @notice Require that the color is valid and unminted. modifier onlyMintableColor(bytes3 color) { uint256 capsuleId = tokenIdOfColor[color]; if (_exists(capsuleId)) revert ColorAlreadyMinted(capsuleId); if (!isValidColor(color)) revert InvalidColor(); _; } /// @notice Require that the color is not pure. modifier onlyImpureColor(bytes3 color) { if (isPureColor(color)) revert PureColorNotAllowed(); _; } /// @notice Require that the sender is the CapsulesTypeface contract. modifier onlyCapsulesTypeface() { if (msg.sender != capsulesTypeface) revert NotCapsulesTypeface(); _; } /// @notice Require that the sender owns the Capsule. modifier onlyCapsuleOwner(uint256 capsuleId) { address owner = ownerOf(capsuleId); if (owner != msg.sender) revert NotCapsuleOwner(owner); _; } /* -------------------------------------------------------------------------- */ /* 000 000 0 0 0000 00000 0000 0 0 000 00000 000 0000 */ /* 0 0 0 0 00 0 0 0 0 0 0 0 0 0 0 0 0 0 0 */ /* 0 0 0 0 0 0 000 0 0000 0 0 0 0 0 0 0000 */ /* 0 0 0 0 0 00 0 0 0 0 0 0 0 0 0 0 0 0 0 */ /* 000 000 0 0 0000 0 0 0 000 000 0 000 0 0 */ /* -------------------------------------------------------------------------- */ /* ------------------------------- CONSTRUCTOR ------------------------------ */ /* -------------------------------------------------------------------------- */ constructor( address _capsulesTypeface, address _defaultRenderer, address _capsuleMetadata, address _feeReceiver, bytes3[] memory _pureColors, uint256 _royalty ) ERC721A("Capsules", "CAPS") { capsulesTypeface = _capsulesTypeface; _setDefaultRenderer(_defaultRenderer); _setMetadata(_capsuleMetadata); _setFeeReceiver(_feeReceiver); pureColors = _pureColors; emit SetPureColors(_pureColors); _setRoyalty(_royalty); _pause(); } /* -------------------------------------------------------------------------- */ /* 0 0 000 0000 00000 000 0000 0 00000 0000 */ /* 0 0 0 0 0 0 0 0 0 0 0 0 0 0 */ /* 0 0 00000 0000 0 00000 0000 0 0000 000 */ /* 0 0 0 0 0 0 0 0 0 0 0 0 0 0 */ /* 0 0 0 0 0 00000 0 0 0000 00000 00000 0000 */ /* -------------------------------------------------------------------------- */ /* -------------------------------- VARIABLES ------------------------------- */ /* -------------------------------------------------------------------------- */ /// Price to mint a Capsule uint256 public constant MINT_PRICE = 1e16; // 0.01 ETH /// CapsulesTypeface address address public immutable capsulesTypeface; /// Default CapsuleRenderer address address public defaultRenderer; /// CapsuleMetadata address address public capsuleMetadata; /// Capsule ID of a minted color mapping(bytes3 => uint256) public tokenIdOfColor; /// Array of pure colors bytes3[] public pureColors; /// Address to receive mint and royalty fees address public feeReceiver; /// Royalty amount out of 1000 uint256 public royalty; /// Validity of a renderer address mapping(address => bool) internal _validRenderers; /// Text of a Capsule ID mapping(uint256 => bytes32[8]) internal _textOf; /// Color of a Capsule ID mapping(uint256 => bytes3) internal _colorOf; /// Font of a Capsule ID mapping(uint256 => Font) internal _fontOf; /// Renderer address of a Capsule ID mapping(uint256 => address) internal _rendererOf; /// Numer of gift mints for addresses mapping(address => uint256) internal _giftCount; /// Contract URI string internal _contractURI; /* -------------------------------------------------------------------------- */ /* 00000 0 0 00000 00000 0000 0 0 000 0 */ /* 0 0 0 0 0 0 0 00 0 0 0 0 */ /* 0000 0 0 0000 0000 0 0 0 00000 0 */ /* 0 0 0 0 0 0 0 0 00 0 0 0 */ /* 00000 0 0 0 00000 0 0 0 0 0 0 00000 */ /* -------------------------------------------------------------------------- */ /* --------------------------- EXTERNAL FUNCTIONS --------------------------- */ /* -------------------------------------------------------------------------- */ /// @notice Mints a Capsule to sender, saving gas by not setting text. /// @param color Color of Capsule. /// @param font Font of Capsule. /// @return capsuleId ID of minted Capsule. function mint( bytes3 color, Font calldata font, bytes32[8] calldata text ) external payable whenNotPaused requireMintPrice onlyImpureColor(color) nonReentrant returns (uint256) { return _mintCapsule(msg.sender, color, font, text); } /// @notice Mints a Capsule to sender, saving gas by not setting text. /// @param color Color of Capsule. /// @param font Font of Capsule. /// @return capsuleId ID of minted Capsule. function mintGift( bytes3 color, Font calldata font, bytes32[8] calldata text ) external whenNotPaused requireGift onlyImpureColor(color) nonReentrant returns (uint256 capsuleId) { _giftCount[msg.sender]--; capsuleId = _mintCapsule(msg.sender, color, font, text); emit MintGift(msg.sender); } /// @notice Allows the CapsulesTypeface to mint a pure color Capsule. /// @dev _mintCapsule checks that font is valid for default renderer. Font will be valid as its source was stored earlier in this transaction. /// @param to Address to receive Capsule. /// @param font Font of Capsule. /// @return capsuleId ID of minted Capsule. function mintPureColorForFont(address to, Font calldata font) external whenNotPaused onlyCapsulesTypeface nonReentrant returns (uint256) { bytes32[8] memory text; return _mintCapsule(to, pureColorForFontWeight(font.weight), font, text); } /// @notice Return token URI for Capsule, using the CapsuleMetadata contract. /// @param capsuleId ID of Capsule token. /// @return metadata Metadata string for Capsule. function tokenURI(uint256 capsuleId) public view override returns (string memory) { require(_exists(capsuleId), "ERC721A: URI query for nonexistent token"); return ICapsuleMetadata(capsuleMetadata).metadataOf( capsuleOf(capsuleId), svgOf(capsuleId) ); } /// @notice Return contractURI. /// @return contractURI contractURI function contractURI() public view returns (string memory) { return _contractURI; } /// @notice Return SVG image from the Capsule's renderer. /// @param capsuleId ID of Capsule token. /// @return svg Encoded SVG image of Capsule. function svgOf(uint256 capsuleId) public view returns (string memory) { return ICapsuleRenderer(rendererOf(capsuleId)).svgOf(capsuleOf(capsuleId)); } /// @notice Returns all data for Capsule. /// @param capsuleId ID of Capsule. /// @return capsule Data for Capsule. function capsuleOf(uint256 capsuleId) public view returns (Capsule memory) { bytes3 color = _colorOf[capsuleId]; return Capsule({ id: capsuleId, font: _fontOf[capsuleId], text: _textOf[capsuleId], color: color, isPure: isPureColor(color) }); } /// @notice Check if color is pure. /// @param color Color to check. /// @return true True if color is pure. function isPureColor(bytes3 color) public view returns (bool) { bytes3[] memory _pureColors = pureColors; unchecked { for (uint256 i; i < _pureColors.length; i++) { if (color == _pureColors[i]) return true; } } return false; } /// @notice Returns the gift count of an address. /// @param a Address to check gift count of. /// @return count Gift count for address. function giftCountOf(address a) public view returns (uint256) { return _giftCount[a]; } /// @notice Returns the color of a Capsule. /// @param capsuleId ID of Capsule. /// @return color Color of Capsule. function colorOf(uint256 capsuleId) public view returns (bytes3) { return _colorOf[capsuleId]; } /// @notice Returns the text of a Capsule. /// @param capsuleId ID of Capsule. /// @return text Text of Capsule. function textOf(uint256 capsuleId) public view returns (bytes32[8] memory) { return _textOf[capsuleId]; } /// @notice Returns the font of a Capsule. /// @param capsuleId ID of Capsule. /// @return font Font of Capsule. function fontOf(uint256 capsuleId) public view returns (Font memory) { return _fontOf[capsuleId]; } /// @notice Returns renderer of a Capsule. If the Capsule has no renderer set, the default renderer is used. /// @param capsuleId ID of Capsule. /// @return renderer Address of renderer. function rendererOf(uint256 capsuleId) public view returns (address) { if (_rendererOf[capsuleId] != address(0)) return _rendererOf[capsuleId]; return defaultRenderer; } /// @notice Check if font is valid for a Renderer contract. /// @param renderer Renderer contract address. /// @param font Font to check validity of. /// @return true True if font is valid. function isValidFontForRenderer(Font memory font, address renderer) public view returns (bool) { return ICapsuleRenderer(renderer).isValidFont(font); } /// @notice Check if address is a valid CapsuleRenderer contract. /// @param renderer Renderer address to check. /// @return true True if renderer is valid. function isValidRenderer(address renderer) public view returns (bool) { return _validRenderers[renderer]; } /// @notice Check if color is valid. /// @dev A color is valid if all 3 bytes are divisible by 5 AND at least one byte == 255. /// @param color Color to check validity of. /// @return true True if color is valid. function isValidColor(bytes3 color) public pure returns (bool) { // At least one byte must equal 0xff (255) if (color[0] < 0xff && color[1] < 0xff && color[2] < 0xff) { return false; } // All bytes must be divisible by 5 unchecked { for (uint256 i; i < 3; i++) { if (uint8(color[i]) % 5 != 0) return false; } } return true; } /// @notice Check if Capsule text is valid. /// @dev Checks validity using Capsule's renderer contract. /// @param capsuleId ID of Capsule. /// @return true True if Capsule text is valid. function isValidCapsuleText(uint256 capsuleId) external view returns (bool) { return ICapsuleRenderer(rendererOf(capsuleId)).isValidText( textOf(capsuleId) ); } /// @notice Withdraws balance of this contract to the feeReceiver address. function withdraw() external nonReentrant { uint256 balance = address(this).balance; payable(feeReceiver).transfer(balance); emit Withdraw(feeReceiver, balance); } /// @notice EIP2981 royalty standard function royaltyInfo(uint256, uint256 salePrice) external view returns (address receiver, uint256 royaltyAmount) { return (feeReceiver, (salePrice * royalty) / 1000); } /// @notice EIP2981 standard Interface return. Adds to ERC721A Interface returns. /// @dev See {IERC165-supportsInterface}. function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC721A) returns (bool) { return interfaceId == type(IERC2981).interfaceId || super.supportsInterface(interfaceId); } /// @dev Allows contract to receive ETH receive() external payable {} /* -------------------------------------------------------------------------- */ /* 000 0 0 0 0 00000 0000 */ /* 0 0 0 0 00 0 0 0 0 */ /* 0 0 0 0 0 0 0 0000 0000 */ /* 0 0 0 0 0 0 00 0 0 0 */ /* 000 0 0 0 0 00000 0 0 */ /* -------------------------------------------------------------------------- */ /* ------------------------ CAPSULE OWNER FUNCTIONS ------------------------- */ /* -------------------------------------------------------------------------- */ /// @notice Allows Capsule owner to set the Capsule text and font. /// @param capsuleId ID of Capsule. /// @param text New text for Capsule. /// @param font New font for Capsule. function setTextAndFont( uint256 capsuleId, bytes32[8] calldata text, Font calldata font ) external { _setText(capsuleId, text); _setFont(capsuleId, font); } /// @notice Allows Capsule owner to set the Capsule text. /// @param capsuleId ID of Capsule. /// @param text New text for Capsule. function setText(uint256 capsuleId, bytes32[8] calldata text) external { _setText(capsuleId, text); } /// @notice Allows Capsule owner to set the Capsule font. /// @param capsuleId ID of Capsule. /// @param font New font for Capsule. function setFont(uint256 capsuleId, Font calldata font) external { _setFont(capsuleId, font); } /// @notice Allows Capsule owner to set its renderer contract. If renderer is the zero address, the Capsule will use the default renderer. /// @dev Does not check validity of the current Capsule text or font with the new renderer. /// @param capsuleId ID of Capsule. /// @param renderer Address of new renderer. function setRendererOf(uint256 capsuleId, address renderer) external onlyCapsuleOwner(capsuleId) onlyValidRenderer(renderer) { _rendererOf[capsuleId] = renderer; emit SetCapsuleRenderer(capsuleId, renderer); } /// @notice Burns a Capsule. /// @param capsuleId ID of Capsule to burn. function burn(uint256 capsuleId) external onlyCapsuleOwner(capsuleId) { _burn(capsuleId); } /* -------------------------------------------------------------------------- */ /* 000 0000 0 0 00000 0 0 */ /* 0 0 0 0 00 00 0 00 0 */ /* 00000 0 0 0 0 0 0 0 0 0 */ /* 0 0 0 0 0 0 0 0 00 */ /* 0 0 0000 0 0 00000 0 0 */ /* -------------------------------------------------------------------------- */ /* ---------------------------- ADMIN FUNCTIONS ----------------------------- */ /* -------------------------------------------------------------------------- */ /// @notice Mints a Capsule to sender, saving gas by not setting text. /// @param to Color of Capsule. /// @param color Color of Capsule. /// @param font Font of Capsule. /// @return capsuleId ID of minted Capsule. function mintAsOwner( address to, bytes3 color, Font calldata font, bytes32[8] calldata text ) external payable onlyOwner onlyImpureColor(color) nonReentrant returns (uint256) { return _mintCapsule(to, color, font, text); } /// @notice Allows the owner of this contract to set the gift count of multiple addresses. /// @param addresses Addresses to set gift count for. /// @param counts Counts to set for addresses. function setGiftCounts( address[] calldata addresses, uint256[] calldata counts ) external onlyOwner { if (addresses.length != counts.length) { revert("Number of addresses must equal number of gift counts."); } for (uint256 i; i < addresses.length; i++) { address a = addresses[i]; uint256 count = counts[i]; _giftCount[a] = count; emit SetGiftCount(a, count); } } /// @notice Allows the owner of this contract to update the default renderer contract. /// @param renderer Address of new default renderer contract. function setDefaultRenderer(address renderer) external onlyOwner { _setDefaultRenderer(renderer); } /// @notice Allows the owner of this contract to add a valid renderer contract. /// @param renderer Address of renderer contract. function addValidRenderer(address renderer) external onlyOwner { _addValidRenderer(renderer); } /// @notice Allows the owner of this contract to update the metadata contract. /// @param _capsuleMetadata Address of new default metadata contract. function setCapsuleMetadata(address _capsuleMetadata) external onlyOwner { _setMetadata(_capsuleMetadata); } /// @notice Allows the owner of this contract to update the contractURI. /// @param __contractURI New contractURI. function setContractURI(string calldata __contractURI) external onlyOwner { _setContractURI(__contractURI); } /// @notice Allows the owner of this contract to update the feeReceiver address. /// @param newFeeReceiver Address of new feeReceiver. function setFeeReceiver(address newFeeReceiver) external onlyOwner { _setFeeReceiver(newFeeReceiver); } /// @notice Allows the owner of this contract to update the royalty amount. /// @param royaltyAmount New royalty amount. function setRoyalty(uint256 royaltyAmount) external onlyOwner { _setRoyalty(royaltyAmount); } /// @notice Allows the contract owner to pause the contract. /// @dev Can only be called by the owner when the contract is unpaused. function pause() external override onlyOwner { _pause(); } /// @notice Allows the contract owner to unpause the contract. /// @dev Can only be called by the owner when the contract is paused. function unpause() external override onlyOwner { _unpause(); } /* -------------------------------------------------------------------------- */ /* 00000 0 0 00000 00000 0000 0 0 000 0 */ /* 0 00 0 0 0 0 0 00 0 0 0 0 */ /* 0 0 0 0 0 0000 0000 0 0 0 00000 0 */ /* 0 0 00 0 0 0 0 0 00 0 0 0 */ /* 00000 0 0 0 00000 0 0 0 0 0 0 00000 */ /* -------------------------------------------------------------------------- */ /* --------------------------- INTERNAL FUNCTIONS --------------------------- */ /* -------------------------------------------------------------------------- */ /// @notice ERC721A override to start tokenId at 1 instead of 0. function _startTokenId() internal pure override returns (uint256) { return 1; } /// @notice Mints a Capsule. /// @param to Address to receive capsule. /// @param color Color of Capsule. /// @param font Font of Capsule. /// @return capsuleId ID of minted Capsule. function _mintCapsule( address to, bytes3 color, Font calldata font, bytes32[8] memory text ) internal onlyMintableColor(color) onlyValidFontForRenderer(font, defaultRenderer) returns (uint256 capsuleId) { _mint(to, 1, new bytes(0), false); capsuleId = _currentIndex - 1; tokenIdOfColor[color] = capsuleId; _colorOf[capsuleId] = color; _fontOf[capsuleId] = font; _textOf[capsuleId] = text; emit MintCapsule(capsuleId, to, color, font, text); } function _setText(uint256 capsuleId, bytes32[8] calldata text) internal onlyCapsuleOwner(capsuleId) { _textOf[capsuleId] = text; emit SetCapsuleText(capsuleId, text); } function _setFont(uint256 capsuleId, Font calldata font) internal onlyCapsuleOwner(capsuleId) onlyValidFontForRenderer(font, rendererOf(capsuleId)) { _fontOf[capsuleId] = font; emit SetCapsuleFont(capsuleId, font); } function _addValidRenderer(address renderer) internal { _validRenderers[renderer] = true; emit AddValidRenderer(renderer); } /// @notice Check if all lines of text are empty. /// @param text Text to check. /// @return true if text is empty. function _isEmptyText(bytes32[8] memory text) internal pure returns (bool) { for (uint256 i; i < 8; i++) { if (!_isEmptyLine(text[i])) return false; } return true; } /// @notice Returns the pure color matching a specific font weight. /// @param fontWeight Font weight to return pure color for. /// @return color Color for font weight. function pureColorForFontWeight(uint256 fontWeight) internal view returns (bytes3) { // 100 == pureColors[0] // 200 == pureColors[1] // 300 == pureColors[2] // etc... return pureColors[(fontWeight / 100) - 1]; } /// @notice Check if line is empty. /// @dev Returns true if every byte of text is 0x00. /// @param line line to check. /// @return true if line is empty. function _isEmptyLine(bytes32 line) internal pure returns (bool) { bytes2[16] memory _line = _bytes32ToBytes2Array(line); for (uint256 i; i < 16; i++) { if (_line[i] != 0) return false; } return true; } /// @notice Format bytes32 type as array of bytes2 /// @param b bytes32 value to convert to array /// @return a Array of bytes2 function _bytes32ToBytes2Array(bytes32 b) internal pure returns (bytes2[16] memory a) { for (uint256 i; i < 16; i++) { a[i] = bytes2(abi.encodePacked(b[i * 2], b[i * 2 + 1])); } } function _setDefaultRenderer(address renderer) internal { _addValidRenderer(renderer); defaultRenderer = renderer; emit SetDefaultRenderer(renderer); } function _setRoyalty(uint256 royaltyAmount) internal { require(royaltyAmount <= 1000, "Amount too high"); royalty = royaltyAmount; emit SetRoyalty(royaltyAmount); } function _setContractURI(string calldata __contractURI) internal { _contractURI = __contractURI; emit SetContractURI(__contractURI); } function _setFeeReceiver(address newFeeReceiver) internal { feeReceiver = newFeeReceiver; emit SetFeeReceiver(newFeeReceiver); } function _setMetadata(address _capsuleMetadata) internal { capsuleMetadata = _capsuleMetadata; emit SetMetadata(_capsuleMetadata); } }
// 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 (last updated v4.5.0) (interfaces/IERC2981.sol) pragma solidity ^0.8.0; import "./IERC165.sol"; /** * @dev Interface for the NFT Royalty Standard. * * A standardized way to retrieve royalty payment information for non-fungible tokens (NFTs) to enable universal * support for royalty payments across all NFT marketplaces and ecosystem participants. * * _Available since v4.5._ */ interface IERC2981 is IERC165 { /** * @dev Returns how much royalty is owed and to whom, based on a sale price that may be denominated in any unit of * exchange. The royalty amount is denominated and should be payed in that same unit of exchange. */ function royaltyInfo(uint256 tokenId, uint256 salePrice) external view returns (address receiver, uint256 royaltyAmount); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol) pragma solidity ^0.8.0; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuard { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; constructor() { _status = _NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and making it call a * `private` function that does the actual work. */ modifier nonReentrant() { // On the first call to nonReentrant, _notEntered will be true require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; _; // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (security/Pausable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which allows children to implement an emergency stop * mechanism that can be triggered by an authorized account. * * This module is used through inheritance. It will make available the * modifiers `whenNotPaused` and `whenPaused`, which can be applied to * the functions of your contract. Note that they will not be pausable by * simply including this module, only once the modifiers are put in place. */ abstract contract Pausable is Context { /** * @dev Emitted when the pause is triggered by `account`. */ event Paused(address account); /** * @dev Emitted when the pause is lifted by `account`. */ event Unpaused(address account); bool private _paused; /** * @dev Initializes the contract in unpaused state. */ constructor() { _paused = false; } /** * @dev Returns true if the contract is paused, and false otherwise. */ function paused() public view virtual returns (bool) { return _paused; } /** * @dev Modifier to make a function callable only when the contract is not paused. * * Requirements: * * - The contract must not be paused. */ modifier whenNotPaused() { require(!paused(), "Pausable: paused"); _; } /** * @dev Modifier to make a function callable only when the contract is paused. * * Requirements: * * - The contract must be paused. */ modifier whenPaused() { require(paused(), "Pausable: not paused"); _; } /** * @dev Triggers stopped state. * * Requirements: * * - The contract must not be paused. */ function _pause() internal virtual whenNotPaused { _paused = true; emit Paused(_msgSender()); } /** * @dev Returns to normal state. * * Requirements: * * - The contract must be paused. */ function _unpause() internal virtual whenPaused { _paused = false; emit Unpaused(_msgSender()); } }
// SPDX-License-Identifier: MIT // Creator: Chiru Labs pragma solidity ^0.8.4; import '@openzeppelin/contracts/token/ERC721/IERC721.sol'; import '@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol'; import '@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol'; import '@openzeppelin/contracts/token/ERC721/extensions/IERC721Enumerable.sol'; import '@openzeppelin/contracts/utils/Address.sol'; import '@openzeppelin/contracts/utils/Context.sol'; import '@openzeppelin/contracts/utils/Strings.sol'; import '@openzeppelin/contracts/utils/introspection/ERC165.sol'; error ApprovalCallerNotOwnerNorApproved(); error ApprovalQueryForNonexistentToken(); error ApproveToCaller(); error ApprovalToCurrentOwner(); error BalanceQueryForZeroAddress(); error MintedQueryForZeroAddress(); error BurnedQueryForZeroAddress(); error AuxQueryForZeroAddress(); error MintToZeroAddress(); error MintZeroQuantity(); error OwnerIndexOutOfBounds(); error OwnerQueryForNonexistentToken(); error TokenIndexOutOfBounds(); error TransferCallerNotOwnerNorApproved(); error TransferFromIncorrectOwner(); error TransferToNonERC721ReceiverImplementer(); error TransferToZeroAddress(); error URIQueryForNonexistentToken(); /** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension. Built to optimize for lower gas during batch mints. * * Assumes serials are sequentially minted starting at _startTokenId() (defaults to 0, e.g. 0, 1, 2, 3..). * * Assumes that an owner cannot have more than 2**64 - 1 (max value of uint64) of supply. * * Assumes that the maximum token id cannot exceed 2**256 - 1 (max value of uint256). */ contract ERC721A is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Compiler will pack this into a single 256bit word. struct TokenOwnership { // The address of the owner. address addr; // Keeps track of the start time of ownership with minimal overhead for tokenomics. uint64 startTimestamp; // Whether the token has been burned. bool burned; } // Compiler will pack this into a single 256bit word. struct AddressData { // Realistically, 2**64-1 is more than enough. uint64 balance; // Keeps track of mint count with minimal overhead for tokenomics. uint64 numberMinted; // Keeps track of burn count with minimal overhead for tokenomics. uint64 numberBurned; // For miscellaneous variable(s) pertaining to the address // (e.g. number of whitelist mint slots used). // If there are multiple variables, please pack them into a uint64. uint64 aux; } // The tokenId of the next token to be minted. uint256 internal _currentIndex; // The number of tokens burned. uint256 internal _burnCounter; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to ownership details // An empty struct value does not necessarily mean the token is unowned. See ownershipOf implementation for details. mapping(uint256 => TokenOwnership) internal _ownerships; // Mapping owner address to address data mapping(address => AddressData) private _addressData; // Mapping from token ID to approved address mapping(uint256 => address) private _tokenApprovals; // Mapping from owner to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; _currentIndex = _startTokenId(); } /** * To change the starting tokenId, please override this function. */ function _startTokenId() internal view virtual returns (uint256) { return 0; } /** * @dev See {IERC721Enumerable-totalSupply}. * @dev Burned tokens are calculated here, use _totalMinted() if you want to count just minted tokens. */ function totalSupply() public view returns (uint256) { // Counter underflow is impossible as _burnCounter cannot be incremented // more than _currentIndex - _startTokenId() times unchecked { return _currentIndex - _burnCounter - _startTokenId(); } } /** * Returns the total amount of tokens minted in the contract. */ function _totalMinted() internal view returns (uint256) { // Counter underflow is impossible as _currentIndex does not decrement, // and it is initialized to _startTokenId() unchecked { return _currentIndex - _startTokenId(); } } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { return interfaceId == type(IERC721).interfaceId || interfaceId == type(IERC721Metadata).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721-balanceOf}. */ function balanceOf(address owner) public view override returns (uint256) { if (owner == address(0)) revert BalanceQueryForZeroAddress(); return uint256(_addressData[owner].balance); } /** * Returns the number of tokens minted by `owner`. */ function _numberMinted(address owner) internal view returns (uint256) { if (owner == address(0)) revert MintedQueryForZeroAddress(); return uint256(_addressData[owner].numberMinted); } /** * Returns the number of tokens burned by or on behalf of `owner`. */ function _numberBurned(address owner) internal view returns (uint256) { if (owner == address(0)) revert BurnedQueryForZeroAddress(); return uint256(_addressData[owner].numberBurned); } /** * Returns the auxillary data for `owner`. (e.g. number of whitelist mint slots used). */ function _getAux(address owner) internal view returns (uint64) { if (owner == address(0)) revert AuxQueryForZeroAddress(); return _addressData[owner].aux; } /** * Sets the auxillary data for `owner`. (e.g. number of whitelist mint slots used). * If there are multiple variables, please pack them into a uint64. */ function _setAux(address owner, uint64 aux) internal { if (owner == address(0)) revert AuxQueryForZeroAddress(); _addressData[owner].aux = aux; } /** * Gas spent here starts off proportional to the maximum mint batch size. * It gradually moves to O(1) as tokens get transferred around in the collection over time. */ function ownershipOf(uint256 tokenId) internal view returns (TokenOwnership memory) { uint256 curr = tokenId; unchecked { if (_startTokenId() <= curr && curr < _currentIndex) { TokenOwnership memory ownership = _ownerships[curr]; if (!ownership.burned) { if (ownership.addr != address(0)) { return ownership; } // Invariant: // There will always be an ownership that has an address and is not burned // before an ownership that does not have an address and is not burned. // Hence, curr will not underflow. while (true) { curr--; ownership = _ownerships[curr]; if (ownership.addr != address(0)) { return ownership; } } } } } revert OwnerQueryForNonexistentToken(); } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view override returns (address) { return ownershipOf(tokenId).addr; } /** * @dev See {IERC721Metadata-name}. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev See {IERC721Metadata-symbol}. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { if (!_exists(tokenId)) revert URIQueryForNonexistentToken(); string memory baseURI = _baseURI(); return bytes(baseURI).length != 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : ''; } /** * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each * token will be the concatenation of the `baseURI` and the `tokenId`. Empty * by default, can be overriden in child contracts. */ function _baseURI() internal view virtual returns (string memory) { return ''; } /** * @dev See {IERC721-approve}. */ function approve(address to, uint256 tokenId) public override { address owner = ERC721A.ownerOf(tokenId); if (to == owner) revert ApprovalToCurrentOwner(); if (_msgSender() != owner && !isApprovedForAll(owner, _msgSender())) { revert ApprovalCallerNotOwnerNorApproved(); } _approve(to, tokenId, owner); } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view override returns (address) { if (!_exists(tokenId)) revert ApprovalQueryForNonexistentToken(); return _tokenApprovals[tokenId]; } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public override { if (operator == _msgSender()) revert ApproveToCaller(); _operatorApprovals[_msgSender()][operator] = approved; emit ApprovalForAll(_msgSender(), operator, approved); } /** * @dev See {IERC721-isApprovedForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return _operatorApprovals[owner][operator]; } /** * @dev See {IERC721-transferFrom}. */ function transferFrom( address from, address to, uint256 tokenId ) public virtual override { _transfer(from, to, tokenId); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId ) public virtual override { safeTransferFrom(from, to, tokenId, ''); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory _data ) public virtual override { _transfer(from, to, tokenId); if (to.isContract() && !_checkContractOnERC721Received(from, to, tokenId, _data)) { revert TransferToNonERC721ReceiverImplementer(); } } /** * @dev Returns whether `tokenId` exists. * * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. * * Tokens start existing when they are minted (`_mint`), */ function _exists(uint256 tokenId) internal view returns (bool) { return _startTokenId() <= tokenId && tokenId < _currentIndex && !_ownerships[tokenId].burned; } function _safeMint(address to, uint256 quantity) internal { _safeMint(to, quantity, ''); } /** * @dev Safely mints `quantity` tokens and transfers them to `to`. * * Requirements: * * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called for each safe transfer. * - `quantity` must be greater than 0. * * Emits a {Transfer} event. */ function _safeMint( address to, uint256 quantity, bytes memory _data ) internal { _mint(to, quantity, _data, true); } /** * @dev Mints `quantity` tokens and transfers them to `to`. * * Requirements: * * - `to` cannot be the zero address. * - `quantity` must be greater than 0. * * Emits a {Transfer} event. */ function _mint( address to, uint256 quantity, bytes memory _data, bool safe ) internal { uint256 startTokenId = _currentIndex; if (to == address(0)) revert MintToZeroAddress(); if (quantity == 0) revert MintZeroQuantity(); _beforeTokenTransfers(address(0), to, startTokenId, quantity); // Overflows are incredibly unrealistic. // balance or numberMinted overflow if current value of either + quantity > 1.8e19 (2**64) - 1 // updatedIndex overflows if _currentIndex + quantity > 1.2e77 (2**256) - 1 unchecked { _addressData[to].balance += uint64(quantity); _addressData[to].numberMinted += uint64(quantity); _ownerships[startTokenId].addr = to; _ownerships[startTokenId].startTimestamp = uint64(block.timestamp); uint256 updatedIndex = startTokenId; uint256 end = updatedIndex + quantity; if (safe && to.isContract()) { do { emit Transfer(address(0), to, updatedIndex); if (!_checkContractOnERC721Received(address(0), to, updatedIndex++, _data)) { revert TransferToNonERC721ReceiverImplementer(); } } while (updatedIndex != end); // Reentrancy protection if (_currentIndex != startTokenId) revert(); } else { do { emit Transfer(address(0), to, updatedIndex++); } while (updatedIndex != end); } _currentIndex = updatedIndex; } _afterTokenTransfers(address(0), to, startTokenId, quantity); } /** * @dev Transfers `tokenId` from `from` to `to`. * * Requirements: * * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * * Emits a {Transfer} event. */ function _transfer( address from, address to, uint256 tokenId ) private { TokenOwnership memory prevOwnership = ownershipOf(tokenId); bool isApprovedOrOwner = (_msgSender() == prevOwnership.addr || isApprovedForAll(prevOwnership.addr, _msgSender()) || getApproved(tokenId) == _msgSender()); if (!isApprovedOrOwner) revert TransferCallerNotOwnerNorApproved(); if (prevOwnership.addr != from) revert TransferFromIncorrectOwner(); if (to == address(0)) revert TransferToZeroAddress(); _beforeTokenTransfers(from, to, tokenId, 1); // Clear approvals from the previous owner _approve(address(0), tokenId, prevOwnership.addr); // Underflow of the sender's balance is impossible because we check for // ownership above and the recipient's balance can't realistically overflow. // Counter overflow is incredibly unrealistic as tokenId would have to be 2**256. unchecked { _addressData[from].balance -= 1; _addressData[to].balance += 1; _ownerships[tokenId].addr = to; _ownerships[tokenId].startTimestamp = uint64(block.timestamp); // If the ownership slot of tokenId+1 is not explicitly set, that means the transfer initiator owns it. // Set the slot of tokenId+1 explicitly in storage to maintain correctness for ownerOf(tokenId+1) calls. uint256 nextTokenId = tokenId + 1; if (_ownerships[nextTokenId].addr == address(0)) { // This will suffice for checking _exists(nextTokenId), // as a burned slot cannot contain the zero address. if (nextTokenId < _currentIndex) { _ownerships[nextTokenId].addr = prevOwnership.addr; _ownerships[nextTokenId].startTimestamp = prevOwnership.startTimestamp; } } } emit Transfer(from, to, tokenId); _afterTokenTransfers(from, to, tokenId, 1); } /** * @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 { TokenOwnership memory prevOwnership = ownershipOf(tokenId); _beforeTokenTransfers(prevOwnership.addr, address(0), tokenId, 1); // Clear approvals from the previous owner _approve(address(0), tokenId, prevOwnership.addr); // Underflow of the sender's balance is impossible because we check for // ownership above and the recipient's balance can't realistically overflow. // Counter overflow is incredibly unrealistic as tokenId would have to be 2**256. unchecked { _addressData[prevOwnership.addr].balance -= 1; _addressData[prevOwnership.addr].numberBurned += 1; // Keep track of who burned the token, and the timestamp of burning. _ownerships[tokenId].addr = prevOwnership.addr; _ownerships[tokenId].startTimestamp = uint64(block.timestamp); _ownerships[tokenId].burned = true; // If the ownership slot of tokenId+1 is not explicitly set, that means the burn initiator owns it. // Set the slot of tokenId+1 explicitly in storage to maintain correctness for ownerOf(tokenId+1) calls. uint256 nextTokenId = tokenId + 1; if (_ownerships[nextTokenId].addr == address(0)) { // This will suffice for checking _exists(nextTokenId), // as a burned slot cannot contain the zero address. if (nextTokenId < _currentIndex) { _ownerships[nextTokenId].addr = prevOwnership.addr; _ownerships[nextTokenId].startTimestamp = prevOwnership.startTimestamp; } } } emit Transfer(prevOwnership.addr, address(0), tokenId); _afterTokenTransfers(prevOwnership.addr, address(0), tokenId, 1); // Overflow not possible, as _burnCounter cannot be exceed _currentIndex times. unchecked { _burnCounter++; } } /** * @dev Approve `to` to operate on `tokenId` * * Emits a {Approval} event. */ function _approve( address to, uint256 tokenId, address owner ) private { _tokenApprovals[tokenId] = to; emit Approval(owner, to, tokenId); } /** * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target contract. * * @param from address representing the previous owner of the given token ID * @param to target address that will receive the tokens * @param tokenId uint256 ID of the token to be transferred * @param _data bytes optional data to send along with the call * @return bool whether the call correctly returned the expected magic value */ function _checkContractOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) private returns (bool) { try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) { return retval == IERC721Receiver(to).onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert TransferToNonERC721ReceiverImplementer(); } else { assembly { revert(add(32, reason), mload(reason)) } } } } /** * @dev Hook that is called before a set of serially-ordered token ids are about to be transferred. This includes minting. * And also called before burning one token. * * startTokenId - the first token id to be transferred * quantity - the amount to be transferred * * Calling conditions: * * - When `from` and `to` are both non-zero, `from`'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, `tokenId` will be burned by `from`. * - `from` and `to` are never both zero. */ function _beforeTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual {} /** * @dev Hook that is called after a set of serially-ordered token ids have been transferred. This includes * minting. * And also called after one token has been burned. * * startTokenId - the first token id to be transferred * quantity - the amount to be transferred * * Calling conditions: * * - When `from` and `to` are both non-zero, `from`'s `tokenId` has been * transferred to `to`. * - When `from` is zero, `tokenId` has been minted for `to`. * - When `to` is zero, `tokenId` has been burned by `from`. * - `from` and `to` are never both zero. */ function _afterTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual {} }
// SPDX-License-Identifier: GPL-3.0 /** @title ICapsuleMetadata @author peri @notice Interface for CapsuleMetadata contract */ pragma solidity ^0.8.8; import "./ICapsuleToken.sol"; interface ICapsuleMetadata { function metadataOf(Capsule memory capsule, string memory image) external view returns (string memory); }
// SPDX-License-Identifier: GPL-3.0 /** @title ICapsuleRenderer @author peri @notice Interface for CapsuleRenderer contract */ pragma solidity ^0.8.8; import "./ICapsuleToken.sol"; import "./ITypeface.sol"; interface ICapsuleRenderer { function typeface() external view returns (address); function svgOf(Capsule memory capsule) external view returns (string memory); function isValidFont(Font memory font) external view returns (bool); function isValidText(bytes32[8] memory line) external view returns (bool); }
// SPDX-License-Identifier: GPL-3.0 /** @title ICapsuleToken @author peri @notice Interface for CapsuleToken contract */ pragma solidity ^0.8.8; import "@openzeppelin/contracts/token/ERC721/extensions/IERC721Enumerable.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "./ITypeface.sol"; struct Capsule { uint256 id; bytes3 color; Font font; bytes32[8] text; bool isPure; } interface ICapsuleToken { event AddValidRenderer(address renderer); event MintCapsule( uint256 indexed id, address indexed to, bytes3 indexed color, Font font, bytes32[8] text ); event MintGift(address minter); event SetDefaultRenderer(address renderer); event SetFeeReceiver(address receiver); event SetMetadata(address metadata); event SetPureColors(bytes3[] colors); event SetRoyalty(uint256 royalty); event SetCapsuleFont(uint256 indexed id, Font font); event SetCapsuleRenderer(uint256 indexed id, address renderer); event SetCapsuleText(uint256 indexed id, bytes32[8] text); event SetContractURI(string contractURI); event SetGiftCount(address _address, uint256 count); event Withdraw(address to, uint256 amount); function capsuleOf(uint256 capsuleId) external view returns (Capsule memory); function isPureColor(bytes3 color) external view returns (bool); function colorOf(uint256 capsuleId) external view returns (bytes3); function textOf(uint256 capsuleId) external view returns (bytes32[8] memory); function fontOf(uint256 capsuleId) external view returns (Font memory); function svgOf(uint256 capsuleId) external view returns (string memory); function mint( bytes3 color, Font calldata font, bytes32[8] memory text ) external payable returns (uint256); function mintPureColorForFont(address to, Font calldata font) external returns (uint256); function mintAsOwner( address to, bytes3 color, Font calldata font, bytes32[8] calldata text ) external payable returns (uint256); function setGiftCounts( address[] calldata addresses, uint256[] calldata counts ) external; function setTextAndFont( uint256 capsuleId, bytes32[8] calldata text, Font calldata font ) external; function setText(uint256 capsuleId, bytes32[8] calldata text) external; function setFont(uint256 capsuleId, Font calldata font) external; function setRendererOf(uint256 capsuleId, address renderer) external; function setDefaultRenderer(address renderer) external; function addValidRenderer(address renderer) external; function burn(uint256 capsuleId) external; function isValidFontForRenderer(Font memory font, address renderer) external view returns (bool); function isValidColor(bytes3 color) external view returns (bool); function isValidCapsuleText(uint256 capsuleId) external view returns (bool); function isValidRenderer(address renderer) external view returns (bool); function contractURI() external view returns (string memory); function withdraw() external; function setFeeReceiver(address _feeReceiver) external; function setRoyalty(uint256 _royalty) external; function setContractURI(string calldata _contractURI) external; function pause() external; function unpause() external; }
// SPDX-License-Identifier: MIT /** @title ITypeface @author peri @notice Interface for Typeface contract */ pragma solidity ^0.8.8; struct Font { uint256 weight; string style; } interface ITypeface { /// @notice Emitted when the source is set for a font. /// @param font The font the source has been set for. event SetSource(Font font); /// @notice Emitted when the source hash is set for a font. /// @param font The font the source hash has been set for. /// @param sourceHash The source hash that was set. event SetSourceHash(Font font, bytes32 sourceHash); /// @notice Emitted when the donation address is set. /// @param donationAddress New donation address. event SetDonationAddress(address donationAddress); /// @notice Returns the typeface name. function name() external view returns (string memory); /// @notice Check if typeface includes a glyph for a specific character code point. /// @dev 3 bytes supports all possible unicodes. /// @param codePoint Character code point. /// @return true True if supported. function supportsCodePoint(bytes3 codePoint) external view returns (bool); /// @notice Return source data of Font. /// @param font Font to return source data for. /// @return source Source data of font. function sourceOf(Font memory font) external view returns (bytes memory); /// @notice Checks if source data has been stored for font. /// @param font Font to check if source data exists for. /// @return true True if source exists. function hasSource(Font memory font) external view returns (bool); /// @notice Stores source data for a font. /// @param font Font to store source data for. /// @param source Source data of font. function setSource(Font memory font, bytes memory source) external; /// @notice Sets a new donation address. /// @param donationAddress New donation address. function setDonationAddress(address donationAddress) external; /// @notice Returns donation address /// @return donationAddress Donation address. function donationAddress() external view returns (address); }
// 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 (interfaces/IERC165.sol) pragma solidity ^0.8.0; import "../utils/introspection/IERC165.sol";
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// 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 (last updated v4.5.0) (token/ERC721/extensions/IERC721Enumerable.sol) pragma solidity ^0.8.0; import "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Enumerable is IERC721 { /** * @dev Returns the total amount of tokens stored by the contract. */ function totalSupply() external view returns (uint256); /** * @dev Returns a token ID owned by `owner` at a given `index` of its token list. * Use along with {balanceOf} to enumerate all of ``owner``'s tokens. */ function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256); /** * @dev Returns a token ID at a given `index` of all the tokens stored by the contract. * Use along with {totalSupply} to enumerate all tokens. */ function tokenByIndex(uint256 index) external view returns (uint256); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Strings.sol) pragma solidity ^0.8.0; /** * @dev String operations. */ library Strings { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { // Inspired by OraclizeAPI's implementation - MIT licence // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol if (value == 0) { return "0"; } uint256 temp = value; uint256 digits; while (temp != 0) { digits++; temp /= 10; } bytes memory buffer = new bytes(digits); while (value != 0) { digits -= 1; buffer[digits] = bytes1(uint8(48 + uint256(value % 10))); value /= 10; } return string(buffer); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { if (value == 0) { return "0x00"; } uint256 temp = value; uint256 length = 0; while (temp != 0) { length++; temp >>= 8; } return toHexString(value, length); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _HEX_SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } }
// 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; } }
{ "optimizer": { "enabled": true, "runs": 1000 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "metadata": { "useLiteralContent": true }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"_capsulesTypeface","type":"address"},{"internalType":"address","name":"_defaultRenderer","type":"address"},{"internalType":"address","name":"_capsuleMetadata","type":"address"},{"internalType":"address","name":"_feeReceiver","type":"address"},{"internalType":"bytes3[]","name":"_pureColors","type":"bytes3[]"},{"internalType":"uint256","name":"_royalty","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"ApprovalCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"ApprovalQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"ApprovalToCurrentOwner","type":"error"},{"inputs":[],"name":"ApproveToCaller","type":"error"},{"inputs":[],"name":"BalanceQueryForZeroAddress","type":"error"},{"inputs":[{"internalType":"uint256","name":"capsuleId","type":"uint256"}],"name":"ColorAlreadyMinted","type":"error"},{"inputs":[],"name":"InvalidColor","type":"error"},{"inputs":[{"internalType":"address","name":"renderer","type":"address"}],"name":"InvalidFontForRenderer","type":"error"},{"inputs":[],"name":"InvalidRenderer","type":"error"},{"inputs":[],"name":"MintToZeroAddress","type":"error"},{"inputs":[],"name":"MintZeroQuantity","type":"error"},{"inputs":[],"name":"NoGiftAvailable","type":"error"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"NotCapsuleOwner","type":"error"},{"inputs":[],"name":"NotCapsulesTypeface","type":"error"},{"inputs":[],"name":"OwnerQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"PureColorNotAllowed","type":"error"},{"inputs":[],"name":"TransferCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"TransferFromIncorrectOwner","type":"error"},{"inputs":[],"name":"TransferToNonERC721ReceiverImplementer","type":"error"},{"inputs":[],"name":"TransferToZeroAddress","type":"error"},{"inputs":[],"name":"ValueBelowMintPrice","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"renderer","type":"address"}],"name":"AddValidRenderer","type":"event"},{"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":"uint256","name":"id","type":"uint256"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"bytes3","name":"color","type":"bytes3"},{"components":[{"internalType":"uint256","name":"weight","type":"uint256"},{"internalType":"string","name":"style","type":"string"}],"indexed":false,"internalType":"struct Font","name":"font","type":"tuple"},{"indexed":false,"internalType":"bytes32[8]","name":"text","type":"bytes32[8]"}],"name":"MintCapsule","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"minter","type":"address"}],"name":"MintGift","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"},{"components":[{"internalType":"uint256","name":"weight","type":"uint256"},{"internalType":"string","name":"style","type":"string"}],"indexed":false,"internalType":"struct Font","name":"font","type":"tuple"}],"name":"SetCapsuleFont","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":false,"internalType":"address","name":"renderer","type":"address"}],"name":"SetCapsuleRenderer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":false,"internalType":"bytes32[8]","name":"text","type":"bytes32[8]"}],"name":"SetCapsuleText","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"contractURI","type":"string"}],"name":"SetContractURI","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"renderer","type":"address"}],"name":"SetDefaultRenderer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"receiver","type":"address"}],"name":"SetFeeReceiver","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_address","type":"address"},{"indexed":false,"internalType":"uint256","name":"count","type":"uint256"}],"name":"SetGiftCount","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"metadata","type":"address"}],"name":"SetMetadata","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bytes3[]","name":"colors","type":"bytes3[]"}],"name":"SetPureColors","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"royalty","type":"uint256"}],"name":"SetRoyalty","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"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Withdraw","type":"event"},{"inputs":[],"name":"MINT_PRICE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"renderer","type":"address"}],"name":"addValidRenderer","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":"capsuleId","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"capsuleMetadata","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"capsuleId","type":"uint256"}],"name":"capsuleOf","outputs":[{"components":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"bytes3","name":"color","type":"bytes3"},{"components":[{"internalType":"uint256","name":"weight","type":"uint256"},{"internalType":"string","name":"style","type":"string"}],"internalType":"struct Font","name":"font","type":"tuple"},{"internalType":"bytes32[8]","name":"text","type":"bytes32[8]"},{"internalType":"bool","name":"isPure","type":"bool"}],"internalType":"struct Capsule","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"capsulesTypeface","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"capsuleId","type":"uint256"}],"name":"colorOf","outputs":[{"internalType":"bytes3","name":"","type":"bytes3"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"contractURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"defaultRenderer","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"feeReceiver","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"capsuleId","type":"uint256"}],"name":"fontOf","outputs":[{"components":[{"internalType":"uint256","name":"weight","type":"uint256"},{"internalType":"string","name":"style","type":"string"}],"internalType":"struct Font","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"a","type":"address"}],"name":"giftCountOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes3","name":"color","type":"bytes3"}],"name":"isPureColor","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"capsuleId","type":"uint256"}],"name":"isValidCapsuleText","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes3","name":"color","type":"bytes3"}],"name":"isValidColor","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"pure","type":"function"},{"inputs":[{"components":[{"internalType":"uint256","name":"weight","type":"uint256"},{"internalType":"string","name":"style","type":"string"}],"internalType":"struct Font","name":"font","type":"tuple"},{"internalType":"address","name":"renderer","type":"address"}],"name":"isValidFontForRenderer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"renderer","type":"address"}],"name":"isValidRenderer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes3","name":"color","type":"bytes3"},{"components":[{"internalType":"uint256","name":"weight","type":"uint256"},{"internalType":"string","name":"style","type":"string"}],"internalType":"struct Font","name":"font","type":"tuple"},{"internalType":"bytes32[8]","name":"text","type":"bytes32[8]"}],"name":"mint","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"bytes3","name":"color","type":"bytes3"},{"components":[{"internalType":"uint256","name":"weight","type":"uint256"},{"internalType":"string","name":"style","type":"string"}],"internalType":"struct Font","name":"font","type":"tuple"},{"internalType":"bytes32[8]","name":"text","type":"bytes32[8]"}],"name":"mintAsOwner","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"bytes3","name":"color","type":"bytes3"},{"components":[{"internalType":"uint256","name":"weight","type":"uint256"},{"internalType":"string","name":"style","type":"string"}],"internalType":"struct Font","name":"font","type":"tuple"},{"internalType":"bytes32[8]","name":"text","type":"bytes32[8]"}],"name":"mintGift","outputs":[{"internalType":"uint256","name":"capsuleId","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"components":[{"internalType":"uint256","name":"weight","type":"uint256"},{"internalType":"string","name":"style","type":"string"}],"internalType":"struct Font","name":"font","type":"tuple"}],"name":"mintPureColorForFont","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"pureColors","outputs":[{"internalType":"bytes3","name":"","type":"bytes3"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"capsuleId","type":"uint256"}],"name":"rendererOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"royalty","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"salePrice","type":"uint256"}],"name":"royaltyInfo","outputs":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint256","name":"royaltyAmount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_capsuleMetadata","type":"address"}],"name":"setCapsuleMetadata","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"__contractURI","type":"string"}],"name":"setContractURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"renderer","type":"address"}],"name":"setDefaultRenderer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newFeeReceiver","type":"address"}],"name":"setFeeReceiver","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"capsuleId","type":"uint256"},{"components":[{"internalType":"uint256","name":"weight","type":"uint256"},{"internalType":"string","name":"style","type":"string"}],"internalType":"struct Font","name":"font","type":"tuple"}],"name":"setFont","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"addresses","type":"address[]"},{"internalType":"uint256[]","name":"counts","type":"uint256[]"}],"name":"setGiftCounts","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"capsuleId","type":"uint256"},{"internalType":"address","name":"renderer","type":"address"}],"name":"setRendererOf","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"royaltyAmount","type":"uint256"}],"name":"setRoyalty","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"capsuleId","type":"uint256"},{"internalType":"bytes32[8]","name":"text","type":"bytes32[8]"}],"name":"setText","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"capsuleId","type":"uint256"},{"internalType":"bytes32[8]","name":"text","type":"bytes32[8]"},{"components":[{"internalType":"uint256","name":"weight","type":"uint256"},{"internalType":"string","name":"style","type":"string"}],"internalType":"struct Font","name":"font","type":"tuple"}],"name":"setTextAndFont","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":[{"internalType":"uint256","name":"capsuleId","type":"uint256"}],"name":"svgOf","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"capsuleId","type":"uint256"}],"name":"textOf","outputs":[{"internalType":"bytes32[8]","name":"","type":"bytes32[8]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes3","name":"","type":"bytes3"}],"name":"tokenIdOfColor","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"capsuleId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]
Contract Creation Code
60a06040523480156200001157600080fd5b5060405162004a6e38038062004a6e8339810160408190526200003491620005c6565b604080518082018252600881526743617073756c657360c01b6020808301918252835180850190945260048452634341505360e01b90840152815191929162000080916002916200042d565b508051620000969060039060208401906200042d565b5050600160005550620000a93362000159565b6008805460ff60a01b1916905560016009556001600160a01b038616608052620000d385620001ab565b620000de846200020b565b620000e9836200025a565b8151620000fe90600d906020850190620004bc565b507f4d458420dffda02945cd610f212e897c1e02bdf4a0af8bfa0f5e81c1b89d29fe82604051620001309190620006ee565b60405180910390a16200014381620002a9565b6200014d62000329565b5050505050506200077b565b600880546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b620001b681620003d8565b600a80546001600160a01b0319166001600160a01b0383169081179091556040519081527f711396f4d40992395181cbcec9e686685ba0d465a31d036e7928be84b28da00b906020015b60405180910390a150565b600b80546001600160a01b0319166001600160a01b0383169081179091556040519081527f1e78374720f7ac1595d75f11f10ccc953103fcfd8adc75a397585edd2cf8e7cf9060200162000200565b600e80546001600160a01b0319166001600160a01b0383169081179091556040519081527fffb40bfdfd246e95f543d08d9713c339f1d90fa9265e39b4f562f9011d7c919f9060200162000200565b6103e8811115620002f35760405162461bcd60e51b815260206004820152600f60248201526e082dadeeadce840e8dede40d0d2ced608b1b60448201526064015b60405180910390fd5b600f8190556040518181527f2f08e8de3cfaac7a2ce6c3a223d1f4ce37e42d8970533248638ceba1b382cfeb9060200162000200565b6200033d600854600160a01b900460ff1690565b156200037f5760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401620002ea565b6008805460ff60a01b1916600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258620003bb3390565b6040516001600160a01b03909116815260200160405180910390a1565b6001600160a01b038116600081815260106020908152604091829020805460ff1916600117905590519182527fccfb6d5a35afb66b62e211a6b680f56d40aa7ae5e716b47f7589b5274363f045910162000200565b8280546200043b906200073e565b90600052602060002090601f0160209004810192826200045f5760008555620004aa565b82601f106200047a57805160ff1916838001178555620004aa565b82800160010185558215620004aa579182015b82811115620004aa5782518255916020019190600101906200048d565b50620004b892915062000563565b5090565b82805482825590600052602060002090600901600a90048101928215620004aa5791602002820160005b838211156200052857835183826101000a81548162ffffff021916908360e81c02179055509260200192600301602081600201049283019260010302620004e6565b8015620005595782816101000a81549062ffffff021916905560030160208160020104928301926001030262000528565b5050620004b89291505b5b80821115620004b8576000815560010162000564565b80516001600160a01b03811681146200059257600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b80516001600160e81b0319811681146200059257600080fd5b60008060008060008060c08789031215620005e057600080fd5b620005eb876200057a565b95506020620005fc8189016200057a565b95506200060c604089016200057a565b94506200061c606089016200057a565b60808901519094506001600160401b03808211156200063a57600080fd5b818a0191508a601f8301126200064f57600080fd5b81518181111562000664576200066462000597565b8060051b604051601f19603f830116810181811085821117156200068c576200068c62000597565b60405291825284820192508381018501918d831115620006ab57600080fd5b938501935b82851015620006d457620006c485620005ad565b84529385019392850192620006b0565b80975050505050505060a087015190509295509295509295565b6020808252825182820181905260009190848201906040850190845b81811015620007325783516001600160e81b031916835292840192918401916001016200070a565b50909695505050505050565b600181811c908216806200075357607f821691505b602082108114156200077557634e487b7160e01b600052602260045260246000fd5b50919050565b6080516142d06200079e60003960008181610ad1015261180501526142d06000f3fe60806040526004361061038f5760003560e01c806367fdfeef116101dc578063b88d4fde11610102578063d6c03c29116100a0578063e8a3d4851161006f578063e8a3d48514610b13578063e985e9c514610b28578063efdcd97414610b71578063f2fde38b14610b9157600080fd5b8063d6c03c2914610a8c578063dab3343d14610aac578063dfee225f14610abf578063e2ae5f1314610af357600080fd5b8063c56c4cf1116100dc578063c56c4cf114610a0c578063c87b56dd14610a2c578063cf0b5a5314610a4c578063d383580e14610a6c57600080fd5b8063b88d4fde146109b1578063bc4a349f146109d1578063c002d23d146109f157600080fd5b80638456cb591161017a57806395d89b411161014957806395d89b411461093c57806399fec99d14610951578063a22cb46514610971578063b3f006741461099157600080fd5b80638456cb59146108bc5780638da5cb5b146108d1578063938e3d7b146108ef57806393f667101461090f57600080fd5b80636e1ddb14116101b65780636e1ddb141461083a57806370a082311461085a578063715018a61461087a5780637392f7a41461088f57600080fd5b806367fdfeef146107ce57806368b27153146107e15780636df7d0451461080157600080fd5b806329ee566c116102c15780634209a2e11161025f57806355c8866e1161022e57806355c8866e146107425780635c975abb1461076f578063606951951461078e5780636352211e146107ae57600080fd5b80634209a2e1146106c257806342842e0e146106e257806342966c681461070257806347c0d3a51461072257600080fd5b80633af023cf1161029b5780633af023cf146106585780633ccfd60b146106785780633f27c9381461068d5780633f4ba83a146106ad57600080fd5b806329ee566c146105e35780632a55205a146105f95780632b42150f1461063857600080fd5b8063081812fc1161032e57806318160ddd1161030857806318160ddd1461053d5780631963ec741461055a578063239947291461059357806323b872dd146105c357600080fd5b8063081812fc146104a1578063095ea7b3146104d95780630e73c433146104f957600080fd5b806303fb31e81161036a57806303fb31e8146104125780630454153914610432578063055759d61461045257806306fdde031461047f57600080fd5b806298c0651461039b57806301611792146103bd57806301ffc9a7146103dd57600080fd5b3661039657005b600080fd5b3480156103a757600080fd5b506103bb6103b6366004613616565b610bb1565b005b3480156103c957600080fd5b506103bb6103d8366004613660565b610bbf565b3480156103e957600080fd5b506103fd6103f8366004613691565b610c18565b60405190151581526020015b60405180910390f35b34801561041e57600080fd5b506103bb61042d366004613660565b610c5c565b34801561043e57600080fd5b506103fd61044d3660046136ae565b610cad565b34801561045e57600080fd5b5061047261046d3660046136ae565b610d2c565b604051610409919061373e565b34801561048b57600080fd5b50610494610e02565b6040516104099190613751565b3480156104ad57600080fd5b506104c16104bc3660046136ae565b610e94565b6040516001600160a01b039091168152602001610409565b3480156104e557600080fd5b506103bb6104f4366004613764565b610ef1565b34801561050557600080fd5b5061052f610514366004613660565b6001600160a01b031660009081526015602052604090205490565b604051908152602001610409565b34801561054957600080fd5b50600154600054036000190161052f565b34801561056657600080fd5b5061057a6105753660046136ae565b610fb1565b6040516001600160e81b03199091168152602001610409565b34801561059f57600080fd5b5061057a6105ae3660046136ae565b60009081526012602052604090205460e81b90565b3480156105cf57600080fd5b506103bb6105de36600461378e565b610fe8565b3480156105ef57600080fd5b5061052f600f5481565b34801561060557600080fd5b506106196106143660046137ca565b610ff3565b604080516001600160a01b039093168352602083019190915201610409565b34801561064457600080fd5b506103fd610653366004613804565b61102e565b34801561066457600080fd5b506103fd610673366004613804565b61110e565b34801561068457600080fd5b506103bb611240565b34801561069957600080fd5b5061052f6106a8366004613837565b611321565b3480156106b957600080fd5b506103bb6114cf565b3480156106ce57600080fd5b506103bb6106dd3660046136ae565b611521565b3480156106ee57600080fd5b506103bb6106fd36600461378e565b611572565b34801561070e57600080fd5b506103bb61071d3660046136ae565b61158d565b34801561072e57600080fd5b506103bb61073d366004613660565b6115d8565b34801561074e57600080fd5b5061076261075d3660046136ae565b611629565b60405161040991906138ba565b34801561077b57600080fd5b50600854600160a01b900460ff166103fd565b34801561079a57600080fd5b506103bb6107a93660046138c9565b611672565b3480156107ba57600080fd5b506104c16107c93660046136ae565b611686565b61052f6107dc366004613923565b611698565b3480156107ed57600080fd5b50600b546104c1906001600160a01b031681565b34801561080d57600080fd5b506103fd61081c366004613660565b6001600160a01b031660009081526010602052604090205460ff1690565b34801561084657600080fd5b5061052f610855366004613994565b6117aa565b34801561086657600080fd5b5061052f610875366004613660565b6118de565b34801561088657600080fd5b506103bb611946565b34801561089b57600080fd5b5061052f6108aa366004613804565b600c6020526000908152604090205481565b3480156108c857600080fd5b506103bb611998565b3480156108dd57600080fd5b506008546001600160a01b03166104c1565b3480156108fb57600080fd5b506103bb61090a3660046139e2565b6119e8565b34801561091b57600080fd5b5061092f61092a3660046136ae565b611a3a565b6040516104099190613ab5565b34801561094857600080fd5b50610494611b86565b34801561095d57600080fd5b506103bb61096c366004613ac8565b611b95565b34801561097d57600080fd5b506103bb61098c366004613b07565b611b9f565b34801561099d57600080fd5b50600e546104c1906001600160a01b031681565b3480156109bd57600080fd5b506103bb6109cc366004613beb565b611c4e565b3480156109dd57600080fd5b506103bb6109ec366004613c67565b611c9f565b3480156109fd57600080fd5b5061052f662386f26fc1000081565b348015610a1857600080fd5b50600a546104c1906001600160a01b031681565b348015610a3857600080fd5b50610494610a473660046136ae565b611da1565b348015610a5857600080fd5b506104c1610a673660046136ae565b611ea3565b348015610a7857600080fd5b506103bb610a87366004613ccf565b611eed565b348015610a9857600080fd5b506103fd610aa7366004613dbe565b612073565b61052f610aba366004613837565b612103565b348015610acb57600080fd5b506104c17f000000000000000000000000000000000000000000000000000000000000000081565b348015610aff57600080fd5b50610494610b0e3660046136ae565b61225a565b348015610b1f57600080fd5b50610494612298565b348015610b3457600080fd5b506103fd610b43366004613e03565b6001600160a01b03918216600090815260076020908152604080832093909416825291909152205460ff1690565b348015610b7d57600080fd5b506103bb610b8c366004613660565b6122a7565b348015610b9d57600080fd5b506103bb610bac366004613660565b6122f8565b610bbb82826123c5565b5050565b6008546001600160a01b03163314610c0c5760405162461bcd60e51b8152602060048201819052602482015260008051602061427b83398151915260448201526064015b60405180910390fd5b610c1581612460565b50565b60006001600160e01b031982167f2a55205a000000000000000000000000000000000000000000000000000000001480610c565750610c56826124bb565b92915050565b6008546001600160a01b03163314610ca45760405162461bcd60e51b8152602060048201819052602482015260008051602061427b8339815191526044820152606401610c03565b610c1581612556565b6000610cb882611ea3565b6001600160a01b031663b49cf083610ccf84611629565b6040518263ffffffff1660e01b8152600401610ceb91906138ba565b602060405180830381865afa158015610d08573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c569190613e2d565b6040805180820190915260008152606060208201526013600083815260200190815260200160002060405180604001604052908160008201548152602001600182018054610d7990613e4a565b80601f0160208091040260200160405190810160405280929190818152602001828054610da590613e4a565b8015610df25780601f10610dc757610100808354040283529160200191610df2565b820191906000526020600020905b815481529060010190602001808311610dd557829003601f168201915b5050505050815250509050919050565b606060028054610e1190613e4a565b80601f0160208091040260200160405190810160405280929190818152602001828054610e3d90613e4a565b8015610e8a5780601f10610e5f57610100808354040283529160200191610e8a565b820191906000526020600020905b815481529060010190602001808311610e6d57829003601f168201915b5050505050905090565b6000610e9f826125ad565b610ed5576040517fcf4700e400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b506000908152600660205260409020546001600160a01b031690565b6000610efc82611686565b9050806001600160a01b0316836001600160a01b03161415610f4a576040517f943f7b8c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b336001600160a01b03821614801590610f6a5750610f688133610b43565b155b15610fa1576040517fcfb3b94200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610fac8383836125e6565b505050565b600d8181548110610fc157600080fd5b90600052602060002090600a9182820401919006600302915054906101000a900460e81b81565b610fac838383612642565b600e54600f5460009182916001600160a01b03909116906103e8906110189086613e95565b6110229190613eca565b915091505b9250929050565b600080600d8054806020026020016040519081016040528092919081815260200182805480156110aa57602002820191906000526020600020906000905b82829054906101000a900460e81b6001600160e81b0319168152602001906003019060208260020104928301926001038202915080841161106c5790505b5050505050905060005b8151811015611104578181815181106110cf576110cf613eec565b60200260200101516001600160e81b031916846001600160e81b03191614156110fc575060019392505050565b6001016110b4565b5060009392505050565b60007fff0000000000000000000000000000000000000000000000000000000000000082821a60f81b811610801561118d57507fff000000000000000000000000000000000000000000000000000000000000008260011a60f81b7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916105b80156111e057507fff000000000000000000000000000000000000000000000000000000000000008260021a60f81b7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916105b156111ed57506000919050565b60005b600381101561123757600583826003811061120d5761120d613eec565b1a8161121b5761121b613eb4565b0660ff1660001461122f5750600092915050565b6001016111f0565b50600192915050565b600260095414156112935760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610c03565b6002600955600e5460405147916001600160a01b03169082156108fc029083906000818181858888f193505050501580156112d2573d6000803e3d6000fd5b50600e54604080516001600160a01b039092168252602082018390527f884edad9ce6fa2440d8a54cc123490eb96d2768479d49ff9c7366125a9424364910160405180910390a1506001600955565b600854600090600160a01b900460ff16156113715760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610c03565b336000908152601560205260409020546113b7576040517fc6560bec00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b836113c18161102e565b156113df5760405163fbab1fb560e01b815260040160405180910390fd5b600260095414156114325760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610c03565b600260095533600090815260156020526040812080549161145283613f02565b919050555061148c3386868660088060200260405190810160405280929190826008602002808284376000920191909152506128a1915050565b6040513381529092507fa5e115362873e922a883f86b46b316c5c67f4c221819b466c4384ec512d5353e9060200160405180910390a15060016009559392505050565b6008546001600160a01b031633146115175760405162461bcd60e51b8152602060048201819052602482015260008051602061427b8339815191526044820152606401610c03565b61151f612a7a565b565b6008546001600160a01b031633146115695760405162461bcd60e51b8152602060048201819052602482015260008051602061427b8339815191526044820152606401610c03565b610c1581612b20565b610fac83838360405180602001604052806000815250611c4e565b80600061159982611686565b90506001600160a01b03811633146115cf57604051630314482360e01b81526001600160a01b0382166004820152602401610c03565b610fac83612ba7565b6008546001600160a01b031633146116205760405162461bcd60e51b8152602060048201819052602482015260008051602061427b8339815191526044820152606401610c03565b610c1581612d61565b611631613497565b6000828152601160205260409081902081516101008101928390529160089082845b8154815260200190600101908083116116535750505050509050919050565b61167c83836123c5565b610fac8382612daf565b600061169182612e92565b5192915050565b6008546000906001600160a01b031633146116e35760405162461bcd60e51b8152602060048201819052602482015260008051602061427b8339815191526044820152606401610c03565b836116ed8161102e565b1561170b5760405163fbab1fb560e01b815260040160405180910390fd5b6002600954141561175e5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610c03565b600260098190555061179b8686868660088060200260405190810160405280929190826008602002808284376000920191909152506128a1915050565b60016009559695505050505050565b600854600090600160a01b900460ff16156117fa5760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610c03565b336001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461185c576040517f50c2ce7700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600260095414156118af5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610c03565b60026009556118bc613497565b6118d1846118ca8535612fd4565b85846128a1565b6001600955949350505050565b60006001600160a01b038216611920576040517f8f4eb60400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b506001600160a01b031660009081526005602052604090205467ffffffffffffffff1690565b6008546001600160a01b0316331461198e5760405162461bcd60e51b8152602060048201819052602482015260008051602061427b8339815191526044820152606401610c03565b61151f6000613029565b6008546001600160a01b031633146119e05760405162461bcd60e51b8152602060048201819052602482015260008051602061427b8339815191526044820152606401610c03565b61151f61307b565b6008546001600160a01b03163314611a305760405162461bcd60e51b8152602060048201819052602482015260008051602061427b8339815191526044820152606401610c03565b610bbb8282613103565b611a426134b6565b600082815260126020908152604080832054815160a08101835286815260e89190911b6001600160e81b031981168285015286855260138452938290208251808401845281548152600182018054939594860194919391840191611aa590613e4a565b80601f0160208091040260200160405190810160405280929190818152602001828054611ad190613e4a565b8015611b1e5780601f10611af357610100808354040283529160200191611b1e565b820191906000526020600020905b815481529060010190602001808311611b0157829003601f168201915b5050509190925250505081526000858152601160209081526040918290208251610100810190935292019160088282826020028201915b815481526020019060010190808311611b555750505050508152602001611b7b8361102e565b151590529392505050565b606060038054610e1190613e4a565b610bbb8282612daf565b6001600160a01b038216331415611be2576040517fb06307db00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b3360008181526007602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b611c59848484612642565b6001600160a01b0383163b15158015611c7b5750611c798484848461314d565b155b15611c99576040516368d2bf6b60e11b815260040160405180910390fd5b50505050565b816000611cab82611686565b90506001600160a01b0381163314611ce157604051630314482360e01b81526001600160a01b0382166004820152602401610c03565b82611d04816001600160a01b031660009081526010602052604090205460ff1690565b611d3a576040517f0b089cc800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008581526014602090815260409182902080546001600160a01b0319166001600160a01b038816908117909155915191825286917f0412714352e33d866a34eba179cfea158c9ae1c0ce880a47c82203e04982fa60910160405180910390a25050505050565b6060611dac826125ad565b611e1e5760405162461bcd60e51b815260206004820152602860248201527f455243373231413a2055524920717565727920666f72206e6f6e65786973746560448201527f6e7420746f6b656e0000000000000000000000000000000000000000000000006064820152608401610c03565b600b546001600160a01b031663758fd3b0611e3884611a3a565b611e418561225a565b6040518363ffffffff1660e01b8152600401611e5e929190613f19565b600060405180830381865afa158015611e7b573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610c569190810190613f47565b6000818152601460205260408120546001600160a01b031615611edc57506000908152601460205260409020546001600160a01b031690565b5050600a546001600160a01b031690565b6008546001600160a01b03163314611f355760405162461bcd60e51b8152602060048201819052602482015260008051602061427b8339815191526044820152606401610c03565b828114611faa5760405162461bcd60e51b815260206004820152603560248201527f4e756d626572206f6620616464726573736573206d75737420657175616c206e60448201527f756d626572206f66206769667420636f756e74732e00000000000000000000006064820152608401610c03565b60005b8381101561206c576000858583818110611fc957611fc9613eec565b9050602002016020810190611fde9190613660565b90506000848484818110611ff457611ff4613eec565b6001600160a01b03851660008181526015602090815260409182902093810295909501359283905580519182529381018290529093507fcc11aa4f833763ae955850b83252573f6899830c2a3534cc518b530934eab52a9201905060405180910390a15050808061206490613fb5565b915050611fad565b5050505050565b6040517fa190905a0000000000000000000000000000000000000000000000000000000081526000906001600160a01b0383169063a190905a906120bb90869060040161373e565b602060405180830381865afa1580156120d8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120fc9190613e2d565b9392505050565b600854600090600160a01b900460ff16156121535760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610c03565b662386f26fc10000341015612194576040517fdf6774d200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8361219e8161102e565b156121bc5760405163fbab1fb560e01b815260040160405180910390fd5b6002600954141561220f5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610c03565b600260098190555061224c3386868660088060200260405190810160405280929190826008602002808284376000920191909152506128a1915050565b600160095595945050505050565b606061226582611ea3565b6001600160a01b031663236f684961227c84611a3a565b6040518263ffffffff1660e01b8152600401611e5e9190613ab5565b606060168054610e1190613e4a565b6008546001600160a01b031633146122ef5760405162461bcd60e51b8152602060048201819052602482015260008051602061427b8339815191526044820152606401610c03565b610c1581613236565b6008546001600160a01b031633146123405760405162461bcd60e51b8152602060048201819052602482015260008051602061427b8339815191526044820152606401610c03565b6001600160a01b0381166123bc5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610c03565b610c1581613029565b8160006123d182611686565b90506001600160a01b038116331461240757604051630314482360e01b81526001600160a01b0382166004820152602401610c03565b600084815260116020526040902061242190846008613510565b50837f5ef56a46647500d1e67b1206564fd79bbb630bbbff83d1c5d1cc34a05e68a9db846040516124529190613fd0565b60405180910390a250505050565b6001600160a01b038116600081815260106020908152604091829020805460ff1916600117905590519182527fccfb6d5a35afb66b62e211a6b680f56d40aa7ae5e716b47f7589b5274363f04591015b60405180910390a150565b60006001600160e01b031982167f80ac58cd00000000000000000000000000000000000000000000000000000000148061251e57506001600160e01b031982167f5b5e139f00000000000000000000000000000000000000000000000000000000145b80610c5657507f01ffc9a7000000000000000000000000000000000000000000000000000000006001600160e01b0319831614610c56565b61255f81612460565b600a80546001600160a01b0319166001600160a01b0383169081179091556040519081527f711396f4d40992395181cbcec9e686685ba0d465a31d036e7928be84b28da00b906020016124b0565b6000816001111580156125c1575060005482105b8015610c56575050600090815260046020526040902054600160e01b900460ff161590565b60008281526006602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b600061264d82612e92565b80519091506000906001600160a01b0316336001600160a01b0316148061267b5750815161267b9033610b43565b8061269657503361268b84610e94565b6001600160a01b0316145b9050806126cf576040517f59c896be00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b846001600160a01b031682600001516001600160a01b03161461271e576040517fa114810000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b03841661275e576040517fea553b3400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61276e60008484600001516125e6565b6001600160a01b038581166000908152600560209081526040808320805467ffffffffffffffff1980821667ffffffffffffffff92831660001901831617909255898616808652838620805493841693831660019081018416949094179055898652600490945282852080546001600160e01b031916909417600160a01b42909216919091021790925590860180835291205490911661285a5760005481101561285a578251600082815260046020908152604090912080549186015167ffffffffffffffff16600160a01b026001600160e01b03199092166001600160a01b03909316929092171790555b5082846001600160a01b0316866001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a461206c565b6001600160e81b031983166000908152600c602052604081205484906128c6816125ad565b15612900576040517f0ed69b8600000000000000000000000000000000000000000000000000000000815260048101829052602401610c03565b6129098261110e565b61293f576040517f1cf7e9c500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61294885613fe6565b600a546001600160a01b031661295e8282612073565b612986576040516326869c7160e21b81526001600160a01b0382166004820152602401610c03565b604080516000808252602082019092526129a4918b91600191613284565b60016000546129b39190613ff2565b6001600160e81b031989166000908152600c6020908152604080832084905583835260128252808320805462ffffff191660e88e901c179055601390915290209095508790612a028282614057565b50506000858152601160205260409020612a1e9087600861354e565b50876001600160e81b031916896001600160a01b0316867f3458520d9c172a3f8bf78dc94cabd55403f4d2c26053f94f0ec70da25b2ea9608a8a604051612a669291906141d6565b60405180910390a450505050949350505050565b600854600160a01b900460ff16612ad35760405162461bcd60e51b815260206004820152601460248201527f5061757361626c653a206e6f74207061757365640000000000000000000000006044820152606401610c03565b6008805460ff60a01b191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b6103e8811115612b725760405162461bcd60e51b815260206004820152600f60248201527f416d6f756e7420746f6f206869676800000000000000000000000000000000006044820152606401610c03565b600f8190556040518181527f2f08e8de3cfaac7a2ce6c3a223d1f4ce37e42d8970533248638ceba1b382cfeb906020016124b0565b6000612bb282612e92565b9050612bc460008383600001516125e6565b80516001600160a01b039081166000908152600560209081526040808320805467ffffffffffffffff19811667ffffffffffffffff9182166000190182161790915585518516845281842080547fffffffffffffffff0000000000000000ffffffffffffffffffffffffffffffff81167001000000000000000000000000000000009182900484166001908101851690920217909155865188865260049094528285208054600160e01b9588166001600160e01b031990911617600160a01b4290941693909302929092177fffffff00ffffffffffffffffffffffffffffffffffffffffffffffffffffffff16939093179055908501808352912054909116612d1957600054811015612d19578151600082815260046020908152604090912080549185015167ffffffffffffffff16600160a01b026001600160e01b03199092166001600160a01b03909316929092171790555b50805160405183916000916001600160a01b03909116907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a450506001805481019055565b600b80546001600160a01b0319166001600160a01b0383169081179091556040519081527f1e78374720f7ac1595d75f11f10ccc953103fcfd8adc75a397585edd2cf8e7cf906020016124b0565b816000612dbb82611686565b90506001600160a01b0381163314612df157604051630314482360e01b81526001600160a01b0382166004820152602401610c03565b612dfa83613fe6565b612e0385611ea3565b612e0d8282612073565b612e35576040516326869c7160e21b81526001600160a01b0382166004820152602401610c03565b60008681526013602052604090208590612e4f8282614057565b905050857f545aeaec5069b634e22f0f6400b3992a067aac2433083b5088f59373c64cbb5386604051612e8291906141fa565b60405180910390a2505050505050565b60408051606081018252600080825260208201819052918101919091528180600111158015612ec2575060005481105b15612fa257600081815260046020908152604091829020825160608101845290546001600160a01b0381168252600160a01b810467ffffffffffffffff1692820192909252600160e01b90910460ff16151591810182905290612fa05780516001600160a01b031615612f36579392505050565b5060001901600081815260046020908152604091829020825160608101845290546001600160a01b038116808352600160a01b820467ffffffffffffffff1693830193909352600160e01b900460ff1615159281019290925215612f9b579392505050565b612f36565b505b6040517fdf2d9b4200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000600d6001612fe5606485613eca565b612fef9190613ff2565b81548110612fff57612fff613eec565b90600052602060002090600a91828204019190066003029054906101000a900460e81b9050919050565b600880546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600854600160a01b900460ff16156130c85760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610c03565b6008805460ff60a01b1916600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258612b033390565b61310f6016838361357c565b507f5ca9f750836b0b7efdace104f07b5c9f0df0650c0fd24f5163e99044ae36ea52828260405161314192919061420d565b60405180910390a15050565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a0290613182903390899088908890600401614221565b6020604051808303816000875af19250505080156131bd575060408051601f3d908101601f191682019092526131ba9181019061425d565b60015b613218573d8080156131eb576040519150601f19603f3d011682016040523d82523d6000602084013e6131f0565b606091505b508051613210576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490505b949350505050565b600e80546001600160a01b0319166001600160a01b0383169081179091556040519081527fffb40bfdfd246e95f543d08d9713c339f1d90fa9265e39b4f562f9011d7c919f906020016124b0565b6000546001600160a01b0385166132c7576040517f2e07630000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b836132fe576040517fb562e8dd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b038516600081815260056020908152604080832080547fffffffffffffffffffffffffffffffff00000000000000000000000000000000811667ffffffffffffffff8083168c0181169182176801000000000000000067ffffffffffffffff1990941690921783900481168c01811690920217909155858452600490925290912080546001600160e01b031916909217600160a01b4290921691909102179055808085018380156133bf57506001600160a01b0387163b15155b15613448575b60405182906001600160a01b038916906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a4613410600088848060010195508861314d565b61342d576040516368d2bf6b60e11b815260040160405180910390fd5b808214156133c557826000541461344357600080fd5b61348e565b5b6040516001830192906001600160a01b038916906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a480821415613449575b5060005561206c565b6040518061010001604052806008906020820280368337509192915050565b6040518060a001604052806000815260200160006001600160e81b03191681526020016134f6604051806040016040528060008152602001606081525090565b8152602001613503613497565b8152600060209091015290565b826008810192821561353e579160200282015b8281111561353e578235825591602001919060010190613523565b5061354a9291506135ef565b5090565b826008810192821561353e579160200282015b8281111561353e578251825591602001919060010190613561565b82805461358890613e4a565b90600052602060002090601f0160209004810192826135aa576000855561353e565b82601f106135c35782800160ff1982351617855561353e565b8280016001018555821561353e579182018281111561353e578235825591602001919060010190613523565b5b8082111561354a57600081556001016135f0565b806101008101831015610c5657600080fd5b600080610120838503121561362a57600080fd5b8235915061363b8460208501613604565b90509250929050565b80356001600160a01b038116811461365b57600080fd5b919050565b60006020828403121561367257600080fd5b6120fc82613644565b6001600160e01b031981168114610c1557600080fd5b6000602082840312156136a357600080fd5b81356120fc8161367b565b6000602082840312156136c057600080fd5b5035919050565b60005b838110156136e25781810151838201526020016136ca565b83811115611c995750506000910152565b6000815180845261370b8160208601602086016136c7565b601f01601f19169290920160200192915050565b80518252600060208201516040602085015261322e60408501826136f3565b6020815260006120fc602083018461371f565b6020815260006120fc60208301846136f3565b6000806040838503121561377757600080fd5b61378083613644565b946020939093013593505050565b6000806000606084860312156137a357600080fd5b6137ac84613644565b92506137ba60208501613644565b9150604084013590509250925092565b600080604083850312156137dd57600080fd5b50508035926020909101359150565b80356001600160e81b03198116811461365b57600080fd5b60006020828403121561381657600080fd5b6120fc826137ec565b60006040828403121561383157600080fd5b50919050565b6000806000610140848603121561384d57600080fd5b613856846137ec565b9250602084013567ffffffffffffffff81111561387257600080fd5b61387e8682870161381f565b92505061388e8560408601613604565b90509250925092565b8060005b6008811015611c9957815184526020938401939091019060010161389b565b6101008101610c568284613897565b600080600061014084860312156138df57600080fd5b833592506138f08560208601613604565b915061012084013567ffffffffffffffff81111561390d57600080fd5b6139198682870161381f565b9150509250925092565b600080600080610160858703121561393a57600080fd5b61394385613644565b9350613951602086016137ec565b9250604085013567ffffffffffffffff81111561396d57600080fd5b6139798782880161381f565b9250506139898660608701613604565b905092959194509250565b600080604083850312156139a757600080fd5b6139b083613644565b9150602083013567ffffffffffffffff8111156139cc57600080fd5b6139d88582860161381f565b9150509250929050565b600080602083850312156139f557600080fd5b823567ffffffffffffffff80821115613a0d57600080fd5b818501915085601f830112613a2157600080fd5b813581811115613a3057600080fd5b866020828501011115613a4257600080fd5b60209290920196919550909350505050565b6000610180825184526001600160e81b031960208401511660208501526040830151816040860152613a888286018261371f565b9150506060830151613a9d6060860182613897565b50608083015115156101608501528091505092915050565b6020815260006120fc6020830184613a54565b60008060408385031215613adb57600080fd5b82359150602083013567ffffffffffffffff8111156139cc57600080fd5b8015158114610c1557600080fd5b60008060408385031215613b1a57600080fd5b613b2383613644565b91506020830135613b3381613af9565b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715613b7d57613b7d613b3e565b604052919050565b600067ffffffffffffffff821115613b9f57613b9f613b3e565b50601f01601f191660200190565b6000613bc0613bbb84613b85565b613b54565b9050828152838383011115613bd457600080fd5b828260208301376000602084830101529392505050565b60008060008060808587031215613c0157600080fd5b613c0a85613644565b9350613c1860208601613644565b925060408501359150606085013567ffffffffffffffff811115613c3b57600080fd5b8501601f81018713613c4c57600080fd5b613c5b87823560208401613bad565b91505092959194509250565b60008060408385031215613c7a57600080fd5b8235915061363b60208401613644565b60008083601f840112613c9c57600080fd5b50813567ffffffffffffffff811115613cb457600080fd5b6020830191508360208260051b850101111561102757600080fd5b60008060008060408587031215613ce557600080fd5b843567ffffffffffffffff80821115613cfd57600080fd5b613d0988838901613c8a565b90965094506020870135915080821115613d2257600080fd5b50613d2f87828801613c8a565b95989497509550505050565b600060408284031215613d4d57600080fd5b6040516040810167ffffffffffffffff8282108183111715613d7157613d71613b3e565b81604052829350843583526020850135915080821115613d9057600080fd5b508301601f81018513613da257600080fd5b613db185823560208401613bad565b6020830152505092915050565b60008060408385031215613dd157600080fd5b823567ffffffffffffffff811115613de857600080fd5b613df485828601613d3b565b92505061363b60208401613644565b60008060408385031215613e1657600080fd5b613e1f83613644565b915061363b60208401613644565b600060208284031215613e3f57600080fd5b81516120fc81613af9565b600181811c90821680613e5e57607f821691505b6020821081141561383157634e487b7160e01b600052602260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000816000190483118215151615613eaf57613eaf613e7f565b500290565b634e487b7160e01b600052601260045260246000fd5b600082613ee757634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052603260045260246000fd5b600081613f1157613f11613e7f565b506000190190565b604081526000613f2c6040830185613a54565b8281036020840152613f3e81856136f3565b95945050505050565b600060208284031215613f5957600080fd5b815167ffffffffffffffff811115613f7057600080fd5b8201601f81018413613f8157600080fd5b8051613f8f613bbb82613b85565b818152856020838501011115613fa457600080fd5b613f3e8260208301602086016136c7565b6000600019821415613fc957613fc9613e7f565b5060010190565b6101008181019080848437506000815292915050565b6000610c563683613d3b565b60008282101561400457614004613e7f565b500390565b601f821115610fac57600081815260208120601f850160051c810160208610156140305750805b601f850160051c820191505b8181101561404f5782815560010161403c565b505050505050565b813581556001808201602080850135601e1986360301811261407857600080fd5b8501803567ffffffffffffffff81111561409157600080fd5b80360383830113156140a257600080fd5b6140b6816140b08654613e4a565b86614009565b6000601f8211600181146140ec57600083156140d457508382018501355b600019600385901b1c1916600184901b178655614145565b600086815260209020601f19841690835b8281101561411c578685018801358255938701939089019087016140fd565b508482101561413b5760001960f88660031b161c198785880101351681555b50508683881b0186555b505050505050505050565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b8035825260006020820135601e1983360301811261419657600080fd5b8201803567ffffffffffffffff8111156141af57600080fd5b8036038413156141be57600080fd5b60406020860152613f3e604086018260208501614150565b60006101208083526141ea81840186614179565b9150506120fc6020830184613897565b6020815260006120fc6020830184614179565b60208152600061322e602083018486614150565b60006001600160a01b0380871683528086166020840152508360408301526080606083015261425360808301846136f3565b9695505050505050565b60006020828403121561426f57600080fd5b81516120fc8161367b56fe4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572a264697066735822122056a252ccf28563de2a1004c229de1b1c8e3badb6f3f7831dcf407a477db5e02064736f6c634300080c0033000000000000000000000000a77b7d93e79f1e6b4f77fab29d9ef85733a3d44a000000000000000000000000db83e9fc46ae05e959c1aeede606769a01763a1b000000000000000000000000cf58fef11b494de046e30831c5a2bc364c83f81100000000000000000000000063a2368f4b509438ca90186cb1c15156713d583400000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000000320000000000000000000000000000000000000000000000000000000000000007ff0000000000000000000000000000000000000000000000000000000000000000ff0000000000000000000000000000000000000000000000000000000000000000ff0000000000000000000000000000000000000000000000000000000000ffffff000000000000000000000000000000000000000000000000000000000000ffff0000000000000000000000000000000000000000000000000000000000ff00ff0000000000000000000000000000000000000000000000000000000000ffff000000000000000000000000000000000000000000000000000000000000
Deployed Bytecode
0x60806040526004361061038f5760003560e01c806367fdfeef116101dc578063b88d4fde11610102578063d6c03c29116100a0578063e8a3d4851161006f578063e8a3d48514610b13578063e985e9c514610b28578063efdcd97414610b71578063f2fde38b14610b9157600080fd5b8063d6c03c2914610a8c578063dab3343d14610aac578063dfee225f14610abf578063e2ae5f1314610af357600080fd5b8063c56c4cf1116100dc578063c56c4cf114610a0c578063c87b56dd14610a2c578063cf0b5a5314610a4c578063d383580e14610a6c57600080fd5b8063b88d4fde146109b1578063bc4a349f146109d1578063c002d23d146109f157600080fd5b80638456cb591161017a57806395d89b411161014957806395d89b411461093c57806399fec99d14610951578063a22cb46514610971578063b3f006741461099157600080fd5b80638456cb59146108bc5780638da5cb5b146108d1578063938e3d7b146108ef57806393f667101461090f57600080fd5b80636e1ddb14116101b65780636e1ddb141461083a57806370a082311461085a578063715018a61461087a5780637392f7a41461088f57600080fd5b806367fdfeef146107ce57806368b27153146107e15780636df7d0451461080157600080fd5b806329ee566c116102c15780634209a2e11161025f57806355c8866e1161022e57806355c8866e146107425780635c975abb1461076f578063606951951461078e5780636352211e146107ae57600080fd5b80634209a2e1146106c257806342842e0e146106e257806342966c681461070257806347c0d3a51461072257600080fd5b80633af023cf1161029b5780633af023cf146106585780633ccfd60b146106785780633f27c9381461068d5780633f4ba83a146106ad57600080fd5b806329ee566c146105e35780632a55205a146105f95780632b42150f1461063857600080fd5b8063081812fc1161032e57806318160ddd1161030857806318160ddd1461053d5780631963ec741461055a578063239947291461059357806323b872dd146105c357600080fd5b8063081812fc146104a1578063095ea7b3146104d95780630e73c433146104f957600080fd5b806303fb31e81161036a57806303fb31e8146104125780630454153914610432578063055759d61461045257806306fdde031461047f57600080fd5b806298c0651461039b57806301611792146103bd57806301ffc9a7146103dd57600080fd5b3661039657005b600080fd5b3480156103a757600080fd5b506103bb6103b6366004613616565b610bb1565b005b3480156103c957600080fd5b506103bb6103d8366004613660565b610bbf565b3480156103e957600080fd5b506103fd6103f8366004613691565b610c18565b60405190151581526020015b60405180910390f35b34801561041e57600080fd5b506103bb61042d366004613660565b610c5c565b34801561043e57600080fd5b506103fd61044d3660046136ae565b610cad565b34801561045e57600080fd5b5061047261046d3660046136ae565b610d2c565b604051610409919061373e565b34801561048b57600080fd5b50610494610e02565b6040516104099190613751565b3480156104ad57600080fd5b506104c16104bc3660046136ae565b610e94565b6040516001600160a01b039091168152602001610409565b3480156104e557600080fd5b506103bb6104f4366004613764565b610ef1565b34801561050557600080fd5b5061052f610514366004613660565b6001600160a01b031660009081526015602052604090205490565b604051908152602001610409565b34801561054957600080fd5b50600154600054036000190161052f565b34801561056657600080fd5b5061057a6105753660046136ae565b610fb1565b6040516001600160e81b03199091168152602001610409565b34801561059f57600080fd5b5061057a6105ae3660046136ae565b60009081526012602052604090205460e81b90565b3480156105cf57600080fd5b506103bb6105de36600461378e565b610fe8565b3480156105ef57600080fd5b5061052f600f5481565b34801561060557600080fd5b506106196106143660046137ca565b610ff3565b604080516001600160a01b039093168352602083019190915201610409565b34801561064457600080fd5b506103fd610653366004613804565b61102e565b34801561066457600080fd5b506103fd610673366004613804565b61110e565b34801561068457600080fd5b506103bb611240565b34801561069957600080fd5b5061052f6106a8366004613837565b611321565b3480156106b957600080fd5b506103bb6114cf565b3480156106ce57600080fd5b506103bb6106dd3660046136ae565b611521565b3480156106ee57600080fd5b506103bb6106fd36600461378e565b611572565b34801561070e57600080fd5b506103bb61071d3660046136ae565b61158d565b34801561072e57600080fd5b506103bb61073d366004613660565b6115d8565b34801561074e57600080fd5b5061076261075d3660046136ae565b611629565b60405161040991906138ba565b34801561077b57600080fd5b50600854600160a01b900460ff166103fd565b34801561079a57600080fd5b506103bb6107a93660046138c9565b611672565b3480156107ba57600080fd5b506104c16107c93660046136ae565b611686565b61052f6107dc366004613923565b611698565b3480156107ed57600080fd5b50600b546104c1906001600160a01b031681565b34801561080d57600080fd5b506103fd61081c366004613660565b6001600160a01b031660009081526010602052604090205460ff1690565b34801561084657600080fd5b5061052f610855366004613994565b6117aa565b34801561086657600080fd5b5061052f610875366004613660565b6118de565b34801561088657600080fd5b506103bb611946565b34801561089b57600080fd5b5061052f6108aa366004613804565b600c6020526000908152604090205481565b3480156108c857600080fd5b506103bb611998565b3480156108dd57600080fd5b506008546001600160a01b03166104c1565b3480156108fb57600080fd5b506103bb61090a3660046139e2565b6119e8565b34801561091b57600080fd5b5061092f61092a3660046136ae565b611a3a565b6040516104099190613ab5565b34801561094857600080fd5b50610494611b86565b34801561095d57600080fd5b506103bb61096c366004613ac8565b611b95565b34801561097d57600080fd5b506103bb61098c366004613b07565b611b9f565b34801561099d57600080fd5b50600e546104c1906001600160a01b031681565b3480156109bd57600080fd5b506103bb6109cc366004613beb565b611c4e565b3480156109dd57600080fd5b506103bb6109ec366004613c67565b611c9f565b3480156109fd57600080fd5b5061052f662386f26fc1000081565b348015610a1857600080fd5b50600a546104c1906001600160a01b031681565b348015610a3857600080fd5b50610494610a473660046136ae565b611da1565b348015610a5857600080fd5b506104c1610a673660046136ae565b611ea3565b348015610a7857600080fd5b506103bb610a87366004613ccf565b611eed565b348015610a9857600080fd5b506103fd610aa7366004613dbe565b612073565b61052f610aba366004613837565b612103565b348015610acb57600080fd5b506104c17f000000000000000000000000a77b7d93e79f1e6b4f77fab29d9ef85733a3d44a81565b348015610aff57600080fd5b50610494610b0e3660046136ae565b61225a565b348015610b1f57600080fd5b50610494612298565b348015610b3457600080fd5b506103fd610b43366004613e03565b6001600160a01b03918216600090815260076020908152604080832093909416825291909152205460ff1690565b348015610b7d57600080fd5b506103bb610b8c366004613660565b6122a7565b348015610b9d57600080fd5b506103bb610bac366004613660565b6122f8565b610bbb82826123c5565b5050565b6008546001600160a01b03163314610c0c5760405162461bcd60e51b8152602060048201819052602482015260008051602061427b83398151915260448201526064015b60405180910390fd5b610c1581612460565b50565b60006001600160e01b031982167f2a55205a000000000000000000000000000000000000000000000000000000001480610c565750610c56826124bb565b92915050565b6008546001600160a01b03163314610ca45760405162461bcd60e51b8152602060048201819052602482015260008051602061427b8339815191526044820152606401610c03565b610c1581612556565b6000610cb882611ea3565b6001600160a01b031663b49cf083610ccf84611629565b6040518263ffffffff1660e01b8152600401610ceb91906138ba565b602060405180830381865afa158015610d08573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c569190613e2d565b6040805180820190915260008152606060208201526013600083815260200190815260200160002060405180604001604052908160008201548152602001600182018054610d7990613e4a565b80601f0160208091040260200160405190810160405280929190818152602001828054610da590613e4a565b8015610df25780601f10610dc757610100808354040283529160200191610df2565b820191906000526020600020905b815481529060010190602001808311610dd557829003601f168201915b5050505050815250509050919050565b606060028054610e1190613e4a565b80601f0160208091040260200160405190810160405280929190818152602001828054610e3d90613e4a565b8015610e8a5780601f10610e5f57610100808354040283529160200191610e8a565b820191906000526020600020905b815481529060010190602001808311610e6d57829003601f168201915b5050505050905090565b6000610e9f826125ad565b610ed5576040517fcf4700e400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b506000908152600660205260409020546001600160a01b031690565b6000610efc82611686565b9050806001600160a01b0316836001600160a01b03161415610f4a576040517f943f7b8c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b336001600160a01b03821614801590610f6a5750610f688133610b43565b155b15610fa1576040517fcfb3b94200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610fac8383836125e6565b505050565b600d8181548110610fc157600080fd5b90600052602060002090600a9182820401919006600302915054906101000a900460e81b81565b610fac838383612642565b600e54600f5460009182916001600160a01b03909116906103e8906110189086613e95565b6110229190613eca565b915091505b9250929050565b600080600d8054806020026020016040519081016040528092919081815260200182805480156110aa57602002820191906000526020600020906000905b82829054906101000a900460e81b6001600160e81b0319168152602001906003019060208260020104928301926001038202915080841161106c5790505b5050505050905060005b8151811015611104578181815181106110cf576110cf613eec565b60200260200101516001600160e81b031916846001600160e81b03191614156110fc575060019392505050565b6001016110b4565b5060009392505050565b60007fff0000000000000000000000000000000000000000000000000000000000000082821a60f81b811610801561118d57507fff000000000000000000000000000000000000000000000000000000000000008260011a60f81b7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916105b80156111e057507fff000000000000000000000000000000000000000000000000000000000000008260021a60f81b7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916105b156111ed57506000919050565b60005b600381101561123757600583826003811061120d5761120d613eec565b1a8161121b5761121b613eb4565b0660ff1660001461122f5750600092915050565b6001016111f0565b50600192915050565b600260095414156112935760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610c03565b6002600955600e5460405147916001600160a01b03169082156108fc029083906000818181858888f193505050501580156112d2573d6000803e3d6000fd5b50600e54604080516001600160a01b039092168252602082018390527f884edad9ce6fa2440d8a54cc123490eb96d2768479d49ff9c7366125a9424364910160405180910390a1506001600955565b600854600090600160a01b900460ff16156113715760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610c03565b336000908152601560205260409020546113b7576040517fc6560bec00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b836113c18161102e565b156113df5760405163fbab1fb560e01b815260040160405180910390fd5b600260095414156114325760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610c03565b600260095533600090815260156020526040812080549161145283613f02565b919050555061148c3386868660088060200260405190810160405280929190826008602002808284376000920191909152506128a1915050565b6040513381529092507fa5e115362873e922a883f86b46b316c5c67f4c221819b466c4384ec512d5353e9060200160405180910390a15060016009559392505050565b6008546001600160a01b031633146115175760405162461bcd60e51b8152602060048201819052602482015260008051602061427b8339815191526044820152606401610c03565b61151f612a7a565b565b6008546001600160a01b031633146115695760405162461bcd60e51b8152602060048201819052602482015260008051602061427b8339815191526044820152606401610c03565b610c1581612b20565b610fac83838360405180602001604052806000815250611c4e565b80600061159982611686565b90506001600160a01b03811633146115cf57604051630314482360e01b81526001600160a01b0382166004820152602401610c03565b610fac83612ba7565b6008546001600160a01b031633146116205760405162461bcd60e51b8152602060048201819052602482015260008051602061427b8339815191526044820152606401610c03565b610c1581612d61565b611631613497565b6000828152601160205260409081902081516101008101928390529160089082845b8154815260200190600101908083116116535750505050509050919050565b61167c83836123c5565b610fac8382612daf565b600061169182612e92565b5192915050565b6008546000906001600160a01b031633146116e35760405162461bcd60e51b8152602060048201819052602482015260008051602061427b8339815191526044820152606401610c03565b836116ed8161102e565b1561170b5760405163fbab1fb560e01b815260040160405180910390fd5b6002600954141561175e5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610c03565b600260098190555061179b8686868660088060200260405190810160405280929190826008602002808284376000920191909152506128a1915050565b60016009559695505050505050565b600854600090600160a01b900460ff16156117fa5760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610c03565b336001600160a01b037f000000000000000000000000a77b7d93e79f1e6b4f77fab29d9ef85733a3d44a161461185c576040517f50c2ce7700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600260095414156118af5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610c03565b60026009556118bc613497565b6118d1846118ca8535612fd4565b85846128a1565b6001600955949350505050565b60006001600160a01b038216611920576040517f8f4eb60400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b506001600160a01b031660009081526005602052604090205467ffffffffffffffff1690565b6008546001600160a01b0316331461198e5760405162461bcd60e51b8152602060048201819052602482015260008051602061427b8339815191526044820152606401610c03565b61151f6000613029565b6008546001600160a01b031633146119e05760405162461bcd60e51b8152602060048201819052602482015260008051602061427b8339815191526044820152606401610c03565b61151f61307b565b6008546001600160a01b03163314611a305760405162461bcd60e51b8152602060048201819052602482015260008051602061427b8339815191526044820152606401610c03565b610bbb8282613103565b611a426134b6565b600082815260126020908152604080832054815160a08101835286815260e89190911b6001600160e81b031981168285015286855260138452938290208251808401845281548152600182018054939594860194919391840191611aa590613e4a565b80601f0160208091040260200160405190810160405280929190818152602001828054611ad190613e4a565b8015611b1e5780601f10611af357610100808354040283529160200191611b1e565b820191906000526020600020905b815481529060010190602001808311611b0157829003601f168201915b5050509190925250505081526000858152601160209081526040918290208251610100810190935292019160088282826020028201915b815481526020019060010190808311611b555750505050508152602001611b7b8361102e565b151590529392505050565b606060038054610e1190613e4a565b610bbb8282612daf565b6001600160a01b038216331415611be2576040517fb06307db00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b3360008181526007602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b611c59848484612642565b6001600160a01b0383163b15158015611c7b5750611c798484848461314d565b155b15611c99576040516368d2bf6b60e11b815260040160405180910390fd5b50505050565b816000611cab82611686565b90506001600160a01b0381163314611ce157604051630314482360e01b81526001600160a01b0382166004820152602401610c03565b82611d04816001600160a01b031660009081526010602052604090205460ff1690565b611d3a576040517f0b089cc800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008581526014602090815260409182902080546001600160a01b0319166001600160a01b038816908117909155915191825286917f0412714352e33d866a34eba179cfea158c9ae1c0ce880a47c82203e04982fa60910160405180910390a25050505050565b6060611dac826125ad565b611e1e5760405162461bcd60e51b815260206004820152602860248201527f455243373231413a2055524920717565727920666f72206e6f6e65786973746560448201527f6e7420746f6b656e0000000000000000000000000000000000000000000000006064820152608401610c03565b600b546001600160a01b031663758fd3b0611e3884611a3a565b611e418561225a565b6040518363ffffffff1660e01b8152600401611e5e929190613f19565b600060405180830381865afa158015611e7b573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610c569190810190613f47565b6000818152601460205260408120546001600160a01b031615611edc57506000908152601460205260409020546001600160a01b031690565b5050600a546001600160a01b031690565b6008546001600160a01b03163314611f355760405162461bcd60e51b8152602060048201819052602482015260008051602061427b8339815191526044820152606401610c03565b828114611faa5760405162461bcd60e51b815260206004820152603560248201527f4e756d626572206f6620616464726573736573206d75737420657175616c206e60448201527f756d626572206f66206769667420636f756e74732e00000000000000000000006064820152608401610c03565b60005b8381101561206c576000858583818110611fc957611fc9613eec565b9050602002016020810190611fde9190613660565b90506000848484818110611ff457611ff4613eec565b6001600160a01b03851660008181526015602090815260409182902093810295909501359283905580519182529381018290529093507fcc11aa4f833763ae955850b83252573f6899830c2a3534cc518b530934eab52a9201905060405180910390a15050808061206490613fb5565b915050611fad565b5050505050565b6040517fa190905a0000000000000000000000000000000000000000000000000000000081526000906001600160a01b0383169063a190905a906120bb90869060040161373e565b602060405180830381865afa1580156120d8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120fc9190613e2d565b9392505050565b600854600090600160a01b900460ff16156121535760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610c03565b662386f26fc10000341015612194576040517fdf6774d200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8361219e8161102e565b156121bc5760405163fbab1fb560e01b815260040160405180910390fd5b6002600954141561220f5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610c03565b600260098190555061224c3386868660088060200260405190810160405280929190826008602002808284376000920191909152506128a1915050565b600160095595945050505050565b606061226582611ea3565b6001600160a01b031663236f684961227c84611a3a565b6040518263ffffffff1660e01b8152600401611e5e9190613ab5565b606060168054610e1190613e4a565b6008546001600160a01b031633146122ef5760405162461bcd60e51b8152602060048201819052602482015260008051602061427b8339815191526044820152606401610c03565b610c1581613236565b6008546001600160a01b031633146123405760405162461bcd60e51b8152602060048201819052602482015260008051602061427b8339815191526044820152606401610c03565b6001600160a01b0381166123bc5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610c03565b610c1581613029565b8160006123d182611686565b90506001600160a01b038116331461240757604051630314482360e01b81526001600160a01b0382166004820152602401610c03565b600084815260116020526040902061242190846008613510565b50837f5ef56a46647500d1e67b1206564fd79bbb630bbbff83d1c5d1cc34a05e68a9db846040516124529190613fd0565b60405180910390a250505050565b6001600160a01b038116600081815260106020908152604091829020805460ff1916600117905590519182527fccfb6d5a35afb66b62e211a6b680f56d40aa7ae5e716b47f7589b5274363f04591015b60405180910390a150565b60006001600160e01b031982167f80ac58cd00000000000000000000000000000000000000000000000000000000148061251e57506001600160e01b031982167f5b5e139f00000000000000000000000000000000000000000000000000000000145b80610c5657507f01ffc9a7000000000000000000000000000000000000000000000000000000006001600160e01b0319831614610c56565b61255f81612460565b600a80546001600160a01b0319166001600160a01b0383169081179091556040519081527f711396f4d40992395181cbcec9e686685ba0d465a31d036e7928be84b28da00b906020016124b0565b6000816001111580156125c1575060005482105b8015610c56575050600090815260046020526040902054600160e01b900460ff161590565b60008281526006602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b600061264d82612e92565b80519091506000906001600160a01b0316336001600160a01b0316148061267b5750815161267b9033610b43565b8061269657503361268b84610e94565b6001600160a01b0316145b9050806126cf576040517f59c896be00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b846001600160a01b031682600001516001600160a01b03161461271e576040517fa114810000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b03841661275e576040517fea553b3400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61276e60008484600001516125e6565b6001600160a01b038581166000908152600560209081526040808320805467ffffffffffffffff1980821667ffffffffffffffff92831660001901831617909255898616808652838620805493841693831660019081018416949094179055898652600490945282852080546001600160e01b031916909417600160a01b42909216919091021790925590860180835291205490911661285a5760005481101561285a578251600082815260046020908152604090912080549186015167ffffffffffffffff16600160a01b026001600160e01b03199092166001600160a01b03909316929092171790555b5082846001600160a01b0316866001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a461206c565b6001600160e81b031983166000908152600c602052604081205484906128c6816125ad565b15612900576040517f0ed69b8600000000000000000000000000000000000000000000000000000000815260048101829052602401610c03565b6129098261110e565b61293f576040517f1cf7e9c500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61294885613fe6565b600a546001600160a01b031661295e8282612073565b612986576040516326869c7160e21b81526001600160a01b0382166004820152602401610c03565b604080516000808252602082019092526129a4918b91600191613284565b60016000546129b39190613ff2565b6001600160e81b031989166000908152600c6020908152604080832084905583835260128252808320805462ffffff191660e88e901c179055601390915290209095508790612a028282614057565b50506000858152601160205260409020612a1e9087600861354e565b50876001600160e81b031916896001600160a01b0316867f3458520d9c172a3f8bf78dc94cabd55403f4d2c26053f94f0ec70da25b2ea9608a8a604051612a669291906141d6565b60405180910390a450505050949350505050565b600854600160a01b900460ff16612ad35760405162461bcd60e51b815260206004820152601460248201527f5061757361626c653a206e6f74207061757365640000000000000000000000006044820152606401610c03565b6008805460ff60a01b191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b6103e8811115612b725760405162461bcd60e51b815260206004820152600f60248201527f416d6f756e7420746f6f206869676800000000000000000000000000000000006044820152606401610c03565b600f8190556040518181527f2f08e8de3cfaac7a2ce6c3a223d1f4ce37e42d8970533248638ceba1b382cfeb906020016124b0565b6000612bb282612e92565b9050612bc460008383600001516125e6565b80516001600160a01b039081166000908152600560209081526040808320805467ffffffffffffffff19811667ffffffffffffffff9182166000190182161790915585518516845281842080547fffffffffffffffff0000000000000000ffffffffffffffffffffffffffffffff81167001000000000000000000000000000000009182900484166001908101851690920217909155865188865260049094528285208054600160e01b9588166001600160e01b031990911617600160a01b4290941693909302929092177fffffff00ffffffffffffffffffffffffffffffffffffffffffffffffffffffff16939093179055908501808352912054909116612d1957600054811015612d19578151600082815260046020908152604090912080549185015167ffffffffffffffff16600160a01b026001600160e01b03199092166001600160a01b03909316929092171790555b50805160405183916000916001600160a01b03909116907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a450506001805481019055565b600b80546001600160a01b0319166001600160a01b0383169081179091556040519081527f1e78374720f7ac1595d75f11f10ccc953103fcfd8adc75a397585edd2cf8e7cf906020016124b0565b816000612dbb82611686565b90506001600160a01b0381163314612df157604051630314482360e01b81526001600160a01b0382166004820152602401610c03565b612dfa83613fe6565b612e0385611ea3565b612e0d8282612073565b612e35576040516326869c7160e21b81526001600160a01b0382166004820152602401610c03565b60008681526013602052604090208590612e4f8282614057565b905050857f545aeaec5069b634e22f0f6400b3992a067aac2433083b5088f59373c64cbb5386604051612e8291906141fa565b60405180910390a2505050505050565b60408051606081018252600080825260208201819052918101919091528180600111158015612ec2575060005481105b15612fa257600081815260046020908152604091829020825160608101845290546001600160a01b0381168252600160a01b810467ffffffffffffffff1692820192909252600160e01b90910460ff16151591810182905290612fa05780516001600160a01b031615612f36579392505050565b5060001901600081815260046020908152604091829020825160608101845290546001600160a01b038116808352600160a01b820467ffffffffffffffff1693830193909352600160e01b900460ff1615159281019290925215612f9b579392505050565b612f36565b505b6040517fdf2d9b4200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000600d6001612fe5606485613eca565b612fef9190613ff2565b81548110612fff57612fff613eec565b90600052602060002090600a91828204019190066003029054906101000a900460e81b9050919050565b600880546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600854600160a01b900460ff16156130c85760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610c03565b6008805460ff60a01b1916600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258612b033390565b61310f6016838361357c565b507f5ca9f750836b0b7efdace104f07b5c9f0df0650c0fd24f5163e99044ae36ea52828260405161314192919061420d565b60405180910390a15050565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a0290613182903390899088908890600401614221565b6020604051808303816000875af19250505080156131bd575060408051601f3d908101601f191682019092526131ba9181019061425d565b60015b613218573d8080156131eb576040519150601f19603f3d011682016040523d82523d6000602084013e6131f0565b606091505b508051613210576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490505b949350505050565b600e80546001600160a01b0319166001600160a01b0383169081179091556040519081527fffb40bfdfd246e95f543d08d9713c339f1d90fa9265e39b4f562f9011d7c919f906020016124b0565b6000546001600160a01b0385166132c7576040517f2e07630000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b836132fe576040517fb562e8dd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b038516600081815260056020908152604080832080547fffffffffffffffffffffffffffffffff00000000000000000000000000000000811667ffffffffffffffff8083168c0181169182176801000000000000000067ffffffffffffffff1990941690921783900481168c01811690920217909155858452600490925290912080546001600160e01b031916909217600160a01b4290921691909102179055808085018380156133bf57506001600160a01b0387163b15155b15613448575b60405182906001600160a01b038916906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a4613410600088848060010195508861314d565b61342d576040516368d2bf6b60e11b815260040160405180910390fd5b808214156133c557826000541461344357600080fd5b61348e565b5b6040516001830192906001600160a01b038916906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a480821415613449575b5060005561206c565b6040518061010001604052806008906020820280368337509192915050565b6040518060a001604052806000815260200160006001600160e81b03191681526020016134f6604051806040016040528060008152602001606081525090565b8152602001613503613497565b8152600060209091015290565b826008810192821561353e579160200282015b8281111561353e578235825591602001919060010190613523565b5061354a9291506135ef565b5090565b826008810192821561353e579160200282015b8281111561353e578251825591602001919060010190613561565b82805461358890613e4a565b90600052602060002090601f0160209004810192826135aa576000855561353e565b82601f106135c35782800160ff1982351617855561353e565b8280016001018555821561353e579182018281111561353e578235825591602001919060010190613523565b5b8082111561354a57600081556001016135f0565b806101008101831015610c5657600080fd5b600080610120838503121561362a57600080fd5b8235915061363b8460208501613604565b90509250929050565b80356001600160a01b038116811461365b57600080fd5b919050565b60006020828403121561367257600080fd5b6120fc82613644565b6001600160e01b031981168114610c1557600080fd5b6000602082840312156136a357600080fd5b81356120fc8161367b565b6000602082840312156136c057600080fd5b5035919050565b60005b838110156136e25781810151838201526020016136ca565b83811115611c995750506000910152565b6000815180845261370b8160208601602086016136c7565b601f01601f19169290920160200192915050565b80518252600060208201516040602085015261322e60408501826136f3565b6020815260006120fc602083018461371f565b6020815260006120fc60208301846136f3565b6000806040838503121561377757600080fd5b61378083613644565b946020939093013593505050565b6000806000606084860312156137a357600080fd5b6137ac84613644565b92506137ba60208501613644565b9150604084013590509250925092565b600080604083850312156137dd57600080fd5b50508035926020909101359150565b80356001600160e81b03198116811461365b57600080fd5b60006020828403121561381657600080fd5b6120fc826137ec565b60006040828403121561383157600080fd5b50919050565b6000806000610140848603121561384d57600080fd5b613856846137ec565b9250602084013567ffffffffffffffff81111561387257600080fd5b61387e8682870161381f565b92505061388e8560408601613604565b90509250925092565b8060005b6008811015611c9957815184526020938401939091019060010161389b565b6101008101610c568284613897565b600080600061014084860312156138df57600080fd5b833592506138f08560208601613604565b915061012084013567ffffffffffffffff81111561390d57600080fd5b6139198682870161381f565b9150509250925092565b600080600080610160858703121561393a57600080fd5b61394385613644565b9350613951602086016137ec565b9250604085013567ffffffffffffffff81111561396d57600080fd5b6139798782880161381f565b9250506139898660608701613604565b905092959194509250565b600080604083850312156139a757600080fd5b6139b083613644565b9150602083013567ffffffffffffffff8111156139cc57600080fd5b6139d88582860161381f565b9150509250929050565b600080602083850312156139f557600080fd5b823567ffffffffffffffff80821115613a0d57600080fd5b818501915085601f830112613a2157600080fd5b813581811115613a3057600080fd5b866020828501011115613a4257600080fd5b60209290920196919550909350505050565b6000610180825184526001600160e81b031960208401511660208501526040830151816040860152613a888286018261371f565b9150506060830151613a9d6060860182613897565b50608083015115156101608501528091505092915050565b6020815260006120fc6020830184613a54565b60008060408385031215613adb57600080fd5b82359150602083013567ffffffffffffffff8111156139cc57600080fd5b8015158114610c1557600080fd5b60008060408385031215613b1a57600080fd5b613b2383613644565b91506020830135613b3381613af9565b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715613b7d57613b7d613b3e565b604052919050565b600067ffffffffffffffff821115613b9f57613b9f613b3e565b50601f01601f191660200190565b6000613bc0613bbb84613b85565b613b54565b9050828152838383011115613bd457600080fd5b828260208301376000602084830101529392505050565b60008060008060808587031215613c0157600080fd5b613c0a85613644565b9350613c1860208601613644565b925060408501359150606085013567ffffffffffffffff811115613c3b57600080fd5b8501601f81018713613c4c57600080fd5b613c5b87823560208401613bad565b91505092959194509250565b60008060408385031215613c7a57600080fd5b8235915061363b60208401613644565b60008083601f840112613c9c57600080fd5b50813567ffffffffffffffff811115613cb457600080fd5b6020830191508360208260051b850101111561102757600080fd5b60008060008060408587031215613ce557600080fd5b843567ffffffffffffffff80821115613cfd57600080fd5b613d0988838901613c8a565b90965094506020870135915080821115613d2257600080fd5b50613d2f87828801613c8a565b95989497509550505050565b600060408284031215613d4d57600080fd5b6040516040810167ffffffffffffffff8282108183111715613d7157613d71613b3e565b81604052829350843583526020850135915080821115613d9057600080fd5b508301601f81018513613da257600080fd5b613db185823560208401613bad565b6020830152505092915050565b60008060408385031215613dd157600080fd5b823567ffffffffffffffff811115613de857600080fd5b613df485828601613d3b565b92505061363b60208401613644565b60008060408385031215613e1657600080fd5b613e1f83613644565b915061363b60208401613644565b600060208284031215613e3f57600080fd5b81516120fc81613af9565b600181811c90821680613e5e57607f821691505b6020821081141561383157634e487b7160e01b600052602260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000816000190483118215151615613eaf57613eaf613e7f565b500290565b634e487b7160e01b600052601260045260246000fd5b600082613ee757634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052603260045260246000fd5b600081613f1157613f11613e7f565b506000190190565b604081526000613f2c6040830185613a54565b8281036020840152613f3e81856136f3565b95945050505050565b600060208284031215613f5957600080fd5b815167ffffffffffffffff811115613f7057600080fd5b8201601f81018413613f8157600080fd5b8051613f8f613bbb82613b85565b818152856020838501011115613fa457600080fd5b613f3e8260208301602086016136c7565b6000600019821415613fc957613fc9613e7f565b5060010190565b6101008181019080848437506000815292915050565b6000610c563683613d3b565b60008282101561400457614004613e7f565b500390565b601f821115610fac57600081815260208120601f850160051c810160208610156140305750805b601f850160051c820191505b8181101561404f5782815560010161403c565b505050505050565b813581556001808201602080850135601e1986360301811261407857600080fd5b8501803567ffffffffffffffff81111561409157600080fd5b80360383830113156140a257600080fd5b6140b6816140b08654613e4a565b86614009565b6000601f8211600181146140ec57600083156140d457508382018501355b600019600385901b1c1916600184901b178655614145565b600086815260209020601f19841690835b8281101561411c578685018801358255938701939089019087016140fd565b508482101561413b5760001960f88660031b161c198785880101351681555b50508683881b0186555b505050505050505050565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b8035825260006020820135601e1983360301811261419657600080fd5b8201803567ffffffffffffffff8111156141af57600080fd5b8036038413156141be57600080fd5b60406020860152613f3e604086018260208501614150565b60006101208083526141ea81840186614179565b9150506120fc6020830184613897565b6020815260006120fc6020830184614179565b60208152600061322e602083018486614150565b60006001600160a01b0380871683528086166020840152508360408301526080606083015261425360808301846136f3565b9695505050505050565b60006020828403121561426f57600080fd5b81516120fc8161367b56fe4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572a264697066735822122056a252ccf28563de2a1004c229de1b1c8e3badb6f3f7831dcf407a477db5e02064736f6c634300080c0033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000a77b7d93e79f1e6b4f77fab29d9ef85733a3d44a000000000000000000000000db83e9fc46ae05e959c1aeede606769a01763a1b000000000000000000000000cf58fef11b494de046e30831c5a2bc364c83f81100000000000000000000000063a2368f4b509438ca90186cb1c15156713d583400000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000000320000000000000000000000000000000000000000000000000000000000000007ff0000000000000000000000000000000000000000000000000000000000000000ff0000000000000000000000000000000000000000000000000000000000000000ff0000000000000000000000000000000000000000000000000000000000ffffff000000000000000000000000000000000000000000000000000000000000ffff0000000000000000000000000000000000000000000000000000000000ff00ff0000000000000000000000000000000000000000000000000000000000ffff000000000000000000000000000000000000000000000000000000000000
-----Decoded View---------------
Arg [0] : _capsulesTypeface (address): 0xA77b7D93E79f1E6B4f77FaB29d9ef85733A3D44A
Arg [1] : _defaultRenderer (address): 0xdB83e9fc46ae05e959C1aeedE606769A01763a1b
Arg [2] : _capsuleMetadata (address): 0xCf58FEF11b494De046E30831c5a2bC364C83F811
Arg [3] : _feeReceiver (address): 0x63A2368F4B509438ca90186cb1C15156713D5834
Arg [4] : _pureColors (bytes3[]): System.Byte[],System.Byte[],System.Byte[],System.Byte[],System.Byte[],System.Byte[],System.Byte[]
Arg [5] : _royalty (uint256): 50
-----Encoded View---------------
14 Constructor Arguments found :
Arg [0] : 000000000000000000000000a77b7d93e79f1e6b4f77fab29d9ef85733a3d44a
Arg [1] : 000000000000000000000000db83e9fc46ae05e959c1aeede606769a01763a1b
Arg [2] : 000000000000000000000000cf58fef11b494de046e30831c5a2bc364c83f811
Arg [3] : 00000000000000000000000063a2368f4b509438ca90186cb1c15156713d5834
Arg [4] : 00000000000000000000000000000000000000000000000000000000000000c0
Arg [5] : 0000000000000000000000000000000000000000000000000000000000000032
Arg [6] : 0000000000000000000000000000000000000000000000000000000000000007
Arg [7] : ff00000000000000000000000000000000000000000000000000000000000000
Arg [8] : 00ff000000000000000000000000000000000000000000000000000000000000
Arg [9] : 0000ff0000000000000000000000000000000000000000000000000000000000
Arg [10] : ffffff0000000000000000000000000000000000000000000000000000000000
Arg [11] : 00ffff0000000000000000000000000000000000000000000000000000000000
Arg [12] : ff00ff0000000000000000000000000000000000000000000000000000000000
Arg [13] : ffff000000000000000000000000000000000000000000000000000000000000
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.