Source Code
Overview
APE Balance
APE Value
$0.00Multichain Info
N/A
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Cross-Chain Transactions
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:
Creator1155FactoryImpl
Compiler Version
v0.8.25+commit.b61c2a91
Optimization Enabled:
Yes with 200 runs
Other Settings:
cancun EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.17;
import { Initializable } from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";
import { UUPSUpgradeable } from "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol";
import { ICreator1155Factory } from "../interfaces/ICreator1155Factory.sol";
import { ICreator1155Initializer } from "../interfaces/ICreator1155Initializer.sol";
import { ICreator1155 } from "../interfaces/ICreator1155.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 { FactoryManagedUpgradeGate } from "../upgrades/FactoryManagedUpgradeGate.sol";
import { Freee1155 } from "../proxies/Freee1155.sol";
import { ContractVersionBase } from "../version/ContractVersionBase.sol";
/// @title Creator1155FactoryImpl
/// @notice Factory contract for creating new Creator1155 contracts
contract Creator1155FactoryImpl is
ICreator1155Factory,
ContractVersionBase,
FactoryManagedUpgradeGate,
UUPSUpgradeable,
IContractMetadata
{
ICreator1155 public immutable implementation;
IMinter1155 public immutable merkleMinter;
IMinter1155 public immutable fixedPriceMinter;
IMinter1155 public immutable redeemMinterFactory;
constructor(
ICreator1155 _implementation,
IMinter1155 _merkleMinter,
IMinter1155 _fixedPriceMinter,
IMinter1155 _redeemMinterFactory
)
initializer
{
implementation = _implementation;
if (address(implementation) == address(0)) {
revert Constructor_ImplCannotBeZero();
}
merkleMinter = _merkleMinter;
fixedPriceMinter = _fixedPriceMinter;
redeemMinterFactory = _redeemMinterFactory;
}
/// @notice The name of the sale strategy
function contractName() external pure returns (string memory) {
return "Freee 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 Creator1155 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)
{
address newContract = address(new Freee1155(address(implementation)));
emit SetupNewContract({
newContract: address(newContract),
creator: msg.sender,
defaultAdmin: defaultAdmin,
contractURI: newContractURI,
name: name,
defaultRoyaltyConfiguration: defaultRoyaltyConfiguration
});
ICreator1155Initializer(newContract).initialize(
name, newContractURI, defaultRoyaltyConfiguration, defaultAdmin, setupActions
);
return address(newContract);
}
/// ///
/// 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());
}
}
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.9.0) (proxy/utils/Initializable.sol)
pragma solidity ^0.8.2;
import "../../utils/AddressUpgradeable.sol";
/**
* @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;
require(
(isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1),
"Initializable: contract is 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) {
require(!_initializing && _initialized < version, "Initializable: contract is 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() {
require(_initializing, "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 {
require(!_initializing, "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.9.0) (proxy/utils/UUPSUpgradeable.sol)
pragma solidity ^0.8.0;
import "../../interfaces/draft-IERC1822Upgradeable.sol";
import "../ERC1967/ERC1967UpgradeUpgradeable.sol";
import "./Initializable.sol";
/**
* @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() {
require(address(this) != __self, "Function must be called through delegatecall");
require(_getImplementation() == __self, "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() {
require(address(this) == __self, "UUPSUpgradeable: 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 "./IVersionedContract.sol";
/// @notice Factory for 1155 contracts
interface ICreator1155Factory 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);
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 ICreator1155Initializer {
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 "@openzeppelin/contracts-upgradeable/interfaces/IERC165Upgradeable.sol";
import { IERC1155MetadataURIUpgradeable } from
"@openzeppelin/contracts-upgradeable/interfaces/IERC1155MetadataURIUpgradeable.sol";
import { ICreator1155TypesV1 } from "../nft/ICreator1155TypesV1.sol";
import { IRenderer1155 } from "../interfaces/IRenderer1155.sol";
import { IMinter1155 } from "../interfaces/IMinter1155.sol";
import { IOwnable } from "../interfaces/IOwnable.sol";
import { IVersionedContract } from "./IVersionedContract.sol";
import { ICreatorRoyaltiesControl } from "../interfaces/ICreatorRoyaltiesControl.sol";
/// @notice Main interface for the Creator1155 contract
interface ICreator1155 is ICreator1155TypesV1, IVersionedContract, IOwnable, IERC1155MetadataURIUpgradeable {
function PERMISSION_BIT_ADMIN() external returns (uint256);
function PERMISSION_BIT_MINTER() external returns (uint256);
function PERMISSION_BIT_SALES() external returns (uint256);
function PERMISSION_BIT_METADATA() 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 CollectionSizeReduced(address indexed updater, uint256 indexed tokenId, uint256 indexed newSize);
event UpdatedToken(address indexed from, uint256 indexed tokenId, TokenData tokenData);
event SetupNewToken(uint256 indexed tokenId, address indexed sender, string newURI, uint256 maxSupply);
event SetupSoulbound(uint256 indexed tokenId, bool isSoulbound);
function setOwner(address newOwner) external;
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
);
event AdminMinted(address indexed sender, address indexed recipient, uint256 indexed tokenId, uint256 quantity);
event AdminMintedBatch(address indexed sender, address indexed minter, uint256[] tokenIds, uint256[] quantities);
error TokenIdMismatch(uint256 expected, uint256 actual);
error UserMissingRoleForToken(address user, uint256 tokenId, uint256 role);
error InvalidCollectionSize();
error Config_TransferHookNotSupported(address proposedAddress);
error Mint_InsolventSaleTransfer();
error Mint_ValueTransferFail();
error Mint_TokenIDMintNotAllowed();
error Mint_UnknownCommand();
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 CannotMintMoreTokens(uint256 tokenId, uint256 quantity, uint256 totalMinted, uint256 maxSupply);
error Call_TokenIdMismatch();
error Transfer_NotAllowed();
/// @notice Only allow minting one token id at time
/// @dev Mint contract function that calls the underlying sales function for commands
/// @param minter Address for the minter
/// @param tokenId tokenId to mint, set to 0 for new tokenId
/// @param quantity to mint
/// @param minterArguments calldata for the minter contracts
function mint(
IMinter1155 minter,
uint256 tokenId,
uint256 quantity,
bytes calldata minterArguments
)
external
payable;
function adminMint(address recipient, uint256 tokenId, uint256 quantity, bytes memory data) external;
function adminMintBatch(
address recipient,
uint256[] memory tokenIds,
uint256[] memory quantities,
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
/// @param isSoulbound Whether the token is soulbound
function setupNewToken(string memory tokenURI, uint256 maxSupply, bool isSoulbound) external returns (uint256 tokenId);
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;
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 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 Thrown when a user tries to have 100% supply royalties
error InvalidMintSchedule();
/// @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 { IERC165Upgradeable } from "@openzeppelin/contracts-upgradeable/interfaces/IERC165Upgradeable.sol";
import { ICreatorCommands } from "./ICreatorCommands.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;
interface IContractMetadata {
/// @notice Contract name returns the pretty contract name
function contractName() 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 "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";
/// @title Ownable
/// @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 { IFactoryManagedUpgradeGate } from "../interfaces/IFactoryManagedUpgradeGate.sol";
import { Ownable2StepUpgradeable } from "../utils/ownable/Ownable2StepUpgradeable.sol";
import { FactoryManagedUpgradeGateStorageV1 } from "./FactoryManagedUpgradeGateStorageV1.sol";
/// @title FactoryManagedUpgradeGate
/// @notice Contract for managing upgrades and safe upgrade paths for 1155 contracts
abstract contract FactoryManagedUpgradeGate is
IFactoryManagedUpgradeGate,
Ownable2StepUpgradeable,
FactoryManagedUpgradeGateStorageV1
{
/// ///
/// CREATOR TOKEN UPGRADES ///
/// ///
/// @notice If an implementation is registered by the Builder DAO as an optional upgrade
/// @param baseImpl The base implementation address
/// @param upgradeImpl The upgrade implementation address
function isRegisteredUpgradePath(address baseImpl, address upgradeImpl) public view returns (bool) {
return isAllowedUpgrade[baseImpl][upgradeImpl];
}
/// @notice Called by the Builder DAO to offer implementation upgrades for created DAOs
/// @param baseImpls The base implementation addresses
/// @param upgradeImpl The upgrade implementation address
function registerUpgradePath(address[] memory baseImpls, address upgradeImpl) public onlyOwner {
unchecked {
for (uint256 i = 0; i < baseImpls.length; ++i) {
isAllowedUpgrade[baseImpls[i]][upgradeImpl] = true;
emit UpgradeRegistered(baseImpls[i], upgradeImpl);
}
}
}
/// @notice Called by the Builder DAO to remove an upgrade
/// @param baseImpl The base implementation address
/// @param upgradeImpl The upgrade implementation address
function removeUpgradePath(address baseImpl, address upgradeImpl) public onlyOwner {
delete isAllowedUpgrade[baseImpl][upgradeImpl];
emit UpgradeRemoved(baseImpl, upgradeImpl);
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.17;
import { ERC1967Proxy } from "@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol";
import { IContractMetadata } from "../interfaces/IContractMetadata.sol";
contract Freee1155 is ERC1967Proxy, IContractMetadata {
constructor(address _lgc) ERC1967Proxy(_lgc, "") { }
/// @notice The name of contract
function contractName() external pure override returns (string memory) {
return "Freee 1155 Proxy";
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.17;
import { IVersionedContract } from "../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.1.0";
}
}// 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 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.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.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.9.0) (proxy/ERC1967/ERC1967Upgrade.sol)
pragma solidity ^0.8.2;
import "../beacon/IBeaconUpgradeable.sol";
import "../../interfaces/IERC1967Upgradeable.sol";
import "../../interfaces/draft-IERC1822Upgradeable.sol";
import "../../utils/AddressUpgradeable.sol";
import "../../utils/StorageSlotUpgradeable.sol";
import "../utils/Initializable.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 ERC1967UpgradeUpgradeable is Initializable, IERC1967Upgradeable {
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 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 {
require(AddressUpgradeable.isContract(newImplementation), "ERC1967: new implementation is not a 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) {
AddressUpgradeable.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) {
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 StorageSlotUpgradeable.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");
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 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 {
require(AddressUpgradeable.isContract(newBeacon), "ERC1967: new beacon is not a contract");
require(
AddressUpgradeable.isContract(IBeaconUpgradeable(newBeacon).implementation()),
"ERC1967: beacon implementation is not a 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) {
AddressUpgradeable.functionDelegateCall(IBeaconUpgradeable(newBeacon).implementation(), data);
}
}
/**
* @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 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";
/// @notice Interface for types used across the Creator1155 contract
interface ICreator1155TypesV1 {
/// @notice Used to store individual token data
struct TokenData {
string uri;
uint256 maxSupply;
uint256 totalMinted;
bool isSoulbound;
}
/// @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 { IERC165Upgradeable } from "@openzeppelin/contracts-upgradeable/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
// 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;
/// @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;
/// @title IOwnable2StepUpgradeable
/// @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;
/// @notice Factory Upgrade Gate Admin Factory Implementation – Allows specific contract upgrades as a safety measure
interface IFactoryManagedUpgradeGate {
/// @notice If an implementation is registered by the Builder DAO as an optional upgrade
/// @param baseImpl The base implementation address
/// @param upgradeImpl The upgrade implementation address
function isRegisteredUpgradePath(address baseImpl, address upgradeImpl) external view returns (bool);
/// @notice Called by the Builder DAO to offer implementation upgrades for created DAOs
/// @param baseImpls The base implementation addresses
/// @param upgradeImpl The upgrade implementation address
function registerUpgradePath(address[] memory baseImpls, address upgradeImpl) external;
/// @notice Called by the Builder DAO to remove an upgrade
/// @param baseImpl The base implementation address
/// @param upgradeImpl The upgrade implementation address
function removeUpgradePath(address baseImpl, address upgradeImpl) external;
event UpgradeRegistered(address indexed baseImpl, address indexed upgradeImpl);
event UpgradeRemoved(address indexed baseImpl, address indexed upgradeImpl);
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.17;
abstract contract FactoryManagedUpgradeGateStorageV1 {
mapping(address => mapping(address => bool)) public isAllowedUpgrade;
uint256[50] private __gap;
}// 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: 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.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 IERC1967Upgradeable {
/**
* @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.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 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 "@openzeppelin/contracts-upgradeable/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;
// IERC165 type required
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)
pragma solidity ^0.8.0;
/**
* @dev Interface of the ERC165 standard, as defined in the
* https://eips.ethereum.org/EIPS/eip-165[EIP].
*
* Implementers can declare support of contract interfaces, which can then be
* queried by others ({ERC165Checker}).
*
* For an implementation, see {ERC165}.
*/
interface IERC165 {
/**
* @dev Returns true if this contract implements the interface defined by
* `interfaceId`. See the corresponding
* https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]
* to learn more about how these ids are created.
*
* This function call must use less than 30 000 gas.
*/
function supportsInterface(bytes4 interfaceId) external view returns (bool);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (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.9.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
// 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": [
"@openzeppelin/contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts/",
"@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/",
"forge-std/=lib/forge-std/src/",
"ds-test/=lib/solmate/lib/ds-test/src/",
"erc4626-tests/=lib/openzeppelin-contracts/lib/erc4626-tests/",
"openzeppelin-contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/",
"openzeppelin-contracts/=lib/openzeppelin-contracts/",
"openzeppelin/=lib/openzeppelin-contracts/contracts/",
"solmate/=lib/solmate/src/"
],
"optimizer": {
"enabled": true,
"runs": 200
},
"metadata": {
"useLiteralContent": false,
"bytecodeHash": "ipfs",
"appendCBOR": true
},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
},
"evmVersion": "cancun",
"viaIR": true,
"libraries": {}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"contract ICreator1155","name":"_implementation","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":"Constructor_ImplCannotBeZero","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":[{"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":"baseImpl","type":"address"},{"indexed":true,"internalType":"address","name":"upgradeImpl","type":"address"}],"name":"UpgradeRegistered","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"baseImpl","type":"address"},{"indexed":true,"internalType":"address","name":"upgradeImpl","type":"address"}],"name":"UpgradeRemoved","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":"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":[],"name":"defaultMinters","outputs":[{"internalType":"contract IMinter1155[]","name":"minters","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":"contract ICreator1155","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_initialOwner","type":"address"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"isAllowedUpgrade","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"baseImpl","type":"address"},{"internalType":"address","name":"upgradeImpl","type":"address"}],"name":"isRegisteredUpgradePath","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","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":[{"internalType":"address[]","name":"baseImpls","type":"address[]"},{"internalType":"address","name":"upgradeImpl","type":"address"}],"name":"registerUpgradePath","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"baseImpl","type":"address"},{"internalType":"address","name":"upgradeImpl","type":"address"}],"name":"removeUpgradePath","outputs":[],"stateMutability":"nonpayable","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"}]Contract Creation Code
6101203461020857601f61201b38819003918201601f1916830191906001600160401b0383118484101761020c5781608092859260409586528339810103126102085781516001600160a01b038116928382036102085761006260208201610220565b6100796060610072868501610220565b9301610220565b94306080526034549360ff8560081c1615948580966101fb575b80156101e4575b156101895760ff19811660011760345585610177575b5060a052156101665760c05260e05261010092835261012c575b51611de6918261023583396080518281816108b7015281816109e30152610e98015260a0518281816108760152611365015260c0518281816104ab01526107b4015260e051828181610702015261077e01525181818161029001526107ea0152f35b61ff0019603454166034557f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024986020825160018152a16100ca565b835163e3e8010d60e01b8152600490fd5b61ffff1916610101176034555f6100b0565b865162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608490fd5b50303b15801561009a5750600160ff82161461009a565b50600160ff821610610093565b5f80fd5b634e487b7160e01b5f52604160045260245ffd5b51906001600160a01b03821682036102085756fe60806040526004361015610011575f80fd5b5f3560e01c80630582823a1461124757806321f7434714610db557806323452b9c146111e85780633659cfe614610e73578063395db2cd14610e075780634dc5b7c714610db55780634f1ef2861461096757806352d1902d146108a55780635c60da1b14610861578063695b0d261461073157806370369613146106ed57806375d0c0dc1461069057806379ba50971461063b5780638da5cb5b1461061457806392b60a4c146104da578063961bbb7b14610496578063a0a8e4601461044d578063c4d66de8146102bf578063e1e78e5e1461027b578063e30c397814610253578063ed0c7091146101fb578063f0fad9911461017b5763f2fde38b14610116575f80fd5b346101775760203660031901126101775761012f611628565b6001600160a01b0381811615610165575f5416330361015357610151906117eb565b005b60405163d238ed5960e01b8152600490fd5b604051631627621f60e11b8152600490fd5b5f80fd5b3461017757604036600319011261017757610194611628565b61019c61163e565b5f5490916001600160a01b03918216330361015357811690815f52603560205260405f20921691825f5260205260405f2060ff1981541690557f0ebd98f6f75e38ba2f0751378f5c86205cafca83e206cb62795f45fcea7283335f80a3005b34610177575f366003190112610177575f546001600160a01b0380821633819003610153575f905f80516020611d918339815191528280a36001600160a01b03199182165f5560015490811661024d57005b16600155005b34610177575f366003190112610177576001546040516001600160a01b039091168152602090f35b34610177575f366003190112610177576040517f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168152602090f35b34610177576020366003190112610177576102d8611628565b6034549060ff8260081c161591828093610440575b8015610429575b156103cd5760ff198116600117603455826103bb575b506001600160a01b03168015610165576103596034549160ff8360081c169061033282611830565b5f80546001600160a01b031916821781555f80516020611d918339815191528180a3611830565b604051917f6a656eb613551e803db1baa3e77facd3bc45e8256f27f4cf09a50cf63b88a9335f80a161038757005b61ff001916603455600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb384740249890602090a1005b61ffff1916610101176034558261030a565b60405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608490fd5b50303b1580156102f45750600160ff8216146102f4565b50600160ff8216106102ed565b34610177575f3660031901126101775761049260405161046c816115ec565b60058152640322e312e360dc1b602082015260405191829160208352602083019061166f565b0390f35b34610177575f366003190112610177576040517f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168152602090f35b34610177576040366003190112610177576004356001600160401b038082116101775736602383011215610177578160040135908111610600578060051b916020926040519261052c85830185611607565b83526024848401918301019136831161017757602401905b8282106105e15750505061055661163e565b5f549091906001600160a01b0390811633036101535790918116905f5b835181101561015157808261058a60019387611775565b51165f526035865260405f20845f52865260405f208260ff1982541617905583836105b58388611775565b51167fab6a7dc54721d6a1a284ca865830f8981d6f12fbddb3618d1774b71c003680595f80a301610573565b81356001600160a01b0381168103610177578152908401908401610544565b634e487b7160e01b5f52604160045260245ffd5b34610177575f366003190112610177575f546040516001600160a01b039091168152602090f35b34610177575f366003190112610177576001546001600160a01b03908116330361067e5733905f54165f80516020611d918339815191525f80a3610151336117eb565b60405163065cd53160e01b8152600490fd5b34610177575f366003190112610177576104926040516106af816115ec565b601b81527f4672656565203131353520436f6e747261637420466163746f72790000000000602082015260405191829160208352602083019061166f565b34610177575f366003190112610177576040517f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168152602090f35b34610177575f36600319011261017757604051608081018181106001600160401b03821117610600576040526003815260209060208101606036823781511561084d576001600160a01b037f00000000000000000000000000000000000000000000000000000000000000008116825282516001949193919085101561084d57837f000000000000000000000000000000000000000000000000000000000000000016604083015281516002101561084d5791928491817f000000000000000000000000000000000000000000000000000000000000000016606082015260405193602085019160208652518092526040850195925f905b8382106108365786880387f35b845181168852968201969382019390850190610829565b634e487b7160e01b5f52603260045260245ffd5b34610177575f366003190112610177576040517f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168152602090f35b34610177575f366003190112610177577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031630036108fc5760206040515f80516020611d718339815191528152f35b60405162461bcd60e51b815260206004820152603860248201527f555550535570677261646561626c653a206d757374206e6f742062652063616c60448201527f6c6564207468726f7567682064656c656761746563616c6c00000000000000006064820152608490fd5b6003196040368201126101775761097c611628565b60249182356001600160401b0381116101775736602382011215610177578060040135916109a983611654565b906109b76040519283611607565b838252602093848301933688838301011161017757815f92898893018737840101526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000811690610a11308314156116b3565b610a2d5f80516020611d71833981519152928284541614611714565b805f5416330361015357604051631d74303760e21b80825291881693905f8160048183895af1908115610d4f575f91610d9b575b50604051908382525f82600481305afa918215610d4f575f92610d7f575b508881519101209088815191012003610cad5750507f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd91435460ff1615610acd5750505050506101519150611890565b60409592939495516352d1902d60e01b81528681600481865afa5f9181610c7e575b50610b4f5760405162461bcd60e51b815260048101889052602e818a01527f45524331393637557067726164653a206e657720696d706c656d656e7461746960448201526d6f6e206973206e6f74205555505360901b6064820152608490fd5b9691929395949603610c295750610b6582611890565b7fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b5f80a2825115801590610c21575b610b9a57005b5f806101519560405195610bad876115d1565b602787527f416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c86880152660819985a5b195960ca1b60408801525190845af4903d15610c18573d610bfc81611654565b90610c0a6040519283611607565b81525f81943d92013e61191f565b6060925061191f565b506001610b94565b8360296084926040519262461bcd60e51b845260048401528201527f45524331393637557067726164653a20756e737570706f727465642070726f786044820152681a58589b195555525160ba1b6064820152fd5b9091508781813d8311610ca6575b610c968183611607565b8101031261017757519089610aef565b503d610c8c565b88939250604051918083525f83600481305afa928315610d4f575f93610d5a575b505f929360048492604051958693849283525af18015610d4f57610d1994610d27935f92610d2b575b5060405195869563a23cbf7b60e01b875260406004880152604487019061166f565b92858403019085015261166f565b0390fd5b610d489192503d805f833e610d408183611607565b810190611789565b9086610cf7565b6040513d5f823e3d90fd5b5f9350936004610d758593963d8086833e610d408183611607565b9450509390610cce565b610d949192503d805f833e610d408183611607565b908b610a7f565b610daf91503d805f833e610d408183611607565b8a610a61565b3461017757604036600319011261017757610dce611628565b610dd661163e565b9060018060a01b038091165f52603560205260405f2091165f52602052602060ff60405f2054166040519015158152f35b34610177576020366003190112610177576001600160a01b0380610e29611628565b16908115610165575f541680330361015357600180546001600160a01b031916831790557f4f2638f5949b9614ef8d5e268cb51348ad7f434a34812bf64b6e95014fbd357e5f80a3005b34610177576003196020368201811361017757610e8e611628565b6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000081169391929190610eca308614156116b3565b610ee65f80516020611d71833981519152958287541614611714565b805f5416330361015357831690604051631d74303760e21b908181525f8160048183885af1908115610d4f575f916111ce575b50604051908282525f82600481305afa918215610d4f575f926111b2575b5085815191012090858151910120036110fa57505060405190828201948286106001600160401b0387111761060057856040525f835260ff7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd914354165f14610fa657505050506101519150611890565b6040516352d1902d60e01b8152939492938581600481865afa5f91816110cb575b506110285760405162461bcd60e51b815260048101879052602e60248201527f45524331393637557067726164653a206e657720696d706c656d656e7461746960448201526d6f6e206973206e6f74205555505360901b6064820152608490fd5b949394036110745761103982611890565b7fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b5f80a282511580159061106d57610b9a57005b505f610b94565b60405162461bcd60e51b815260048101849052602960248201527f45524331393637557067726164653a20756e737570706f727465642070726f786044820152681a58589b195555525160ba1b6064820152608490fd5b9091508681813d83116110f3575b6110e38183611607565b8101031261017757519088610fc7565b503d6110d9565b82604051918083525f83600481305afa928315610d4f575f9361118c575b505f9160048392604051948593849283525af1928315610d4f5761116393610d27925f91611172575b5060405194859463a23cbf7b60e01b865260406004870152604486019061166f565b9184830301602485015261166f565b61118691503d805f833e610d408183611607565b85611141565b5f9290839294506111a86004913d8086833e610d408183611607565b9492505091611118565b6111c79192503d805f833e610d408183611607565b9088610f37565b6111e291503d805f833e610d408183611607565b87610f19565b34610177575f366003190112610177575f546001600160a01b039081163381900361015357600154918216907f682679deecef4dcd49674845cc1e3a075fea9073680aa445a8207d5a4bdea3da5f80a36001600160a01b031916600155005b346101775760e0366003190112610177576004356001600160401b038111610177576112779036906004016115a4565b6024356001600160401b038111610177576112969036906004016115a4565b929060603660431901126101775760e060405263ffffffff60443581811681036101775760805260643590811681036101775760a0526084356001600160a01b03811681036101775760c05260a435916001600160a01b0383168303610177576001600160401b0360c435116101775736602360c435011215610177576001600160401b0360c43560040135116101775736602460c4356004013560051b60c43501011161017757604051806103b88101106001600160401b036103b883011117610600576103b86119b982397f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166103b88201908152819003602001905ff0938415610d4f5760405160a081526113cc6113bd60a083018486611693565b82810360208401528886611693565b6080805163ffffffff908116604085015260a05116606084015260c0516001600160a01b031690830152906001600160a01b03868116923392918916917fa45800684f65ae010ceb4385eceaed88dec7f6a6bcbe11f7ffd8bd24dd2653f49181900390a46001600160a01b0385163b15610177576040516322823ad360e21b815260e0600482015295611479936114679160e4890191611693565b86810360031901602488015291611693565b60805163ffffffff908116604486015260a05116606485015260c0516001600160a01b03166084850152906001600160a01b031660a48401528281036003190160c480850191909152600490359081013580835260051b82016020908101928592602401918101905f5b60c43560040135811061153e5750505050805f9203818360018060a01b0386165af18015610d4f57611525575b6040516001600160a01b039091168152602090f35b6001600160401b03821161060057602091604052611510565b9193509193601f1983820301845260421960c435360301853512156101775760c43585350190604460248301359201916001600160401b038111610177578036038313610177576115956020928392600195611693565b960194019101918693926114e3565b9181601f84011215610177578235916001600160401b038311610177576020838186019501011161017757565b606081019081106001600160401b0382111761060057604052565b604081019081106001600160401b0382111761060057604052565b90601f801991011681019081106001600160401b0382111761060057604052565b600435906001600160a01b038216820361017757565b602435906001600160a01b038216820361017757565b6001600160401b03811161060057601f01601f191660200190565b805180835260209291819084018484015e5f828201840152601f01601f1916010190565b908060209392818452848401375f828201840152601f01601f1916010190565b156116ba57565b60405162461bcd60e51b815260206004820152602c60248201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060448201526b19195b1959d85d1958d85b1b60a21b6064820152608490fd5b1561171b57565b60405162461bcd60e51b815260206004820152602c60248201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060448201526b6163746976652070726f787960a01b6064820152608490fd5b805182101561084d5760209160051b010190565b602081830312610177578051906001600160401b038211610177570181601f82011215610177578051906117bc82611654565b926117ca6040519485611607565b8284526020838301011161017757815f9260208093018386015e8301015290565b5f549060018060a01b03809116808284165f80516020611d918339815191525f80a36001600160a01b0319928316175f5560015490811661182a575050565b16600155565b1561183757565b60405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608490fd5b803b156118c4575f80516020611d7183398151915280546001600160a01b0319166001600160a01b03909216919091179055565b60405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b6064820152608490fd5b919290156119815750815115611933575090565b3b1561193c5790565b60405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606490fd5b8251909150156119945750805190602001fd5b60405162461bcd60e51b815260206004820152908190610d2790602483019061166f56fe604060808152346101f3576103b8803803908161001b816101f7565b92839283396020928391810103126101f357516001600160a01b038116918282036101f35783516001600160401b039382820193919085851182861017610170578487525f8252823b15610199577f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80546001600160a01b031916821790557fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b5f80a2805115801590610192575b6100db575b855160e790816102d18239f35b855193606085019085821087831117610170575f9283928952602787527f416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c86880152660819985a5b195960ca1b898801525190845af4903d15610184573d9485116101705761016594610156601f8201601f191685016101f7565b9081525f81943d92013e61021c565b505f808080806100ce565b634e487b7160e01b5f52604160045260245ffd5b61016594506060925061021c565b505f6100c9565b865162461bcd60e51b815260048101859052602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b6064820152608490fd5b5f80fd5b6040519190601f01601f191682016001600160401b0381118382101761017057604052565b9192901561027e5750815115610230575090565b3b156102395790565b60405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606490fd5b8251909150156102915750805190602001fd5b604460209160405192839162461bcd60e51b83528160048401528051918291826024860152018484015e5f828201840152601f01601f19168101030190fdfe608060405260043610156015575b366069576069565b5f3560e01c6375d0c0dc03600d57346065575f3660031901126065576f467265656520313135352050726f787960801b60a052602060c052601060e052601060a06101005e5f61011052606060c0f35b5f80fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc545f9081906001600160a01b0316368280378136915af43d5f803e1560ad573d5ff35b3d5ffdfea264697066735822122056a04edf1ead2a07edab67adc6546f088161e4ca75634a2d3133bb5412c788ea64736f6c63430008190033360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc8292fce18fa69edf4db7b94ea2e58241df0ae57f97e0a6c9b29067028bf92d76a26469706673582212203e2a643a8dc789abd3c1c192168530efe4f48fe8ebbd05c5cfda586719c9e69364736f6c634300081900330000000000000000000000001bd39618ef45a237282e69b0fd2f5396895fff1a0000000000000000000000008760632e3bca5e219e30d261f91a4418d29d05ca000000000000000000000000ebd1b99336cddefea2380566186f849c38a100ce0000000000000000000000006dc5807302d49edf196114643350e75ca345022f
Deployed Bytecode
0x60806040526004361015610011575f80fd5b5f3560e01c80630582823a1461124757806321f7434714610db557806323452b9c146111e85780633659cfe614610e73578063395db2cd14610e075780634dc5b7c714610db55780634f1ef2861461096757806352d1902d146108a55780635c60da1b14610861578063695b0d261461073157806370369613146106ed57806375d0c0dc1461069057806379ba50971461063b5780638da5cb5b1461061457806392b60a4c146104da578063961bbb7b14610496578063a0a8e4601461044d578063c4d66de8146102bf578063e1e78e5e1461027b578063e30c397814610253578063ed0c7091146101fb578063f0fad9911461017b5763f2fde38b14610116575f80fd5b346101775760203660031901126101775761012f611628565b6001600160a01b0381811615610165575f5416330361015357610151906117eb565b005b60405163d238ed5960e01b8152600490fd5b604051631627621f60e11b8152600490fd5b5f80fd5b3461017757604036600319011261017757610194611628565b61019c61163e565b5f5490916001600160a01b03918216330361015357811690815f52603560205260405f20921691825f5260205260405f2060ff1981541690557f0ebd98f6f75e38ba2f0751378f5c86205cafca83e206cb62795f45fcea7283335f80a3005b34610177575f366003190112610177575f546001600160a01b0380821633819003610153575f905f80516020611d918339815191528280a36001600160a01b03199182165f5560015490811661024d57005b16600155005b34610177575f366003190112610177576001546040516001600160a01b039091168152602090f35b34610177575f366003190112610177576040517f0000000000000000000000006dc5807302d49edf196114643350e75ca345022f6001600160a01b03168152602090f35b34610177576020366003190112610177576102d8611628565b6034549060ff8260081c161591828093610440575b8015610429575b156103cd5760ff198116600117603455826103bb575b506001600160a01b03168015610165576103596034549160ff8360081c169061033282611830565b5f80546001600160a01b031916821781555f80516020611d918339815191528180a3611830565b604051917f6a656eb613551e803db1baa3e77facd3bc45e8256f27f4cf09a50cf63b88a9335f80a161038757005b61ff001916603455600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb384740249890602090a1005b61ffff1916610101176034558261030a565b60405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608490fd5b50303b1580156102f45750600160ff8216146102f4565b50600160ff8216106102ed565b34610177575f3660031901126101775761049260405161046c816115ec565b60058152640322e312e360dc1b602082015260405191829160208352602083019061166f565b0390f35b34610177575f366003190112610177576040517f0000000000000000000000008760632e3bca5e219e30d261f91a4418d29d05ca6001600160a01b03168152602090f35b34610177576040366003190112610177576004356001600160401b038082116101775736602383011215610177578160040135908111610600578060051b916020926040519261052c85830185611607565b83526024848401918301019136831161017757602401905b8282106105e15750505061055661163e565b5f549091906001600160a01b0390811633036101535790918116905f5b835181101561015157808261058a60019387611775565b51165f526035865260405f20845f52865260405f208260ff1982541617905583836105b58388611775565b51167fab6a7dc54721d6a1a284ca865830f8981d6f12fbddb3618d1774b71c003680595f80a301610573565b81356001600160a01b0381168103610177578152908401908401610544565b634e487b7160e01b5f52604160045260245ffd5b34610177575f366003190112610177575f546040516001600160a01b039091168152602090f35b34610177575f366003190112610177576001546001600160a01b03908116330361067e5733905f54165f80516020611d918339815191525f80a3610151336117eb565b60405163065cd53160e01b8152600490fd5b34610177575f366003190112610177576104926040516106af816115ec565b601b81527f4672656565203131353520436f6e747261637420466163746f72790000000000602082015260405191829160208352602083019061166f565b34610177575f366003190112610177576040517f000000000000000000000000ebd1b99336cddefea2380566186f849c38a100ce6001600160a01b03168152602090f35b34610177575f36600319011261017757604051608081018181106001600160401b03821117610600576040526003815260209060208101606036823781511561084d576001600160a01b037f000000000000000000000000ebd1b99336cddefea2380566186f849c38a100ce8116825282516001949193919085101561084d57837f0000000000000000000000008760632e3bca5e219e30d261f91a4418d29d05ca16604083015281516002101561084d5791928491817f0000000000000000000000006dc5807302d49edf196114643350e75ca345022f16606082015260405193602085019160208652518092526040850195925f905b8382106108365786880387f35b845181168852968201969382019390850190610829565b634e487b7160e01b5f52603260045260245ffd5b34610177575f366003190112610177576040517f0000000000000000000000001bd39618ef45a237282e69b0fd2f5396895fff1a6001600160a01b03168152602090f35b34610177575f366003190112610177577f000000000000000000000000ac6ef1df4ab3d2248df86bdb28896365213455cd6001600160a01b031630036108fc5760206040515f80516020611d718339815191528152f35b60405162461bcd60e51b815260206004820152603860248201527f555550535570677261646561626c653a206d757374206e6f742062652063616c60448201527f6c6564207468726f7567682064656c656761746563616c6c00000000000000006064820152608490fd5b6003196040368201126101775761097c611628565b60249182356001600160401b0381116101775736602382011215610177578060040135916109a983611654565b906109b76040519283611607565b838252602093848301933688838301011161017757815f92898893018737840101526001600160a01b037f000000000000000000000000ac6ef1df4ab3d2248df86bdb28896365213455cd811690610a11308314156116b3565b610a2d5f80516020611d71833981519152928284541614611714565b805f5416330361015357604051631d74303760e21b80825291881693905f8160048183895af1908115610d4f575f91610d9b575b50604051908382525f82600481305afa918215610d4f575f92610d7f575b508881519101209088815191012003610cad5750507f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd91435460ff1615610acd5750505050506101519150611890565b60409592939495516352d1902d60e01b81528681600481865afa5f9181610c7e575b50610b4f5760405162461bcd60e51b815260048101889052602e818a01527f45524331393637557067726164653a206e657720696d706c656d656e7461746960448201526d6f6e206973206e6f74205555505360901b6064820152608490fd5b9691929395949603610c295750610b6582611890565b7fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b5f80a2825115801590610c21575b610b9a57005b5f806101519560405195610bad876115d1565b602787527f416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c86880152660819985a5b195960ca1b60408801525190845af4903d15610c18573d610bfc81611654565b90610c0a6040519283611607565b81525f81943d92013e61191f565b6060925061191f565b506001610b94565b8360296084926040519262461bcd60e51b845260048401528201527f45524331393637557067726164653a20756e737570706f727465642070726f786044820152681a58589b195555525160ba1b6064820152fd5b9091508781813d8311610ca6575b610c968183611607565b8101031261017757519089610aef565b503d610c8c565b88939250604051918083525f83600481305afa928315610d4f575f93610d5a575b505f929360048492604051958693849283525af18015610d4f57610d1994610d27935f92610d2b575b5060405195869563a23cbf7b60e01b875260406004880152604487019061166f565b92858403019085015261166f565b0390fd5b610d489192503d805f833e610d408183611607565b810190611789565b9086610cf7565b6040513d5f823e3d90fd5b5f9350936004610d758593963d8086833e610d408183611607565b9450509390610cce565b610d949192503d805f833e610d408183611607565b908b610a7f565b610daf91503d805f833e610d408183611607565b8a610a61565b3461017757604036600319011261017757610dce611628565b610dd661163e565b9060018060a01b038091165f52603560205260405f2091165f52602052602060ff60405f2054166040519015158152f35b34610177576020366003190112610177576001600160a01b0380610e29611628565b16908115610165575f541680330361015357600180546001600160a01b031916831790557f4f2638f5949b9614ef8d5e268cb51348ad7f434a34812bf64b6e95014fbd357e5f80a3005b34610177576003196020368201811361017757610e8e611628565b6001600160a01b037f000000000000000000000000ac6ef1df4ab3d2248df86bdb28896365213455cd81169391929190610eca308614156116b3565b610ee65f80516020611d71833981519152958287541614611714565b805f5416330361015357831690604051631d74303760e21b908181525f8160048183885af1908115610d4f575f916111ce575b50604051908282525f82600481305afa918215610d4f575f926111b2575b5085815191012090858151910120036110fa57505060405190828201948286106001600160401b0387111761060057856040525f835260ff7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd914354165f14610fa657505050506101519150611890565b6040516352d1902d60e01b8152939492938581600481865afa5f91816110cb575b506110285760405162461bcd60e51b815260048101879052602e60248201527f45524331393637557067726164653a206e657720696d706c656d656e7461746960448201526d6f6e206973206e6f74205555505360901b6064820152608490fd5b949394036110745761103982611890565b7fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b5f80a282511580159061106d57610b9a57005b505f610b94565b60405162461bcd60e51b815260048101849052602960248201527f45524331393637557067726164653a20756e737570706f727465642070726f786044820152681a58589b195555525160ba1b6064820152608490fd5b9091508681813d83116110f3575b6110e38183611607565b8101031261017757519088610fc7565b503d6110d9565b82604051918083525f83600481305afa928315610d4f575f9361118c575b505f9160048392604051948593849283525af1928315610d4f5761116393610d27925f91611172575b5060405194859463a23cbf7b60e01b865260406004870152604486019061166f565b9184830301602485015261166f565b61118691503d805f833e610d408183611607565b85611141565b5f9290839294506111a86004913d8086833e610d408183611607565b9492505091611118565b6111c79192503d805f833e610d408183611607565b9088610f37565b6111e291503d805f833e610d408183611607565b87610f19565b34610177575f366003190112610177575f546001600160a01b039081163381900361015357600154918216907f682679deecef4dcd49674845cc1e3a075fea9073680aa445a8207d5a4bdea3da5f80a36001600160a01b031916600155005b346101775760e0366003190112610177576004356001600160401b038111610177576112779036906004016115a4565b6024356001600160401b038111610177576112969036906004016115a4565b929060603660431901126101775760e060405263ffffffff60443581811681036101775760805260643590811681036101775760a0526084356001600160a01b03811681036101775760c05260a435916001600160a01b0383168303610177576001600160401b0360c435116101775736602360c435011215610177576001600160401b0360c43560040135116101775736602460c4356004013560051b60c43501011161017757604051806103b88101106001600160401b036103b883011117610600576103b86119b982397f0000000000000000000000001bd39618ef45a237282e69b0fd2f5396895fff1a6001600160a01b03166103b88201908152819003602001905ff0938415610d4f5760405160a081526113cc6113bd60a083018486611693565b82810360208401528886611693565b6080805163ffffffff908116604085015260a05116606084015260c0516001600160a01b031690830152906001600160a01b03868116923392918916917fa45800684f65ae010ceb4385eceaed88dec7f6a6bcbe11f7ffd8bd24dd2653f49181900390a46001600160a01b0385163b15610177576040516322823ad360e21b815260e0600482015295611479936114679160e4890191611693565b86810360031901602488015291611693565b60805163ffffffff908116604486015260a05116606485015260c0516001600160a01b03166084850152906001600160a01b031660a48401528281036003190160c480850191909152600490359081013580835260051b82016020908101928592602401918101905f5b60c43560040135811061153e5750505050805f9203818360018060a01b0386165af18015610d4f57611525575b6040516001600160a01b039091168152602090f35b6001600160401b03821161060057602091604052611510565b9193509193601f1983820301845260421960c435360301853512156101775760c43585350190604460248301359201916001600160401b038111610177578036038313610177576115956020928392600195611693565b960194019101918693926114e3565b9181601f84011215610177578235916001600160401b038311610177576020838186019501011161017757565b606081019081106001600160401b0382111761060057604052565b604081019081106001600160401b0382111761060057604052565b90601f801991011681019081106001600160401b0382111761060057604052565b600435906001600160a01b038216820361017757565b602435906001600160a01b038216820361017757565b6001600160401b03811161060057601f01601f191660200190565b805180835260209291819084018484015e5f828201840152601f01601f1916010190565b908060209392818452848401375f828201840152601f01601f1916010190565b156116ba57565b60405162461bcd60e51b815260206004820152602c60248201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060448201526b19195b1959d85d1958d85b1b60a21b6064820152608490fd5b1561171b57565b60405162461bcd60e51b815260206004820152602c60248201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060448201526b6163746976652070726f787960a01b6064820152608490fd5b805182101561084d5760209160051b010190565b602081830312610177578051906001600160401b038211610177570181601f82011215610177578051906117bc82611654565b926117ca6040519485611607565b8284526020838301011161017757815f9260208093018386015e8301015290565b5f549060018060a01b03809116808284165f80516020611d918339815191525f80a36001600160a01b0319928316175f5560015490811661182a575050565b16600155565b1561183757565b60405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608490fd5b803b156118c4575f80516020611d7183398151915280546001600160a01b0319166001600160a01b03909216919091179055565b60405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b6064820152608490fd5b919290156119815750815115611933575090565b3b1561193c5790565b60405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606490fd5b8251909150156119945750805190602001fd5b60405162461bcd60e51b815260206004820152908190610d2790602483019061166f56fe604060808152346101f3576103b8803803908161001b816101f7565b92839283396020928391810103126101f357516001600160a01b038116918282036101f35783516001600160401b039382820193919085851182861017610170578487525f8252823b15610199577f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80546001600160a01b031916821790557fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b5f80a2805115801590610192575b6100db575b855160e790816102d18239f35b855193606085019085821087831117610170575f9283928952602787527f416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c86880152660819985a5b195960ca1b898801525190845af4903d15610184573d9485116101705761016594610156601f8201601f191685016101f7565b9081525f81943d92013e61021c565b505f808080806100ce565b634e487b7160e01b5f52604160045260245ffd5b61016594506060925061021c565b505f6100c9565b865162461bcd60e51b815260048101859052602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b6064820152608490fd5b5f80fd5b6040519190601f01601f191682016001600160401b0381118382101761017057604052565b9192901561027e5750815115610230575090565b3b156102395790565b60405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606490fd5b8251909150156102915750805190602001fd5b604460209160405192839162461bcd60e51b83528160048401528051918291826024860152018484015e5f828201840152601f01601f19168101030190fdfe608060405260043610156015575b366069576069565b5f3560e01c6375d0c0dc03600d57346065575f3660031901126065576f467265656520313135352050726f787960801b60a052602060c052601060e052601060a06101005e5f61011052606060c0f35b5f80fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc545f9081906001600160a01b0316368280378136915af43d5f803e1560ad573d5ff35b3d5ffdfea264697066735822122056a04edf1ead2a07edab67adc6546f088161e4ca75634a2d3133bb5412c788ea64736f6c63430008190033360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc8292fce18fa69edf4db7b94ea2e58241df0ae57f97e0a6c9b29067028bf92d76a26469706673582212203e2a643a8dc789abd3c1c192168530efe4f48fe8ebbd05c5cfda586719c9e69364736f6c63430008190033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000001bd39618ef45a237282e69b0fd2f5396895fff1a0000000000000000000000008760632e3bca5e219e30d261f91a4418d29d05ca000000000000000000000000ebd1b99336cddefea2380566186f849c38a100ce0000000000000000000000006dc5807302d49edf196114643350e75ca345022f
-----Decoded View---------------
Arg [0] : _implementation (address): 0x1BD39618EF45a237282e69B0fd2F5396895FfF1A
Arg [1] : _merkleMinter (address): 0x8760632e3bca5e219e30D261f91a4418d29D05CA
Arg [2] : _fixedPriceMinter (address): 0xebD1b99336cdDEFea2380566186F849c38a100Ce
Arg [3] : _redeemMinterFactory (address): 0x6dC5807302D49edf196114643350E75Ca345022f
-----Encoded View---------------
4 Constructor Arguments found :
Arg [0] : 0000000000000000000000001bd39618ef45a237282e69b0fd2f5396895fff1a
Arg [1] : 0000000000000000000000008760632e3bca5e219e30d261f91a4418d29d05ca
Arg [2] : 000000000000000000000000ebd1b99336cddefea2380566186f849c38a100ce
Arg [3] : 0000000000000000000000006dc5807302d49edf196114643350e75ca345022f
Loading...
Loading
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.