Skip to main content

Imported Contracts

It allows external NFT 721 contracts to use subscription feature in the ecosystem.

Functions

subscribeToEntity

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

Subscribes to an entity by setting the subscription information.

Parameters:

NameTypeDescription
_contractaddressThe address of the contract representing the entity.
_owneraddressThe address of the owner of the entity.
_tokenIduint256The ID of the entity token.
_entityIduint256The ID of the entity.
_entityDefaultUristringThe default URI of the entity.

subscribeToEntities

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

Subscribes to multiple entities by setting the subscription information for each entity.

Parameters:

NameTypeDescription
_contractaddressThe address of the contract representing the entities.
_owneraddressThe address of the owner of the entities.
_tokenIduint256The ID of the entity token.
_entityIdsuint256[]The IDs of the entities to subscribe to.
_entityDefaultUrisstring[]The default URIs of the entities.

updateURISlot

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

Updates the URI of a specific entity slot.

  • This function is accessible only to the subscriber.

Parameters:

NameTypeDescription
_contractaddressThe address of the contract representing the entities.
_owneraddressThe address of the owner of the entities.
_entityIduint256The ID of the entity.
_tokenIduint256The ID of the entity token.
_updatedUristringThe updated URI of the entity slot.

transferTokenEntityURI

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

Transfers the URI of a specific entity slot to a new URI.

Parameters:

NameTypeDescription
_contractaddressThe address of the teoken contract.
_owneraddressThe address of the token owner.
_entityIduint256The ID of the token.
_tokenIduint256The ID of the entity.
_transferredUristringThe new URI to transfer the entity slot to.

resetSlotToDefault

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

Resets the URI of a specific entity slot to its default URI.

Parameters:

NameTypeDescription
_contractaddressThe address of the teoken contract.
_owneraddressThe address of the token owner.
_entityIduint256The ID of the token.
_tokenIduint256The ID of the entity.
_entityDefaultUristringThe default URI to reset the entity slot to.

tokenEntityURI

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

Retrieves the URI of a specific entity slot within a token.

Parameters:

NameTypeDescription
_contractaddressThe address of the imported contract.
_owneraddressThe ID of the token.
_entityIduint256The ID of the entity.