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:
Name | Type | Description |
---|---|---|
_contract | address | The address of the contract representing the entity. |
_owner | address | The address of the owner of the entity. |
_tokenId | uint256 | The ID of the entity token. |
_entityId | uint256 | The ID of the entity. |
_entityDefaultUri | string | The 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:
Name | Type | Description |
---|---|---|
_contract | address | The address of the contract representing the entities. |
_owner | address | The address of the owner of the entities. |
_tokenId | uint256 | The ID of the entity token. |
_entityIds | uint256[] | The IDs of the entities to subscribe to. |
_entityDefaultUris | string[] | 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:
Name | Type | Description |
---|---|---|
_contract | address | The address of the contract representing the entities. |
_owner | address | The address of the owner of the entities. |
_entityId | uint256 | The ID of the entity. |
_tokenId | uint256 | The ID of the entity token. |
_updatedUri | string | The 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:
Name | Type | Description |
---|---|---|
_contract | address | The address of the teoken contract. |
_owner | address | The address of the token owner. |
_entityId | uint256 | The ID of the token. |
_tokenId | uint256 | The ID of the entity. |
_transferredUri | string | The 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:
Name | Type | Description |
---|---|---|
_contract | address | The address of the teoken contract. |
_owner | address | The address of the token owner. |
_entityId | uint256 | The ID of the token. |
_tokenId | uint256 | The ID of the entity. |
_entityDefaultUri | string | The 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:
Name | Type | Description |
---|---|---|
_contract | address | The address of the imported contract. |
_owner | address | The ID of the token. |
_entityId | uint256 | The ID of the entity. |