Skip to content

ListingConfiguratorRegistry

ListingConfiguratorRegistry

ListingConfiguratorRegistryInitParams

struct ListingConfiguratorRegistryInitParams {
  contract IACL acl;
  contract IMetahub metahub;
  contract IListingConfiguratorController listingConfiguratorController;
}

InvalidListingConfiguratorInterface

error InvalidListingConfiguratorInterface()

Thrown if provided listing configurator address does not implement IListingConfigurator interface.

ListingConfiguratorIsAlreadyRegistered

error ListingConfiguratorIsAlreadyRegistered(address listingConfigurator)

Thrown upon attempting to register a listing configurator twice.

Name Type Description
listingConfigurator address Duplicate listing configurator address.

ListingConfiguratorRegistered

event ListingConfiguratorRegistered(address listingConfigurator, address listingConfiguratorController, address admin)

Emitted when a new listing configurator is registered.

Name Type Description
listingConfigurator address Listing configurator address
listingConfiguratorController address
admin address

constructor

constructor() public

Constructor that gets called for the implementation contract.

initialize

function initialize(struct ListingConfiguratorRegistry.ListingConfiguratorRegistryInitParams params) external

registerListingConfigurator

function registerListingConfigurator(address listingConfigurator, address admin) external

IListingConfiguratorRegistryConfigurator. The listing configurator must be deployed and configured prior to registration, since it becomes available for renting immediately.

Name Type Description
listingConfigurator address Listing configurator address.
admin address

setController

function setController(address controller) external

getController

function getController(address listingConfigurator) external view returns (contract IListingConfiguratorController)

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

_setController

function _setController(address controller) internal

_grantRole

function _grantRole(address delegate, string role, address account) internal

Overload {_grantRole} to track enumerable memberships

_authorizeUpgrade

function _authorizeUpgrade(address newImplementation) internal

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

_validateListingConfiguratorController

function _validateListingConfiguratorController(address controller) internal view

Checks that provided listing configurator controller address is a valid contract.

_acl

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

return the IACL address