Overview
ETH Balance
0 ETH
ETH Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 8 from a total of 8 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Transfer Ownersh... | 817983 | 373 days ago | IN | 0 ETH | 0.00000002 | ||||
Add Accessories | 817978 | 373 days ago | IN | 0 ETH | 0.00000007 | ||||
Add Glasses | 817976 | 373 days ago | IN | 0 ETH | 0.00000022 | ||||
Add Eyes | 817974 | 373 days ago | IN | 0 ETH | 0.00000019 | ||||
Add Heads | 817972 | 373 days ago | IN | 0 ETH | 0.00000066 | ||||
Add Bodies | 817969 | 373 days ago | IN | 0 ETH | 0.00000002 | ||||
Set Palette | 817967 | 373 days ago | IN | 0 ETH | 0.00002604 | ||||
Add Many Backgro... | 817965 | 373 days ago | IN | 0 ETH | 0.00000012 |
Loading...
Loading
This contract may be a proxy contract. Click on More Options and select Is this a proxy? to confirm and enable the "Read as Proxy" & "Write as Proxy" tabs.
Contract Name:
PlutocatsDescriptor
Compiler Version
v0.8.19+commit.7dd6d404
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: GPL-3.0 /// @title Plutocats NFT Descriptor /// Includes modifications for new traits /// Based on Nouns https://github.com/nounsDAO/nouns-monorepo/blob/master/packages/nouns-contracts/contracts/NounsDescriptorV2.sol pragma solidity >=0.8.0; import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol"; import {Strings} from "@openzeppelin/contracts/utils/Strings.sol"; import {NFTDescriptorV2} from "nouns-monorepo/packages/nouns-contracts/contracts/libs/NFTDescriptorV2.sol"; import {ISVGRenderer} from "nouns-monorepo/packages/nouns-contracts/contracts/interfaces/ISVGRenderer.sol"; import {IPlutocatsArt} from "./interfaces/IPlutocatsArt.sol"; import {IPlutocatsDescriptor} from "./interfaces/IPlutocatsDescriptor.sol"; import {IPlutocatsSeeder} from "./interfaces/IPlutocatsSeeder.sol"; import {IInflator} from "nouns-monorepo/packages/nouns-contracts/contracts/interfaces/IInflator.sol"; contract PlutocatsDescriptor is IPlutocatsDescriptor, Ownable { using Strings for uint256; // https://creativecommons.org/publicdomain/zero/1.0/legalcode.txt // solhint-disable-next-line bytes32 constant COPYRIGHT_CC0_1_0_UNIVERSAL_LICENSE = 0xa2010f343487d3f7618affe54f789f5487602331c0a8d03f49e9a7c547cf0499; /// @notice The contract responsible for holding compressed art IPlutocatsArt public art; /// @notice The contract responsible for constructing SVGs ISVGRenderer public renderer; /// @notice Whether or not new parts can be added bool public override arePartsLocked; /// @notice Whether or not `tokenURI` should be returned as a data URI (Default: true) bool public override isDataURIEnabled = true; /// @notice Base URI, used when isDataURIEnabled is false string public override baseURI; /** * @notice Require that the parts have not been locked. */ modifier whenPartsNotLocked() { require(!arePartsLocked, "Parts are locked"); _; } constructor(IPlutocatsArt _art, ISVGRenderer _renderer) { art = _art; renderer = _renderer; } /** * @notice Set the art contract. * @dev Only callable by the owner when not locked. */ function setArt(IPlutocatsArt _art) external onlyOwner whenPartsNotLocked { art = _art; emit ArtUpdated(_art); } /** * @notice Set the SVG renderer. * @dev Only callable by the owner. */ function setRenderer(ISVGRenderer _renderer) external onlyOwner { renderer = _renderer; emit RendererUpdated(_renderer); } /** * @notice Set the art contract's `descriptor`. * @param descriptor the address to set. * @dev Only callable by the owner. */ function setArtDescriptor(address descriptor) external onlyOwner { art.setDescriptor(descriptor); } /** * @notice Set the art contract's `inflator`. * @param inflator the address to set. * @dev Only callable by the owner. */ function setArtInflator(IInflator inflator) external onlyOwner { art.setInflator(inflator); } /** * @notice Get the number of available `backgrounds`. */ function backgroundCount() external view override returns (uint256) { return art.backgroundCount(); } /** * @notice Get the number of available `bodies`. */ function bodyCount() external view override returns (uint256) { return art.bodyCount(); } /** * @notice Get the number of available `accessories`. */ function accessoryCount() external view override returns (uint256) { return art.accessoryCount(); } /** * @notice Get the number of available `heads`. */ function headCount() external view override returns (uint256) { return art.headCount(); } /** * @notice Get the number of available `eyes`. */ function eyesCount() external view returns (uint256) { return art.eyesCount(); } /** * @notice Get the number of available `glasses`. */ function glassesCount() external view override returns (uint256) { return art.glassesCount(); } /** * @notice Batch add backgrounds. * @dev This function can only be called by the owner when not locked. */ function addManyBackgrounds(string[] calldata _backgrounds) external override onlyOwner whenPartsNotLocked { art.addManyBackgrounds(_backgrounds); } /** * @notice Add a background. * @dev This function can only be called by the owner when not locked. */ function addBackground(string calldata _background) external override onlyOwner whenPartsNotLocked { art.addBackground(_background); } /** * @notice Update a single color palette. This function can be used to * add a new color palette or update an existing palette. * @param paletteIndex the identifier of this palette * @param palette byte array of colors. every 3 bytes represent an RGB color. max length: 256 * 3 = 768 * @dev This function can only be called by the owner when not locked. */ function setPalette(uint8 paletteIndex, bytes calldata palette) external override onlyOwner whenPartsNotLocked { art.setPalette(paletteIndex, palette); } /** * @notice Add a batch of body images. * @param encodedCompressed bytes created by taking a string array of RLE-encoded images, abi encoding it as a bytes array, * and finally compressing it using deflate. * @param decompressedLength the size in bytes the images bytes were prior to compression; required input for Inflate. * @param imageCount the number of images in this batch; used when searching for images among batches. * @dev This function can only be called by the owner when not locked. */ function addBodies(bytes calldata encodedCompressed, uint80 decompressedLength, uint16 imageCount) external override onlyOwner whenPartsNotLocked { art.addBodies(encodedCompressed, decompressedLength, imageCount); } /** * @notice Add a batch of accessory images. * @param encodedCompressed bytes created by taking a string array of RLE-encoded images, abi encoding it as a bytes array, * and finally compressing it using deflate. * @param decompressedLength the size in bytes the images bytes were prior to compression; required input for Inflate. * @param imageCount the number of images in this batch; used when searching for images among batches. * @dev This function can only be called by the owner when not locked. */ function addAccessories(bytes calldata encodedCompressed, uint80 decompressedLength, uint16 imageCount) external override onlyOwner whenPartsNotLocked { art.addAccessories(encodedCompressed, decompressedLength, imageCount); } /** * @notice Add a batch of head images. * @param encodedCompressed bytes created by taking a string array of RLE-encoded images, abi encoding it as a bytes array, * and finally compressing it using deflate. * @param decompressedLength the size in bytes the images bytes were prior to compression; required input for Inflate. * @param imageCount the number of images in this batch; used when searching for images among batches. * @dev This function can only be called by the owner when not locked. */ function addHeads(bytes calldata encodedCompressed, uint80 decompressedLength, uint16 imageCount) external override onlyOwner whenPartsNotLocked { art.addHeads(encodedCompressed, decompressedLength, imageCount); } /** * @notice Add a batch of eyes images. * @param encodedCompressed bytes created by taking a string array of RLE-encoded images, abi encoding it as a bytes array, * and finally compressing it using deflate. * @param decompressedLength the size in bytes the images bytes were prior to compression; required input for Inflate. * @param imageCount the number of images in this batch; used when searching for images among batches. * @dev This function can only be called by the owner when not locked. */ function addEyes(bytes calldata encodedCompressed, uint80 decompressedLength, uint16 imageCount) external override onlyOwner whenPartsNotLocked { art.addEyes(encodedCompressed, decompressedLength, imageCount); } /** * @notice Add a batch of glasses images. * @param encodedCompressed bytes created by taking a string array of RLE-encoded images, abi encoding it as a bytes array, * and finally compressing it using deflate. * @param decompressedLength the size in bytes the images bytes were prior to compression; required input for Inflate. * @param imageCount the number of images in this batch; used when searching for images among batches. * @dev This function can only be called by the owner when not locked. */ function addGlasses(bytes calldata encodedCompressed, uint80 decompressedLength, uint16 imageCount) external override onlyOwner whenPartsNotLocked { art.addGlasses(encodedCompressed, decompressedLength, imageCount); } /** * @notice Update a single color palette. This function can be used to * add a new color palette or update an existing palette. This function does not check for data length validity * (len <= 768, len % 3 == 0). * @param paletteIndex the identifier of this palette * @param pointer the address of the contract holding the palette bytes. every 3 bytes represent an RGB color. * max length: 256 * 3 = 768. * @dev This function can only be called by the owner when not locked. */ function setPalettePointer(uint8 paletteIndex, address pointer) external override onlyOwner whenPartsNotLocked { art.setPalettePointer(paletteIndex, pointer); } /** * @notice Add a batch of body images from an existing storage contract. * @param pointer the address of a contract where the image batch was stored using SSTORE2. The data * format is expected to be like {encodedCompressed}: bytes created by taking a string array of * RLE-encoded images, abi encoding it as a bytes array, and finally compressing it using deflate. * @param decompressedLength the size in bytes the images bytes were prior to compression; required input for Inflate. * @param imageCount the number of images in this batch; used when searching for images among batches. * @dev This function can only be called by the owner when not locked. */ function addBodiesFromPointer(address pointer, uint80 decompressedLength, uint16 imageCount) external override onlyOwner whenPartsNotLocked { art.addBodiesFromPointer(pointer, decompressedLength, imageCount); } /** * @notice Add a batch of accessory images from an existing storage contract. * @param pointer the address of a contract where the image batch was stored using SSTORE2. The data * format is expected to be like {encodedCompressed}: bytes created by taking a string array of * RLE-encoded images, abi encoding it as a bytes array, and finally compressing it using deflate. * @param decompressedLength the size in bytes the images bytes were prior to compression; required input for Inflate. * @param imageCount the number of images in this batch; used when searching for images among batches. * @dev This function can only be called by the owner when not locked. */ function addAccessoriesFromPointer(address pointer, uint80 decompressedLength, uint16 imageCount) external override onlyOwner whenPartsNotLocked { art.addAccessoriesFromPointer(pointer, decompressedLength, imageCount); } /** * @notice Add a batch of head images from an existing storage contract. * @param pointer the address of a contract where the image batch was stored using SSTORE2. The data * format is expected to be like {encodedCompressed}: bytes created by taking a string array of * RLE-encoded images, abi encoding it as a bytes array, and finally compressing it using deflate. * @param decompressedLength the size in bytes the images bytes were prior to compression; required input for Inflate. * @param imageCount the number of images in this batch; used when searching for images among batches. * @dev This function can only be called by the owner when not locked. */ function addHeadsFromPointer(address pointer, uint80 decompressedLength, uint16 imageCount) external override onlyOwner whenPartsNotLocked { art.addHeadsFromPointer(pointer, decompressedLength, imageCount); } /** * @notice Add a batch of eyes images from an existing storage contract. * @param pointer the address of a contract where the image batch was stored using SSTORE2. The data * format is expected to be like {encodedCompressed}: bytes created by taking a string array of * RLE-encoded images, abi encoding it as a bytes array, and finally compressing it using deflate. * @param decompressedLength the size in bytes the images bytes were prior to compression; required input for Inflate. * @param imageCount the number of images in this batch; used when searching for images among batches. * @dev This function can only be called by the owner when not locked. */ function addEyesFromPointer(address pointer, uint80 decompressedLength, uint16 imageCount) external override onlyOwner whenPartsNotLocked { art.addEyesFromPointer(pointer, decompressedLength, imageCount); } /** * @notice Add a batch of glasses images from an existing storage contract. * @param pointer the address of a contract where the image batch was stored using SSTORE2. The data * format is expected to be like {encodedCompressed}: bytes created by taking a string array of * RLE-encoded images, abi encoding it as a bytes array, and finally compressing it using deflate. * @param decompressedLength the size in bytes the images bytes were prior to compression; required input for Inflate. * @param imageCount the number of images in this batch; used when searching for images among batches. * @dev This function can only be called by the owner when not locked. */ function addGlassesFromPointer(address pointer, uint80 decompressedLength, uint16 imageCount) external override onlyOwner whenPartsNotLocked { art.addGlassesFromPointer(pointer, decompressedLength, imageCount); } /** * @notice Get a background color by ID. * @param index the index of the background. * @return string the RGB hex value of the background. */ function backgrounds(uint256 index) public view override returns (string memory) { return art.backgrounds(index); } /** * @notice Get a head image by ID. * @param index the index of the head. * @return bytes the RLE-encoded bytes of the image. */ function heads(uint256 index) public view override returns (bytes memory) { return art.heads(index); } /** * @notice Get a body image by ID. * @param index the index of the body. * @return bytes the RLE-encoded bytes of the image. */ function bodies(uint256 index) public view override returns (bytes memory) { return art.bodies(index); } /** * @notice Get an accessory image by ID. * @param index the index of the accessory. * @return bytes the RLE-encoded bytes of the image. */ function accessories(uint256 index) public view override returns (bytes memory) { return art.accessories(index); } /** * @notice Get a eyes image by ID. * @param index the index of the glasses. * @return bytes the RLE-encoded bytes of the image. */ function eyes(uint256 index) public view override returns (bytes memory) { return art.eyes(index); } /** * @notice Get a glasses image by ID. * @param index the index of the glasses. * @return bytes the RLE-encoded bytes of the image. */ function glasses(uint256 index) public view override returns (bytes memory) { return art.glasses(index); } /** * @notice Get a color palette by ID. * @param index the index of the palette. * @return bytes the palette bytes, where every 3 consecutive bytes represent a color in RGB format. */ function palettes(uint8 index) public view override returns (bytes memory) { return art.palettes(index); } /** * @notice Lock all parts. * @dev This cannot be reversed and can only be called by the owner when not locked. */ function lockParts() external override onlyOwner whenPartsNotLocked { arePartsLocked = true; emit PartsLocked(); } /** * @notice Toggle a boolean value which determines if `tokenURI` returns a data URI * or an HTTP URL. * @dev This can only be called by the owner. */ function toggleDataURIEnabled() external override onlyOwner { bool enabled = !isDataURIEnabled; isDataURIEnabled = enabled; emit DataURIToggled(enabled); } /** * @notice Set the base URI for all token IDs. It is automatically * added as a prefix to the value returned in {tokenURI}, or to the * token ID if {tokenURI} is empty. * @dev This can only be called by the owner. */ function setBaseURI(string calldata _baseURI) external override onlyOwner { baseURI = _baseURI; emit BaseURIUpdated(_baseURI); } /** * @notice Given a token ID and seed, construct a token URI for Plutocat * @dev The returned value may be a base64 encoded data URI or an API URL. */ function tokenURI(uint256 tokenId, IPlutocatsSeeder.Seed memory seed) external view override returns (string memory) { if (isDataURIEnabled) { return dataURI(tokenId, seed); } return string(abi.encodePacked(baseURI, tokenId.toString())); } /** * @notice Given a token ID and seed, construct a base64 encoded data URI for an official Plutocat. */ function dataURI(uint256 tokenId, IPlutocatsSeeder.Seed memory seed) public view override returns (string memory) { string memory catId = tokenId.toString(); string memory name = string(abi.encodePacked("Plutocat ", catId)); string memory description = string(abi.encodePacked("Plutocat ", catId, " is a member of the Plutocats club")); return genericDataURI(name, description, seed); } /** * @notice Given a name, description, and seed, construct a base64 encoded data URI. */ function genericDataURI(string memory name, string memory description, IPlutocatsSeeder.Seed memory seed) public view override returns (string memory) { NFTDescriptorV2.TokenURIParams memory params = NFTDescriptorV2.TokenURIParams({ name: name, description: description, parts: getPartsForSeed(seed), background: art.backgrounds(seed.background) }); return NFTDescriptorV2.constructTokenURI(renderer, params); } /** * @notice Given a seed, construct a base64 encoded SVG image. */ function generateSVGImage(IPlutocatsSeeder.Seed memory seed) external view override returns (string memory) { ISVGRenderer.SVGParams memory params = ISVGRenderer.SVGParams({parts: getPartsForSeed(seed), background: art.backgrounds(seed.background)}); return NFTDescriptorV2.generateSVGImage(renderer, params); } /** * @notice Get all parts for the passed `seed`. */ function getPartsForSeed(IPlutocatsSeeder.Seed memory seed) public view returns (ISVGRenderer.Part[] memory) { bytes memory body = art.bodies(seed.body); bytes memory accessory = art.accessories(seed.accessory); bytes memory head = art.heads(seed.head); bytes memory eyes_ = art.eyes(seed.eyes); bytes memory glasses_ = art.glasses(seed.glasses); ISVGRenderer.Part[] memory parts = new ISVGRenderer.Part[](5); parts[0] = ISVGRenderer.Part({image: body, palette: _getPalette(body)}); parts[1] = ISVGRenderer.Part({image: accessory, palette: _getPalette(accessory)}); parts[2] = ISVGRenderer.Part({image: head, palette: _getPalette(head)}); parts[3] = ISVGRenderer.Part({image: eyes_, palette: _getPalette(eyes_)}); parts[4] = ISVGRenderer.Part({image: glasses_, palette: _getPalette(glasses_)}); return parts; } /** * @notice Get the color palette pointer for the passed part. */ function _getPalette(bytes memory part) private view returns (bytes memory) { return art.palettes(uint8(part[0])); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor () { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), 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 { emit OwnershipTransferred(_owner, address(0)); _owner = 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"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /* * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691 return msg.data; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev String operations. */ library Strings { bytes16 private constant alphabet = "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] = alphabet[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0; /// @title Base64 /// @author Brecht Devos - <[email protected]> /// @notice Provides functions for encoding/decoding base64 library Base64 { string internal constant TABLE_ENCODE = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; bytes internal constant TABLE_DECODE = hex"0000000000000000000000000000000000000000000000000000000000000000" hex"00000000000000000000003e0000003f3435363738393a3b3c3d000000000000" hex"00000102030405060708090a0b0c0d0e0f101112131415161718190000000000" hex"001a1b1c1d1e1f202122232425262728292a2b2c2d2e2f303132330000000000"; function encode(bytes memory data) internal pure returns (string memory) { if (data.length == 0) return ''; // load the table into memory string memory table = TABLE_ENCODE; // multiply by 4/3 rounded up uint256 encodedLen = 4 * ((data.length + 2) / 3); // add some extra buffer at the end required for the writing string memory result = new string(encodedLen + 32); assembly { // set the actual output length mstore(result, encodedLen) // prepare the lookup table let tablePtr := add(table, 1) // input ptr let dataPtr := data let endPtr := add(dataPtr, mload(data)) // result ptr, jump over length let resultPtr := add(result, 32) // run over the input, 3 bytes at a time for {} lt(dataPtr, endPtr) {} { // read 3 bytes dataPtr := add(dataPtr, 3) let input := mload(dataPtr) // write 4 characters mstore8(resultPtr, mload(add(tablePtr, and(shr(18, input), 0x3F)))) resultPtr := add(resultPtr, 1) mstore8(resultPtr, mload(add(tablePtr, and(shr(12, input), 0x3F)))) resultPtr := add(resultPtr, 1) mstore8(resultPtr, mload(add(tablePtr, and(shr( 6, input), 0x3F)))) resultPtr := add(resultPtr, 1) mstore8(resultPtr, mload(add(tablePtr, and( input, 0x3F)))) resultPtr := add(resultPtr, 1) } // padding with '=' switch mod(mload(data), 3) case 1 { mstore(sub(resultPtr, 2), shl(240, 0x3d3d)) } case 2 { mstore(sub(resultPtr, 1), shl(248, 0x3d)) } } return result; } function decode(string memory _data) internal pure returns (bytes memory) { bytes memory data = bytes(_data); if (data.length == 0) return new bytes(0); require(data.length % 4 == 0, "invalid base64 decoder input"); // load the table into memory bytes memory table = TABLE_DECODE; // every 4 characters represent 3 bytes uint256 decodedLen = (data.length / 4) * 3; // add some extra buffer at the end required for the writing bytes memory result = new bytes(decodedLen + 32); assembly { // padding with '=' let lastBytes := mload(add(data, mload(data))) if eq(and(lastBytes, 0xFF), 0x3d) { decodedLen := sub(decodedLen, 1) if eq(and(lastBytes, 0xFFFF), 0x3d3d) { decodedLen := sub(decodedLen, 1) } } // set the actual output length mstore(result, decodedLen) // prepare the lookup table let tablePtr := add(table, 1) // input ptr let dataPtr := data let endPtr := add(dataPtr, mload(data)) // result ptr, jump over length let resultPtr := add(result, 32) // run over the input, 4 characters at a time for {} lt(dataPtr, endPtr) {} { // read 4 characters dataPtr := add(dataPtr, 4) let input := mload(dataPtr) // write 3 bytes let output := add( add( shl(18, and(mload(add(tablePtr, and(shr(24, input), 0xFF))), 0xFF)), shl(12, and(mload(add(tablePtr, and(shr(16, input), 0xFF))), 0xFF))), add( shl( 6, and(mload(add(tablePtr, and(shr( 8, input), 0xFF))), 0xFF)), and(mload(add(tablePtr, and( input , 0xFF))), 0xFF) ) ) mstore(resultPtr, shl(232, output)) resultPtr := add(resultPtr, 3) } } return result; } }
// SPDX-License-Identifier: GPL-3.0 /// @title Interface for Inflator /********************************* * ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ * * ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ * * ░░░░░░█████████░░█████████░░░ * * ░░░░░░██░░░████░░██░░░████░░░ * * ░░██████░░░████████░░░████░░░ * * ░░██░░██░░░████░░██░░░████░░░ * * ░░██░░██░░░████░░██░░░████░░░ * * ░░░░░░█████████░░█████████░░░ * * ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ * * ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ * *********************************/ pragma solidity ^0.8.6; import { Inflate } from '../libs/Inflate.sol'; interface IInflator { function puff(bytes memory source, uint256 destlen) external pure returns (Inflate.ErrorCode, bytes memory); }
// SPDX-License-Identifier: GPL-3.0 /// @title Interface for SVGRenderer /********************************* * ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ * * ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ * * ░░░░░░█████████░░█████████░░░ * * ░░░░░░██░░░████░░██░░░████░░░ * * ░░██████░░░████████░░░████░░░ * * ░░██░░██░░░████░░██░░░████░░░ * * ░░██░░██░░░████░░██░░░████░░░ * * ░░░░░░█████████░░█████████░░░ * * ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ * * ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ * *********************************/ pragma solidity ^0.8.6; interface ISVGRenderer { struct Part { bytes image; bytes palette; } struct SVGParams { Part[] parts; string background; } function generateSVG(SVGParams memory params) external view returns (string memory svg); function generateSVGPart(Part memory part) external view returns (string memory partialSVG); function generateSVGParts(Part[] memory parts) external view returns (string memory partialSVG); }
// SPDX-License-Identifier: Apache-2.0 pragma solidity >=0.8.0 <0.9.0; /// @notice Based on https://github.com/madler/zlib/blob/master/contrib/puff /// @dev Modified the original code for gas optimizations /// 1. Disable overflow/underflow checks /// 2. Chunk some loop iterations library Inflate { // Maximum bits in a code uint256 constant MAXBITS = 15; // Maximum number of literal/length codes uint256 constant MAXLCODES = 286; // Maximum number of distance codes uint256 constant MAXDCODES = 30; // Maximum codes lengths to read uint256 constant MAXCODES = (MAXLCODES + MAXDCODES); // Number of fixed literal/length codes uint256 constant FIXLCODES = 288; // Error codes enum ErrorCode { ERR_NONE, // 0 successful inflate ERR_NOT_TERMINATED, // 1 available inflate data did not terminate ERR_OUTPUT_EXHAUSTED, // 2 output space exhausted before completing inflate ERR_INVALID_BLOCK_TYPE, // 3 invalid block type (type == 3) ERR_STORED_LENGTH_NO_MATCH, // 4 stored block length did not match one's complement ERR_TOO_MANY_LENGTH_OR_DISTANCE_CODES, // 5 dynamic block code description: too many length or distance codes ERR_CODE_LENGTHS_CODES_INCOMPLETE, // 6 dynamic block code description: code lengths codes incomplete ERR_REPEAT_NO_FIRST_LENGTH, // 7 dynamic block code description: repeat lengths with no first length ERR_REPEAT_MORE, // 8 dynamic block code description: repeat more than specified lengths ERR_INVALID_LITERAL_LENGTH_CODE_LENGTHS, // 9 dynamic block code description: invalid literal/length code lengths ERR_INVALID_DISTANCE_CODE_LENGTHS, // 10 dynamic block code description: invalid distance code lengths ERR_MISSING_END_OF_BLOCK, // 11 dynamic block code description: missing end-of-block code ERR_INVALID_LENGTH_OR_DISTANCE_CODE, // 12 invalid literal/length or distance code in fixed or dynamic block ERR_DISTANCE_TOO_FAR, // 13 distance is too far back in fixed or dynamic block ERR_CONSTRUCT // 14 internal: error in construct() } // Input and output state struct State { ////////////////// // Output state // ////////////////// // Output buffer bytes output; // Bytes written to out so far uint256 outcnt; ///////////////// // Input state // ///////////////// // Input buffer bytes input; // Bytes read so far uint256 incnt; //////////////// // Temp state // //////////////// // Bit buffer uint256 bitbuf; // Number of bits in bit buffer uint256 bitcnt; ////////////////////////// // Static Huffman codes // ////////////////////////// Huffman lencode; Huffman distcode; } // Huffman code decoding tables struct Huffman { uint256[] counts; uint256[] symbols; } function bits(State memory s, uint256 need) private pure returns (ErrorCode, uint256) { unchecked { // Bit accumulator (can use up to 20 bits) uint256 val; // Load at least need bits into val val = s.bitbuf; while (s.bitcnt < need) { if (s.incnt == s.input.length) { // Out of input return (ErrorCode.ERR_NOT_TERMINATED, 0); } // Load eight bits val |= uint256(uint8(s.input[s.incnt++])) << s.bitcnt; s.bitcnt += 8; } // Drop need bits and update buffer, always zero to seven bits left s.bitbuf = val >> need; s.bitcnt -= need; // Return need bits, zeroing the bits above that uint256 ret = (val & ((1 << need) - 1)); return (ErrorCode.ERR_NONE, ret); } } function _stored(State memory s) private pure returns (ErrorCode) { unchecked { // Length of stored block uint256 len; // Discard leftover bits from current byte (assumes s.bitcnt < 8) s.bitbuf = 0; s.bitcnt = 0; // Get length and check against its one's complement if (s.incnt + 4 > s.input.length) { // Not enough input return ErrorCode.ERR_NOT_TERMINATED; } len = uint256(uint8(s.input[s.incnt++])); len |= uint256(uint8(s.input[s.incnt++])) << 8; if (uint8(s.input[s.incnt++]) != (~len & 0xFF) || uint8(s.input[s.incnt++]) != ((~len >> 8) & 0xFF)) { // Didn't match complement! return ErrorCode.ERR_STORED_LENGTH_NO_MATCH; } // Copy len bytes from in to out if (s.incnt + len > s.input.length) { // Not enough input return ErrorCode.ERR_NOT_TERMINATED; } if (s.outcnt + len > s.output.length) { // Not enough output space return ErrorCode.ERR_OUTPUT_EXHAUSTED; } while (len != 0) { // Note: Solidity reverts on underflow, so we decrement here len -= 1; s.output[s.outcnt++] = s.input[s.incnt++]; } // Done with a valid stored block return ErrorCode.ERR_NONE; } } function _decode(State memory s, Huffman memory h) private pure returns (ErrorCode, uint256) { unchecked { // Current number of bits in code uint256 len; // Len bits being decoded uint256 code = 0; // First code of length len uint256 first = 0; // Number of codes of length len uint256 count; // Index of first code of length len in symbol table uint256 index = 0; // Error code ErrorCode err; uint256 tempCode; for (len = 1; len <= MAXBITS; len += 5) { // Get next bit (err, tempCode) = bits(s, 1); if (err != ErrorCode.ERR_NONE) { return (err, 0); } code |= tempCode; count = h.counts[len]; // If length len, return symbol if (code < first + count) { return (ErrorCode.ERR_NONE, h.symbols[index + (code - first)]); } // Else update for next length index += count; first += count; first <<= 1; code <<= 1; // Get next bit (err, tempCode) = bits(s, 1); if (err != ErrorCode.ERR_NONE) { return (err, 0); } code |= tempCode; count = h.counts[len + 1]; // If length len, return symbol if (code < first + count) { return (ErrorCode.ERR_NONE, h.symbols[index + (code - first)]); } // Else update for next length index += count; first += count; first <<= 1; code <<= 1; // Get next bit (err, tempCode) = bits(s, 1); if (err != ErrorCode.ERR_NONE) { return (err, 0); } code |= tempCode; count = h.counts[len + 2]; // If length len, return symbol if (code < first + count) { return (ErrorCode.ERR_NONE, h.symbols[index + (code - first)]); } // Else update for next length index += count; first += count; first <<= 1; code <<= 1; // Get next bit (err, tempCode) = bits(s, 1); if (err != ErrorCode.ERR_NONE) { return (err, 0); } code |= tempCode; count = h.counts[len + 3]; // If length len, return symbol if (code < first + count) { return (ErrorCode.ERR_NONE, h.symbols[index + (code - first)]); } // Else update for next length index += count; first += count; first <<= 1; code <<= 1; // Get next bit (err, tempCode) = bits(s, 1); if (err != ErrorCode.ERR_NONE) { return (err, 0); } code |= tempCode; count = h.counts[len + 4]; // If length len, return symbol if (code < first + count) { return (ErrorCode.ERR_NONE, h.symbols[index + (code - first)]); } // Else update for next length index += count; first += count; first <<= 1; code <<= 1; } // Ran out of codes return (ErrorCode.ERR_INVALID_LENGTH_OR_DISTANCE_CODE, 0); } } function _construct( Huffman memory h, uint256[] memory lengths, uint256 n, uint256 start ) private pure returns (ErrorCode) { unchecked { // Current symbol when stepping through lengths[] uint256 symbol; // Current length when stepping through h.counts[] uint256 len; // Number of possible codes left of current length uint256 left; // Offsets in symbol table for each length uint256[MAXBITS + 1] memory offs; // Count number of codes of each length for (len = 0; len <= MAXBITS; ++len) { h.counts[len] = 0; } for (symbol = 0; symbol < n; ++symbol) { // Assumes lengths are within bounds ++h.counts[lengths[start + symbol]]; } // No codes! if (h.counts[0] == n) { // Complete, but decode() will fail return (ErrorCode.ERR_NONE); } // Check for an over-subscribed or incomplete set of lengths // One possible code of zero length left = 1; for (len = 1; len <= MAXBITS; len += 5) { // One more bit, double codes left left <<= 1; if (left < h.counts[len]) { // Over-subscribed--return error return ErrorCode.ERR_CONSTRUCT; } // Deduct count from possible codes left -= h.counts[len]; // One more bit, double codes left left <<= 1; if (left < h.counts[len + 1]) { // Over-subscribed--return error return ErrorCode.ERR_CONSTRUCT; } // Deduct count from possible codes left -= h.counts[len + 1]; // One more bit, double codes left left <<= 1; if (left < h.counts[len + 2]) { // Over-subscribed--return error return ErrorCode.ERR_CONSTRUCT; } // Deduct count from possible codes left -= h.counts[len + 2]; // One more bit, double codes left left <<= 1; if (left < h.counts[len + 3]) { // Over-subscribed--return error return ErrorCode.ERR_CONSTRUCT; } // Deduct count from possible codes left -= h.counts[len + 3]; // One more bit, double codes left left <<= 1; if (left < h.counts[len + 4]) { // Over-subscribed--return error return ErrorCode.ERR_CONSTRUCT; } // Deduct count from possible codes left -= h.counts[len + 4]; } // Generate offsets into symbol table for each length for sorting offs[1] = 0; for (len = 1; len < MAXBITS; ++len) { offs[len + 1] = offs[len] + h.counts[len]; } // Put symbols in table sorted by length, by symbol order within each length for (symbol = 0; symbol < n; ++symbol) { if (lengths[start + symbol] != 0) { h.symbols[offs[lengths[start + symbol]]++] = symbol; } } // Left > 0 means incomplete return left > 0 ? ErrorCode.ERR_CONSTRUCT : ErrorCode.ERR_NONE; } } function _codes( State memory s, Huffman memory lencode, Huffman memory distcode ) private pure returns (ErrorCode) { unchecked { // Decoded symbol uint256 symbol; // Length for copy uint256 len; // Distance for copy uint256 dist; // TODO Solidity doesn't support constant arrays, but these are fixed at compile-time // Size base for length codes 257..285 uint16[29] memory lens = [ 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258 ]; // Extra bits for length codes 257..285 uint8[29] memory lext = [ 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0 ]; // Offset base for distance codes 0..29 uint16[30] memory dists = [ 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, 8193, 12289, 16385, 24577 ]; // Extra bits for distance codes 0..29 uint8[30] memory dext = [ 0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13 ]; // Error code ErrorCode err; // Decode literals and length/distance pairs while (symbol != 256) { (err, symbol) = _decode(s, lencode); if (err != ErrorCode.ERR_NONE) { // Invalid symbol return err; } if (symbol < 256) { // Literal: symbol is the byte // Write out the literal if (s.outcnt == s.output.length) { return ErrorCode.ERR_OUTPUT_EXHAUSTED; } s.output[s.outcnt] = bytes1(uint8(symbol)); ++s.outcnt; } else if (symbol > 256) { uint256 tempBits; // Length // Get and compute length symbol -= 257; if (symbol >= 29) { // Invalid fixed code return ErrorCode.ERR_INVALID_LENGTH_OR_DISTANCE_CODE; } (err, tempBits) = bits(s, lext[symbol]); if (err != ErrorCode.ERR_NONE) { return err; } len = lens[symbol] + tempBits; // Get and check distance (err, symbol) = _decode(s, distcode); if (err != ErrorCode.ERR_NONE) { // Invalid symbol return err; } (err, tempBits) = bits(s, dext[symbol]); if (err != ErrorCode.ERR_NONE) { return err; } dist = dists[symbol] + tempBits; if (dist > s.outcnt) { // Distance too far back return ErrorCode.ERR_DISTANCE_TOO_FAR; } // Copy length bytes from distance bytes back if (s.outcnt + len > s.output.length) { return ErrorCode.ERR_OUTPUT_EXHAUSTED; } while (len != 0) { // Note: Solidity reverts on underflow, so we decrement here len -= 1; s.output[s.outcnt] = s.output[s.outcnt - dist]; ++s.outcnt; } } else { s.outcnt += len; } } // Done with a valid fixed or dynamic block return ErrorCode.ERR_NONE; } } function _build_fixed(State memory s) private pure returns (ErrorCode) { unchecked { // Build fixed Huffman tables // TODO this is all a compile-time constant uint256 symbol; uint256[] memory lengths = new uint256[](FIXLCODES); // Literal/length table for (symbol = 0; symbol < 144; ++symbol) { lengths[symbol] = 8; } for (; symbol < 256; ++symbol) { lengths[symbol] = 9; } for (; symbol < 280; ++symbol) { lengths[symbol] = 7; } for (; symbol < FIXLCODES; ++symbol) { lengths[symbol] = 8; } _construct(s.lencode, lengths, FIXLCODES, 0); // Distance table for (symbol = 0; symbol < MAXDCODES; ++symbol) { lengths[symbol] = 5; } _construct(s.distcode, lengths, MAXDCODES, 0); return ErrorCode.ERR_NONE; } } function _fixed(State memory s) private pure returns (ErrorCode) { unchecked { // Decode data until end-of-block code return _codes(s, s.lencode, s.distcode); } } function _build_dynamic_lengths(State memory s) private pure returns (ErrorCode, uint256[] memory) { unchecked { uint256 ncode; // Index of lengths[] uint256 index; // Descriptor code lengths uint256[] memory lengths = new uint256[](MAXCODES); // Error code ErrorCode err; // Permutation of code length codes uint8[19] memory order = [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15]; (err, ncode) = bits(s, 4); if (err != ErrorCode.ERR_NONE) { return (err, lengths); } ncode += 4; // Read code length code lengths (really), missing lengths are zero for (index = 0; index < ncode; ++index) { (err, lengths[order[index]]) = bits(s, 3); if (err != ErrorCode.ERR_NONE) { return (err, lengths); } } for (; index < 19; ++index) { lengths[order[index]] = 0; } return (ErrorCode.ERR_NONE, lengths); } } function _build_dynamic(State memory s) private pure returns ( ErrorCode, Huffman memory, Huffman memory ) { unchecked { // Number of lengths in descriptor uint256 nlen; uint256 ndist; // Index of lengths[] uint256 index; // Error code ErrorCode err; // Descriptor code lengths uint256[] memory lengths = new uint256[](MAXCODES); // Length and distance codes Huffman memory lencode = Huffman(new uint256[](MAXBITS + 1), new uint256[](MAXLCODES)); Huffman memory distcode = Huffman(new uint256[](MAXBITS + 1), new uint256[](MAXDCODES)); uint256 tempBits; // Get number of lengths in each table, check lengths (err, nlen) = bits(s, 5); if (err != ErrorCode.ERR_NONE) { return (err, lencode, distcode); } nlen += 257; (err, ndist) = bits(s, 5); if (err != ErrorCode.ERR_NONE) { return (err, lencode, distcode); } ndist += 1; if (nlen > MAXLCODES || ndist > MAXDCODES) { // Bad counts return (ErrorCode.ERR_TOO_MANY_LENGTH_OR_DISTANCE_CODES, lencode, distcode); } (err, lengths) = _build_dynamic_lengths(s); if (err != ErrorCode.ERR_NONE) { return (err, lencode, distcode); } // Build huffman table for code lengths codes (use lencode temporarily) err = _construct(lencode, lengths, 19, 0); if (err != ErrorCode.ERR_NONE) { // Require complete code set here return (ErrorCode.ERR_CODE_LENGTHS_CODES_INCOMPLETE, lencode, distcode); } // Read length/literal and distance code length tables index = 0; while (index < nlen + ndist) { // Decoded value uint256 symbol; // Last length to repeat uint256 len; (err, symbol) = _decode(s, lencode); if (err != ErrorCode.ERR_NONE) { // Invalid symbol return (err, lencode, distcode); } if (symbol < 16) { // Length in 0..15 lengths[index++] = symbol; } else { // Repeat instruction // Assume repeating zeros len = 0; if (symbol == 16) { // Repeat last length 3..6 times if (index == 0) { // No last length! return (ErrorCode.ERR_REPEAT_NO_FIRST_LENGTH, lencode, distcode); } // Last length len = lengths[index - 1]; (err, tempBits) = bits(s, 2); if (err != ErrorCode.ERR_NONE) { return (err, lencode, distcode); } symbol = 3 + tempBits; } else if (symbol == 17) { // Repeat zero 3..10 times (err, tempBits) = bits(s, 3); if (err != ErrorCode.ERR_NONE) { return (err, lencode, distcode); } symbol = 3 + tempBits; } else { // == 18, repeat zero 11..138 times (err, tempBits) = bits(s, 7); if (err != ErrorCode.ERR_NONE) { return (err, lencode, distcode); } symbol = 11 + tempBits; } if (index + symbol > nlen + ndist) { // Too many lengths! return (ErrorCode.ERR_REPEAT_MORE, lencode, distcode); } while (symbol != 0) { // Note: Solidity reverts on underflow, so we decrement here symbol -= 1; // Repeat last or zero symbol times lengths[index++] = len; } } } // Check for end-of-block code -- there better be one! if (lengths[256] == 0) { return (ErrorCode.ERR_MISSING_END_OF_BLOCK, lencode, distcode); } // Build huffman table for literal/length codes err = _construct(lencode, lengths, nlen, 0); if ( err != ErrorCode.ERR_NONE && (err == ErrorCode.ERR_NOT_TERMINATED || err == ErrorCode.ERR_OUTPUT_EXHAUSTED || nlen != lencode.counts[0] + lencode.counts[1]) ) { // Incomplete code ok only for single length 1 code return (ErrorCode.ERR_INVALID_LITERAL_LENGTH_CODE_LENGTHS, lencode, distcode); } // Build huffman table for distance codes err = _construct(distcode, lengths, ndist, nlen); if ( err != ErrorCode.ERR_NONE && (err == ErrorCode.ERR_NOT_TERMINATED || err == ErrorCode.ERR_OUTPUT_EXHAUSTED || ndist != distcode.counts[0] + distcode.counts[1]) ) { // Incomplete code ok only for single length 1 code return (ErrorCode.ERR_INVALID_DISTANCE_CODE_LENGTHS, lencode, distcode); } return (ErrorCode.ERR_NONE, lencode, distcode); } } function _dynamic(State memory s) private pure returns (ErrorCode) { unchecked { // Length and distance codes Huffman memory lencode; Huffman memory distcode; // Error code ErrorCode err; (err, lencode, distcode) = _build_dynamic(s); if (err != ErrorCode.ERR_NONE) { return err; } // Decode data until end-of-block code return _codes(s, lencode, distcode); } } function puff(bytes memory source, uint256 destlen) internal pure returns (ErrorCode, bytes memory) { unchecked { // Input/output state State memory s = State( new bytes(destlen), 0, source, 0, 0, 0, Huffman(new uint256[](MAXBITS + 1), new uint256[](FIXLCODES)), Huffman(new uint256[](MAXBITS + 1), new uint256[](MAXDCODES)) ); // Temp: last bit uint256 last; // Temp: block type bit uint256 t; // Error code ErrorCode err; // Build fixed Huffman tables err = _build_fixed(s); if (err != ErrorCode.ERR_NONE) { return (err, s.output); } // Process blocks until last block or error while (last == 0) { // One if last block (err, last) = bits(s, 1); if (err != ErrorCode.ERR_NONE) { return (err, s.output); } // Block type 0..3 (err, t) = bits(s, 2); if (err != ErrorCode.ERR_NONE) { return (err, s.output); } err = ( t == 0 ? _stored(s) : (t == 1 ? _fixed(s) : (t == 2 ? _dynamic(s) : ErrorCode.ERR_INVALID_BLOCK_TYPE)) ); // type == 3, invalid if (err != ErrorCode.ERR_NONE) { // Return with error break; } } return (err, s.output); } } }
// SPDX-License-Identifier: GPL-3.0 /// @title A library used to construct ERC721 token URIs and SVG images /********************************* * ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ * * ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ * * ░░░░░░█████████░░█████████░░░ * * ░░░░░░██░░░████░░██░░░████░░░ * * ░░██████░░░████████░░░████░░░ * * ░░██░░██░░░████░░██░░░████░░░ * * ░░██░░██░░░████░░██░░░████░░░ * * ░░░░░░█████████░░█████████░░░ * * ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ * * ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ * *********************************/ pragma solidity ^0.8.6; import { Base64 } from 'base64-sol/base64.sol'; import { ISVGRenderer } from '../interfaces/ISVGRenderer.sol'; library NFTDescriptorV2 { struct TokenURIParams { string name; string description; string background; ISVGRenderer.Part[] parts; } /** * @notice Construct an ERC721 token URI. */ function constructTokenURI(ISVGRenderer renderer, TokenURIParams memory params) public view returns (string memory) { string memory image = generateSVGImage( renderer, ISVGRenderer.SVGParams({ parts: params.parts, background: params.background }) ); // prettier-ignore return string( abi.encodePacked( 'data:application/json;base64,', Base64.encode( bytes( abi.encodePacked('{"name":"', params.name, '", "description":"', params.description, '", "image": "', 'data:image/svg+xml;base64,', image, '"}') ) ) ) ); } /** * @notice Generate an SVG image for use in the ERC721 token URI. */ function generateSVGImage(ISVGRenderer renderer, ISVGRenderer.SVGParams memory params) public view returns (string memory svg) { return Base64.encode(bytes(renderer.generateSVG(params))); } }
// SPDX-License-Identifier: GPL-3.0 /// @title Interface for Plutocats Art pragma solidity >=0.8.0; import {IInflator} from "nouns-monorepo/packages/nouns-contracts/contracts/interfaces/IInflator.sol"; interface IPlutocatsArt { error SenderIsNotDescriptor(); error EmptyPalette(); error BadPaletteLength(); error EmptyBytes(); error BadDecompressedLength(); error BadImageCount(); error ImageNotFound(); error PaletteNotFound(); event DescriptorUpdated(address oldDescriptor, address newDescriptor); event InflatorUpdated(address oldInflator, address newInflator); event BackgroundsAdded(uint256 count); event PaletteSet(uint8 paletteIndex); event BodiesAdded(uint16 count); event AccessoriesAdded(uint16 count); event HeadsAdded(uint16 count); event EyesAdded(uint16 count); event GlassesAdded(uint16 count); struct NounArtStoragePage { uint16 imageCount; uint80 decompressedLength; address pointer; } struct Trait { NounArtStoragePage[] storagePages; uint256 storedImagesCount; } function descriptor() external view returns (address); function inflator() external view returns (IInflator); function setDescriptor(address descriptor) external; function setInflator(IInflator inflator) external; function addManyBackgrounds(string[] calldata _backgrounds) external; function addBackground(string calldata _background) external; function palettes(uint8 paletteIndex) external view returns (bytes memory); function setPalette(uint8 paletteIndex, bytes calldata palette) external; function addBodies(bytes calldata encodedCompressed, uint80 decompressedLength, uint16 imageCount) external; function addAccessories(bytes calldata encodedCompressed, uint80 decompressedLength, uint16 imageCount) external; function addHeads(bytes calldata encodedCompressed, uint80 decompressedLength, uint16 imageCount) external; function addEyes(bytes calldata encodedCompressed, uint80 decompressedLength, uint16 imageCount) external; function addGlasses(bytes calldata encodedCompressed, uint80 decompressedLength, uint16 imageCount) external; function addBodiesFromPointer(address pointer, uint80 decompressedLength, uint16 imageCount) external; function setPalettePointer(uint8 paletteIndex, address pointer) external; function addAccessoriesFromPointer(address pointer, uint80 decompressedLength, uint16 imageCount) external; function addHeadsFromPointer(address pointer, uint80 decompressedLength, uint16 imageCount) external; function addEyesFromPointer(address pointer, uint80 decompressedLength, uint16 imageCount) external; function addGlassesFromPointer(address pointer, uint80 decompressedLength, uint16 imageCount) external; function backgroundCount() external view returns (uint256); function bodyCount() external view returns (uint256); function accessoryCount() external view returns (uint256); function headCount() external view returns (uint256); function eyesCount() external view returns (uint256); function glassesCount() external view returns (uint256); function backgrounds(uint256 index) external view returns (string memory); function heads(uint256 index) external view returns (bytes memory); function bodies(uint256 index) external view returns (bytes memory); function accessories(uint256 index) external view returns (bytes memory); function eyes(uint256 index) external view returns (bytes memory); function glasses(uint256 index) external view returns (bytes memory); function getBodiesTrait() external view returns (Trait memory); function getAccessoriesTrait() external view returns (Trait memory); function getHeadsTrait() external view returns (Trait memory); function getEyesTrait() external view returns (Trait memory); function getGlassesTrait() external view returns (Trait memory); }
// SPDX-License-Identifier: GPL-3.0 /// @title Interface for Plutocats Seeder pragma solidity >=0.8.0; import {IPlutocatsSeeder} from "./IPlutocatsSeeder.sol"; import {ISVGRenderer} from "nouns-monorepo/packages/nouns-contracts/contracts/interfaces/ISVGRenderer.sol"; import {IPlutocatsArt} from "./IPlutocatsArt.sol"; import {IPlutocatsDescriptorMinimal} from "./IPlutocatsDescriptorMinimal.sol"; interface IPlutocatsDescriptor is IPlutocatsDescriptorMinimal { event PartsLocked(); event DataURIToggled(bool enabled); event BaseURIUpdated(string baseURI); event ArtUpdated(IPlutocatsArt art); event RendererUpdated(ISVGRenderer renderer); error EmptyPalette(); error BadPaletteLength(); error IndexNotFound(); function arePartsLocked() external returns (bool); function isDataURIEnabled() external returns (bool); function baseURI() external returns (string memory); function palettes(uint8 paletteIndex) external view returns (bytes memory); function backgrounds(uint256 index) external view returns (string memory); function bodies(uint256 index) external view returns (bytes memory); function accessories(uint256 index) external view returns (bytes memory); function heads(uint256 index) external view returns (bytes memory); function eyes(uint256 index) external view returns (bytes memory); function glasses(uint256 index) external view returns (bytes memory); function backgroundCount() external view override returns (uint256); function bodyCount() external view override returns (uint256); function accessoryCount() external view override returns (uint256); function headCount() external view override returns (uint256); function eyesCount() external view override returns (uint256); function glassesCount() external view override returns (uint256); function addManyBackgrounds(string[] calldata backgrounds) external; function addBackground(string calldata background) external; function setPalette(uint8 paletteIndex, bytes calldata palette) external; function addBodies(bytes calldata encodedCompressed, uint80 decompressedLength, uint16 imageCount) external; function addAccessories(bytes calldata encodedCompressed, uint80 decompressedLength, uint16 imageCount) external; function addHeads(bytes calldata encodedCompressed, uint80 decompressedLength, uint16 imageCount) external; function addEyes(bytes calldata encodedCompressed, uint80 decompressedLength, uint16 imageCount) external; function addGlasses(bytes calldata encodedCompressed, uint80 decompressedLength, uint16 imageCount) external; function setPalettePointer(uint8 paletteIndex, address pointer) external; function addBodiesFromPointer(address pointer, uint80 decompressedLength, uint16 imageCount) external; function addAccessoriesFromPointer(address pointer, uint80 decompressedLength, uint16 imageCount) external; function addHeadsFromPointer(address pointer, uint80 decompressedLength, uint16 imageCount) external; function addEyesFromPointer(address pointer, uint80 decompressedLength, uint16 imageCount) external; function addGlassesFromPointer(address pointer, uint80 decompressedLength, uint16 imageCount) external; function lockParts() external; function toggleDataURIEnabled() external; function setBaseURI(string calldata baseURI) external; function tokenURI(uint256 tokenId, IPlutocatsSeeder.Seed memory seed) external view override returns (string memory); function dataURI(uint256 tokenId, IPlutocatsSeeder.Seed memory seed) external view override returns (string memory); function genericDataURI(string calldata name, string calldata description, IPlutocatsSeeder.Seed memory seed) external view returns (string memory); function generateSVGImage(IPlutocatsSeeder.Seed memory seed) external view returns (string memory); }
// SPDX-License-Identifier: GPL-3.0 /// @title Interface for Plutocats Descriptor Minimal pragma solidity >=0.8.0; import {IPlutocatsSeeder} from "./IPlutocatsSeeder.sol"; interface IPlutocatsDescriptorMinimal { /// /// USED BY TOKEN /// function tokenURI(uint256 tokenId, IPlutocatsSeeder.Seed memory seed) external view returns (string memory); function dataURI(uint256 tokenId, IPlutocatsSeeder.Seed memory seed) external view returns (string memory); /// /// USED BY SEEDER /// function backgroundCount() external view returns (uint256); function bodyCount() external view returns (uint256); function accessoryCount() external view returns (uint256); function headCount() external view returns (uint256); function eyesCount() external view returns (uint256); function glassesCount() external view returns (uint256); }
// SPDX-License-Identifier: GPL-3.0 /// @title Interface for Plutocats Seeder pragma solidity >=0.8.0; import {IPlutocatsDescriptorMinimal} from "./IPlutocatsDescriptorMinimal.sol"; interface IPlutocatsSeeder { struct Seed { uint48 background; uint48 body; uint48 accessory; uint48 head; uint48 eyes; uint48 glasses; } function generateSeed(uint256 tokenId, IPlutocatsDescriptorMinimal descriptor) external view returns (Seed memory); }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": { "nouns-monorepo/packages/nouns-contracts/contracts/libs/NFTDescriptorV2.sol": { "NFTDescriptorV2": "0xa8c8e1b1937cec4bb8ce41a74f1610784f5b7d73" } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"contract IPlutocatsArt","name":"_art","type":"address"},{"internalType":"contract ISVGRenderer","name":"_renderer","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"BadPaletteLength","type":"error"},{"inputs":[],"name":"EmptyPalette","type":"error"},{"inputs":[],"name":"IndexNotFound","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"contract IPlutocatsArt","name":"art","type":"address"}],"name":"ArtUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"baseURI","type":"string"}],"name":"BaseURIUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"enabled","type":"bool"}],"name":"DataURIToggled","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":[],"name":"PartsLocked","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"contract ISVGRenderer","name":"renderer","type":"address"}],"name":"RendererUpdated","type":"event"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"accessories","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"accessoryCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"encodedCompressed","type":"bytes"},{"internalType":"uint80","name":"decompressedLength","type":"uint80"},{"internalType":"uint16","name":"imageCount","type":"uint16"}],"name":"addAccessories","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"pointer","type":"address"},{"internalType":"uint80","name":"decompressedLength","type":"uint80"},{"internalType":"uint16","name":"imageCount","type":"uint16"}],"name":"addAccessoriesFromPointer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_background","type":"string"}],"name":"addBackground","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes","name":"encodedCompressed","type":"bytes"},{"internalType":"uint80","name":"decompressedLength","type":"uint80"},{"internalType":"uint16","name":"imageCount","type":"uint16"}],"name":"addBodies","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"pointer","type":"address"},{"internalType":"uint80","name":"decompressedLength","type":"uint80"},{"internalType":"uint16","name":"imageCount","type":"uint16"}],"name":"addBodiesFromPointer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes","name":"encodedCompressed","type":"bytes"},{"internalType":"uint80","name":"decompressedLength","type":"uint80"},{"internalType":"uint16","name":"imageCount","type":"uint16"}],"name":"addEyes","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"pointer","type":"address"},{"internalType":"uint80","name":"decompressedLength","type":"uint80"},{"internalType":"uint16","name":"imageCount","type":"uint16"}],"name":"addEyesFromPointer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes","name":"encodedCompressed","type":"bytes"},{"internalType":"uint80","name":"decompressedLength","type":"uint80"},{"internalType":"uint16","name":"imageCount","type":"uint16"}],"name":"addGlasses","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"pointer","type":"address"},{"internalType":"uint80","name":"decompressedLength","type":"uint80"},{"internalType":"uint16","name":"imageCount","type":"uint16"}],"name":"addGlassesFromPointer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes","name":"encodedCompressed","type":"bytes"},{"internalType":"uint80","name":"decompressedLength","type":"uint80"},{"internalType":"uint16","name":"imageCount","type":"uint16"}],"name":"addHeads","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"pointer","type":"address"},{"internalType":"uint80","name":"decompressedLength","type":"uint80"},{"internalType":"uint16","name":"imageCount","type":"uint16"}],"name":"addHeadsFromPointer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string[]","name":"_backgrounds","type":"string[]"}],"name":"addManyBackgrounds","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"arePartsLocked","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"art","outputs":[{"internalType":"contract IPlutocatsArt","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"backgroundCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"backgrounds","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"baseURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"bodies","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"bodyCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"components":[{"internalType":"uint48","name":"background","type":"uint48"},{"internalType":"uint48","name":"body","type":"uint48"},{"internalType":"uint48","name":"accessory","type":"uint48"},{"internalType":"uint48","name":"head","type":"uint48"},{"internalType":"uint48","name":"eyes","type":"uint48"},{"internalType":"uint48","name":"glasses","type":"uint48"}],"internalType":"struct IPlutocatsSeeder.Seed","name":"seed","type":"tuple"}],"name":"dataURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"eyes","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"eyesCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"uint48","name":"background","type":"uint48"},{"internalType":"uint48","name":"body","type":"uint48"},{"internalType":"uint48","name":"accessory","type":"uint48"},{"internalType":"uint48","name":"head","type":"uint48"},{"internalType":"uint48","name":"eyes","type":"uint48"},{"internalType":"uint48","name":"glasses","type":"uint48"}],"internalType":"struct IPlutocatsSeeder.Seed","name":"seed","type":"tuple"}],"name":"generateSVGImage","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"description","type":"string"},{"components":[{"internalType":"uint48","name":"background","type":"uint48"},{"internalType":"uint48","name":"body","type":"uint48"},{"internalType":"uint48","name":"accessory","type":"uint48"},{"internalType":"uint48","name":"head","type":"uint48"},{"internalType":"uint48","name":"eyes","type":"uint48"},{"internalType":"uint48","name":"glasses","type":"uint48"}],"internalType":"struct IPlutocatsSeeder.Seed","name":"seed","type":"tuple"}],"name":"genericDataURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"uint48","name":"background","type":"uint48"},{"internalType":"uint48","name":"body","type":"uint48"},{"internalType":"uint48","name":"accessory","type":"uint48"},{"internalType":"uint48","name":"head","type":"uint48"},{"internalType":"uint48","name":"eyes","type":"uint48"},{"internalType":"uint48","name":"glasses","type":"uint48"}],"internalType":"struct IPlutocatsSeeder.Seed","name":"seed","type":"tuple"}],"name":"getPartsForSeed","outputs":[{"components":[{"internalType":"bytes","name":"image","type":"bytes"},{"internalType":"bytes","name":"palette","type":"bytes"}],"internalType":"struct ISVGRenderer.Part[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"glasses","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"glassesCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"headCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"heads","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isDataURIEnabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lockParts","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint8","name":"index","type":"uint8"}],"name":"palettes","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renderer","outputs":[{"internalType":"contract ISVGRenderer","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IPlutocatsArt","name":"_art","type":"address"}],"name":"setArt","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"descriptor","type":"address"}],"name":"setArtDescriptor","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IInflator","name":"inflator","type":"address"}],"name":"setArtInflator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_baseURI","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint8","name":"paletteIndex","type":"uint8"},{"internalType":"bytes","name":"palette","type":"bytes"}],"name":"setPalette","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint8","name":"paletteIndex","type":"uint8"},{"internalType":"address","name":"pointer","type":"address"}],"name":"setPalettePointer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract ISVGRenderer","name":"_renderer","type":"address"}],"name":"setRenderer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"toggleDataURIEnabled","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"components":[{"internalType":"uint48","name":"background","type":"uint48"},{"internalType":"uint48","name":"body","type":"uint48"},{"internalType":"uint48","name":"accessory","type":"uint48"},{"internalType":"uint48","name":"head","type":"uint48"},{"internalType":"uint48","name":"eyes","type":"uint48"},{"internalType":"uint48","name":"glasses","type":"uint48"}],"internalType":"struct IPlutocatsSeeder.Seed","name":"seed","type":"tuple"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60806040526002805460ff60a81b1916600160a81b1790553480156200002457600080fd5b5060405162002db438038062002db48339810160408190526200004791620000d3565b600080546001600160a01b031916339081178255604051909182917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a350600180546001600160a01b039384166001600160a01b0319918216179091556002805492909316911617905562000112565b6001600160a01b0381168114620000d057600080fd5b50565b60008060408385031215620000e757600080fd5b8251620000f481620000ba565b60208401519092506200010781620000ba565b809150509250929050565b612c9280620001226000396000f3fe608060405234801561001057600080fd5b50600436106102955760003560e01c806373ac736b11610167578063b982d1b9116100ce578063dfe8478b11610087578063dfe8478b146105a8578063e6b1a3ae146105b0578063e79c9ea6146105c3578063eba81806146105d6578063f2fde38b146105de578063f4513a6a146105f157600080fd5b8063b982d1b914610533578063bc2d45fe14610546578063bc9f75ee14610559578063cc2aa09114610579578063cd2b825014610581578063ce2f4f531461059457600080fd5b80638da5cb5b116101205780638da5cb5b146104c357806391b7916a146104d457806394f3df61146104e7578063a18f6710146104fa578063a3053dd51461050d578063aa5bf7d81461052057600080fd5b806373ac736b1461044b578063773b97711461045e5780637ca94210146104825780638104468c146104955780638ada6b0f1461049d5780638bd54c06146104b057600080fd5b8063461fc5af1161020b5780635c97f166116101c45780635c97f166146103ef5780635e70664c146104025780636844af76146104155780636c0360eb146104285780636e85653114610430578063715018a61461044357600080fd5b8063461fc5af146103885780634daebac21461039b57806353a13a8c146103a357806355f804b3146103b657806356d3163d146103c95780635a503f13146103dc57600080fd5b8063301bd28e1161025d578063301bd28e14610306578063353c36a01461033157806342638121146103445780634479cef21461035757806344cee73c1461036d5780634531c0a81461038057600080fd5b8063010ecde71461029a57806304bde4dd146102af5780630ba3db1a146102d8578063211a643c146102eb5780632a1d0769146102fe575b600080fd5b6102ad6102a8366004611fe9565b610604565b005b6102c26102bd366004612006565b61069a565b6040516102cf919061206f565b60405180910390f35b6102ad6102e63660046120fb565b610713565b6102c26102f936600461225c565b6107d5565b6102ad610907565b600154610319906001600160a01b031681565b6040516001600160a01b0390911681526020016102cf565b6102ad61033f3660046120fb565b610999565b6102c2610352366004612278565b610a23565b61035f610a7c565b6040519081526020016102cf565b6102c261037b366004612006565b610aef565b61035f610b21565b6102ad6103963660046122a5565b610b6b565b61035f610c2a565b6102ad6103b13660046120fb565b610c74565b6102ad6103c43660046122ea565b610cfe565b6102ad6103d7366004611fe9565b610d73565b6102c26103ea366004612006565b610df2565b6102ad6103fd3660046122a5565b610e24565b6102ad6104103660046122ea565b610eac565b6102c26104233660046123a8565b610f68565b6102c26110a8565b6102ad61043e3660046122a5565b611136565b6102ad6111be565b6102ad6104593660046122a5565b611232565b60025461047290600160a01b900460ff1681565b60405190151581526020016102cf565b6102c2610490366004612006565b6112ba565b61035f6112ec565b600254610319906001600160a01b031681565b6102ad6104be366004612425565b611336565b6000546001600160a01b0316610319565b6102ad6104e236600461245c565b6113c5565b6102ad6104f53660046120fb565b61144b565b6102c2610508366004612278565b6114d5565b6102c261051b366004612006565b611541565b6102ad61052e3660046120fb565b611573565b6102c2610541366004612006565b6115fd565b6102c26105543660046124d0565b61162f565b61056c61056736600461225c565b611663565b6040516102cf91906124eb565b61035f611a6e565b6102ad61058f3660046122a5565b611ab8565b60025461047290600160a81b900460ff1681565b6102ad611b40565b6102ad6105be366004611fe9565b611bba565b6102ad6105d1366004612570565b611c5c565b61035f611ce4565b6102ad6105ec366004611fe9565b611d2e565b6102ad6105ff366004611fe9565b611e18565b6000546001600160a01b031633146106375760405162461bcd60e51b815260040161062e906125c2565b60405180910390fd5b6001546040516301b9a39760e01b81526001600160a01b038381166004830152909116906301b9a397906024015b600060405180830381600087803b15801561067f57600080fd5b505af1158015610693573d6000803e3d6000fd5b5050505050565b6001546040516304bde4dd60e01b8152600481018390526060916001600160a01b0316906304bde4dd906024015b600060405180830381865afa1580156106e5573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261070d9190810190612627565b92915050565b6000546001600160a01b0316331461073d5760405162461bcd60e51b815260040161062e906125c2565b600254600160a01b900460ff16156107675760405162461bcd60e51b815260040161062e9061266f565b6001546040516305d1ed8d60e11b81526001600160a01b0390911690630ba3db1a9061079d9087908790879087906004016126c2565b600060405180830381600087803b1580156107b757600080fd5b505af11580156107cb573d6000803e3d6000fd5b5050505050505050565b6060600060405180604001604052806107ed85611663565b815260015485516040516304bde4dd60e01b815265ffffffffffff90911660048201526020909201916001600160a01b03909116906304bde4dd90602401600060405180830381865afa158015610848573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526108709190810190612627565b90526002546040516311660d6b60e11b815291925073a8c8e1b1937cec4bb8ce41a74f1610784f5b7d73916322cc1ad6916108bb916001600160a01b03909116908590600401612775565b600060405180830381865af41580156108d8573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526109009190810190612627565b9392505050565b6000546001600160a01b031633146109315760405162461bcd60e51b815260040161062e906125c2565b600254600160a01b900460ff161561095b5760405162461bcd60e51b815260040161062e9061266f565b6002805460ff60a01b1916600160a01b1790556040517f1680ee6d421f70ed6030d2fc4fcb50217a5dd617858d56562b119eca59172e5790600090a1565b6000546001600160a01b031633146109c35760405162461bcd60e51b815260040161062e906125c2565b600254600160a01b900460ff16156109ed5760405162461bcd60e51b815260040161062e9061266f565b6001546040516301a9e1b560e51b81526001600160a01b039091169063353c36a09061079d9087908790879087906004016126c2565b600254606090600160a81b900460ff1615610a4957610a4283836114d5565b905061070d565b6003610a5484611e74565b604051602001610a659291906127f5565b604051602081830303815290604052905092915050565b6001546040805163223ce77960e11b815290516000926001600160a01b031691634479cef29160048083019260209291908290030181865afa158015610ac6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610aea919061287c565b905090565b600154604051631133b9cf60e21b8152600481018390526060916001600160a01b0316906344cee73c906024016106c8565b600154604080516308a6381560e31b815290516000926001600160a01b031691634531c0a89160048083019260209291908290030181865afa158015610ac6573d6000803e3d6000fd5b6000546001600160a01b03163314610b955760405162461bcd60e51b815260040161062e906125c2565b600254600160a01b900460ff1615610bbf5760405162461bcd60e51b815260040161062e9061266f565b60015460405163461fc5af60e01b81526001600160a01b039091169063461fc5af90610bf390869086908690600401612895565b600060405180830381600087803b158015610c0d57600080fd5b505af1158015610c21573d6000803e3d6000fd5b50505050505050565b600154604080516326d75d6160e11b815290516000926001600160a01b031691634daebac29160048083019260209291908290030181865afa158015610ac6573d6000803e3d6000fd5b6000546001600160a01b03163314610c9e5760405162461bcd60e51b815260040161062e906125c2565b600254600160a01b900460ff1615610cc85760405162461bcd60e51b815260040161062e9061266f565b6001546040516314e84ea360e21b81526001600160a01b03909116906353a13a8c9061079d9087908790879087906004016126c2565b6000546001600160a01b03163314610d285760405162461bcd60e51b815260040161062e906125c2565b6003610d35828483612911565b507f6741b2fc379fad678116fe3d4d4b9a1a184ab53ba36b86ad0fa66340b1ab41ad8282604051610d679291906129d0565b60405180910390a15050565b6000546001600160a01b03163314610d9d5760405162461bcd60e51b815260040161062e906125c2565b600280546001600160a01b0319166001600160a01b0383169081179091556040519081527f482cbbbcf912da3be80deb8503ae1e94c0b7d5d1d0ec0af3d9d6403e06e609ee906020015b60405180910390a150565b600154604051635a503f1360e01b8152600481018390526060916001600160a01b031690635a503f13906024016106c8565b6000546001600160a01b03163314610e4e5760405162461bcd60e51b815260040161062e906125c2565b600254600160a01b900460ff1615610e785760405162461bcd60e51b815260040161062e9061266f565b600154604051632e4bf8b360e11b81526001600160a01b0390911690635c97f16690610bf390869086908690600401612895565b6000546001600160a01b03163314610ed65760405162461bcd60e51b815260040161062e906125c2565b600254600160a01b900460ff1615610f005760405162461bcd60e51b815260040161062e9061266f565b60015460405163179c199360e21b81526001600160a01b0390911690635e70664c90610f3290859085906004016129d0565b600060405180830381600087803b158015610f4c57600080fd5b505af1158015610f60573d6000803e3d6000fd5b505050505050565b6040805160808101825284815260208101849052600154835183516304bde4dd60e01b815265ffffffffffff909116600482015260609360009392908301916001600160a01b03909116906304bde4dd90602401600060405180830381865afa158015610fd9573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526110019190810190612627565b815260200161100f85611663565b905260025460405163092ba0e960e41b815291925073a8c8e1b1937cec4bb8ce41a74f1610784f5b7d73916392ba0e909161105a916001600160a01b039091169085906004016129e4565b600060405180830381865af4158015611077573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261109f9190810190612627565b95945050505050565b600380546110b5906127bb565b80601f01602080910402602001604051908101604052809291908181526020018280546110e1906127bb565b801561112e5780601f106111035761010080835404028352916020019161112e565b820191906000526020600020905b81548152906001019060200180831161111157829003601f168201915b505050505081565b6000546001600160a01b031633146111605760405162461bcd60e51b815260040161062e906125c2565b600254600160a01b900460ff161561118a5760405162461bcd60e51b815260040161062e9061266f565b600154604051636e85653160e01b81526001600160a01b0390911690636e85653190610bf390869086908690600401612895565b6000546001600160a01b031633146111e85760405162461bcd60e51b815260040161062e906125c2565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b0316331461125c5760405162461bcd60e51b815260040161062e906125c2565b600254600160a01b900460ff16156112865760405162461bcd60e51b815260040161062e9061266f565b6001546040516373ac736b60e01b81526001600160a01b03909116906373ac736b90610bf390869086908690600401612895565b6001546040516307ca942160e41b8152600481018390526060916001600160a01b031690637ca94210906024016106c8565b6001546040805163204111a360e21b815290516000926001600160a01b031691638104468c9160048083019260209291908290030181865afa158015610ac6573d6000803e3d6000fd5b6000546001600160a01b031633146113605760405162461bcd60e51b815260040161062e906125c2565b600254600160a01b900460ff161561138a5760405162461bcd60e51b815260040161062e9061266f565b6001546040516345eaa60360e11b815260ff841660048201526001600160a01b03838116602483015290911690638bd54c0690604401610f32565b6000546001600160a01b031633146113ef5760405162461bcd60e51b815260040161062e906125c2565b600254600160a01b900460ff16156114195760405162461bcd60e51b815260040161062e9061266f565b6001546040516348dbc8b560e11b81526001600160a01b03909116906391b7916a90610f329085908590600401612a67565b6000546001600160a01b031633146114755760405162461bcd60e51b815260040161062e906125c2565b600254600160a01b900460ff161561149f5760405162461bcd60e51b815260040161062e9061266f565b6001546040516394f3df6160e01b81526001600160a01b03909116906394f3df619061079d9087908790879087906004016126c2565b606060006114e284611e74565b90506000816040516020016114f79190612b02565b604051602081830303815290604052905060008260405160200161151b9190612b33565b6040516020818303038152906040529050611537828287610f68565b9695505050505050565b60015460405163a3053dd560e01b8152600481018390526060916001600160a01b03169063a3053dd5906024016106c8565b6000546001600160a01b0316331461159d5760405162461bcd60e51b815260040161062e906125c2565b600254600160a01b900460ff16156115c75760405162461bcd60e51b815260040161062e9061266f565b60015460405163154b7efb60e31b81526001600160a01b039091169063aa5bf7d89061079d9087908790879087906004016126c2565b60015460405163b982d1b960e01b8152600481018390526060916001600160a01b03169063b982d1b9906024016106c8565b600154604051635e16a2ff60e11b815260ff831660048201526060916001600160a01b03169063bc2d45fe906024016106c8565b6001546020820151604051631133b9cf60e21b815265ffffffffffff90911660048201526060916000916001600160a01b03909116906344cee73c90602401600060405180830381865afa1580156116bf573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526116e79190810190612627565b60015460408581015190516307ca942160e41b815265ffffffffffff90911660048201529192506000916001600160a01b0390911690637ca9421090602401600060405180830381865afa158015611743573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261176b9190810190612627565b6001546060860151604051635a503f1360e01b815265ffffffffffff90911660048201529192506000916001600160a01b0390911690635a503f1390602401600060405180830381865afa1580156117c7573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526117ef9190810190612627565b600154608087015160405163a3053dd560e01b815265ffffffffffff90911660048201529192506000916001600160a01b039091169063a3053dd590602401600060405180830381865afa15801561184b573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526118739190810190612627565b60015460a088015160405163b982d1b960e01b815265ffffffffffff90911660048201529192506000916001600160a01b039091169063b982d1b990602401600060405180830381865afa1580156118cf573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526118f79190810190612627565b60408051600580825260c0820190925291925060009190816020015b6040805180820190915260608082526020820152815260200190600190039081611913579050509050604051806040016040528087815260200161195688611f7c565b8152508160008151811061196c5761196c612b96565b6020026020010181905250604051806040016040528086815260200161199187611f7c565b815250816001815181106119a7576119a7612b96565b602002602001018190525060405180604001604052808581526020016119cc86611f7c565b815250816002815181106119e2576119e2612b96565b60200260200101819052506040518060400160405280848152602001611a0785611f7c565b81525081600381518110611a1d57611a1d612b96565b60200260200101819052506040518060400160405280838152602001611a4284611f7c565b81525081600481518110611a5857611a58612b96565b6020908102919091010152979650505050505050565b6001546040805163cc2aa09160e01b815290516000926001600160a01b03169163cc2aa0919160048083019260209291908290030181865afa158015610ac6573d6000803e3d6000fd5b6000546001600160a01b03163314611ae25760405162461bcd60e51b815260040161062e906125c2565b600254600160a01b900460ff1615611b0c5760405162461bcd60e51b815260040161062e9061266f565b600154604051630cd2b82560e41b81526001600160a01b039091169063cd2b825090610bf390869086908690600401612895565b6000546001600160a01b03163314611b6a5760405162461bcd60e51b815260040161062e906125c2565b6002805460ff60a81b198116600160a81b9182900460ff1615918202179091556040518181527f360c3d72ee193226275b842f85231c259c934e85459fed80fa68e502ffa9dbde90602001610de7565b6000546001600160a01b03163314611be45760405162461bcd60e51b815260040161062e906125c2565b600254600160a01b900460ff1615611c0e5760405162461bcd60e51b815260040161062e9061266f565b600180546001600160a01b0319166001600160a01b0383169081179091556040519081527f89382d75256b43b6826ad8d6cbd8e517eaf5e10f1ef4c8f123c9a25ac4529b5590602001610de7565b6000546001600160a01b03163314611c865760405162461bcd60e51b815260040161062e906125c2565b600254600160a01b900460ff1615611cb05760405162461bcd60e51b815260040161062e9061266f565b6001546040516373ce4f5360e11b81526001600160a01b039091169063e79c9ea690610bf390869086908690600401612bac565b600154604080516375d40c0360e11b815290516000926001600160a01b03169163eba818069160048083019260209291908290030181865afa158015610ac6573d6000803e3d6000fd5b6000546001600160a01b03163314611d585760405162461bcd60e51b815260040161062e906125c2565b6001600160a01b038116611dbd5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161062e565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b03163314611e425760405162461bcd60e51b815260040161062e906125c2565b600154604051633955254b60e11b81526001600160a01b038381166004830152909116906372aa4a9690602401610665565b606081600003611e9b5750506040805180820190915260018152600360fc1b602082015290565b8160005b8115611ec55780611eaf81612bdf565b9150611ebe9050600a83612c0e565b9150611e9f565b6000816001600160401b03811115611edf57611edf61215f565b6040519080825280601f01601f191660200182016040528015611f09576020820181803683370190505b5090505b8415611f7457611f1e600183612c22565b9150611f2b600a86612c35565b611f36906030612c49565b60f81b818381518110611f4b57611f4b612b96565b60200101906001600160f81b031916908160001a905350611f6d600a86612c0e565b9450611f0d565b949350505050565b60015481516060916001600160a01b03169063bc2d45fe908490600090611fa557611fa5612b96565b01602001516040516001600160e01b031960e084901b16815260f89190911c60048201526024016106c8565b6001600160a01b0381168114611fe657600080fd5b50565b600060208284031215611ffb57600080fd5b813561090081611fd1565b60006020828403121561201857600080fd5b5035919050565b60005b8381101561203a578181015183820152602001612022565b50506000910152565b6000815180845261205b81602086016020860161201f565b601f01601f19169290920160200192915050565b6020815260006109006020830184612043565b60008083601f84011261209457600080fd5b5081356001600160401b038111156120ab57600080fd5b6020830191508360208285010111156120c357600080fd5b9250929050565b803569ffffffffffffffffffff811681146120e457600080fd5b919050565b803561ffff811681146120e457600080fd5b6000806000806060858703121561211157600080fd5b84356001600160401b0381111561212757600080fd5b61213387828801612082565b90955093506121469050602086016120ca565b9150612154604086016120e9565b905092959194509250565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b038111828210171561219d5761219d61215f565b604052919050565b803565ffffffffffff811681146120e457600080fd5b600060c082840312156121cd57600080fd5b60405160c081018181106001600160401b03821117156121ef576121ef61215f565b6040529050806121fe836121a5565b815261220c602084016121a5565b602082015261221d604084016121a5565b604082015261222e606084016121a5565b606082015261223f608084016121a5565b608082015261225060a084016121a5565b60a08201525092915050565b600060c0828403121561226e57600080fd5b61090083836121bb565b60008060e0838503121561228b57600080fd5b8235915061229c84602085016121bb565b90509250929050565b6000806000606084860312156122ba57600080fd5b83356122c581611fd1565b92506122d3602085016120ca565b91506122e1604085016120e9565b90509250925092565b600080602083850312156122fd57600080fd5b82356001600160401b0381111561231357600080fd5b61231f85828601612082565b90969095509350505050565b60006001600160401b038211156123445761234461215f565b50601f01601f191660200190565b600082601f83011261236357600080fd5b81356123766123718261232b565b612175565b81815284602083860101111561238b57600080fd5b816020850160208301376000918101602001919091529392505050565b600080600061010084860312156123be57600080fd5b83356001600160401b03808211156123d557600080fd5b6123e187838801612352565b945060208601359150808211156123f757600080fd5b5061240486828701612352565b9250506122e185604086016121bb565b803560ff811681146120e457600080fd5b6000806040838503121561243857600080fd5b61244183612414565b9150602083013561245181611fd1565b809150509250929050565b6000806020838503121561246f57600080fd5b82356001600160401b038082111561248657600080fd5b818501915085601f83011261249a57600080fd5b8135818111156124a957600080fd5b8660208260051b85010111156124be57600080fd5b60209290920196919550909350505050565b6000602082840312156124e257600080fd5b61090082612414565b60006020808301818452808551808352604092508286019150828160051b87010184880160005b8381101561256257888303603f190185528151805187855261253688860182612043565b91890151858303868b015291905061254e8183612043565b968901969450505090860190600101612512565b509098975050505050505050565b60008060006040848603121561258557600080fd5b61258e84612414565b925060208401356001600160401b038111156125a957600080fd5b6125b586828701612082565b9497909650939450505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60006126056123718461232b565b905082815283838301111561261957600080fd5b61090083602083018461201f565b60006020828403121561263957600080fd5b81516001600160401b0381111561264f57600080fd5b8201601f8101841361266057600080fd5b611f74848251602084016125f7565b60208082526010908201526f14185c9d1cc8185c99481b1bd8dad95960821b604082015260600190565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b6060815260006126d6606083018688612699565b905069ffffffffffffffffffff8416602083015261ffff8316604083015295945050505050565b6000815180845260208085019450848260051b860182860160005b8581101561276857838303895281516040815181865261273a82870182612043565b915050868201519150848103878601526127548183612043565b9a87019a9450505090840190600101612718565b5090979650505050505050565b60018060a01b0383168152604060208201526000825160408084015261279e60808401826126fd565b90506020840151603f198483030160608501526115378282612043565b600181811c908216806127cf57607f821691505b6020821081036127ef57634e487b7160e01b600052602260045260246000fd5b50919050565b6000808454612803816127bb565b6001828116801561281b57600181146128305761285f565b60ff198416875282151583028701945061285f565b8860005260208060002060005b858110156128565781548a82015290840190820161283d565b50505082870194505b50505050835161287381836020880161201f565b01949350505050565b60006020828403121561288e57600080fd5b5051919050565b6001600160a01b0393909316835269ffffffffffffffffffff91909116602083015261ffff16604082015260600190565b601f82111561290c57600081815260208120601f850160051c810160208610156128ed5750805b601f850160051c820191505b81811015610f60578281556001016128f9565b505050565b6001600160401b038311156129285761292861215f565b61293c8361293683546127bb565b836128c6565b6000601f84116001811461297057600085156129585750838201355b600019600387901b1c1916600186901b178355610693565b600083815260209020601f19861690835b828110156129a15786850135825560209485019460019092019101612981565b50868210156129be5760001960f88860031b161c19848701351681555b505060018560011b0183555050505050565b602081526000611f74602083018486612699565b60018060a01b0383168152604060208201526000825160806040840152612a0e60c0840182612043565b90506020840151603f1980858403016060860152612a2c8383612043565b92506040860151915080858403016080860152612a498383612043565b925060608601519150808584030160a08601525061153782826126fd565b60208082528181018390526000906040600585901b8401810190840186845b87811015612af557868403603f190183528135368a9003601e19018112612aac57600080fd5b890185810190356001600160401b03811115612ac757600080fd5b803603821315612ad657600080fd5b612ae1868284612699565b955050509184019190840190600101612a86565b5091979650505050505050565b68028363aba37b1b0ba160bd1b815260008251612b2681600985016020870161201f565b9190910160090192915050565b68028363aba37b1b0ba160bd1b815260008251612b5781600985016020870161201f565b7f2069732061206d656d626572206f662074686520506c75746f6361747320636c6009939091019283015250613ab160f11b6029820152602b01919050565b634e487b7160e01b600052603260045260246000fd5b60ff8416815260406020820152600061109f604083018486612699565b634e487b7160e01b600052601160045260246000fd5b600060018201612bf157612bf1612bc9565b5060010190565b634e487b7160e01b600052601260045260246000fd5b600082612c1d57612c1d612bf8565b500490565b8181038181111561070d5761070d612bc9565b600082612c4457612c44612bf8565b500690565b8082018082111561070d5761070d612bc956fea2646970667358221220c6b3bb761b75fd5e69ce24b259fa73656e0e9b56fcf697960b6e187f064cf08c64736f6c634300081300330000000000000000000000008b070e260438cb97c49543e5d8f8cf61c20b7a26000000000000000000000000e9b7451fb9cc41ed92ae5ae0bf69c06ab74be6c1
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106102955760003560e01c806373ac736b11610167578063b982d1b9116100ce578063dfe8478b11610087578063dfe8478b146105a8578063e6b1a3ae146105b0578063e79c9ea6146105c3578063eba81806146105d6578063f2fde38b146105de578063f4513a6a146105f157600080fd5b8063b982d1b914610533578063bc2d45fe14610546578063bc9f75ee14610559578063cc2aa09114610579578063cd2b825014610581578063ce2f4f531461059457600080fd5b80638da5cb5b116101205780638da5cb5b146104c357806391b7916a146104d457806394f3df61146104e7578063a18f6710146104fa578063a3053dd51461050d578063aa5bf7d81461052057600080fd5b806373ac736b1461044b578063773b97711461045e5780637ca94210146104825780638104468c146104955780638ada6b0f1461049d5780638bd54c06146104b057600080fd5b8063461fc5af1161020b5780635c97f166116101c45780635c97f166146103ef5780635e70664c146104025780636844af76146104155780636c0360eb146104285780636e85653114610430578063715018a61461044357600080fd5b8063461fc5af146103885780634daebac21461039b57806353a13a8c146103a357806355f804b3146103b657806356d3163d146103c95780635a503f13146103dc57600080fd5b8063301bd28e1161025d578063301bd28e14610306578063353c36a01461033157806342638121146103445780634479cef21461035757806344cee73c1461036d5780634531c0a81461038057600080fd5b8063010ecde71461029a57806304bde4dd146102af5780630ba3db1a146102d8578063211a643c146102eb5780632a1d0769146102fe575b600080fd5b6102ad6102a8366004611fe9565b610604565b005b6102c26102bd366004612006565b61069a565b6040516102cf919061206f565b60405180910390f35b6102ad6102e63660046120fb565b610713565b6102c26102f936600461225c565b6107d5565b6102ad610907565b600154610319906001600160a01b031681565b6040516001600160a01b0390911681526020016102cf565b6102ad61033f3660046120fb565b610999565b6102c2610352366004612278565b610a23565b61035f610a7c565b6040519081526020016102cf565b6102c261037b366004612006565b610aef565b61035f610b21565b6102ad6103963660046122a5565b610b6b565b61035f610c2a565b6102ad6103b13660046120fb565b610c74565b6102ad6103c43660046122ea565b610cfe565b6102ad6103d7366004611fe9565b610d73565b6102c26103ea366004612006565b610df2565b6102ad6103fd3660046122a5565b610e24565b6102ad6104103660046122ea565b610eac565b6102c26104233660046123a8565b610f68565b6102c26110a8565b6102ad61043e3660046122a5565b611136565b6102ad6111be565b6102ad6104593660046122a5565b611232565b60025461047290600160a01b900460ff1681565b60405190151581526020016102cf565b6102c2610490366004612006565b6112ba565b61035f6112ec565b600254610319906001600160a01b031681565b6102ad6104be366004612425565b611336565b6000546001600160a01b0316610319565b6102ad6104e236600461245c565b6113c5565b6102ad6104f53660046120fb565b61144b565b6102c2610508366004612278565b6114d5565b6102c261051b366004612006565b611541565b6102ad61052e3660046120fb565b611573565b6102c2610541366004612006565b6115fd565b6102c26105543660046124d0565b61162f565b61056c61056736600461225c565b611663565b6040516102cf91906124eb565b61035f611a6e565b6102ad61058f3660046122a5565b611ab8565b60025461047290600160a81b900460ff1681565b6102ad611b40565b6102ad6105be366004611fe9565b611bba565b6102ad6105d1366004612570565b611c5c565b61035f611ce4565b6102ad6105ec366004611fe9565b611d2e565b6102ad6105ff366004611fe9565b611e18565b6000546001600160a01b031633146106375760405162461bcd60e51b815260040161062e906125c2565b60405180910390fd5b6001546040516301b9a39760e01b81526001600160a01b038381166004830152909116906301b9a397906024015b600060405180830381600087803b15801561067f57600080fd5b505af1158015610693573d6000803e3d6000fd5b5050505050565b6001546040516304bde4dd60e01b8152600481018390526060916001600160a01b0316906304bde4dd906024015b600060405180830381865afa1580156106e5573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261070d9190810190612627565b92915050565b6000546001600160a01b0316331461073d5760405162461bcd60e51b815260040161062e906125c2565b600254600160a01b900460ff16156107675760405162461bcd60e51b815260040161062e9061266f565b6001546040516305d1ed8d60e11b81526001600160a01b0390911690630ba3db1a9061079d9087908790879087906004016126c2565b600060405180830381600087803b1580156107b757600080fd5b505af11580156107cb573d6000803e3d6000fd5b5050505050505050565b6060600060405180604001604052806107ed85611663565b815260015485516040516304bde4dd60e01b815265ffffffffffff90911660048201526020909201916001600160a01b03909116906304bde4dd90602401600060405180830381865afa158015610848573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526108709190810190612627565b90526002546040516311660d6b60e11b815291925073a8c8e1b1937cec4bb8ce41a74f1610784f5b7d73916322cc1ad6916108bb916001600160a01b03909116908590600401612775565b600060405180830381865af41580156108d8573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526109009190810190612627565b9392505050565b6000546001600160a01b031633146109315760405162461bcd60e51b815260040161062e906125c2565b600254600160a01b900460ff161561095b5760405162461bcd60e51b815260040161062e9061266f565b6002805460ff60a01b1916600160a01b1790556040517f1680ee6d421f70ed6030d2fc4fcb50217a5dd617858d56562b119eca59172e5790600090a1565b6000546001600160a01b031633146109c35760405162461bcd60e51b815260040161062e906125c2565b600254600160a01b900460ff16156109ed5760405162461bcd60e51b815260040161062e9061266f565b6001546040516301a9e1b560e51b81526001600160a01b039091169063353c36a09061079d9087908790879087906004016126c2565b600254606090600160a81b900460ff1615610a4957610a4283836114d5565b905061070d565b6003610a5484611e74565b604051602001610a659291906127f5565b604051602081830303815290604052905092915050565b6001546040805163223ce77960e11b815290516000926001600160a01b031691634479cef29160048083019260209291908290030181865afa158015610ac6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610aea919061287c565b905090565b600154604051631133b9cf60e21b8152600481018390526060916001600160a01b0316906344cee73c906024016106c8565b600154604080516308a6381560e31b815290516000926001600160a01b031691634531c0a89160048083019260209291908290030181865afa158015610ac6573d6000803e3d6000fd5b6000546001600160a01b03163314610b955760405162461bcd60e51b815260040161062e906125c2565b600254600160a01b900460ff1615610bbf5760405162461bcd60e51b815260040161062e9061266f565b60015460405163461fc5af60e01b81526001600160a01b039091169063461fc5af90610bf390869086908690600401612895565b600060405180830381600087803b158015610c0d57600080fd5b505af1158015610c21573d6000803e3d6000fd5b50505050505050565b600154604080516326d75d6160e11b815290516000926001600160a01b031691634daebac29160048083019260209291908290030181865afa158015610ac6573d6000803e3d6000fd5b6000546001600160a01b03163314610c9e5760405162461bcd60e51b815260040161062e906125c2565b600254600160a01b900460ff1615610cc85760405162461bcd60e51b815260040161062e9061266f565b6001546040516314e84ea360e21b81526001600160a01b03909116906353a13a8c9061079d9087908790879087906004016126c2565b6000546001600160a01b03163314610d285760405162461bcd60e51b815260040161062e906125c2565b6003610d35828483612911565b507f6741b2fc379fad678116fe3d4d4b9a1a184ab53ba36b86ad0fa66340b1ab41ad8282604051610d679291906129d0565b60405180910390a15050565b6000546001600160a01b03163314610d9d5760405162461bcd60e51b815260040161062e906125c2565b600280546001600160a01b0319166001600160a01b0383169081179091556040519081527f482cbbbcf912da3be80deb8503ae1e94c0b7d5d1d0ec0af3d9d6403e06e609ee906020015b60405180910390a150565b600154604051635a503f1360e01b8152600481018390526060916001600160a01b031690635a503f13906024016106c8565b6000546001600160a01b03163314610e4e5760405162461bcd60e51b815260040161062e906125c2565b600254600160a01b900460ff1615610e785760405162461bcd60e51b815260040161062e9061266f565b600154604051632e4bf8b360e11b81526001600160a01b0390911690635c97f16690610bf390869086908690600401612895565b6000546001600160a01b03163314610ed65760405162461bcd60e51b815260040161062e906125c2565b600254600160a01b900460ff1615610f005760405162461bcd60e51b815260040161062e9061266f565b60015460405163179c199360e21b81526001600160a01b0390911690635e70664c90610f3290859085906004016129d0565b600060405180830381600087803b158015610f4c57600080fd5b505af1158015610f60573d6000803e3d6000fd5b505050505050565b6040805160808101825284815260208101849052600154835183516304bde4dd60e01b815265ffffffffffff909116600482015260609360009392908301916001600160a01b03909116906304bde4dd90602401600060405180830381865afa158015610fd9573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526110019190810190612627565b815260200161100f85611663565b905260025460405163092ba0e960e41b815291925073a8c8e1b1937cec4bb8ce41a74f1610784f5b7d73916392ba0e909161105a916001600160a01b039091169085906004016129e4565b600060405180830381865af4158015611077573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261109f9190810190612627565b95945050505050565b600380546110b5906127bb565b80601f01602080910402602001604051908101604052809291908181526020018280546110e1906127bb565b801561112e5780601f106111035761010080835404028352916020019161112e565b820191906000526020600020905b81548152906001019060200180831161111157829003601f168201915b505050505081565b6000546001600160a01b031633146111605760405162461bcd60e51b815260040161062e906125c2565b600254600160a01b900460ff161561118a5760405162461bcd60e51b815260040161062e9061266f565b600154604051636e85653160e01b81526001600160a01b0390911690636e85653190610bf390869086908690600401612895565b6000546001600160a01b031633146111e85760405162461bcd60e51b815260040161062e906125c2565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b0316331461125c5760405162461bcd60e51b815260040161062e906125c2565b600254600160a01b900460ff16156112865760405162461bcd60e51b815260040161062e9061266f565b6001546040516373ac736b60e01b81526001600160a01b03909116906373ac736b90610bf390869086908690600401612895565b6001546040516307ca942160e41b8152600481018390526060916001600160a01b031690637ca94210906024016106c8565b6001546040805163204111a360e21b815290516000926001600160a01b031691638104468c9160048083019260209291908290030181865afa158015610ac6573d6000803e3d6000fd5b6000546001600160a01b031633146113605760405162461bcd60e51b815260040161062e906125c2565b600254600160a01b900460ff161561138a5760405162461bcd60e51b815260040161062e9061266f565b6001546040516345eaa60360e11b815260ff841660048201526001600160a01b03838116602483015290911690638bd54c0690604401610f32565b6000546001600160a01b031633146113ef5760405162461bcd60e51b815260040161062e906125c2565b600254600160a01b900460ff16156114195760405162461bcd60e51b815260040161062e9061266f565b6001546040516348dbc8b560e11b81526001600160a01b03909116906391b7916a90610f329085908590600401612a67565b6000546001600160a01b031633146114755760405162461bcd60e51b815260040161062e906125c2565b600254600160a01b900460ff161561149f5760405162461bcd60e51b815260040161062e9061266f565b6001546040516394f3df6160e01b81526001600160a01b03909116906394f3df619061079d9087908790879087906004016126c2565b606060006114e284611e74565b90506000816040516020016114f79190612b02565b604051602081830303815290604052905060008260405160200161151b9190612b33565b6040516020818303038152906040529050611537828287610f68565b9695505050505050565b60015460405163a3053dd560e01b8152600481018390526060916001600160a01b03169063a3053dd5906024016106c8565b6000546001600160a01b0316331461159d5760405162461bcd60e51b815260040161062e906125c2565b600254600160a01b900460ff16156115c75760405162461bcd60e51b815260040161062e9061266f565b60015460405163154b7efb60e31b81526001600160a01b039091169063aa5bf7d89061079d9087908790879087906004016126c2565b60015460405163b982d1b960e01b8152600481018390526060916001600160a01b03169063b982d1b9906024016106c8565b600154604051635e16a2ff60e11b815260ff831660048201526060916001600160a01b03169063bc2d45fe906024016106c8565b6001546020820151604051631133b9cf60e21b815265ffffffffffff90911660048201526060916000916001600160a01b03909116906344cee73c90602401600060405180830381865afa1580156116bf573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526116e79190810190612627565b60015460408581015190516307ca942160e41b815265ffffffffffff90911660048201529192506000916001600160a01b0390911690637ca9421090602401600060405180830381865afa158015611743573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261176b9190810190612627565b6001546060860151604051635a503f1360e01b815265ffffffffffff90911660048201529192506000916001600160a01b0390911690635a503f1390602401600060405180830381865afa1580156117c7573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526117ef9190810190612627565b600154608087015160405163a3053dd560e01b815265ffffffffffff90911660048201529192506000916001600160a01b039091169063a3053dd590602401600060405180830381865afa15801561184b573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526118739190810190612627565b60015460a088015160405163b982d1b960e01b815265ffffffffffff90911660048201529192506000916001600160a01b039091169063b982d1b990602401600060405180830381865afa1580156118cf573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526118f79190810190612627565b60408051600580825260c0820190925291925060009190816020015b6040805180820190915260608082526020820152815260200190600190039081611913579050509050604051806040016040528087815260200161195688611f7c565b8152508160008151811061196c5761196c612b96565b6020026020010181905250604051806040016040528086815260200161199187611f7c565b815250816001815181106119a7576119a7612b96565b602002602001018190525060405180604001604052808581526020016119cc86611f7c565b815250816002815181106119e2576119e2612b96565b60200260200101819052506040518060400160405280848152602001611a0785611f7c565b81525081600381518110611a1d57611a1d612b96565b60200260200101819052506040518060400160405280838152602001611a4284611f7c565b81525081600481518110611a5857611a58612b96565b6020908102919091010152979650505050505050565b6001546040805163cc2aa09160e01b815290516000926001600160a01b03169163cc2aa0919160048083019260209291908290030181865afa158015610ac6573d6000803e3d6000fd5b6000546001600160a01b03163314611ae25760405162461bcd60e51b815260040161062e906125c2565b600254600160a01b900460ff1615611b0c5760405162461bcd60e51b815260040161062e9061266f565b600154604051630cd2b82560e41b81526001600160a01b039091169063cd2b825090610bf390869086908690600401612895565b6000546001600160a01b03163314611b6a5760405162461bcd60e51b815260040161062e906125c2565b6002805460ff60a81b198116600160a81b9182900460ff1615918202179091556040518181527f360c3d72ee193226275b842f85231c259c934e85459fed80fa68e502ffa9dbde90602001610de7565b6000546001600160a01b03163314611be45760405162461bcd60e51b815260040161062e906125c2565b600254600160a01b900460ff1615611c0e5760405162461bcd60e51b815260040161062e9061266f565b600180546001600160a01b0319166001600160a01b0383169081179091556040519081527f89382d75256b43b6826ad8d6cbd8e517eaf5e10f1ef4c8f123c9a25ac4529b5590602001610de7565b6000546001600160a01b03163314611c865760405162461bcd60e51b815260040161062e906125c2565b600254600160a01b900460ff1615611cb05760405162461bcd60e51b815260040161062e9061266f565b6001546040516373ce4f5360e11b81526001600160a01b039091169063e79c9ea690610bf390869086908690600401612bac565b600154604080516375d40c0360e11b815290516000926001600160a01b03169163eba818069160048083019260209291908290030181865afa158015610ac6573d6000803e3d6000fd5b6000546001600160a01b03163314611d585760405162461bcd60e51b815260040161062e906125c2565b6001600160a01b038116611dbd5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161062e565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b03163314611e425760405162461bcd60e51b815260040161062e906125c2565b600154604051633955254b60e11b81526001600160a01b038381166004830152909116906372aa4a9690602401610665565b606081600003611e9b5750506040805180820190915260018152600360fc1b602082015290565b8160005b8115611ec55780611eaf81612bdf565b9150611ebe9050600a83612c0e565b9150611e9f565b6000816001600160401b03811115611edf57611edf61215f565b6040519080825280601f01601f191660200182016040528015611f09576020820181803683370190505b5090505b8415611f7457611f1e600183612c22565b9150611f2b600a86612c35565b611f36906030612c49565b60f81b818381518110611f4b57611f4b612b96565b60200101906001600160f81b031916908160001a905350611f6d600a86612c0e565b9450611f0d565b949350505050565b60015481516060916001600160a01b03169063bc2d45fe908490600090611fa557611fa5612b96565b01602001516040516001600160e01b031960e084901b16815260f89190911c60048201526024016106c8565b6001600160a01b0381168114611fe657600080fd5b50565b600060208284031215611ffb57600080fd5b813561090081611fd1565b60006020828403121561201857600080fd5b5035919050565b60005b8381101561203a578181015183820152602001612022565b50506000910152565b6000815180845261205b81602086016020860161201f565b601f01601f19169290920160200192915050565b6020815260006109006020830184612043565b60008083601f84011261209457600080fd5b5081356001600160401b038111156120ab57600080fd5b6020830191508360208285010111156120c357600080fd5b9250929050565b803569ffffffffffffffffffff811681146120e457600080fd5b919050565b803561ffff811681146120e457600080fd5b6000806000806060858703121561211157600080fd5b84356001600160401b0381111561212757600080fd5b61213387828801612082565b90955093506121469050602086016120ca565b9150612154604086016120e9565b905092959194509250565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b038111828210171561219d5761219d61215f565b604052919050565b803565ffffffffffff811681146120e457600080fd5b600060c082840312156121cd57600080fd5b60405160c081018181106001600160401b03821117156121ef576121ef61215f565b6040529050806121fe836121a5565b815261220c602084016121a5565b602082015261221d604084016121a5565b604082015261222e606084016121a5565b606082015261223f608084016121a5565b608082015261225060a084016121a5565b60a08201525092915050565b600060c0828403121561226e57600080fd5b61090083836121bb565b60008060e0838503121561228b57600080fd5b8235915061229c84602085016121bb565b90509250929050565b6000806000606084860312156122ba57600080fd5b83356122c581611fd1565b92506122d3602085016120ca565b91506122e1604085016120e9565b90509250925092565b600080602083850312156122fd57600080fd5b82356001600160401b0381111561231357600080fd5b61231f85828601612082565b90969095509350505050565b60006001600160401b038211156123445761234461215f565b50601f01601f191660200190565b600082601f83011261236357600080fd5b81356123766123718261232b565b612175565b81815284602083860101111561238b57600080fd5b816020850160208301376000918101602001919091529392505050565b600080600061010084860312156123be57600080fd5b83356001600160401b03808211156123d557600080fd5b6123e187838801612352565b945060208601359150808211156123f757600080fd5b5061240486828701612352565b9250506122e185604086016121bb565b803560ff811681146120e457600080fd5b6000806040838503121561243857600080fd5b61244183612414565b9150602083013561245181611fd1565b809150509250929050565b6000806020838503121561246f57600080fd5b82356001600160401b038082111561248657600080fd5b818501915085601f83011261249a57600080fd5b8135818111156124a957600080fd5b8660208260051b85010111156124be57600080fd5b60209290920196919550909350505050565b6000602082840312156124e257600080fd5b61090082612414565b60006020808301818452808551808352604092508286019150828160051b87010184880160005b8381101561256257888303603f190185528151805187855261253688860182612043565b91890151858303868b015291905061254e8183612043565b968901969450505090860190600101612512565b509098975050505050505050565b60008060006040848603121561258557600080fd5b61258e84612414565b925060208401356001600160401b038111156125a957600080fd5b6125b586828701612082565b9497909650939450505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60006126056123718461232b565b905082815283838301111561261957600080fd5b61090083602083018461201f565b60006020828403121561263957600080fd5b81516001600160401b0381111561264f57600080fd5b8201601f8101841361266057600080fd5b611f74848251602084016125f7565b60208082526010908201526f14185c9d1cc8185c99481b1bd8dad95960821b604082015260600190565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b6060815260006126d6606083018688612699565b905069ffffffffffffffffffff8416602083015261ffff8316604083015295945050505050565b6000815180845260208085019450848260051b860182860160005b8581101561276857838303895281516040815181865261273a82870182612043565b915050868201519150848103878601526127548183612043565b9a87019a9450505090840190600101612718565b5090979650505050505050565b60018060a01b0383168152604060208201526000825160408084015261279e60808401826126fd565b90506020840151603f198483030160608501526115378282612043565b600181811c908216806127cf57607f821691505b6020821081036127ef57634e487b7160e01b600052602260045260246000fd5b50919050565b6000808454612803816127bb565b6001828116801561281b57600181146128305761285f565b60ff198416875282151583028701945061285f565b8860005260208060002060005b858110156128565781548a82015290840190820161283d565b50505082870194505b50505050835161287381836020880161201f565b01949350505050565b60006020828403121561288e57600080fd5b5051919050565b6001600160a01b0393909316835269ffffffffffffffffffff91909116602083015261ffff16604082015260600190565b601f82111561290c57600081815260208120601f850160051c810160208610156128ed5750805b601f850160051c820191505b81811015610f60578281556001016128f9565b505050565b6001600160401b038311156129285761292861215f565b61293c8361293683546127bb565b836128c6565b6000601f84116001811461297057600085156129585750838201355b600019600387901b1c1916600186901b178355610693565b600083815260209020601f19861690835b828110156129a15786850135825560209485019460019092019101612981565b50868210156129be5760001960f88860031b161c19848701351681555b505060018560011b0183555050505050565b602081526000611f74602083018486612699565b60018060a01b0383168152604060208201526000825160806040840152612a0e60c0840182612043565b90506020840151603f1980858403016060860152612a2c8383612043565b92506040860151915080858403016080860152612a498383612043565b925060608601519150808584030160a08601525061153782826126fd565b60208082528181018390526000906040600585901b8401810190840186845b87811015612af557868403603f190183528135368a9003601e19018112612aac57600080fd5b890185810190356001600160401b03811115612ac757600080fd5b803603821315612ad657600080fd5b612ae1868284612699565b955050509184019190840190600101612a86565b5091979650505050505050565b68028363aba37b1b0ba160bd1b815260008251612b2681600985016020870161201f565b9190910160090192915050565b68028363aba37b1b0ba160bd1b815260008251612b5781600985016020870161201f565b7f2069732061206d656d626572206f662074686520506c75746f6361747320636c6009939091019283015250613ab160f11b6029820152602b01919050565b634e487b7160e01b600052603260045260246000fd5b60ff8416815260406020820152600061109f604083018486612699565b634e487b7160e01b600052601160045260246000fd5b600060018201612bf157612bf1612bc9565b5060010190565b634e487b7160e01b600052601260045260246000fd5b600082612c1d57612c1d612bf8565b500490565b8181038181111561070d5761070d612bc9565b600082612c4457612c44612bf8565b500690565b8082018082111561070d5761070d612bc956fea2646970667358221220c6b3bb761b75fd5e69ce24b259fa73656e0e9b56fcf697960b6e187f064cf08c64736f6c63430008130033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000008b070e260438cb97c49543e5d8f8cf61c20b7a26000000000000000000000000e9b7451fb9cc41ed92ae5ae0bf69c06ab74be6c1
-----Decoded View---------------
Arg [0] : _art (address): 0x8B070e260438cB97C49543e5D8f8Cf61c20B7A26
Arg [1] : _renderer (address): 0xE9b7451fb9cC41Ed92AE5Ae0bF69c06AB74bE6c1
-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 0000000000000000000000008b070e260438cb97c49543e5d8f8cf61c20b7a26
Arg [1] : 000000000000000000000000e9b7451fb9cc41ed92ae5ae0bf69c06ab74be6c1
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 35 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.