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:
Name | Type | Description |
---|
templateIds | uint256[] | The IDs of the templates. |
prices | uint256[] | The corresponding prices for the templates. |
setTemplateContractAddress
function setTemplateContractAddress(address _template) external
Sets the address of the template contract.
Parameters:
Name | Type | Description |
---|
_template | address | The address of the template contract. |
setSubscriberContract
function setSubscriberContract(address _subscriber) external
Sets the address of the subscriber contract.
Parameters:
Name | Type | Description |
---|
_subscriber | address | The address of the subscriber contract. |
setRegistryContract
function setRegistryContract(address _registry) external
Sets the address of the registry contract.
Parameters:
Name | Type | Description |
---|
_registry | address | Sets the address of the registry contract. |
setRoyalty
function setRoyalty(uint256 _royalty) external
Sets the royalty percentage.
Parameters:
Name | Type | Description |
---|
_royalty | address | The royalty percentage to set. |
setAuthorizedWithdrawal
function setAuthorizedWithdrawal(address _addr) external
Sets the authorized withdrawal address.
Parameters:
Name | Type | Description |
---|
_addr | address | The 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:
Name | Type | Description |
---|
_templateId | uint256 | The ID of the template. |
Return Values:
Description | |
---|
uint256 | The mint price of the template. |
getImplementation
function getImplementation(uint8 _implementation) external view returns (address)
Returns the implementation address for a given implementation type.
Parameters:
Name | Type | Description |
---|
_implementation | uint8 | The implementation type. |
Return Values:
Description | |
---|
address | The implementation address. |
getSubscriberContract
function getSubscriberContract() external view returns (address)
Returns the address of the subscriber contract.
Return Values:
Type | Description |
---|
address | The address of the subscriber contract. |
getRoyalty
function getRoyalty() external view returns (uint256)
Returns the protocol royalty percentage for collections.
Return Values:
Type | Description |
---|
address | The protocol royalty percentage. |
getWithdrawalAddress
function getWithdrawalAddress() external view returns (address)
Retrieves the authorized withdrawal address.
Return Values:
Type | Description |
---|
address | The 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:
Type | Description |
---|
uint256 | The royalty percentage |
uint256 | mint price of the template. |
validateAuthorization
function validateAuthorization(address caller) external view returns (bool)
Validates the authorization of a caller.
Parameters:
Name | Type | Description |
---|
caller | address | The address of the caller. |
Return Values:
Type | Description |
---|
bool | True if the caller is authorized, otherwise false. |
Events
SubscriberContractAddressSet
event SubscriberContractAddressSet(address subscriber);
Emitted when the address of the subscriber contract is set.
Parameters:
Name | Type | Description |
---|
subscriber | address | Template IDs |
TemplateContractAddressSet
event TemplateContractAddressSet(address template);
Emitted when the address of the template contract is set.
Parameters:
Name | Type | Description |
---|
template | address | The address of the template contract. |
RegistryContractAddressSet
event RegistryContractAddressSet(address registry);
Emitted when the address of the registry contract is set.
Parameters:
Name | Type | Description |
---|
registry | address | The address of the registry contract. |
RoyaltySet
event RoyaltySet(uint256 royalty);
Emitted when the royalty percentage is set.
Parameters:
Name | Type | Description |
---|
registry | address | The royalty percentage. |
TemplatePricesSet
event TemplatePricesSet(uint256[] templateIds, uint256[] prices);
Emitted when the prices of templates are set.
Parameters:
Name | Type | Description |
---|
templateIds | uint256[] | The IDs of the templates. |
prices | uint256[] | The corresponding prices for the templates. |
AuthorizedWithdrawalSet
event AuthorizedWithdrawalSet(address authorizedWithdrawal);
Emitted when the authorized withdrawal address is set.
Parameters:
Name | Type | Description |
---|
authorizedWithdrawal | address | The authorized withdrawal address. |