1
0
mirror of https://github.com/oceanprotocol/docs.git synced 2024-11-26 19:49:26 +01:00

GITBOOK-241: Updated get data NFT page

This commit is contained in:
Ana Loznianu 2023-05-23 16:49:02 +00:00 committed by gitbook-bot
parent eddf9d7882
commit 1ea6904099
No known key found for this signature in database
GPG Key ID: 07D2180C7B12D0FF
13 changed files with 18 additions and 16 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 116 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 49 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 91 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 45 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 74 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 77 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 77 KiB

View File

@ -27,7 +27,7 @@
* [How to Data Farm](user-guides/how-to-data-farm.md) * [How to Data Farm](user-guides/how-to-data-farm.md)
* [Claim OCEAN Rewards](user-guides/claim-ocean-rewards.md) * [Claim OCEAN Rewards](user-guides/claim-ocean-rewards.md)
* [Liquidity Pools \[deprecated\]](user-guides/remove-liquidity-using-etherscan.md) * [Liquidity Pools \[deprecated\]](user-guides/remove-liquidity-using-etherscan.md)
* [👨💻 Developers](developers/README.md) * [👨💻 👨💻 Developers](developers/README.md)
* [Architecture Overview](developers/architecture.md) * [Architecture Overview](developers/architecture.md)
* [Data NFTs and Datatokens](developers/datanft-and-datatoken.md) * [Data NFTs and Datatokens](developers/datanft-and-datatoken.md)
* [Roles](developers/roles.md) * [Roles](developers/roles.md)

View File

@ -1,14 +1,22 @@
---
description: >-
Explore the Power of Querying: Unveiling In-Depth Details of Individual Data
NFTs
---
# Get data NFT Information # Get data NFT Information
The result of following GraphQL query returns the information about a particular datatoken. Here, `0x1c161d721e6d99f58d47f709cdc77025056c544c` is the address of the dataNFT. Now that you are familiar with the process of retrieving a list of data NFTs 😎, let's explore how to obtain more specific details about a particular NFT through querying. By utilizing the knowledge you have gained, you can customize your GraphQL query to include additional parameters such as the NFT's metadata, creator information, template, or any other relevant data points. This will enable you to delve deeper into the intricacies of a specific NFT and gain a comprehensive understanding of its attributes. With this newfound capability, you can unlock valuable insights and make informed decisions based on the specific details retrieved. So, let's dive into the fascinating world of querying and unravel the unique characteristics of individual data NFTs.
The result of the following GraphQL query returns the information about a particular data NFT. In this example, `0x1c161d721e6d99f58d47f709cdc77025056c544c`.
PS: In this example, the query is executed on the Ocean subgraph deployed on the mainnet. If you want to change the network, please refer to [this table](../ocean-subgraph/#ocean-subgraph-deployments). PS: In this example, the query is executed on the Ocean subgraph deployed on the mainnet. If you want to change the network, please refer to [this table](../ocean-subgraph/#ocean-subgraph-deployments).
{% tabs %} {% tabs %}
{% tab title="Query" %} {% tab title="Query" %}
Copy the query to fetch a list of data NFTs in the Ocean Subgraph [GraphiQL interface](https://v4.subgraph.mainnet.oceanprotocol.com/subgraphs/name/oceanprotocol/ocean-subgraph/graphql) to fetch the results. Copy the query to fetch the information about a data NFT in the Ocean Subgraph [GraphiQL interface](https://v4.subgraph.mainnet.oceanprotocol.com/subgraphs/name/oceanprotocol/ocean-subgraph/graphql). If you want to fetch the information about another NFT, replace the `id` with the address of your choice.
```graphql ```graphql
{ {
@ -96,7 +104,7 @@ print(json.dumps(result, indent=4, sort_keys=True))
{% endtab %} {% endtab %}
{% tab title="Javascript" %} {% tab title="Javascript" %}
The javascript below can be used to run the query. If you wish to change the network, replace the variable's value `baseUrl` as needed. Change the value of the variable `datanftAddress` with the address of the datatoken of your choice. The javascript below can be used to run the query and fetch the information of a data NFT. If you wish to change the network, replace the variable's value `network` as needed. Change the value of the variable `datanftAddress` with the address of your choice.
```runkit nodeVersion="18.x.x" ```runkit nodeVersion="18.x.x"
var axios = require('axios'); var axios = require('axios');
@ -127,14 +135,10 @@ const query = `{
} }
}` }`
const baseUrl = "https://v4.subgraph.mainnet.oceanprotocol.com" const network = "mainnet"
const route = "/subgraphs/name/oceanprotocol/ocean-subgraph"
const url = `${baseUrl}${route}`
var config = { var config = {
method: 'post', method: 'post',
url: url, url: `https://v4.subgraph.${network}.oceanprotocol.com/subgraphs/name/oceanprotocol/ocean-subgraph`,
headers: { "Content-Type": "application/json" }, headers: { "Content-Type": "application/json" },
data: JSON.stringify({ "query": query }) data: JSON.stringify({ "query": query })
}; };
@ -149,8 +153,6 @@ axios(config)
}); });
``` ```
{% endtab %} {% endtab %}
{% endtabs %} {% endtabs %}

View File

@ -20,7 +20,7 @@ PS: In these examples, the query is executed on the Ocean subgraph deployed on t
{% tabs %} {% tabs %}
{% tab title="Query" %} {% tab title="Query" %}
Copy the query to fetch a list of data NFTs in the Ocean Subgraph [GraphiQL interface](https://v4.subgraph.mainnet.oceanprotocol.com/subgraphs/name/oceanprotocol/ocean-subgraph/graphql) to fetch the results. Copy the query to fetch a list of data NFTs in the Ocean Subgraph [GraphiQL interface](https://v4.subgraph.mainnet.oceanprotocol.com/subgraphs/name/oceanprotocol/ocean-subgraph/graphql).
```graphql ```graphql
{ {
@ -40,7 +40,7 @@ Copy the query to fetch a list of data NFTs in the Ocean Subgraph [GraphiQL inte
{% endtab %} {% endtab %}
{% tab title="Python" %} {% tab title="Python" %}
The Python script below can be used to run the query to fetch a list of data NFTs from the subgraph. If you wish to change the network, replace the value of variable `base_url` as needed. The Python script below can be used to run the query to fetch a list of data NFTs from the subgraph. If you wish to change the network, replace the value of the variable `base_url` as needed.
**Create script** **Create script**
@ -88,7 +88,7 @@ python list_dataNFTs.py
{% endtab %} {% endtab %}
{% tab title="Javascript" %} {% tab title="Javascript" %}
The javascript below can be used to run the query. If you wish to change the network, then replace the value of `network` as needed. The javascript below can be used to run the query and retrieve a list of NFTs. If you wish to change the network, then replace the value of `network` variable as needed.
```runkit nodeVersion="18.x.x" ```runkit nodeVersion="18.x.x"
const axios = require('axios') const axios = require('axios')

View File

@ -14,7 +14,7 @@ Liquidity pools and dynamic pricing used to be supported in previous versions of
4\. Go to field `20. balanceOf` and insert your ETH address. This will retrieve your pool share token balance in wei. 4\. Go to field `20. balanceOf` and insert your ETH address. This will retrieve your pool share token balance in wei.
<figure><img src="../.gitbook/assets/wallet/balance-of.png" alt=""><figcaption><p>Balance Of</p></figcaption></figure> <figure><img src="../.gitbook/assets/liquidity/remove-liquidity-2 (2).png" alt=""><figcaption><p>Balance Of</p></figcaption></figure>
5\. Copy this number as later you will use it as the `poolAmountIn` parameter. 5\. Copy this number as later you will use it as the `poolAmountIn` parameter.