Source Code
Overview
ETH Balance
0 ETH
Token Holdings
More Info
ContractCreator
TokenTracker
Multi Chain
Multichain Addresses
0 address found via
Latest 25 from a total of 16,427 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
Value | ||||
---|---|---|---|---|---|---|---|---|---|
Update Project S... | 10119544 | 2 days 1 hr ago | IN | 0 ETH | 0.00446278 | ||||
Update Project S... | 10119427 | 2 days 2 hrs ago | IN | 0 ETH | 0.00446278 | ||||
Update Project S... | 10119423 | 2 days 2 hrs ago | IN | 0 ETH | 0.00590844 | ||||
Update Project S... | 10119071 | 2 days 3 hrs ago | IN | 0 ETH | 0.00443158 | ||||
Update Project S... | 10119063 | 2 days 3 hrs ago | IN | 0 ETH | 0.00592214 | ||||
Update Project S... | 10117961 | 2 days 8 hrs ago | IN | 0 ETH | 0.00623874 | ||||
Update Project S... | 10117953 | 2 days 8 hrs ago | IN | 0 ETH | 0.00399766 | ||||
Update Project D... | 10114847 | 2 days 21 hrs ago | IN | 0 ETH | 0.00094079 | ||||
Add Project Scri... | 10114758 | 2 days 21 hrs ago | IN | 0 ETH | 0.00638457 | ||||
Update Project S... | 10114751 | 2 days 22 hrs ago | IN | 0 ETH | 0.00803787 | ||||
Update Project S... | 10114746 | 2 days 22 hrs ago | IN | 0 ETH | 0.00805061 | ||||
Update Project S... | 10114741 | 2 days 22 hrs ago | IN | 0 ETH | 0.00783522 | ||||
Update Project S... | 10114737 | 2 days 22 hrs ago | IN | 0 ETH | 0.00808633 | ||||
Update Project S... | 10114732 | 2 days 22 hrs ago | IN | 0 ETH | 0.00810192 | ||||
Update Project S... | 10114727 | 2 days 22 hrs ago | IN | 0 ETH | 0.00792858 | ||||
Update Project S... | 10114721 | 2 days 22 hrs ago | IN | 0 ETH | 0.00771986 | ||||
Update Project S... | 10114714 | 2 days 22 hrs ago | IN | 0 ETH | 0.00746719 | ||||
Update Project S... | 10114709 | 2 days 22 hrs ago | IN | 0 ETH | 0.0076335 | ||||
Update Project S... | 10114703 | 2 days 22 hrs ago | IN | 0 ETH | 0.00808728 | ||||
Update Project S... | 10114697 | 2 days 22 hrs ago | IN | 0 ETH | 0.0077619 | ||||
Remove Project L... | 10114690 | 2 days 22 hrs ago | IN | 0 ETH | 0.00006338 | ||||
Update Project D... | 10114382 | 2 days 23 hrs ago | IN | 0 ETH | 0.0009437 | ||||
Update Project S... | 10105765 | 4 days 12 hrs ago | IN | 0 ETH | 0.00487732 | ||||
Update Project S... | 10105760 | 4 days 12 hrs ago | IN | 0 ETH | 0.00515909 | ||||
Update Project S... | 10101821 | 5 days 5 hrs ago | IN | 0 ETH | 0.00297788 |
Latest 25 internal transactions (View All)
Advanced mode:
Parent Txn Hash | Block | From | To | Value | ||
---|---|---|---|---|---|---|
10119544 | 2 days 1 hr ago | Contract Creation | 0 ETH | |||
10119544 | 2 days 1 hr ago | 0 ETH | ||||
10119544 | 2 days 1 hr ago | 0 ETH | ||||
10119427 | 2 days 2 hrs ago | Contract Creation | 0 ETH | |||
10119427 | 2 days 2 hrs ago | 0 ETH | ||||
10119427 | 2 days 2 hrs ago | 0 ETH | ||||
10119423 | 2 days 2 hrs ago | Contract Creation | 0 ETH | |||
10119423 | 2 days 2 hrs ago | 0 ETH | ||||
10119423 | 2 days 2 hrs ago | 0 ETH | ||||
10119071 | 2 days 3 hrs ago | Contract Creation | 0 ETH | |||
10119071 | 2 days 3 hrs ago | 0 ETH | ||||
10119071 | 2 days 3 hrs ago | 0 ETH | ||||
10119063 | 2 days 3 hrs ago | Contract Creation | 0 ETH | |||
10119063 | 2 days 3 hrs ago | 0 ETH | ||||
10119063 | 2 days 3 hrs ago | 0 ETH | ||||
10117961 | 2 days 8 hrs ago | Contract Creation | 0 ETH | |||
10117961 | 2 days 8 hrs ago | 0 ETH | ||||
10117961 | 2 days 8 hrs ago | 0 ETH | ||||
10117953 | 2 days 8 hrs ago | Contract Creation | 0 ETH | |||
10117953 | 2 days 8 hrs ago | 0 ETH | ||||
10117953 | 2 days 8 hrs ago | 0 ETH | ||||
10116911 | 2 days 12 hrs ago | 0 ETH | ||||
10116911 | 2 days 12 hrs ago | 0 ETH | ||||
10114758 | 2 days 21 hrs ago | Contract Creation | 0 ETH | |||
10114751 | 2 days 22 hrs ago | Contract Creation | 0 ETH |
Loading...
Loading
Contract Name:
GenArt721CoreV3
Compiler Version
v0.8.17+commit.8df45f5f
Optimization Enabled:
Yes with 25 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: LGPL-3.0-only pragma solidity 0.8.17; // Created By: Art Blocks Inc. import "./interfaces/0.8.x/IRandomizerV2.sol"; import "./interfaces/0.8.x/IAdminACLV0.sol"; import "./interfaces/0.8.x/IGenArt721CoreContractV3.sol"; import "./interfaces/0.8.x/IManifold.sol"; import "@openzeppelin-4.7/contracts/utils/Strings.sol"; import "@openzeppelin-4.7/contracts/access/Ownable.sol"; import "./libs/0.8.x/ERC721_PackedHashSeed.sol"; import "./libs/0.8.x/BytecodeStorage.sol"; import "./libs/0.8.x/Bytes32Strings.sol"; /** * @title Art Blocks ERC-721 core contract, V3. * @author Art Blocks Inc. * @notice Privileged Roles and Ownership: * This contract is designed to be managed, with progressively limited powers * as a project progresses from active to locked. * Privileged roles and abilities are controlled by the admin ACL contract and * artists. Both of these roles hold extensive power and can arbitrarily * control and modify portions of projects, dependent upon project state. After * a project is locked, important project metadata fields are locked including * the project name, artist name, and script and display details. Edition size * can never be increased. * Care must be taken to ensure that the admin ACL contract and artist * addresses are secure behind a multi-sig or other access control mechanism. * ---------------------------------------------------------------------------- * The following functions are restricted to the Admin ACL contract: * - updateArtblocksCurationRegistryAddress * - updateArtblocksDependencyRegistryAddress * - updateArtblocksPrimarySalesAddress * - updateArtblocksSecondarySalesAddress * - updateArtblocksPrimarySalesPercentage (up to 25%) * - updateArtblocksSecondarySalesBPS (up to 100%) * - updateMinterContract * - updateRandomizerAddress * - toggleProjectIsActive * - addProject * - forbidNewProjects (forever forbidding new projects) * - updateDefaultBaseURI (used to initialize new project base URIs) * ---------------------------------------------------------------------------- * The following functions are restricted to either the the Artist address or * the Admin ACL contract, only when the project is not locked: * - updateProjectName * - updateProjectArtistName * - updateProjectLicense * - Change project script via addProjectScript, updateProjectScript, * and removeProjectLastScript * - updateProjectScriptType * - updateProjectAspectRatio * ---------------------------------------------------------------------------- * The following functions are restricted to only the Artist address: * - proposeArtistPaymentAddressesAndSplits (note that this has to be accepted * by adminAcceptArtistAddressesAndSplits to take effect, which is restricted * to the Admin ACL contract, or the artist if the core contract owner has * renounced ownership) * - toggleProjectIsPaused (note the artist can still mint while paused) * - updateProjectSecondaryMarketRoyaltyPercentage (up to ARTIST_MAX_SECONDARY_ROYALTY_PERCENTAGE percent) * - updateProjectWebsite * - updateProjectMaxInvocations (to a number greater than or equal to the * current number of invocations, and less than current project maximum * invocations) * - updateProjectBaseURI (controlling the base URI for tokens in the project) * ---------------------------------------------------------------------------- * The following function is restricted to either the Admin ACL contract, or * the Artist address if the core contract owner has renounced ownership: * - adminAcceptArtistAddressesAndSplits * - updateProjectArtistAddress (owner ultimately controlling the project and * its and-on revenue, unless owner has renounced ownership) * ---------------------------------------------------------------------------- * The following function is restricted to the artist when a project is * unlocked, and only callable by Admin ACL contract when a project is locked: * - updateProjectDescription * ---------------------------------------------------------------------------- * The following function is restricted to owner calling directly: * - transferOwnership * - renounceOwnership * ---------------------------------------------------------------------------- * Additional admin and artist privileged roles may be described on minters, * registries, and other contracts that may interact with this core contract. */ contract GenArt721CoreV3 is ERC721_PackedHashSeed, Ownable, IGenArt721CoreContractV3 { using BytecodeStorage for string; using BytecodeStorage for address; using Bytes32Strings for bytes32; using Strings for uint256; uint256 constant ONE_HUNDRED = 100; uint256 constant ONE_MILLION = 1_000_000; uint24 constant ONE_MILLION_UINT24 = 1_000_000; uint256 constant FOUR_WEEKS_IN_SECONDS = 2_419_200; uint8 constant AT_CHARACTER_CODE = uint8(bytes1("@")); // 0x40 // numeric constants uint256 constant ART_BLOCKS_MAX_PRIMARY_SALES_PERCENTAGE = 25; // 25% uint256 constant ART_BLOCKS_MAX_SECONDARY_SALES_BPS = 10000; // 10_000 BPS = 100% uint256 constant ARTIST_MAX_SECONDARY_ROYALTY_PERCENTAGE = 95; // 95% // This contract emits generic events that contain fields that indicate // which parameter has been updated. This is sufficient for application // state management, while also simplifying the contract and indexing code. // This was done as an alternative to having custom events that emit what // field-values have changed for each event, given that changed values can // be introspected by indexers due to the design of this smart contract // exposing these state changes via publicly viewable fields. // // The following fields are used to indicate which contract-level parameter // has been updated in the `PlatformUpdated` event: bytes32 constant FIELD_NEXT_PROJECT_ID = "nextProjectId"; bytes32 constant FIELD_NEW_PROJECTS_FORBIDDEN = "newProjectsForbidden"; bytes32 constant FIELD_DEFAULT_BASE_URI = "defaultBaseURI"; bytes32 constant FIELD_ARTBLOCKS_PRIMARY_SALES_ADDRESS = "artblocksPrimarySalesAddress"; bytes32 constant FIELD_ARTBLOCKS_SECONDARY_SALES_ADDRESS = "artblocksSecondarySalesAddress"; bytes32 constant FIELD_RANDOMIZER_ADDRESS = "randomizerAddress"; bytes32 constant FIELD_ARTBLOCKS_CURATION_REGISTRY_ADDRESS = "curationRegistryAddress"; bytes32 constant FIELD_ARTBLOCKS_DEPENDENCY_REGISTRY_ADDRESS = "dependencyRegistryAddress"; bytes32 constant FIELD_ARTBLOCKS_PRIMARY_SALES_PERCENTAGE = "artblocksPrimaryPercentage"; bytes32 constant FIELD_ARTBLOCKS_SECONDARY_SALES_BPS = "artblocksSecondaryBPS"; // The following fields are used to indicate which project-level parameter // has been updated in the `ProjectUpdated` event: bytes32 constant FIELD_PROJECT_COMPLETED = "completed"; bytes32 constant FIELD_PROJECT_ACTIVE = "active"; bytes32 constant FIELD_PROJECT_ARTIST_ADDRESS = "artistAddress"; bytes32 constant FIELD_PROJECT_PAUSED = "paused"; bytes32 constant FIELD_PROJECT_CREATED = "created"; bytes32 constant FIELD_PROJECT_NAME = "name"; bytes32 constant FIELD_PROJECT_ARTIST_NAME = "artistName"; bytes32 constant FIELD_PROJECT_SECONDARY_MARKET_ROYALTY_PERCENTAGE = "royaltyPercentage"; bytes32 constant FIELD_PROJECT_DESCRIPTION = "description"; bytes32 constant FIELD_PROJECT_WEBSITE = "website"; bytes32 constant FIELD_PROJECT_LICENSE = "license"; bytes32 constant FIELD_PROJECT_MAX_INVOCATIONS = "maxInvocations"; bytes32 constant FIELD_PROJECT_SCRIPT = "script"; bytes32 constant FIELD_PROJECT_SCRIPT_TYPE = "scriptType"; bytes32 constant FIELD_PROJECT_ASPECT_RATIO = "aspectRatio"; bytes32 constant FIELD_PROJECT_BASE_URI = "baseURI"; // Art Blocks previous flagship ERC721 token addresses (for reference) /// Art Blocks Project ID range: [0-2] address public constant ART_BLOCKS_ERC721TOKEN_ADDRESS_V0 = 0x059EDD72Cd353dF5106D2B9cC5ab83a52287aC3a; /// Art Blocks Project ID range: [3-373] address public constant ART_BLOCKS_ERC721TOKEN_ADDRESS_V1 = 0xa7d8d9ef8D8Ce8992Df33D8b8CF4Aebabd5bD270; /// Curation registry managed by Art Blocks address public artblocksCurationRegistryAddress; /// Dependency registry managed by Art Blocks address public artblocksDependencyRegistryAddress; /// current randomizer contract IRandomizerV2 public randomizerContract; /// append-only array of all randomizer contract addresses ever used by /// this contract address[] private _historicalRandomizerAddresses; /// admin ACL contract IAdminACLV0 public adminACLContract; struct Project { uint24 invocations; uint24 maxInvocations; uint24 scriptCount; // max uint64 ~= 1.8e19 sec ~= 570 billion years uint64 completedTimestamp; bool active; bool paused; string name; string artist; string description; string website; string license; string projectBaseURI; bytes32 scriptTypeAndVersion; string aspectRatio; // mapping from script index to address storing script in bytecode mapping(uint256 => address) scriptBytecodeAddresses; } mapping(uint256 => Project) projects; /// packed struct containing project financial information struct ProjectFinance { address payable additionalPayeePrimarySales; // packed uint: max of 95, max uint8 = 255 uint8 secondaryMarketRoyaltyPercentage; address payable additionalPayeeSecondarySales; // packed uint: max of 100, max uint8 = 255 uint8 additionalPayeeSecondarySalesPercentage; address payable artistAddress; // packed uint: max of 100, max uint8 = 255 uint8 additionalPayeePrimarySalesPercentage; } // Project financials mapping mapping(uint256 => ProjectFinance) projectIdToFinancials; /// hash of artist's proposed payment updates to be approved by admin mapping(uint256 => bytes32) public proposedArtistAddressesAndSplitsHash; /// Art Blocks payment address for all primary sales revenues (packed) address payable public artblocksPrimarySalesAddress; /// Percentage of primary sales revenue allocated to Art Blocks (packed) // packed uint: max of 25, max uint8 = 255 uint8 private _artblocksPrimarySalesPercentage = 10; /// Art Blocks payment address for all secondary sales royalty revenues address payable public artblocksSecondarySalesAddress; /// Basis Points of secondary sales royalties allocated to Art Blocks uint256 public artblocksSecondarySalesBPS = 250; /// single minter allowed for this core contract address public minterContract; /// starting (initial) project ID on this contract uint256 public immutable startingProjectId; /// next project ID to be created uint248 private _nextProjectId; /// bool indicating if adding new projects is forbidden; /// default behavior is to allow new projects bool public newProjectsForbidden; /// version & type of this core contract string public constant coreVersion = "v3.0.0"; string public constant coreType = "GenArt721CoreV3"; /// default base URI to initialize all new project projectBaseURI values to string public defaultBaseURI; modifier onlyNonZeroAddress(address _address) { require(_address != address(0), "Must input non-zero address"); _; } modifier onlyNonEmptyString(string memory _string) { require(bytes(_string).length != 0, "Must input non-empty string"); _; } modifier onlyValidTokenId(uint256 _tokenId) { require(_exists(_tokenId), "Token ID does not exist"); _; } modifier onlyValidProjectId(uint256 _projectId) { require( (_projectId >= startingProjectId) && (_projectId < _nextProjectId), "Project ID does not exist" ); _; } modifier onlyUnlocked(uint256 _projectId) { // Note: calling `_projectUnlocked` enforces that the `_projectId` // passed in is valid.` require(_projectUnlocked(_projectId), "Only if unlocked"); _; } modifier onlyAdminACL(bytes4 _selector) { require( adminACLAllowed(msg.sender, address(this), _selector), "Only Admin ACL allowed" ); _; } modifier onlyArtist(uint256 _projectId) { require( msg.sender == projectIdToFinancials[_projectId].artistAddress, "Only artist" ); _; } modifier onlyArtistOrAdminACL(uint256 _projectId, bytes4 _selector) { require( msg.sender == projectIdToFinancials[_projectId].artistAddress || adminACLAllowed(msg.sender, address(this), _selector), "Only artist or Admin ACL allowed" ); _; } /** * This modifier allows the artist of a project to call a function if the * owner of the contract has renounced ownership. This is to allow the * contract to continue to function if the owner decides to renounce * ownership. */ modifier onlyAdminACLOrRenouncedArtist( uint256 _projectId, bytes4 _selector ) { require( adminACLAllowed(msg.sender, address(this), _selector) || (owner() == address(0) && msg.sender == projectIdToFinancials[_projectId].artistAddress), "Only Admin ACL allowed, or artist if owner has renounced" ); _; } /** * @notice Initializes contract. * @param _tokenName Name of token. * @param _tokenSymbol Token symbol. * @param _randomizerContract Randomizer contract. * @param _adminACLContract Address of admin access control contract, to be * set as contract owner. * @param _startingProjectId The initial next project ID. * @dev _startingProjectId should be set to a value much, much less than * max(uint248), but an explicit input type of `uint248` is used as it is * safer to cast up to `uint256` than it is to cast down for the purposes * of setting `_nextProjectId`. */ constructor( string memory _tokenName, string memory _tokenSymbol, address _randomizerContract, address _adminACLContract, uint248 _startingProjectId ) ERC721_PackedHashSeed(_tokenName, _tokenSymbol) onlyNonZeroAddress(_randomizerContract) { // record contracts starting project ID // casting-up is safe startingProjectId = uint256(_startingProjectId); _updateArtblocksPrimarySalesAddress(msg.sender); _updateArtblocksSecondarySalesAddress(msg.sender); _updateRandomizerAddress(_randomizerContract); // set AdminACL management contract as owner _transferOwnership(_adminACLContract); // initialize default base URI _updateDefaultBaseURI("https://token.artblocks.io/"); // initialize next project ID _nextProjectId = _startingProjectId; emit PlatformUpdated(FIELD_NEXT_PROJECT_ID); } /** * @notice Mints a token from project `_projectId` and sets the * token's owner to `_to`. Hash may or may not be assigned to the token * during the mint transaction, depending on the randomizer contract. * @param _to Address to be the minted token's owner. * @param _projectId Project ID to mint a token on. * @param _by Purchaser of minted token. * @return _tokenId The ID of the minted token. * @dev sender must be the allowed minterContract * @dev name of function is optimized for gas usage */ function mint_Ecf( address _to, uint256 _projectId, address _by ) external returns (uint256 _tokenId) { // CHECKS require(msg.sender == minterContract, "Must mint from minter contract"); Project storage project = projects[_projectId]; // load invocations into memory uint24 invocationsBefore = project.invocations; uint24 invocationsAfter; unchecked { // invocationsBefore guaranteed <= maxInvocations <= 1_000_000, // 1_000_000 << max uint24, so no possible overflow invocationsAfter = invocationsBefore + 1; } uint24 maxInvocations = project.maxInvocations; require( invocationsBefore < maxInvocations, "Must not exceed max invocations" ); require( project.active || _by == projectIdToFinancials[_projectId].artistAddress, "Project must exist and be active" ); require( !project.paused || _by == projectIdToFinancials[_projectId].artistAddress, "Purchases are paused." ); // EFFECTS // increment project's invocations project.invocations = invocationsAfter; uint256 thisTokenId; unchecked { // invocationsBefore is uint24 << max uint256. In production use, // _projectId * ONE_MILLION must be << max uint256, otherwise // tokenIdToProjectId function become invalid. // Therefore, no risk of overflow thisTokenId = (_projectId * ONE_MILLION) + invocationsBefore; } // mark project as completed if hit max invocations if (invocationsAfter == maxInvocations) { _completeProject(_projectId); } // INTERACTIONS _mint(_to, thisTokenId); // token hash is updated by the randomizer contract on V3 randomizerContract.assignTokenHash(thisTokenId); // Do not need to also log `projectId` in event, as the `projectId` for // a given token can be derived from the `tokenId` with: // projectId = tokenId / 1_000_000 emit Mint(_to, thisTokenId); return thisTokenId; } /** * @notice Sets the hash seed for a given token ID `_tokenId`. * May only be called by the current randomizer contract. * May only be called for tokens that have not already been assigned a * non-zero hash. * @param _tokenId Token ID to set the hash for. * @param _hashSeed Hash seed to set for the token ID. Only last 12 bytes * will be used. * @dev gas-optimized function name because called during mint sequence * @dev if a separate event is required when the token hash is set, e.g. * for indexing purposes, it must be emitted by the randomizer. This is to * minimize gas when minting. */ function setTokenHash_8PT(uint256 _tokenId, bytes32 _hashSeed) external onlyValidTokenId(_tokenId) { OwnerAndHashSeed storage ownerAndHashSeed = _ownersAndHashSeeds[ _tokenId ]; require( msg.sender == address(randomizerContract), "Only randomizer may set" ); require( ownerAndHashSeed.hashSeed == bytes12(0), "Token hash already set" ); require(_hashSeed != bytes12(0), "No zero hash seed"); ownerAndHashSeed.hashSeed = bytes12(_hashSeed); } /** * @notice Allows owner (AdminACL) to revoke ownership of the contract. * Note that the contract is intended to continue to function after the * owner renounces ownership, but no new projects will be able to be added. * Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the * owner/AdminACL contract. The same is true for any dependent contracts * that also integrate with the owner/AdminACL contract (e.g. potentially * minter suite contracts, registry contracts, etc.). * After renouncing ownership, artists will be in control of updates to * their payment addresses and splits (see modifier * onlyAdminACLOrRenouncedArtist`). * While there is no currently intended reason to call this method based on * defined Art Blocks business practices, this method exists to allow * artists to continue to maintain the limited set of contract * functionality that exists post-project-lock in an environment in which * there is no longer an admin maintaining this smart contract. * @dev This function is intended to be called directly by the AdminACL, * not by an address allowed by the AdminACL contract. */ function renounceOwnership() public override onlyOwner { // broadcast that new projects are no longer allowed (if not already) _forbidNewProjects(); // renounce ownership viw Ownable Ownable.renounceOwnership(); } /** * @notice Updates reference to Art Blocks Curation Registry contract. * @param _artblocksCurationRegistryAddress Address of new Curation * Registry. */ function updateArtblocksCurationRegistryAddress( address _artblocksCurationRegistryAddress ) external onlyAdminACL(this.updateArtblocksCurationRegistryAddress.selector) onlyNonZeroAddress(_artblocksCurationRegistryAddress) { artblocksCurationRegistryAddress = _artblocksCurationRegistryAddress; emit PlatformUpdated(FIELD_ARTBLOCKS_CURATION_REGISTRY_ADDRESS); } /** * @notice Updates reference to Art Blocks Dependency Registry contract. * @param _artblocksDependencyRegistryAddress Address of new Dependency * Registry. */ function updateArtblocksDependencyRegistryAddress( address _artblocksDependencyRegistryAddress ) external onlyAdminACL(this.updateArtblocksDependencyRegistryAddress.selector) onlyNonZeroAddress(_artblocksDependencyRegistryAddress) { artblocksDependencyRegistryAddress = _artblocksDependencyRegistryAddress; emit PlatformUpdated(FIELD_ARTBLOCKS_DEPENDENCY_REGISTRY_ADDRESS); } /** * @notice Updates artblocksPrimarySalesAddress to * `_artblocksPrimarySalesAddress`. * @param _artblocksPrimarySalesAddress Address of new primary sales * payment address. */ function updateArtblocksPrimarySalesAddress( address payable _artblocksPrimarySalesAddress ) external onlyAdminACL(this.updateArtblocksPrimarySalesAddress.selector) onlyNonZeroAddress(_artblocksPrimarySalesAddress) { _updateArtblocksPrimarySalesAddress(_artblocksPrimarySalesAddress); } /** * @notice Updates Art Blocks secondary sales royalty payment address to * `_artblocksSecondarySalesAddress`. * @param _artblocksSecondarySalesAddress Address of new secondary sales * payment address. */ function updateArtblocksSecondarySalesAddress( address payable _artblocksSecondarySalesAddress ) external onlyAdminACL(this.updateArtblocksSecondarySalesAddress.selector) onlyNonZeroAddress(_artblocksSecondarySalesAddress) { _updateArtblocksSecondarySalesAddress(_artblocksSecondarySalesAddress); } /** * @notice Updates Art Blocks primary sales revenue percentage to * `artblocksPrimarySalesPercentage_`. * @param artblocksPrimarySalesPercentage_ New primary sales revenue * percentage. */ function updateArtblocksPrimarySalesPercentage( uint256 artblocksPrimarySalesPercentage_ ) external onlyAdminACL(this.updateArtblocksPrimarySalesPercentage.selector) { require( artblocksPrimarySalesPercentage_ <= ART_BLOCKS_MAX_PRIMARY_SALES_PERCENTAGE, "Max of ART_BLOCKS_MAX_PRIMARY_SALES_PERCENTAGE percent" ); _artblocksPrimarySalesPercentage = uint8( artblocksPrimarySalesPercentage_ ); emit PlatformUpdated(FIELD_ARTBLOCKS_PRIMARY_SALES_PERCENTAGE); } /** * @notice Updates Art Blocks secondary sales royalty Basis Points to * `_artblocksSecondarySalesBPS`. * @param _artblocksSecondarySalesBPS New secondary sales royalty Basis * points. * @dev Due to secondary royalties being ultimately enforced via social * consensus, no hard upper limit is imposed on the BPS value, other than * <= 100% royalty, which would not make mathematical sense. Realistically, * changing this value is expected to either never occur, or be a rare * occurrence. */ function updateArtblocksSecondarySalesBPS( uint256 _artblocksSecondarySalesBPS ) external onlyAdminACL(this.updateArtblocksSecondarySalesBPS.selector) { require( _artblocksSecondarySalesBPS <= ART_BLOCKS_MAX_SECONDARY_SALES_BPS, "Max of ART_BLOCKS_MAX_SECONDARY_SALES_BPS BPS" ); artblocksSecondarySalesBPS = _artblocksSecondarySalesBPS; emit PlatformUpdated(FIELD_ARTBLOCKS_SECONDARY_SALES_BPS); } /** * @notice Updates minter to `_address`. * @param _address Address of new minter. */ function updateMinterContract(address _address) external onlyAdminACL(this.updateMinterContract.selector) onlyNonZeroAddress(_address) { minterContract = _address; emit MinterUpdated(_address); } /** * @notice Updates randomizer to `_randomizerAddress`. * @param _randomizerAddress Address of new randomizer. */ function updateRandomizerAddress(address _randomizerAddress) external onlyAdminACL(this.updateRandomizerAddress.selector) onlyNonZeroAddress(_randomizerAddress) { _updateRandomizerAddress(_randomizerAddress); } /** * @notice Toggles project `_projectId` as active/inactive. * @param _projectId Project ID to be toggled. */ function toggleProjectIsActive(uint256 _projectId) external onlyAdminACL(this.toggleProjectIsActive.selector) onlyValidProjectId(_projectId) { projects[_projectId].active = !projects[_projectId].active; emit ProjectUpdated(_projectId, FIELD_PROJECT_ACTIVE); } /** * @notice Artist proposes updated set of artist address, additional payee * addresses, and percentage splits for project `_projectId`. Addresses and * percentages do not have to all be changed, but they must all be defined * as a complete set. * @param _projectId Project ID. * @param _artistAddress Artist address that controls the project, and may * receive payments. * @param _additionalPayeePrimarySales Address that may receive a * percentage split of the artist's primary sales revenue. * @param _additionalPayeePrimarySalesPercentage Percent of artist's * portion of primary sale revenue that will be split to address * `_additionalPayeePrimarySales`. * @param _additionalPayeeSecondarySales Address that may receive a percentage * split of the secondary sales royalties. * @param _additionalPayeeSecondarySalesPercentage Percent of artist's portion * of secondary sale royalties that will be split to address * `_additionalPayeeSecondarySales`. * @dev `_artistAddress` must be a valid address (non-zero-address), but it * is intentionally allowable for `_additionalPayee{Primary,Secondaary}Sales` * and their associated percentages to be zero'd out by the controlling artist. */ function proposeArtistPaymentAddressesAndSplits( uint256 _projectId, address payable _artistAddress, address payable _additionalPayeePrimarySales, uint256 _additionalPayeePrimarySalesPercentage, address payable _additionalPayeeSecondarySales, uint256 _additionalPayeeSecondarySalesPercentage ) external onlyValidProjectId(_projectId) onlyArtist(_projectId) onlyNonZeroAddress(_artistAddress) { // checks require( _additionalPayeePrimarySalesPercentage <= ONE_HUNDRED && _additionalPayeeSecondarySalesPercentage <= ONE_HUNDRED, "Max of 100%" ); // effects proposedArtistAddressesAndSplitsHash[_projectId] = keccak256( abi.encode( _artistAddress, _additionalPayeePrimarySales, _additionalPayeePrimarySalesPercentage, _additionalPayeeSecondarySales, _additionalPayeeSecondarySalesPercentage ) ); // emit event for off-chain indexing emit ProposedArtistAddressesAndSplits( _projectId, _artistAddress, _additionalPayeePrimarySales, _additionalPayeePrimarySalesPercentage, _additionalPayeeSecondarySales, _additionalPayeeSecondarySalesPercentage ); } /** * @notice Admin accepts a proposed set of updated artist address, * additional payee addresses, and percentage splits for project * `_projectId`. Addresses and percentages do not have to all be changed, * but they must all be defined as a complete set. * @param _projectId Project ID. * @param _artistAddress Artist address that controls the project, and may * receive payments. * @param _additionalPayeePrimarySales Address that may receive a * percentage split of the artist's primary sales revenue. * @param _additionalPayeePrimarySalesPercentage Percent of artist's * portion of primary sale revenue that will be split to address * `_additionalPayeePrimarySales`. * @param _additionalPayeeSecondarySales Address that may receive a percentage * split of the secondary sales royalties. * @param _additionalPayeeSecondarySalesPercentage Percent of artist's portion * of secondary sale royalties that will be split to address * `_additionalPayeeSecondarySales`. * @dev this must be called by the Admin ACL contract, and must only accept * the most recent proposed values for a given project (validated on-chain * by comparing the hash of the proposed and accepted values). * @dev `_artistAddress` must be a valid address (non-zero-address), but it * is intentionally allowable for `_additionalPayee{Primary,Secondaary}Sales` * and their associated percentages to be zero'd out by the controlling artist. */ function adminAcceptArtistAddressesAndSplits( uint256 _projectId, address payable _artistAddress, address payable _additionalPayeePrimarySales, uint256 _additionalPayeePrimarySalesPercentage, address payable _additionalPayeeSecondarySales, uint256 _additionalPayeeSecondarySalesPercentage ) external onlyValidProjectId(_projectId) onlyAdminACLOrRenouncedArtist( _projectId, this.adminAcceptArtistAddressesAndSplits.selector ) onlyNonZeroAddress(_artistAddress) { // checks require( proposedArtistAddressesAndSplitsHash[_projectId] == keccak256( abi.encode( _artistAddress, _additionalPayeePrimarySales, _additionalPayeePrimarySalesPercentage, _additionalPayeeSecondarySales, _additionalPayeeSecondarySalesPercentage ) ), "Must match artist proposal" ); // effects ProjectFinance storage projectFinance = projectIdToFinancials[ _projectId ]; projectFinance.artistAddress = _artistAddress; projectFinance .additionalPayeePrimarySales = _additionalPayeePrimarySales; projectFinance.additionalPayeePrimarySalesPercentage = uint8( _additionalPayeePrimarySalesPercentage ); projectFinance .additionalPayeeSecondarySales = _additionalPayeeSecondarySales; projectFinance.additionalPayeeSecondarySalesPercentage = uint8( _additionalPayeeSecondarySalesPercentage ); // clear proposed values proposedArtistAddressesAndSplitsHash[_projectId] = bytes32(0); // emit event for off-chain indexing emit AcceptedArtistAddressesAndSplits(_projectId); } /** * @notice Updates artist of project `_projectId` to `_artistAddress`. * This is to only be used in the event that the artist address is * compromised or sanctioned. * @param _projectId Project ID. * @param _artistAddress New artist address. */ function updateProjectArtistAddress( uint256 _projectId, address payable _artistAddress ) external onlyValidProjectId(_projectId) onlyAdminACLOrRenouncedArtist( _projectId, this.updateProjectArtistAddress.selector ) onlyNonZeroAddress(_artistAddress) { projectIdToFinancials[_projectId].artistAddress = _artistAddress; emit ProjectUpdated(_projectId, FIELD_PROJECT_ARTIST_ADDRESS); } /** * @notice Toggles paused state of project `_projectId`. * @param _projectId Project ID to be toggled. */ function toggleProjectIsPaused(uint256 _projectId) external onlyArtist(_projectId) { projects[_projectId].paused = !projects[_projectId].paused; emit ProjectUpdated(_projectId, FIELD_PROJECT_PAUSED); } /** * @notice Adds new project `_projectName` by `_artistAddress`. * @param _projectName Project name. * @param _artistAddress Artist's address. * @dev token price now stored on minter */ function addProject( string memory _projectName, address payable _artistAddress ) external onlyAdminACL(this.addProject.selector) onlyNonEmptyString(_projectName) onlyNonZeroAddress(_artistAddress) { require(!newProjectsForbidden, "New projects forbidden"); uint256 projectId = _nextProjectId; projectIdToFinancials[projectId].artistAddress = _artistAddress; projects[projectId].name = _projectName; projects[projectId].paused = true; projects[projectId].maxInvocations = ONE_MILLION_UINT24; projects[projectId].projectBaseURI = defaultBaseURI; _nextProjectId = uint248(projectId) + 1; emit ProjectUpdated(projectId, FIELD_PROJECT_CREATED); } /** * @notice Forever forbids new projects from being added to this contract. */ function forbidNewProjects() external onlyAdminACL(this.forbidNewProjects.selector) { require(!newProjectsForbidden, "Already forbidden"); _forbidNewProjects(); } /** * @notice Updates name of project `_projectId` to be `_projectName`. * @param _projectId Project ID. * @param _projectName New project name. */ function updateProjectName(uint256 _projectId, string memory _projectName) external onlyUnlocked(_projectId) onlyArtistOrAdminACL(_projectId, this.updateProjectName.selector) onlyNonEmptyString(_projectName) { projects[_projectId].name = _projectName; emit ProjectUpdated(_projectId, FIELD_PROJECT_NAME); } /** * @notice Updates artist name for project `_projectId` to be * `_projectArtistName`. * @param _projectId Project ID. * @param _projectArtistName New artist name. */ function updateProjectArtistName( uint256 _projectId, string memory _projectArtistName ) external onlyUnlocked(_projectId) onlyArtistOrAdminACL(_projectId, this.updateProjectArtistName.selector) onlyNonEmptyString(_projectArtistName) { projects[_projectId].artist = _projectArtistName; emit ProjectUpdated(_projectId, FIELD_PROJECT_ARTIST_NAME); } /** * @notice Updates artist secondary market royalties for project * `_projectId` to be `_secondMarketRoyalty` percent. * This DOES NOT include the secondary market royalty percentages collected * by Art Blocks; this is only the total percentage of royalties that will * be split to artist and additionalSecondaryPayee. * @param _projectId Project ID. * @param _secondMarketRoyalty Percent of secondary sales revenue that will * be split to artist and additionalSecondaryPayee. This must be less than * or equal to ARTIST_MAX_SECONDARY_ROYALTY_PERCENTAGE percent. */ function updateProjectSecondaryMarketRoyaltyPercentage( uint256 _projectId, uint256 _secondMarketRoyalty ) external onlyArtist(_projectId) { require( _secondMarketRoyalty <= ARTIST_MAX_SECONDARY_ROYALTY_PERCENTAGE, "Max of ARTIST_MAX_SECONDARY_ROYALTY_PERCENTAGE percent" ); projectIdToFinancials[_projectId] .secondaryMarketRoyaltyPercentage = uint8(_secondMarketRoyalty); emit ProjectUpdated( _projectId, FIELD_PROJECT_SECONDARY_MARKET_ROYALTY_PERCENTAGE ); } /** * @notice Updates description of project `_projectId`. * Only artist may call when unlocked, only admin may call when locked. * @param _projectId Project ID. * @param _projectDescription New project description. */ function updateProjectDescription( uint256 _projectId, string memory _projectDescription ) external { // checks require( _projectUnlocked(_projectId) ? msg.sender == projectIdToFinancials[_projectId].artistAddress : adminACLAllowed( msg.sender, address(this), this.updateProjectDescription.selector ), "Only artist when unlocked, owner when locked" ); // effects projects[_projectId].description = _projectDescription; emit ProjectUpdated(_projectId, FIELD_PROJECT_DESCRIPTION); } /** * @notice Updates website of project `_projectId` to be `_projectWebsite`. * @param _projectId Project ID. * @param _projectWebsite New project website. * @dev It is intentionally allowed for this to be set to the empty string. */ function updateProjectWebsite( uint256 _projectId, string memory _projectWebsite ) external onlyArtist(_projectId) { projects[_projectId].website = _projectWebsite; emit ProjectUpdated(_projectId, FIELD_PROJECT_WEBSITE); } /** * @notice Updates license for project `_projectId`. * @param _projectId Project ID. * @param _projectLicense New project license. */ function updateProjectLicense( uint256 _projectId, string memory _projectLicense ) external onlyUnlocked(_projectId) onlyArtistOrAdminACL(_projectId, this.updateProjectLicense.selector) onlyNonEmptyString(_projectLicense) { projects[_projectId].license = _projectLicense; emit ProjectUpdated(_projectId, FIELD_PROJECT_LICENSE); } /** * @notice Updates maximum invocations for project `_projectId` to * `_maxInvocations`. Maximum invocations may only be decreased by the * artist, and must be greater than or equal to current invocations. * New projects are created with maximum invocations of 1 million by * default. * @param _projectId Project ID. * @param _maxInvocations New maximum invocations. */ function updateProjectMaxInvocations( uint256 _projectId, uint24 _maxInvocations ) external onlyArtist(_projectId) { // CHECKS Project storage project = projects[_projectId]; uint256 _invocations = project.invocations; require( (_maxInvocations < project.maxInvocations), "maxInvocations may only be decreased" ); require( _maxInvocations >= _invocations, "Only max invocations gte current invocations" ); // EFFECTS project.maxInvocations = _maxInvocations; emit ProjectUpdated(_projectId, FIELD_PROJECT_MAX_INVOCATIONS); // register completed timestamp if action completed the project if (_maxInvocations == _invocations) { _completeProject(_projectId); } } /** * @notice Adds a script to project `_projectId`. * @param _projectId Project to be updated. * @param _script Script to be added. */ function addProjectScript(uint256 _projectId, string memory _script) external onlyUnlocked(_projectId) onlyArtistOrAdminACL(_projectId, this.addProjectScript.selector) onlyNonEmptyString(_script) { Project storage project = projects[_projectId]; // store script in contract bytecode project.scriptBytecodeAddresses[project.scriptCount] = _script .writeToBytecode(); project.scriptCount = project.scriptCount + 1; emit ProjectUpdated(_projectId, FIELD_PROJECT_SCRIPT); } /** * @notice Updates script for project `_projectId` at script ID `_scriptId`. * @param _projectId Project to be updated. * @param _scriptId Script ID to be updated. * @param _script The updated script value. */ function updateProjectScript( uint256 _projectId, uint256 _scriptId, string memory _script ) external onlyUnlocked(_projectId) onlyArtistOrAdminACL(_projectId, this.updateProjectScript.selector) onlyNonEmptyString(_script) { Project storage project = projects[_projectId]; require(_scriptId < project.scriptCount, "scriptId out of range"); // purge old contract bytecode contract from the blockchain state project.scriptBytecodeAddresses[_scriptId].purgeBytecode(); // store script in contract bytecode, replacing reference address from // the contract that no longer exists with the newly created one project.scriptBytecodeAddresses[_scriptId] = _script.writeToBytecode(); emit ProjectUpdated(_projectId, FIELD_PROJECT_SCRIPT); } /** * @notice Removes last script from project `_projectId`. * @param _projectId Project to be updated. */ function removeProjectLastScript(uint256 _projectId) external onlyUnlocked(_projectId) onlyArtistOrAdminACL(_projectId, this.removeProjectLastScript.selector) { Project storage project = projects[_projectId]; require(project.scriptCount > 0, "there are no scripts to remove"); // purge old contract bytecode contract from the blockchain state project.scriptBytecodeAddresses[project.scriptCount - 1].purgeBytecode(); // delete reference to contract address that no longer exists delete project.scriptBytecodeAddresses[project.scriptCount - 1]; unchecked { project.scriptCount = project.scriptCount - 1; } emit ProjectUpdated(_projectId, FIELD_PROJECT_SCRIPT); } /** * @notice Updates script type for project `_projectId`. * @param _projectId Project to be updated. * @param _scriptTypeAndVersion Script type and version e.g. "[email protected]", * as bytes32 encoded string. */ function updateProjectScriptType( uint256 _projectId, bytes32 _scriptTypeAndVersion ) external onlyUnlocked(_projectId) onlyArtistOrAdminACL(_projectId, this.updateProjectScriptType.selector) { Project storage project = projects[_projectId]; // require exactly one @ symbol in _scriptTypeAndVersion require( _scriptTypeAndVersion.containsExactCharacterQty( AT_CHARACTER_CODE, uint8(1) ), "must contain exactly one @" ); project.scriptTypeAndVersion = _scriptTypeAndVersion; emit ProjectUpdated(_projectId, FIELD_PROJECT_SCRIPT_TYPE); } /** * @notice Updates project's aspect ratio. * @param _projectId Project to be updated. * @param _aspectRatio Aspect ratio to be set. Intended to be string in the * format of a decimal, e.g. "1" for square, "1.77777778" for 16:9, etc., * allowing for a maximum of 10 digits and one (optional) decimal separator. */ function updateProjectAspectRatio( uint256 _projectId, string memory _aspectRatio ) external onlyUnlocked(_projectId) onlyArtistOrAdminACL(_projectId, this.updateProjectAspectRatio.selector) onlyNonEmptyString(_aspectRatio) { // Perform more detailed input validation for aspect ratio. bytes memory aspectRatioBytes = bytes(_aspectRatio); uint256 bytesLength = aspectRatioBytes.length; require(bytesLength <= 11, "Aspect ratio format too long"); bool hasSeenDecimalSeparator = false; bool hasSeenNumber = false; for (uint256 i; i < bytesLength; i++) { bytes1 character = aspectRatioBytes[i]; // Allow as many #s as desired. if (character >= 0x30 && character <= 0x39) { // 9-0 // We need to ensure there is at least 1 `9-0` occurrence. hasSeenNumber = true; continue; } if (character == 0x2E) { // . // Allow no more than 1 `.` occurrence. if (!hasSeenDecimalSeparator) { hasSeenDecimalSeparator = true; continue; } } revert("Improperly formatted aspect ratio"); } require(hasSeenNumber, "Aspect ratio has no numbers"); projects[_projectId].aspectRatio = _aspectRatio; emit ProjectUpdated(_projectId, FIELD_PROJECT_ASPECT_RATIO); } /** * @notice Updates base URI for project `_projectId` to `_newBaseURI`. * This is the controlling base URI for all tokens in the project. The * contract-level defaultBaseURI is only used when initializing new * projects. * @param _projectId Project to be updated. * @param _newBaseURI New base URI. */ function updateProjectBaseURI(uint256 _projectId, string memory _newBaseURI) external onlyArtist(_projectId) onlyNonEmptyString(_newBaseURI) { projects[_projectId].projectBaseURI = _newBaseURI; emit ProjectUpdated(_projectId, FIELD_PROJECT_BASE_URI); } /** * @notice Updates default base URI to `_defaultBaseURI`. The * contract-level defaultBaseURI is only used when initializing new * projects. Token URIs are determined by their project's `projectBaseURI`. * @param _defaultBaseURI New default base URI. */ function updateDefaultBaseURI(string memory _defaultBaseURI) external onlyAdminACL(this.updateDefaultBaseURI.selector) onlyNonEmptyString(_defaultBaseURI) { _updateDefaultBaseURI(_defaultBaseURI); } /** * @notice Next project ID to be created on this contract. * @return uint256 Next project ID. */ function nextProjectId() external view returns (uint256) { return _nextProjectId; } /** * @notice Returns token hash for token ID `_tokenId`. Returns null if hash * has not been set. * @param _tokenId Token ID to be queried. * @return bytes32 Token hash. * @dev token hash is the keccak256 hash of the stored hash seed */ function tokenIdToHash(uint256 _tokenId) external view returns (bytes32) { bytes12 _hashSeed = _ownersAndHashSeeds[_tokenId].hashSeed; if (_hashSeed == 0) { return 0; } return keccak256(abi.encode(_hashSeed)); } /** * @notice View function returning Art Blocks portion of primary sales, in * percent. * @return uint256 Art Blocks portion of primary sales, in percent. */ function artblocksPrimarySalesPercentage() external view returns (uint256) { return _artblocksPrimarySalesPercentage; } /** * @notice View function returning Artist's address for project * `_projectId`. * @param _projectId Project ID to be queried. * @return address Artist's address. */ function projectIdToArtistAddress(uint256 _projectId) external view returns (address payable) { return projectIdToFinancials[_projectId].artistAddress; } /** * @notice View function returning Artist's secondary market royalty * percentage for project `_projectId`. * This does not include Art Blocks portion of secondary market royalties. * @param _projectId Project ID to be queried. * @return uint256 Artist's secondary market royalty percentage. */ function projectIdToSecondaryMarketRoyaltyPercentage(uint256 _projectId) external view returns (uint256) { return projectIdToFinancials[_projectId].secondaryMarketRoyaltyPercentage; } /** * @notice View function returning Artist's additional payee address for * primary sales, for project `_projectId`. * @param _projectId Project ID to be queried. * @return address Artist's additional payee address for primary sales. */ function projectIdToAdditionalPayeePrimarySales(uint256 _projectId) external view returns (address payable) { return projectIdToFinancials[_projectId].additionalPayeePrimarySales; } /** * @notice View function returning Artist's additional payee primary sales * percentage, for project `_projectId`. * @param _projectId Project ID to be queried. * @return uint256 Artist's additional payee primary sales percentage. */ function projectIdToAdditionalPayeePrimarySalesPercentage( uint256 _projectId ) external view returns (uint256) { return projectIdToFinancials[_projectId] .additionalPayeePrimarySalesPercentage; } /** * @notice View function returning Artist's additional payee address for * secondary sales, for project `_projectId`. * @param _projectId Project ID to be queried. * @return address payable Artist's additional payee address for secondary * sales. */ function projectIdToAdditionalPayeeSecondarySales(uint256 _projectId) external view returns (address payable) { return projectIdToFinancials[_projectId].additionalPayeeSecondarySales; } /** * @notice View function returning Artist's additional payee secondary * sales percentage, for project `_projectId`. * @param _projectId Project ID to be queried. * @return uint256 Artist's additional payee secondary sales percentage. */ function projectIdToAdditionalPayeeSecondarySalesPercentage( uint256 _projectId ) external view returns (uint256) { return projectIdToFinancials[_projectId] .additionalPayeeSecondarySalesPercentage; } /** * @notice Returns project details for project `_projectId`. * @param _projectId Project to be queried. * @return projectName Name of project * @return artist Artist of project * @return description Project description * @return website Project website * @return license Project license * @dev this function was named projectDetails prior to V3 core contract. */ function projectDetails(uint256 _projectId) external view returns ( string memory projectName, string memory artist, string memory description, string memory website, string memory license ) { Project storage project = projects[_projectId]; projectName = project.name; artist = project.artist; description = project.description; website = project.website; license = project.license; } /** * @notice Returns project state data for project `_projectId`. * @param _projectId Project to be queried * @return invocations Current number of invocations * @return maxInvocations Maximum allowed invocations * @return active Boolean representing if project is currently active * @return paused Boolean representing if project is paused * @return completedTimestamp zero if project not complete, otherwise * timestamp of project completion. * @return locked Boolean representing if project is locked * @dev price and currency info are located on minter contracts */ function projectStateData(uint256 _projectId) external view returns ( uint256 invocations, uint256 maxInvocations, bool active, bool paused, uint256 completedTimestamp, bool locked ) { Project storage project = projects[_projectId]; invocations = project.invocations; maxInvocations = project.maxInvocations; active = project.active; paused = project.paused; completedTimestamp = project.completedTimestamp; locked = !_projectUnlocked(_projectId); } /** * @notice Returns artist payment information for project `_projectId`. * @param _projectId Project to be queried * @return artistAddress Project Artist's address * @return additionalPayeePrimarySales Additional payee address for primary * sales * @return additionalPayeePrimarySalesPercentage Percentage of artist revenue * to be sent to the additional payee address for primary sales * @return additionalPayeeSecondarySales Additional payee address for secondary * sales royalties * @return additionalPayeeSecondarySalesPercentage Percentage of artist revenue * to be sent to the additional payee address for secondary sales royalties * @return secondaryMarketRoyaltyPercentage Royalty percentage to be sent to * combination of artist and additional payee. This does not include the * platform's percentage of secondary sales royalties, which is defined by * `artblocksSecondarySalesBPS`. */ function projectArtistPaymentInfo(uint256 _projectId) external view returns ( address artistAddress, address additionalPayeePrimarySales, uint256 additionalPayeePrimarySalesPercentage, address additionalPayeeSecondarySales, uint256 additionalPayeeSecondarySalesPercentage, uint256 secondaryMarketRoyaltyPercentage ) { ProjectFinance storage projectFinance = projectIdToFinancials[ _projectId ]; artistAddress = projectFinance.artistAddress; additionalPayeePrimarySales = projectFinance .additionalPayeePrimarySales; additionalPayeePrimarySalesPercentage = projectFinance .additionalPayeePrimarySalesPercentage; additionalPayeeSecondarySales = projectFinance .additionalPayeeSecondarySales; additionalPayeeSecondarySalesPercentage = projectFinance .additionalPayeeSecondarySalesPercentage; secondaryMarketRoyaltyPercentage = projectFinance .secondaryMarketRoyaltyPercentage; } /** * @notice Returns script information for project `_projectId`. * @param _projectId Project to be queried. * @return scriptTypeAndVersion Project's script type and version * (e.g. "p5js(atSymbol)1.0.0") * @return aspectRatio Aspect ratio of project (e.g. "1" for square, * "1.77777778" for 16:9, etc.) * @return scriptCount Count of scripts for project */ function projectScriptDetails(uint256 _projectId) external view returns ( string memory scriptTypeAndVersion, string memory aspectRatio, uint256 scriptCount ) { Project storage project = projects[_projectId]; scriptTypeAndVersion = project.scriptTypeAndVersion.toString(); aspectRatio = project.aspectRatio; scriptCount = project.scriptCount; } /** * @notice Returns address with bytecode containing project script for * project `_projectId` at script index `_index`. */ function projectScriptBytecodeAddressByIndex( uint256 _projectId, uint256 _index ) external view returns (address) { return projects[_projectId].scriptBytecodeAddresses[_index]; } /** * @notice Returns script for project `_projectId` at script index `_index`. * @param _projectId Project to be queried. * @param _index Index of script to be queried. */ function projectScriptByIndex(uint256 _projectId, uint256 _index) external view returns (string memory) { Project storage project = projects[_projectId]; // If trying to access an out-of-index script, return the empty string. if (_index >= project.scriptCount) { return ""; } return project.scriptBytecodeAddresses[_index].readFromBytecode(); } /** * @notice Returns base URI for project `_projectId`. * @param _projectId Project to be queried. * @return projectBaseURI Base URI for project */ function projectURIInfo(uint256 _projectId) external view returns (string memory projectBaseURI) { projectBaseURI = projects[_projectId].projectBaseURI; } /** * @notice Backwards-compatible (pre-V3) function returning if `_minter` is * minterContract. * @param _minter Address to be queried. * @return bool Boolean representing if `_minter` is minterContract. */ function isMintWhitelisted(address _minter) external view returns (bool) { return (minterContract == _minter); } /** * @notice Gets qty of randomizers in history of all randomizers used by * this core contract. If a randomizer is switched away from then back to, * it will show up in the history twice. * @return randomizerHistoryCount Count of randomizers in history */ function numHistoricalRandomizers() external view returns (uint256) { return _historicalRandomizerAddresses.length; } /** * @notice Gets address of randomizer at index `_index` in history of all * randomizers used by this core contract. Index is zero-based. * @param _index Historical index of randomizer to be queried. * @return randomizerAddress Address of randomizer at index `_index`. * @dev If a randomizer is switched away from and then switched back to, it * will show up in the history twice. */ function getHistoricalRandomizerAt(uint256 _index) external view returns (address) { require( _index < _historicalRandomizerAddresses.length, "Index out of bounds" ); return _historicalRandomizerAddresses[_index]; } /** * @notice Backwards-compatible (pre-V3) function returning Art Blocks * primary sales payment address (now called artblocksPrimarySalesAddress). * @return address payable Art Blocks primary sales payment address */ function artblocksAddress() external view returns (address payable) { return artblocksPrimarySalesAddress; } /** * @notice Backwards-compatible (pre-V3) function returning Art Blocks * primary sales percentage (now called artblocksPrimarySalesPercentage). * @return uint256 Art Blocks primary sales percentage */ function artblocksPercentage() external view returns (uint256) { return _artblocksPrimarySalesPercentage; } /** * @notice Backwards-compatible (pre-V3) function. * Gets artist + artist's additional payee royalty data for token ID `_tokenId`. * WARNING: Does not include Art Blocks portion of royalties. * @param _tokenId Token ID to be queried. * @return artistAddress Artist's payment address * @return additionalPayee Additional payee's payment address * @return additionalPayeePercentage Percentage of artist revenue * to be sent to the additional payee's address * @return royaltyFeeByID Total royalty percentage to be sent to * combination of artist and additional payee * @dev Does not include Art Blocks portion of royalties. */ function getRoyaltyData(uint256 _tokenId) external view returns ( address artistAddress, address additionalPayee, uint256 additionalPayeePercentage, uint256 royaltyFeeByID ) { uint256 projectId = tokenIdToProjectId(_tokenId); ProjectFinance storage projectFinance = projectIdToFinancials[ projectId ]; artistAddress = projectFinance.artistAddress; additionalPayee = projectFinance.additionalPayeeSecondarySales; additionalPayeePercentage = projectFinance .additionalPayeeSecondarySalesPercentage; royaltyFeeByID = projectFinance.secondaryMarketRoyaltyPercentage; } /** * @notice Gets royalty Basis Points (BPS) for token ID `_tokenId`. * This conforms to the IManifold interface designated in the Royalty * Registry's RoyaltyEngineV1.sol contract. * ref: https://github.com/manifoldxyz/royalty-registry-solidity * @param _tokenId Token ID to be queried. * @return recipients Array of royalty payment recipients * @return bps Array of Basis Points (BPS) allocated to each recipient, * aligned by index. * @dev reverts if invalid _tokenId * @dev only returns recipients that have a non-zero BPS allocation */ function getRoyalties(uint256 _tokenId) external view onlyValidTokenId(_tokenId) returns (address payable[] memory recipients, uint256[] memory bps) { // initialize arrays with maximum potential length recipients = new address payable[](3); bps = new uint256[](3); uint256 projectId = tokenIdToProjectId(_tokenId); ProjectFinance storage projectFinance = projectIdToFinancials[ projectId ]; // load values into memory uint256 royaltyPercentageForArtistAndAdditional = projectFinance .secondaryMarketRoyaltyPercentage; uint256 additionalPayeePercentage = projectFinance .additionalPayeeSecondarySalesPercentage; // calculate BPS = percentage * 100 uint256 artistBPS = (ONE_HUNDRED - additionalPayeePercentage) * royaltyPercentageForArtistAndAdditional; uint256 additionalBPS = additionalPayeePercentage * royaltyPercentageForArtistAndAdditional; uint256 artblocksBPS = artblocksSecondarySalesBPS; // populate arrays uint256 payeeCount; if (artistBPS > 0) { recipients[payeeCount] = projectFinance.artistAddress; bps[payeeCount++] = artistBPS; } if (additionalBPS > 0) { recipients[payeeCount] = projectFinance .additionalPayeeSecondarySales; bps[payeeCount++] = additionalBPS; } if (artblocksBPS > 0) { recipients[payeeCount] = artblocksSecondarySalesAddress; bps[payeeCount++] = artblocksBPS; } // trim arrays if necessary if (3 > payeeCount) { assembly { let decrease := sub(3, payeeCount) mstore(recipients, sub(mload(recipients), decrease)) mstore(bps, sub(mload(bps), decrease)) } } return (recipients, bps); } /** * @notice View function that returns appropriate revenue splits between * different Art Blocks, Artist, and Artist's additional primary sales * payee given a sale price of `_price` on project `_projectId`. * This always returns three revenue amounts and three addresses, but if a * revenue is zero for either Artist or additional payee, the corresponding * address returned will also be null (for gas optimization). * Does not account for refund if user overpays for a token (minter should * handle a refund of the difference, if appropriate). * Some minters may have alternative methods of splitting payments, in * which case they should implement their own payment splitting logic. * @param _projectId Project ID to be queried. * @param _price Sale price of token. * @return artblocksRevenue_ amount of revenue to be sent to Art Blocks * @return artblocksAddress_ address to send Art Blocks revenue to * @return artistRevenue_ amount of revenue to be sent to Artist * @return artistAddress_ address to send Artist revenue to. Will be null * if no revenue is due to artist (gas optimization). * @return additionalPayeePrimaryRevenue_ amount of revenue to be sent to * additional payee for primary sales * @return additionalPayeePrimaryAddress_ address to send Artist's * additional payee for primary sales revenue to. Will be null if no * revenue is due to additional payee for primary sales (gas optimization). * @dev this always returns three addresses and three revenues, but if the * revenue is zero, the corresponding address will be address(0). It is up * to the contract performing the revenue split to handle this * appropriately. */ function getPrimaryRevenueSplits(uint256 _projectId, uint256 _price) external view returns ( uint256 artblocksRevenue_, address payable artblocksAddress_, uint256 artistRevenue_, address payable artistAddress_, uint256 additionalPayeePrimaryRevenue_, address payable additionalPayeePrimaryAddress_ ) { ProjectFinance storage projectFinance = projectIdToFinancials[ _projectId ]; // calculate revenues artblocksRevenue_ = (_price * uint256(_artblocksPrimarySalesPercentage)) / ONE_HUNDRED; uint256 projectFunds; unchecked { // artblocksRevenue_ is always <=25, so guaranteed to never underflow projectFunds = _price - artblocksRevenue_; } additionalPayeePrimaryRevenue_ = (projectFunds * projectFinance.additionalPayeePrimarySalesPercentage) / ONE_HUNDRED; unchecked { // projectIdToAdditionalPayeePrimarySalesPercentage is always // <=100, so guaranteed to never underflow artistRevenue_ = projectFunds - additionalPayeePrimaryRevenue_; } // set addresses from storage artblocksAddress_ = artblocksPrimarySalesAddress; if (artistRevenue_ > 0) { artistAddress_ = projectFinance.artistAddress; } if (additionalPayeePrimaryRevenue_ > 0) { additionalPayeePrimaryAddress_ = projectFinance .additionalPayeePrimarySales; } } /** * @notice Backwards-compatible (pre-V3) getter returning contract admin * @return address Address of contract admin (same as owner) */ function admin() external view returns (address) { return owner(); } /** * @notice Gets the project ID for a given `_tokenId`. * @param _tokenId Token ID to be queried. * @return _projectId Project ID for given `_tokenId`. */ function tokenIdToProjectId(uint256 _tokenId) public pure returns (uint256 _projectId) { return _tokenId / ONE_MILLION; } /** * @notice Convenience function that returns whether `_sender` is allowed * to call function with selector `_selector` on contract `_contract`, as * determined by this contract's current Admin ACL contract. Expected use * cases include minter contracts checking if caller is allowed to call * admin-gated functions on minter contracts. * @param _sender Address of the sender calling function with selector * `_selector` on contract `_contract`. * @param _contract Address of the contract being called by `_sender`. * @param _selector Function selector of the function being called by * `_sender`. * @return bool Whether `_sender` is allowed to call function with selector * `_selector` on contract `_contract`. * @dev assumes the Admin ACL contract is the owner of this contract, which * is expected to always be true. * @dev adminACLContract is expected to either be null address (if owner * has renounced ownership), or conform to IAdminACLV0 interface. Check for * null address first to avoid revert when admin has renounced ownership. */ function adminACLAllowed( address _sender, address _contract, bytes4 _selector ) public returns (bool) { return owner() != address(0) && adminACLContract.allowed(_sender, _contract, _selector); } /** * @notice Returns contract owner. Set to deployer's address by default on * contract deployment. * @return address Address of contract owner. * @dev ref: https://docs.openzeppelin.com/contracts/4.x/api/access#Ownable * @dev owner role was called `admin` prior to V3 core contract */ function owner() public view override(Ownable, IGenArt721CoreContractV3) returns (address) { return Ownable.owner(); } /** * @notice Gets token URI for token ID `_tokenId`. * @param _tokenId Token ID to be queried. * @return string URI of token ID `_tokenId`. * @dev token URIs are the concatenation of the project base URI and the * token ID. */ function tokenURI(uint256 _tokenId) public view override onlyValidTokenId(_tokenId) returns (string memory) { string memory _projectBaseURI = projects[tokenIdToProjectId(_tokenId)] .projectBaseURI; return string.concat(_projectBaseURI, _tokenId.toString()); } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IManifold).interfaceId || super.supportsInterface(interfaceId); } /** * @notice Forbids new projects from being created * @dev only performs operation and emits event if contract is not already * forbidding new projects. */ function _forbidNewProjects() internal { if (!newProjectsForbidden) { newProjectsForbidden = true; emit PlatformUpdated(FIELD_NEW_PROJECTS_FORBIDDEN); } } /** * @notice Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. * @param newOwner New owner. * @dev owner role was called `admin` prior to V3 core contract. * @dev Overrides and wraps OpenZeppelin's _transferOwnership function to * also update adminACLContract for improved introspection. */ function _transferOwnership(address newOwner) internal override { Ownable._transferOwnership(newOwner); adminACLContract = IAdminACLV0(newOwner); } /** * @notice Updates Art Blocks payment address to `_artblocksPrimarySalesAddress`. * @param _artblocksPrimarySalesAddress New Art Blocks payment address. * @dev Note that this method does not check that the input address is * not `address(0)`, as it is expected that callers of this method should * perform input validation where applicable. */ function _updateArtblocksPrimarySalesAddress( address _artblocksPrimarySalesAddress ) internal { artblocksPrimarySalesAddress = payable(_artblocksPrimarySalesAddress); emit PlatformUpdated(FIELD_ARTBLOCKS_PRIMARY_SALES_ADDRESS); } /** * @notice Updates Art Blocks secondary sales royalty payment address to * `_artblocksSecondarySalesAddress`. * @param _artblocksSecondarySalesAddress New Art Blocks secondary sales * payment address. * @dev Note that this method does not check that the input address is * not `address(0)`, as it is expected that callers of this method should * perform input validation where applicable. */ function _updateArtblocksSecondarySalesAddress( address _artblocksSecondarySalesAddress ) internal { artblocksSecondarySalesAddress = payable( _artblocksSecondarySalesAddress ); emit PlatformUpdated(FIELD_ARTBLOCKS_SECONDARY_SALES_ADDRESS); } /** * @notice Updates randomizer address to `_randomizerAddress`. * @param _randomizerAddress New randomizer address. * @dev Note that this method does not check that the input address is * not `address(0)`, as it is expected that callers of this method should * perform input validation where applicable. */ function _updateRandomizerAddress(address _randomizerAddress) internal { randomizerContract = IRandomizerV2(_randomizerAddress); // populate historical randomizer array _historicalRandomizerAddresses.push(_randomizerAddress); emit PlatformUpdated(FIELD_RANDOMIZER_ADDRESS); } /** * @notice Updates default base URI to `_defaultBaseURI`. * When new projects are added, their `projectBaseURI` is automatically * initialized to `_defaultBaseURI`. * @param _defaultBaseURI New default base URI. * @dev Note that this method does not check that the input string is not * the empty string, as it is expected that callers of this method should * perform input validation where applicable. */ function _updateDefaultBaseURI(string memory _defaultBaseURI) internal { defaultBaseURI = _defaultBaseURI; emit PlatformUpdated(FIELD_DEFAULT_BASE_URI); } /** * @notice Internal function to complete a project. * @param _projectId Project ID to be completed. */ function _completeProject(uint256 _projectId) internal { projects[_projectId].completedTimestamp = uint64(block.timestamp); emit ProjectUpdated(_projectId, FIELD_PROJECT_COMPLETED); } /** * @notice Internal function that returns whether a project is unlocked. * Projects automatically lock four weeks after they are completed. * Projects are considered completed when they have been invoked the * maximum number of times. * @param _projectId Project ID to be queried. * @return bool true if project is unlocked, false otherwise. * @dev This also enforces that the `_projectId` passed in is valid. */ function _projectUnlocked(uint256 _projectId) internal view onlyValidProjectId(_projectId) returns (bool) { uint256 projectCompletedTimestamp = projects[_projectId] .completedTimestamp; bool projectOpen = projectCompletedTimestamp == 0; return projectOpen || (block.timestamp - projectCompletedTimestamp < FOUR_WEEKS_IN_SECONDS); } }
// SPDX-License-Identifier: LGPL-3.0-only // Creatd By: Art Blocks Inc. pragma solidity ^0.8.0; import "./IGenArt721CoreContractV3.sol"; interface IRandomizerV2 { // The core contract that may interact with this randomizer contract. function genArt721Core() external view returns (IGenArt721CoreContractV3); // When a core contract calls this, it can be assured that the randomizer // will set a bytes32 hash for tokenId `_tokenId` on the core contract. function assignTokenHash(uint256 _tokenId) external; }
// SPDX-License-Identifier: LGPL-3.0-only // Created By: Art Blocks Inc. pragma solidity ^0.8.0; interface IAdminACLV0 { /** * @notice Token ID `_tokenId` minted to `_to`. * @param previousSuperAdmin The previous superAdmin address. * @param newSuperAdmin The new superAdmin address. * @param genArt721CoreAddressesToUpdate Array of genArt721Core * addresses to update to the new superAdmin, for indexing purposes only. */ event SuperAdminTransferred( address indexed previousSuperAdmin, address indexed newSuperAdmin, address[] genArt721CoreAddressesToUpdate ); /// Type of the Admin ACL contract, e.g. "AdminACLV0" function AdminACLType() external view returns (string memory); /// super admin address function superAdmin() external view returns (address); /** * @notice Calls transferOwnership on other contract from this contract. * This is useful for updating to a new AdminACL contract. * @dev this function should be gated to only superAdmin-like addresses. */ function transferOwnershipOn(address _contract, address _newAdminACL) external; /** * @notice Calls renounceOwnership on other contract from this contract. * @dev this function should be gated to only superAdmin-like addresses. */ function renounceOwnershipOn(address _contract) external; /** * @notice Checks if sender `_sender` is allowed to call function with selector * `_selector` on contract `_contract`. */ function allowed( address _sender, address _contract, bytes4 _selector ) external returns (bool); }
// SPDX-License-Identifier: LGPL-3.0-only // Created By: Art Blocks Inc. pragma solidity ^0.8.0; import "./IAdminACLV0.sol"; /// use the Royalty Registry's IManifold interface for token royalties import "./IManifold.sol"; interface IGenArt721CoreContractV3 is IManifold { /** * @notice Token ID `_tokenId` minted to `_to`. */ event Mint(address indexed _to, uint256 indexed _tokenId); /** * @notice currentMinter updated to `_currentMinter`. * @dev Implemented starting with V3 core */ event MinterUpdated(address indexed _currentMinter); /** * @notice Platform updated on bytes32-encoded field `_field`. */ event PlatformUpdated(bytes32 indexed _field); /** * @notice Project ID `_projectId` updated on bytes32-encoded field * `_update`. */ event ProjectUpdated(uint256 indexed _projectId, bytes32 indexed _update); event ProposedArtistAddressesAndSplits( uint256 indexed _projectId, address _artistAddress, address _additionalPayeePrimarySales, uint256 _additionalPayeePrimarySalesPercentage, address _additionalPayeeSecondarySales, uint256 _additionalPayeeSecondarySalesPercentage ); event AcceptedArtistAddressesAndSplits(uint256 indexed _projectId); // version and type of the core contract // coreVersion is a string of the form "0.x.y" function coreVersion() external view returns (string memory); // coreType is a string of the form "GenArt721CoreV3" function coreType() external view returns (string memory); // owner (pre-V3 was named admin) of contract // this is expected to be an Admin ACL contract for V3 function owner() external view returns (address); // Admin ACL contract for V3, will be at the address owner() function adminACLContract() external returns (IAdminACLV0); // backwards-compatible (pre-V3) admin - equal to owner() function admin() external view returns (address); /** * Function determining if _sender is allowed to call function with * selector _selector on contract `_contract`. Intended to be used with * peripheral contracts such as minters, as well as internally by the * core contract itself. */ function adminACLAllowed( address _sender, address _contract, bytes4 _selector ) external returns (bool); // getter function of public variable function nextProjectId() external view returns (uint256); // getter function of public mapping function tokenIdToProjectId(uint256 tokenId) external view returns (uint256 projectId); // @dev this is not available in V0 function isMintWhitelisted(address minter) external view returns (bool); function projectIdToArtistAddress(uint256 _projectId) external view returns (address payable); function projectIdToAdditionalPayeePrimarySales(uint256 _projectId) external view returns (address payable); function projectIdToAdditionalPayeePrimarySalesPercentage( uint256 _projectId ) external view returns (uint256); // @dev new function in V3 function getPrimaryRevenueSplits(uint256 _projectId, uint256 _price) external view returns ( uint256 artblocksRevenue_, address payable artblocksAddress_, uint256 artistRevenue_, address payable artistAddress_, uint256 additionalPayeePrimaryRevenue_, address payable additionalPayeePrimaryAddress_ ); // @dev new function in V3 function projectStateData(uint256 _projectId) external view returns ( uint256 invocations, uint256 maxInvocations, bool active, bool paused, uint256 completedTimestamp, bool locked ); // @dev Art Blocks primary sales payment address function artblocksPrimarySalesAddress() external view returns (address payable); /** * @notice Backwards-compatible (pre-V3) function returning Art Blocks * primary sales payment address (now called artblocksPrimarySalesAddress). */ function artblocksAddress() external view returns (address payable); // @dev Percentage of primary sales allocated to Art Blocks function artblocksPrimarySalesPercentage() external view returns (uint256); /** * @notice Backwards-compatible (pre-V3) function returning Art Blocks * primary sales percentage (now called artblocksPrimarySalesPercentage). */ function artblocksPercentage() external view returns (uint256); // @dev Art Blocks secondary sales royalties payment address function artblocksSecondarySalesAddress() external view returns (address payable); // @dev Basis points of secondary sales allocated to Art Blocks function artblocksSecondarySalesBPS() external view returns (uint256); // function to set a token's hash (must be guarded) function setTokenHash_8PT(uint256 _tokenId, bytes32 _hash) external; // @dev gas-optimized signature in V3 for `mint` function mint_Ecf( address _to, uint256 _projectId, address _by ) external returns (uint256 tokenId); /** * @notice Backwards-compatible (pre-V3) function that gets artist + * artist's additional payee royalty data for token ID `_tokenId`. * WARNING: Does not include Art Blocks portion of royalties. */ function getRoyaltyData(uint256 _tokenId) external view returns ( address artistAddress, address additionalPayee, uint256 additionalPayeePercentage, uint256 royaltyFeeByID ); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /// @dev Royalty Registry interface, used to support the Royalty Registry. /// @dev Source: https://github.com/manifoldxyz/royalty-registry-solidity/blob/main/contracts/specs/IManifold.sol /// @author: manifold.xyz /** * @dev Royalty interface for creator core classes */ interface IManifold { /** * @dev Get royalites of a token. Returns list of receivers and basisPoints * * bytes4(keccak256('getRoyalties(uint256)')) == 0xbb3bafd6 * * => 0xbb3bafd6 = 0xbb3bafd6 */ function getRoyalties(uint256 tokenId) external view returns (address payable[] memory, uint256[] memory); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (utils/Strings.sol) pragma solidity ^0.8.0; /** * @dev String operations. */ library Strings { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; uint8 private constant _ADDRESS_LENGTH = 20; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { // Inspired by OraclizeAPI's implementation - MIT licence // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol if (value == 0) { return "0"; } uint256 temp = value; uint256 digits; while (temp != 0) { digits++; temp /= 10; } bytes memory buffer = new bytes(digits); while (value != 0) { digits -= 1; buffer[digits] = bytes1(uint8(48 + uint256(value % 10))); value /= 10; } return string(buffer); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { if (value == 0) { return "0x00"; } uint256 temp = value; uint256 length = 0; while (temp != 0) { length++; temp >>= 8; } return toHexString(value, length); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _HEX_SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } /** * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation. */ function toHexString(address addr) internal pure returns (string memory) { return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { _checkOwner(); _; } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { require(owner() == _msgSender(), "Ownable: caller is not the owner"); } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (token/ERC721/ERC721.sol) pragma solidity ^0.8.0; import "@openzeppelin-4.7/contracts/token/ERC721/IERC721.sol"; import "@openzeppelin-4.7/contracts/token/ERC721/IERC721Receiver.sol"; import "@openzeppelin-4.7/contracts/token/ERC721/extensions/IERC721Metadata.sol"; import "@openzeppelin-4.7/contracts/utils/Address.sol"; import "@openzeppelin-4.7/contracts/utils/Context.sol"; import "@openzeppelin-4.7/contracts/utils/Strings.sol"; import "@openzeppelin-4.7/contracts/utils/introspection/ERC165.sol"; /** * @dev Forked version of the OpenZeppelin v4.7.1 ERC721 contract. Utilizes a * struct to pack owner and hash seed into a single storage slot. * --------------------- * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */ contract ERC721_PackedHashSeed is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; /// struct to pack a token owner and hash seed into same storage slot struct OwnerAndHashSeed { // 20 bytes for address of token's owner address owner; // remaining 12 bytes allocated to token hash seed bytes12 hashSeed; } /// mapping of token ID to OwnerAndHashSeed /// @dev visibility internal so inheriting contracts can access mapping(uint256 => OwnerAndHashSeed) internal _ownersAndHashSeeds; // Mapping owner address to token count mapping(address => uint256) private _balances; // Mapping from token ID to approved address mapping(uint256 => address) private _tokenApprovals; // Mapping from owner to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; /** * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection. */ constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { return interfaceId == type(IERC721).interfaceId || interfaceId == type(IERC721Metadata).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721-balanceOf}. */ function balanceOf(address owner) public view virtual override returns (uint256) { require( owner != address(0), "ERC721: address zero is not a valid owner" ); return _balances[owner]; } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view virtual override returns (address) { address owner = _ownersAndHashSeeds[tokenId].owner; require(owner != address(0), "ERC721: invalid token ID"); return owner; } /** * @dev See {IERC721Metadata-name}. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev See {IERC721Metadata-symbol}. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { _requireMinted(tokenId); string memory baseURI = _baseURI(); return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : ""; } /** * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each * token will be the concatenation of the `baseURI` and the `tokenId`. Empty * by default, can be overridden in child contracts. */ function _baseURI() internal view virtual returns (string memory) { return ""; } /** * @dev See {IERC721-approve}. */ function approve(address to, uint256 tokenId) public virtual override { address owner = ERC721_PackedHashSeed.ownerOf(tokenId); require(to != owner, "ERC721: approval to current owner"); require( _msgSender() == owner || isApprovedForAll(owner, _msgSender()), "ERC721: approve caller is not token owner nor approved for all" ); _approve(to, tokenId); } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view virtual override returns (address) { _requireMinted(tokenId); return _tokenApprovals[tokenId]; } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { _setApprovalForAll(_msgSender(), operator, approved); } /** * @dev See {IERC721-isApprovedForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return _operatorApprovals[owner][operator]; } /** * @dev See {IERC721-transferFrom}. */ function transferFrom( address from, address to, uint256 tokenId ) public virtual override { //solhint-disable-next-line max-line-length require( _isApprovedOrOwner(_msgSender(), tokenId), "ERC721: caller is not token owner nor approved" ); _transfer(from, to, tokenId); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId ) public virtual override { safeTransferFrom(from, to, tokenId, ""); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory data ) public virtual override { require( _isApprovedOrOwner(_msgSender(), tokenId), "ERC721: caller is not token owner nor approved" ); _safeTransfer(from, to, tokenId, data); } /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * `data` is additional data, it has no specified format and it is sent in call to `to`. * * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g. * implement alternative mechanisms to perform token transfer, such as signature-based. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeTransfer( address from, address to, uint256 tokenId, bytes memory data ) internal virtual { _transfer(from, to, tokenId); require( _checkOnERC721Received(from, to, tokenId, data), "ERC721: transfer to non ERC721Receiver implementer" ); } /** * @dev Returns whether `tokenId` exists. * * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. * * Tokens start existing when they are minted (`_mint`), * and stop existing when they are burned (`_burn`). */ function _exists(uint256 tokenId) internal view virtual returns (bool) { return _ownersAndHashSeeds[tokenId].owner != address(0); } /** * @dev Returns whether `spender` is allowed to manage `tokenId`. * * Requirements: * * - `tokenId` must exist. */ function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) { address owner = ERC721_PackedHashSeed.ownerOf(tokenId); return (spender == owner || isApprovedForAll(owner, spender) || getApproved(tokenId) == spender); } /** * @dev Safely mints `tokenId` and transfers it to `to`. * * Requirements: * * - `tokenId` must not exist. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeMint(address to, uint256 tokenId) internal virtual { _safeMint(to, tokenId, ""); } /** * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is * forwarded in {IERC721Receiver-onERC721Received} to contract recipients. */ function _safeMint( address to, uint256 tokenId, bytes memory data ) internal virtual { _mint(to, tokenId); require( _checkOnERC721Received(address(0), to, tokenId, data), "ERC721: transfer to non ERC721Receiver implementer" ); } /** * @dev Mints `tokenId` and transfers it to `to`. * * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible * * Requirements: * * - `tokenId` must not exist. * - `to` cannot be the zero address. * * Emits a {Transfer} event. */ function _mint(address to, uint256 tokenId) internal virtual { require(to != address(0), "ERC721: mint to the zero address"); require(!_exists(tokenId), "ERC721: token already minted"); _beforeTokenTransfer(address(0), to, tokenId); _balances[to] += 1; _ownersAndHashSeeds[tokenId].owner = to; emit Transfer(address(0), to, tokenId); _afterTokenTransfer(address(0), to, tokenId); } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId) internal virtual { address owner = ERC721_PackedHashSeed.ownerOf(tokenId); _beforeTokenTransfer(owner, address(0), tokenId); // Clear approvals _approve(address(0), tokenId); _balances[owner] -= 1; delete _ownersAndHashSeeds[tokenId].owner; emit Transfer(owner, address(0), tokenId); _afterTokenTransfer(owner, address(0), tokenId); } /** * @dev Transfers `tokenId` from `from` to `to`. * As opposed to {transferFrom}, this imposes no restrictions on msg.sender. * * Requirements: * * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * * Emits a {Transfer} event. */ function _transfer( address from, address to, uint256 tokenId ) internal virtual { require( ERC721_PackedHashSeed.ownerOf(tokenId) == from, "ERC721: transfer from incorrect owner" ); require(to != address(0), "ERC721: transfer to the zero address"); _beforeTokenTransfer(from, to, tokenId); // Clear approvals from the previous owner _approve(address(0), tokenId); _balances[from] -= 1; _balances[to] += 1; _ownersAndHashSeeds[tokenId].owner = to; emit Transfer(from, to, tokenId); _afterTokenTransfer(from, to, tokenId); } /** * @dev Approve `to` to operate on `tokenId` * * Emits an {Approval} event. */ function _approve(address to, uint256 tokenId) internal virtual { _tokenApprovals[tokenId] = to; emit Approval(ERC721_PackedHashSeed.ownerOf(tokenId), to, tokenId); } /** * @dev Approve `operator` to operate on all of `owner` tokens * * Emits an {ApprovalForAll} event. */ function _setApprovalForAll( address owner, address operator, bool approved ) internal virtual { require(owner != operator, "ERC721: approve to caller"); _operatorApprovals[owner][operator] = approved; emit ApprovalForAll(owner, operator, approved); } /** * @dev Reverts if the `tokenId` has not been minted yet. */ function _requireMinted(uint256 tokenId) internal view virtual { require(_exists(tokenId), "ERC721: invalid token ID"); } /** * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address. * The call is not executed if the target address is not a contract. * * @param from address representing the previous owner of the given token ID * @param to target address that will receive the tokens * @param tokenId uint256 ID of the token to be transferred * @param data bytes optional data to send along with the call * @return bool whether the call correctly returned the expected magic value */ function _checkOnERC721Received( address from, address to, uint256 tokenId, bytes memory data ) private returns (bool) { if (to.isContract()) { try IERC721Receiver(to).onERC721Received( _msgSender(), from, tokenId, data ) returns (bytes4 retval) { return retval == IERC721Receiver.onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert( "ERC721: transfer to non ERC721Receiver implementer" ); } else { /// @solidity memory-safe-assembly assembly { revert(add(32, reason), mload(reason)) } } } } else { return true; } } /** * @dev Hook that is called before any token transfer. This includes minting * and burning. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, ``from``'s `tokenId` will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual {} /** * @dev Hook that is called after any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _afterTokenTransfer( address from, address to, uint256 tokenId ) internal virtual {} }
// SPDX-License-Identifier: LGPL-3.0-only // Created By: Art Blocks Inc. pragma solidity ^0.8.0; /** * @title Art Blocks Script Storage Library * @notice Utilize contract bytecode as persistant storage for large chunks of script string data. * * @author Art Blocks Inc. * @author Modified from 0xSequence (https://github.com/0xsequence/sstore2/blob/master/contracts/SSTORE2.sol) * @author Modified from Solmate (https://github.com/transmissions11/solmate/blob/main/src/utils/SSTORE2.sol) * * @dev Compared to the above two rerferenced libraries, this contracts-as-storage implementation makes a few * notably different design decisions: * - uses the `string` data type for input/output on reads, rather than speaking in bytes directly * - exposes "delete" functionality, allowing no-longer-used storage to be purged from chain state * - stores the "writer" address (library user) in the deployed contract bytes, which is useful for both: * a) providing necessary information for safe deletion; and * b) allowing this to be introspected on-chain * Also, given that much of this library is written in assembly, this library makes use of a slightly * different convention (when compared to the rest of the Art Blocks smart contract repo) around * pre-defining return values in some cases in order to simplify need to directly memory manage these * return values. */ library BytecodeStorage { //---------------------------------------------------------------------------------------------------------------// // Starting Index | Size | Ending Index | Description // //---------------------------------------------------------------------------------------------------------------// // 0 | N/A | 0 | // // 0 | 72 | 72 | the bytes of the gated-cleanup-logic allowing for `selfdestruct`ion // // 72 | 32 | 104 | the 32 bytes for storing the deploying contract's (0-padded) address // //---------------------------------------------------------------------------------------------------------------// // Define the offset for where the "logic bytes" end, and the "data bytes" begin. Note that this is a manually // calculated value, and must be updated if the above table is changed. It is expected that tests will fail // loudly if these values are not updated in-step with eachother. uint256 internal constant DATA_OFFSET = 104; uint256 internal constant ADDRESS_OFFSET = 72; /*////////////////////////////////////////////////////////////// WRITE LOGIC //////////////////////////////////////////////////////////////*/ /** * @notice Write a string to contract bytecode * @param _data string to be written to contract * @return address_ address of deployed contract with bytecode containing concat(gated-cleanup-logic, data) */ function writeToBytecode(string memory _data) internal returns (address address_) { // prefix bytecode with bytes memory creationCode = abi.encodePacked( //---------------------------------------------------------------------------------------------------------------// // Opcode | Opcode + Arguments | Description | Stack View // //---------------------------------------------------------------------------------------------------------------// // (0) creation code returns all code in the contract except for the first 11 (0B in hex) bytes, as these 11 // bytes are the creation code itself which we do not want to store in the deployed storage contract result //---------------------------------------------------------------------------------------------------------------// // 0x60 | 0x60_0B | PUSH1 11 | codeOffset // // 0x59 | 0x59 | MSIZE | 0 codeOffset // // 0x81 | 0x81 | DUP2 | codeOffset 0 codeOffset // // 0x38 | 0x38 | CODESIZE | codeSize codeOffset 0 codeOffset // // 0x03 | 0x03 | SUB | (codeSize - codeOffset) 0 codeOffset // // 0x80 | 0x80 | DUP | (codeSize - codeOffset) (codeSize - codeOffset) 0 codeOffset // // 0x92 | 0x92 | SWAP3 | codeOffset (codeSize - codeOffset) 0 (codeSize - codeOffset) // // 0x59 | 0x59 | MSIZE | 0 codeOffset (codeSize - codeOffset) 0 (codeSize - codeOffset) // // 0x39 | 0x39 | CODECOPY | 0 (codeSize - codeOffset) // // 0xf3 | 0xf3 | RETURN | // //---------------------------------------------------------------------------------------------------------------// // (11 bytes) hex"60_0B_59_81_38_03_80_92_59_39_F3", //---------------------------------------------------------------------------------------------------------------// // Opcode | Opcode + Arguments | Description | Stack View // //---------------------------------------------------------------------------------------------------------------// // (1a) conditional logic for determing purge-gate (only the bytecode contract deployer can `selfdestruct`) //---------------------------------------------------------------------------------------------------------------// // 0x60 | 0x60_20 | PUSH1 32 | 32 // // 0x60 | 0x60_48 | PUSH1 72 (*) | contractOffset 32 // // 0x60 | 0x60_00 | PUSH1 0 | 0 contractOffset 32 // // 0x39 | 0x39 | CODECOPY | // // 0x60 | 0x60_00 | PUSH1 0 | 0 // // 0x51 | 0x51 | MLOAD | byteDeployerAddress // // 0x33 | 0x33 | CALLER | msg.sender byteDeployerAddress // // 0x14 | 0x14 | EQ | (msg.sender == byteDeployerAddress) // //---------------------------------------------------------------------------------------------------------------// // (12 bytes: 0-11 in deployed contract) hex"60_20_60_48_60_00_39_60_00_51_33_14", //---------------------------------------------------------------------------------------------------------------// // (1b) load up the destination jump address for `(2a) calldata length check` logic, jump or raise `invalid` op-code //---------------------------------------------------------------------------------------------------------------// // 0x60 | 0x60_10 | PUSH1 16 (^) | jumpDestination (msg.sender == byteDeployerAddress) // // 0x57 | 0x57 | JUMPI | // // 0xFE | 0xFE | INVALID | // //---------------------------------------------------------------------------------------------------------------// // (4 bytes: 12-15 in deployed contract) hex"60_10_57_FE", //---------------------------------------------------------------------------------------------------------------// // (2a) conditional logic for determing purge-gate (only if calldata length is 1 byte) //---------------------------------------------------------------------------------------------------------------// // 0x5B | 0x5B | JUMPDEST (16) | // // 0x60 | 0x60_01 | PUSH1 1 | 1 // // 0x36 | 0x36 | CALLDATASIZE | calldataSize 1 // // 0x14 | 0x14 | EQ | (calldataSize == 1) // //---------------------------------------------------------------------------------------------------------------// // (5 bytes: 16-20 in deployed contract) hex"5B_60_01_36_14", //---------------------------------------------------------------------------------------------------------------// // (2b) load up the destination jump address for `(3a) calldata value check` logic, jump or raise `invalid` op-code //---------------------------------------------------------------------------------------------------------------// // 0x60 | 0x60_19 | PUSH1 25 (^) | jumpDestination (calldataSize == 1) // // 0x57 | 0x57 | JUMPI | // // 0xFE | 0xFE | INVALID | // //---------------------------------------------------------------------------------------------------------------// // (4 bytes: 21-24 in deployed contract) hex"60_19_57_FE", //---------------------------------------------------------------------------------------------------------------// // (3a) conditional logic for determing purge-gate (only if calldata is `0xFF`) //---------------------------------------------------------------------------------------------------------------// // 0x5B | 0x5B | JUMPDEST (25) | // // 0x60 | 0x60_00 | PUSH1 0 | 0 // // 0x35 | 0x35 | CALLDATALOAD | calldata // // 0x7F | 0x7F_FF_00_..._00 | PUSH32 0xFF00...00 | 0xFF0...00 calldata // // 0x14 | 0x14 | EQ | (0xFF00...00 == calldata) // //---------------------------------------------------------------------------------------------------------------// // (4 bytes: 25-28 in deployed contract) hex"5B_60_00_35", // (33 bytes: 29-61 in deployed contract) hex"7F_FF_00_00_00_00_00_00_00_00_00_00_00_00_00_00_00_00_00_00_00_00_00_00_00_00_00_00_00_00_00_00_00", // (1 byte: 62 in deployed contract) hex"14", //---------------------------------------------------------------------------------------------------------------// // (3b) load up the destination jump address for actual purging (4), jump or raise `invalid` op-code //---------------------------------------------------------------------------------------------------------------// // 0x60 | 0x60_43 | PUSH1 67 (^) | jumpDestination (0xFF00...00 == calldata) // // 0x57 | 0x57 | JUMPI | // // 0xFE | 0xFE | INVALID | // //---------------------------------------------------------------------------------------------------------------// // (4 bytes: 63-66 in deployed contract) hex"60_43_57_FE", //---------------------------------------------------------------------------------------------------------------// // (4) perform actual purging //---------------------------------------------------------------------------------------------------------------// // 0x5B | 0x5B | JUMPDEST (67) | // // 0x60 | 0x60_00 | PUSH1 0 | 0 // // 0x51 | 0x51 | MLOAD | byteDeployerAddress // // 0xFF | 0xFF | SELFDESTRUCT | // //---------------------------------------------------------------------------------------------------------------// // (5 bytes: 67-71 in deployed contract) hex"5B_60_00_51_FF", //---------------------------------------------------------------------------------------------------------------// // (*) Note: this value must be adjusted if selfdestruct purge logic is adjusted, to refer to the correct start // // offset for where the `msg.sender` address was stored in deployed bytecode. // // // // (^) Note: this value must be adjusted if portions of the selfdestruct purge logic are adjusted. // //---------------------------------------------------------------------------------------------------------------// // // store the deploying-contract's address (to be used to gate and call `selfdestruct`), // with expected 0-padding to fit a 20-byte address into a 30-byte slot. // // note: it is important that this address is the executing contract's address // (the address that represents the client-application smart contract of this library) // which means that it is the responsibility of the client-application smart contract // to determine how deletes are gated (or if they are exposed at all) as it is only // this contract that will be able to call `purgeBytecode` as the `CALLER` that is // checked above (op-code 0x33). hex"00_00_00_00_00_00_00_00_00_00_00_00", // left-pad 20-byte address with 12 0x00 bytes address(this), // uploaded data (stored as bytecode) comes last _data ); assembly { // deploy a new contract with the generated creation code. // start 32 bytes into creationCode to avoid copying the byte length. address_ := create(0, add(creationCode, 0x20), mload(creationCode)) } // address must be non-zero if contract was deployed successfully require(address_ != address(0), "ContractAsStorage: Write Error"); } /*////////////////////////////////////////////////////////////// READ LOGIC //////////////////////////////////////////////////////////////*/ /** * @notice Read a string from contract bytecode * @param _address address of deployed contract with bytecode containing concat(gated-cleanup-logic, data) * @return data string read from contract bytecode */ function readFromBytecode(address _address) internal view returns (string memory data) { // get the size of the bytecode uint256 bytecodeSize = _bytecodeSizeAt(_address); // handle case where address contains code < DATA_OFFSET // note: the first check here also captures the case where // (bytecodeSize == 0) implicitly, but we add the second check of // (bytecodeSize == 0) as a fall-through that will never execute // unless `DATA_OFFSET` is set to 0 at some point. if ((bytecodeSize < DATA_OFFSET) || (bytecodeSize == 0)) { revert("ContractAsStorage: Read Error"); } // handle case where address contains code >= DATA_OFFSET // decrement by DATA_OFFSET to account for purge logic uint256 size; unchecked { size = bytecodeSize - DATA_OFFSET; } assembly { // allocate free memory data := mload(0x40) // update free memory pointer // use and(x, not(0x1f) as cheaper equivalent to sub(x, mod(x, 0x20)). // adding 0x1f to size + logic above ensures the free memory pointer // remains word-aligned, following the Solidity convention. mstore(0x40, add(data, and(add(add(size, 0x20), 0x1f), not(0x1f)))) // store length of data in first 32 bytes mstore(data, size) // copy code to memory, excluding the gated-cleanup-logic extcodecopy(_address, add(data, 0x20), DATA_OFFSET, size) } } /** * @notice Get address for deployer for given contract bytecode * @param _address address of deployed contract with bytecode containing concat(gated-cleanup-logic, data) * @return writerAddress address read from contract bytecode */ function getWriterAddressForBytecode(address _address) internal view returns (address) { // get the size of the data uint256 bytecodeSize = _bytecodeSizeAt(_address); // handle case where address contains code < DATA_OFFSET // note: the first check here also captures the case where // (bytecodeSize == 0) implicitly, but we add the second check of // (bytecodeSize == 0) as a fall-through that will never execute // unless `DATA_OFFSET` is set to 0 at some point. if ((bytecodeSize < DATA_OFFSET) || (bytecodeSize == 0)) { revert("ContractAsStorage: Read Error"); } assembly { // allocate free memory let writerAddress := mload(0x40) // shift free memory pointer by one slot mstore(0x40, add(mload(0x40), 0x20)) // copy the 32-byte address of the data contract writer to memory // note: this relies on the assumption noted at the top-level of // this file that the storage layout for the deployed // contracts-as-storage contract looks like: // | gated-cleanup-logic | deployer-address (padded) | data | extcodecopy( _address, writerAddress, ADDRESS_OFFSET, 0x20 // full 32-bytes, as address is expected to be zero-padded ) return( writerAddress, 0x20 // return size is entire slot, as it is zero-padded ) } } /*////////////////////////////////////////////////////////////// DELETE LOGIC //////////////////////////////////////////////////////////////*/ /** * @notice Purge contract bytecode for cleanup purposes * @param _address address of deployed contract with bytecode containing concat(gated-cleanup-logic, data) * @dev This contract is only callable by the address of the contract that originally deployed the bytecode * being purged. If this method is called by any other address, it will revert with the `INVALID` op-code. * Additionally, for security purposes, the contract must be called with calldata `0xFF` to ensure that * the `selfdestruct` op-code is intentionally being invoked, otherwise the `INVALID` op-code will be raised. */ function purgeBytecode(address _address) internal { // deployed bytecode (above) handles all logic for purging state, so no // call data is expected to be passed along to perform data purge ( bool success, /* `data` not needed */ ) = _address.call(hex"FF"); if (!success) { revert("ContractAsStorage: Delete Error"); } } /*////////////////////////////////////////////////////////////// INTERNAL HELPER LOGIC //////////////////////////////////////////////////////////////*/ /** @notice Returns the size of the bytecode at address `_address` @param _address address that may or may not contain bytecode @return size size of the bytecode code at `_address` */ function _bytecodeSizeAt(address _address) private view returns (uint256 size) { assembly { size := extcodesize(_address) } } }
// SPDX-License-Identifier: LGPL-3.0-only // Created By: Art Blocks Inc. // Inspired by: https://ethereum.stackexchange.com/a/123950/103422 pragma solidity ^0.8.0; /** * @dev Operations on bytes32 data type, dealing with conversion to string. */ library Bytes32Strings { /** * @dev Intended to convert a `bytes32`-encoded string literal to `string`. * Trims zero padding to arrive at original string literal. */ function toString(bytes32 source) internal pure returns (string memory result) { uint8 length = 0; while (source[length] != 0 && length < 32) { length++; } assembly { // free memory pointer result := mload(0x40) // update free memory pointer to new "memory end" // (offset is 64-bytes: 32 for length, 32 for data) mstore(0x40, add(result, 0x40)) // store length in first 32-byte memory slot mstore(result, length) // write actual data in second 32-byte memory slot mstore(add(result, 0x20), source) } } /** * @dev Intended to check if a `bytes32`-encoded string contains a given * character with UTF-8 character code `utf8CharCode exactly `targetQty` * times. Does not support searching for multi-byte characters, only * characters with UTF-8 character codes < 0x80. */ function containsExactCharacterQty( bytes32 source, uint8 utf8CharCode, uint8 targetQty ) internal pure returns (bool) { uint8 _occurrences = 0; uint8 i; for (i = 0; i < 32; ) { uint8 _charCode = uint8(source[i]); // if not a null byte, or a multi-byte UTF-8 character, check match if (_charCode != 0 && _charCode < 0x80) { if (_charCode == utf8CharCode) { unchecked { // no risk of overflow since max 32 iterations < max uin8=255 ++_occurrences; } } } unchecked { // no risk of overflow since max 32 iterations < max uin8=255 ++i; } } return _occurrences == targetQty; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (token/ERC721/IERC721.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external; /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must have been allowed to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721Receiver.sol) pragma solidity ^0.8.0; /** * @title ERC721 token receiver interface * @dev Interface for any contract that wants to support safeTransfers * from ERC721 asset contracts. */ interface IERC721Receiver { /** * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} * by `operator` from `from`, this function is called. * * It must return its Solidity selector to confirm the token transfer. * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted. * * The selector can be obtained in Solidity with `IERC721Receiver.onERC721Received.selector`. */ function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol) pragma solidity ^0.8.0; import "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional metadata extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Metadata is IERC721 { /** * @dev Returns the token collection name. */ function name() external view returns (string memory); /** * @dev Returns the token collection symbol. */ function symbol() external view returns (string memory); /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) external view returns (string memory); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly /// @solidity memory-safe-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol) pragma solidity ^0.8.0; import "./IERC165.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
{ "optimizer": { "enabled": true, "runs": 25 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
[{"inputs":[{"internalType":"string","name":"_tokenName","type":"string"},{"internalType":"string","name":"_tokenSymbol","type":"string"},{"internalType":"address","name":"_randomizerContract","type":"address"},{"internalType":"address","name":"_adminACLContract","type":"address"},{"internalType":"uint248","name":"_startingProjectId","type":"uint248"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"_projectId","type":"uint256"}],"name":"AcceptedArtistAddressesAndSplits","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_to","type":"address"},{"indexed":true,"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"Mint","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_currentMinter","type":"address"}],"name":"MinterUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"_field","type":"bytes32"}],"name":"PlatformUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"_projectId","type":"uint256"},{"indexed":true,"internalType":"bytes32","name":"_update","type":"bytes32"}],"name":"ProjectUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"_projectId","type":"uint256"},{"indexed":false,"internalType":"address","name":"_artistAddress","type":"address"},{"indexed":false,"internalType":"address","name":"_additionalPayeePrimarySales","type":"address"},{"indexed":false,"internalType":"uint256","name":"_additionalPayeePrimarySalesPercentage","type":"uint256"},{"indexed":false,"internalType":"address","name":"_additionalPayeeSecondarySales","type":"address"},{"indexed":false,"internalType":"uint256","name":"_additionalPayeeSecondarySalesPercentage","type":"uint256"}],"name":"ProposedArtistAddressesAndSplits","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"ART_BLOCKS_ERC721TOKEN_ADDRESS_V0","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ART_BLOCKS_ERC721TOKEN_ADDRESS_V1","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"_projectName","type":"string"},{"internalType":"address payable","name":"_artistAddress","type":"address"}],"name":"addProject","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_projectId","type":"uint256"},{"internalType":"string","name":"_script","type":"string"}],"name":"addProjectScript","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"admin","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_sender","type":"address"},{"internalType":"address","name":"_contract","type":"address"},{"internalType":"bytes4","name":"_selector","type":"bytes4"}],"name":"adminACLAllowed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"adminACLContract","outputs":[{"internalType":"contract IAdminACLV0","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_projectId","type":"uint256"},{"internalType":"address payable","name":"_artistAddress","type":"address"},{"internalType":"address payable","name":"_additionalPayeePrimarySales","type":"address"},{"internalType":"uint256","name":"_additionalPayeePrimarySalesPercentage","type":"uint256"},{"internalType":"address payable","name":"_additionalPayeeSecondarySales","type":"address"},{"internalType":"uint256","name":"_additionalPayeeSecondarySalesPercentage","type":"uint256"}],"name":"adminAcceptArtistAddressesAndSplits","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"artblocksAddress","outputs":[{"internalType":"address payable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"artblocksCurationRegistryAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"artblocksDependencyRegistryAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"artblocksPercentage","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"artblocksPrimarySalesAddress","outputs":[{"internalType":"address payable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"artblocksPrimarySalesPercentage","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"artblocksSecondarySalesAddress","outputs":[{"internalType":"address payable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"artblocksSecondarySalesBPS","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"coreType","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"coreVersion","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"defaultBaseURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"forbidNewProjects","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_index","type":"uint256"}],"name":"getHistoricalRandomizerAt","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_projectId","type":"uint256"},{"internalType":"uint256","name":"_price","type":"uint256"}],"name":"getPrimaryRevenueSplits","outputs":[{"internalType":"uint256","name":"artblocksRevenue_","type":"uint256"},{"internalType":"address payable","name":"artblocksAddress_","type":"address"},{"internalType":"uint256","name":"artistRevenue_","type":"uint256"},{"internalType":"address payable","name":"artistAddress_","type":"address"},{"internalType":"uint256","name":"additionalPayeePrimaryRevenue_","type":"uint256"},{"internalType":"address payable","name":"additionalPayeePrimaryAddress_","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"getRoyalties","outputs":[{"internalType":"address payable[]","name":"recipients","type":"address[]"},{"internalType":"uint256[]","name":"bps","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"getRoyaltyData","outputs":[{"internalType":"address","name":"artistAddress","type":"address"},{"internalType":"address","name":"additionalPayee","type":"address"},{"internalType":"uint256","name":"additionalPayeePercentage","type":"uint256"},{"internalType":"uint256","name":"royaltyFeeByID","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_minter","type":"address"}],"name":"isMintWhitelisted","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_projectId","type":"uint256"},{"internalType":"address","name":"_by","type":"address"}],"name":"mint_Ecf","outputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"minterContract","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"newProjectsForbidden","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nextProjectId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"numHistoricalRandomizers","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_projectId","type":"uint256"}],"name":"projectArtistPaymentInfo","outputs":[{"internalType":"address","name":"artistAddress","type":"address"},{"internalType":"address","name":"additionalPayeePrimarySales","type":"address"},{"internalType":"uint256","name":"additionalPayeePrimarySalesPercentage","type":"uint256"},{"internalType":"address","name":"additionalPayeeSecondarySales","type":"address"},{"internalType":"uint256","name":"additionalPayeeSecondarySalesPercentage","type":"uint256"},{"internalType":"uint256","name":"secondaryMarketRoyaltyPercentage","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_projectId","type":"uint256"}],"name":"projectDetails","outputs":[{"internalType":"string","name":"projectName","type":"string"},{"internalType":"string","name":"artist","type":"string"},{"internalType":"string","name":"description","type":"string"},{"internalType":"string","name":"website","type":"string"},{"internalType":"string","name":"license","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_projectId","type":"uint256"}],"name":"projectIdToAdditionalPayeePrimarySales","outputs":[{"internalType":"address payable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_projectId","type":"uint256"}],"name":"projectIdToAdditionalPayeePrimarySalesPercentage","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_projectId","type":"uint256"}],"name":"projectIdToAdditionalPayeeSecondarySales","outputs":[{"internalType":"address payable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_projectId","type":"uint256"}],"name":"projectIdToAdditionalPayeeSecondarySalesPercentage","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_projectId","type":"uint256"}],"name":"projectIdToArtistAddress","outputs":[{"internalType":"address payable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_projectId","type":"uint256"}],"name":"projectIdToSecondaryMarketRoyaltyPercentage","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_projectId","type":"uint256"},{"internalType":"uint256","name":"_index","type":"uint256"}],"name":"projectScriptByIndex","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_projectId","type":"uint256"},{"internalType":"uint256","name":"_index","type":"uint256"}],"name":"projectScriptBytecodeAddressByIndex","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_projectId","type":"uint256"}],"name":"projectScriptDetails","outputs":[{"internalType":"string","name":"scriptTypeAndVersion","type":"string"},{"internalType":"string","name":"aspectRatio","type":"string"},{"internalType":"uint256","name":"scriptCount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_projectId","type":"uint256"}],"name":"projectStateData","outputs":[{"internalType":"uint256","name":"invocations","type":"uint256"},{"internalType":"uint256","name":"maxInvocations","type":"uint256"},{"internalType":"bool","name":"active","type":"bool"},{"internalType":"bool","name":"paused","type":"bool"},{"internalType":"uint256","name":"completedTimestamp","type":"uint256"},{"internalType":"bool","name":"locked","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_projectId","type":"uint256"}],"name":"projectURIInfo","outputs":[{"internalType":"string","name":"projectBaseURI","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_projectId","type":"uint256"},{"internalType":"address payable","name":"_artistAddress","type":"address"},{"internalType":"address payable","name":"_additionalPayeePrimarySales","type":"address"},{"internalType":"uint256","name":"_additionalPayeePrimarySalesPercentage","type":"uint256"},{"internalType":"address payable","name":"_additionalPayeeSecondarySales","type":"address"},{"internalType":"uint256","name":"_additionalPayeeSecondarySalesPercentage","type":"uint256"}],"name":"proposeArtistPaymentAddressesAndSplits","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"proposedArtistAddressesAndSplitsHash","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"randomizerContract","outputs":[{"internalType":"contract IRandomizerV2","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_projectId","type":"uint256"}],"name":"removeProjectLastScript","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"bytes32","name":"_hashSeed","type":"bytes32"}],"name":"setTokenHash_8PT","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"startingProjectId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_projectId","type":"uint256"}],"name":"toggleProjectIsActive","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_projectId","type":"uint256"}],"name":"toggleProjectIsPaused","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"tokenIdToHash","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"tokenIdToProjectId","outputs":[{"internalType":"uint256","name":"_projectId","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_artblocksCurationRegistryAddress","type":"address"}],"name":"updateArtblocksCurationRegistryAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_artblocksDependencyRegistryAddress","type":"address"}],"name":"updateArtblocksDependencyRegistryAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable","name":"_artblocksPrimarySalesAddress","type":"address"}],"name":"updateArtblocksPrimarySalesAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"artblocksPrimarySalesPercentage_","type":"uint256"}],"name":"updateArtblocksPrimarySalesPercentage","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable","name":"_artblocksSecondarySalesAddress","type":"address"}],"name":"updateArtblocksSecondarySalesAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_artblocksSecondarySalesBPS","type":"uint256"}],"name":"updateArtblocksSecondarySalesBPS","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_defaultBaseURI","type":"string"}],"name":"updateDefaultBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"updateMinterContract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_projectId","type":"uint256"},{"internalType":"address payable","name":"_artistAddress","type":"address"}],"name":"updateProjectArtistAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_projectId","type":"uint256"},{"internalType":"string","name":"_projectArtistName","type":"string"}],"name":"updateProjectArtistName","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_projectId","type":"uint256"},{"internalType":"string","name":"_aspectRatio","type":"string"}],"name":"updateProjectAspectRatio","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_projectId","type":"uint256"},{"internalType":"string","name":"_newBaseURI","type":"string"}],"name":"updateProjectBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_projectId","type":"uint256"},{"internalType":"string","name":"_projectDescription","type":"string"}],"name":"updateProjectDescription","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_projectId","type":"uint256"},{"internalType":"string","name":"_projectLicense","type":"string"}],"name":"updateProjectLicense","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_projectId","type":"uint256"},{"internalType":"uint24","name":"_maxInvocations","type":"uint24"}],"name":"updateProjectMaxInvocations","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_projectId","type":"uint256"},{"internalType":"string","name":"_projectName","type":"string"}],"name":"updateProjectName","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_projectId","type":"uint256"},{"internalType":"uint256","name":"_scriptId","type":"uint256"},{"internalType":"string","name":"_script","type":"string"}],"name":"updateProjectScript","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_projectId","type":"uint256"},{"internalType":"bytes32","name":"_scriptTypeAndVersion","type":"bytes32"}],"name":"updateProjectScriptType","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_projectId","type":"uint256"},{"internalType":"uint256","name":"_secondMarketRoyalty","type":"uint256"}],"name":"updateProjectSecondaryMarketRoyaltyPercentage","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_projectId","type":"uint256"},{"internalType":"string","name":"_projectWebsite","type":"string"}],"name":"updateProjectWebsite","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_randomizerAddress","type":"address"}],"name":"updateRandomizerAddress","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60a0604052600f805460ff60a01b1916600560a11b17905560fa6011553480156200002957600080fd5b50604051620061e6380380620061e68339810160408190526200004c91620004aa565b848460006200005c8382620005eb565b5060016200006b8282620005eb565b5050506200008862000082620001c560201b60201c565b620001c9565b826001600160a01b038116620000e45760405162461bcd60e51b815260206004820152601b60248201527f4d75737420696e707574206e6f6e2d7a65726f20616464726573730000000000604482015260640160405180910390fd5b6001600160f81b038216608052620000fc3362000201565b620001073362000259565b6200011284620002b1565b6200011d83620001c9565b60408051808201909152601b81527f68747470733a2f2f746f6b656e2e617274626c6f636b732e696f2f000000000060208201526200015c9062000339565b601380547fff00000000000000000000000000000000000000000000000000000000000000166001600160f81b0384161790556040516c1b995e1d141c9bda9958dd1259609a1b90600080516020620061c683398151915290600090a2505050505050620006b7565b3390565b620001df816200037660201b62003e981760201c565b600b80546001600160a01b0319166001600160a01b0392909216919091179055565b600f80546001600160a01b0319166001600160a01b0383161790556040517f617274626c6f636b735072696d61727953616c6573416464726573730000000090600080516020620061c683398151915290600090a250565b601080546001600160a01b0319166001600160a01b0383161790556040517f617274626c6f636b735365636f6e6461727953616c657341646472657373000090600080516020620061c683398151915290600090a250565b600980546001600160a01b0383166001600160a01b03199182168117909255600a805460018101825560009182527fc65a7bb8d6351c1cf70c95a316cc6a92839c986682d98bc35f958f4883f9d2a801805490921690921790556040517072616e646f6d697a65724164647265737360781b91600080516020620061c683398151915291a250565b6014620003478282620005eb565b506040516d64656661756c744261736555524960901b90600080516020620061c683398151915290600090a250565b600680546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b634e487b7160e01b600052604160045260246000fd5b600082601f830112620003f057600080fd5b81516001600160401b03808211156200040d576200040d620003c8565b604051601f8301601f19908116603f01168101908282118183101715620004385762000438620003c8565b816040528381526020925086838588010111156200045557600080fd5b600091505b838210156200047957858201830151818301840152908201906200045a565b600093810190920192909252949350505050565b80516001600160a01b0381168114620004a557600080fd5b919050565b600080600080600060a08688031215620004c357600080fd5b85516001600160401b0380821115620004db57600080fd5b620004e989838a01620003de565b965060208801519150808211156200050057600080fd5b506200050f88828901620003de565b94505062000520604087016200048d565b925062000530606087016200048d565b60808701519092506001600160f81b03811681146200054e57600080fd5b809150509295509295909350565b600181811c908216806200057157607f821691505b6020821081036200059257634e487b7160e01b600052602260045260246000fd5b50919050565b601f821115620005e657600081815260208120601f850160051c81016020861015620005c15750805b601f850160051c820191505b81811015620005e257828155600101620005cd565b5050505b505050565b81516001600160401b03811115620006075762000607620003c8565b6200061f816200061884546200055c565b8462000598565b602080601f8311600181146200065757600084156200063e5750858301515b600019600386901b1c1916600185901b178555620005e2565b600085815260208120601f198616915b82811015620006885788860151825594840194600190910190840162000667565b5085821015620006a75787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b608051615ad0620006f660003960008181610cfd01528181611d2b0152818161232b0152818161257101528181613ab501526140960152615ad06000f3fe608060405234801561001057600080fd5b506004361061042a5760003560e01c806376ee6fab1161022e578063ad2cdfc411610137578063ad2cdfc414610a82578063ae45ad9814610aaf578063b1656ba314610add578063b168762214610af0578063b7b04fae14610b03578063b88d4fde14610b16578063b971136814610b29578063bb3bafd614610b31578063bba4448a14610b52578063c34a03b514610b65578063c87b56dd14610b78578063cc90e72514610b8b578063d03c390c14610b9e578063db2ff86114610bb1578063ddd0ee0f14610bc4578063e935b7b114610bd7578063e985e9c514610be8578063eb9cd5d414610bfb578063ed8abfda14610c1d578063f2fde38b14610c47578063f313d73314610c5a578063f851a44014610cf0578063f893c07b14610cf857600080fd5b806376ee6fab1461086d5780638639415b146108805780638c3c9cdd146108cb5780638da5cb5b146108de5780638dd91a56146108e657806392f002331461090a57806394535b991461091d57806395d89b41146109305780639ab31a2d146109385780639afc2be51461094b578063a0bee56414610966578063a11ec70a14610979578063a22cb4651461098c578063a3b2cca61461099f578063a47d29cb146109b2578063a65ff74c146109de578063a87ac619146107a7578063abcbb7b414610a1c578063ac11fa1c14610a24578063acad012414610a44578063accd17f014610a57578063ad0305ce14610a6057600080fd5b806328ec8f501161033b57806328ec8f501461065a5780632b274166146106875780632b65e67d1461069a5780632b6cfc8d146106ad5780632d9c0205146106c057806336c7c12c146106d357806337859963146106e657806338c8e468146106f95780633949f906146107255780633e48e8481461073657806342842e0e14610749578063483372821461075c5780634bbc4ff01461076f5780634e1d64af146107825780634f029c39146107a75780635508fd52146107ba57806358b9a5a9146107ce578063621a1f74146108065780636352211e1461081957806369d14faf1461082c5780636c907b7f1461083f57806370a0823114610852578063715018a61461086557600080fd5b80611e3c1461042f5780615de5146104445780630132c6971461046a57806301856fd41461047d57806301ffc9a71461049057806304143a5c146104b357806306fdde03146104bb578063081812fc146104d0578063095ea7b3146104fb5780630c5b1ad41461050e5780630d170673146105215780630e79c928146105345780630ea5613f146105475780630ebeb0ee1461059157806314fc8f2d146105ba57806317df5366146105d55780631b689c0b146105e85780631e9bef46146105fb5780632302cbda1461060e578063230448b11461062157806323b872dd1461063457806325b75d6814610647575b600080fd5b61044261043d366004614c10565b610d1f565b005b610457610452366004614c47565b610e71565b6040519081526020015b60405180910390f35b610442610478366004614c89565b611115565b61044261048b366004614c10565b611299565b6104a361049e366004614cd7565b6113b1565b6040519015158152602001610461565b6104426113dc565b6104c3611464565b6040516104619190614d4b565b6104e36104de366004614d5e565b6114f6565b6040516001600160a01b039091168152602001610461565b610442610509366004614d77565b61151d565b61044261051c366004614da3565b611632565b61044261052f366004614e6b565b611691565b610442610542366004614e6b565b611774565b61055a610555366004614d5e565b6119ee565b60408051968752602087019590955292151593850193909352151560608401526080830191909152151560a082015260c001610461565b6104e361059f366004614d5e565b6000908152600d60205260409020546001600160a01b031690565b6104e373059edd72cd353df5106d2b9cc5ab83a52287ac3a81565b6008546104e3906001600160a01b031681565b6104576105f6366004614d5e565b611a51565b600b546104e3906001600160a01b031681565b61044261061c366004614eb1565b611a60565b6104a361062f366004614ee5565b611aba565b610442610642366004614f25565b611b66565b610442610655366004614e6b565b611b97565b610457610668366004614d5e565b6000908152600d6020526040902060010154600160a01b900460ff1690565b610442610695366004614da3565b611c7d565b6104426106a8366004614f66565b611d28565b6104426106bb366004614da3565b611eb6565b6104c36106ce366004614d5e565b611f15565b6009546104e3906001600160a01b031681565b6104426106f4366004614e6b565b611fba565b6104e3610707366004614d5e565b6000908152600d60205260409020600101546001600160a01b031690565b600f546001600160a01b03166104e3565b610442610744366004614e6b565b61203b565b610442610757366004614f25565b6120df565b61044261076a366004614da3565b6120fa565b61044261077d366004614d5e565b61219c565b6104c360405180604001604052806006815260200165076332e302e360d41b81525081565b610457600f54600160a01b900460ff1690565b6013546104a390600160f81b900460ff1681565b6104e36107dc366004614c10565b6000918252600c60209081526040808420928452600990920190529020546001600160a01b031690565b610457610814366004614d5e565b61228d565b6104e3610827366004614d5e565b6122f3565b61044261083a366004614fcd565b612328565b61044261084d366004614da3565b61246f565b610457610860366004614da3565b6124ce565b610442612554565b61044261087b366004614f66565b61256e565b61089361088e366004614c10565b612804565b604080519687526001600160a01b039586166020880152860193909352908316606085015260808401521660a082015260c001610461565b6104c36108d9366004614c10565b6128bb565b6104e361291a565b6108f96108f4366004614d5e565b612933565b604051610461959493929190614ff2565b6012546104e3906001600160a01b031681565b6010546104e3906001600160a01b031681565b6104c3612c27565b610442610946366004614d5e565b612c36565b6104e373a7d8d9ef8d8ce8992df33d8b8cf4aebabd5bd27081565b610442610974366004614da3565b612d07565b610442610987366004614d5e565b612db0565b61044261099a36600461506d565b612e3b565b6104426109ad366004614e6b565b612e4a565b6104e36109c0366004614d5e565b6000908152600d60205260409020600201546001600160a01b031690565b6109f16109ec366004614d5e565b612f36565b604080516001600160a01b039586168152949093166020850152918301526060820152608001610461565b6104c3612f8f565b610457610a32366004614d5e565b600e6020526000908152604090205481565b610442610a52366004614e6b565b61301d565b61045760115481565b6104a3610a6e366004614da3565b6012546001600160a01b0390811691161490565b610457610a90366004614d5e565b6000908152600d6020526040902060020154600160a01b900460ff1690565b6104c36040518060400160405280600f81526020016e47656e417274373231436f7265563360881b81525081565b610442610aeb36600461509b565b61316e565b6104e3610afe366004614d5e565b6132f4565b610442610b11366004614e6b565b61336c565b610442610b243660046150ea565b613455565b600a54610457565b610b44610b3f366004614d5e565b61348d565b604051610461929190615169565b6007546104e3906001600160a01b031681565b610442610b73366004614c10565b6136ce565b6104c3610b86366004614d5e565b6137ce565b610442610b993660046151ed565b6138d5565b610442610bac366004614d5e565b613a83565b610442610bbf366004614d5e565b613b5a565b600f546104e3906001600160a01b031681565b6013546001600160f81b0316610457565b6104a3610bf6366004615233565b613d1e565b610c0e610c09366004614d5e565b613d4c565b60405161046193929190615261565b610457610c2b366004614d5e565b6000908152600d6020526040902054600160a01b900460ff1690565b610442610c55366004614da3565b613e18565b610cb2610c68366004614d5e565b6000908152600d60205260409020600281015481546001909201546001600160a01b03808316948482169460ff600160a01b95869004811695938516948490048116939091041690565b604080516001600160a01b039788168152958716602087015285019390935293166060830152608082019290925260a081019190915260c001610461565b6104e3613e8e565b6104577f000000000000000000000000000000000000000000000000000000000000000081565b81610d2981613eea565b610d4e5760405162461bcd60e51b8152600401610d4590615297565b60405180910390fd5b60008381526002602052604090206009546001600160a01b03163314610db05760405162461bcd60e51b815260206004820152601760248201527613db9b1e481c985b991bdb5a5e995c881b585e481cd95d604a1b6044820152606401610d45565b8054600160a01b900460a01b6001600160a01b03191615610e0c5760405162461bcd60e51b8152602060048201526016602482015275151bdad95b881a185cda08185b1c9958591e481cd95d60521b6044820152606401610d45565b82610e4d5760405162461bcd60e51b8152602060048201526011602482015270139bc81e995c9bc81a185cda081cd95959607a1b6044820152606401610d45565b805460a09390931c600160a01b026001600160a01b03909316929092179091555050565b6012546000906001600160a01b03163314610ece5760405162461bcd60e51b815260206004820152601e60248201527f4d757374206d696e742066726f6d206d696e74657220636f6e747261637400006044820152606401610d45565b6000838152600c60205260409020805462ffffff808216916001830191630100000090910416808310610f435760405162461bcd60e51b815260206004820152601f60248201527f4d757374206e6f7420657863656564206d617820696e766f636174696f6e73006044820152606401610d45565b8354600160881b900460ff1680610f7657506000878152600d60205260409020600201546001600160a01b038781169116145b610fc25760405162461bcd60e51b815260206004820181905260248201527f50726f6a656374206d75737420657869737420616e64206265206163746976656044820152606401610d45565b8354600160901b900460ff161580610ff657506000878152600d60205260409020600201546001600160a01b038781169116145b61103a5760405162461bcd60e51b8152602060048201526015602482015274283ab931b430b9b2b99030b932903830bab9b2b21760591b6044820152606401610d45565b835462ffffff191662ffffff8381169182178655848116620f42408a020191908316900361106b5761106b88613f07565b6110758982613f5f565b600954604051635b140b8d60e11b8152600481018390526001600160a01b039091169063b628171a90602401600060405180830381600087803b1580156110bb57600080fd5b505af11580156110cf573d6000803e3d6000fd5b50506040518392506001600160a01b038c1691507f0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d412139688590600090a398975050505050505050565b6000828152600d602052604090206002015482906001600160a01b031633146111505760405162461bcd60e51b8152600401610d45906152c8565b6000838152600c60205260409020805462ffffff80821691630100000090048116908516106111cd5760405162461bcd60e51b8152602060048201526024808201527f6d6178496e766f636174696f6e73206d6179206f6e6c79206265206465637265604482015263185cd95960e21b6064820152608401610d45565b808462ffffff1610156112375760405162461bcd60e51b815260206004820152602c60248201527f4f6e6c79206d617820696e766f636174696f6e73206774652063757272656e7460448201526b20696e766f636174696f6e7360a01b6064820152608401610d45565b815465ffffff0000001916630100000062ffffff8616021782556040516d6d6178496e766f636174696f6e7360901b908690600080516020615a7b83398151915290600090a3808462ffffff16036112925761129285613f07565b5050505050565b816112a381614091565b6112bf5760405162461bcd60e51b8152600401610d45906152ed565b6000838152600d6020526040902060020154839062615bf560e21b906001600160a01b03163314806112f757506112f7333083611aba565b6113135760405162461bcd60e51b8152600401610d4590615317565b6000858152600c60205260409081902090611331908690600161412b565b61137a5760405162461bcd60e51b815260206004820152601a60248201527901b5d5cdd0818dbdb9d185a5b88195e1858dd1b1e481bdb9948160361b6044820152606401610d45565b60078101859055604051697363726970745479706560b01b908790600080516020615a7b83398151915290600090a3505050505050565b60006001600160e01b03198216635d9dd7eb60e11b14806113d657506113d68261419e565b92915050565b6301050e9760e21b6113ef333083611aba565b61140b5760405162461bcd60e51b8152600401610d459061534c565b601354600160f81b900460ff16156114595760405162461bcd60e51b815260206004820152601160248201527020b63932b0b23c903337b93134b23232b760791b6044820152606401610d45565b6114616141ee565b50565b6060600080546114739061537c565b80601f016020809104026020016040519081016040528092919081815260200182805461149f9061537c565b80156114ec5780601f106114c1576101008083540402835291602001916114ec565b820191906000526020600020905b8154815290600101906020018083116114cf57829003601f168201915b5050505050905090565b600061150182614246565b506000908152600460205260409020546001600160a01b031690565b6000611528826122f3565b9050806001600160a01b0316836001600160a01b0316036115955760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b6064820152608401610d45565b336001600160a01b03821614806115b157506115b18133613d1e565b6116235760405162461bcd60e51b815260206004820152603e60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206e6f7220617070726f76656420666f7220616c6c00006064820152608401610d45565b61162d838361426b565b505050565b630316c6b560e21b611645333083611aba565b6116615760405162461bcd60e51b8152600401610d459061534c565b816001600160a01b0381166116885760405162461bcd60e51b8152600401610d45906153b0565b61162d836142d9565b8161169b81614091565b6116b75760405162461bcd60e51b8152600401610d45906152ed565b6000838152600d60205260409020600201548390630d17067360e01b906001600160a01b03163314806116f057506116f0333083611aba565b61170c5760405162461bcd60e51b8152600401610d4590615317565b83805160000361172e5760405162461bcd60e51b8152600401610d45906153e5565b6000868152600c60205260409020600101611749868261547d565b50604051636e616d6560e01b908790600080516020615a7b83398151915290600090a3505050505050565b8161177e81614091565b61179a5760405162461bcd60e51b8152600401610d45906152ed565b6000838152600d602052604090206002015483906301cf392560e31b906001600160a01b03163314806117d357506117d3333083611aba565b6117ef5760405162461bcd60e51b8152600401610d4590615317565b8380516000036118115760405162461bcd60e51b8152600401610d45906153e5565b84518590600b8111156118655760405162461bcd60e51b815260206004820152601c60248201527b41737065637420726174696f20666f726d617420746f6f206c6f6e6760201b6044820152606401610d45565b60008060005b8381101561195157600085828151811061188757611887615536565b01602001516001600160f81b0319169050600360fc1b81108015906118ba5750603960f81b6001600160f81b0319821611155b156118c957600192505061193f565b6001600160f81b03198116601760f91b036118ed57836118ed57600193505061193f565b60405162461bcd60e51b815260206004820152602160248201527f496d70726f7065726c7920666f726d61747465642061737065637420726174696044820152606f60f81b6064820152608401610d45565b8061194981615562565b91505061186b565b508061199d5760405162461bcd60e51b815260206004820152601b60248201527a41737065637420726174696f20686173206e6f206e756d6265727360281b6044820152606401610d45565b60008a8152600c602052604090206008016119b88a8261547d565b506040516a617370656374526174696f60a81b908b90600080516020615a7b83398151915290600090a350505050505050505050565b6000818152600c60205260408120805462ffffff808216936301000000830490911692600160881b830460ff90811693600160901b810490911692600160481b9091046001600160401b031691611a4488614091565b1591505091939550919395565b60006113d6620f424083615591565b63118165ed60e11b611a73333083611aba565b611a8f5760405162461bcd60e51b8152600401610d459061534c565b818051600003611ab15760405162461bcd60e51b8152600401610d45906153e5565b61162d8361432f565b600080611ac561291a565b6001600160a01b031614158015611b5e5750600b546040516217798b60e61b81526001600160a01b03868116600483015285811660248301526001600160e01b031985166044830152909116906305de62c0906064016020604051808303816000875af1158015611b3a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b5e91906155a5565b949350505050565b611b703382614369565b611b8c5760405162461bcd60e51b8152600401610d45906155c2565b61162d8383836143c7565b81611ba181614091565b611bbd5760405162461bcd60e51b8152600401610d45906152ed565b6000838152600d602052604090206002015483906304b6ebad60e31b906001600160a01b0316331480611bf65750611bf6333083611aba565b611c125760405162461bcd60e51b8152600401610d4590615317565b838051600003611c345760405162461bcd60e51b8152600401610d45906153e5565b6000868152600c60205260409020600501611c4f868261547d565b50604051666c6963656e736560c81b908790600080516020615a7b83398151915290600090a3505050505050565b631593a0b360e11b611c90333083611aba565b611cac5760405162461bcd60e51b8152600401610d459061534c565b816001600160a01b038116611cd35760405162461bcd60e51b8152600401610d45906153b0565b600880546001600160a01b0319166001600160a01b03851617905560405178646570656e64656e637952656769737472794164647265737360381b90600080516020615a5b83398151915290600090a2505050565b857f00000000000000000000000000000000000000000000000000000000000000008110158015611d6357506013546001600160f81b031681105b611d7f5760405162461bcd60e51b8152600401610d4590615610565b6000878152600d602052604090206002015487906001600160a01b03163314611dba5760405162461bcd60e51b8152600401610d45906152c8565b866001600160a01b038116611de15760405162461bcd60e51b8152600401610d45906153b0565b60648611158015611df3575060648411155b611e2d5760405162461bcd60e51b815260206004820152600b60248201526a4d6178206f66203130302560a81b6044820152606401610d45565b8787878787604051602001611e46959493929190615643565b60408051601f19818403018152828252805160209182012060008d8152600e9092529190205589907f6ff7d102bb3657a26dcbbcd299d821a066718a7cf76ae7cd98279f18b74da8ac90611ea3908b908b908b908b908b90615643565b60405180910390a2505050505050505050565b632b6cfc8d60e01b611ec9333083611aba565b611ee55760405162461bcd60e51b8152600401610d459061534c565b816001600160a01b038116611f0c5760405162461bcd60e51b8152600401610d45906153b0565b61162d83614563565b6000818152600c60205260409020600601805460609190611f359061537c565b80601f0160208091040260200160405190810160405280929190818152602001828054611f619061537c565b8015611fae5780601f10611f8357610100808354040283529160200191611fae565b820191906000526020600020905b815481529060010190602001808311611f9157829003601f168201915b50505050509050919050565b6000828152600d602052604090206002015482906001600160a01b03163314611ff55760405162461bcd60e51b8152600401610d45906152c8565b6000838152600c60205260409020600401612010838261547d565b50604051667765627369746560c81b908490600080516020615a7b83398151915290600090a3505050565b6000828152600d602052604090206002015482906001600160a01b031633146120765760405162461bcd60e51b8152600401610d45906152c8565b8180516000036120985760405162461bcd60e51b8152600401610d45906153e5565b6000848152600c602052604090206006016120b3848261547d565b50604051666261736555524960c81b908590600080516020615a7b83398151915290600090a350505050565b61162d83838360405180602001604052806000815250613455565b632419b94160e11b61210d333083611aba565b6121295760405162461bcd60e51b8152600401610d459061534c565b816001600160a01b0381166121505760405162461bcd60e51b8152600401610d45906153b0565b601280546001600160a01b0319166001600160a01b0385169081179091556040517fad0f299ec81a386c98df0ac27dae11dd020ed1b56963c53a7292e7a3a314539a90600090a2505050565b6304bbc4ff60e41b6121af333083611aba565b6121cb5760405162461bcd60e51b8152600401610d459061534c565b601982111561223b5760405162461bcd60e51b815260206004820152603660248201527f4d6178206f66204152545f424c4f434b535f4d41585f5052494d4152595f5341604482015275131154d7d4115490d153951051d1481c195c98d95b9d60521b6064820152608401610d45565b600f805460ff60a01b1916600160a01b60ff85160217905560405179617274626c6f636b735072696d61727950657263656e7461676560301b90600080516020615a5b83398151915290600090a25050565b600081815260026020526040812054600160a01b900460a01b6001600160a01b0319811682036122c05750600092915050565b604080516001600160a01b0319831660208201520160405160208183030381529060405280519060200120915050919050565b6000818152600260205260408120546001600160a01b0316806113d65760405162461bcd60e51b8152600401610d4590615676565b817f0000000000000000000000000000000000000000000000000000000000000000811015801561236357506013546001600160f81b031681105b61237f5760405162461bcd60e51b8152600401610d4590615610565b826369d14faf60e01b612393333083611aba565b806123d2575060006123a361291a565b6001600160a01b03161480156123d257506000828152600d60205260409020600201546001600160a01b031633145b6123ee5760405162461bcd60e51b8152600401610d45906156a8565b836001600160a01b0381166124155760405162461bcd60e51b8152600401610d45906153b0565b6000868152600d602052604080822060020180546001600160a01b0319166001600160a01b038916179055516c6172746973744164647265737360981b918891600080516020615a7b8339815191529190a3505050505050565b636c907b7f60e01b612482333083611aba565b61249e5760405162461bcd60e51b8152600401610d459061534c565b816001600160a01b0381166124c55760405162461bcd60e51b8152600401610d45906153b0565b61162d836145ba565b60006001600160a01b0382166125385760405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f7420612076616044820152683634b21037bbb732b960b91b6064820152608401610d45565b506001600160a01b031660009081526003602052604090205490565b61255c614641565b6125646141ee565b61256c6146a0565b565b857f000000000000000000000000000000000000000000000000000000000000000081101580156125a957506013546001600160f81b031681105b6125c55760405162461bcd60e51b8152600401610d4590615610565b866376ee6fab60e01b6125d9333083611aba565b80612618575060006125e961291a565b6001600160a01b031614801561261857506000828152600d60205260409020600201546001600160a01b031633145b6126345760405162461bcd60e51b8152600401610d45906156a8565b876001600160a01b03811661265b5760405162461bcd60e51b8152600401610d45906153b0565b8888888888604051602001612674959493929190615643565b60408051601f19818403018152918152815160209283012060008d8152600e909352912054146126e35760405162461bcd60e51b815260206004820152601a602482015279135d5cdd081b585d18da08185c9d1a5cdd081c1c9bdc1bdcd85b60321b6044820152606401610d45565b6000600d60008c81526020019081526020016000209050898160020160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550888160000160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550878160020160146101000a81548160ff021916908360ff160217905550868160010160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550858160010160146101000a81548160ff021916908360ff1602179055506000801b600e60008d8152602001908152602001600020819055508a7fc582d05e1da854143bd3271ef4529d79cf5a69fc6057ae320f357acfd291b73860405160405180910390a25050505050505050505050565b6000828152600d60205260408120600f54829182918291829182919060649061283790600160a01b900460ff168a615700565b6128419190615591565b60028201549097508789039060649061286490600160a01b900460ff1683615700565b61286e9190615591565b600f546001600160a01b031697508082039650935080841461289b5760028201546001600160a01b031694505b83156128af5781546001600160a01b031692505b50509295509295509295565b6000828152600c60205260409020805460609190600160301b900462ffffff1683106128f75750506040805160208101909152600081526113d6565b6000838152600982016020526040902054611b5e906001600160a01b03166146b2565b600061292e6006546001600160a01b031690565b905090565b60608060608060606000600c600088815260200190815260200160002090508060010180546129619061537c565b80601f016020809104026020016040519081016040528092919081815260200182805461298d9061537c565b80156129da5780601f106129af576101008083540402835291602001916129da565b820191906000526020600020905b8154815290600101906020018083116129bd57829003601f168201915b505050505095508060020180546129f09061537c565b80601f0160208091040260200160405190810160405280929190818152602001828054612a1c9061537c565b8015612a695780601f10612a3e57610100808354040283529160200191612a69565b820191906000526020600020905b815481529060010190602001808311612a4c57829003601f168201915b50505050509450806003018054612a7f9061537c565b80601f0160208091040260200160405190810160405280929190818152602001828054612aab9061537c565b8015612af85780601f10612acd57610100808354040283529160200191612af8565b820191906000526020600020905b815481529060010190602001808311612adb57829003601f168201915b50505050509350806004018054612b0e9061537c565b80601f0160208091040260200160405190810160405280929190818152602001828054612b3a9061537c565b8015612b875780601f10612b5c57610100808354040283529160200191612b87565b820191906000526020600020905b815481529060010190602001808311612b6a57829003601f168201915b50505050509250806005018054612b9d9061537c565b80601f0160208091040260200160405190810160405280929190818152602001828054612bc99061537c565b8015612c165780601f10612beb57610100808354040283529160200191612c16565b820191906000526020600020905b815481529060010190602001808311612bf957829003601f168201915b505050505091505091939590929450565b6060600180546114739061537c565b639ab31a2d60e01b612c49333083611aba565b612c655760405162461bcd60e51b8152600401610d459061534c565b612710821115612ccd5760405162461bcd60e51b815260206004820152602d60248201527f4d6178206f66204152545f424c4f434b535f4d41585f5345434f4e444152595f60448201526c53414c45535f4250532042505360981b6064820152608401610d45565b601182905560405174617274626c6f636b735365636f6e6461727942505360581b90600080516020615a5b83398151915290600090a25050565b63282fb95960e21b612d1a333083611aba565b612d365760405162461bcd60e51b8152600401610d459061534c565b816001600160a01b038116612d5d5760405162461bcd60e51b8152600401610d45906153b0565b600780546001600160a01b0319166001600160a01b038516179055604051766375726174696f6e52656769737472794164647265737360481b90600080516020615a5b83398151915290600090a2505050565b6000818152600d602052604090206002015481906001600160a01b03163314612deb5760405162461bcd60e51b8152600401610d45906152c8565b6000828152600c6020526040808220805460ff60901b198116600160901b9182900460ff161590910217905551651c185d5cd95960d21b918491600080516020615a7b8339815191529190a35050565b612e4633838361473d565b5050565b612e5382614091565b612e6e57612e6933306351d9665360e11b611aba565b612e8c565b6000828152600d60205260409020600201546001600160a01b031633145b612eed5760405162461bcd60e51b815260206004820152602c60248201527f4f6e6c7920617274697374207768656e20756e6c6f636b65642c206f776e657260448201526b081dda195b881b1bd8dad95960a21b6064820152608401610d45565b6000828152600c60205260409020600301612f08828261547d565b506040516a3232b9b1b934b83a34b7b760a91b908390600080516020615a7b83398151915290600090a35050565b6000806000806000612f4786611a51565b6000908152600d602052604090206002810154600182015491546001600160a01b0391821699918316985060ff600160a01b9384900481169850929004909116945092505050565b60148054612f9c9061537c565b80601f0160208091040260200160405190810160405280929190818152602001828054612fc89061537c565b80156130155780601f10612fea57610100808354040283529160200191613015565b820191906000526020600020905b815481529060010190602001808311612ff857829003601f168201915b505050505081565b8161302781614091565b6130435760405162461bcd60e51b8152600401610d45906152ed565b6000838152600d60205260409020600201548390632b2b404960e21b906001600160a01b031633148061307c575061307c333083611aba565b6130985760405162461bcd60e51b8152600401610d4590615317565b8380516000036130ba5760405162461bcd60e51b8152600401610d45906153e5565b6000868152600c602052604090206130d186614807565b8154600160301b9081900462ffffff9081166000908152600985016020526040902080546001600160a01b0319166001600160a01b039490941693909317909255825461312392919004166001615717565b815462ffffff91909116600160301b0262ffffff60301b19909116178155604051651cd8dc9a5c1d60d21b908890600080516020615a7b83398151915290600090a350505050505050565b8261317881614091565b6131945760405162461bcd60e51b8152600401610d45906152ed565b6000848152600d6020526040902060020154849063b1656ba360e01b906001600160a01b03163314806131cd57506131cd333083611aba565b6131e95760405162461bcd60e51b8152600401610d4590615317565b83805160000361320b5760405162461bcd60e51b8152600401610d45906153e5565b6000878152600c602052604090208054600160301b900462ffffff16871061326d5760405162461bcd60e51b81526020600482015260156024820152747363726970744964206f7574206f662072616e676560581b6044820152606401610d45565b6000878152600982016020526040902054613290906001600160a01b031661488f565b61329986614807565b600088815260098301602052604080822080546001600160a01b0319166001600160a01b0394909416939093179092559051651cd8dc9a5c1d60d21b918a91600080516020615a7b8339815191529190a35050505050505050565b600a54600090821061333e5760405162461bcd60e51b8152602060048201526013602482015272496e646578206f7574206f6620626f756e647360681b6044820152606401610d45565b600a828154811061335157613351615536565b6000918252602090912001546001600160a01b031692915050565b8161337681614091565b6133925760405162461bcd60e51b8152600401610d45906152ed565b6000838152600d60205260409020600201548390635bd827d760e11b906001600160a01b03163314806133cb57506133cb333083611aba565b6133e75760405162461bcd60e51b8152600401610d4590615317565b8380516000036134095760405162461bcd60e51b8152600401610d45906153e5565b6000868152600c60205260409020600201613424868261547d565b50604051696172746973744e616d6560b01b908790600080516020615a7b83398151915290600090a3505050505050565b61345f3383614369565b61347b5760405162461bcd60e51b8152600401610d45906155c2565b61348784848484614946565b50505050565b6060808261349a81613eea565b6134b65760405162461bcd60e51b8152600401610d4590615297565b604080516003808252608082019092529060208201606080368337505060408051600380825260808201909252929550905060208201606080368337019050509150600061350385611a51565b6000818152600d6020526040812080546001820154939450909260ff600160a01b928390048116939290910416908261353d83606461573a565b6135479190615700565b905060006135558484615700565b601154909150600083156135cb5760028701548b516001600160a01b03909116908c908390811061358857613588615536565b6001600160a01b0390921660209283029190910190910152838a826135ac81615562565b9350815181106135be576135be615536565b6020026020010181815250505b82156136395760018701548b516001600160a01b03909116908c90839081106135f6576135f6615536565b6001600160a01b0390921660209283029190910190910152828a8261361a81615562565b93508151811061362c5761362c615536565b6020026020010181815250505b81156136a5576010548b516001600160a01b03909116908c908390811061366257613662615536565b6001600160a01b0390921660209283029190910190910152818a8261368681615562565b93508151811061369857613698615536565b6020026020010181815250505b80600311156136c05780600303808c51038c52808b51038b52505b505050505050505050915091565b6000828152600d602052604090206002015482906001600160a01b031633146137095760405162461bcd60e51b8152600401610d45906152c8565b605f8211156137795760405162461bcd60e51b815260206004820152603660248201527f4d6178206f66204152544953545f4d41585f5345434f4e444152595f524f594160448201527513151657d4115490d153951051d1481c195c98d95b9d60521b6064820152608401610d45565b6000838152600d6020526040808220805460ff60a01b1916600160a01b60ff8716021790555170726f79616c747950657263656e7461676560781b918591600080516020615a7b8339815191529190a3505050565b6060816137da81613eea565b6137f65760405162461bcd60e51b8152600401610d4590615297565b6000600c600061380586611a51565b815260200190815260200160002060060180546138219061537c565b80601f016020809104026020016040519081016040528092919081815260200182805461384d9061537c565b801561389a5780601f1061386f5761010080835404028352916020019161389a565b820191906000526020600020905b81548152906001019060200180831161387d57829003601f168201915b50505050509050806138ab85614979565b6040516020016138bc929190615769565b6040516020818303038152906040529250505b50919050565b63cc90e72560e01b6138e8333083611aba565b6139045760405162461bcd60e51b8152600401610d459061534c565b8280516000036139265760405162461bcd60e51b8152600401610d45906153e5565b826001600160a01b03811661394d5760405162461bcd60e51b8152600401610d45906153b0565b601354600160f81b900460ff16156139a05760405162461bcd60e51b81526020600482015260166024820152752732bb90383937b532b1ba39903337b93134b23232b760511b6044820152606401610d45565b6013546001600160f81b03166000818152600d6020908152604080832060020180546001600160a01b0319166001600160a01b038a16179055600c90915290206001016139ed878261547d565b506000818152600c60205260409020805465ffffff00000060ff60901b011916613d09601e1b600160901b01178155600601613a2a601482615798565b50613a36816001615864565b601380546001600160f81b0319166001600160f81b03929092169190911790556040516618dc99585d195960ca1b908290600080516020615a7b83398151915290600090a3505050505050565b63340f0e4360e21b613a96333083611aba565b613ab25760405162461bcd60e51b8152600401610d459061534c565b817f00000000000000000000000000000000000000000000000000000000000000008110158015613aed57506013546001600160f81b031681105b613b095760405162461bcd60e51b8152600401610d4590615610565b6000838152600c6020526040808220805460ff60881b198116600160881b9182900460ff1615909102179055516561637469766560d01b918591600080516020615a7b8339815191529190a3505050565b80613b6481614091565b613b805760405162461bcd60e51b8152600401610d45906152ed565b6000828152600d6020526040902060020154829063db2ff86160e01b906001600160a01b0316331480613bb95750613bb9333083611aba565b613bd55760405162461bcd60e51b8152600401610d4590615317565b6000848152600c602052604090208054600160301b900462ffffff16613c3d5760405162461bcd60e51b815260206004820152601e60248201527f746865726520617265206e6f207363726970747320746f2072656d6f766500006044820152606401610d45565b8054613c87906009830190600090613c6390600190600160301b900462ffffff16615884565b62ffffff1681526020810191909152604001600020546001600160a01b031661488f565b80546009820190600090613ca990600190600160301b900462ffffff16615884565b62ffffff908116825260208201929092526040908101600090812080546001600160a01b0319169055835462ffffff60301b198116600160301b918290048516600019019094160292909217835551651cd8dc9a5c1d60d21b918791600080516020615a7b8339815191529190a35050505050565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b6000818152600c60205260408120600781015460609283929091613d6f90614a79565b9350806008018054613d809061537c565b80601f0160208091040260200160405190810160405280929190818152602001828054613dac9061537c565b8015613df95780601f10613dce57610100808354040283529160200191613df9565b820191906000526020600020905b815481529060010190602001808311613ddc57829003601f168201915b5050935496989297505050600160301b90940462ffffff169392505050565b613e20614641565b6001600160a01b038116613e855760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610d45565b61146181614ae4565b600061292e61291a565b600680546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6000908152600260205260409020546001600160a01b0316151590565b6000818152600c6020526040808220805467ffffffffffffffff60481b1916600160481b426001600160401b031602179055516818dbdb5c1b195d195960ba1b918391600080516020615a7b8339815191529190a350565b6001600160a01b038216613fb55760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610d45565b613fbe81613eea565b1561400a5760405162461bcd60e51b815260206004820152601c60248201527b115490cdcc8c4e881d1bdad95b88185b1c9958591e481b5a5b9d195960221b6044820152606401610d45565b6001600160a01b03821660009081526003602052604081208054600192906140339084906158a0565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b6000817f000000000000000000000000000000000000000000000000000000000000000081101580156140ce57506013546001600160f81b031681105b6140ea5760405162461bcd60e51b8152600401610d4590615610565b6000838152600c6020526040902054600160481b90046001600160401b03168015808061412257506224ea00614120834261573a565b105b95945050505050565b600080805b60208160ff16101561418a576000868260ff166020811061415357614153615536565b1a90508015801590614168575060808160ff16105b15614181578560ff168160ff1603614181578260010192505b50600101614130565b8360ff168260ff1614925050509392505050565b60006001600160e01b031982166380ac58cd60e01b14806141cf57506001600160e01b03198216635b5e139f60e01b145b806113d657506301ffc9a760e01b6001600160e01b03198316146113d6565b601354600160f81b900460ff1661256c57601380546001600160f81b0316600160f81b179055604051733732bba83937b532b1ba39a337b93134b23232b760611b90600080516020615a5b83398151915290600090a2565b61424f81613eea565b6114615760405162461bcd60e51b8152600401610d4590615676565b600081815260046020526040902080546001600160a01b0319166001600160a01b03841690811790915581906142a0826122f3565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b600f80546001600160a01b0319166001600160a01b0383161790556040517b617274626c6f636b735072696d61727953616c65734164647265737360201b90600080516020615a5b83398151915290600090a250565b601461433b828261547d565b506040516d64656661756c744261736555524960901b90600080516020615a5b83398151915290600090a250565b600080614375836122f3565b9050806001600160a01b0316846001600160a01b0316148061439c575061439c8185613d1e565b80611b5e5750836001600160a01b03166143b5846114f6565b6001600160a01b031614949350505050565b826001600160a01b03166143da826122f3565b6001600160a01b03161461443e5760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b6064820152608401610d45565b6001600160a01b0382166144a05760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610d45565b6144ab60008261426b565b6001600160a01b03831660009081526003602052604081208054600192906144d490849061573a565b90915550506001600160a01b03821660009081526003602052604081208054600192906145029084906158a0565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b601080546001600160a01b0319166001600160a01b0383161790556040517f617274626c6f636b735365636f6e6461727953616c657341646472657373000090600080516020615a5b83398151915290600090a250565b600980546001600160a01b0383166001600160a01b03199182168117909255600a805460018101825560009182527fc65a7bb8d6351c1cf70c95a316cc6a92839c986682d98bc35f958f4883f9d2a801805490921690921790556040517072616e646f6d697a65724164647265737360781b91600080516020615a5b83398151915291a250565b3361464a61291a565b6001600160a01b03161461256c5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610d45565b6146a8614641565b61256c6000614ae4565b6060813b60688110806146c3575080155b156147105760405162461bcd60e51b815260206004820152601d60248201527f436f6e7472616374417353746f726167653a2052656164204572726f720000006044820152606401610d45565b604080516028198301601f19168101909152606719820180825290925080606860208501863c5050919050565b816001600160a01b0316836001600160a01b03160361479a5760405162461bcd60e51b815260206004820152601960248201527822a9219b99189d1030b8383937bb32903a379031b0b63632b960391b6044820152606401610d45565b6001600160a01b03838116600081815260056020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b600080308360405160200161481d9291906158b3565b60405160208183030381529060405290508051602082016000f091506001600160a01b0382166138cf5760405162461bcd60e51b815260206004820152601e60248201527f436f6e7472616374417353746f726167653a205772697465204572726f7200006044820152606401610d45565b6000816001600160a01b03166040516148b3906001600160f81b0319815260010190565b6000604051808303816000865af19150503d80600081146148f0576040519150601f19603f3d011682016040523d82523d6000602084013e6148f5565b606091505b5050905080612e465760405162461bcd60e51b815260206004820152601f60248201527f436f6e7472616374417353746f726167653a2044656c657465204572726f72006044820152606401610d45565b6149518484846143c7565b61495d84848484614b0f565b6134875760405162461bcd60e51b8152600401610d459061597b565b6060816000036149a05750506040805180820190915260018152600360fc1b602082015290565b8160005b81156149ca57806149b481615562565b91506149c39050600a83615591565b91506149a4565b6000816001600160401b038111156149e4576149e4614dc0565b6040519080825280601f01601f191660200182016040528015614a0e576020820181803683370190505b5090505b8415611b5e57614a2360018361573a565b9150614a30600a866159cd565b614a3b9060306158a0565b60f81b818381518110614a5057614a50615536565b60200101906001600160f81b031916908160001a905350614a72600a86615591565b9450614a12565b606060005b828160ff1660208110614a9357614a93615536565b1a60f81b6001600160f81b03191615801590614ab2575060208160ff16105b15614ac95780614ac1816159e1565b915050614a7e565b60405191506040820160405280825282602083015250919050565b614aed81613e98565b600b80546001600160a01b0319166001600160a01b0392909216919091179055565b60006001600160a01b0384163b15614c0557604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290614b53903390899088908890600401615a00565b6020604051808303816000875af1925050508015614b8e575060408051601f3d908101601f19168201909252614b8b91810190615a3d565b60015b614beb573d808015614bbc576040519150601f19603f3d011682016040523d82523d6000602084013e614bc1565b606091505b508051600003614be35760405162461bcd60e51b8152600401610d459061597b565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050611b5e565b506001949350505050565b60008060408385031215614c2357600080fd5b50508035926020909101359150565b6001600160a01b038116811461146157600080fd5b600080600060608486031215614c5c57600080fd5b8335614c6781614c32565b9250602084013591506040840135614c7e81614c32565b809150509250925092565b60008060408385031215614c9c57600080fd5b82359150602083013562ffffff81168114614cb657600080fd5b809150509250929050565b6001600160e01b03198116811461146157600080fd5b600060208284031215614ce957600080fd5b8135614cf481614cc1565b9392505050565b60005b83811015614d16578181015183820152602001614cfe565b50506000910152565b60008151808452614d37816020860160208601614cfb565b601f01601f19169290920160200192915050565b602081526000614cf46020830184614d1f565b600060208284031215614d7057600080fd5b5035919050565b60008060408385031215614d8a57600080fd5b8235614d9581614c32565b946020939093013593505050565b600060208284031215614db557600080fd5b8135614cf481614c32565b634e487b7160e01b600052604160045260246000fd5b60006001600160401b0380841115614df057614df0614dc0565b604051601f8501601f19908116603f01168101908282118183101715614e1857614e18614dc0565b81604052809350858152868686011115614e3157600080fd5b858560208301376000602087830101525050509392505050565b600082601f830112614e5c57600080fd5b614cf483833560208501614dd6565b60008060408385031215614e7e57600080fd5b8235915060208301356001600160401b03811115614e9b57600080fd5b614ea785828601614e4b565b9150509250929050565b600060208284031215614ec357600080fd5b81356001600160401b03811115614ed957600080fd5b611b5e84828501614e4b565b600080600060608486031215614efa57600080fd5b8335614f0581614c32565b92506020840135614f1581614c32565b91506040840135614c7e81614cc1565b600080600060608486031215614f3a57600080fd5b8335614f4581614c32565b92506020840135614f5581614c32565b929592945050506040919091013590565b60008060008060008060c08789031215614f7f57600080fd5b863595506020870135614f9181614c32565b94506040870135614fa181614c32565b9350606087013592506080870135614fb881614c32565b8092505060a087013590509295509295509295565b60008060408385031215614fe057600080fd5b823591506020830135614cb681614c32565b60a08152600061500560a0830188614d1f565b82810360208401526150178188614d1f565b9050828103604084015261502b8187614d1f565b9050828103606084015261503f8186614d1f565b905082810360808401526150538185614d1f565b98975050505050505050565b801515811461146157600080fd5b6000806040838503121561508057600080fd5b823561508b81614c32565b91506020830135614cb68161505f565b6000806000606084860312156150b057600080fd5b833592506020840135915060408401356001600160401b038111156150d457600080fd5b6150e086828701614e4b565b9150509250925092565b6000806000806080858703121561510057600080fd5b843561510b81614c32565b9350602085013561511b81614c32565b92506040850135915060608501356001600160401b0381111561513d57600080fd5b8501601f8101871361514e57600080fd5b61515d87823560208401614dd6565b91505092959194509250565b604080825283519082018190526000906020906060840190828701845b828110156151ab5781516001600160a01b031684529284019290840190600101615186565b5050508381038285015284518082528583019183019060005b818110156151e0578351835292840192918401916001016151c4565b5090979650505050505050565b6000806040838503121561520057600080fd5b82356001600160401b0381111561521657600080fd5b61522285828601614e4b565b9250506020830135614cb681614c32565b6000806040838503121561524657600080fd5b823561525181614c32565b91506020830135614cb681614c32565b6060815260006152746060830186614d1f565b82810360208401526152868186614d1f565b915050826040830152949350505050565b602080825260179082015276151bdad95b88125108191bd95cc81b9bdd08195e1a5cdd604a1b604082015260600190565b6020808252600b908201526a13db9b1e48185c9d1a5cdd60aa1b604082015260600190565b60208082526010908201526f13db9b1e481a59881d5b9b1bd8dad95960821b604082015260600190565b6020808252818101527f4f6e6c7920617274697374206f722041646d696e2041434c20616c6c6f776564604082015260600190565b60208082526016908201527513db9b1e4810591b5a5b881050d308185b1b1bddd95960521b604082015260600190565b600181811c9082168061539057607f821691505b6020821081036138cf57634e487b7160e01b600052602260045260246000fd5b6020808252601b908201527a4d75737420696e707574206e6f6e2d7a65726f206164647265737360281b604082015260600190565b6020808252601b908201527a4d75737420696e707574206e6f6e2d656d70747920737472696e6760281b604082015260600190565b601f82111561162d57600081815260208120601f850160051c810160208610156154415750805b601f850160051c820191505b818110156154605782815560010161544d565b505050505050565b600019600383901b1c191660019190911b1790565b81516001600160401b0381111561549657615496614dc0565b6154aa816154a4845461537c565b8461541a565b602080601f8311600181146154d957600084156154c75750858301515b6154d18582615468565b865550615460565b600085815260208120601f198616915b82811015615508578886015182559484019460019091019084016154e9565b50858210156155265787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600182016155745761557461554c565b5060010190565b634e487b7160e01b600052601260045260246000fd5b6000826155a0576155a061557b565b500490565b6000602082840312156155b757600080fd5b8151614cf48161505f565b6020808252602e908201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560408201526d1c881b9bdc88185c1c1c9bdd995960921b606082015260800190565b602080825260199082015278141c9bda9958dd08125108191bd95cc81b9bdd08195e1a5cdd603a1b604082015260600190565b6001600160a01b039586168152938516602085015260408401929092529092166060820152608081019190915260a00190565b602080825260189082015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b604082015260600190565b60208082526038908201527f4f6e6c792041646d696e2041434c20616c6c6f7765642c206f722061727469736040820152771d081a59881bdddb995c881a185cc81c995b9bdd5b98d95960421b606082015260800190565b80820281158282048414176113d6576113d661554c565b62ffffff8181168382160190808211156157335761573361554c565b5092915050565b818103818111156113d6576113d661554c565b6000815161575f818560208601614cfb565b9290920192915050565b6000835161577b818460208801614cfb565b83519083019061578f818360208801614cfb565b01949350505050565b8181036157a3575050565b6157ad825461537c565b6001600160401b038111156157c4576157c4614dc0565b6157d2816154a4845461537c565b6000601f82116001811461580057600083156157ee5750848201545b6157f88482615468565b855550611292565b600085815260209020601f19841690600086815260209020845b8381101561583a578286015482556001958601959091019060200161581a565b50858310156155265793015460001960f8600387901b161c19169092555050600190811b01905550565b6001600160f81b038181168382160190808211156157335761573361554c565b62ffffff8281168282160390808211156157335761573361554c565b808201808211156113d6576113d661554c565b6a600b5981380380925939f360a81b81526b1808181218000e5800144cc560a21b600b8201526330082bff60e11b60178201526416d8004d8560da1b601b82015263300cabff60e11b6020820152635b60003560e01b6024820152617fff60f01b6028820152600060488201819052600560fa1b6049830152633021abff60e11b604a830152645b600051ff60d81b604e8301526159586053830160008152600c0190565b61596e818660601b6001600160601b0319169052565b614122601482018561574d565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b6000826159dc576159dc61557b565b500690565b600060ff821660ff81036159f7576159f761554c565b60010192915050565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090615a3390830184614d1f565b9695505050505050565b600060208284031215615a4f57600080fd5b8151614cf481614cc156fe8b810f233ce7ee6e962ab4d98bf0277751de1f5589de3dcc812ac2047994d009b96a30340e86d03ce4be42f94ac02d7b27b4a4cdae942beb69026718dfe66afca26469706673582212201445a140cab5e6d18a3ace8afa5217127d48446e0018ef60de21b5e19309851164736f6c634300081100338b810f233ce7ee6e962ab4d98bf0277751de1f5589de3dcc812ac2047994d00900000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000001000000000000000000000000003f4ae5e1e84e5b6bfd5dc429a4d1e6177cc000ff00000000000000000000000094cc7981227d9e644e153766c386ef47556c31470000000000000000000000000000000000000000000000000000000000000078000000000000000000000000000000000000000000000000000000000000002341727420426c6f636b7320563320436f72652053746167696e672028476f65726c69290000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001d424c4f434b535f56335f434f52455f53544147494e475f474f45524c49000000
Deployed Bytecode
0x608060405234801561001057600080fd5b506004361061042a5760003560e01c806376ee6fab1161022e578063ad2cdfc411610137578063ad2cdfc414610a82578063ae45ad9814610aaf578063b1656ba314610add578063b168762214610af0578063b7b04fae14610b03578063b88d4fde14610b16578063b971136814610b29578063bb3bafd614610b31578063bba4448a14610b52578063c34a03b514610b65578063c87b56dd14610b78578063cc90e72514610b8b578063d03c390c14610b9e578063db2ff86114610bb1578063ddd0ee0f14610bc4578063e935b7b114610bd7578063e985e9c514610be8578063eb9cd5d414610bfb578063ed8abfda14610c1d578063f2fde38b14610c47578063f313d73314610c5a578063f851a44014610cf0578063f893c07b14610cf857600080fd5b806376ee6fab1461086d5780638639415b146108805780638c3c9cdd146108cb5780638da5cb5b146108de5780638dd91a56146108e657806392f002331461090a57806394535b991461091d57806395d89b41146109305780639ab31a2d146109385780639afc2be51461094b578063a0bee56414610966578063a11ec70a14610979578063a22cb4651461098c578063a3b2cca61461099f578063a47d29cb146109b2578063a65ff74c146109de578063a87ac619146107a7578063abcbb7b414610a1c578063ac11fa1c14610a24578063acad012414610a44578063accd17f014610a57578063ad0305ce14610a6057600080fd5b806328ec8f501161033b57806328ec8f501461065a5780632b274166146106875780632b65e67d1461069a5780632b6cfc8d146106ad5780632d9c0205146106c057806336c7c12c146106d357806337859963146106e657806338c8e468146106f95780633949f906146107255780633e48e8481461073657806342842e0e14610749578063483372821461075c5780634bbc4ff01461076f5780634e1d64af146107825780634f029c39146107a75780635508fd52146107ba57806358b9a5a9146107ce578063621a1f74146108065780636352211e1461081957806369d14faf1461082c5780636c907b7f1461083f57806370a0823114610852578063715018a61461086557600080fd5b80611e3c1461042f5780615de5146104445780630132c6971461046a57806301856fd41461047d57806301ffc9a71461049057806304143a5c146104b357806306fdde03146104bb578063081812fc146104d0578063095ea7b3146104fb5780630c5b1ad41461050e5780630d170673146105215780630e79c928146105345780630ea5613f146105475780630ebeb0ee1461059157806314fc8f2d146105ba57806317df5366146105d55780631b689c0b146105e85780631e9bef46146105fb5780632302cbda1461060e578063230448b11461062157806323b872dd1461063457806325b75d6814610647575b600080fd5b61044261043d366004614c10565b610d1f565b005b610457610452366004614c47565b610e71565b6040519081526020015b60405180910390f35b610442610478366004614c89565b611115565b61044261048b366004614c10565b611299565b6104a361049e366004614cd7565b6113b1565b6040519015158152602001610461565b6104426113dc565b6104c3611464565b6040516104619190614d4b565b6104e36104de366004614d5e565b6114f6565b6040516001600160a01b039091168152602001610461565b610442610509366004614d77565b61151d565b61044261051c366004614da3565b611632565b61044261052f366004614e6b565b611691565b610442610542366004614e6b565b611774565b61055a610555366004614d5e565b6119ee565b60408051968752602087019590955292151593850193909352151560608401526080830191909152151560a082015260c001610461565b6104e361059f366004614d5e565b6000908152600d60205260409020546001600160a01b031690565b6104e373059edd72cd353df5106d2b9cc5ab83a52287ac3a81565b6008546104e3906001600160a01b031681565b6104576105f6366004614d5e565b611a51565b600b546104e3906001600160a01b031681565b61044261061c366004614eb1565b611a60565b6104a361062f366004614ee5565b611aba565b610442610642366004614f25565b611b66565b610442610655366004614e6b565b611b97565b610457610668366004614d5e565b6000908152600d6020526040902060010154600160a01b900460ff1690565b610442610695366004614da3565b611c7d565b6104426106a8366004614f66565b611d28565b6104426106bb366004614da3565b611eb6565b6104c36106ce366004614d5e565b611f15565b6009546104e3906001600160a01b031681565b6104426106f4366004614e6b565b611fba565b6104e3610707366004614d5e565b6000908152600d60205260409020600101546001600160a01b031690565b600f546001600160a01b03166104e3565b610442610744366004614e6b565b61203b565b610442610757366004614f25565b6120df565b61044261076a366004614da3565b6120fa565b61044261077d366004614d5e565b61219c565b6104c360405180604001604052806006815260200165076332e302e360d41b81525081565b610457600f54600160a01b900460ff1690565b6013546104a390600160f81b900460ff1681565b6104e36107dc366004614c10565b6000918252600c60209081526040808420928452600990920190529020546001600160a01b031690565b610457610814366004614d5e565b61228d565b6104e3610827366004614d5e565b6122f3565b61044261083a366004614fcd565b612328565b61044261084d366004614da3565b61246f565b610457610860366004614da3565b6124ce565b610442612554565b61044261087b366004614f66565b61256e565b61089361088e366004614c10565b612804565b604080519687526001600160a01b039586166020880152860193909352908316606085015260808401521660a082015260c001610461565b6104c36108d9366004614c10565b6128bb565b6104e361291a565b6108f96108f4366004614d5e565b612933565b604051610461959493929190614ff2565b6012546104e3906001600160a01b031681565b6010546104e3906001600160a01b031681565b6104c3612c27565b610442610946366004614d5e565b612c36565b6104e373a7d8d9ef8d8ce8992df33d8b8cf4aebabd5bd27081565b610442610974366004614da3565b612d07565b610442610987366004614d5e565b612db0565b61044261099a36600461506d565b612e3b565b6104426109ad366004614e6b565b612e4a565b6104e36109c0366004614d5e565b6000908152600d60205260409020600201546001600160a01b031690565b6109f16109ec366004614d5e565b612f36565b604080516001600160a01b039586168152949093166020850152918301526060820152608001610461565b6104c3612f8f565b610457610a32366004614d5e565b600e6020526000908152604090205481565b610442610a52366004614e6b565b61301d565b61045760115481565b6104a3610a6e366004614da3565b6012546001600160a01b0390811691161490565b610457610a90366004614d5e565b6000908152600d6020526040902060020154600160a01b900460ff1690565b6104c36040518060400160405280600f81526020016e47656e417274373231436f7265563360881b81525081565b610442610aeb36600461509b565b61316e565b6104e3610afe366004614d5e565b6132f4565b610442610b11366004614e6b565b61336c565b610442610b243660046150ea565b613455565b600a54610457565b610b44610b3f366004614d5e565b61348d565b604051610461929190615169565b6007546104e3906001600160a01b031681565b610442610b73366004614c10565b6136ce565b6104c3610b86366004614d5e565b6137ce565b610442610b993660046151ed565b6138d5565b610442610bac366004614d5e565b613a83565b610442610bbf366004614d5e565b613b5a565b600f546104e3906001600160a01b031681565b6013546001600160f81b0316610457565b6104a3610bf6366004615233565b613d1e565b610c0e610c09366004614d5e565b613d4c565b60405161046193929190615261565b610457610c2b366004614d5e565b6000908152600d6020526040902054600160a01b900460ff1690565b610442610c55366004614da3565b613e18565b610cb2610c68366004614d5e565b6000908152600d60205260409020600281015481546001909201546001600160a01b03808316948482169460ff600160a01b95869004811695938516948490048116939091041690565b604080516001600160a01b039788168152958716602087015285019390935293166060830152608082019290925260a081019190915260c001610461565b6104e3613e8e565b6104577f000000000000000000000000000000000000000000000000000000000000007881565b81610d2981613eea565b610d4e5760405162461bcd60e51b8152600401610d4590615297565b60405180910390fd5b60008381526002602052604090206009546001600160a01b03163314610db05760405162461bcd60e51b815260206004820152601760248201527613db9b1e481c985b991bdb5a5e995c881b585e481cd95d604a1b6044820152606401610d45565b8054600160a01b900460a01b6001600160a01b03191615610e0c5760405162461bcd60e51b8152602060048201526016602482015275151bdad95b881a185cda08185b1c9958591e481cd95d60521b6044820152606401610d45565b82610e4d5760405162461bcd60e51b8152602060048201526011602482015270139bc81e995c9bc81a185cda081cd95959607a1b6044820152606401610d45565b805460a09390931c600160a01b026001600160a01b03909316929092179091555050565b6012546000906001600160a01b03163314610ece5760405162461bcd60e51b815260206004820152601e60248201527f4d757374206d696e742066726f6d206d696e74657220636f6e747261637400006044820152606401610d45565b6000838152600c60205260409020805462ffffff808216916001830191630100000090910416808310610f435760405162461bcd60e51b815260206004820152601f60248201527f4d757374206e6f7420657863656564206d617820696e766f636174696f6e73006044820152606401610d45565b8354600160881b900460ff1680610f7657506000878152600d60205260409020600201546001600160a01b038781169116145b610fc25760405162461bcd60e51b815260206004820181905260248201527f50726f6a656374206d75737420657869737420616e64206265206163746976656044820152606401610d45565b8354600160901b900460ff161580610ff657506000878152600d60205260409020600201546001600160a01b038781169116145b61103a5760405162461bcd60e51b8152602060048201526015602482015274283ab931b430b9b2b99030b932903830bab9b2b21760591b6044820152606401610d45565b835462ffffff191662ffffff8381169182178655848116620f42408a020191908316900361106b5761106b88613f07565b6110758982613f5f565b600954604051635b140b8d60e11b8152600481018390526001600160a01b039091169063b628171a90602401600060405180830381600087803b1580156110bb57600080fd5b505af11580156110cf573d6000803e3d6000fd5b50506040518392506001600160a01b038c1691507f0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d412139688590600090a398975050505050505050565b6000828152600d602052604090206002015482906001600160a01b031633146111505760405162461bcd60e51b8152600401610d45906152c8565b6000838152600c60205260409020805462ffffff80821691630100000090048116908516106111cd5760405162461bcd60e51b8152602060048201526024808201527f6d6178496e766f636174696f6e73206d6179206f6e6c79206265206465637265604482015263185cd95960e21b6064820152608401610d45565b808462ffffff1610156112375760405162461bcd60e51b815260206004820152602c60248201527f4f6e6c79206d617820696e766f636174696f6e73206774652063757272656e7460448201526b20696e766f636174696f6e7360a01b6064820152608401610d45565b815465ffffff0000001916630100000062ffffff8616021782556040516d6d6178496e766f636174696f6e7360901b908690600080516020615a7b83398151915290600090a3808462ffffff16036112925761129285613f07565b5050505050565b816112a381614091565b6112bf5760405162461bcd60e51b8152600401610d45906152ed565b6000838152600d6020526040902060020154839062615bf560e21b906001600160a01b03163314806112f757506112f7333083611aba565b6113135760405162461bcd60e51b8152600401610d4590615317565b6000858152600c60205260409081902090611331908690600161412b565b61137a5760405162461bcd60e51b815260206004820152601a60248201527901b5d5cdd0818dbdb9d185a5b88195e1858dd1b1e481bdb9948160361b6044820152606401610d45565b60078101859055604051697363726970745479706560b01b908790600080516020615a7b83398151915290600090a3505050505050565b60006001600160e01b03198216635d9dd7eb60e11b14806113d657506113d68261419e565b92915050565b6301050e9760e21b6113ef333083611aba565b61140b5760405162461bcd60e51b8152600401610d459061534c565b601354600160f81b900460ff16156114595760405162461bcd60e51b815260206004820152601160248201527020b63932b0b23c903337b93134b23232b760791b6044820152606401610d45565b6114616141ee565b50565b6060600080546114739061537c565b80601f016020809104026020016040519081016040528092919081815260200182805461149f9061537c565b80156114ec5780601f106114c1576101008083540402835291602001916114ec565b820191906000526020600020905b8154815290600101906020018083116114cf57829003601f168201915b5050505050905090565b600061150182614246565b506000908152600460205260409020546001600160a01b031690565b6000611528826122f3565b9050806001600160a01b0316836001600160a01b0316036115955760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b6064820152608401610d45565b336001600160a01b03821614806115b157506115b18133613d1e565b6116235760405162461bcd60e51b815260206004820152603e60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206e6f7220617070726f76656420666f7220616c6c00006064820152608401610d45565b61162d838361426b565b505050565b630316c6b560e21b611645333083611aba565b6116615760405162461bcd60e51b8152600401610d459061534c565b816001600160a01b0381166116885760405162461bcd60e51b8152600401610d45906153b0565b61162d836142d9565b8161169b81614091565b6116b75760405162461bcd60e51b8152600401610d45906152ed565b6000838152600d60205260409020600201548390630d17067360e01b906001600160a01b03163314806116f057506116f0333083611aba565b61170c5760405162461bcd60e51b8152600401610d4590615317565b83805160000361172e5760405162461bcd60e51b8152600401610d45906153e5565b6000868152600c60205260409020600101611749868261547d565b50604051636e616d6560e01b908790600080516020615a7b83398151915290600090a3505050505050565b8161177e81614091565b61179a5760405162461bcd60e51b8152600401610d45906152ed565b6000838152600d602052604090206002015483906301cf392560e31b906001600160a01b03163314806117d357506117d3333083611aba565b6117ef5760405162461bcd60e51b8152600401610d4590615317565b8380516000036118115760405162461bcd60e51b8152600401610d45906153e5565b84518590600b8111156118655760405162461bcd60e51b815260206004820152601c60248201527b41737065637420726174696f20666f726d617420746f6f206c6f6e6760201b6044820152606401610d45565b60008060005b8381101561195157600085828151811061188757611887615536565b01602001516001600160f81b0319169050600360fc1b81108015906118ba5750603960f81b6001600160f81b0319821611155b156118c957600192505061193f565b6001600160f81b03198116601760f91b036118ed57836118ed57600193505061193f565b60405162461bcd60e51b815260206004820152602160248201527f496d70726f7065726c7920666f726d61747465642061737065637420726174696044820152606f60f81b6064820152608401610d45565b8061194981615562565b91505061186b565b508061199d5760405162461bcd60e51b815260206004820152601b60248201527a41737065637420726174696f20686173206e6f206e756d6265727360281b6044820152606401610d45565b60008a8152600c602052604090206008016119b88a8261547d565b506040516a617370656374526174696f60a81b908b90600080516020615a7b83398151915290600090a350505050505050505050565b6000818152600c60205260408120805462ffffff808216936301000000830490911692600160881b830460ff90811693600160901b810490911692600160481b9091046001600160401b031691611a4488614091565b1591505091939550919395565b60006113d6620f424083615591565b63118165ed60e11b611a73333083611aba565b611a8f5760405162461bcd60e51b8152600401610d459061534c565b818051600003611ab15760405162461bcd60e51b8152600401610d45906153e5565b61162d8361432f565b600080611ac561291a565b6001600160a01b031614158015611b5e5750600b546040516217798b60e61b81526001600160a01b03868116600483015285811660248301526001600160e01b031985166044830152909116906305de62c0906064016020604051808303816000875af1158015611b3a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b5e91906155a5565b949350505050565b611b703382614369565b611b8c5760405162461bcd60e51b8152600401610d45906155c2565b61162d8383836143c7565b81611ba181614091565b611bbd5760405162461bcd60e51b8152600401610d45906152ed565b6000838152600d602052604090206002015483906304b6ebad60e31b906001600160a01b0316331480611bf65750611bf6333083611aba565b611c125760405162461bcd60e51b8152600401610d4590615317565b838051600003611c345760405162461bcd60e51b8152600401610d45906153e5565b6000868152600c60205260409020600501611c4f868261547d565b50604051666c6963656e736560c81b908790600080516020615a7b83398151915290600090a3505050505050565b631593a0b360e11b611c90333083611aba565b611cac5760405162461bcd60e51b8152600401610d459061534c565b816001600160a01b038116611cd35760405162461bcd60e51b8152600401610d45906153b0565b600880546001600160a01b0319166001600160a01b03851617905560405178646570656e64656e637952656769737472794164647265737360381b90600080516020615a5b83398151915290600090a2505050565b857f00000000000000000000000000000000000000000000000000000000000000788110158015611d6357506013546001600160f81b031681105b611d7f5760405162461bcd60e51b8152600401610d4590615610565b6000878152600d602052604090206002015487906001600160a01b03163314611dba5760405162461bcd60e51b8152600401610d45906152c8565b866001600160a01b038116611de15760405162461bcd60e51b8152600401610d45906153b0565b60648611158015611df3575060648411155b611e2d5760405162461bcd60e51b815260206004820152600b60248201526a4d6178206f66203130302560a81b6044820152606401610d45565b8787878787604051602001611e46959493929190615643565b60408051601f19818403018152828252805160209182012060008d8152600e9092529190205589907f6ff7d102bb3657a26dcbbcd299d821a066718a7cf76ae7cd98279f18b74da8ac90611ea3908b908b908b908b908b90615643565b60405180910390a2505050505050505050565b632b6cfc8d60e01b611ec9333083611aba565b611ee55760405162461bcd60e51b8152600401610d459061534c565b816001600160a01b038116611f0c5760405162461bcd60e51b8152600401610d45906153b0565b61162d83614563565b6000818152600c60205260409020600601805460609190611f359061537c565b80601f0160208091040260200160405190810160405280929190818152602001828054611f619061537c565b8015611fae5780601f10611f8357610100808354040283529160200191611fae565b820191906000526020600020905b815481529060010190602001808311611f9157829003601f168201915b50505050509050919050565b6000828152600d602052604090206002015482906001600160a01b03163314611ff55760405162461bcd60e51b8152600401610d45906152c8565b6000838152600c60205260409020600401612010838261547d565b50604051667765627369746560c81b908490600080516020615a7b83398151915290600090a3505050565b6000828152600d602052604090206002015482906001600160a01b031633146120765760405162461bcd60e51b8152600401610d45906152c8565b8180516000036120985760405162461bcd60e51b8152600401610d45906153e5565b6000848152600c602052604090206006016120b3848261547d565b50604051666261736555524960c81b908590600080516020615a7b83398151915290600090a350505050565b61162d83838360405180602001604052806000815250613455565b632419b94160e11b61210d333083611aba565b6121295760405162461bcd60e51b8152600401610d459061534c565b816001600160a01b0381166121505760405162461bcd60e51b8152600401610d45906153b0565b601280546001600160a01b0319166001600160a01b0385169081179091556040517fad0f299ec81a386c98df0ac27dae11dd020ed1b56963c53a7292e7a3a314539a90600090a2505050565b6304bbc4ff60e41b6121af333083611aba565b6121cb5760405162461bcd60e51b8152600401610d459061534c565b601982111561223b5760405162461bcd60e51b815260206004820152603660248201527f4d6178206f66204152545f424c4f434b535f4d41585f5052494d4152595f5341604482015275131154d7d4115490d153951051d1481c195c98d95b9d60521b6064820152608401610d45565b600f805460ff60a01b1916600160a01b60ff85160217905560405179617274626c6f636b735072696d61727950657263656e7461676560301b90600080516020615a5b83398151915290600090a25050565b600081815260026020526040812054600160a01b900460a01b6001600160a01b0319811682036122c05750600092915050565b604080516001600160a01b0319831660208201520160405160208183030381529060405280519060200120915050919050565b6000818152600260205260408120546001600160a01b0316806113d65760405162461bcd60e51b8152600401610d4590615676565b817f0000000000000000000000000000000000000000000000000000000000000078811015801561236357506013546001600160f81b031681105b61237f5760405162461bcd60e51b8152600401610d4590615610565b826369d14faf60e01b612393333083611aba565b806123d2575060006123a361291a565b6001600160a01b03161480156123d257506000828152600d60205260409020600201546001600160a01b031633145b6123ee5760405162461bcd60e51b8152600401610d45906156a8565b836001600160a01b0381166124155760405162461bcd60e51b8152600401610d45906153b0565b6000868152600d602052604080822060020180546001600160a01b0319166001600160a01b038916179055516c6172746973744164647265737360981b918891600080516020615a7b8339815191529190a3505050505050565b636c907b7f60e01b612482333083611aba565b61249e5760405162461bcd60e51b8152600401610d459061534c565b816001600160a01b0381166124c55760405162461bcd60e51b8152600401610d45906153b0565b61162d836145ba565b60006001600160a01b0382166125385760405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f7420612076616044820152683634b21037bbb732b960b91b6064820152608401610d45565b506001600160a01b031660009081526003602052604090205490565b61255c614641565b6125646141ee565b61256c6146a0565b565b857f000000000000000000000000000000000000000000000000000000000000007881101580156125a957506013546001600160f81b031681105b6125c55760405162461bcd60e51b8152600401610d4590615610565b866376ee6fab60e01b6125d9333083611aba565b80612618575060006125e961291a565b6001600160a01b031614801561261857506000828152600d60205260409020600201546001600160a01b031633145b6126345760405162461bcd60e51b8152600401610d45906156a8565b876001600160a01b03811661265b5760405162461bcd60e51b8152600401610d45906153b0565b8888888888604051602001612674959493929190615643565b60408051601f19818403018152918152815160209283012060008d8152600e909352912054146126e35760405162461bcd60e51b815260206004820152601a602482015279135d5cdd081b585d18da08185c9d1a5cdd081c1c9bdc1bdcd85b60321b6044820152606401610d45565b6000600d60008c81526020019081526020016000209050898160020160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550888160000160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550878160020160146101000a81548160ff021916908360ff160217905550868160010160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550858160010160146101000a81548160ff021916908360ff1602179055506000801b600e60008d8152602001908152602001600020819055508a7fc582d05e1da854143bd3271ef4529d79cf5a69fc6057ae320f357acfd291b73860405160405180910390a25050505050505050505050565b6000828152600d60205260408120600f54829182918291829182919060649061283790600160a01b900460ff168a615700565b6128419190615591565b60028201549097508789039060649061286490600160a01b900460ff1683615700565b61286e9190615591565b600f546001600160a01b031697508082039650935080841461289b5760028201546001600160a01b031694505b83156128af5781546001600160a01b031692505b50509295509295509295565b6000828152600c60205260409020805460609190600160301b900462ffffff1683106128f75750506040805160208101909152600081526113d6565b6000838152600982016020526040902054611b5e906001600160a01b03166146b2565b600061292e6006546001600160a01b031690565b905090565b60608060608060606000600c600088815260200190815260200160002090508060010180546129619061537c565b80601f016020809104026020016040519081016040528092919081815260200182805461298d9061537c565b80156129da5780601f106129af576101008083540402835291602001916129da565b820191906000526020600020905b8154815290600101906020018083116129bd57829003601f168201915b505050505095508060020180546129f09061537c565b80601f0160208091040260200160405190810160405280929190818152602001828054612a1c9061537c565b8015612a695780601f10612a3e57610100808354040283529160200191612a69565b820191906000526020600020905b815481529060010190602001808311612a4c57829003601f168201915b50505050509450806003018054612a7f9061537c565b80601f0160208091040260200160405190810160405280929190818152602001828054612aab9061537c565b8015612af85780601f10612acd57610100808354040283529160200191612af8565b820191906000526020600020905b815481529060010190602001808311612adb57829003601f168201915b50505050509350806004018054612b0e9061537c565b80601f0160208091040260200160405190810160405280929190818152602001828054612b3a9061537c565b8015612b875780601f10612b5c57610100808354040283529160200191612b87565b820191906000526020600020905b815481529060010190602001808311612b6a57829003601f168201915b50505050509250806005018054612b9d9061537c565b80601f0160208091040260200160405190810160405280929190818152602001828054612bc99061537c565b8015612c165780601f10612beb57610100808354040283529160200191612c16565b820191906000526020600020905b815481529060010190602001808311612bf957829003601f168201915b505050505091505091939590929450565b6060600180546114739061537c565b639ab31a2d60e01b612c49333083611aba565b612c655760405162461bcd60e51b8152600401610d459061534c565b612710821115612ccd5760405162461bcd60e51b815260206004820152602d60248201527f4d6178206f66204152545f424c4f434b535f4d41585f5345434f4e444152595f60448201526c53414c45535f4250532042505360981b6064820152608401610d45565b601182905560405174617274626c6f636b735365636f6e6461727942505360581b90600080516020615a5b83398151915290600090a25050565b63282fb95960e21b612d1a333083611aba565b612d365760405162461bcd60e51b8152600401610d459061534c565b816001600160a01b038116612d5d5760405162461bcd60e51b8152600401610d45906153b0565b600780546001600160a01b0319166001600160a01b038516179055604051766375726174696f6e52656769737472794164647265737360481b90600080516020615a5b83398151915290600090a2505050565b6000818152600d602052604090206002015481906001600160a01b03163314612deb5760405162461bcd60e51b8152600401610d45906152c8565b6000828152600c6020526040808220805460ff60901b198116600160901b9182900460ff161590910217905551651c185d5cd95960d21b918491600080516020615a7b8339815191529190a35050565b612e4633838361473d565b5050565b612e5382614091565b612e6e57612e6933306351d9665360e11b611aba565b612e8c565b6000828152600d60205260409020600201546001600160a01b031633145b612eed5760405162461bcd60e51b815260206004820152602c60248201527f4f6e6c7920617274697374207768656e20756e6c6f636b65642c206f776e657260448201526b081dda195b881b1bd8dad95960a21b6064820152608401610d45565b6000828152600c60205260409020600301612f08828261547d565b506040516a3232b9b1b934b83a34b7b760a91b908390600080516020615a7b83398151915290600090a35050565b6000806000806000612f4786611a51565b6000908152600d602052604090206002810154600182015491546001600160a01b0391821699918316985060ff600160a01b9384900481169850929004909116945092505050565b60148054612f9c9061537c565b80601f0160208091040260200160405190810160405280929190818152602001828054612fc89061537c565b80156130155780601f10612fea57610100808354040283529160200191613015565b820191906000526020600020905b815481529060010190602001808311612ff857829003601f168201915b505050505081565b8161302781614091565b6130435760405162461bcd60e51b8152600401610d45906152ed565b6000838152600d60205260409020600201548390632b2b404960e21b906001600160a01b031633148061307c575061307c333083611aba565b6130985760405162461bcd60e51b8152600401610d4590615317565b8380516000036130ba5760405162461bcd60e51b8152600401610d45906153e5565b6000868152600c602052604090206130d186614807565b8154600160301b9081900462ffffff9081166000908152600985016020526040902080546001600160a01b0319166001600160a01b039490941693909317909255825461312392919004166001615717565b815462ffffff91909116600160301b0262ffffff60301b19909116178155604051651cd8dc9a5c1d60d21b908890600080516020615a7b83398151915290600090a350505050505050565b8261317881614091565b6131945760405162461bcd60e51b8152600401610d45906152ed565b6000848152600d6020526040902060020154849063b1656ba360e01b906001600160a01b03163314806131cd57506131cd333083611aba565b6131e95760405162461bcd60e51b8152600401610d4590615317565b83805160000361320b5760405162461bcd60e51b8152600401610d45906153e5565b6000878152600c602052604090208054600160301b900462ffffff16871061326d5760405162461bcd60e51b81526020600482015260156024820152747363726970744964206f7574206f662072616e676560581b6044820152606401610d45565b6000878152600982016020526040902054613290906001600160a01b031661488f565b61329986614807565b600088815260098301602052604080822080546001600160a01b0319166001600160a01b0394909416939093179092559051651cd8dc9a5c1d60d21b918a91600080516020615a7b8339815191529190a35050505050505050565b600a54600090821061333e5760405162461bcd60e51b8152602060048201526013602482015272496e646578206f7574206f6620626f756e647360681b6044820152606401610d45565b600a828154811061335157613351615536565b6000918252602090912001546001600160a01b031692915050565b8161337681614091565b6133925760405162461bcd60e51b8152600401610d45906152ed565b6000838152600d60205260409020600201548390635bd827d760e11b906001600160a01b03163314806133cb57506133cb333083611aba565b6133e75760405162461bcd60e51b8152600401610d4590615317565b8380516000036134095760405162461bcd60e51b8152600401610d45906153e5565b6000868152600c60205260409020600201613424868261547d565b50604051696172746973744e616d6560b01b908790600080516020615a7b83398151915290600090a3505050505050565b61345f3383614369565b61347b5760405162461bcd60e51b8152600401610d45906155c2565b61348784848484614946565b50505050565b6060808261349a81613eea565b6134b65760405162461bcd60e51b8152600401610d4590615297565b604080516003808252608082019092529060208201606080368337505060408051600380825260808201909252929550905060208201606080368337019050509150600061350385611a51565b6000818152600d6020526040812080546001820154939450909260ff600160a01b928390048116939290910416908261353d83606461573a565b6135479190615700565b905060006135558484615700565b601154909150600083156135cb5760028701548b516001600160a01b03909116908c908390811061358857613588615536565b6001600160a01b0390921660209283029190910190910152838a826135ac81615562565b9350815181106135be576135be615536565b6020026020010181815250505b82156136395760018701548b516001600160a01b03909116908c90839081106135f6576135f6615536565b6001600160a01b0390921660209283029190910190910152828a8261361a81615562565b93508151811061362c5761362c615536565b6020026020010181815250505b81156136a5576010548b516001600160a01b03909116908c908390811061366257613662615536565b6001600160a01b0390921660209283029190910190910152818a8261368681615562565b93508151811061369857613698615536565b6020026020010181815250505b80600311156136c05780600303808c51038c52808b51038b52505b505050505050505050915091565b6000828152600d602052604090206002015482906001600160a01b031633146137095760405162461bcd60e51b8152600401610d45906152c8565b605f8211156137795760405162461bcd60e51b815260206004820152603660248201527f4d6178206f66204152544953545f4d41585f5345434f4e444152595f524f594160448201527513151657d4115490d153951051d1481c195c98d95b9d60521b6064820152608401610d45565b6000838152600d6020526040808220805460ff60a01b1916600160a01b60ff8716021790555170726f79616c747950657263656e7461676560781b918591600080516020615a7b8339815191529190a3505050565b6060816137da81613eea565b6137f65760405162461bcd60e51b8152600401610d4590615297565b6000600c600061380586611a51565b815260200190815260200160002060060180546138219061537c565b80601f016020809104026020016040519081016040528092919081815260200182805461384d9061537c565b801561389a5780601f1061386f5761010080835404028352916020019161389a565b820191906000526020600020905b81548152906001019060200180831161387d57829003601f168201915b50505050509050806138ab85614979565b6040516020016138bc929190615769565b6040516020818303038152906040529250505b50919050565b63cc90e72560e01b6138e8333083611aba565b6139045760405162461bcd60e51b8152600401610d459061534c565b8280516000036139265760405162461bcd60e51b8152600401610d45906153e5565b826001600160a01b03811661394d5760405162461bcd60e51b8152600401610d45906153b0565b601354600160f81b900460ff16156139a05760405162461bcd60e51b81526020600482015260166024820152752732bb90383937b532b1ba39903337b93134b23232b760511b6044820152606401610d45565b6013546001600160f81b03166000818152600d6020908152604080832060020180546001600160a01b0319166001600160a01b038a16179055600c90915290206001016139ed878261547d565b506000818152600c60205260409020805465ffffff00000060ff60901b011916613d09601e1b600160901b01178155600601613a2a601482615798565b50613a36816001615864565b601380546001600160f81b0319166001600160f81b03929092169190911790556040516618dc99585d195960ca1b908290600080516020615a7b83398151915290600090a3505050505050565b63340f0e4360e21b613a96333083611aba565b613ab25760405162461bcd60e51b8152600401610d459061534c565b817f00000000000000000000000000000000000000000000000000000000000000788110158015613aed57506013546001600160f81b031681105b613b095760405162461bcd60e51b8152600401610d4590615610565b6000838152600c6020526040808220805460ff60881b198116600160881b9182900460ff1615909102179055516561637469766560d01b918591600080516020615a7b8339815191529190a3505050565b80613b6481614091565b613b805760405162461bcd60e51b8152600401610d45906152ed565b6000828152600d6020526040902060020154829063db2ff86160e01b906001600160a01b0316331480613bb95750613bb9333083611aba565b613bd55760405162461bcd60e51b8152600401610d4590615317565b6000848152600c602052604090208054600160301b900462ffffff16613c3d5760405162461bcd60e51b815260206004820152601e60248201527f746865726520617265206e6f207363726970747320746f2072656d6f766500006044820152606401610d45565b8054613c87906009830190600090613c6390600190600160301b900462ffffff16615884565b62ffffff1681526020810191909152604001600020546001600160a01b031661488f565b80546009820190600090613ca990600190600160301b900462ffffff16615884565b62ffffff908116825260208201929092526040908101600090812080546001600160a01b0319169055835462ffffff60301b198116600160301b918290048516600019019094160292909217835551651cd8dc9a5c1d60d21b918791600080516020615a7b8339815191529190a35050505050565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b6000818152600c60205260408120600781015460609283929091613d6f90614a79565b9350806008018054613d809061537c565b80601f0160208091040260200160405190810160405280929190818152602001828054613dac9061537c565b8015613df95780601f10613dce57610100808354040283529160200191613df9565b820191906000526020600020905b815481529060010190602001808311613ddc57829003601f168201915b5050935496989297505050600160301b90940462ffffff169392505050565b613e20614641565b6001600160a01b038116613e855760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610d45565b61146181614ae4565b600061292e61291a565b600680546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6000908152600260205260409020546001600160a01b0316151590565b6000818152600c6020526040808220805467ffffffffffffffff60481b1916600160481b426001600160401b031602179055516818dbdb5c1b195d195960ba1b918391600080516020615a7b8339815191529190a350565b6001600160a01b038216613fb55760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610d45565b613fbe81613eea565b1561400a5760405162461bcd60e51b815260206004820152601c60248201527b115490cdcc8c4e881d1bdad95b88185b1c9958591e481b5a5b9d195960221b6044820152606401610d45565b6001600160a01b03821660009081526003602052604081208054600192906140339084906158a0565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b6000817f000000000000000000000000000000000000000000000000000000000000007881101580156140ce57506013546001600160f81b031681105b6140ea5760405162461bcd60e51b8152600401610d4590615610565b6000838152600c6020526040902054600160481b90046001600160401b03168015808061412257506224ea00614120834261573a565b105b95945050505050565b600080805b60208160ff16101561418a576000868260ff166020811061415357614153615536565b1a90508015801590614168575060808160ff16105b15614181578560ff168160ff1603614181578260010192505b50600101614130565b8360ff168260ff1614925050509392505050565b60006001600160e01b031982166380ac58cd60e01b14806141cf57506001600160e01b03198216635b5e139f60e01b145b806113d657506301ffc9a760e01b6001600160e01b03198316146113d6565b601354600160f81b900460ff1661256c57601380546001600160f81b0316600160f81b179055604051733732bba83937b532b1ba39a337b93134b23232b760611b90600080516020615a5b83398151915290600090a2565b61424f81613eea565b6114615760405162461bcd60e51b8152600401610d4590615676565b600081815260046020526040902080546001600160a01b0319166001600160a01b03841690811790915581906142a0826122f3565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b600f80546001600160a01b0319166001600160a01b0383161790556040517b617274626c6f636b735072696d61727953616c65734164647265737360201b90600080516020615a5b83398151915290600090a250565b601461433b828261547d565b506040516d64656661756c744261736555524960901b90600080516020615a5b83398151915290600090a250565b600080614375836122f3565b9050806001600160a01b0316846001600160a01b0316148061439c575061439c8185613d1e565b80611b5e5750836001600160a01b03166143b5846114f6565b6001600160a01b031614949350505050565b826001600160a01b03166143da826122f3565b6001600160a01b03161461443e5760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b6064820152608401610d45565b6001600160a01b0382166144a05760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610d45565b6144ab60008261426b565b6001600160a01b03831660009081526003602052604081208054600192906144d490849061573a565b90915550506001600160a01b03821660009081526003602052604081208054600192906145029084906158a0565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b601080546001600160a01b0319166001600160a01b0383161790556040517f617274626c6f636b735365636f6e6461727953616c657341646472657373000090600080516020615a5b83398151915290600090a250565b600980546001600160a01b0383166001600160a01b03199182168117909255600a805460018101825560009182527fc65a7bb8d6351c1cf70c95a316cc6a92839c986682d98bc35f958f4883f9d2a801805490921690921790556040517072616e646f6d697a65724164647265737360781b91600080516020615a5b83398151915291a250565b3361464a61291a565b6001600160a01b03161461256c5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610d45565b6146a8614641565b61256c6000614ae4565b6060813b60688110806146c3575080155b156147105760405162461bcd60e51b815260206004820152601d60248201527f436f6e7472616374417353746f726167653a2052656164204572726f720000006044820152606401610d45565b604080516028198301601f19168101909152606719820180825290925080606860208501863c5050919050565b816001600160a01b0316836001600160a01b03160361479a5760405162461bcd60e51b815260206004820152601960248201527822a9219b99189d1030b8383937bb32903a379031b0b63632b960391b6044820152606401610d45565b6001600160a01b03838116600081815260056020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b600080308360405160200161481d9291906158b3565b60405160208183030381529060405290508051602082016000f091506001600160a01b0382166138cf5760405162461bcd60e51b815260206004820152601e60248201527f436f6e7472616374417353746f726167653a205772697465204572726f7200006044820152606401610d45565b6000816001600160a01b03166040516148b3906001600160f81b0319815260010190565b6000604051808303816000865af19150503d80600081146148f0576040519150601f19603f3d011682016040523d82523d6000602084013e6148f5565b606091505b5050905080612e465760405162461bcd60e51b815260206004820152601f60248201527f436f6e7472616374417353746f726167653a2044656c657465204572726f72006044820152606401610d45565b6149518484846143c7565b61495d84848484614b0f565b6134875760405162461bcd60e51b8152600401610d459061597b565b6060816000036149a05750506040805180820190915260018152600360fc1b602082015290565b8160005b81156149ca57806149b481615562565b91506149c39050600a83615591565b91506149a4565b6000816001600160401b038111156149e4576149e4614dc0565b6040519080825280601f01601f191660200182016040528015614a0e576020820181803683370190505b5090505b8415611b5e57614a2360018361573a565b9150614a30600a866159cd565b614a3b9060306158a0565b60f81b818381518110614a5057614a50615536565b60200101906001600160f81b031916908160001a905350614a72600a86615591565b9450614a12565b606060005b828160ff1660208110614a9357614a93615536565b1a60f81b6001600160f81b03191615801590614ab2575060208160ff16105b15614ac95780614ac1816159e1565b915050614a7e565b60405191506040820160405280825282602083015250919050565b614aed81613e98565b600b80546001600160a01b0319166001600160a01b0392909216919091179055565b60006001600160a01b0384163b15614c0557604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290614b53903390899088908890600401615a00565b6020604051808303816000875af1925050508015614b8e575060408051601f3d908101601f19168201909252614b8b91810190615a3d565b60015b614beb573d808015614bbc576040519150601f19603f3d011682016040523d82523d6000602084013e614bc1565b606091505b508051600003614be35760405162461bcd60e51b8152600401610d459061597b565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050611b5e565b506001949350505050565b60008060408385031215614c2357600080fd5b50508035926020909101359150565b6001600160a01b038116811461146157600080fd5b600080600060608486031215614c5c57600080fd5b8335614c6781614c32565b9250602084013591506040840135614c7e81614c32565b809150509250925092565b60008060408385031215614c9c57600080fd5b82359150602083013562ffffff81168114614cb657600080fd5b809150509250929050565b6001600160e01b03198116811461146157600080fd5b600060208284031215614ce957600080fd5b8135614cf481614cc1565b9392505050565b60005b83811015614d16578181015183820152602001614cfe565b50506000910152565b60008151808452614d37816020860160208601614cfb565b601f01601f19169290920160200192915050565b602081526000614cf46020830184614d1f565b600060208284031215614d7057600080fd5b5035919050565b60008060408385031215614d8a57600080fd5b8235614d9581614c32565b946020939093013593505050565b600060208284031215614db557600080fd5b8135614cf481614c32565b634e487b7160e01b600052604160045260246000fd5b60006001600160401b0380841115614df057614df0614dc0565b604051601f8501601f19908116603f01168101908282118183101715614e1857614e18614dc0565b81604052809350858152868686011115614e3157600080fd5b858560208301376000602087830101525050509392505050565b600082601f830112614e5c57600080fd5b614cf483833560208501614dd6565b60008060408385031215614e7e57600080fd5b8235915060208301356001600160401b03811115614e9b57600080fd5b614ea785828601614e4b565b9150509250929050565b600060208284031215614ec357600080fd5b81356001600160401b03811115614ed957600080fd5b611b5e84828501614e4b565b600080600060608486031215614efa57600080fd5b8335614f0581614c32565b92506020840135614f1581614c32565b91506040840135614c7e81614cc1565b600080600060608486031215614f3a57600080fd5b8335614f4581614c32565b92506020840135614f5581614c32565b929592945050506040919091013590565b60008060008060008060c08789031215614f7f57600080fd5b863595506020870135614f9181614c32565b94506040870135614fa181614c32565b9350606087013592506080870135614fb881614c32565b8092505060a087013590509295509295509295565b60008060408385031215614fe057600080fd5b823591506020830135614cb681614c32565b60a08152600061500560a0830188614d1f565b82810360208401526150178188614d1f565b9050828103604084015261502b8187614d1f565b9050828103606084015261503f8186614d1f565b905082810360808401526150538185614d1f565b98975050505050505050565b801515811461146157600080fd5b6000806040838503121561508057600080fd5b823561508b81614c32565b91506020830135614cb68161505f565b6000806000606084860312156150b057600080fd5b833592506020840135915060408401356001600160401b038111156150d457600080fd5b6150e086828701614e4b565b9150509250925092565b6000806000806080858703121561510057600080fd5b843561510b81614c32565b9350602085013561511b81614c32565b92506040850135915060608501356001600160401b0381111561513d57600080fd5b8501601f8101871361514e57600080fd5b61515d87823560208401614dd6565b91505092959194509250565b604080825283519082018190526000906020906060840190828701845b828110156151ab5781516001600160a01b031684529284019290840190600101615186565b5050508381038285015284518082528583019183019060005b818110156151e0578351835292840192918401916001016151c4565b5090979650505050505050565b6000806040838503121561520057600080fd5b82356001600160401b0381111561521657600080fd5b61522285828601614e4b565b9250506020830135614cb681614c32565b6000806040838503121561524657600080fd5b823561525181614c32565b91506020830135614cb681614c32565b6060815260006152746060830186614d1f565b82810360208401526152868186614d1f565b915050826040830152949350505050565b602080825260179082015276151bdad95b88125108191bd95cc81b9bdd08195e1a5cdd604a1b604082015260600190565b6020808252600b908201526a13db9b1e48185c9d1a5cdd60aa1b604082015260600190565b60208082526010908201526f13db9b1e481a59881d5b9b1bd8dad95960821b604082015260600190565b6020808252818101527f4f6e6c7920617274697374206f722041646d696e2041434c20616c6c6f776564604082015260600190565b60208082526016908201527513db9b1e4810591b5a5b881050d308185b1b1bddd95960521b604082015260600190565b600181811c9082168061539057607f821691505b6020821081036138cf57634e487b7160e01b600052602260045260246000fd5b6020808252601b908201527a4d75737420696e707574206e6f6e2d7a65726f206164647265737360281b604082015260600190565b6020808252601b908201527a4d75737420696e707574206e6f6e2d656d70747920737472696e6760281b604082015260600190565b601f82111561162d57600081815260208120601f850160051c810160208610156154415750805b601f850160051c820191505b818110156154605782815560010161544d565b505050505050565b600019600383901b1c191660019190911b1790565b81516001600160401b0381111561549657615496614dc0565b6154aa816154a4845461537c565b8461541a565b602080601f8311600181146154d957600084156154c75750858301515b6154d18582615468565b865550615460565b600085815260208120601f198616915b82811015615508578886015182559484019460019091019084016154e9565b50858210156155265787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600182016155745761557461554c565b5060010190565b634e487b7160e01b600052601260045260246000fd5b6000826155a0576155a061557b565b500490565b6000602082840312156155b757600080fd5b8151614cf48161505f565b6020808252602e908201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560408201526d1c881b9bdc88185c1c1c9bdd995960921b606082015260800190565b602080825260199082015278141c9bda9958dd08125108191bd95cc81b9bdd08195e1a5cdd603a1b604082015260600190565b6001600160a01b039586168152938516602085015260408401929092529092166060820152608081019190915260a00190565b602080825260189082015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b604082015260600190565b60208082526038908201527f4f6e6c792041646d696e2041434c20616c6c6f7765642c206f722061727469736040820152771d081a59881bdddb995c881a185cc81c995b9bdd5b98d95960421b606082015260800190565b80820281158282048414176113d6576113d661554c565b62ffffff8181168382160190808211156157335761573361554c565b5092915050565b818103818111156113d6576113d661554c565b6000815161575f818560208601614cfb565b9290920192915050565b6000835161577b818460208801614cfb565b83519083019061578f818360208801614cfb565b01949350505050565b8181036157a3575050565b6157ad825461537c565b6001600160401b038111156157c4576157c4614dc0565b6157d2816154a4845461537c565b6000601f82116001811461580057600083156157ee5750848201545b6157f88482615468565b855550611292565b600085815260209020601f19841690600086815260209020845b8381101561583a578286015482556001958601959091019060200161581a565b50858310156155265793015460001960f8600387901b161c19169092555050600190811b01905550565b6001600160f81b038181168382160190808211156157335761573361554c565b62ffffff8281168282160390808211156157335761573361554c565b808201808211156113d6576113d661554c565b6a600b5981380380925939f360a81b81526b1808181218000e5800144cc560a21b600b8201526330082bff60e11b60178201526416d8004d8560da1b601b82015263300cabff60e11b6020820152635b60003560e01b6024820152617fff60f01b6028820152600060488201819052600560fa1b6049830152633021abff60e11b604a830152645b600051ff60d81b604e8301526159586053830160008152600c0190565b61596e818660601b6001600160601b0319169052565b614122601482018561574d565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b6000826159dc576159dc61557b565b500690565b600060ff821660ff81036159f7576159f761554c565b60010192915050565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090615a3390830184614d1f565b9695505050505050565b600060208284031215615a4f57600080fd5b8151614cf481614cc156fe8b810f233ce7ee6e962ab4d98bf0277751de1f5589de3dcc812ac2047994d009b96a30340e86d03ce4be42f94ac02d7b27b4a4cdae942beb69026718dfe66afca26469706673582212201445a140cab5e6d18a3ace8afa5217127d48446e0018ef60de21b5e19309851164736f6c63430008110033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000001000000000000000000000000003f4ae5e1e84e5b6bfd5dc429a4d1e6177cc000ff00000000000000000000000094cc7981227d9e644e153766c386ef47556c31470000000000000000000000000000000000000000000000000000000000000078000000000000000000000000000000000000000000000000000000000000002341727420426c6f636b7320563320436f72652053746167696e672028476f65726c69290000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001d424c4f434b535f56335f434f52455f53544147494e475f474f45524c49000000
-----Decoded View---------------
Arg [0] : _tokenName (string): Art Blocks V3 Core Staging (Goerli)
Arg [1] : _tokenSymbol (string): BLOCKS_V3_CORE_STAGING_GOERLI
Arg [2] : _randomizerContract (address): 0x3f4aE5e1E84E5B6bfD5DC429A4d1e6177CC000fF
Arg [3] : _adminACLContract (address): 0x94Cc7981227D9e644e153766C386eF47556C3147
Arg [4] : _startingProjectId (uint248): 120
-----Encoded View---------------
10 Constructor Arguments found :
Arg [0] : 00000000000000000000000000000000000000000000000000000000000000a0
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000100
Arg [2] : 0000000000000000000000003f4ae5e1e84e5b6bfd5dc429a4d1e6177cc000ff
Arg [3] : 00000000000000000000000094cc7981227d9e644e153766c386ef47556c3147
Arg [4] : 0000000000000000000000000000000000000000000000000000000000000078
Arg [5] : 0000000000000000000000000000000000000000000000000000000000000023
Arg [6] : 41727420426c6f636b7320563320436f72652053746167696e672028476f6572
Arg [7] : 6c69290000000000000000000000000000000000000000000000000000000000
Arg [8] : 000000000000000000000000000000000000000000000000000000000000001d
Arg [9] : 424c4f434b535f56335f434f52455f53544147494e475f474f45524c49000000
Loading...
Loading
[ Download: CSV Export ]
[ 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.