Skip to main content

Subscription

Subscription is a unique feature. This feature allows NFT owners to store multiple URIs(in other words: "assets") and update their NFT metadata over time, making NFTs more dynamic and adaptable to market changes.

If you would like to learn more about Subscription feature please check our Glossary here.

Subscriptions

Here are the functions that you can use to subscribe to an entity in mQuarkSubscriber contract;

V1 NFTs

/**
* @param _tokenId The ID of the token being subscribed to
* @param _tokenContract The address of the token contract
* @param _subscriptionId The ID of the subscription being purchased
* @param _directUpdateEnabled Boolean indicating if direct update is enabled
*/
function subscribeToEntity(
uint256 _tokenId,
address _tokenContract,
uint256 _subscriptionId,
bool _directUpdateEnabled
) external payable;
  • Subscribe to multiple Entities
/** 
* See subscribeToEntity
*/
function subscribeToEntities(
uint256 _tokenId,
address _tokenContract,
uint256[] calldata _subscriptionIds,
bool[] calldata _directUpdateEnabled
) external payable;

V2 NFTs

  • Extends V1 NFTS
/** Mints a new NFT with an associated subscription to a specified owner.
* @param _entityId The ID of the entity for the subscription.
* @param _owner The address of the recipient of the minted NFT.
* @param _variationId The variation ID of the NFT to be minted.
* @param _directUpdateEnabled A flag indicating whether direct updates are enabled for the entity slot.
*/
function airdropSubscriptionMint(
uint256 _entityId,
address _owner,
uint256 _variationId,
bool _directUpdateEnabled
) external payable;
/**
* See airdropSubscriptionMint
*/
function airdropBatchSubscriptionMint(
uint256 _entityId,
address[] calldata _owners,
uint256[] calldata _variationIds,
bool[] calldata _directUpdateEnableds
) external payable;
/**
* @notice Mints a new NFT with an associated subscription to the sender.
* @param _variationId The variation ID of the NFT to be minted.
* @param _entityId The ID of the entity for the subscription.
* @param _directUpdateEnabled A flag indicating whether direct updates are enabled for the entity slot.
*/
function subscriptionMint(
uint256 _variationId,
uint256 _entityId,
bool _directUpdateEnabled
) external payable;

Further details can be found here.