Skip to main content

NFT721 V2

airdropMint

  /** IMint */
//Mints a new NFT to a specified owner without requiring the owner to initiate the mint.
function airdropMint(
address _owner,
uint256 _variationId
) external payable

/** IMintURI */
//Mints an NFT to a specified owner with a unique URI, validated by a signature.
function airdropMint(
address owner,
bytes calldata _signature,
string calldata _uri,
bytes calldata _salt
) external payable

/** IMintURIWhitelist */
//Mints an NFT to a specified owner with a unique URI, validated by a signature and Merkle proof.
function airdropMint(
address _owner,
bytes32[] calldata _merkleProof,
bytes calldata _signature,
string calldata _uri,
bytes calldata _salt
) external payable

/** IMintWhitelist */
//Airdrops an NFT with a specified variation ID to a given owner, validated by Merkle proof.
function airdropMint(
address _owner,
bytes32[] calldata _merkleProof,
uint256 _variationId
) external payable

Parameters:

NameTypeDescription
_owneraddressThe address of the recipient of the minted NFT.
_variationIduint256The ID of the token variation to mint.
_signaturebytesThe signature for verification.
_uristringThe URI for the NFT.
_saltbytesThe salt used in signature verification.
_merkleProofbytes32[]An array representing the Merkle proof for whitelist verification.

airdropBatchMint

  /** IMint */
//Mints a new NFT to a specified owner without requiring the owner to initiate the mint.
function airdropBatchMint(
address[] memory _owners,
uint256[] calldata _variationIds
) external payable
/** IMintURI */
//Mints multiple NFTs to specified owners, each with unique URIs and validated by signatures, in a batch process.
function airdropBatchMint(
address[] memory owners,
bytes[] calldata _signatures,
string[] calldata _uris,
bytes[] calldata _salts
) external payable

/** IMintURIWhitelist */
//Mints multiple NFTs to specified owners, each with unique URIs, signatures, and Merkle proofs, in a batch process.
function airdropBatchMint(
address[] memory _owners,
bytes32[][] calldata _merkleProofs,
bytes[] calldata _signatures,
string[] calldata _uris,
bytes[] calldata _salts
) external payable

/** IMintWhitelist */
//Airdrops multiple NFTs with specified variation IDs to given owners, validated by respective Merkle proofs.
function airdropBatchMint(
address[] memory _owners,
bytes32[][] calldata _merkleProofs,
uint256[] calldata _variationIds
) external payable

Parameters:

NameTypeDescription
_ownersaddress[]An array of addresses for the NFT recipients.
_variationIdsuint256[]An array of variation IDs corresponding to each NFT being minted.
_signaturesbytes[]An array of signatures for verification.
_urisstring[]An array of URIs for each NFT.
_saltsbytes[]An array of salts used in signature verification.
_merkleProofsbytes32[][]An array representing the Merkle proof for whitelist verification.

airdropSubscriptionMint

  /** IMint */
//Mints a new NFT with an associated subscription to a specified owner.
function airdropSubscriptionMint(
uint256 _entityId,
address _owner,
uint256 _variationId,
bool _directUpdateEnabled
) external payable

/** IMintURI */
//Mints an NFT with a subscription to a specified owner, with a unique URI, validated by a signature.
function airdropSubscriptionMint(
uint256 _entityId,
address _owner,
bytes calldata _signature,
string calldata _uri,
bytes calldata _salt,
bool _directUpdateEnabled
) external payable

/** IMintURIWhitelist */
//Mints an NFT with a subscription to a specified owner, with a unique URI, validated by a signature and Merkle proof.
function airdropSubscriptionMint(
uint256 _entityId,
address _owner,
bytes32[] calldata _merkleProof,
bytes calldata _signature,
string calldata _uri,
bytes calldata _salt,
bool _directUpdateEnabled
) external payable

/** IMintWhitelist */
//Airdrops an NFT with a specified variation ID to a given owner and subscribes it to an entity, validated by Merkle proof.
function airdropSubscriptionMint(
uint256 _entityId,
address _owner,
bytes32[] calldata _merkleProof,
uint256 _variationId,
bool _directUpdateEnabled
) external payable

Parameters:

NameTypeDescription
_entityIdaddressThe ID of the entity for the subscription.
_owneraddressThe address of the recipient of the minted NFT.
_variationIduint256The ID of the token variation to mint.
_signaturebytesThe signature for verification.
_uristringThe URI for the NFT.
_saltbytesThe salt used in signature verification.
_merkleProofbytes32[]An array representing the Merkle proof for whitelist verification.
_directUpdateEnabledboolA flag indicating whether direct updates are enabled for the entity slot.

airdropBatchSubscriptionMint

  /** IMint */
//Mints multiple NFTs with associated subscriptions to specified owners in a single transaction.
function airdropBatchSubscriptionMint(
uint256 _entityId,
address[] calldata _owners,
uint256[] calldata _variationIds,
bool[] calldata _directUpdateEnableds
) external payable

/** IMintURI */
//Mints multiple NFTs with subscriptions to specified owners, each with unique URIs and validated by signatures, in a batch process.
function airdropBatchSubscriptionMint(
uint256 _entityId,
address[] calldata _owners,
bytes[] calldata _signatures,
string[] calldata _uris,
bytes[] calldata _salts,
bool[] calldata _directUpdateEnableds
) external payable

/** IMintURIWhitelist */
//Mints multiple NFTs with subscriptions to specified owners, each with unique URIs, signatures, and Merkle proofs, in a batch process.
function airdropBatchSubscriptionMint(
uint256 _entityId,
address[] calldata _owners,
bytes32[][] calldata _merkleProofs,
bytes[] calldata _signatures,
string[] calldata _uris,
bytes[] calldata _salts,
bool[] calldata _directUpdateEnableds
) external payable

/** IMintWhitelist */
//Airdrops an NFT with a specified variation ID to a given owner and subscribes it to an entity, validated by Merkle proof.
function airdropSubscriptionMint(
uint256 _entityId,
address _owner,
bytes32[] calldata _merkleProof,
uint256 _variationId,
bool _directUpdateEnabled
) external payable

Parameters:

NameTypeDescription
_entityIdaddressThe ID of the entity for the subscription.
_ownersaddressAn array of recipient addresses for the minted NFTs.
_variationIdsuint256An array of variation IDs corresponding to each NFT being minted.
_signaturesbytes[]An array of signatures for verification.
_urisstring[]An array of URIs for each NFT.
_saltsbytes[]An array of salts used in signature verification.
_merkleProofsbytes32[][]An array representing the Merkle proof for whitelist verification.
_directUpdateEnabledsboolAn array of flags indicating whether direct updates are enabled for each entity slot.

subscriptionMint

  /** IMint */
//Mints a new NFT with an associated subscription to the sender.
function subscriptionMint(
uint256 _variationId,
uint256 _entityId,
bool _directUpdateEnabled
) external payable

/** IMintURI */
//Mints an NFT with a subscription to the sender, with a unique URI, validated by a signature.
function subscriptionMint(
bytes calldata _signature,
string calldata _uri,
bytes calldata _salt,
uint256 _entityId,
bool _directUpdateEnabled
) external payable

/** IMintURIWhitelist */
//Mints an NFT with a subscription to the sender, with a unique URI, validated by a signature and Merkle proof.
function subscriptionMint(
uint256 _entityId,
bytes32[] calldata _merkleProof,
bytes calldata _signature,
string calldata _uri,
bytes calldata _salt,
bool _directUpdateEnabled
) external payable

/** IMintWhitelist */
//Mints an NFT with a specified variation ID to the sender's address and subscribes it to an entity, validated by Merkle proof.
function subscriptionMint(
bytes32[] calldata _merkleProof,
uint256 _variationId,
uint256 _entityId,
bool _directUpdateEnabled
) external payable

Parameters:

NameTypeDescription
_variationIduint256The variation ID of the NFT to be minted.
_entityIduint256The ID of the entity for the subscription.
_signaturebytesThe signature for verification.
_uristringThe URI for the NFT.
_saltbytesThe salt used in signature verification.
_merkleProofbytes32[]An array representing the Merkle proof for whitelist verification.
_directUpdateEnabledboolA flag indicating whether direct updates are enabled for the entity slot.

+++++++++++++++++++++++++

mint

  function mint(uint256 _variationId) external payable

Mints a new token with the specified variation ID.

Parameters:

NameTypeDescription
_variationIduint256The ID of the token variation to mint.

mintBatch

  function mintBatch(uint256[] calldata _variationIds) external payable

Mints new tokens with the specified variation IDs.

Parameters:

NameTypeDescription
_variationIdsuint256[]The IDs of the token variations to mint.

subscribeToEntity

  function subscribeToEntity(
address _owner,
uint256 _tokenId,
uint256 _entityId,
string calldata _entityDefaultUri
) external

Adds a single URI slot to a single non-fungible token (NFT) and initializes the added slot with the given entity's default URI. So that, token owner subscribes to the entity.Entity owner can change the URI of the slot. The added slot's initial state will be pre-filled with the entity's default URI.

Parameters:

NameTypeDescription
_owneraddressThe address of the token owner.
_tokenIduint256The ID of the token to which the slot will be added.
_entityIduint256The ID of the slot's entity.
_entityDefaultUristringThe entity's default URI that will be set to the added slot.

subscribeToEntities

  function subscribeToEntities(
address _owner,
uint256 _tokenId,
uint256[] calldata _entityIds,
string[] calldata _entityDefaultUris
) external

Adds multiple URI slots to a single token in a batch operation. So that, token owner subscribes to the entity.Entity owner can change the URI of the slot. Slots' initial state will be pre-filled with the given default URI values.

Parameters:

NameTypeDescription
_owneraddressThe address of the token owner.
_tokenIduint256The ID of the token to which the slots will be added.
_entityIdsuint256[]An array of IDs for the slots that will be added.
_entityDefaultUrisstring[]An array of default URI values for the added slots.

updateURISlot

  function updateURISlot(
address _owner,
uint256 _entityId,
uint256 _tokenId,
string calldata _updatedUri
) external

Updates the URI of a token's entity slot.

Parameters:

NameTypeDescription
_owneraddressThe address of the token owner.
_entityIduint256The ID of the entity slot.
_tokenIduint256The ID of the token.
_updatedUristringThe updated URI for the entity slot.

directUpdateURISlot

 function directUpdateURISlot(
uint256 _entityId,
uint256 _tokenId,
string calldata _updatedUri
) external

Updates the URI of a token's entity slot without checking the owner.Only the Subscribed entity owner can change the URI of the slot.

Parameters:

NameTypeDescription
_entityIdaddressThe ID of the subscribed entity.
_tokenIduint256The ID of the NFT.
_updatedUristringThe updated URI for the entity slot.

directUpdateURISlots

 function directUpdateURISlots(
uint256 _entityId,
uint256[] calldata _tokenIds,
string[] calldata _updatedUris
) external

Updates the URI of a token's entity slot without checking the owner.Only the Subscribed entity owner can change the URI of the slot.

Parameters:

NameTypeDescription
_entityIdaddressThe ID of the subscribed entity.
_tokenIdsuint256[]The IDs of the entity slot.
_updatedUrisstring[]The updated URI for the entity slot.

transferTokenEntityURI

 function transferTokenEntityURI(
address _owner,
uint256 _tokenId,
uint256 _entityId,
string calldata _transferredUri
) external

Updates the URI of a token's entity slot.

Parameters:

NameTypeDescription
_owneraddressThe address of the token owner.
_tokenIduint256The ID of the token.
_entityIduint256The ID of the entity slot.
_transferredUristringThe new URI for the entity slot.

resetSlotToDefault

  function resetSlotToDefault(
address _owner,
uint256 _tokenId,
uint256 _entityId,
string calldata _entityDefaultUri
) external

Resets the URI of a token's entity slot to its default value.

Parameters:

NameTypeDescription
_owneraddressThe address of the token owner.
_tokenIduint256The ID of the token.
_entityIduint256The ID of the entity slot.
_entityDefaultUristringThe default URI for the entity slot.

transferOwnership

  function transferOwnership(address newOwner) public override;

Transfers the ownership of the collection to a new owner.

Parameters:

NameTypeDescription
_owneraddressThe address of the new owner.

transferCollectionOwnership

 function transferCollectionOwnership(address newOwner) external;

Transfers the ownership of the collection to a new account.

Parameters:

NameTypeDescription
newOwneraddressThe address of the new owner.

withdraw

  function withdraw() external

Allows owners to withdraw their funds from the contract.

protocolWithdraw

  function protocolWithdraw() external

Allows authorized parties to withdraw funds from the contract.

tokenEntityURI

 function tokenEntityURI(uint256 _tokenId, uint256 _entityId) external view returns (string memory)

Returns the entity URI for the given token ID and entity ID.

Parameters:

NameTypeDescription
_tokenIdaddressThe ID of the token whose entity URI is to be returned.
_entityIdaddressThe ID of the entity associated with the given token.

Return Values:

TypeDescription
stringThe URI of the given token's entity slot.

getCollectionInfo

function getCollectionInfo()
external
view
returns (
uint256 entityId,
uint64 collectionId,
uint8 mintType,
uint8 mintPerAccountLimit,
bool isWhitelisted,
bool isFree,
uint256 templateId,
uint256 mintCount,
uint256 totalSupply,
uint256 mintPrice,
string[] memory collectionURIs,
address verifier
)

Returns the information about the collection.

Return Values:

NameTypeDescription
entityIduint256The ID of the entity.
collectionIduint64The ID of the collection.
mintTypeuint8The type of minting.
mintPerAccountLimituint8The maximum number of mints per account.
isWhitelistedboolA flag indicating if the collection is whitelisted.
isFreeboolA flag indicating if the collection is free.
templateIduint256The ID of the template.
mintCountuint256The number of mints.
totalSupplyuint256The total supply of tokens.
mintPriceuint256The price of minting.
collectionURIsstring[]An array of collection URIs.
verifieraddressThe address of the verifier.

Return Values:

TypeDescription
stringThe URI of the given token's entity slot.

getRoyaltyInfo

  function getRoyaltyInfo()
external
view
returns (
uint256 royalty,
uint256 withdrawnAmountByOwner,
uint256 withdrawnAmountByProtocol,
uint256 savedAmountOwner,
uint256 totalWithdrawn
)

Returns information about the royalty configuration and amounts.

Return Values:

NameTypeDescription
royaltyuint256The royalty percentage set for the protocol.
withdrawnAmountByOwneruint256The total amount withdrawn by the owner.
withdrawnAmountByProtocoluint256The total amount withdrawn by the protocol.
savedAmountOwneruint256The amount saved by the owner.
totalWithdrawnuint256The total amount withdrawn overall.

getTokenSubscriptionInfo

function getTokenSubscriptionInfo(
uint256 _tokenId,
uint256 _entityId
) external view returns (
bool isSubscribed,
string memory uri,
bool directUpdateEnabled
)

Retrieves subscription information for a specific token and entity.

Parameters:

NameTypeDescription
_tokenIduint256The ID of the token.
_entityIduint256The ID of the slot's entity.

Return Values:

NameTypeDescription
isSubscribedboolA boolean value indicating whether the entity is subscribed to the token (true = subscribed, false = not subscribed).
uristringA string representing the URI associated with the subscription, typically pointing to relevant resources or metadata. owner.
directUpdateEnabledboolA boolean flag indicating if direct updates are enabled for this subscription.

getProtocolBalance

function getProtocolBalance() external view returns (uint256)

Returns the balance of the protocol.

Return Values:

TypeDescription
uint256The balance of the protocol after deducting the owner's saved amount and calculating the royalty.

getOwnerBalance

 function getOwnerBalance() external view returns (uint256)

Returns the balance of the owner.

Return Values:

TypeDescription
uint256The balance of the owner after deducting the owner's saved amount and calculating the royalty.

getProtocolRoyalty

 function getProtocolRoyalty() external view returns (uint256)

Returns the royalty percentage set for the protocol.

Return Values:

TypeDescription
uint256The royalty percentage for the protocol.