Skip to main content

mQuarkController

It is used to set neccessary variables like template prices, royalties and contracts addresses.

Functions

setTemplatePrices

function setTemplatePrices(uint256[] calldata templateIds, uint256[] calldata prices) external;

Sets the prices for multiple templates.

Parameters:

NameTypeDescription
templateIdsuint256[]The IDs of the templates.
pricesuint256[]The corresponding prices for the templates.

setTemplateContractAddress

function setTemplateContractAddress(address _template) external

Sets the address of the template contract.

Parameters:

NameTypeDescription
_templateaddressThe address of the template contract.

setSubscriberContract

 function setSubscriberContract(address _subscriber) external

Sets the address of the subscriber contract.

Parameters:

NameTypeDescription
_subscriberaddressThe address of the subscriber contract.

setRegistryContract

  function setRegistryContract(address _registry) external

Sets the address of the registry contract.

Parameters:

NameTypeDescription
_registryaddressSets the address of the registry contract.

setRoyalty

 function setRoyalty(uint256 _royalty) external

Sets the royalty percentage.

Parameters:

NameTypeDescription
_royaltyaddressThe royalty percentage to set.

setAuthorizedWithdrawal

 function setAuthorizedWithdrawal(address _addr) external

Sets the authorized withdrawal address.

Parameters:

NameTypeDescription
_addraddressThe address to set as the authorized withdrawal address.

getTemplateMintPrice

function getTemplateMintPrice(uint256 _templateId) external view returns (uint256)

Returns the mint price for a specific template.

Parameters:

NameTypeDescription
_templateIduint256The ID of the template.

Return Values:

Description
uint256The mint price of the template.

getImplementation

 function getImplementation(uint8 _implementation) external view returns (address)

Returns the implementation address for a given implementation type.

Parameters:

NameTypeDescription
_implementationuint8The implementation type.

Return Values:

Description
addressThe implementation address.

getSubscriberContract

function getSubscriberContract() external view returns (address)

Returns the address of the subscriber contract.

Return Values:

TypeDescription
addressThe address of the subscriber contract.

getRoyalty

 function getRoyalty() external view returns (uint256)

Returns the protocol royalty percentage for collections.

Return Values:

TypeDescription
addressThe protocol royalty percentage.

getWithdrawalAddress

 function getWithdrawalAddress() external view returns (address)

Retrieves the authorized withdrawal address.

Return Values:

TypeDescription
addressThe authorized withdrawal address.

getRoyaltyAndMintPrice

 function getRoyaltyAndMintPrice(uint256 templateId) external view returns (uint256, uint256)

Retrieves the royalty percentage and mint price for a template.

Return Values:

TypeDescription
uint256The royalty percentage
uint256mint price of the template.

validateAuthorization

   function validateAuthorization(address caller) external view returns (bool)

Validates the authorization of a caller.

Parameters:

NameTypeDescription
calleraddressThe address of the caller.

Return Values:

TypeDescription
boolTrue if the caller is authorized, otherwise false.

Events

SubscriberContractAddressSet

event SubscriberContractAddressSet(address subscriber);

Emitted when the address of the subscriber contract is set.

Parameters:

NameTypeDescription
subscriberaddressTemplate IDs

TemplateContractAddressSet

event TemplateContractAddressSet(address template);

Emitted when the address of the template contract is set.

Parameters:

NameTypeDescription
templateaddressThe address of the template contract.

RegistryContractAddressSet

  event RegistryContractAddressSet(address registry);

Emitted when the address of the registry contract is set.

Parameters:

NameTypeDescription
registryaddressThe address of the registry contract.

RoyaltySet

  event RoyaltySet(uint256 royalty);

Emitted when the royalty percentage is set.

Parameters:

NameTypeDescription
registryaddressThe royalty percentage.

TemplatePricesSet

  event TemplatePricesSet(uint256[] templateIds, uint256[] prices);

Emitted when the prices of templates are set.

Parameters:

NameTypeDescription
templateIdsuint256[]The IDs of the templates.
pricesuint256[]The corresponding prices for the templates.

AuthorizedWithdrawalSet

  event AuthorizedWithdrawalSet(address authorizedWithdrawal);

Emitted when the authorized withdrawal address is set.

Parameters:

NameTypeDescription
authorizedWithdrawaladdressThe authorized withdrawal address.