Skip to content

IListingStrategyRegistry

IListingStrategyRegistry

UnsupportedListingStrategy

error UnsupportedListingStrategy(bytes4 listingStrategyId)

Thrown when the listing strategy is not registered or deprecated.

Name Type Description
listingStrategyId bytes4 Unsupported listing strategy ID.

InvalidListingControllerInterface

error InvalidListingControllerInterface()

Thrown when listing controller does not implement the required interface.

ListingStrategyMismatch

error ListingStrategyMismatch(bytes4 provided, bytes4 required)

Thrown when the listing cannot be processed by the specific controller due to the listing strategy ID mismatch.

Name Type Description
provided bytes4 Provided listing strategy ID.
required bytes4 Required listing strategy ID.

ListingStrategyIsAlreadyRegistered

error ListingStrategyIsAlreadyRegistered(bytes4 listingStrategyId)

Thrown upon attempting to register a listing strategy twice.

Name Type Description
listingStrategyId bytes4 Duplicate listing strategy ID.

UnregisteredListingStrategy

error UnregisteredListingStrategy(bytes4 listingStrategyId)

Thrown upon attempting to work with unregistered listing strategy.

Name Type Description
listingStrategyId bytes4 Listing strategy ID.

ListingStrategyRegistered

event ListingStrategyRegistered(bytes4 listingStrategyId, bytes4 listingTaxStrategyId, address controller)

Emitted when the new listing strategy is registered.

Name Type Description
listingStrategyId bytes4 Listing strategy ID.
listingTaxStrategyId bytes4 Taxation strategy ID.
controller address Controller address.

ListingStrategyControllerChanged

event ListingStrategyControllerChanged(bytes4 listingStrategyId, address newController)

Emitted when the listing strategy controller is changed.

Name Type Description
listingStrategyId bytes4 Listing strategy ID.
newController address Controller address.

ListingStrategyConfig

struct ListingStrategyConfig {
  address controller;
  bytes4 taxStrategyId;
}

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.

isRegisteredListingStrategy

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

Checks listing strategy registration.

Name Type Description
listingStrategyId bytes4 Listing strategy ID.

checkRegisteredListingStrategy

function checkRegisteredListingStrategy(bytes4 listingStrategyId) external view

Reverts if listing strategy is not registered.

Name Type Description
listingStrategyId bytes4 Listing strategy ID.