Skip to content

IListingConfiguratorPresetFactory

IListingConfiguratorPresetFactory

InvalidListingConfiguratorInterface

error InvalidListingConfiguratorInterface()

Thrown when the implementation does not support the IListingConfiguratorPreset interface

DuplicateListingConfiguratorPresetId

error DuplicateListingConfiguratorPresetId(bytes32 presetId)

Thrown when the ListingConfigurator preset id is already present in the storage.

DisabledListingConfiguratorPreset

error DisabledListingConfiguratorPreset(bytes32 presetId)

Thrown when the ListingConfigurator preset has been disabled, when it was expected for it to be enabled.

EnabledListingConfiguratorPreset

error EnabledListingConfiguratorPreset(bytes32 presetId)

Thrown when the ListingConfigurator preset has been enabled, when it was expected for it to be disabled.

ListingConfiguratorPresetNotRegistered

error ListingConfiguratorPresetNotRegistered(bytes32 presetId)

Thrown when it was expected for the ListingConfigurator preset to be registeredr.

EmptyPresetData

error EmptyPresetData()

Thrown when the provided preset initialization data is empty.

ListingConfiguratorPreset

struct ListingConfiguratorPreset {
  bytes32 id;
  address implementation;
  bool enabled;
}

ListingConfiguratorPresetAdded

event ListingConfiguratorPresetAdded(bytes32 presetId, address implementation)

Emitted when new ListingConfigurator preset is added.

ListingConfiguratorPresetEnabled

event ListingConfiguratorPresetEnabled(bytes32 presetId)

Emitted when a ListingConfigurator preset is enabled.

ListingConfiguratorPresetDisabled

event ListingConfiguratorPresetDisabled(bytes32 presetId)

Emitted when a ListingConfigurator preset is disabled.

ListingConfiguratorPresetRemoved

event ListingConfiguratorPresetRemoved(bytes32 presetId)

Emitted when a ListingConfigurator preset is enabled.

ListingConfiguratorPresetDeployed

event ListingConfiguratorPresetDeployed(bytes32 presetId, address listingConfigurator)

Emitted when a ListingConfigurator preset is deployed.

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[])

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.