Skip to content

ListingTermsRegistry

ListingTermsRegistry

ListingTermsRegistryInitParams

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

onlyAuthorizedToAlterListingTerms

modifier onlyAuthorizedToAlterListingTerms()

Modifier to make sure the function is called by the account with LISTING_WIZARD role.

onlyRegisteredListingTerms

modifier onlyRegisteredListingTerms(uint256 listingTermsId)

Modifier to make a function callable only for the registered lister strategy override config.

constructor

constructor() public

initialize

function initialize(struct ListingTermsRegistry.ListingTermsRegistryInitParams params) external

Contract initializer.

Name Type Description
params struct ListingTermsRegistry.ListingTermsRegistryInitParams Initialization params.

registerGlobalListingTerms

function registerGlobalListingTerms(uint256 listingId, struct IListingTermsRegistry.ListingTerms terms) external returns (uint256 listingTermsId)

Registers global listing terms.

Name Type Description
listingId uint256 Listing ID.
terms struct IListingTermsRegistry.ListingTerms Listing terms data.
Name Type Description
listingTermsId uint256 Listing terms ID.

removeGlobalListingTerms

function removeGlobalListingTerms(uint256 listingId, uint256 listingTermsId) external

Removes global listing terms.

Name Type Description
listingId uint256 Listing ID.
listingTermsId uint256 Listing Terms ID.

registerUniverseListingTerms

function registerUniverseListingTerms(uint256 listingId, uint256 universeId, struct IListingTermsRegistry.ListingTerms terms) external returns (uint256 listingTermsId)

Registers universe listing terms.

Name Type Description
listingId uint256 Listing ID.
universeId uint256 Universe ID.
terms struct IListingTermsRegistry.ListingTerms Listing terms data.
Name Type Description
listingTermsId uint256 Listing terms ID.

removeUniverseListingTerms

function removeUniverseListingTerms(uint256 listingId, uint256 universeId, uint256 listingTermsId) external

Removes universe listing terms.

Name Type Description
listingId uint256 Listing ID.
universeId uint256 Universe ID.
listingTermsId uint256 Listing terms ID.

registerWarperListingTerms

function registerWarperListingTerms(uint256 listingId, address warperAddress, struct IListingTermsRegistry.ListingTerms terms) external returns (uint256 listingTermsId)

Registers warper listing terms.

Name Type Description
listingId uint256 Listing ID.
warperAddress address The address of the warper.
terms struct IListingTermsRegistry.ListingTerms Listing terms.
Name Type Description
listingTermsId uint256 Listing terms ID.

removeWarperListingTerms

function removeWarperListingTerms(uint256 listingId, address warperAddress, uint256 listingTermsId) external

Removes warper listing terms.

Name Type Description
listingId uint256 Listing ID.
warperAddress address The address of the warper.
listingTermsId uint256 Listing terms ID

listingTerms

function listingTerms(uint256 listingTermsId) external view returns (struct IListingTermsRegistry.ListingTerms)

Returns listing terms by ID.

Name Type Description
listingTermsId uint256 Listing terms ID.
Name Type Description
[0] struct IListingTermsRegistry.ListingTerms Listing Terms.

listingTermsWithParams

function listingTermsWithParams(uint256 listingTermsId) external view returns (struct IListingTermsRegistry.ListingTerms, struct IListingTermsRegistry.Params)

Returns listing terms by ID.

Name Type Description
listingTermsId uint256 Listing terms ID.
Name Type Description
[0] struct IListingTermsRegistry.ListingTerms Listing Terms.
[1] struct IListingTermsRegistry.Params Listing Terms Params.

allListingTerms

function allListingTerms(struct IListingTermsRegistry.Params params, uint256 offset, uint256 limit) external view returns (uint256[] listingTermsIds, struct IListingTermsRegistry.ListingTerms[] listingTermsList)

Returns all listing terms for params.

Name Type Description
params struct IListingTermsRegistry.Params Listing terms specific params.
offset uint256 List offset value.
limit uint256 List limit value.
Name Type Description
listingTermsIds uint256[] List of Listing Terms IDs.
listingTermsList struct IListingTermsRegistry.ListingTerms[] List of Listing Terms.

contractKey

function contractKey() external pure returns (bytes4)

Returns implemented contract key.

Name Type Description
[0] bytes4 Contract key;

areRegisteredListingTerms

function areRegisteredListingTerms(uint256 listingTermsId) public view returns (bool)

Checks registration of listing terms.

Name Type Description
listingTermsId uint256 Listing Terms ID.
Name Type Description
[0] bool Boolean that is positive in case of existance

areRegisteredListingTermsWithParams

function areRegisteredListingTermsWithParams(uint256 listingTermsId, struct IListingTermsRegistry.Params params) public view returns (bool existance)

Checks registration of listing terms.

Name Type Description
listingTermsId uint256 Listing Terms ID.
params struct IListingTermsRegistry.Params Listing terms specific params.
Name Type Description
existance bool Boolean that is positive in case of existance

checkRegisteredListingTerms

function checkRegisteredListingTerms(uint256 listingTermsId) public view

Checks registration of listing terms. Reverts with UnregisteredListingTerms() in case listing terms were not registered.

Name Type Description
listingTermsId uint256 Listing Terms ID.

checkRegisteredListingTermsWithParams

function checkRegisteredListingTermsWithParams(uint256 listingTermsId, struct IListingTermsRegistry.Params params) public view

Checks registration of listing terms for lister on global, universe and warper levels. Reverts in case of absence of listing terms on all levels.

Name Type Description
listingTermsId uint256 Listing Terms ID.
params struct IListingTermsRegistry.Params Listing terms specific params.

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

_registerListingTerms

function _registerListingTerms(struct IListingTermsRegistry.ListingTerms terms) internal returns (uint256 listingTermsId)

Registers new listing terms.

Name Type Description
terms struct IListingTermsRegistry.ListingTerms The listing terms.
Name Type Description
listingTermsId uint256 Listing terms ID.

_paginateIndexedListingTerms

function _paginateIndexedListingTerms(struct EnumerableSetUpgradeable.UintSet listingTermsIndex, uint256 offset, uint256 limit) internal view returns (uint256[], struct IListingTermsRegistry.ListingTerms[])

Returns all Listing Terms for Listing ID.

Name Type Description
listingTermsIndex struct EnumerableSetUpgradeable.UintSet Listing terms index EnumerableSetUpgradeable.UintSet.
offset uint256 List offset value.
limit uint256 List limit value.
Name Type Description
[0] uint256[] List of all Listing Terms.
[1] struct IListingTermsRegistry.ListingTerms[]

_areRegisteredGlobalListingTerms

function _areRegisteredGlobalListingTerms(uint256 listingId, uint256 listingTermsId) internal view returns (bool)

Checks registration of global listing terms .

Name Type Description
listingId uint256 Listing ID.
listingTermsId uint256 Listing terms ID.
Name Type Description
[0] bool Boolean that is positive in case of existance

_areRegisteredGlobalListingTermsWithParams

function _areRegisteredGlobalListingTermsWithParams(struct IListingTermsRegistry.Params params) internal view returns (bool globalListingTermsExistance)

Checks registration of Listing terms for universe.

Name Type Description
params struct IListingTermsRegistry.Params Listing terms specific params.
Name Type Description
globalListingTermsExistance bool Boolean that is positive in case of existance

_areRegisteredUniverseListingTerms

function _areRegisteredUniverseListingTerms(uint256 listingId, uint256 universeId, uint256 listingTermsId) internal view returns (bool)

Checks registration of Listing terms for universe.

Name Type Description
listingId uint256 Listing ID.
universeId uint256 Universe ID.
listingTermsId uint256 Listing terms ID.
Name Type Description
[0] bool Boolean that is positive in case of existance

_areRegisteredUniverseListingTermsWithParams

function _areRegisteredUniverseListingTermsWithParams(struct IListingTermsRegistry.Params params) internal view returns (bool universeListingTermsExistance)

Checks registration of Listing terms for universe.

Name Type Description
params struct IListingTermsRegistry.Params Listing terms specific params.
Name Type Description
universeListingTermsExistance bool Boolean that is positive in case of existance

_areRegisteredWarperListingTerms

function _areRegisteredWarperListingTerms(uint256 listingId, address warperAddress, uint256 listingTermsId) internal view returns (bool)

Checks registration of Listing terms for warper.

Name Type Description
listingId uint256 Listing ID.
warperAddress address Address of the Warper.
listingTermsId uint256 Listing terms ID.
Name Type Description
[0] bool Boolean that is positive in case of existance

_acl

function _acl() internal view returns (contract IACL)

return the IACL address