Skip to content

ListingStrategyRegistry

ListingStrategyRegistry

ListingStrategyRegistryInitParams

struct ListingStrategyRegistryInitParams {
  contract IACL acl;
  contract IMetahub metahub;
}

onlyRegisteredListingStrategy

modifier onlyRegisteredListingStrategy(bytes4 listingStrategyId)

Modifier to make a function callable only for the registered listing strategy.

constructor

constructor() public

initialize

function initialize(struct ListingStrategyRegistry.ListingStrategyRegistryInitParams params) external

Contract initializer.

Name Type Description
params struct ListingStrategyRegistry.ListingStrategyRegistryInitParams Listing Strategy Registry initialization params.

registerListingStrategy

function registerListingStrategy(bytes4 listingStrategyId, struct IListingStrategyRegistry.ListingStrategyConfig config) external

Registers new listing strategy.

Name Type Description
listingStrategyId bytes4 Listing strategy ID.
config struct IListingStrategyRegistry.ListingStrategyConfig Listing strategy configuration.

setListingController

function setListingController(bytes4 listingStrategyId, address controller) external

Sets listing strategy controller.

Name Type Description
listingStrategyId bytes4 Listing strategy ID.
controller address Listing controller address.

listingController

function listingController(bytes4 listingStrategyId) external view returns (address)

Returns listing strategy controller.

Name Type Description
listingStrategyId bytes4 Listing strategy ID.
Name Type Description
[0] address Listing controller address.

listingTaxId

function listingTaxId(bytes4 listingStrategyId) external view returns (bytes4)

Returns tax strategy ID for listing strategy.

Name Type Description
listingStrategyId bytes4 Listing strategy ID.
Name Type Description
[0] bytes4 Tax strategy ID.

listingStrategy

function listingStrategy(bytes4 listingStrategyId) external view returns (struct IListingStrategyRegistry.ListingStrategyConfig)

Returns listing strategy configuration.

Name Type Description
listingStrategyId bytes4 Listing strategy ID.
Name Type Description
[0] struct IListingStrategyRegistry.ListingStrategyConfig Listing strategy information.

listingTaxController

function listingTaxController(bytes4 listingStrategyId) external view returns (address)

Returns tax strategy controller for listing strategy.

Name Type Description
listingStrategyId bytes4 Listing strategy ID.
Name Type Description
[0] address Tax strategy controller address.

contractKey

function contractKey() external pure returns (bytes4)

Returns implemented contract key.

Name Type Description
[0] bytes4 Contract key;

isRegisteredListingStrategy

function isRegisteredListingStrategy(bytes4 listingStrategyId) public view returns (bool)

Checks listing strategy registration.

Name Type Description
listingStrategyId bytes4 Listing strategy ID.

checkRegisteredListingStrategy

function checkRegisteredListingStrategy(bytes4 listingStrategyId) public view

Reverts if listing strategy is not registered.

Name Type Description
listingStrategyId bytes4 Listing strategy ID.

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

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

_checkValidListingController

function _checkValidListingController(bytes4 listingStrategyId, address controller) internal view

Reverts if provided address is not a valid listing controller.

Name Type Description
listingStrategyId bytes4 Listing strategy ID.
controller address Listing controller address.

_acl

function _acl() internal view returns (contract IACL)

return the IACL address