Ready To Use
Catalog
Catalog Factory

RMRKCatalogFactory

RMRK team

RMRKCatalogFactory

Smart contract to deploy catalog implementations and keep track of deployers.

Methods

deployCatalog

function deployCatalog(string metadataURI, string type_) external nonpayable returns (address)

Used to deploy a new RMRKCatalog implementation.

Parameters

NameTypeDescription
metadataURIstringBase metadata URI of the catalog
type_stringThe type of the catalog

Returns

NameTypeDescription
_0addressThe address of the deployed catalog

getDeployerCatalogAtIndex

function getDeployerCatalogAtIndex(address deployer, uint256 index) external view returns (address catalogAddress)

Used to get a catalog deployed by a given deployer at a given index.

Parameters

NameTypeDescription
deployeraddressThe address of the deployer
indexuint256The index of the catalog

Returns

NameTypeDescription
catalogAddressaddressThe address of the catalog

getDeployerCatalogs

function getDeployerCatalogs(address deployer) external view returns (address[])

Used to get all catalogs deployed by a given deployer.

Parameters

NameTypeDescription
deployeraddressThe address of the deployer

Returns

NameTypeDescription
_0address[]An array of addresses of the catalogs deployed by the deployer

getLastDeployerCatalog

function getLastDeployerCatalog(address deployer) external view returns (address catalogAddress)

Used to get the last catalog deployed by a given deployer.

Parameters

NameTypeDescription
deployeraddressThe address of the deployer

Returns

NameTypeDescription
catalogAddressaddressThe address of the last catalog deployed by the deployer

getTotalDeployerCatalogs

function getTotalDeployerCatalogs(address deployer) external view returns (uint256 total)

Used to get the total number of catalogs deployed by a given deployer.

Parameters

NameTypeDescription
deployeraddressThe address of the deployer

Returns

NameTypeDescription
totaluint256The total number of catalogs deployed by the deployer

Events

CatalogDeployed

event CatalogDeployed(address indexed deployer, address indexed catalog)

Parameters

NameTypeDescription
deployer indexedaddressundefined
catalog indexedaddressundefined