Skip to content

ListingConfiguratorPresetFactory

ListingConfiguratorPresetFactory

InvalidZeroAddress

error InvalidZeroAddress()

ListingConfiguratorPresetFactoryInitParams

struct ListingConfiguratorPresetFactoryInitParams {
  contract IListingConfiguratorRegistry listingConfiguratorRegistry;
  contract IACL acl;
}

whenEnabled

modifier whenEnabled(bytes32 presetId)

Modifier to check that the preset is currently enabled.

whenDisabled

modifier whenDisabled(bytes32 presetId)

Modifier to check that the preset is currently disabled.

whenRegistered

modifier whenRegistered(bytes32 presetId)

Modifier to check that the preset is registered.

constructor

constructor() public

Constructor that gets called for the implementation contract.

initialize

function initialize(struct ListingConfiguratorPresetFactory.ListingConfiguratorPresetFactoryInitParams initParams) external

ListingConfiguratorPresetFactory initializer.

Name Type Description
initParams struct ListingConfiguratorPresetFactory.ListingConfiguratorPresetFactoryInitParams initialization parameters

addPreset

function addPreset(bytes32 presetId, address implementation) external

Stores the association between `presetId` and `implementation` address. NOTE: ListingConfigurator `implementation` must be deployed beforehand.

Name Type Description
presetId bytes32 ListingConfigurator preset id.
implementation address ListingConfigurator implementation address.

removePreset

function removePreset(bytes32 presetId) external

Removes the association between `presetId` and its implementation.

Name Type Description
presetId bytes32 ListingConfigurator preset id.

enablePreset

function enablePreset(bytes32 presetId) external

Enables ListingConfigurator preset, which makes it deployable.

Name Type Description
presetId bytes32 ListingConfigurator preset id.

disablePreset

function disablePreset(bytes32 presetId) external

Disable ListingConfigurator preset, which makes non-deployable.

Name Type Description
presetId bytes32 ListingConfigurator preset id.

deployPreset

function deployPreset(bytes32 presetId, bytes initData) external returns (address)

Deploys a new ListingConfigurator from the preset identified by `presetId`.

Name Type Description
presetId bytes32 ListingConfigurator preset id.
initData bytes ListingConfigurator initialization payload.
Name Type Description
[0] address Deployed ListingConfigurator address.

presetEnabled

function presetEnabled(bytes32 presetId) external view returns (bool)

Checks whether ListingConfigurator preset is enabled and available for deployment.

Name Type Description
presetId bytes32 ListingConfigurator preset id.

presets

function presets() external view returns (struct IListingConfiguratorPresetFactory.ListingConfiguratorPreset[] configuratorPresets)

Returns the list of all registered ListingConfigurator presets.

preset

function preset(bytes32 presetId) external view returns (struct IListingConfiguratorPresetFactory.ListingConfiguratorPreset)

Returns the ListingConfigurator preset details.

Name Type Description
presetId bytes32 ListingConfigurator preset id.

contractKey

function contractKey() external pure returns (bytes4)

Returns implemented contract key.

Name Type Description
[0] bytes4 Contract key;

supportsInterface

function supportsInterface(bytes4 interfaceId) public view returns (bool)

_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._

_authorizeUpgrade

function _authorizeUpgrade(address newImplementation) internal virtual

_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 {} ```

_acl

function _acl() internal view virtual returns (contract IACL)

return the IACL address