1
0
mirror of https://github.com/oceanprotocol/docs.git synced 2024-11-01 15:55:34 +01:00

GITBOOK-419: Finished the datatoken templates plage

This commit is contained in:
Ana Loznianu 2023-06-06 11:54:28 +00:00 committed by gitbook-bot
parent fcb966bc4a
commit 800168a270
No known key found for this signature in database
GPG Key ID: 07D2180C7B12D0FF

View File

@ -23,27 +23,27 @@ The details regarding currently supported **datatoken templates** are as follows
The regular template allows users to buy/sell/hold datatokens. The datatokens can be minted by the address having a [`MINTER`](roles.md#minter) role, making the supply of datatoken variable. This template is assigned _**templateId**_ `1` and the source code is available [here](https://github.com/oceanprotocol/contracts/blob/v4main/contracts/templates/ERC20Template.sol).
### **Enterprise template**
The enterprise template has additional functions apart from methods in the ERC20 interface. This additional feature allows access to the service by paying in the basetoken instead of the datatoken. Internally, the smart contract handles the conversion of basetoken to datatoken, initiating an order to access the service, and minting/burning the datatoken. The total supply of the datatoken effectively remains 0 in the case of the enterprise template. This template is assigned _**templateId**_ `2` and the source code is available [here](https://github.com/oceanprotocol/contracts/blob/v4main/contracts/templates/ERC20TemplateEnterprise.sol).
To identify the template used for a specific asset within the Ocean Protocol, you can easily retrieve this information using any network explorer. Here are the steps to follow:
#### Retrieve the template
To identify the template used for a specific asset, you can easily retrieve this information using the network explorer. Here are the steps to follow:
1. Visit the network explorer where the asset was published.
2. Search for the datatoken address
2. Search for the datatoken address :mag:
3. Once you have located the datatoken address, click on the contract tab to access more details.
4. Within the contract details, we can identify and determine the template used for the asset.
 
Let's identify together the template of [this](https://market.oceanprotocol.com/asset/did:op:cd086344c275bc7c560e91d472be069a24921e73a2c3798fb2b8caadf8d245d6) asset published in the Ocean Market: 
We like making things easy :sunglasses: so here is an even easier way to retrieve the info for [this](https://market.oceanprotocol.com/asset/did:op:cd086344c275bc7c560e91d472be069a24921e73a2c3798fb2b8caadf8d245d6) asset published in the Ocean Market: 
{% @arcade/embed flowId="wxBPSc42eSYUiawSY8rC" url="https://app.arcade.software/share/wxBPSc42eSYUiawSY8rC" %}
{% hint style="info" %}
_Ocean Protocol might support additional variations of data NFT/datatoken by adding new templates._
_It's important to note that Ocean Protocol may introduce new templates to support additional variations of data NFTs and datatokens in the future._
{% endhint %}