Overview
ETH Balance
0 ETH
ETH Value
$0.00More Info
Private Name Tags
ContractCreator
Multichain Info
No addresses found
Loading...
Loading
This contract may be a proxy contract. Click on More Options and select Is this a proxy? to confirm and enable the "Read as Proxy" & "Write as Proxy" tabs.
Contract Name:
ZoraCreator1155FactoryImpl
Compiler Version
v0.8.17+commit.8df45f5f
Optimization Enabled:
Yes with 50 runs
Other Settings:
london EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity 0.8.17; import {Initializable} from "@zoralabs/openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol"; import {UUPSUpgradeable} from "@zoralabs/openzeppelin-contracts-upgradeable/contracts/proxy/utils/UUPSUpgradeable.sol"; import {IZoraCreator1155Factory} from "../interfaces/IZoraCreator1155Factory.sol"; import {IZoraCreator1155Initializer} from "../interfaces/IZoraCreator1155Initializer.sol"; import {IZoraCreator1155} from "../interfaces/IZoraCreator1155.sol"; import {ICreatorRoyaltiesControl} from "../interfaces/ICreatorRoyaltiesControl.sol"; import {IMinter1155} from "../interfaces/IMinter1155.sol"; import {IContractMetadata} from "../interfaces/IContractMetadata.sol"; import {Ownable2StepUpgradeable} from "../utils/ownable/Ownable2StepUpgradeable.sol"; import {Zora1155} from "../proxies/Zora1155.sol"; import {Create2Upgradeable} from "@zoralabs/openzeppelin-contracts-upgradeable/contracts/utils/Create2Upgradeable.sol"; import {CREATE3} from "solmate/src/utils/CREATE3.sol"; import {ContractVersionBase} from "../version/ContractVersionBase.sol"; /// @title ZoraCreator1155FactoryImpl /// @notice Factory contract for creating new ZoraCreator1155 contracts contract ZoraCreator1155FactoryImpl is IZoraCreator1155Factory, Ownable2StepUpgradeable, ContractVersionBase, UUPSUpgradeable, IContractMetadata { IZoraCreator1155 public immutable zora1155Impl; IMinter1155 public immutable merkleMinter; IMinter1155 public immutable fixedPriceMinter; IMinter1155 public immutable redeemMinterFactory; constructor(IZoraCreator1155 _zora1155Impl, IMinter1155 _merkleMinter, IMinter1155 _fixedPriceMinter, IMinter1155 _redeemMinterFactory) initializer { if (address(_zora1155Impl) == address(0)) { revert Constructor_ImplCannotBeZero(); } zora1155Impl = _zora1155Impl; merkleMinter = _merkleMinter; fixedPriceMinter = _fixedPriceMinter; redeemMinterFactory = _redeemMinterFactory; } /// @notice ContractURI for contract information with the strategy function contractURI() external pure returns (string memory) { return "https://github.com/ourzora/zora-1155-contracts/"; } /// @notice The name of the sale strategy function contractName() external pure returns (string memory) { return "ZORA 1155 Contract Factory"; } /// @notice The default minters for new 1155 contracts function defaultMinters() external view returns (IMinter1155[] memory minters) { minters = new IMinter1155[](3); minters[0] = fixedPriceMinter; minters[1] = merkleMinter; minters[2] = redeemMinterFactory; } function initialize(address _initialOwner) public initializer { __Ownable_init(_initialOwner); __UUPSUpgradeable_init(); emit FactorySetup(); } /// @notice Creates a new ZoraCreator1155 contract /// @param newContractURI The URI for the contract metadata /// @param name The name of the contract /// @param defaultRoyaltyConfiguration The default royalty configuration for the contract /// @param defaultAdmin The default admin for the contract /// @param setupActions The actions to perform on the new contract upon initialization function createContract( string calldata newContractURI, string calldata name, ICreatorRoyaltiesControl.RoyaltyConfiguration memory defaultRoyaltyConfiguration, address payable defaultAdmin, bytes[] calldata setupActions ) external returns (address) { Zora1155 newContract = new Zora1155(address(zora1155Impl)); _initializeContract(Zora1155(newContract), newContractURI, name, defaultRoyaltyConfiguration, defaultAdmin, setupActions); return address(newContract); } function createContractDeterministic( string calldata newContractURI, string calldata name, ICreatorRoyaltiesControl.RoyaltyConfiguration calldata defaultRoyaltyConfiguration, address payable defaultAdmin, bytes[] calldata setupActions ) external override returns (address) { bytes32 digest = _hashContract(msg.sender, newContractURI, name, defaultAdmin, _setupActionsSalt(setupActions)); address createdContract = CREATE3.deploy(digest, abi.encodePacked(type(Zora1155).creationCode, abi.encode(zora1155Impl)), 0); Zora1155 newContract = Zora1155(payable(createdContract)); _initializeContract(newContract, newContractURI, name, defaultRoyaltyConfiguration, defaultAdmin, setupActions); return address(newContract); } function deterministicContractAddress( address msgSender, string calldata newContractURI, string calldata name, address contractAdmin ) external view override returns (address) { return deterministicContractAddressWithSetupActions(msgSender, newContractURI, name, contractAdmin, new bytes[](0)); } function _setupActionsSalt(bytes[] memory setupActions) private pure returns (bytes32) { return setupActions.length == 0 ? bytes32(0) : keccak256(abi.encode(setupActions)); } function deterministicContractAddressWithSetupActions( address msgSender, string calldata newContractURI, string calldata name, address contractAdmin, bytes[] memory setupActions ) public view override returns (address) { bytes32 digest = _hashContract(msgSender, newContractURI, name, contractAdmin, _setupActionsSalt(setupActions)); return CREATE3.getDeployed(digest); } function _initializeContract( Zora1155 newContract, string calldata newContractURI, string calldata name, ICreatorRoyaltiesControl.RoyaltyConfiguration memory defaultRoyaltyConfiguration, address payable defaultAdmin, bytes[] calldata setupActions ) private { emit SetupNewContract({ newContract: address(newContract), creator: msg.sender, defaultAdmin: defaultAdmin, contractURI: newContractURI, name: name, defaultRoyaltyConfiguration: defaultRoyaltyConfiguration }); IZoraCreator1155Initializer(address(newContract)).initialize(name, newContractURI, defaultRoyaltyConfiguration, defaultAdmin, setupActions); } function _hashContract( address msgSender, string calldata newContractURI, string calldata name, address contractAdmin, bytes32 salt ) private pure returns (bytes32) { // salt is a newer feature; prior to adding a salt, it wasn't part of the hash. // so this special case is needed to maintain backwards compatibility if (salt == bytes32(0)) { return keccak256(abi.encode(msgSender, contractAdmin, _stringHash(newContractURI), _stringHash(name))); } return keccak256(abi.encode(msgSender, contractAdmin, _stringHash(newContractURI), _stringHash(name), salt)); } function _stringHash(string calldata value) private pure returns (bytes32) { return keccak256(bytes(value)); } /// /// /// MANAGER UPGRADE /// /// /// /// @notice Ensures the caller is authorized to upgrade the contract /// @dev This function is called in `upgradeTo` & `upgradeToAndCall` /// @param _newImpl The new implementation address function _authorizeUpgrade(address _newImpl) internal override onlyOwner { if (!_equals(IContractMetadata(_newImpl).contractName(), this.contractName())) { revert UpgradeToMismatchedContractName(this.contractName(), IContractMetadata(_newImpl).contractName()); } } /// @notice Returns the current implementation address function implementation() external view returns (address) { return _getImplementation(); } function _equals(string memory a, string memory b) internal pure returns (bool) { return (keccak256(bytes(a)) == keccak256(bytes(b))); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (proxy/utils/Initializable.sol) pragma solidity ^0.8.2; import "../../utils/AddressUpgradeable.sol"; error INITIALIZABLE_CONTRACT_ALREADY_INITIALIZED(); error INITIALIZABLE_CONTRACT_IS_NOT_INITIALIZING(); error INITIALIZABLE_CONTRACT_IS_INITIALIZING(); /** * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect. * * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be * reused. This mechanism prevents re-execution of each "step" but allows the creation of new initialization steps in * case an upgrade adds a module that needs to be initialized. * * For example: * * [.hljs-theme-light.nopadding] * ```solidity * contract MyToken is ERC20Upgradeable { * function initialize() initializer public { * __ERC20_init("MyToken", "MTK"); * } * } * * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable { * function initializeV2() reinitializer(2) public { * __ERC20Permit_init("MyToken"); * } * } * ``` * * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}. * * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity. * * [CAUTION] * ==== * Avoid leaving a contract uninitialized. * * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed: * * [.hljs-theme-light.nopadding] * ``` * /// @custom:oz-upgrades-unsafe-allow constructor * constructor() { * _disableInitializers(); * } * ``` * ==== */ abstract contract Initializable { /** * @dev Indicates that the contract has been initialized. * @custom:oz-retyped-from bool */ uint8 private _initialized; /** * @dev Indicates that the contract is in the process of being initialized. */ bool private _initializing; /** * @dev Triggered when the contract has been initialized or reinitialized. */ event Initialized(uint8 version); /** * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope, * `onlyInitializing` functions can be used to initialize parent contracts. * * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a * constructor. * * Emits an {Initialized} event. */ modifier initializer() { bool isTopLevelCall = !_initializing; if ((!isTopLevelCall || _initialized != 0) && (AddressUpgradeable.isContract(address(this)) || _initialized != 1)) { revert INITIALIZABLE_CONTRACT_ALREADY_INITIALIZED(); } _initialized = 1; if (isTopLevelCall) { _initializing = true; } _; if (isTopLevelCall) { _initializing = false; emit Initialized(1); } } /** * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be * used to initialize parent contracts. * * A reinitializer may be used after the original initialization step. This is essential to configure modules that * are added through upgrades and that require initialization. * * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer` * cannot be nested. If one is invoked in the context of another, execution will revert. * * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in * a contract, executing them in the right order is up to the developer or operator. * * WARNING: setting the version to 255 will prevent any future reinitialization. * * Emits an {Initialized} event. */ modifier reinitializer(uint8 version) { if (_initializing || _initialized >= version) { revert INITIALIZABLE_CONTRACT_ALREADY_INITIALIZED(); } _initialized = version; _initializing = true; _; _initializing = false; emit Initialized(version); } /** * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the * {initializer} and {reinitializer} modifiers, directly or indirectly. */ modifier onlyInitializing() { if (!_initializing) { revert INITIALIZABLE_CONTRACT_IS_NOT_INITIALIZING(); } _; } /** * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call. * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized * to any version. It is recommended to use this to lock implementation contracts that are designed to be called * through proxies. * * Emits an {Initialized} event the first time it is successfully executed. */ function _disableInitializers() internal virtual { if (_initializing) { revert INITIALIZABLE_CONTRACT_IS_INITIALIZING(); } if (_initialized != type(uint8).max) { _initialized = type(uint8).max; emit Initialized(type(uint8).max); } } /** * @dev Returns the highest version that has been initialized. See {reinitializer}. */ function _getInitializedVersion() internal view returns (uint8) { return _initialized; } /** * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}. */ function _isInitializing() internal view returns (bool) { return _initializing; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (proxy/utils/UUPSUpgradeable.sol) pragma solidity ^0.8.0; import "../../interfaces/draft-IERC1822Upgradeable.sol"; import "../ERC1967/ERC1967UpgradeUpgradeable.sol"; import "./Initializable.sol"; error FUNCTION_MUST_BE_CALLED_THROUGH_DELEGATECALL(); error FUNCTION_MUST_BE_CALLED_THROUGH_ACTIVE_PROXY(); error UUPS_UPGRADEABLE_MUST_NOT_BE_CALLED_THROUGH_DELEGATECALL(); /** * @dev An upgradeability mechanism designed for UUPS proxies. The functions included here can perform an upgrade of an * {ERC1967Proxy}, when this contract is set as the implementation behind such a proxy. * * A security mechanism ensures that an upgrade does not turn off upgradeability accidentally, although this risk is * reinstated if the upgrade retains upgradeability but removes the security mechanism, e.g. by replacing * `UUPSUpgradeable` with a custom implementation of upgrades. * * The {_authorizeUpgrade} function must be overridden to include access restriction to the upgrade mechanism. * * _Available since v4.1._ */ abstract contract UUPSUpgradeable is Initializable, IERC1822ProxiableUpgradeable, ERC1967UpgradeUpgradeable { function __UUPSUpgradeable_init() internal onlyInitializing { } function __UUPSUpgradeable_init_unchained() internal onlyInitializing { } /// @custom:oz-upgrades-unsafe-allow state-variable-immutable state-variable-assignment address private immutable __self = address(this); /** * @dev Check that the execution is being performed through a delegatecall call and that the execution context is * a proxy contract with an implementation (as defined in ERC1967) pointing to self. This should only be the case * for UUPS and transparent proxies that are using the current contract as their implementation. Execution of a * function through ERC1167 minimal proxies (clones) would not normally pass this test, but is not guaranteed to * fail. */ modifier onlyProxy() { if (address(this) == __self) { revert FUNCTION_MUST_BE_CALLED_THROUGH_DELEGATECALL(); } if (_getImplementation() != __self) { revert FUNCTION_MUST_BE_CALLED_THROUGH_ACTIVE_PROXY(); } _; } /** * @dev Check that the execution is not being performed through a delegate call. This allows a function to be * callable on the implementing contract but not through proxies. */ modifier notDelegated() { if (address(this) != __self) { revert UUPS_UPGRADEABLE_MUST_NOT_BE_CALLED_THROUGH_DELEGATECALL(); } _; } /** * @dev Implementation of the ERC1822 {proxiableUUID} function. This returns the storage slot used by the * implementation. It is used to validate the implementation's compatibility when performing an upgrade. * * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this * function revert if invoked through a proxy. This is guaranteed by the `notDelegated` modifier. */ function proxiableUUID() external view virtual override notDelegated returns (bytes32) { return _IMPLEMENTATION_SLOT; } /** * @dev Upgrade the implementation of the proxy to `newImplementation`. * * Calls {_authorizeUpgrade}. * * Emits an {Upgraded} event. * * @custom:oz-upgrades-unsafe-allow-reachable delegatecall */ function upgradeTo(address newImplementation) public virtual onlyProxy { _authorizeUpgrade(newImplementation); _upgradeToAndCallUUPS(newImplementation, new bytes(0), false); } /** * @dev Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call * encoded in `data`. * * Calls {_authorizeUpgrade}. * * Emits an {Upgraded} event. * * @custom:oz-upgrades-unsafe-allow-reachable delegatecall */ function upgradeToAndCall(address newImplementation, bytes memory data) public payable virtual onlyProxy { _authorizeUpgrade(newImplementation); _upgradeToAndCallUUPS(newImplementation, data, true); } /** * @dev Function that should revert when `msg.sender` is not authorized to upgrade the contract. Called by * {upgradeTo} and {upgradeToAndCall}. * * Normally, this function will use an xref:access.adoc[access control] modifier such as {Ownable-onlyOwner}. * * ```solidity * function _authorizeUpgrade(address) internal override onlyOwner {} * ``` */ function _authorizeUpgrade(address newImplementation) internal virtual; /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[50] private __gap; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.17; import {ICreatorRoyaltiesControl} from "./ICreatorRoyaltiesControl.sol"; import {IMinter1155} from "./IMinter1155.sol"; import {IVersionedContract} from "@zoralabs/shared-contracts/interfaces/IVersionedContract.sol"; /// @notice Factory for 1155 contracts /// @author @iainnash / @tbtstl interface IZoraCreator1155Factory is IVersionedContract { error Constructor_ImplCannotBeZero(); error UpgradeToMismatchedContractName(string expected, string actual); event FactorySetup(); event SetupNewContract( address indexed newContract, address indexed creator, address indexed defaultAdmin, string contractURI, string name, ICreatorRoyaltiesControl.RoyaltyConfiguration defaultRoyaltyConfiguration ); function createContract( string memory contractURI, string calldata name, ICreatorRoyaltiesControl.RoyaltyConfiguration memory defaultRoyaltyConfiguration, address payable defaultAdmin, bytes[] calldata setupActions ) external returns (address); /// @notice creates the contract, using a deterministic address based on the name, contract uri, and defaultAdmin function createContractDeterministic( string calldata contractURI, string calldata name, ICreatorRoyaltiesControl.RoyaltyConfiguration calldata defaultRoyaltyConfiguration, address payable defaultAdmin, bytes[] calldata setupActions ) external returns (address); function deterministicContractAddress( address msgSender, string calldata newContractURI, string calldata name, address contractAdmin ) external view returns (address); function deterministicContractAddressWithSetupActions( address msgSender, string calldata newContractURI, string calldata name, address contractAdmin, bytes[] memory setupActions ) external view returns (address); function defaultMinters() external returns (IMinter1155[] memory minters); function initialize(address _owner) external; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.17; import {ICreatorRoyaltiesControl} from "../interfaces/ICreatorRoyaltiesControl.sol"; interface IZoraCreator1155Initializer { function initialize( string memory contractName, string memory newContractURI, ICreatorRoyaltiesControl.RoyaltyConfiguration memory defaultRoyaltyConfiguration, address payable defaultAdmin, bytes[] calldata setupActions ) external; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.17; import {IERC165Upgradeable} from "@zoralabs/openzeppelin-contracts-upgradeable/contracts/interfaces/IERC165Upgradeable.sol"; import {IERC1155MetadataURIUpgradeable} from "@zoralabs/openzeppelin-contracts-upgradeable/contracts/interfaces/IERC1155MetadataURIUpgradeable.sol"; import {IZoraCreator1155TypesV1} from "../nft/IZoraCreator1155TypesV1.sol"; import {IZoraCreator1155Errors} from "./IZoraCreator1155Errors.sol"; import {IRenderer1155} from "../interfaces/IRenderer1155.sol"; import {IMinter1155} from "../interfaces/IMinter1155.sol"; import {IOwnable} from "../interfaces/IOwnable.sol"; import {IVersionedContract} from "@zoralabs/shared-contracts/interfaces/IVersionedContract.sol"; import {ICreatorRoyaltiesControl} from "../interfaces/ICreatorRoyaltiesControl.sol"; import {IZoraCreator1155DelegatedCreation} from "./IZoraCreator1155DelegatedCreation.sol"; import {IMintWithRewardsRecipients} from "./IMintWithRewardsRecipients.sol"; import {IMintWithMints} from "@zoralabs/mints-contracts/src/IMintWithMints.sol"; /* ░░░░░░░░░░░░░░ ░░▒▒░░░░░░░░░░░░░░░░░░░░ ░░▒▒▒▒░░░░░░░░░░░░░░░░░░░░░░ ░░▒▒▒▒░░░░░░░░░░░░░░ ░░░░░░░░ ░▓▓▒▒▒▒░░░░░░░░░░░░ ░░░░░░░ ░▓▓▓▒▒▒▒░░░░░░░░░░░░ ░░░░░░░░ ░▓▓▓▒▒▒▒░░░░░░░░░░░░░░ ░░░░░░░░░░ ░▓▓▓▒▒▒▒▒▒░░░░░░░░░░░░░░░░░░░░░░░░░░░ ░▓▓▓▓▓▒▒▒▒░░░░░░░░░░░░░░░░░░░░░░░░░░ ░▓▓▓▓▒▒▒▒▒▒░░░░░░░░░░░░░░░░░░░░░░░ ░░▓▓▓▓▒▒▒▒▒▒░░░░░░░░░░░░░░░░░░░░ ░░▓▓▓▓▓▓▒▒▒▒▒▒▒▒░░░░░░░░░▒▒▒▒▒░░ ░░▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒░░ ░░▓▓▓▓▓▓▓▓▓▓▓▓▒▒░░░ OURS TRULY, */ /// @notice Main interface for the ZoraCreator1155 contract /// @author @iainnash / @tbtstl interface IZoraCreator1155 is IZoraCreator1155TypesV1, IZoraCreator1155Errors, IVersionedContract, IOwnable, IERC1155MetadataURIUpgradeable, IZoraCreator1155DelegatedCreation, IMintWithRewardsRecipients, IMintWithMints { function PERMISSION_BIT_ADMIN() external returns (uint256); /// @notice This user role allows for only mint actions to be performed function PERMISSION_BIT_MINTER() external returns (uint256); /// @notice This user role allows for only managing sales configurations function PERMISSION_BIT_SALES() external returns (uint256); /// @notice This user role allows for only managing metadata configuration function PERMISSION_BIT_METADATA() external returns (uint256); /// @notice This user role allows for only withdrawing funds and setting funds withdraw address function PERMISSION_BIT_FUNDS_MANAGER() external returns (uint256); /// @notice Used to label the configuration update type enum ConfigUpdate { OWNER, FUNDS_RECIPIENT, TRANSFER_HOOK } event ConfigUpdated(address indexed updater, ConfigUpdate indexed updateType, ContractConfig newConfig); event UpdatedToken(address indexed from, uint256 indexed tokenId, TokenData tokenData); event SetupNewToken(uint256 indexed tokenId, address indexed sender, string newURI, uint256 maxSupply); function setOwner(address newOwner) external; function owner() external view returns (address); event ContractRendererUpdated(IRenderer1155 renderer); event ContractMetadataUpdated(address indexed updater, string uri, string name); event Purchased(address indexed sender, address indexed minter, uint256 indexed tokenId, uint256 quantity, uint256 value); /// @dev Deprecated: call mint function mintWithRewards(IMinter1155 minter, uint256 tokenId, uint256 quantity, bytes calldata minterArguments, address mintReferral) external payable; function adminMint(address recipient, uint256 tokenId, uint256 quantity, bytes memory data) external; function burnBatch(address user, uint256[] calldata tokenIds, uint256[] calldata amounts) external; /// @notice Contract call to setupNewToken /// @param tokenURI URI for the token /// @param maxSupply maxSupply for the token, set to 0 for open edition function setupNewToken(string memory tokenURI, uint256 maxSupply) external returns (uint256 tokenId); function setupNewTokenWithCreateReferral(string calldata newURI, uint256 maxSupply, address createReferral) external returns (uint256); function getCreatorRewardRecipient(uint256 tokenId) external view returns (address); function updateTokenURI(uint256 tokenId, string memory _newURI) external; function updateContractMetadata(string memory _newURI, string memory _newName) external; // Public interface for `setTokenMetadataRenderer(uint256, address) has been deprecated. function contractURI() external view returns (string memory); function assumeLastTokenIdMatches(uint256 tokenId) external; function updateRoyaltiesForToken(uint256 tokenId, ICreatorRoyaltiesControl.RoyaltyConfiguration memory royaltyConfiguration) external; /// @notice Set funds recipient address /// @param fundsRecipient new funds recipient address function setFundsRecipient(address payable fundsRecipient) external; /// @notice Allows the create referral to update the address that can claim their rewards function updateCreateReferral(uint256 tokenId, address recipient) external; function addPermission(uint256 tokenId, address user, uint256 permissionBits) external; function removePermission(uint256 tokenId, address user, uint256 permissionBits) external; function isAdminOrRole(address user, uint256 tokenId, uint256 role) external view returns (bool); function getTokenInfo(uint256 tokenId) external view returns (TokenData memory); function callRenderer(uint256 tokenId, bytes memory data) external; function callSale(uint256 tokenId, IMinter1155 salesConfig, bytes memory data) external; function mintFee() external view returns (uint256); /// @notice Withdraws all ETH from the contract to the funds recipient address function withdraw() external; /// @notice Returns the current implementation address function implementation() external view returns (address); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.17; import {IERC2981} from "@openzeppelin/contracts/interfaces/IERC2981.sol"; interface ICreatorRoyaltyErrors { /// @notice Thrown when a user tries to have 100% supply royalties error InvalidMintSchedule(); } interface ICreatorRoyaltiesControl is IERC2981 { /// @notice The RoyaltyConfiguration struct is used to store the royalty configuration for a given token. /// @param royaltyMintSchedule Every nth token will go to the royalty recipient. /// @param royaltyBPS The royalty amount in basis points for secondary sales. /// @param royaltyRecipient The address that will receive the royalty payments. struct RoyaltyConfiguration { uint32 royaltyMintSchedule; uint32 royaltyBPS; address royaltyRecipient; } /// @notice Event emitted when royalties are updated event UpdatedRoyalties(uint256 indexed tokenId, address indexed user, RoyaltyConfiguration configuration); /// @notice External data getter to get royalties for a token /// @param tokenId tokenId to get royalties configuration for function getRoyalties(uint256 tokenId) external view returns (RoyaltyConfiguration memory); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.17; import {IMinter1155} from "@zoralabs/shared-contracts/interfaces/IMinter1155.sol";
// SPDX-License-Identifier: MIT pragma solidity ^0.8.17; interface IHasContractName { /// @notice Contract name returns the pretty contract name function contractName() external returns (string memory); } interface IContractMetadata is IHasContractName { /// @notice Contract URI returns the uri for more information about the given contract function contractURI() external returns (string memory); }
// SPDX-License-Identifier: MIT pragma solidity 0.8.17; import {IOwnable2StepUpgradeable} from "./IOwnable2StepUpgradeable.sol"; import {IOwnable2StepStorageV1} from "./IOwnable2StepStorageV1.sol"; import {Initializable} from "@zoralabs/openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol"; /// @title Ownable /// @author Rohan Kulkarni / Iain Nash /// @notice Modified from OpenZeppelin Contracts v4.7.3 (access/OwnableUpgradeable.sol) /// - Uses custom errors declared in IOwnable /// - Adds optional two-step ownership transfer (`safeTransferOwnership` + `acceptOwnership`) abstract contract Ownable2StepUpgradeable is IOwnable2StepUpgradeable, IOwnable2StepStorageV1, Initializable { /// /// /// STORAGE /// /// /// /// @dev Modifier to check if the address argument is the zero/burn address modifier notZeroAddress(address check) { if (check == address(0)) { revert OWNER_CANNOT_BE_ZERO_ADDRESS(); } _; } /// /// /// MODIFIERS /// /// /// /// @dev Ensures the caller is the owner modifier onlyOwner() { if (msg.sender != _owner) { revert ONLY_OWNER(); } _; } /// @dev Ensures the caller is the pending owner modifier onlyPendingOwner() { if (msg.sender != _pendingOwner) { revert ONLY_PENDING_OWNER(); } _; } /// /// /// FUNCTIONS /// /// /// /// @dev Initializes contract ownership /// @param _initialOwner The initial owner address function __Ownable_init(address _initialOwner) internal notZeroAddress(_initialOwner) onlyInitializing { _owner = _initialOwner; emit OwnerUpdated(address(0), _initialOwner); } /// @notice The address of the owner function owner() public view virtual returns (address) { return _owner; } /// @notice The address of the pending owner function pendingOwner() public view returns (address) { return _pendingOwner; } /// @notice Forces an ownership transfer from the last owner /// @param _newOwner The new owner address function transferOwnership(address _newOwner) public notZeroAddress(_newOwner) onlyOwner { _transferOwnership(_newOwner); } /// @notice Forces an ownership transfer from any sender /// @param _newOwner New owner to transfer contract to /// @dev Ensure is called only from trusted internal code, no access control checks. function _transferOwnership(address _newOwner) internal { emit OwnerUpdated(_owner, _newOwner); _owner = _newOwner; if (_pendingOwner != address(0)) { delete _pendingOwner; } } /// @notice Initiates a two-step ownership transfer /// @param _newOwner The new owner address function safeTransferOwnership(address _newOwner) public notZeroAddress(_newOwner) onlyOwner { _pendingOwner = _newOwner; emit OwnerPending(_owner, _newOwner); } /// @notice Resign ownership of contract /// @dev only callably by the owner, dangerous call. function resignOwnership() public onlyOwner { _transferOwnership(address(0)); } /// @notice Accepts an ownership transfer function acceptOwnership() public onlyPendingOwner { emit OwnerUpdated(_owner, msg.sender); _transferOwnership(msg.sender); } /// @notice Cancels a pending ownership transfer function cancelOwnershipTransfer() public onlyOwner { emit OwnerCanceled(_owner, _pendingOwner); delete _pendingOwner; } }
// SPDX-License-Identifier: MIT pragma solidity 0.8.17; import {Enjoy} from "_imagine/mint/Enjoy.sol"; import {ERC1967Proxy} from "@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol"; /* ░░░░░░░░░░░░░░ ░░▒▒░░░░░░░░░░░░░░░░░░░░ ░░▒▒▒▒░░░░░░░░░░░░░░░░░░░░░░ ░░▒▒▒▒░░░░░░░░░░░░░░ ░░░░░░░░ ░▓▓▒▒▒▒░░░░░░░░░░░░ ░░░░░░░ ░▓▓▓▒▒▒▒░░░░░░░░░░░░ ░░░░░░░░ ░▓▓▓▒▒▒▒░░░░░░░░░░░░░░ ░░░░░░░░░░ ░▓▓▓▒▒▒▒▒▒░░░░░░░░░░░░░░░░░░░░░░░░░░░ ░▓▓▓▓▓▒▒▒▒░░░░░░░░░░░░░░░░░░░░░░░░░░ ░▓▓▓▓▒▒▒▒▒▒░░░░░░░░░░░░░░░░░░░░░░░ ░░▓▓▓▓▒▒▒▒▒▒░░░░░░░░░░░░░░░░░░░░ ░░▓▓▓▓▓▓▒▒▒▒▒▒▒▒░░░░░░░░░▒▒▒▒▒░░ ░░▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒░░ ░░▓▓▓▓▓▓▓▓▓▓▓▓▒▒░░░ OURS TRULY, */ /// Imagine. Mint. Enjoy. /// @notice Imagine. Mint. Enjoy. /// @author ZORA @iainnash / @tbtstl contract Zora1155 is Enjoy, ERC1967Proxy { constructor(address _logic) ERC1967Proxy(_logic, "") {} }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/Create2.sol) pragma solidity ^0.8.0; /** * @dev Helper to make usage of the `CREATE2` EVM opcode easier and safer. * `CREATE2` can be used to compute in advance the address where a smart * contract will be deployed, which allows for interesting new mechanisms known * as 'counterfactual interactions'. * * See the https://eips.ethereum.org/EIPS/eip-1014#motivation[EIP] for more * information. */ library Create2Upgradeable { /** * @dev Deploys a contract using `CREATE2`. The address where the contract * will be deployed can be known in advance via {computeAddress}. * * The bytecode for a contract can be obtained from Solidity with * `type(contractName).creationCode`. * * Requirements: * * - `bytecode` must not be empty. * - `salt` must have not been used for `bytecode` already. * - the factory must have a balance of at least `amount`. * - if `amount` is non-zero, `bytecode` must have a `payable` constructor. */ function deploy(uint256 amount, bytes32 salt, bytes memory bytecode) internal returns (address addr) { require(address(this).balance >= amount, "Create2: insufficient balance"); require(bytecode.length != 0, "Create2: bytecode length is zero"); /// @solidity memory-safe-assembly assembly { addr := create2(amount, add(bytecode, 0x20), mload(bytecode), salt) } require(addr != address(0), "Create2: Failed on deploy"); } /** * @dev Returns the address where a contract will be stored if deployed via {deploy}. Any change in the * `bytecodeHash` or `salt` will result in a new destination address. */ function computeAddress(bytes32 salt, bytes32 bytecodeHash) internal view returns (address) { return computeAddress(salt, bytecodeHash, address(this)); } /** * @dev Returns the address where a contract will be stored if deployed via {deploy} from a contract located at * `deployer`. If `deployer` is this contract's address, returns the same value as {computeAddress}. */ function computeAddress(bytes32 salt, bytes32 bytecodeHash, address deployer) internal pure returns (address addr) { /// @solidity memory-safe-assembly assembly { let ptr := mload(0x40) // Get free memory pointer // | | ↓ ptr ... ↓ ptr + 0x0B (start) ... ↓ ptr + 0x20 ... ↓ ptr + 0x40 ... | // |-------------------|---------------------------------------------------------------------------| // | bytecodeHash | CCCCCCCCCCCCC...CC | // | salt | BBBBBBBBBBBBB...BB | // | deployer | 000000...0000AAAAAAAAAAAAAAAAAAA...AA | // | 0xFF | FF | // |-------------------|---------------------------------------------------------------------------| // | memory | 000000...00FFAAAAAAAAAAAAAAAAAAA...AABBBBBBBBBBBBB...BBCCCCCCCCCCCCC...CC | // | keccak(start, 85) | ↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑ | mstore(add(ptr, 0x40), bytecodeHash) mstore(add(ptr, 0x20), salt) mstore(ptr, deployer) // Right-aligned with 12 preceding garbage bytes let start := add(ptr, 0x0b) // The hashed data starts at the final garbage byte which we will set to 0xff mstore8(start, 0xff) addr := keccak256(start, 85) } } }
// SPDX-License-Identifier: AGPL-3.0-only pragma solidity >=0.8.0; import {Bytes32AddressLib} from "./Bytes32AddressLib.sol"; /// @notice Deploy to deterministic addresses without an initcode factor. /// @author Solmate (https://github.com/transmissions11/solmate/blob/main/src/utils/CREATE3.sol) /// @author Modified from 0xSequence (https://github.com/0xSequence/create3/blob/master/contracts/Create3.sol) library CREATE3 { using Bytes32AddressLib for bytes32; //--------------------------------------------------------------------------------// // Opcode | Opcode + Arguments | Description | Stack View // //--------------------------------------------------------------------------------// // 0x36 | 0x36 | CALLDATASIZE | size // // 0x3d | 0x3d | RETURNDATASIZE | 0 size // // 0x3d | 0x3d | RETURNDATASIZE | 0 0 size // // 0x37 | 0x37 | CALLDATACOPY | // // 0x36 | 0x36 | CALLDATASIZE | size // // 0x3d | 0x3d | RETURNDATASIZE | 0 size // // 0x34 | 0x34 | CALLVALUE | value 0 size // // 0xf0 | 0xf0 | CREATE | newContract // //--------------------------------------------------------------------------------// // Opcode | Opcode + Arguments | Description | Stack View // //--------------------------------------------------------------------------------// // 0x67 | 0x67XXXXXXXXXXXXXXXX | PUSH8 bytecode | bytecode // // 0x3d | 0x3d | RETURNDATASIZE | 0 bytecode // // 0x52 | 0x52 | MSTORE | // // 0x60 | 0x6008 | PUSH1 08 | 8 // // 0x60 | 0x6018 | PUSH1 18 | 24 8 // // 0xf3 | 0xf3 | RETURN | // //--------------------------------------------------------------------------------// bytes internal constant PROXY_BYTECODE = hex"67_36_3d_3d_37_36_3d_34_f0_3d_52_60_08_60_18_f3"; bytes32 internal constant PROXY_BYTECODE_HASH = keccak256(PROXY_BYTECODE); function deploy( bytes32 salt, bytes memory creationCode, uint256 value ) internal returns (address deployed) { bytes memory proxyChildBytecode = PROXY_BYTECODE; address proxy; /// @solidity memory-safe-assembly assembly { // Deploy a new contract with our pre-made bytecode via CREATE2. // We start 32 bytes into the code to avoid copying the byte length. proxy := create2(0, add(proxyChildBytecode, 32), mload(proxyChildBytecode), salt) } require(proxy != address(0), "DEPLOYMENT_FAILED"); deployed = getDeployed(salt); (bool success, ) = proxy.call{value: value}(creationCode); require(success && deployed.code.length != 0, "INITIALIZATION_FAILED"); } function getDeployed(bytes32 salt) internal view returns (address) { address proxy = keccak256( abi.encodePacked( // Prefix: bytes1(0xFF), // Creator: address(this), // Salt: salt, // Bytecode hash: PROXY_BYTECODE_HASH ) ).fromLast20Bytes(); return keccak256( abi.encodePacked( // 0xd6 = 0xc0 (short RLP prefix) + 0x16 (length of: 0x94 ++ proxy ++ 0x01) // 0x94 = 0x80 + 0x14 (0x14 = the length of an address, 20 bytes, in hex) hex"d6_94", proxy, hex"01" // Nonce of the proxy contract (1) ) ).fromLast20Bytes(); } }
// This file is automatically generated by code; do not manually update // SPDX-License-Identifier: MIT pragma solidity 0.8.17; import {IVersionedContract} from "@zoralabs/shared-contracts/interfaces/IVersionedContract.sol"; /// @title ContractVersionBase /// @notice Base contract for versioning contracts contract ContractVersionBase is IVersionedContract { /// @notice The version of the contract function contractVersion() external pure override returns (string memory) { return "2.10.1"; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/Address.sol) pragma solidity ^0.8.1; error ADDRESS_INSUFFICIENT_BALANCE(); error ADDRESS_UNABLE_TO_SEND_VALUE(); error ADDRESS_LOW_LEVEL_CALL_FAILED(); error ADDRESS_LOW_LEVEL_CALL_WITH_VALUE_FAILED(); error ADDRESS_INSUFFICIENT_BALANCE_FOR_CALL(); error ADDRESS_LOW_LEVEL_STATIC_CALL_FAILED(); error ADDRESS_CALL_TO_NON_CONTRACT(); /** * @dev Collection of functions related to the address type */ library AddressUpgradeable { /** * @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 * * Furthermore, `isContract` will also return true if the target contract within * the same transaction is already scheduled for destruction by `SELFDESTRUCT`, * which only has an effect at the end of a transaction. * ==== * * [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://consensys.net/diligence/blog/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 { if (address(this).balance > amount) { revert ADDRESS_INSUFFICIENT_BALANCE(); } (bool success, ) = recipient.call{value: amount}(""); if (!success) { revert ADDRESS_UNABLE_TO_SEND_VALUE(); } } /** * @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 functionCallWithValue(target, data, 0); } /** * @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) { if (address(this).balance < value) { revert ADDRESS_INSUFFICIENT_BALANCE(); } (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResultFromTarget(target, success, returndata); } /** * @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) { (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResultFromTarget(target, success, returndata); } /** * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract. * * _Available since v4.8._ */ function verifyCallResultFromTarget( address target, bool success, bytes memory returndata ) internal view returns (bytes memory) { if (success) { if (returndata.length == 0) { // only check isContract if the call was successful and the return data is empty // otherwise we already know that it was a contract if (!isContract(target)) { revert ADDRESS_CALL_TO_NON_CONTRACT(); } } return returndata; } else { _revert(returndata); } } /** * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason or using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata ) internal pure returns (bytes memory) { if (success) { return returndata; } else { _revert(returndata); } } function _revert(bytes memory returndata) private pure { // 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 ADDRESS_LOW_LEVEL_CALL_FAILED(); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (interfaces/draft-IERC1822.sol) pragma solidity ^0.8.0; /** * @dev ERC1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified * proxy whose upgrades are fully controlled by the current implementation. */ interface IERC1822ProxiableUpgradeable { /** * @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation * address. * * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this * function revert if invoked through a proxy. */ function proxiableUUID() external view returns (bytes32); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (proxy/ERC1967/ERC1967Upgrade.sol) pragma solidity ^0.8.2; import "../beacon/IBeaconUpgradeable.sol"; import "../../interfaces/draft-IERC1822Upgradeable.sol"; import "../../utils/AddressUpgradeable.sol"; import "../../utils/StorageSlotUpgradeable.sol"; import "../utils/Initializable.sol"; error ERC1967_NEW_IMPL_NOT_CONTRACT(); error ERC1967_UNSUPPORTED_PROXIABLEUUID(); error ERC1967_NEW_IMPL_NOT_UUPS(); error ERC1967_NEW_ADMIN_IS_ZERO_ADDRESS(); error ERC1967_NEW_BEACON_IS_NOT_CONTRACT(); error ERC1967_BEACON_IMPL_IS_NOT_CONTRACT(); error ADDRESS_DELEGATECALL_TO_NON_CONTRACT(); /** * @dev This abstract contract provides getters and event emitting update functions for * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots. * * _Available since v4.1._ */ abstract contract ERC1967UpgradeUpgradeable is Initializable { function __ERC1967Upgrade_init() internal onlyInitializing { } function __ERC1967Upgrade_init_unchained() internal onlyInitializing { } // This is the keccak-256 hash of "eip1967.proxy.rollback" subtracted by 1 bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143; /** * @dev Storage slot with the address of the current implementation. * This is the keccak-256 hash of "eip1967.proxy.implementation" subtracted by 1, and is * validated in the constructor. */ bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc; /** * @dev Emitted when the implementation is upgraded. */ event Upgraded(address indexed implementation); /** * @dev Returns the current implementation address. */ function _getImplementation() internal view returns (address) { return StorageSlotUpgradeable.getAddressSlot(_IMPLEMENTATION_SLOT).value; } /** * @dev Stores a new address in the EIP1967 implementation slot. */ function _setImplementation(address newImplementation) private { if (!AddressUpgradeable.isContract(newImplementation)) { revert ERC1967_NEW_IMPL_NOT_CONTRACT(); } StorageSlotUpgradeable.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation; } /** * @dev Perform implementation upgrade * * Emits an {Upgraded} event. */ function _upgradeTo(address newImplementation) internal { _setImplementation(newImplementation); emit Upgraded(newImplementation); } /** * @dev Perform implementation upgrade with additional setup call. * * Emits an {Upgraded} event. */ function _upgradeToAndCall(address newImplementation, bytes memory data, bool forceCall) internal { _upgradeTo(newImplementation); if (data.length > 0 || forceCall) { _functionDelegateCall(newImplementation, data); } } /** * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call. * * Emits an {Upgraded} event. */ function _upgradeToAndCallUUPS(address newImplementation, bytes memory data, bool forceCall) internal { // Upgrades from old implementations will perform a rollback test. This test requires the new // implementation to upgrade back to the old, non-ERC1822 compliant, implementation. Removing // this special case will break upgrade paths from old UUPS implementation to new ones. if (StorageSlotUpgradeable.getBooleanSlot(_ROLLBACK_SLOT).value) { _setImplementation(newImplementation); } else { try IERC1822ProxiableUpgradeable(newImplementation).proxiableUUID() returns (bytes32 slot) { if (slot != _IMPLEMENTATION_SLOT) { revert ERC1967_UNSUPPORTED_PROXIABLEUUID(); } } catch { revert ERC1967_NEW_IMPL_NOT_UUPS(); } _upgradeToAndCall(newImplementation, data, forceCall); } } /** * @dev Storage slot with the admin of the contract. * This is the keccak-256 hash of "eip1967.proxy.admin" subtracted by 1, and is * validated in the constructor. */ bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103; /** * @dev Emitted when the admin account has changed. */ event AdminChanged(address previousAdmin, address newAdmin); /** * @dev Returns the current admin. */ function _getAdmin() internal view returns (address) { return StorageSlotUpgradeable.getAddressSlot(_ADMIN_SLOT).value; } /** * @dev Stores a new address in the EIP1967 admin slot. */ function _setAdmin(address newAdmin) private { if (newAdmin == address(0)) { revert ERC1967_NEW_ADMIN_IS_ZERO_ADDRESS(); } StorageSlotUpgradeable.getAddressSlot(_ADMIN_SLOT).value = newAdmin; } /** * @dev Changes the admin of the proxy. * * Emits an {AdminChanged} event. */ function _changeAdmin(address newAdmin) internal { emit AdminChanged(_getAdmin(), newAdmin); _setAdmin(newAdmin); } /** * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy. * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor. */ bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50; /** * @dev Emitted when the beacon is upgraded. */ event BeaconUpgraded(address indexed beacon); /** * @dev Returns the current beacon. */ function _getBeacon() internal view returns (address) { return StorageSlotUpgradeable.getAddressSlot(_BEACON_SLOT).value; } /** * @dev Stores a new beacon in the EIP1967 beacon slot. */ function _setBeacon(address newBeacon) private { if (!AddressUpgradeable.isContract(newBeacon)) { revert ERC1967_NEW_BEACON_IS_NOT_CONTRACT(); } if (!AddressUpgradeable.isContract(IBeaconUpgradeable(newBeacon).implementation())) { revert ERC1967_BEACON_IMPL_IS_NOT_CONTRACT(); } StorageSlotUpgradeable.getAddressSlot(_BEACON_SLOT).value = newBeacon; } /** * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that). * * Emits a {BeaconUpgraded} event. */ function _upgradeBeaconToAndCall(address newBeacon, bytes memory data, bool forceCall) internal { _setBeacon(newBeacon); emit BeaconUpgraded(newBeacon); if (data.length > 0 || forceCall) { _functionDelegateCall(IBeaconUpgradeable(newBeacon).implementation(), data); } } /** * @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) private returns (bytes memory) { if (!AddressUpgradeable.isContract(target)) { revert ADDRESS_DELEGATECALL_TO_NON_CONTRACT(); } // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.delegatecall(data); return AddressUpgradeable.verifyCallResult(success, returndata); } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[50] private __gap; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.17; interface IVersionedContract { function contractVersion() external pure returns (string memory); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (interfaces/IERC165.sol) pragma solidity ^0.8.0; import "../utils/introspection/IERC165Upgradeable.sol";
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (interfaces/IERC1155MetadataURI.sol) pragma solidity ^0.8.0; import "../token/ERC1155/extensions/IERC1155MetadataURIUpgradeable.sol";
// SPDX-License-Identifier: MIT pragma solidity 0.8.17; import {ITransferHookReceiver} from "../interfaces/ITransferHookReceiver.sol"; /* ░░░░░░░░░░░░░░ ░░▒▒░░░░░░░░░░░░░░░░░░░░ ░░▒▒▒▒░░░░░░░░░░░░░░░░░░░░░░ ░░▒▒▒▒░░░░░░░░░░░░░░ ░░░░░░░░ ░▓▓▒▒▒▒░░░░░░░░░░░░ ░░░░░░░ ░▓▓▓▒▒▒▒░░░░░░░░░░░░ ░░░░░░░░ ░▓▓▓▒▒▒▒░░░░░░░░░░░░░░ ░░░░░░░░░░ ░▓▓▓▒▒▒▒▒▒░░░░░░░░░░░░░░░░░░░░░░░░░░░ ░▓▓▓▓▓▒▒▒▒░░░░░░░░░░░░░░░░░░░░░░░░░░ ░▓▓▓▓▒▒▒▒▒▒░░░░░░░░░░░░░░░░░░░░░░░ ░░▓▓▓▓▒▒▒▒▒▒░░░░░░░░░░░░░░░░░░░░ ░░▓▓▓▓▓▓▒▒▒▒▒▒▒▒░░░░░░░░░▒▒▒▒▒░░ ░░▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒░░ ░░▓▓▓▓▓▓▓▓▓▓▓▓▒▒░░░ OURS TRULY, */ /// Imagine. Mint. Enjoy. /// @notice Interface for types used across the ZoraCreator1155 contract /// @author @iainnash / @tbtstl interface IZoraCreator1155TypesV1 { /// @notice Used to store individual token data struct TokenData { string uri; uint256 maxSupply; uint256 totalMinted; } /// @notice Used to store contract-level configuration struct ContractConfig { address owner; uint96 __gap1; address payable fundsRecipient; uint96 __gap2; ITransferHookReceiver transferHook; uint96 __gap3; } }
// SPDX-License-Identifier: MIT pragma solidity 0.8.17; import {IZoraCreator1155Errors} from "@zoralabs/shared-contracts/interfaces/errors/IZoraCreator1155Errors.sol";
// SPDX-License-Identifier: MIT pragma solidity ^0.8.17; import {IERC165Upgradeable} from "@zoralabs/openzeppelin-contracts-upgradeable/contracts/interfaces/IERC165Upgradeable.sol"; /// @dev IERC165 type required interface IRenderer1155 is IERC165Upgradeable { /// @notice Called for assigned tokenId, or when token id is globally set to a renderer /// @dev contract target is assumed to be msg.sender /// @param tokenId token id to get uri for function uri(uint256 tokenId) external view returns (string memory); /// @notice Only called for tokenId == 0 /// @dev contract target is assumed to be msg.sender function contractURI() external view returns (string memory); /// @notice Sets up renderer from contract /// @param initData data to setup renderer with /// @dev contract target is assumed to be msg.sender function setup(bytes memory initData) external; // IERC165 type required – set in base helper }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.17; interface IOwnable { function owner() external returns (address); event OwnershipTransferred(address lastOwner, address newOwner); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.17; interface IHasCreatorAttribution { event CreatorAttribution(bytes32 structHash, string domainName, string version, address creator, bytes signature); } interface IHasSupportedPremintSignatureVersions { function supportedPremintSignatureVersions() external pure returns (string[] memory); } // this is the current version of the Zora Token contract creation interface ISupportsAABasedDelegatedTokenCreation { function delegateSetupNewToken( bytes memory premintConfigEncoded, bytes32 premintVersion, bytes calldata signature, address sender, address premintSignerContract ) external returns (uint256 newTokenId); } interface IZoraCreator1155DelegatedCreation is IHasCreatorAttribution, IHasSupportedPremintSignatureVersions, ISupportsAABasedDelegatedTokenCreation {} // this was the legacy interface which has both functions bundled in it - ideally these would be defined in their // own interfaces that can be checked if the interface method is supported. going forward (above) they are separate interface IZoraCreator1155DelegatedCreationLegacy { event CreatorAttribution(bytes32 structHash, string domainName, string version, address creator, bytes signature); function supportedPremintSignatureVersions() external pure returns (string[] memory); function delegateSetupNewToken( bytes memory premintConfigEncoded, bytes32 premintVersion, bytes calldata signature, address sender ) external returns (uint256 newTokenId); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.17; import {IMinter1155} from "./IMinter1155.sol"; interface IMintWithRewardsRecipients { /// @notice Mint tokens and payout rewards given a minter contract, minter arguments, and rewards arguments /// @param minter The minter contract to use /// @param tokenId The token ID to mint /// @param quantity The quantity of tokens to mint /// @param rewardsRecipients The addresses of rewards arguments - mintReferral and platformReferral /// @param minterArguments The arguments to pass to the minter function mint(IMinter1155 minter, uint256 tokenId, uint256 quantity, address[] memory rewardsRecipients, bytes calldata minterArguments) external payable; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.17; import {IMinter1155} from "@zoralabs/shared-contracts/interfaces/IMinter1155.sol"; /// @title IMintWithMints /// @notice Interface intended to be implemented by a 1155 creator contract to be able to mint tokens using MINTs interface IMintWithMints { /// @notice Mint tokens and payout rewards given a minter contract, minter arguments, and rewards arguments, /// while MINTs are redeemed to pay for the mint fee, instead of paying with ETH directly. /// The MINTs must have been transferred to be owned by this contract before calling this function. /// Value sent is used for paid mints, if this is a paid mint. /// @param mintTokenIds The MINT token IDs that are to be redeemed. /// @param quantities The quantities of each MINT token id to redeem. /// @param minter The minter contract to use /// @param tokenId The token ID to mint /// @param rewardsRecipients The addresses of rewards arguments - rewardsRecipients[0] = mintReferral, rewardsRecipients[1] = platformReferral /// @param minterArguments The arguments to pass to the minter /// @return quantityMinted The total quantity of tokens minted function mintWithMints( uint256[] calldata mintTokenIds, uint256[] calldata quantities, IMinter1155 minter, uint256 tokenId, address[] memory rewardsRecipients, bytes calldata minterArguments ) external payable returns (uint256 quantityMinted); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (interfaces/IERC2981.sol) pragma solidity ^0.8.0; import "../utils/introspection/IERC165.sol"; /** * @dev Interface for the NFT Royalty Standard. * * A standardized way to retrieve royalty payment information for non-fungible tokens (NFTs) to enable universal * support for royalty payments across all NFT marketplaces and ecosystem participants. * * _Available since v4.5._ */ interface IERC2981 is IERC165 { /** * @dev Returns how much royalty is owed and to whom, based on a sale price that may be denominated in any unit of * exchange. The royalty amount is denominated and should be paid in that same unit of exchange. */ function royaltyInfo( uint256 tokenId, uint256 salePrice ) external view returns (address receiver, uint256 royaltyAmount); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.17; import {ICreatorCommands} from "./ICreatorCommands.sol"; import {IERC165Upgradeable} from "./IERC165Upgradeable.sol"; /// @notice Minter standard interface /// @dev Minters need to confirm to the ERC165 selector of type(IMinter1155).interfaceId interface IMinter1155 is IERC165Upgradeable { function requestMint( address sender, uint256 tokenId, uint256 quantity, uint256 ethValueSent, bytes calldata minterArguments ) external returns (ICreatorCommands.CommandSet memory commands); }
// SPDX-License-Identifier: MIT pragma solidity 0.8.17; /// @title IOwnable2StepUpgradeable /// @author Rohan Kulkarni /// @notice The external Ownable events, errors, and functions interface IOwnable2StepUpgradeable { /// /// /// EVENTS /// /// /// /// @notice Emitted when ownership has been updated /// @param prevOwner The previous owner address /// @param newOwner The new owner address event OwnerUpdated(address indexed prevOwner, address indexed newOwner); /// @notice Emitted when an ownership transfer is pending /// @param owner The current owner address /// @param pendingOwner The pending new owner address event OwnerPending(address indexed owner, address indexed pendingOwner); /// @notice Emitted when a pending ownership transfer has been canceled /// @param owner The current owner address /// @param canceledOwner The canceled owner address event OwnerCanceled(address indexed owner, address indexed canceledOwner); /// /// /// ERRORS /// /// /// /// @dev Reverts if an unauthorized user calls an owner function error ONLY_OWNER(); /// @dev Reverts if an unauthorized user calls a pending owner function error ONLY_PENDING_OWNER(); /// @dev Owner cannot be the zero/burn address error OWNER_CANNOT_BE_ZERO_ADDRESS(); /// /// /// FUNCTIONS /// /// /// /// @notice The address of the owner function owner() external view returns (address); /// @notice The address of the pending owner function pendingOwner() external view returns (address); /// @notice Forces an ownership transfer /// @param newOwner The new owner address function transferOwnership(address newOwner) external; /// @notice Initiates a two-step ownership transfer /// @param newOwner The new owner address function safeTransferOwnership(address newOwner) external; /// @notice Accepts an ownership transfer function acceptOwnership() external; /// @notice Cancels a pending ownership transfer function cancelOwnershipTransfer() external; }
// SPDX-License-Identifier: MIT pragma solidity 0.8.17; abstract contract IOwnable2StepStorageV1 { /// @dev The address of the owner address internal _owner; /// @dev The address of the pending owner address internal _pendingOwner; /// @dev storage gap uint256[50] private __gap; }
// SPDX-License-Identifier: MIT pragma solidity 0.8.17; /* ░░░░░░░░░░░░░░ ░░▒▒░░░░░░░░░░░░░░░░░░░░ ░░▒▒▒▒░░░░░░░░░░░░░░░░░░░░░░ ░░▒▒▒▒░░░░░░░░░░░░░░ ░░░░░░░░ ░▓▓▒▒▒▒░░░░░░░░░░░░ ░░░░░░░ ░▓▓▓▒▒▒▒░░░░░░░░░░░░ ░░░░░░░░ ░▓▓▓▒▒▒▒░░░░░░░░░░░░░░ ░░░░░░░░░░ ░▓▓▓▒▒▒▒▒▒░░░░░░░░░░░░░░░░░░░░░░░░░░░ ░▓▓▓▓▓▒▒▒▒░░░░░░░░░░░░░░░░░░░░░░░░░░ ░▓▓▓▓▒▒▒▒▒▒░░░░░░░░░░░░░░░░░░░░░░░ ░░▓▓▓▓▒▒▒▒▒▒░░░░░░░░░░░░░░░░░░░░ ░░▓▓▓▓▓▓▒▒▒▒▒▒▒▒░░░░░░░░░▒▒▒▒▒░░ ░░▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒░░ ░░▓▓▓▓▓▓▓▓▓▓▓▓▒▒░░░ OURS TRULY, */ interface Enjoy { }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (proxy/ERC1967/ERC1967Proxy.sol) pragma solidity ^0.8.0; import "../Proxy.sol"; import "./ERC1967Upgrade.sol"; /** * @dev This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an * implementation address that can be changed. This address is stored in storage in the location specified by * https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn't conflict with the storage layout of the * implementation behind the proxy. */ contract ERC1967Proxy is Proxy, ERC1967Upgrade { /** * @dev Initializes the upgradeable proxy with an initial implementation specified by `_logic`. * * If `_data` is nonempty, it's used as data in a delegate call to `_logic`. This will typically be an encoded * function call, and allows initializing the storage of the proxy like a Solidity constructor. */ constructor(address _logic, bytes memory _data) payable { _upgradeToAndCall(_logic, _data, false); } /** * @dev Returns the current implementation address. */ function _implementation() internal view virtual override returns (address impl) { return ERC1967Upgrade._getImplementation(); } }
// SPDX-License-Identifier: AGPL-3.0-only pragma solidity >=0.8.0; /// @notice Library for converting between addresses and bytes32 values. /// @author Solmate (https://github.com/transmissions11/solmate/blob/main/src/utils/Bytes32AddressLib.sol) library Bytes32AddressLib { function fromLast20Bytes(bytes32 bytesValue) internal pure returns (address) { return address(uint160(uint256(bytesValue))); } function fillLast12Bytes(address addressValue) internal pure returns (bytes32) { return bytes32(bytes20(addressValue)); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (proxy/beacon/IBeacon.sol) pragma solidity ^0.8.0; /** * @dev This is the interface that {BeaconProxy} expects of its beacon. */ interface IBeaconUpgradeable { /** * @dev Must return an address that can be used as a delegate call target. * * {BeaconProxy} will check that this address is a contract. */ function implementation() external view returns (address); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (utils/StorageSlot.sol) // This file was procedurally generated from scripts/generate/templates/StorageSlot.js. pragma solidity ^0.8.0; /** * @dev Library for reading and writing primitive types to specific storage slots. * * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts. * This library helps with reading and writing to such slots without the need for inline assembly. * * The functions in this library return Slot structs that contain a `value` member that can be used to read or write. * * Example usage to set ERC1967 implementation slot: * ```solidity * contract ERC1967 { * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc; * * function _getImplementation() internal view returns (address) { * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value; * } * * function _setImplementation(address newImplementation) internal { * require(Address.isContract(newImplementation), "ERC1967: new implementation is not a contract"); * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation; * } * } * ``` * * _Available since v4.1 for `address`, `bool`, `bytes32`, `uint256`._ * _Available since v4.9 for `string`, `bytes`._ */ library StorageSlotUpgradeable { struct AddressSlot { address value; } struct BooleanSlot { bool value; } struct Bytes32Slot { bytes32 value; } struct Uint256Slot { uint256 value; } struct StringSlot { string value; } struct BytesSlot { bytes value; } /** * @dev Returns an `AddressSlot` with member `value` located at `slot`. */ function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `BooleanSlot` with member `value` located at `slot`. */ function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `Bytes32Slot` with member `value` located at `slot`. */ function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `Uint256Slot` with member `value` located at `slot`. */ function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `StringSlot` with member `value` located at `slot`. */ function getStringSlot(bytes32 slot) internal pure returns (StringSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `StringSlot` representation of the string storage pointer `store`. */ function getStringSlot(string storage store) internal pure returns (StringSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := store.slot } } /** * @dev Returns an `BytesSlot` with member `value` located at `slot`. */ function getBytesSlot(bytes32 slot) internal pure returns (BytesSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `BytesSlot` representation of the bytes storage pointer `store`. */ function getBytesSlot(bytes storage store) internal pure returns (BytesSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := store.slot } } }
// 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 IERC165Upgradeable { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC1155/extensions/IERC1155MetadataURI.sol) pragma solidity ^0.8.0; import "../IERC1155Upgradeable.sol"; /** * @dev Interface of the optional ERC1155MetadataExtension interface, as defined * in the https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[EIP]. * * _Available since v3.1._ */ interface IERC1155MetadataURIUpgradeable is IERC1155Upgradeable { /** * @dev Returns the URI for token type `id`. * * If the `\{id\}` substring is present in the URI, it must be replaced by * clients with the actual token type ID. */ function uri(uint256 id) external view returns (string memory); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.17; import {IERC165Upgradeable} from "@zoralabs/openzeppelin-contracts-upgradeable/contracts/interfaces/IERC165Upgradeable.sol"; interface ITransferHookReceiver is IERC165Upgradeable { /// @notice Token transfer batch callback /// @param target target contract for transfer /// @param operator operator address for transfer /// @param from user address for amount transferred /// @param to user address for amount transferred /// @param ids list of token ids transferred /// @param amounts list of values transferred /// @param data data as perscribed by 1155 standard function onTokenTransferBatch( address target, address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) external; /// @notice Token transfer batch callback /// @param target target contract for transfer /// @param operator operator address for transfer /// @param from user address for amount transferred /// @param to user address for amount transferred /// @param id token id transferred /// @param amount value transferred /// @param data data as perscribed by 1155 standard function onTokenTransfer(address target, address operator, address from, address to, uint256 id, uint256 amount, bytes memory data) external; // IERC165 type required }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.17; import {IMinterErrors} from "./IMinterErrors.sol"; interface ILimitedMintPerAddressErrors { error UserExceedsMintLimit(address user, uint256 limit, uint256 requestedAmount); } interface ICreatorRoyaltyErrors { /// @notice Thrown when a user tries to have 100% supply royalties error InvalidMintSchedule(); } interface IZoraCreator1155Errors is ICreatorRoyaltyErrors, ILimitedMintPerAddressErrors, IMinterErrors { error OnlyTransfersFromZoraMints(); error Call_TokenIdMismatch(); error TokenIdMismatch(uint256 expected, uint256 actual); error UserMissingRoleForToken(address user, uint256 tokenId, uint256 role); error Config_TransferHookNotSupported(address proposedAddress); error Mint_InsolventSaleTransfer(); error Mint_ValueTransferFail(); error Mint_TokenIDMintNotAllowed(); error Mint_UnknownCommand(); error Mint_InvalidMintArrayLength(); error Burn_NotOwnerOrApproved(address operator, address user); error NewOwnerNeedsToBeAdmin(); error Sale_CannotCallNonSalesContract(address targetContract); error CallFailed(bytes reason); error Renderer_NotValidRendererContract(); error ETHWithdrawFailed(address recipient, uint256 amount); error FundsWithdrawInsolvent(uint256 amount, uint256 contractValue); error ProtocolRewardsWithdrawFailed(address caller, address recipient, uint256 amount); error CannotMintMoreTokens(uint256 tokenId, uint256 quantity, uint256 totalMinted, uint256 maxSupply); error MintNotYetStarted(); error PremintDeleted(); // DelegatedMinting related errors error InvalidSignatureVersion(); error premintSignerContractNotAContract(); error InvalidSignature(); error InvalidSigner(bytes4 magicValue); error premintSignerContractFailedToRecoverSigner(); error FirstMinterAddressZero(); error ERC1155_MINT_TO_ZERO_ADDRESS(); error InvalidPremintVersion(); error NonEthRedemption(); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.17; /// @notice Creator Commands used by minter modules passed back to the main modules interface ICreatorCommands { /// @notice This enum is used to define supported creator action types. /// This can change in the future enum CreatorActions { // No operation - also the default for mintings that may not return a command NO_OP, // Send ether SEND_ETH, // Mint operation MINT } /// @notice This command is for struct Command { // Method for operation CreatorActions method; // Arguments used for this operation bytes args; } /// @notice This command set is returned from the minter back to the user struct CommandSet { Command[] commands; uint256 at; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.17; /** * @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 IERC165Upgradeable { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (proxy/Proxy.sol) pragma solidity ^0.8.0; /** * @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM * instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to * be specified by overriding the virtual {_implementation} function. * * Additionally, delegation to the implementation can be triggered manually through the {_fallback} function, or to a * different contract through the {_delegate} function. * * The success and return data of the delegated call will be returned back to the caller of the proxy. */ abstract contract Proxy { /** * @dev Delegates the current call to `implementation`. * * This function does not return to its internal call site, it will return directly to the external caller. */ function _delegate(address implementation) internal virtual { assembly { // Copy msg.data. We take full control of memory in this inline assembly // block because it will not return to Solidity code. We overwrite the // Solidity scratch pad at memory position 0. calldatacopy(0, 0, calldatasize()) // Call the implementation. // out and outsize are 0 because we don't know the size yet. let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0) // Copy the returned data. returndatacopy(0, 0, returndatasize()) switch result // delegatecall returns 0 on error. case 0 { revert(0, returndatasize()) } default { return(0, returndatasize()) } } } /** * @dev This is a virtual function that should be overridden so it returns the address to which the fallback function * and {_fallback} should delegate. */ function _implementation() internal view virtual returns (address); /** * @dev Delegates the current call to the address returned by `_implementation()`. * * This function does not return to its internal call site, it will return directly to the external caller. */ function _fallback() internal virtual { _beforeFallback(); _delegate(_implementation()); } /** * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other * function in the contract matches the call data. */ fallback() external payable virtual { _fallback(); } /** * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if call data * is empty. */ receive() external payable virtual { _fallback(); } /** * @dev Hook that is called before falling back to the implementation. Can happen as part of a manual `_fallback` * call, or as part of the Solidity `fallback` or `receive` functions. * * If overridden should call `super._beforeFallback()`. */ function _beforeFallback() internal virtual {} }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (proxy/ERC1967/ERC1967Upgrade.sol) pragma solidity ^0.8.2; import "../beacon/IBeacon.sol"; import "../../interfaces/IERC1967.sol"; import "../../interfaces/draft-IERC1822.sol"; import "../../utils/Address.sol"; import "../../utils/StorageSlot.sol"; /** * @dev This abstract contract provides getters and event emitting update functions for * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots. * * _Available since v4.1._ */ abstract contract ERC1967Upgrade is IERC1967 { // This is the keccak-256 hash of "eip1967.proxy.rollback" subtracted by 1 bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143; /** * @dev Storage slot with the address of the current implementation. * This is the keccak-256 hash of "eip1967.proxy.implementation" subtracted by 1, and is * validated in the constructor. */ bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc; /** * @dev Returns the current implementation address. */ function _getImplementation() internal view returns (address) { return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value; } /** * @dev Stores a new address in the EIP1967 implementation slot. */ function _setImplementation(address newImplementation) private { require(Address.isContract(newImplementation), "ERC1967: new implementation is not a contract"); StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation; } /** * @dev Perform implementation upgrade * * Emits an {Upgraded} event. */ function _upgradeTo(address newImplementation) internal { _setImplementation(newImplementation); emit Upgraded(newImplementation); } /** * @dev Perform implementation upgrade with additional setup call. * * Emits an {Upgraded} event. */ function _upgradeToAndCall(address newImplementation, bytes memory data, bool forceCall) internal { _upgradeTo(newImplementation); if (data.length > 0 || forceCall) { Address.functionDelegateCall(newImplementation, data); } } /** * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call. * * Emits an {Upgraded} event. */ function _upgradeToAndCallUUPS(address newImplementation, bytes memory data, bool forceCall) internal { // Upgrades from old implementations will perform a rollback test. This test requires the new // implementation to upgrade back to the old, non-ERC1822 compliant, implementation. Removing // this special case will break upgrade paths from old UUPS implementation to new ones. if (StorageSlot.getBooleanSlot(_ROLLBACK_SLOT).value) { _setImplementation(newImplementation); } else { try IERC1822Proxiable(newImplementation).proxiableUUID() returns (bytes32 slot) { require(slot == _IMPLEMENTATION_SLOT, "ERC1967Upgrade: unsupported proxiableUUID"); } catch { revert("ERC1967Upgrade: new implementation is not UUPS"); } _upgradeToAndCall(newImplementation, data, forceCall); } } /** * @dev Storage slot with the admin of the contract. * This is the keccak-256 hash of "eip1967.proxy.admin" subtracted by 1, and is * validated in the constructor. */ bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103; /** * @dev Returns the current admin. */ function _getAdmin() internal view returns (address) { return StorageSlot.getAddressSlot(_ADMIN_SLOT).value; } /** * @dev Stores a new address in the EIP1967 admin slot. */ function _setAdmin(address newAdmin) private { require(newAdmin != address(0), "ERC1967: new admin is the zero address"); StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin; } /** * @dev Changes the admin of the proxy. * * Emits an {AdminChanged} event. */ function _changeAdmin(address newAdmin) internal { emit AdminChanged(_getAdmin(), newAdmin); _setAdmin(newAdmin); } /** * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy. * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor. */ bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50; /** * @dev Returns the current beacon. */ function _getBeacon() internal view returns (address) { return StorageSlot.getAddressSlot(_BEACON_SLOT).value; } /** * @dev Stores a new beacon in the EIP1967 beacon slot. */ function _setBeacon(address newBeacon) private { require(Address.isContract(newBeacon), "ERC1967: new beacon is not a contract"); require( Address.isContract(IBeacon(newBeacon).implementation()), "ERC1967: beacon implementation is not a contract" ); StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon; } /** * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that). * * Emits a {BeaconUpgraded} event. */ function _upgradeBeaconToAndCall(address newBeacon, bytes memory data, bool forceCall) internal { _setBeacon(newBeacon); emit BeaconUpgraded(newBeacon); if (data.length > 0 || forceCall) { Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (token/ERC1155/IERC1155.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165Upgradeable.sol"; /** * @dev Required interface of an ERC1155 compliant contract, as defined in the * https://eips.ethereum.org/EIPS/eip-1155[EIP]. * * _Available since v3.1._ */ interface IERC1155Upgradeable is IERC165Upgradeable { /** * @dev Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`. */ event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value); /** * @dev Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all * transfers. */ event TransferBatch( address indexed operator, address indexed from, address indexed to, uint256[] ids, uint256[] values ); /** * @dev Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to * `approved`. */ event ApprovalForAll(address indexed account, address indexed operator, bool approved); /** * @dev Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI. * * If an {URI} event was emitted for `id`, the standard * https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value * returned by {IERC1155MetadataURI-uri}. */ event URI(string value, uint256 indexed id); /** * @dev Returns the amount of tokens of token type `id` owned by `account`. * * Requirements: * * - `account` cannot be the zero address. */ function balanceOf(address account, uint256 id) external view returns (uint256); /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}. * * Requirements: * * - `accounts` and `ids` must have the same length. */ function balanceOfBatch( address[] calldata accounts, uint256[] calldata ids ) external view returns (uint256[] memory); /** * @dev Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`, * * Emits an {ApprovalForAll} event. * * Requirements: * * - `operator` cannot be the caller. */ function setApprovalForAll(address operator, bool approved) external; /** * @dev Returns true if `operator` is approved to transfer ``account``'s tokens. * * See {setApprovalForAll}. */ function isApprovedForAll(address account, address operator) external view returns (bool); /** * @dev Transfers `amount` tokens of token type `id` from `from` to `to`. * * Emits a {TransferSingle} event. * * Requirements: * * - `to` cannot be the zero address. * - If the caller is not `from`, it must have been approved to spend ``from``'s tokens via {setApprovalForAll}. * - `from` must have a balance of tokens of type `id` of at least `amount`. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the * acceptance magic value. */ function safeTransferFrom(address from, address to, uint256 id, uint256 amount, bytes calldata data) external; /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}. * * Emits a {TransferBatch} event. * * Requirements: * * - `ids` and `amounts` must have the same length. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the * acceptance magic value. */ function safeBatchTransferFrom( address from, address to, uint256[] calldata ids, uint256[] calldata amounts, bytes calldata data ) external; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.17; interface IMinterErrors { error CallerNotZoraCreator1155(); error MinterContractAlreadyExists(); error MinterContractDoesNotExist(); error SaleEnded(); error SaleHasNotStarted(); error WrongValueSent(); error InvalidMerkleProof(address mintTo, bytes32[] merkleProof, bytes32 merkleRoot); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (proxy/beacon/IBeacon.sol) pragma solidity ^0.8.0; /** * @dev This is the interface that {BeaconProxy} expects of its beacon. */ interface IBeacon { /** * @dev Must return an address that can be used as a delegate call target. * * {BeaconProxy} will check that this address is a contract. */ function implementation() external view returns (address); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (interfaces/IERC1967.sol) pragma solidity ^0.8.0; /** * @dev ERC-1967: Proxy Storage Slots. This interface contains the events defined in the ERC. * * _Available since v4.8.3._ */ interface IERC1967 { /** * @dev Emitted when the implementation is upgraded. */ event Upgraded(address indexed implementation); /** * @dev Emitted when the admin account has changed. */ event AdminChanged(address previousAdmin, address newAdmin); /** * @dev Emitted when the beacon is changed. */ event BeaconUpgraded(address indexed beacon); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (interfaces/draft-IERC1822.sol) pragma solidity ^0.8.0; /** * @dev ERC1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified * proxy whose upgrades are fully controlled by the current implementation. */ interface IERC1822Proxiable { /** * @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation * address. * * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this * function revert if invoked through a proxy. */ function proxiableUUID() external view returns (bytes32); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.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 * * Furthermore, `isContract` will also return true if the target contract within * the same transaction is already scheduled for destruction by `SELFDESTRUCT`, * which only has an effect at the end of a transaction. * ==== * * [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://consensys.net/diligence/blog/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.8.0/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 functionCallWithValue(target, data, 0, "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"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResultFromTarget(target, 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) { (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResultFromTarget(target, 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) { (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract. * * _Available since v4.8._ */ function verifyCallResultFromTarget( address target, bool success, bytes memory returndata, string memory errorMessage ) internal view returns (bytes memory) { if (success) { if (returndata.length == 0) { // only check isContract if the call was successful and the return data is empty // otherwise we already know that it was a contract require(isContract(target), "Address: call to non-contract"); } return returndata; } else { _revert(returndata, errorMessage); } } /** * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason or 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 { _revert(returndata, errorMessage); } } function _revert(bytes memory returndata, string memory errorMessage) private pure { // 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 (last updated v4.9.0) (utils/StorageSlot.sol) // This file was procedurally generated from scripts/generate/templates/StorageSlot.js. pragma solidity ^0.8.0; /** * @dev Library for reading and writing primitive types to specific storage slots. * * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts. * This library helps with reading and writing to such slots without the need for inline assembly. * * The functions in this library return Slot structs that contain a `value` member that can be used to read or write. * * Example usage to set ERC1967 implementation slot: * ```solidity * contract ERC1967 { * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc; * * function _getImplementation() internal view returns (address) { * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value; * } * * function _setImplementation(address newImplementation) internal { * require(Address.isContract(newImplementation), "ERC1967: new implementation is not a contract"); * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation; * } * } * ``` * * _Available since v4.1 for `address`, `bool`, `bytes32`, `uint256`._ * _Available since v4.9 for `string`, `bytes`._ */ library StorageSlot { struct AddressSlot { address value; } struct BooleanSlot { bool value; } struct Bytes32Slot { bytes32 value; } struct Uint256Slot { uint256 value; } struct StringSlot { string value; } struct BytesSlot { bytes value; } /** * @dev Returns an `AddressSlot` with member `value` located at `slot`. */ function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `BooleanSlot` with member `value` located at `slot`. */ function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `Bytes32Slot` with member `value` located at `slot`. */ function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `Uint256Slot` with member `value` located at `slot`. */ function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `StringSlot` with member `value` located at `slot`. */ function getStringSlot(bytes32 slot) internal pure returns (StringSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `StringSlot` representation of the string storage pointer `store`. */ function getStringSlot(string storage store) internal pure returns (StringSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := store.slot } } /** * @dev Returns an `BytesSlot` with member `value` located at `slot`. */ function getBytesSlot(bytes32 slot) internal pure returns (BytesSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `BytesSlot` representation of the bytes storage pointer `store`. */ function getBytesSlot(bytes storage store) internal pure returns (BytesSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := store.slot } } }
{ "remappings": [ "ds-test/=node_modules/ds-test/src/", "forge-std/=node_modules/forge-std/src/", "@zoralabs/openzeppelin-contracts-upgradeable/=node_modules/@zoralabs/openzeppelin-contracts-upgradeable/", "@zoralabs/protocol-rewards/src/=node_modules/@zoralabs/protocol-rewards/src/", "@zoralabs/zora-1155-contracts/src/=node_modules/@zoralabs/zora-1155-contracts/src/", "@zoralabs/mints-contracts/src/=node_modules/@zoralabs/mints-contracts/src/", "@zoralabs/shared-contracts/=node_modules/@zoralabs/shared-contracts/src/", "@openzeppelin/contracts/=node_modules/@openzeppelin/contracts/", "_imagine/=node_modules/@zoralabs/zora-1155-contracts/_imagine/", "solemate/=/node_modules/solemate/src/", "solady/=node_modules/solady/src/", "solmate/=node_modules/solmate/" ], "optimizer": { "enabled": true, "runs": 50 }, "metadata": { "useLiteralContent": false, "bytecodeHash": "ipfs" }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "evmVersion": "london", "viaIR": true, "libraries": { "node_modules/@zoralabs/zora-1155-contracts/src/delegation/ZoraCreator1155Attribution.sol": { "DelegatedTokenCreation": "0xFcF3ca72CC92f26aF413923280c64cB4e8290C2E" } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"contract IZoraCreator1155","name":"_zora1155Impl","type":"address"},{"internalType":"contract IMinter1155","name":"_merkleMinter","type":"address"},{"internalType":"contract IMinter1155","name":"_fixedPriceMinter","type":"address"},{"internalType":"contract IMinter1155","name":"_redeemMinterFactory","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"ADDRESS_DELEGATECALL_TO_NON_CONTRACT","type":"error"},{"inputs":[],"name":"ADDRESS_LOW_LEVEL_CALL_FAILED","type":"error"},{"inputs":[],"name":"Constructor_ImplCannotBeZero","type":"error"},{"inputs":[],"name":"ERC1967_NEW_IMPL_NOT_CONTRACT","type":"error"},{"inputs":[],"name":"ERC1967_NEW_IMPL_NOT_UUPS","type":"error"},{"inputs":[],"name":"ERC1967_UNSUPPORTED_PROXIABLEUUID","type":"error"},{"inputs":[],"name":"FUNCTION_MUST_BE_CALLED_THROUGH_ACTIVE_PROXY","type":"error"},{"inputs":[],"name":"FUNCTION_MUST_BE_CALLED_THROUGH_DELEGATECALL","type":"error"},{"inputs":[],"name":"INITIALIZABLE_CONTRACT_ALREADY_INITIALIZED","type":"error"},{"inputs":[],"name":"INITIALIZABLE_CONTRACT_IS_NOT_INITIALIZING","type":"error"},{"inputs":[],"name":"ONLY_OWNER","type":"error"},{"inputs":[],"name":"ONLY_PENDING_OWNER","type":"error"},{"inputs":[],"name":"OWNER_CANNOT_BE_ZERO_ADDRESS","type":"error"},{"inputs":[],"name":"UUPS_UPGRADEABLE_MUST_NOT_BE_CALLED_THROUGH_DELEGATECALL","type":"error"},{"inputs":[{"internalType":"string","name":"expected","type":"string"},{"internalType":"string","name":"actual","type":"string"}],"name":"UpgradeToMismatchedContractName","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"previousAdmin","type":"address"},{"indexed":false,"internalType":"address","name":"newAdmin","type":"address"}],"name":"AdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"beacon","type":"address"}],"name":"BeaconUpgraded","type":"event"},{"anonymous":false,"inputs":[],"name":"FactorySetup","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint8","name":"version","type":"uint8"}],"name":"Initialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"canceledOwner","type":"address"}],"name":"OwnerCanceled","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"pendingOwner","type":"address"}],"name":"OwnerPending","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"prevOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnerUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"newContract","type":"address"},{"indexed":true,"internalType":"address","name":"creator","type":"address"},{"indexed":true,"internalType":"address","name":"defaultAdmin","type":"address"},{"indexed":false,"internalType":"string","name":"contractURI","type":"string"},{"indexed":false,"internalType":"string","name":"name","type":"string"},{"components":[{"internalType":"uint32","name":"royaltyMintSchedule","type":"uint32"},{"internalType":"uint32","name":"royaltyBPS","type":"uint32"},{"internalType":"address","name":"royaltyRecipient","type":"address"}],"indexed":false,"internalType":"struct ICreatorRoyaltiesControl.RoyaltyConfiguration","name":"defaultRoyaltyConfiguration","type":"tuple"}],"name":"SetupNewContract","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"implementation","type":"address"}],"name":"Upgraded","type":"event"},{"inputs":[],"name":"acceptOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"cancelOwnershipTransfer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"contractName","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"contractURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"contractVersion","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"string","name":"newContractURI","type":"string"},{"internalType":"string","name":"name","type":"string"},{"components":[{"internalType":"uint32","name":"royaltyMintSchedule","type":"uint32"},{"internalType":"uint32","name":"royaltyBPS","type":"uint32"},{"internalType":"address","name":"royaltyRecipient","type":"address"}],"internalType":"struct ICreatorRoyaltiesControl.RoyaltyConfiguration","name":"defaultRoyaltyConfiguration","type":"tuple"},{"internalType":"address payable","name":"defaultAdmin","type":"address"},{"internalType":"bytes[]","name":"setupActions","type":"bytes[]"}],"name":"createContract","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"newContractURI","type":"string"},{"internalType":"string","name":"name","type":"string"},{"components":[{"internalType":"uint32","name":"royaltyMintSchedule","type":"uint32"},{"internalType":"uint32","name":"royaltyBPS","type":"uint32"},{"internalType":"address","name":"royaltyRecipient","type":"address"}],"internalType":"struct ICreatorRoyaltiesControl.RoyaltyConfiguration","name":"defaultRoyaltyConfiguration","type":"tuple"},{"internalType":"address payable","name":"defaultAdmin","type":"address"},{"internalType":"bytes[]","name":"setupActions","type":"bytes[]"}],"name":"createContractDeterministic","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"defaultMinters","outputs":[{"internalType":"contract IMinter1155[]","name":"minters","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"msgSender","type":"address"},{"internalType":"string","name":"newContractURI","type":"string"},{"internalType":"string","name":"name","type":"string"},{"internalType":"address","name":"contractAdmin","type":"address"}],"name":"deterministicContractAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"msgSender","type":"address"},{"internalType":"string","name":"newContractURI","type":"string"},{"internalType":"string","name":"name","type":"string"},{"internalType":"address","name":"contractAdmin","type":"address"},{"internalType":"bytes[]","name":"setupActions","type":"bytes[]"}],"name":"deterministicContractAddressWithSetupActions","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"fixedPriceMinter","outputs":[{"internalType":"contract IMinter1155","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"implementation","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_initialOwner","type":"address"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"merkleMinter","outputs":[{"internalType":"contract IMinter1155","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pendingOwner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"proxiableUUID","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"redeemMinterFactory","outputs":[{"internalType":"contract IMinter1155","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"resignOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_newOwner","type":"address"}],"name":"safeTransferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newImplementation","type":"address"}],"name":"upgradeTo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newImplementation","type":"address"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"upgradeToAndCall","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"zora1155Impl","outputs":[{"internalType":"contract IZoraCreator1155","name":"","type":"address"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
61012034620001dc57601f6200271838819003918201601f1916830191906001600160401b03831184841017620001e1578160809285926040958652833981010312620001dc578151916001600160a01b03831690818403620001dc576200006a60208201620001f7565b6200008560606200007d868501620001f7565b9301620001f7565b94306080526034549360ff8560081c16159485801590620001cf575b80620001b5575b620001a45760ff1981166001176034558562000191575b5015620001805760a05260c05260e05261010092835262000145575b5161250b91826200020d8339608051828181610b3501528181610c6f0152611057015260a051828181610683015281816107ff0152611414015260c0518281816105b20152610a36015260e05182818161098e01526109ff0152518181816103c40152610a6d0152f35b61ff0019603454166034557f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024986020825160018152a1620000db565b845163e3e8010d60e01b8152600490fd5b61ffff19166101011760345538620000bf565b8651633d5c224160e11b8152600490fd5b50303b151580620000a85750600160ff82161415620000a8565b5060ff81161515620000a1565b600080fd5b634e487b7160e01b600052604160045260246000fd5b51906001600160a01b0382168203620001dc5756fe608060405260043610156200001357600080fd5b60003560e01c80630582823a146200136d57806323452b9c14620013085780633659cfe6146200102d578063395db2cd1462000fb95780634f1ef2861462000c2a578063516f7ed21462000b8f57806352d1902d1462000b205780635c60da1b1462000ae7578063695b0d2614620009bd57806370369613146200097657806370b1cafb146200071357806375d0c0dc14620006b2578063786d90db146200066b57806379ba5097146200060c5780638da5cb5b14620005e1578063961bbb7b146200059a578063a0a8e460146200054d578063c4d66de814620003f3578063e1e78e5e14620003ac578063e30c39781462000381578063e5fc0a0014620002b5578063e8a3d485146200020e578063ed0c709114620001ac5763f2fde38b146200013d57600080fd5b34620001a7576020366003190112620001a7576200015a620014f5565b6001600160a01b038181161562000195576000541633036200018357620001819062001ba3565b005b60405163d238ed5960e01b8152600490fd5b604051631627621f60e11b8152600490fd5b600080fd5b34620001a7576000366003190112620001a7576000546001600160a01b03808216338190036200018357600090600080516020620024b68339815191528280a36001600160a01b03199182166000556001549081166200020857005b16600155005b34620001a7576000366003190112620001a75760405160608101908082106001600160401b038311176200029f576200029b91604052602f81527f68747470733a2f2f6769746875622e636f6d2f6f75727a6f72612f7a6f72612d60208201526e313135352d636f6e7472616374732f60881b604082015260405191829160208352602083019062001678565b0390f35b634e487b7160e01b600052604160045260246000fd5b34620001a75760a0366003190112620001a757620002d2620014f5565b6001600160401b0390602435828111620001a757620002f69036906004016200146b565b929091604435828111620001a757620003149036906004016200146b565b6200031e6200150c565b91608435948511620001a75736602386011215620001a7576020966200036f96620003626200035c620003699836906024816004013591016200169f565b620017c1565b9562001a50565b62001c1c565b6040516001600160a01b039091168152f35b34620001a7576000366003190112620001a7576001546040516001600160a01b039091168152602090f35b34620001a7576000366003190112620001a7576040517f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168152602090f35b34620001a7576020366003190112620001a75762000410620014f5565b6034549060ff8260081c1615918280159062000540575b8062000526575b620005145760ff1981166001176034558262000501575b506001600160a01b0316801562000195576034549060ff8260081c1615620004f057600080546001600160a01b03191682178155600080516020620024b68339815191528180a3604051917f6a656eb613551e803db1baa3e77facd3bc45e8256f27f4cf09a50cf63b88a933600080a1620004bc57005b61ff001916603455600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb384740249890602090a1005b6040516296bfb160e81b8152600490fd5b61ffff1916610101176034558262000445565b604051633d5c224160e11b8152600490fd5b50303b1515806200042e5750600160ff821614156200042e565b5060ff8116151562000427565b34620001a7576000366003190112620001a7576200029b6040516200057281620014b7565b6006815265322e31302e3160d01b602082015260405191829160208352602083019062001678565b34620001a7576000366003190112620001a7576040517f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168152602090f35b34620001a7576000366003190112620001a7576000546040516001600160a01b039091168152602090f35b34620001a7576000366003190112620001a7576001546001600160a01b0390811633036200065957339060005416600080516020620024b6833981519152600080a3620001813362001ba3565b60405163065cd53160e01b8152600490fd5b34620001a7576000366003190112620001a7576040517f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168152602090f35b34620001a7576000366003190112620001a7576200029b604051620006d781620014b7565b601a8152795a4f5241203131353520436f6e747261637420466163746f727960301b602082015260405191829160208352602083019062001678565b34620001a75760e0366003190112620001a7576001600160401b03600435818111620001a757620007499036906004016200146b565b9091602435818111620001a757620007669036906004016200146b565b9190936060604319360112620001a7576200078062001590565b9160c435908111620001a7576200079c903690600401620015a7565b929091620007c9620007b46200035c3687876200169f565b6001600160a01b038416878a8a863362001a50565b946103f260405190620007e06020820183620014d3565b80825262001cb260208301396200086e60206040519260018060a01b037f000000000000000000000000000000000000000000000000000000000000000016828501528184526200083184620014b7565b60405193816200084b869351809286808701910162001653565b8201620008618251809386808501910162001653565b01038084520182620014d3565b866200087962001bee565b6020815191016000f5966001600160a01b038816156200093d57600091620008a2839262001c1c565b9882602083519301915af1620008b762001761565b508062000932575b15620008f5576020976001600160a01b0390961696620008ed9690620008e53662001523565b9389620018a7565b604051908152f35b60405162461bcd60e51b815260206004820152601560248201527412539255125053125690551253d397d19052531151605a1b6044820152606490fd5b50853b1515620008bf565b60405162461bcd60e51b81526020600482015260116024820152701111541313d65351539517d19052531151607a1b6044820152606490fd5b34620001a7576000366003190112620001a7576040517f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168152602090f35b34620001a7576000366003190112620001a757604051620009de816200149b565b60038152602090818101606036823781511562000ad1576001600160a01b037f00000000000000000000000000000000000000000000000000000000000000008116825282516001949193919085101562000ad157837f000000000000000000000000000000000000000000000000000000000000000016604083015281516002101562000ad15791928491817f00000000000000000000000000000000000000000000000000000000000000001660608201526040519380850191818652518092526040850195926000905b83821062000ab95786880387f35b84518116885296820196938201939085019062000aab565b634e487b7160e01b600052603260045260246000fd5b34620001a7576000366003190112620001a75760008051602062002496833981519152546040516001600160a01b039091168152602090f35b34620001a7576000366003190112620001a7577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316300362000b7d576020604051600080516020620024968339815191528152f35b604051635e4c25f160e01b8152600490fd5b34620001a7576080366003190112620001a75762000bac620014f5565b6001600160401b03602435818111620001a75762000bcf9036906004016200146b565b9092604435838111620001a75762000bec9036906004016200146b565b62000bf66200150c565b91604051946020860196868810908811176200029f576020976200036262000369976200036f9960405260008152620017c1565b600319604036820112620001a75762000c42620014f5565b6024356001600160401b038111620001a75762000c6490369060040162001632565b916001600160a01b037f000000000000000000000000000000000000000000000000000000000000000081169030821462000fa7576000805160206200249683398151915291818354160362000f955780600054163303620001835783169060405192631d74303760e21b80855260008560048183885af194851562000f1e5760009562000f74575b50604051818152600081600481305afa90811562000f1e5760009162000f55575b508551602080970120908681519101200362000e6e5750507f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd91435460ff161562000d605750505062000181915062001718565b6040516352d1902d60e01b81528381600481865afa6000918162000e39575b5062000d975760405163e5ec176960e01b8152600490fd5b0362000e275762000da88362001718565b604051907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b600080a283511580159062000e1e575b62000de457005b823b1562000e0f57508260009283926200018195519201905af462000e0862001761565b9062001796565b63369891e760e01b8152600490fd5b50600162000ddd565b6040516308373ebf60e41b8152600490fd5b9091508481813d831162000e66575b62000e548183620014d3565b81010312620001a75751908762000d7f565b503d62000e48565b8360405191808352600083600481305afa92831562000f1e5760009362000f2a575b5060009160048392604051948593849283525af192831562000f1e5762000ee29362000ef29260009162000ef6575b5060405194859463a23cbf7b60e01b865260406004870152604486019062001678565b9184830301602485015262001678565b0390fd5b62000f1791503d806000833e62000f0e8183620014d3565b81019062001b3b565b8562000ebf565b6040513d6000823e3d90fd5b600092908392945062000f4a6004913d8086833e62000f0e8183620014d3565b949250509162000e90565b62000f6d91503d806000833e62000f0e8183620014d3565b8862000d0e565b62000f8d9195503d806000833e62000f0e8183620014d3565b938762000ced565b6040516364cd8d1960e01b8152600490fd5b604051631932df4560e01b8152600490fd5b34620001a7576020366003190112620001a7576001600160a01b038062000fdf620014f5565b169081156200019557600054168033036200018357600180546001600160a01b031916831790557f4f2638f5949b9614ef8d5e268cb51348ad7f434a34812bf64b6e95014fbd357e600080a3005b34620001a75760031960203682018113620001a7576200104c620014f5565b916001600160a01b037f00000000000000000000000000000000000000000000000000000000000000008116919030831462000fa7576000805160206200249683398151915292818454160362000f9557806000541633036200018357841690604051631d74303760e21b9081815260008160048183885af190811562000f1e57600091620012e9575b5060405190828252600082600481305afa91821562000f1e57600092620012c8575b5086815191012090868151910120036200125657505060405191838301938385106001600160401b038611176200029f57846040526000845260ff7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd914354166000146200116e575050505050620001819062001718565b6040516352d1902d60e01b8152908082600481875afa91829160009362001220575b5050620011a95760405163e5ec176960e01b8152600490fd5b0362000e2757620011ba8462001718565b604051907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b600080a281511580159062001217575b620011f657005b833b1562000e0f57506200018192600092839251915af462000e0862001761565b506000620011ef565b9080929350813d83116200124e575b6200123b8183620014d3565b81010312620001a7575190878062001190565b503d6200122f565b8260405191808352600083600481305afa92831562000f1e5760009362000f2a575060009160048392604051948593849283525af192831562000f1e5762000ee29362000ef29260009162000ef6575060405194859463a23cbf7b60e01b865260406004870152604486019062001678565b620012e19192503d806000833e62000f0e8183620014d3565b9088620010f8565b6200130191503d806000833e62000f0e8183620014d3565b87620010d6565b34620001a7576000366003190112620001a7576000546001600160a01b03908116338190036200018357600154918216907f682679deecef4dcd49674845cc1e3a075fea9073680aa445a8207d5a4bdea3da600080a36001600160a01b031916600155005b34620001a75760e0366003190112620001a7576001600160401b03600435818111620001a757620013a39036906004016200146b565b91602435818111620001a757620013bf9036906004016200146b565b620013cd9391933662001523565b90620013d862001590565b60c435858111620001a757620013f3903690600401620015a7565b9390926040516103f280820198828a10908a11176200029f57620020a482397f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03908116895297819003602001906000f097881562000f1e5760209962001462978a620018a7565b60405191168152f35b9181601f84011215620001a7578235916001600160401b038311620001a75760208381860195010111620001a757565b608081019081106001600160401b038211176200029f57604052565b604081019081106001600160401b038211176200029f57604052565b90601f801991011681019081106001600160401b038211176200029f57604052565b600435906001600160a01b0382168203620001a757565b606435906001600160a01b0382168203620001a757565b6060906043190112620001a75760405190606082018281106001600160401b038211176200029f576040528163ffffffff6044358181168103620001a75782526064359081168103620001a7576020820152608435906001600160a01b0382168203620001a75760400152565b60a435906001600160a01b0382168203620001a757565b9181601f84011215620001a7578235916001600160401b038311620001a7576020808501948460051b010111620001a757565b6001600160401b0381116200029f57601f01601f191660200190565b9291926200160482620015da565b91620016146040519384620014d3565b829481845281830111620001a7578281602093846000960137010152565b9080601f83011215620001a7578160206200165093359101620015f6565b90565b60005b838110620016675750506000910152565b818101518382015260200162001656565b90602091620016938151809281855285808601910162001653565b601f01601f1916010190565b9092916001600160401b038085116200029f578460051b6040519360208095620016cc82850182620014d3565b809881520191810193808511620001a75781925b858410620016f15750505050505050565b8335858111620001a75787916200170c848493870162001632565b815201930192620016e0565b803b156200174f576000805160206200249683398151915280546001600160a01b0319166001600160a01b03909216919091179055565b60405163529880eb60e01b8152600490fd5b3d1562001791573d906200177582620015da565b91620017856040519384620014d3565b82523d6000602084013e565b606090565b156200179f5790565b805115620017af57805190602001fd5b6040516350a28c9b60e11b8152600490fd5b805160009190620017d3575050600090565b9060405190816020938482019460408301908087528251809252606084018160608460051b870101940195905b83821062001827575050505062001821925003601f198101835282620014d3565b51902090565b9160019193955080620018468196605f198b8203018652895162001678565b9701920192018694929593919562001800565b908060209392818452848401376000828201840152601f01601f1916010190565b805163ffffffff9081168352602080830151909116908301526040908101516001600160a01b0316910152565b9794929390919796959660018060a01b038091169716906040519460a0865282620018d760a088018c8762001859565b968a7fa45800684f65ae010ceb4385eceaed88dec7f6a6bcbe11f7ffd8bd24dd2653f46200191060209a8481038c860152878762001859565b9262001920604082018b6200187a565b8033940390a4883b15620001a7576200197b60e09a62001966620019879360049b9997969560409b999b519e8f9d8e6322823ad360e21b8152015260e48d019162001859565b9060031995868c84030160248d015262001859565b9660448901906200187a565b60a48701528585030160c486015281845280840193818360051b82010194846000925b858410620019e757505050505050509181600081819503925af1801562000f1e57620019d35750565b6001600160401b0381116200029f57604052565b9193959750919395601f198282030184528735601e1984360301811215620001a75783018681019190356001600160401b038111620001a7578036038313620001a75762001a3b8892839260019562001859565b990194019401918997969491959395620019aa565b9495939291841562001ad55762001a7f929162001a6f913691620015f6565b60208151910120923691620015f6565b602081519101209060405193602085019560018060a01b0380921687521660408501526060840152608083015260a082015260a0815260c081018181106001600160401b038211176200029f5760405251902090565b62001aea9394509062001a6f913691620015f6565b602081519101209060405192602084019460018060a01b038092168652166040840152606083015260808201526080815260a081018181106001600160401b038211176200029f5760405251902090565b602081830312620001a7578051906001600160401b038211620001a7570181601f82011215620001a757805162001b7281620015da565b9262001b826040519485620014d3565b81845260208284010111620001a75762001650916020808501910162001653565b6000549060018060a01b0380911680828416600080516020620024b6833981519152600080a36001600160a01b03199283161760005560015490811662001be8575050565b16600155565b6040519062001bfd82620014b7565b601082526f67363d3d37363d34f03d5260086018f360801b6020830152565b62001c2662001bee565b6020815191012060405190602082019260ff60f81b84523060601b6021840152603583015260558201526055815262001c5f816200149b565b5190206040516135a560f21b6020820190815260609290921b6001600160601b0319166022820152600160f81b6036820152601781529062001ca182620014b7565b905190206001600160a01b03169056fe60406080815234610222576103f290813803918261001c81610227565b938492833960209384918101031261022257516001600160a01b03811692838203610222578251916001600160401b03908284018281118582101761020c57808652600096878652823b156101b2577f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80546001600160a01b031916821790557fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b8880a28451158015906101ab575b6100dd575b855160d190816103218239f35b8551946060860186811085821117610197578752602786527f416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c85870152660819985a5b195960ca1b86880152518791829190845af4913d15610186573d90811161017257610166959661015885601f19601f85011601610227565b91825281943d92013e61024c565b508038808080806100d0565b634e487b7160e01b87526041600452602487fd5b50915061016693945060609161024c565b634e487b7160e01b89526041600452602489fd5b50866100cb565b865162461bcd60e51b815260048101869052602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b6064820152608490fd5b634e487b7160e01b600052604160045260246000fd5b600080fd5b6040519190601f01601f191682016001600160401b0381118382101761020c57604052565b919290156102ae5750815115610260575090565b3b156102695790565b60405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606490fd5b8251909150156102c15750805190602001fd5b6040519062461bcd60e51b82528160208060048301528251908160248401526000935b828510610307575050604492506000838284010152601f80199101168101030190fd5b84810182015186860160440152938101938593506102e456fe608060405236156054577f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc54600090819081906001600160a01b0316368280378136915af43d82803e156050573d90f35b3d90fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc54600090819081906001600160a01b0316368280378136915af43d82803e156050573d90f3fea2646970667358221220d7ecf0f892b2bed76a5d05c6a34519f038f3782dbc124a10ad6a33c8a565e3a164736f6c6343000811003360406080815234610222576103f290813803918261001c81610227565b938492833960209384918101031261022257516001600160a01b03811692838203610222578251916001600160401b03908284018281118582101761020c57808652600096878652823b156101b2577f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80546001600160a01b031916821790557fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b8880a28451158015906101ab575b6100dd575b855160d190816103218239f35b8551946060860186811085821117610197578752602786527f416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c85870152660819985a5b195960ca1b86880152518791829190845af4913d15610186573d90811161017257610166959661015885601f19601f85011601610227565b91825281943d92013e61024c565b508038808080806100d0565b634e487b7160e01b87526041600452602487fd5b50915061016693945060609161024c565b634e487b7160e01b89526041600452602489fd5b50866100cb565b865162461bcd60e51b815260048101869052602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b6064820152608490fd5b634e487b7160e01b600052604160045260246000fd5b600080fd5b6040519190601f01601f191682016001600160401b0381118382101761020c57604052565b919290156102ae5750815115610260575090565b3b156102695790565b60405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606490fd5b8251909150156102c15750805190602001fd5b6040519062461bcd60e51b82528160208060048301528251908160248401526000935b828510610307575050604492506000838284010152601f80199101168101030190fd5b84810182015186860160440152938101938593506102e456fe608060405236156054577f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc54600090819081906001600160a01b0316368280378136915af43d82803e156050573d90f35b3d90fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc54600090819081906001600160a01b0316368280378136915af43d82803e156050573d90f3fea2646970667358221220d7ecf0f892b2bed76a5d05c6a34519f038f3782dbc124a10ad6a33c8a565e3a164736f6c63430008110033360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc8292fce18fa69edf4db7b94ea2e58241df0ae57f97e0a6c9b29067028bf92d76a2646970667358221220c8a761db5bff0bce04cb79af5fcc71722a7a93dc818c9b637f971dc067567e0d64736f6c63430008110033000000000000000000000000370a413874bde3f40028a3e9bbfc4ca19666f94d000000000000000000000000b9c997fcc46a27331cc986cc2416ee99c1d506c30000000000000000000000003eb144aee170bf62fda1536e38af51f08e34a5d00000000000000000000000007a0de1b1f5420df5d946878fbe2cf109011be614
Deployed Bytecode
0x608060405260043610156200001357600080fd5b60003560e01c80630582823a146200136d57806323452b9c14620013085780633659cfe6146200102d578063395db2cd1462000fb95780634f1ef2861462000c2a578063516f7ed21462000b8f57806352d1902d1462000b205780635c60da1b1462000ae7578063695b0d2614620009bd57806370369613146200097657806370b1cafb146200071357806375d0c0dc14620006b2578063786d90db146200066b57806379ba5097146200060c5780638da5cb5b14620005e1578063961bbb7b146200059a578063a0a8e460146200054d578063c4d66de814620003f3578063e1e78e5e14620003ac578063e30c39781462000381578063e5fc0a0014620002b5578063e8a3d485146200020e578063ed0c709114620001ac5763f2fde38b146200013d57600080fd5b34620001a7576020366003190112620001a7576200015a620014f5565b6001600160a01b038181161562000195576000541633036200018357620001819062001ba3565b005b60405163d238ed5960e01b8152600490fd5b604051631627621f60e11b8152600490fd5b600080fd5b34620001a7576000366003190112620001a7576000546001600160a01b03808216338190036200018357600090600080516020620024b68339815191528280a36001600160a01b03199182166000556001549081166200020857005b16600155005b34620001a7576000366003190112620001a75760405160608101908082106001600160401b038311176200029f576200029b91604052602f81527f68747470733a2f2f6769746875622e636f6d2f6f75727a6f72612f7a6f72612d60208201526e313135352d636f6e7472616374732f60881b604082015260405191829160208352602083019062001678565b0390f35b634e487b7160e01b600052604160045260246000fd5b34620001a75760a0366003190112620001a757620002d2620014f5565b6001600160401b0390602435828111620001a757620002f69036906004016200146b565b929091604435828111620001a757620003149036906004016200146b565b6200031e6200150c565b91608435948511620001a75736602386011215620001a7576020966200036f96620003626200035c620003699836906024816004013591016200169f565b620017c1565b9562001a50565b62001c1c565b6040516001600160a01b039091168152f35b34620001a7576000366003190112620001a7576001546040516001600160a01b039091168152602090f35b34620001a7576000366003190112620001a7576040517f0000000000000000000000007a0de1b1f5420df5d946878fbe2cf109011be6146001600160a01b03168152602090f35b34620001a7576020366003190112620001a75762000410620014f5565b6034549060ff8260081c1615918280159062000540575b8062000526575b620005145760ff1981166001176034558262000501575b506001600160a01b0316801562000195576034549060ff8260081c1615620004f057600080546001600160a01b03191682178155600080516020620024b68339815191528180a3604051917f6a656eb613551e803db1baa3e77facd3bc45e8256f27f4cf09a50cf63b88a933600080a1620004bc57005b61ff001916603455600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb384740249890602090a1005b6040516296bfb160e81b8152600490fd5b61ffff1916610101176034558262000445565b604051633d5c224160e11b8152600490fd5b50303b1515806200042e5750600160ff821614156200042e565b5060ff8116151562000427565b34620001a7576000366003190112620001a7576200029b6040516200057281620014b7565b6006815265322e31302e3160d01b602082015260405191829160208352602083019062001678565b34620001a7576000366003190112620001a7576040517f000000000000000000000000b9c997fcc46a27331cc986cc2416ee99c1d506c36001600160a01b03168152602090f35b34620001a7576000366003190112620001a7576000546040516001600160a01b039091168152602090f35b34620001a7576000366003190112620001a7576001546001600160a01b0390811633036200065957339060005416600080516020620024b6833981519152600080a3620001813362001ba3565b60405163065cd53160e01b8152600490fd5b34620001a7576000366003190112620001a7576040517f000000000000000000000000370a413874bde3f40028a3e9bbfc4ca19666f94d6001600160a01b03168152602090f35b34620001a7576000366003190112620001a7576200029b604051620006d781620014b7565b601a8152795a4f5241203131353520436f6e747261637420466163746f727960301b602082015260405191829160208352602083019062001678565b34620001a75760e0366003190112620001a7576001600160401b03600435818111620001a757620007499036906004016200146b565b9091602435818111620001a757620007669036906004016200146b565b9190936060604319360112620001a7576200078062001590565b9160c435908111620001a7576200079c903690600401620015a7565b929091620007c9620007b46200035c3687876200169f565b6001600160a01b038416878a8a863362001a50565b946103f260405190620007e06020820183620014d3565b80825262001cb260208301396200086e60206040519260018060a01b037f000000000000000000000000370a413874bde3f40028a3e9bbfc4ca19666f94d16828501528184526200083184620014b7565b60405193816200084b869351809286808701910162001653565b8201620008618251809386808501910162001653565b01038084520182620014d3565b866200087962001bee565b6020815191016000f5966001600160a01b038816156200093d57600091620008a2839262001c1c565b9882602083519301915af1620008b762001761565b508062000932575b15620008f5576020976001600160a01b0390961696620008ed9690620008e53662001523565b9389620018a7565b604051908152f35b60405162461bcd60e51b815260206004820152601560248201527412539255125053125690551253d397d19052531151605a1b6044820152606490fd5b50853b1515620008bf565b60405162461bcd60e51b81526020600482015260116024820152701111541313d65351539517d19052531151607a1b6044820152606490fd5b34620001a7576000366003190112620001a7576040517f0000000000000000000000003eb144aee170bf62fda1536e38af51f08e34a5d06001600160a01b03168152602090f35b34620001a7576000366003190112620001a757604051620009de816200149b565b60038152602090818101606036823781511562000ad1576001600160a01b037f0000000000000000000000003eb144aee170bf62fda1536e38af51f08e34a5d08116825282516001949193919085101562000ad157837f000000000000000000000000b9c997fcc46a27331cc986cc2416ee99c1d506c316604083015281516002101562000ad15791928491817f0000000000000000000000007a0de1b1f5420df5d946878fbe2cf109011be6141660608201526040519380850191818652518092526040850195926000905b83821062000ab95786880387f35b84518116885296820196938201939085019062000aab565b634e487b7160e01b600052603260045260246000fd5b34620001a7576000366003190112620001a75760008051602062002496833981519152546040516001600160a01b039091168152602090f35b34620001a7576000366003190112620001a7577f000000000000000000000000f4bf58f869c42d99d7f7ac3868b606239a6345266001600160a01b0316300362000b7d576020604051600080516020620024968339815191528152f35b604051635e4c25f160e01b8152600490fd5b34620001a7576080366003190112620001a75762000bac620014f5565b6001600160401b03602435818111620001a75762000bcf9036906004016200146b565b9092604435838111620001a75762000bec9036906004016200146b565b62000bf66200150c565b91604051946020860196868810908811176200029f576020976200036262000369976200036f9960405260008152620017c1565b600319604036820112620001a75762000c42620014f5565b6024356001600160401b038111620001a75762000c6490369060040162001632565b916001600160a01b037f000000000000000000000000f4bf58f869c42d99d7f7ac3868b606239a63452681169030821462000fa7576000805160206200249683398151915291818354160362000f955780600054163303620001835783169060405192631d74303760e21b80855260008560048183885af194851562000f1e5760009562000f74575b50604051818152600081600481305afa90811562000f1e5760009162000f55575b508551602080970120908681519101200362000e6e5750507f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd91435460ff161562000d605750505062000181915062001718565b6040516352d1902d60e01b81528381600481865afa6000918162000e39575b5062000d975760405163e5ec176960e01b8152600490fd5b0362000e275762000da88362001718565b604051907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b600080a283511580159062000e1e575b62000de457005b823b1562000e0f57508260009283926200018195519201905af462000e0862001761565b9062001796565b63369891e760e01b8152600490fd5b50600162000ddd565b6040516308373ebf60e41b8152600490fd5b9091508481813d831162000e66575b62000e548183620014d3565b81010312620001a75751908762000d7f565b503d62000e48565b8360405191808352600083600481305afa92831562000f1e5760009362000f2a575b5060009160048392604051948593849283525af192831562000f1e5762000ee29362000ef29260009162000ef6575b5060405194859463a23cbf7b60e01b865260406004870152604486019062001678565b9184830301602485015262001678565b0390fd5b62000f1791503d806000833e62000f0e8183620014d3565b81019062001b3b565b8562000ebf565b6040513d6000823e3d90fd5b600092908392945062000f4a6004913d8086833e62000f0e8183620014d3565b949250509162000e90565b62000f6d91503d806000833e62000f0e8183620014d3565b8862000d0e565b62000f8d9195503d806000833e62000f0e8183620014d3565b938762000ced565b6040516364cd8d1960e01b8152600490fd5b604051631932df4560e01b8152600490fd5b34620001a7576020366003190112620001a7576001600160a01b038062000fdf620014f5565b169081156200019557600054168033036200018357600180546001600160a01b031916831790557f4f2638f5949b9614ef8d5e268cb51348ad7f434a34812bf64b6e95014fbd357e600080a3005b34620001a75760031960203682018113620001a7576200104c620014f5565b916001600160a01b037f000000000000000000000000f4bf58f869c42d99d7f7ac3868b606239a6345268116919030831462000fa7576000805160206200249683398151915292818454160362000f9557806000541633036200018357841690604051631d74303760e21b9081815260008160048183885af190811562000f1e57600091620012e9575b5060405190828252600082600481305afa91821562000f1e57600092620012c8575b5086815191012090868151910120036200125657505060405191838301938385106001600160401b038611176200029f57846040526000845260ff7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd914354166000146200116e575050505050620001819062001718565b6040516352d1902d60e01b8152908082600481875afa91829160009362001220575b5050620011a95760405163e5ec176960e01b8152600490fd5b0362000e2757620011ba8462001718565b604051907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b600080a281511580159062001217575b620011f657005b833b1562000e0f57506200018192600092839251915af462000e0862001761565b506000620011ef565b9080929350813d83116200124e575b6200123b8183620014d3565b81010312620001a7575190878062001190565b503d6200122f565b8260405191808352600083600481305afa92831562000f1e5760009362000f2a575060009160048392604051948593849283525af192831562000f1e5762000ee29362000ef29260009162000ef6575060405194859463a23cbf7b60e01b865260406004870152604486019062001678565b620012e19192503d806000833e62000f0e8183620014d3565b9088620010f8565b6200130191503d806000833e62000f0e8183620014d3565b87620010d6565b34620001a7576000366003190112620001a7576000546001600160a01b03908116338190036200018357600154918216907f682679deecef4dcd49674845cc1e3a075fea9073680aa445a8207d5a4bdea3da600080a36001600160a01b031916600155005b34620001a75760e0366003190112620001a7576001600160401b03600435818111620001a757620013a39036906004016200146b565b91602435818111620001a757620013bf9036906004016200146b565b620013cd9391933662001523565b90620013d862001590565b60c435858111620001a757620013f3903690600401620015a7565b9390926040516103f280820198828a10908a11176200029f57620020a482397f000000000000000000000000370a413874bde3f40028a3e9bbfc4ca19666f94d6001600160a01b03908116895297819003602001906000f097881562000f1e5760209962001462978a620018a7565b60405191168152f35b9181601f84011215620001a7578235916001600160401b038311620001a75760208381860195010111620001a757565b608081019081106001600160401b038211176200029f57604052565b604081019081106001600160401b038211176200029f57604052565b90601f801991011681019081106001600160401b038211176200029f57604052565b600435906001600160a01b0382168203620001a757565b606435906001600160a01b0382168203620001a757565b6060906043190112620001a75760405190606082018281106001600160401b038211176200029f576040528163ffffffff6044358181168103620001a75782526064359081168103620001a7576020820152608435906001600160a01b0382168203620001a75760400152565b60a435906001600160a01b0382168203620001a757565b9181601f84011215620001a7578235916001600160401b038311620001a7576020808501948460051b010111620001a757565b6001600160401b0381116200029f57601f01601f191660200190565b9291926200160482620015da565b91620016146040519384620014d3565b829481845281830111620001a7578281602093846000960137010152565b9080601f83011215620001a7578160206200165093359101620015f6565b90565b60005b838110620016675750506000910152565b818101518382015260200162001656565b90602091620016938151809281855285808601910162001653565b601f01601f1916010190565b9092916001600160401b038085116200029f578460051b6040519360208095620016cc82850182620014d3565b809881520191810193808511620001a75781925b858410620016f15750505050505050565b8335858111620001a75787916200170c848493870162001632565b815201930192620016e0565b803b156200174f576000805160206200249683398151915280546001600160a01b0319166001600160a01b03909216919091179055565b60405163529880eb60e01b8152600490fd5b3d1562001791573d906200177582620015da565b91620017856040519384620014d3565b82523d6000602084013e565b606090565b156200179f5790565b805115620017af57805190602001fd5b6040516350a28c9b60e11b8152600490fd5b805160009190620017d3575050600090565b9060405190816020938482019460408301908087528251809252606084018160608460051b870101940195905b83821062001827575050505062001821925003601f198101835282620014d3565b51902090565b9160019193955080620018468196605f198b8203018652895162001678565b9701920192018694929593919562001800565b908060209392818452848401376000828201840152601f01601f1916010190565b805163ffffffff9081168352602080830151909116908301526040908101516001600160a01b0316910152565b9794929390919796959660018060a01b038091169716906040519460a0865282620018d760a088018c8762001859565b968a7fa45800684f65ae010ceb4385eceaed88dec7f6a6bcbe11f7ffd8bd24dd2653f46200191060209a8481038c860152878762001859565b9262001920604082018b6200187a565b8033940390a4883b15620001a7576200197b60e09a62001966620019879360049b9997969560409b999b519e8f9d8e6322823ad360e21b8152015260e48d019162001859565b9060031995868c84030160248d015262001859565b9660448901906200187a565b60a48701528585030160c486015281845280840193818360051b82010194846000925b858410620019e757505050505050509181600081819503925af1801562000f1e57620019d35750565b6001600160401b0381116200029f57604052565b9193959750919395601f198282030184528735601e1984360301811215620001a75783018681019190356001600160401b038111620001a7578036038313620001a75762001a3b8892839260019562001859565b990194019401918997969491959395620019aa565b9495939291841562001ad55762001a7f929162001a6f913691620015f6565b60208151910120923691620015f6565b602081519101209060405193602085019560018060a01b0380921687521660408501526060840152608083015260a082015260a0815260c081018181106001600160401b038211176200029f5760405251902090565b62001aea9394509062001a6f913691620015f6565b602081519101209060405192602084019460018060a01b038092168652166040840152606083015260808201526080815260a081018181106001600160401b038211176200029f5760405251902090565b602081830312620001a7578051906001600160401b038211620001a7570181601f82011215620001a757805162001b7281620015da565b9262001b826040519485620014d3565b81845260208284010111620001a75762001650916020808501910162001653565b6000549060018060a01b0380911680828416600080516020620024b6833981519152600080a36001600160a01b03199283161760005560015490811662001be8575050565b16600155565b6040519062001bfd82620014b7565b601082526f67363d3d37363d34f03d5260086018f360801b6020830152565b62001c2662001bee565b6020815191012060405190602082019260ff60f81b84523060601b6021840152603583015260558201526055815262001c5f816200149b565b5190206040516135a560f21b6020820190815260609290921b6001600160601b0319166022820152600160f81b6036820152601781529062001ca182620014b7565b905190206001600160a01b03169056fe60406080815234610222576103f290813803918261001c81610227565b938492833960209384918101031261022257516001600160a01b03811692838203610222578251916001600160401b03908284018281118582101761020c57808652600096878652823b156101b2577f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80546001600160a01b031916821790557fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b8880a28451158015906101ab575b6100dd575b855160d190816103218239f35b8551946060860186811085821117610197578752602786527f416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c85870152660819985a5b195960ca1b86880152518791829190845af4913d15610186573d90811161017257610166959661015885601f19601f85011601610227565b91825281943d92013e61024c565b508038808080806100d0565b634e487b7160e01b87526041600452602487fd5b50915061016693945060609161024c565b634e487b7160e01b89526041600452602489fd5b50866100cb565b865162461bcd60e51b815260048101869052602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b6064820152608490fd5b634e487b7160e01b600052604160045260246000fd5b600080fd5b6040519190601f01601f191682016001600160401b0381118382101761020c57604052565b919290156102ae5750815115610260575090565b3b156102695790565b60405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606490fd5b8251909150156102c15750805190602001fd5b6040519062461bcd60e51b82528160208060048301528251908160248401526000935b828510610307575050604492506000838284010152601f80199101168101030190fd5b84810182015186860160440152938101938593506102e456fe608060405236156054577f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc54600090819081906001600160a01b0316368280378136915af43d82803e156050573d90f35b3d90fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc54600090819081906001600160a01b0316368280378136915af43d82803e156050573d90f3fea2646970667358221220d7ecf0f892b2bed76a5d05c6a34519f038f3782dbc124a10ad6a33c8a565e3a164736f6c6343000811003360406080815234610222576103f290813803918261001c81610227565b938492833960209384918101031261022257516001600160a01b03811692838203610222578251916001600160401b03908284018281118582101761020c57808652600096878652823b156101b2577f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80546001600160a01b031916821790557fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b8880a28451158015906101ab575b6100dd575b855160d190816103218239f35b8551946060860186811085821117610197578752602786527f416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c85870152660819985a5b195960ca1b86880152518791829190845af4913d15610186573d90811161017257610166959661015885601f19601f85011601610227565b91825281943d92013e61024c565b508038808080806100d0565b634e487b7160e01b87526041600452602487fd5b50915061016693945060609161024c565b634e487b7160e01b89526041600452602489fd5b50866100cb565b865162461bcd60e51b815260048101869052602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b6064820152608490fd5b634e487b7160e01b600052604160045260246000fd5b600080fd5b6040519190601f01601f191682016001600160401b0381118382101761020c57604052565b919290156102ae5750815115610260575090565b3b156102695790565b60405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606490fd5b8251909150156102c15750805190602001fd5b6040519062461bcd60e51b82528160208060048301528251908160248401526000935b828510610307575050604492506000838284010152601f80199101168101030190fd5b84810182015186860160440152938101938593506102e456fe608060405236156054577f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc54600090819081906001600160a01b0316368280378136915af43d82803e156050573d90f35b3d90fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc54600090819081906001600160a01b0316368280378136915af43d82803e156050573d90f3fea2646970667358221220d7ecf0f892b2bed76a5d05c6a34519f038f3782dbc124a10ad6a33c8a565e3a164736f6c63430008110033360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc8292fce18fa69edf4db7b94ea2e58241df0ae57f97e0a6c9b29067028bf92d76a2646970667358221220c8a761db5bff0bce04cb79af5fcc71722a7a93dc818c9b637f971dc067567e0d64736f6c63430008110033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000370a413874bde3f40028a3e9bbfc4ca19666f94d000000000000000000000000b9c997fcc46a27331cc986cc2416ee99c1d506c30000000000000000000000003eb144aee170bf62fda1536e38af51f08e34a5d00000000000000000000000007a0de1b1f5420df5d946878fbe2cf109011be614
-----Decoded View---------------
Arg [0] : _zora1155Impl (address): 0x370A413874Bde3F40028A3E9BBFC4cA19666F94D
Arg [1] : _merkleMinter (address): 0xB9C997FcC46a27331CC986cc2416ee99C1d506c3
Arg [2] : _fixedPriceMinter (address): 0x3EB144aee170BF62FdA1536e38aF51f08e34A5D0
Arg [3] : _redeemMinterFactory (address): 0x7A0dE1B1f5420Df5D946878fBe2cF109011BE614
-----Encoded View---------------
4 Constructor Arguments found :
Arg [0] : 000000000000000000000000370a413874bde3f40028a3e9bbfc4ca19666f94d
Arg [1] : 000000000000000000000000b9c997fcc46a27331cc986cc2416ee99c1d506c3
Arg [2] : 0000000000000000000000003eb144aee170bf62fda1536e38af51f08e34a5d0
Arg [3] : 0000000000000000000000007a0de1b1f5420df5d946878fbe2cf109011be614
Loading...
Loading
Loading...
Loading
Loading...
Loading
Loading...
Loading
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.