// Note: Make sure .env file and config.js are created and setup correctly
+// Note: Make sure .env file and config.js are created and setup correctly
const { oceanConfig } = require('./config.js');
const { ZERO_ADDRESS, NftFactory, getHash, Nft } = require ('@oceanprotocol/lib');
diff --git a/developers/ocean.js/configuration.md b/developers/ocean.js/configuration.md
index 4b092fb5..a01ed4c9 100644
--- a/developers/ocean.js/configuration.md
+++ b/developers/ocean.js/configuration.md
@@ -32,7 +32,7 @@ The below tabs show partially filled `.env` file content for some of the support
{% tabs %}
{% tab title="Mainnet" %}
{% code title=".env" %}
-```
+```bash
# Mandatory environment variables
OCEAN_NETWORK=mainnet
@@ -49,7 +49,7 @@ PROVIDER_URL=https://v4.provider.oceanprotocol.com
{% tab title="Polygon" %}
{% code title=".env" %}
-```
+```bash
# Mandatory environment variables
OCEAN_NETWORK=polygon
@@ -66,7 +66,7 @@ PROVIDER_URL=https://v4.provider.oceanprotocol.com
{% tab title="Local (using Barge)" %}
{% code title=".env" %}
-```
+```bash
# Mandatory environment variables
OCEAN_NETWORK=development
OCEAN_NETWORK_URL=http://172.15.0.3:8545/
diff --git a/developers/ocean.js/consume-asset.md b/developers/ocean.js/consume-asset.md
index 22050326..791672db 100644
--- a/developers/ocean.js/consume-asset.md
+++ b/developers/ocean.js/consume-asset.md
@@ -31,7 +31,7 @@ The variable **AQUARIUS\_URL** and **PROVIDER\_URL** should be set correctly in
Create a new file in the same working directory where configuration file (`config.js`) and `.env` files are present, and copy the code as listed below.
-// Note: Make sure .env file and config.js are created and setup correctly
+// Note: Make sure .env file and config.js are created and setup correctly
const { oceanConfig } = require('./config.js');
const { ZERO_ADDRESS, NftFactory, getHash, Nft } = require ('@oceanprotocol/lib');
diff --git a/developers/ocean.js/creating-datanft.md b/developers/ocean.js/creating-datanft.md
index a3deedf8..2430683b 100644
--- a/developers/ocean.js/creating-datanft.md
+++ b/developers/ocean.js/creating-datanft.md
@@ -17,7 +17,7 @@ First, create a new file in the working directory, alongside the `config.js` and
{% tabs %}
{% tab title="create_dataNFT.js" %}
-{% code title="create_dataNFT.js" %}
+{% code title="create_dataNFT.js" overflow="wrap" %}
```javascript
// Note: Make sure .env file and config.js are created and setup correctly
const { oceanConfig } = require('./config.js');
diff --git a/developers/ocean.js/mint-datatoken.md b/developers/ocean.js/mint-datatoken.md
index dd9a839f..ee495cf5 100644
--- a/developers/ocean.js/mint-datatoken.md
+++ b/developers/ocean.js/mint-datatoken.md
@@ -15,7 +15,7 @@ Create a new file in the same working directory where configuration file (`confi
{% tabs %}
{% tab title="mint_datatoken.js" %}
-{% code title="mint_datatoken.js" %}
+{% code title="mint_datatoken.js" overflow="wrap" %}
```javascript
// Note: Make sure .env file and config.js are created and setup correctly
const { oceanConfig } = require('./config.js');
@@ -78,7 +78,7 @@ createMINT()
**Execute script**
-```
+```bash
node mint_datatoken.js
```
{% endtab %}
diff --git a/developers/ocean.js/publish.md b/developers/ocean.js/publish.md
index 98cb1c12..0799a2a3 100644
--- a/developers/ocean.js/publish.md
+++ b/developers/ocean.js/publish.md
@@ -32,7 +32,7 @@ The `createFRE()` performs the following:
{% tabs %}
{% tab title="create_datatoken_with_fre.js" %}
-{% code title="create_datatoken_with_fre.js" %}
+{% code title="create_datatoken_with_fre.js" overflow="wrap" %}
```javascript
// Note: Make sure .env file and config.js are created and setup correctly
const { oceanConfig } = require('./config.js');
@@ -109,13 +109,13 @@ createFRE()
Execute script
-```
+```bash
node create_datatoken_with_fre.js
```
{% endtab %}
{% tab title="create_datatoken_with_free.js" %}
-{% code title="create_datatoken_with_free.js" %}
+{% code title="create_datatoken_with_free.js" overflow="wrap" %}
```javascript
// Note: Make sure .env file and config.js are created and setup correctly
const { oceanConfig } = require('./config.js');
diff --git a/developers/ocean.js/remove-asset.md b/developers/ocean.js/remove-asset.md
index 369db075..86c93130 100644
--- a/developers/ocean.js/remove-asset.md
+++ b/developers/ocean.js/remove-asset.md
@@ -41,6 +41,7 @@ The variable **AQUARIUS\_URL** and **PROVIDER\_URL** should be set correctly in
Create a new file in the same working directory where configuration file (`config.js`) and `.env` files are present, and copy the code as listed below.
+{% code overflow="wrap" %}
```javascript
// Note: Make sure .env file and config.js are created and setup correctly
const { oceanConfig } = require('./config.js');
@@ -85,4 +86,5 @@ updateAssetState(did).then(() => {
process.exit(1);
});
```
+{% endcode %}
diff --git a/developers/ocean.js/update-metadata.md b/developers/ocean.js/update-metadata.md
index 477dea3c..348d3eea 100644
--- a/developers/ocean.js/update-metadata.md
+++ b/developers/ocean.js/update-metadata.md
@@ -19,7 +19,7 @@ Create a new file in the same working directory where configuration file (`confi
{% tabs %}
{% tab title="ocean.js" %}
-{% code title="updateMetadata.js" %}
+{% code title="updateMetadata.js" overflow="wrap" %}
```javascript
// Note: Make sure .env file and config.js are created and setup correctly
const { oceanConfig } = require('./config.js');
diff --git a/developers/provider/authentication-endpoints.md b/developers/provider/authentication-endpoints.md
index 87c7745b..49282177 100644
--- a/developers/provider/authentication-endpoints.md
+++ b/developers/provider/authentication-endpoints.md
@@ -19,17 +19,21 @@ Please note that if a signature parameter exists, it will take precedence over t
**Curl Example:**
+{% code overflow="wrap" %}
```
GET /api/services/createAuthToken?address=&&nonce=&&expiration=&signature=
```
+{% endcode %}
Inside the angular brackets, the user should provide the valid values for the request.
Response:
+{% code overflow="wrap" %}
```
{"token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE2NjAwNTMxMjksImFkZHJlc3MiOiIweEE3OGRlYjJGYTc5NDYzOTQ1QzI0Nzk5MTA3NUUyYTBlOThCYTdBMDkifQ.QaRqYeSYxZpnFayzPmUkj8TORHHJ_vRY-GL88ZBFM0o"}
```
+{% endcode %}
#### Javascript Example:
@@ -68,7 +72,8 @@ Returns: Success message if token is successfully deleted. If the token is not f
#### Javascript Example:
-```
+{% code overflow="wrap" %}
+```javascript
const axios = require('axios');
// Define the address, token, and signature
@@ -98,6 +103,7 @@ axios.delete(deleteAuthTokenURL, {
});
```
+{% endcode %}
Replace ``, ``, ``, and `` with actual values. This script sends a DELETE request to the `deleteAuthToken` endpoint and logs the response. Please ensure that `axios` is installed in your environment (`npm install axios`).
diff --git a/developers/provider/compute-endpoints.md b/developers/provider/compute-endpoints.md
index 884bc332..ff467faf 100644
--- a/developers/provider/compute-endpoints.md
+++ b/developers/provider/compute-endpoints.md
@@ -40,6 +40,7 @@ Start a new job
Parameters
+{% code overflow="wrap" %}
```
signature: String object containg user signature (signed message) (required)
consumerAddress: String object containing consumer's ethereum address (required)
@@ -62,12 +63,13 @@ Parameters
One of `algorithm.documentId` or `algorithm.meta` is required, `algorithm.meta` takes precedence
```
+{% endcode %}
Returns: Array of `status` objects as described above, in this case the array will have only one object
Example:
-```
+```json
POST /api/compute
payload:
{
@@ -104,6 +106,7 @@ Get all jobs and corresponding stats
Parameters
+{% code overflow="wrap" %}
```
signature: String object containg user signature (signed message)
documentId: String object containing document did (optional)
@@ -112,6 +115,7 @@ Parameters
At least one parameter from documentId, jobId and owner is required (can be any of them)
```
+{% endcode %}
Returns
@@ -178,9 +182,11 @@ Returns: Bytes string containing the compute result.
Example:
+{% code overflow="wrap" %}
```
GET /api/services/computeResult?index=0&consumerAddress=0xA78deb2Fa79463945C247991075E2a0e98Ba7A09&jobId=4d32947065bb46c8b87c1f7adfb7ed8b&nonce=1644317370
```
+{% endcode %}
Response:
@@ -196,6 +202,7 @@ Stop a running compute job.
Parameters
+{% code overflow="wrap" %}
```
signature: String object containg user signature (signed message)
documentId: String object containing document did (optional)
@@ -204,6 +211,7 @@ Parameters
At least one parameter from documentId,jobId and owner is required (can be any of them)
```
+{% endcode %}
Returns
@@ -275,15 +283,18 @@ Allows download of asset data file.
Parameters
+{% code overflow="wrap" %}
```
+chainID: Int object representing the chain ID that the Provider is connected to (mandatory)
```
+{% endcode %}
Returns: List of compute environments.
Example:
```
-GET /api/services/computeEnvironments
+GET /api/services/computeEnvironments?chainId=8996
```
Response:
diff --git a/developers/provider/encryption-decryption.md b/developers/provider/encryption-decryption.md
index e4c10a26..9ccdde2d 100644
--- a/developers/provider/encryption-decryption.md
+++ b/developers/provider/encryption-decryption.md
@@ -10,7 +10,7 @@
Example response:
-```
+```python
b'0x04b2bfab1f4e...7ed0573'
```
@@ -48,7 +48,8 @@ console.log(response)
#### Javascript Example
-```
+{% code overflow="wrap" %}
+```javascript
const axios = require('axios');
async function decryptAsset(payload) {
@@ -87,11 +88,14 @@ let payload = {
decryptAsset(payload);
```
+{% endcode %}
Example response:
-```
+{% code overflow="wrap" %}
+```python
b'{"@context": ["https://w3id.org/did/v1"], "id": "did:op:0c184915b07b44c888d468be85a9b28253e80070e5294b1aaed81c ...'
```
+{% endcode %}
diff --git a/developers/provider/general-endpoints.md b/developers/provider/general-endpoints.md
index 7ccbe131..4eac9b60 100644
--- a/developers/provider/general-endpoints.md
+++ b/developers/provider/general-endpoints.md
@@ -14,7 +14,7 @@ Here are some typical responses you might receive from the API:
Example response:
-```
+```json
{
"nonce": 23
}
@@ -96,7 +96,7 @@ Before calling the `/download` endpoint, you need to follow these steps:
3. Sign a message from the account that has purchased the datatoken.
4. Add the nonce and signature to the payload.
-```
+```javascript
const axios = require('axios');
async function downloadAsset(payload) {
@@ -157,7 +157,7 @@ The datatoken is transferred on the blockchain by requesting the user to sign an
#### Javascript Example
-```
+```javascript
const axios = require('axios');
async function initializeServiceAccess(payload) {
diff --git a/developers/storage.md b/developers/storage.md
index a8ac5954..ab7fa4b1 100644
--- a/developers/storage.md
+++ b/developers/storage.md
@@ -29,7 +29,7 @@ Parameters:
* `method` - The HTTP method, required
* `headers` - Additional HTTP headers, optional
-```
+```json
{
"type": "url",
"url": "https://url.com/file1.csv",
@@ -52,7 +52,7 @@ Parameters:
* `hash` - The file hash
-```
+```json
{
"type": "ipfs",
"hash": "XXX"
@@ -71,7 +71,7 @@ Parameters:
* `query` - The query to be executed, required
* `headers` - Additional HTTP headers, optional
-```
+```json
{
"type": "graphql",
"url": "http://172.15.0.15:8000/subgraphs/name/oceanprotocol/ocean-subgraph",
@@ -99,7 +99,8 @@ Parameters:
* `address` - The smartcontract address, required
* `abi` - The function abi (NOT the entire contract abi), required
-```
+{% code overflow="wrap" %}
+```json
{
"type": "smartcontract",
"chainId": 1,
@@ -113,6 +114,7 @@ Parameters:
}
}
```
+{% endcode %}
## Arweave
@@ -122,7 +124,7 @@ Parameters:
* `transactionId` - The transaction identifier
-```
+```json
{
{
"type": "arweave",
@@ -172,4 +174,4 @@ To get information about the files after encryption, the `/fileinfo` endpoint of
]
```
-This only concerns metadata about a file, but never the file URLs. The only way to decrypt them is to exchange at least 1 datatoken based on the respective service pricing scheme.
\ No newline at end of file
+This only concerns metadata about a file, but never the file URLs. The only way to decrypt them is to exchange at least 1 datatoken based on the respective service pricing scheme.
diff --git a/developers/subgraph/get-datatoken-buyers.md b/developers/subgraph/get-datatoken-buyers.md
index d3145411..d610c372 100644
--- a/developers/subgraph/get-datatoken-buyers.md
+++ b/developers/subgraph/get-datatoken-buyers.md
@@ -71,41 +71,41 @@ The Python script below can be used to run the query and fetch the list of buyer
**Create Script**
+{% code title="datatoken_buyers.py" %}
```python
-datatoken_information.py
import requests
import json
datatoken_address = "0xc22bfd40f81c4a28c809f80d05070b95a11829d9"
query = """
{{
- token(id : "${datatoken_address}") {
- id,
- orders(
- orderBy: createdTimestamp
- orderDirection: desc
- first: 1000
- ) {
- id
- consumer {
- id
- }
- payer {
- id
- }
- reuses {
- id
- }
- block
- createdTimestamp
- amount
- }
- }
+ token(id:"{0}"){{
+ id,
+ orders(
+ orderBy: createdTimestamp
+ orderDirection: desc
+ first: 1000
+ ){{
+ id
+ consumer{{
+ id
+ }}
+ payer{{
+ id
+ }}
+ reuses{{
+ id
+ }}
+ block
+ createdTimestamp
+ amount
+ }}
+ }}
}}""".format(
datatoken_address
)
-base_url = "https://v4.subgraph.mumbai.oceanprotocol.com/"
+base_url = "https://v4.subgraph.mumbai.oceanprotocol.com"
route = "/subgraphs/name/oceanprotocol/ocean-subgraph"
url = base_url + route
@@ -117,6 +117,7 @@ result = json.loads(response.text)
print(json.dumps(result, indent=4, sort_keys=True))
```
+{% endcode %}
**Execute Script**
@@ -160,211 +161,213 @@ Copy the query to fetch the list of buyers for a datatoken in the Ocean Subgraph
Sample response
+{% code overflow="wrap" %}
```json
{
- "data": {
- "token": {
- "id": "0xc22bfd40f81c4a28c809f80d05070b95a11829d9",
- "orders": [
- {
- "id": "0xd65c927af039bed60be4bfcb00a75eebe7db695598350ba9bc6cb5d6a6180062-0xc22bfd40f81c4a28c809f80d05070b95a11829d9-0x0b58857708a6f84e7ee04beaef069a7e6d1d4a0b-38.0",
- "consumer": {
- "id": "0x0b58857708a6f84e7ee04beaef069a7e6d1d4a0b"
- },
- "payer": {
- "id": "0x0b58857708a6f84e7ee04beaef069a7e6d1d4a0b"
- },
- "reuses": [],
- "block": 36669814,
- "createdTimestamp": 1686386048,
- "amount": "1"
- },
- {
- "id": "0x118317568256f457a6ac29ba03875ad83815d5d8ec834c721ea20d80643d8629-0xc22bfd40f81c4a28c809f80d05070b95a11829d9-0x027bfbe29df80bde49845b6fecf5e4ed14518f1f-0.0",
- "consumer": {
- "id": "0x027bfbe29df80bde49845b6fecf5e4ed14518f1f"
- },
- "payer": {
- "id": "0x027bfbe29df80bde49845b6fecf5e4ed14518f1f"
- },
- "reuses": [],
- "block": 35582325,
- "createdTimestamp": 1684067341,
- "amount": "1"
- },
- {
- "id": "0xe9668b60b5fe7cbfacf0311ae4dc93c50c43484c0a8cf94db783ffbee1be7cd5-0xc22bfd40f81c4a28c809f80d05070b95a11829d9-0x86874bf84f0d27dcfc6c4c34ab99aad8ced8d892-1.0",
- "consumer": {
- "id": "0x86874bf84f0d27dcfc6c4c34ab99aad8ced8d892"
- },
- "payer": {
- "id": "0x86874bf84f0d27dcfc6c4c34ab99aad8ced8d892"
- },
- "reuses": [],
- "block": 35578590,
- "createdTimestamp": 1684059403,
- "amount": "1"
- },
- {
- "id": "0x047a7ce1b3c69a5fc4c2c8078a2cc356164519077ef095265e4bcba1e0baf6c9-0xc22bfd40f81c4a28c809f80d05070b95a11829d9-0xb62e762af637b49eb4870bce8fe21bfff189e495-0.0",
- "consumer": {
- "id": "0xb62e762af637b49eb4870bce8fe21bfff189e495"
- },
- "payer": {
- "id": "0xb62e762af637b49eb4870bce8fe21bfff189e495"
- },
- "reuses": [],
- "block": 35511102,
- "createdTimestamp": 1683915991,
- "amount": "1"
- },
- {
- "id": "0x8cbfb5a85d43f5a5b4aff4a2d657fe7dac4528a86cc78f21897fdd0169d3b3c3-0xc22bfd40f81c4a28c809f80d05070b95a11829d9-0x85c1bbdc1b6a199e0964cb849deb59aef3045edd-0.0",
- "consumer": {
- "id": "0x85c1bbdc1b6a199e0964cb849deb59aef3045edd"
- },
- "payer": {
- "id": "0x85c1bbdc1b6a199e0964cb849deb59aef3045edd"
- },
- "reuses": [],
- "block": 35331127,
- "createdTimestamp": 1683533500,
- "amount": "1"
- },
- {
- "id": "0x246637f9a410664c6880e7768880696763e7fd66aa7cc286fdc62d5d8589481c-0xc22bfd40f81c4a28c809f80d05070b95a11829d9-0xf9df381272afc2d1bd8fbbc0061cdb1d387c2032-3.0",
- "consumer": {
- "id": "0xf9df381272afc2d1bd8fbbc0061cdb1d387c2032"
- },
- "payer": {
- "id": "0xf9df381272afc2d1bd8fbbc0061cdb1d387c2032"
- },
- "reuses": [],
- "block": 35254580,
- "createdTimestamp": 1683370838,
- "amount": "1"
- },
- {
- "id": "0xed9bcc6149cab8ee67a38d6b423a05ca328533d43ff83aff140fe9c424e449ee-0xc22bfd40f81c4a28c809f80d05070b95a11829d9-0x726ab53c8da3efed40a32fe6ab5daa65b9da7ede-9.0",
- "consumer": {
- "id": "0x726ab53c8da3efed40a32fe6ab5daa65b9da7ede"
- },
- "payer": {
- "id": "0x726ab53c8da3efed40a32fe6ab5daa65b9da7ede"
- },
- "reuses": [],
- "block": 35110175,
- "createdTimestamp": 1683063962,
- "amount": "1"
- },
- {
- "id": "0xa97fa2c99f8e5f16ba7245989830c552bace1f72476f5dee4da01c0d56ada7be-0xc22bfd40f81c4a28c809f80d05070b95a11829d9-0x56e08babb8bf928bd8571d2a2a78235ae57ae5bd-12.0",
- "consumer": {
- "id": "0x56e08babb8bf928bd8571d2a2a78235ae57ae5bd"
- },
- "payer": {
- "id": "0x56e08babb8bf928bd8571d2a2a78235ae57ae5bd"
- },
- "reuses": [],
- "block": 35053093,
- "createdTimestamp": 1682942664,
- "amount": "1"
- },
- {
- "id": "0xb9b72efad41ded4fcb7e23f14a7caa3ebc4fdfbb710318cbf25d92068c8a650d-0xc22bfd40f81c4a28c809f80d05070b95a11829d9-0x56e08babb8bf928bd8571d2a2a78235ae57ae5bd-0.0",
- "consumer": {
- "id": "0x56e08babb8bf928bd8571d2a2a78235ae57ae5bd"
- },
- "payer": {
- "id": "0x56e08babb8bf928bd8571d2a2a78235ae57ae5bd"
- },
- "reuses": [],
- "block": 34985052,
- "createdTimestamp": 1682798076,
- "amount": "1"
- },
- {
- "id": "0x9d616c85fdfe8655640bf77ecea0e42a7a9d331c5f51975f2a56b4f5ac8ec955-0xc22bfd40f81c4a28c809f80d05070b95a11829d9-0x3f0cc2ad70839e2b684f173389f7dd71fe5186ff-0.0",
- "consumer": {
- "id": "0x3f0cc2ad70839e2b684f173389f7dd71fe5186ff"
- },
- "payer": {
- "id": "0x3f0cc2ad70839e2b684f173389f7dd71fe5186ff"
- },
- "reuses": [],
- "block": 34984847,
- "createdTimestamp": 1682797640,
- "amount": "1"
- },
- {
- "id": "0x16eee832f9e85ca8ac8f82aecb8861e5bb5378c2771bf9abd3930b9438dbbc01-0xc22bfd40f81c4a28c809f80d05070b95a11829d9-0x3f0cc2ad70839e2b684f173389f7dd71fe5186ff-9.0",
- "consumer": {
- "id": "0x3f0cc2ad70839e2b684f173389f7dd71fe5186ff"
- },
- "payer": {
- "id": "0x3f0cc2ad70839e2b684f173389f7dd71fe5186ff"
- },
- "reuses": [],
- "block": 34982389,
- "createdTimestamp": 1682792418,
- "amount": "1"
- },
- {
- "id": "0x5264d4694fc78d9211a658363d98571f8d455dfcf89f3450520909416a103c2c-0xc22bfd40f81c4a28c809f80d05070b95a11829d9-0x3f0cc2ad70839e2b684f173389f7dd71fe5186ff-0.0",
- "consumer": {
- "id": "0x3f0cc2ad70839e2b684f173389f7dd71fe5186ff"
- },
- "payer": {
- "id": "0x3f0cc2ad70839e2b684f173389f7dd71fe5186ff"
- },
- "reuses": [],
- "block": 34980112,
- "createdTimestamp": 1682787580,
- "amount": "1"
- },
- {
- "id": "0x7222faab923d80218b242aec2670c1a775c77a254a28782e04aed5cb36c395d3-0xc22bfd40f81c4a28c809f80d05070b95a11829d9-0x616b5249aaf1c924339f8b8e94474e64ceb22af3-18.0",
- "consumer": {
- "id": "0x616b5249aaf1c924339f8b8e94474e64ceb22af3"
- },
- "payer": {
- "id": "0x616b5249aaf1c924339f8b8e94474e64ceb22af3"
- },
- "reuses": [],
- "block": 34969169,
- "createdTimestamp": 1682764326,
- "amount": "1"
- },
- {
- "id": "0x3eae9d33fe3223e25ca058955744c98ba8aa211b1e3e1bf62eb653c0d0441b79-0xc22bfd40f81c4a28c809f80d05070b95a11829d9-0x71eb23e03d3005803db491639a7ebb717810bd04-0.0",
- "consumer": {
- "id": "0x71eb23e03d3005803db491639a7ebb717810bd04"
- },
- "payer": {
- "id": "0x71eb23e03d3005803db491639a7ebb717810bd04"
- },
- "reuses": [],
- "block": 34938635,
- "createdTimestamp": 1682699439,
- "amount": "1"
- },
- {
- "id": "0x8dfe458aa689a29ceea3208f55856420dbfd80ed777fd01103581cff9d7d76b7-0xc22bfd40f81c4a28c809f80d05070b95a11829d9-0x726ab53c8da3efed40a32fe6ab5daa65b9da7ede-0.0",
- "consumer": {
- "id": "0x726ab53c8da3efed40a32fe6ab5daa65b9da7ede"
- },
- "payer": {
- "id": "0x726ab53c8da3efed40a32fe6ab5daa65b9da7ede"
- },
- "reuses": [],
- "block": 34938633,
- "createdTimestamp": 1682699435,
- "amount": "1"
+ "data": {
+ "token": {
+ "id": "0xc22bfd40f81c4a28c809f80d05070b95a11829d9",
+ "orders": [
+ {
+ "amount": "1",
+ "block": 36669814,
+ "consumer": {
+ "id": "0x0b58857708a6f84e7ee04beaef069a7e6d1d4a0b"
+ },
+ "createdTimestamp": 1686386048,
+ "id": "0xd65c927af039bed60be4bfcb00a75eebe7db695598350ba9bc6cb5d6a6180062-0xc22bfd40f81c4a28c809f80d05070b95a11829d9-0x0b58857708a6f84e7ee04beaef069a7e6d1d4a0b-38.0",
+ "payer": {
+ "id": "0x0b58857708a6f84e7ee04beaef069a7e6d1d4a0b"
+ },
+ "reuses": []
+ },
+ {
+ "amount": "1",
+ "block": 35582325,
+ "consumer": {
+ "id": "0x027bfbe29df80bde49845b6fecf5e4ed14518f1f"
+ },
+ "createdTimestamp": 1684067341,
+ "id": "0x118317568256f457a6ac29ba03875ad83815d5d8ec834c721ea20d80643d8629-0xc22bfd40f81c4a28c809f80d05070b95a11829d9-0x027bfbe29df80bde49845b6fecf5e4ed14518f1f-0.0",
+ "payer": {
+ "id": "0x027bfbe29df80bde49845b6fecf5e4ed14518f1f"
+ },
+ "reuses": []
+ },
+ {
+ "amount": "1",
+ "block": 35578590,
+ "consumer": {
+ "id": "0x86874bf84f0d27dcfc6c4c34ab99aad8ced8d892"
+ },
+ "createdTimestamp": 1684059403,
+ "id": "0xe9668b60b5fe7cbfacf0311ae4dc93c50c43484c0a8cf94db783ffbee1be7cd5-0xc22bfd40f81c4a28c809f80d05070b95a11829d9-0x86874bf84f0d27dcfc6c4c34ab99aad8ced8d892-1.0",
+ "payer": {
+ "id": "0x86874bf84f0d27dcfc6c4c34ab99aad8ced8d892"
+ },
+ "reuses": []
+ },
+ {
+ "amount": "1",
+ "block": 35511102,
+ "consumer": {
+ "id": "0xb62e762af637b49eb4870bce8fe21bfff189e495"
+ },
+ "createdTimestamp": 1683915991,
+ "id": "0x047a7ce1b3c69a5fc4c2c8078a2cc356164519077ef095265e4bcba1e0baf6c9-0xc22bfd40f81c4a28c809f80d05070b95a11829d9-0xb62e762af637b49eb4870bce8fe21bfff189e495-0.0",
+ "payer": {
+ "id": "0xb62e762af637b49eb4870bce8fe21bfff189e495"
+ },
+ "reuses": []
+ },
+ {
+ "amount": "1",
+ "block": 35331127,
+ "consumer": {
+ "id": "0x85c1bbdc1b6a199e0964cb849deb59aef3045edd"
+ },
+ "createdTimestamp": 1683533500,
+ "id": "0x8cbfb5a85d43f5a5b4aff4a2d657fe7dac4528a86cc78f21897fdd0169d3b3c3-0xc22bfd40f81c4a28c809f80d05070b95a11829d9-0x85c1bbdc1b6a199e0964cb849deb59aef3045edd-0.0",
+ "payer": {
+ "id": "0x85c1bbdc1b6a199e0964cb849deb59aef3045edd"
+ },
+ "reuses": []
+ },
+ {
+ "amount": "1",
+ "block": 35254580,
+ "consumer": {
+ "id": "0xf9df381272afc2d1bd8fbbc0061cdb1d387c2032"
+ },
+ "createdTimestamp": 1683370838,
+ "id": "0x246637f9a410664c6880e7768880696763e7fd66aa7cc286fdc62d5d8589481c-0xc22bfd40f81c4a28c809f80d05070b95a11829d9-0xf9df381272afc2d1bd8fbbc0061cdb1d387c2032-3.0",
+ "payer": {
+ "id": "0xf9df381272afc2d1bd8fbbc0061cdb1d387c2032"
+ },
+ "reuses": []
+ },
+ {
+ "amount": "1",
+ "block": 35110175,
+ "consumer": {
+ "id": "0x726ab53c8da3efed40a32fe6ab5daa65b9da7ede"
+ },
+ "createdTimestamp": 1683063962,
+ "id": "0xed9bcc6149cab8ee67a38d6b423a05ca328533d43ff83aff140fe9c424e449ee-0xc22bfd40f81c4a28c809f80d05070b95a11829d9-0x726ab53c8da3efed40a32fe6ab5daa65b9da7ede-9.0",
+ "payer": {
+ "id": "0x726ab53c8da3efed40a32fe6ab5daa65b9da7ede"
+ },
+ "reuses": []
+ },
+ {
+ "amount": "1",
+ "block": 35053093,
+ "consumer": {
+ "id": "0x56e08babb8bf928bd8571d2a2a78235ae57ae5bd"
+ },
+ "createdTimestamp": 1682942664,
+ "id": "0xa97fa2c99f8e5f16ba7245989830c552bace1f72476f5dee4da01c0d56ada7be-0xc22bfd40f81c4a28c809f80d05070b95a11829d9-0x56e08babb8bf928bd8571d2a2a78235ae57ae5bd-12.0",
+ "payer": {
+ "id": "0x56e08babb8bf928bd8571d2a2a78235ae57ae5bd"
+ },
+ "reuses": []
+ },
+ {
+ "amount": "1",
+ "block": 34985052,
+ "consumer": {
+ "id": "0x56e08babb8bf928bd8571d2a2a78235ae57ae5bd"
+ },
+ "createdTimestamp": 1682798076,
+ "id": "0xb9b72efad41ded4fcb7e23f14a7caa3ebc4fdfbb710318cbf25d92068c8a650d-0xc22bfd40f81c4a28c809f80d05070b95a11829d9-0x56e08babb8bf928bd8571d2a2a78235ae57ae5bd-0.0",
+ "payer": {
+ "id": "0x56e08babb8bf928bd8571d2a2a78235ae57ae5bd"
+ },
+ "reuses": []
+ },
+ {
+ "amount": "1",
+ "block": 34984847,
+ "consumer": {
+ "id": "0x3f0cc2ad70839e2b684f173389f7dd71fe5186ff"
+ },
+ "createdTimestamp": 1682797640,
+ "id": "0x9d616c85fdfe8655640bf77ecea0e42a7a9d331c5f51975f2a56b4f5ac8ec955-0xc22bfd40f81c4a28c809f80d05070b95a11829d9-0x3f0cc2ad70839e2b684f173389f7dd71fe5186ff-0.0",
+ "payer": {
+ "id": "0x3f0cc2ad70839e2b684f173389f7dd71fe5186ff"
+ },
+ "reuses": []
+ },
+ {
+ "amount": "1",
+ "block": 34982389,
+ "consumer": {
+ "id": "0x3f0cc2ad70839e2b684f173389f7dd71fe5186ff"
+ },
+ "createdTimestamp": 1682792418,
+ "id": "0x16eee832f9e85ca8ac8f82aecb8861e5bb5378c2771bf9abd3930b9438dbbc01-0xc22bfd40f81c4a28c809f80d05070b95a11829d9-0x3f0cc2ad70839e2b684f173389f7dd71fe5186ff-9.0",
+ "payer": {
+ "id": "0x3f0cc2ad70839e2b684f173389f7dd71fe5186ff"
+ },
+ "reuses": []
+ },
+ {
+ "amount": "1",
+ "block": 34980112,
+ "consumer": {
+ "id": "0x3f0cc2ad70839e2b684f173389f7dd71fe5186ff"
+ },
+ "createdTimestamp": 1682787580,
+ "id": "0x5264d4694fc78d9211a658363d98571f8d455dfcf89f3450520909416a103c2c-0xc22bfd40f81c4a28c809f80d05070b95a11829d9-0x3f0cc2ad70839e2b684f173389f7dd71fe5186ff-0.0",
+ "payer": {
+ "id": "0x3f0cc2ad70839e2b684f173389f7dd71fe5186ff"
+ },
+ "reuses": []
+ },
+ {
+ "amount": "1",
+ "block": 34969169,
+ "consumer": {
+ "id": "0x616b5249aaf1c924339f8b8e94474e64ceb22af3"
+ },
+ "createdTimestamp": 1682764326,
+ "id": "0x7222faab923d80218b242aec2670c1a775c77a254a28782e04aed5cb36c395d3-0xc22bfd40f81c4a28c809f80d05070b95a11829d9-0x616b5249aaf1c924339f8b8e94474e64ceb22af3-18.0",
+ "payer": {
+ "id": "0x616b5249aaf1c924339f8b8e94474e64ceb22af3"
+ },
+ "reuses": []
+ },
+ {
+ "amount": "1",
+ "block": 34938635,
+ "consumer": {
+ "id": "0x71eb23e03d3005803db491639a7ebb717810bd04"
+ },
+ "createdTimestamp": 1682699439,
+ "id": "0x3eae9d33fe3223e25ca058955744c98ba8aa211b1e3e1bf62eb653c0d0441b79-0xc22bfd40f81c4a28c809f80d05070b95a11829d9-0x71eb23e03d3005803db491639a7ebb717810bd04-0.0",
+ "payer": {
+ "id": "0x71eb23e03d3005803db491639a7ebb717810bd04"
+ },
+ "reuses": []
+ },
+ {
+ "amount": "1",
+ "block": 34938633,
+ "consumer": {
+ "id": "0x726ab53c8da3efed40a32fe6ab5daa65b9da7ede"
+ },
+ "createdTimestamp": 1682699435,
+ "id": "0x8dfe458aa689a29ceea3208f55856420dbfd80ed777fd01103581cff9d7d76b7-0xc22bfd40f81c4a28c809f80d05070b95a11829d9-0x726ab53c8da3efed40a32fe6ab5daa65b9da7ede-0.0",
+ "payer": {
+ "id": "0x726ab53c8da3efed40a32fe6ab5daa65b9da7ede"
+ },
+ "reuses": []
+ }
+ ]
}
- ]
}
- }
}
```
+{% endcode %}
diff --git a/developers/subgraph/get-veocean-stats.md b/developers/subgraph/get-veocean-stats.md
index 418549aa..592a822c 100644
--- a/developers/subgraph/get-veocean-stats.md
+++ b/developers/subgraph/get-veocean-stats.md
@@ -59,11 +59,9 @@ import json
query = """
{
- query {
- globalStatistics{
- totalOceanLocked
- }
- }
+ globalStatistics {
+ totalOceanLocked
+ }
}"""
base_url = "https://v4.subgraph.mainnet.oceanprotocol.com"
@@ -74,7 +72,7 @@ url = base_url + route
headers = {"Content-Type": "application/json"}
payload = json.dumps({"query": query})
response = requests.request("POST", url, headers=headers, data=payload)
-result = json.loads(response.text)
+result = response.json()
print(json.dumps(result, indent=4, sort_keys=True))
```
@@ -106,13 +104,13 @@ query {
```json
{
- "data": {
- "globalStatistics": [
- {
- "totalOceanLocked": "37649265.935690381628861228"
- }
- ]
- }
+ "data": {
+ "globalStatistics": [
+ {
+ "totalOceanLocked": "38490790.606836146522318627"
+ }
+ ]
+ }
}
```
@@ -165,13 +163,11 @@ import json
query = """
{
- query {
veOCEANs {
- id,
- lockedAmount
- unlockTime
+ id,
+ lockedAmount
+ unlockTime
}
- }
}"""
base_url = "https://v4.subgraph.mainnet.oceanprotocol.com"
@@ -190,7 +186,7 @@ print(json.dumps(result, indent=4, sort_keys=True))
**Execute script**
-```
+```bash
python get_veOcean_holders.py
```
{% endtab %}
@@ -214,513 +210,516 @@ query {
Sample response
+{% code overflow="wrap" %}
```json
{
- "data": {
- "veOCEANs": [
- {
- "id": "0x000afce0e19523ca2566b142bd12968fe1e44fe8",
- "lockedAmount": "1011",
- "unlockTime": "1727913600"
- },
- {
- "id": "0x001b71fad769b3cd47fd4c9849c704fdfabf6096",
- "lockedAmount": "8980",
- "unlockTime": "1790208000"
- },
- {
- "id": "0x002570980aa53893c6981765698b6ebab8ae7ea1",
- "lockedAmount": "126140",
- "unlockTime": "1790208000"
- },
- {
- "id": "0x006d0f31a00e1f9c017ab039e9d0ba699433a28c",
- "lockedAmount": "73724",
- "unlockTime": "1804118400"
- },
- {
- "id": "0x006d559fc29090589d02fb71d4142aa58b030013",
- "lockedAmount": "100",
- "unlockTime": "1793232000"
- },
- {
- "id": "0x008ed443f31a4b3aee02fbfe61c7572ddaf3a679",
- "lockedAmount": "1100",
- "unlockTime": "1795651200"
- },
- {
- "id": "0x009ec7d76febecabd5c73cb13f6d0fb83e45d450",
- "lockedAmount": "11200",
- "unlockTime": "1790812800"
- },
- {
- "id": "0x01d5595949fdbe521fbc39eaf09192dffb3bfc17",
- "lockedAmount": "28576",
- "unlockTime": "1675900800"
- },
- {
- "id": "0x02535d7bab47a83d33623c9a4ca854a1b1192121",
- "lockedAmount": "0",
- "unlockTime": "0"
- },
- {
- "id": "0x02a6ab92964309e0d8a739e0252b3acfd3a58972",
- "lockedAmount": "1178",
- "unlockTime": "1712188800"
- },
- {
- "id": "0x02aa319b5ce28294b7207bdce3bbcf4bf514c05b",
- "lockedAmount": "300",
- "unlockTime": "1736985600"
- },
- {
- "id": "0x02ae6dfaffc2c1f410fcad1f36885f6cc8b677d5",
- "lockedAmount": "1009",
- "unlockTime": "1730937600"
- },
- {
- "id": "0x034e1f7a66b582b68e511b325ed0ccb71bb4bc12",
- "lockedAmount": "15919",
- "unlockTime": "1727913600"
- },
- {
- "id": "0x035a209abf018e4f94173fdeabe5abe69f1efbed",
- "lockedAmount": "1907",
- "unlockTime": "1714003200"
- },
- {
- "id": "0x03d4682823c33995184a6a85a97f4ca1715c9d5c",
- "lockedAmount": "0",
- "unlockTime": "0"
- },
- {
- "id": "0x04aa87fa73238b563417d17ca7e57fd91ccd521e",
- "lockedAmount": "9435",
- "unlockTime": "1801699200"
- },
- {
- "id": "0x04c697561092c9cc56be6ff5b8e2789b0ca5837c",
- "lockedAmount": "226",
- "unlockTime": "1681948800"
- },
- {
- "id": "0x051f12380b842104391a0f9c55b32f6636cc7a0f",
- "lockedAmount": "24900",
- "unlockTime": "1685577600"
- },
- {
- "id": "0x054efb6d55466ba2ffb4133f39ae67985a314bed",
- "lockedAmount": "33083",
- "unlockTime": "1697068800"
- },
- {
- "id": "0x05a79e69c0dcb9335cbfa5b579635cbbd60f70ba",
- "lockedAmount": "15837",
- "unlockTime": "1728518400"
- },
- {
- "id": "0x05b2716d750f50c4fcd2110c5bff3f74bf0910e6",
- "lockedAmount": "744",
- "unlockTime": "1796256000"
- },
- {
- "id": "0x05c01104bd6c4c099fe4d13b0faf0a8c94f11082",
- "lockedAmount": "106026",
- "unlockTime": "1723680000"
- },
- {
- "id": "0x06a2006ca85813e652506b865e590f44eae3928a",
- "lockedAmount": "3100",
- "unlockTime": "1727308800"
- },
- {
- "id": "0x0705adac1869aa2648ddcf00da24b0ab6b76ede1",
- "lockedAmount": "0",
- "unlockTime": "0"
- },
- {
- "id": "0x07dee7fb11086d543ed943bf075ad6ac2007aada",
- "lockedAmount": "34",
- "unlockTime": "1665014400"
- },
- {
- "id": "0x0848db7cb495e7b9ada1d4dc972b9a526d014d84",
- "lockedAmount": "0",
- "unlockTime": "0"
- },
- {
- "id": "0x0861fcabe37a5ce396a8d85cd816e0cc6b4633ff",
- "lockedAmount": "500",
- "unlockTime": "1738800000"
- },
- {
- "id": "0x08c26d09393dc0adc7349c0c8d1bdae63555c312",
- "lockedAmount": "10036",
- "unlockTime": "1686787200"
- },
- {
- "id": "0x0a8162d91d6bf4530950e539068c75f7ddf972bc",
- "lockedAmount": "534",
- "unlockTime": "1791417600"
- },
- {
- "id": "0x0abe9b7740686cbf24b9f206e7d4e8ec25519476",
- "lockedAmount": "230",
- "unlockTime": "1690416000"
- },
- {
- "id": "0x0aef715335d0a19b870ca20fb540e16a6e606fbd",
- "lockedAmount": "210",
- "unlockTime": "1696464000"
- },
- {
- "id": "0x0b5665d637f45d6fff6c4afd4ea4191904ef38bb",
- "lockedAmount": "10000",
- "unlockTime": "1710979200"
- },
- {
- "id": "0x0bc1e0d21e3806056eeca20b69dd3f33bb49d0c7",
- "lockedAmount": "690",
- "unlockTime": "1738195200"
- },
- {
- "id": "0x0bc9cd548cc04bfcf8ef2fca50c13b9b4f62f6d4",
- "lockedAmount": "1250",
- "unlockTime": "1796256000"
- },
- {
- "id": "0x0be1b7f1a2eacde1cf5b48a4a1034c70dac06a70",
- "lockedAmount": "19982",
- "unlockTime": "1800489600"
- },
- {
- "id": "0x0c16b6d59a9d242f9cf6ca1999e372dd89a098a2",
- "lockedAmount": "1000",
- "unlockTime": "1723075200"
- },
- {
- "id": "0x0c21d79f460f7cacf3fd35172151bdbc5d61d9c1",
- "lockedAmount": "10",
- "unlockTime": "1676505600"
- },
- {
- "id": "0x0c4f299cce0e56004a6e3a30f43146a205bd2b9d",
- "lockedAmount": "250",
- "unlockTime": "1690416000"
- },
- {
- "id": "0x0c59aeeb4f82bbb7e38958900df5bf499c3e9e4f",
- "lockedAmount": "0",
- "unlockTime": "0"
- },
- {
- "id": "0x0c6415489a8cc61ca7d32a29f7cdc1e980af16f1",
- "lockedAmount": "3788",
- "unlockTime": "1725494400"
- },
- {
- "id": "0x0ca0c241a45a9e8abad30a632df1a9a09a4eb692",
- "lockedAmount": "24987",
- "unlockTime": "1729123200"
- },
- {
- "id": "0x0cf776d57e0223f47ed3a101927bb78d41ad8a13",
- "lockedAmount": "16967",
- "unlockTime": "1790208000"
- },
- {
- "id": "0x0d04e73d950ff53e586da588c43bb3ac5ae53872",
- "lockedAmount": "19517",
- "unlockTime": "1703721600"
- },
- {
- "id": "0x0daefc5251f8f7f5a5dc987e8a6c96d9deb84559",
- "lockedAmount": "3000",
- "unlockTime": "1727308800"
- },
- {
- "id": "0x0e0bab764f38d63abf08680a50b33718c98b90e6",
- "lockedAmount": "13782",
- "unlockTime": "1797465600"
- },
- {
- "id": "0x0ed8063fcc5b44f664333b59a12d187de6551088",
- "lockedAmount": "265",
- "unlockTime": "1804118400"
- },
- {
- "id": "0x0ed8486119b992258a3754decaa36bf8bed543e8",
- "lockedAmount": "25881",
- "unlockTime": "1697068800"
- },
- {
- "id": "0x0efbdc4e858cbb269545d48f7b30ab260a3e5d10",
- "lockedAmount": "3294",
- "unlockTime": "1685577600"
- },
- {
- "id": "0x0f1107f97af6ae6eb37a9d35060aaa21cdaa109f",
- "lockedAmount": "15000",
- "unlockTime": "1790812800"
- },
- {
- "id": "0x0f84452c0dcda0c9980a0a802eb8b8dbaaf52c54",
- "lockedAmount": "25",
- "unlockTime": "1687392000"
- },
- {
- "id": "0x1019b7e639234c589c34385955adfbe0af8d8453",
- "lockedAmount": "2121",
- "unlockTime": "1706140800"
- },
- {
- "id": "0x104e9bce2d1a6fb449c14272f0157422a00adaa5",
- "lockedAmount": "7300",
- "unlockTime": "1744243200"
- },
- {
- "id": "0x111849a4943891b071f7cdb1babebcb74415204a",
- "lockedAmount": "0",
- "unlockTime": "0"
- },
- {
- "id": "0x11300251b903ba70f51262f3e49aa7c22f81e1b2",
- "lockedAmount": "1504",
- "unlockTime": "1794441600"
- },
- {
- "id": "0x119b6e8c6b258b2b93443e949ef5066a85d75e44",
- "lockedAmount": "30000",
- "unlockTime": "1680134400"
- },
- {
- "id": "0x11e43d79e4193dfc1247697cb0ae15b17d27fc5b",
- "lockedAmount": "0",
- "unlockTime": "0"
- },
- {
- "id": "0x1215fed867ad6eb5f078fc8b477a1a32eb59d75d",
- "lockedAmount": "18752",
- "unlockTime": "1730332800"
- },
- {
- "id": "0x126bc064dbd1d0205fc608c3178a60c9706b482c",
- "lockedAmount": "0",
- "unlockTime": "0"
- },
- {
- "id": "0x1280cfea89a214b490c202fa22688813df8d8c04",
- "lockedAmount": "26000",
- "unlockTime": "1727913600"
- },
- {
- "id": "0x13203b4fef73f05b3db709c41c96179b37bf01eb",
- "lockedAmount": "293",
- "unlockTime": "1738195200"
- },
- {
- "id": "0x1479a4884dee82dc8471e0006102f9d400445332",
- "lockedAmount": "13009",
- "unlockTime": "1698883200"
- },
- {
- "id": "0x149756907221491eca8c5816a6b5d6b60fcd7d60",
- "lockedAmount": "4980",
- "unlockTime": "1684972800"
- },
- {
- "id": "0x153785d85dffe5b92083e30003aa58f18344d032",
- "lockedAmount": "50",
- "unlockTime": "1802304000"
- },
- {
- "id": "0x15558eb2aeb93ed561515a47441bf49250933ba9",
- "lockedAmount": "500000",
- "unlockTime": "1804118400"
- },
- {
- "id": "0x15a919e499d88a71e94d34ab76986799f69b4ff2",
- "lockedAmount": "4940",
- "unlockTime": "1733961600"
- },
- {
- "id": "0x15abf18f424cd2755e9d680eeeaa02bc00c1f00e",
- "lockedAmount": "0",
- "unlockTime": "0"
- },
- {
- "id": "0x15f311af257d6e8520ebf29eae5ba76c4dd45c6a",
- "lockedAmount": "1420",
- "unlockTime": "1796860800"
- },
- {
- "id": "0x1609665376e39e9d9cdfdc75e44f80bb899e9d21",
- "lockedAmount": "8016",
- "unlockTime": "1699488000"
- },
- {
- "id": "0x1694ab8e597e90fcb4cd637bafa3e553fc1d0083",
- "lockedAmount": "364",
- "unlockTime": "1734566400"
- },
- {
- "id": "0x175437b00da09f18d89571b95a41a15aa8415eba",
- "lockedAmount": "88050",
- "unlockTime": "1798675200"
- },
- {
- "id": "0x1758bc68a87abfede6a213666d15c028f2708b2b",
- "lockedAmount": "1494",
- "unlockTime": "1731542400"
- },
- {
- "id": "0x1843c3d1dd3e2564fada8ea50bb73819c6b53047",
- "lockedAmount": "3354",
- "unlockTime": "1793836800"
- },
- {
- "id": "0x184f19323defce76af86bb5a63aa976cd9f256d7",
- "lockedAmount": "0",
- "unlockTime": "0"
- },
- {
- "id": "0x1891c8d948bc041b5e7c1a35185cc593a33b4a6c",
- "lockedAmount": "7436",
- "unlockTime": "1790208000"
- },
- {
- "id": "0x1a0d80e1bd429127bc9a4acee880426b818764ee",
- "lockedAmount": "420",
- "unlockTime": "1807747200"
- },
- {
- "id": "0x1a2409444f2f349c2e539eb013eed985b9d54e2f",
- "lockedAmount": "500",
- "unlockTime": "1687996800"
- },
- {
- "id": "0x1a9a6198c28d4dd5b9ab58e84677520ec741cb29",
- "lockedAmount": "2565",
- "unlockTime": "1683158400"
- },
- {
- "id": "0x1ab21891e9230e4a8c3e09d88e3c0b48d54f1a86",
- "lockedAmount": "980",
- "unlockTime": "1734566400"
- },
- {
- "id": "0x1bafc574581ea4b938dcfe0d0d93778303cb3fb7",
- "lockedAmount": "0",
- "unlockTime": "0"
- },
- {
- "id": "0x1c175ce4f8f3e8a16df7165f15057a82a88c025c",
- "lockedAmount": "953",
- "unlockTime": "1692230400"
- },
- {
- "id": "0x1c7b100cc8a2966d35ac6cc0ccaf4d5cba463b94",
- "lockedAmount": "0",
- "unlockTime": "0"
- },
- {
- "id": "0x1cd1b778cdc329292d196e490b65b7950bee1c97",
- "lockedAmount": "301",
- "unlockTime": "1700092800"
- },
- {
- "id": "0x1d11c308464f09228f7c81daa253ff9f415ea4f7",
- "lockedAmount": "21908",
- "unlockTime": "1697068800"
- },
- {
- "id": "0x1d3c2dc18ca3da0406cfb3634faab589c769215b",
- "lockedAmount": "625",
- "unlockTime": "1689811200"
- },
- {
- "id": "0x1ddb98275a09552b5be11e8e3118684ed6a809fc",
- "lockedAmount": "9209",
- "unlockTime": "1725494400"
- },
- {
- "id": "0x1e180d121eff6cd1b376af9318d4128093c46032",
- "lockedAmount": "0",
- "unlockTime": "0"
- },
- {
- "id": "0x1e2394b6b88f9329127d98347f6e696e4af33e13",
- "lockedAmount": "494",
- "unlockTime": "1680134400"
- },
- {
- "id": "0x1e38e305126bfe9b6329f5fdce28d72fdf9d5647",
- "lockedAmount": "183844",
- "unlockTime": "1801699200"
- },
- {
- "id": "0x1f130be1f04e159ef98c54f677b9b980b012417b",
- "lockedAmount": "10663",
- "unlockTime": "1745452800"
- },
- {
- "id": "0x1f3bcd409b2b2d88259aca77115e858ea3c65e9c",
- "lockedAmount": "2000",
- "unlockTime": "1732147200"
- },
- {
- "id": "0x1fac06467b7d9c3a9361f42ab7bd09e6a5719ec7",
- "lockedAmount": "81285",
- "unlockTime": "1802908800"
- },
- {
- "id": "0x1fba4f4446859ab451cb7f3b8fbce9bcdc97fdb9",
- "lockedAmount": "560",
- "unlockTime": "1689206400"
- },
- {
- "id": "0x200fa3e7e3fbfeb15b76e53f2810faec71a5336d",
- "lockedAmount": "2375",
- "unlockTime": "1805932800"
- },
- {
- "id": "0x2017ade0a289de891ca7e733513b264cfec2c8ce",
- "lockedAmount": "9119",
- "unlockTime": "1703721600"
- },
- {
- "id": "0x204909d955b3e94318cf5fb44883a6e0bad750d8",
- "lockedAmount": "21927",
- "unlockTime": "1804723200"
- },
- {
- "id": "0x207372a1df51a428d1b7e8aa2c81f0225d0a94b3",
- "lockedAmount": "2980",
- "unlockTime": "1788393600"
- },
- {
- "id": "0x20af0e0257312368ba0114e4c85389e158a07055",
- "lockedAmount": "159",
- "unlockTime": "1801699200"
- },
- {
- "id": "0x20d6ad3a7e0b402320fdb57bc5aae2d67dc9bad7",
- "lockedAmount": "1965",
- "unlockTime": "1744243200"
- },
- {
- "id": "0x214844a0f2b3da63c190e82f3b175a299a8362b4",
- "lockedAmount": "2000",
- "unlockTime": "1743638400"
- },
- {
- "id": "0x2196b9fe1117df9324108d82dffc849492c23c14",
- "lockedAmount": "10000",
- "unlockTime": "1793232000"
- }
- ]
- }
+ "data": {
+ "veOCEANs": [
+ {
+ "id": "0x000afce0e19523ca2566b142bd12968fe1e44fe8",
+ "lockedAmount": "1011",
+ "unlockTime": "1727913600"
+ },
+ {
+ "id": "0x001b71fad769b3cd47fd4c9849c704fdfabf6096",
+ "lockedAmount": "8980",
+ "unlockTime": "1790208000"
+ },
+ {
+ "id": "0x002570980aa53893c6981765698b6ebab8ae7ea1",
+ "lockedAmount": "126140",
+ "unlockTime": "1790208000"
+ },
+ {
+ "id": "0x006d0f31a00e1f9c017ab039e9d0ba699433a28c",
+ "lockedAmount": "75059",
+ "unlockTime": "1812585600"
+ },
+ {
+ "id": "0x006d559fc29090589d02fb71d4142aa58b030013",
+ "lockedAmount": "100",
+ "unlockTime": "1793232000"
+ },
+ {
+ "id": "0x008ed443f31a4b3aee02fbfe61c7572ddaf3a679",
+ "lockedAmount": "1100",
+ "unlockTime": "1795651200"
+ },
+ {
+ "id": "0x009ec7d76febecabd5c73cb13f6d0fb83e45d450",
+ "lockedAmount": "11200",
+ "unlockTime": "1790812800"
+ },
+ {
+ "id": "0x01d5595949fdbe521fbc39eaf09192dffb3bfc17",
+ "lockedAmount": "28576",
+ "unlockTime": "1675900800"
+ },
+ {
+ "id": "0x02535d7bab47a83d33623c9a4ca854a1b1192121",
+ "lockedAmount": "0",
+ "unlockTime": "0"
+ },
+ {
+ "id": "0x02a6ab92964309e0d8a739e0252b3acfd3a58972",
+ "lockedAmount": "1178",
+ "unlockTime": "1712188800"
+ },
+ {
+ "id": "0x02aa319b5ce28294b7207bdce3bbcf4bf514c05b",
+ "lockedAmount": "300",
+ "unlockTime": "1736985600"
+ },
+ {
+ "id": "0x02ae6dfaffc2c1f410fcad1f36885f6cc8b677d5",
+ "lockedAmount": "1009",
+ "unlockTime": "1730937600"
+ },
+ {
+ "id": "0x034e1f7a66b582b68e511b325ed0ccb71bb4bc12",
+ "lockedAmount": "15919",
+ "unlockTime": "1727913600"
+ },
+ {
+ "id": "0x035a209abf018e4f94173fdeabe5abe69f1efbed",
+ "lockedAmount": "1907",
+ "unlockTime": "1714003200"
+ },
+ {
+ "id": "0x03d4682823c33995184a6a85a97f4ca1715c9d5c",
+ "lockedAmount": "0",
+ "unlockTime": "0"
+ },
+ {
+ "id": "0x04aa87fa73238b563417d17ca7e57fd91ccd521e",
+ "lockedAmount": "9435",
+ "unlockTime": "1801699200"
+ },
+ {
+ "id": "0x04c697561092c9cc56be6ff5b8e2789b0ca5837c",
+ "lockedAmount": "226",
+ "unlockTime": "1681948800"
+ },
+ {
+ "id": "0x051f12380b842104391a0f9c55b32f6636cc7a0f",
+ "lockedAmount": "24900",
+ "unlockTime": "1685577600"
+ },
+ {
+ "id": "0x054e061f1e1c1d775a2e5f20304aab83af7dab63",
+ "lockedAmount": "5000",
+ "unlockTime": "1701907200"
+ },
+ {
+ "id": "0x054efb6d55466ba2ffb4133f39ae67985a314bed",
+ "lockedAmount": "33083",
+ "unlockTime": "1697068800"
+ },
+ {
+ "id": "0x05a79e69c0dcb9335cbfa5b579635cbbd60f70ba",
+ "lockedAmount": "15837",
+ "unlockTime": "1728518400"
+ },
+ {
+ "id": "0x05b2716d750f50c4fcd2110c5bff3f74bf0910e6",
+ "lockedAmount": "744",
+ "unlockTime": "1796256000"
+ },
+ {
+ "id": "0x05b93ddd5a0ecfbdda3ccccd11882820f9cf7454",
+ "lockedAmount": "0",
+ "unlockTime": "0"
+ },
+ {
+ "id": "0x05c01104bd6c4c099fe4d13b0faf0a8c94f11082",
+ "lockedAmount": "106026",
+ "unlockTime": "1723680000"
+ },
+ {
+ "id": "0x06a2006ca85813e652506b865e590f44eae3928a",
+ "lockedAmount": "3100",
+ "unlockTime": "1727308800"
+ },
+ {
+ "id": "0x0705adac1869aa2648ddcf00da24b0ab6b76ede1",
+ "lockedAmount": "0",
+ "unlockTime": "0"
+ },
+ {
+ "id": "0x07dee7fb11086d543ed943bf075ad6ac2007aada",
+ "lockedAmount": "34",
+ "unlockTime": "1665014400"
+ },
+ {
+ "id": "0x0848db7cb495e7b9ada1d4dc972b9a526d014d84",
+ "lockedAmount": "0",
+ "unlockTime": "0"
+ },
+ {
+ "id": "0x0861fcabe37a5ce396a8d85cd816e0cc6b4633ff",
+ "lockedAmount": "500",
+ "unlockTime": "1738800000"
+ },
+ {
+ "id": "0x08c26d09393dc0adc7349c0c8d1bdae63555c312",
+ "lockedAmount": "0",
+ "unlockTime": "0"
+ },
+ {
+ "id": "0x0a8162d91d6bf4530950e539068c75f7ddf972bc",
+ "lockedAmount": "534",
+ "unlockTime": "1791417600"
+ },
+ {
+ "id": "0x0abe9b7740686cbf24b9f206e7d4e8ec25519476",
+ "lockedAmount": "230",
+ "unlockTime": "1690416000"
+ },
+ {
+ "id": "0x0aef715335d0a19b870ca20fb540e16a6e606fbd",
+ "lockedAmount": "210",
+ "unlockTime": "1696464000"
+ },
+ {
+ "id": "0x0b5665d637f45d6fff6c4afd4ea4191904ef38bb",
+ "lockedAmount": "10000",
+ "unlockTime": "1710979200"
+ },
+ {
+ "id": "0x0bc1e0d21e3806056eeca20b69dd3f33bb49d0c7",
+ "lockedAmount": "690",
+ "unlockTime": "1738195200"
+ },
+ {
+ "id": "0x0bc9cd548cc04bfcf8ef2fca50c13b9b4f62f6d4",
+ "lockedAmount": "1250",
+ "unlockTime": "1796256000"
+ },
+ {
+ "id": "0x0bdf0d54e6f64da97728051e702fa0b9f61d2375",
+ "lockedAmount": "1024",
+ "unlockTime": "1701302400"
+ },
+ {
+ "id": "0x0be1b7f1a2eacde1cf5b48a4a1034c70dac06a70",
+ "lockedAmount": "19982",
+ "unlockTime": "1800489600"
+ },
+ {
+ "id": "0x0c16b6d59a9d242f9cf6ca1999e372dd89a098a2",
+ "lockedAmount": "1000",
+ "unlockTime": "1723075200"
+ },
+ {
+ "id": "0x0c21d79f460f7cacf3fd35172151bdbc5d61d9c1",
+ "lockedAmount": "10",
+ "unlockTime": "1676505600"
+ },
+ {
+ "id": "0x0c4f299cce0e56004a6e3a30f43146a205bd2b9d",
+ "lockedAmount": "250",
+ "unlockTime": "1690416000"
+ },
+ {
+ "id": "0x0c59aeeb4f82bbb7e38958900df5bf499c3e9e4f",
+ "lockedAmount": "0",
+ "unlockTime": "0"
+ },
+ {
+ "id": "0x0c6415489a8cc61ca7d32a29f7cdc1e980af16f1",
+ "lockedAmount": "3788",
+ "unlockTime": "1725494400"
+ },
+ {
+ "id": "0x0ca0c241a45a9e8abad30a632df1a9a09a4eb692",
+ "lockedAmount": "24987",
+ "unlockTime": "1729123200"
+ },
+ {
+ "id": "0x0cf776d57e0223f47ed3a101927bb78d41ad8a13",
+ "lockedAmount": "16967",
+ "unlockTime": "1790208000"
+ },
+ {
+ "id": "0x0d04e73d950ff53e586da588c43bb3ac5ae53872",
+ "lockedAmount": "19517",
+ "unlockTime": "1703721600"
+ },
+ {
+ "id": "0x0daefc5251f8f7f5a5dc987e8a6c96d9deb84559",
+ "lockedAmount": "3000",
+ "unlockTime": "1727308800"
+ },
+ {
+ "id": "0x0e0bab764f38d63abf08680a50b33718c98b90e6",
+ "lockedAmount": "13782",
+ "unlockTime": "1797465600"
+ },
+ {
+ "id": "0x0ed8063fcc5b44f664333b59a12d187de6551088",
+ "lockedAmount": "265",
+ "unlockTime": "1804118400"
+ },
+ {
+ "id": "0x0ed8486119b992258a3754decaa36bf8bed543e8",
+ "lockedAmount": "25881",
+ "unlockTime": "1697068800"
+ },
+ {
+ "id": "0x0efbdc4e858cbb269545d48f7b30ab260a3e5d10",
+ "lockedAmount": "0",
+ "unlockTime": "0"
+ },
+ {
+ "id": "0x0f1107f97af6ae6eb37a9d35060aaa21cdaa109f",
+ "lockedAmount": "15000",
+ "unlockTime": "1790812800"
+ },
+ {
+ "id": "0x0f84452c0dcda0c9980a0a802eb8b8dbaaf52c54",
+ "lockedAmount": "25",
+ "unlockTime": "1687392000"
+ },
+ {
+ "id": "0x1019b7e639234c589c34385955adfbe0af8d8453",
+ "lockedAmount": "2121",
+ "unlockTime": "1706140800"
+ },
+ {
+ "id": "0x104e9bce2d1a6fb449c14272f0157422a00adaa5",
+ "lockedAmount": "7300",
+ "unlockTime": "1744243200"
+ },
+ {
+ "id": "0x111849a4943891b071f7cdb1babebcb74415204a",
+ "lockedAmount": "0",
+ "unlockTime": "0"
+ },
+ {
+ "id": "0x11300251b903ba70f51262f3e49aa7c22f81e1b2",
+ "lockedAmount": "1504",
+ "unlockTime": "1794441600"
+ },
+ {
+ "id": "0x119b6e8c6b258b2b93443e949ef5066a85d75e44",
+ "lockedAmount": "30000",
+ "unlockTime": "1748476800"
+ },
+ {
+ "id": "0x11e43d79e4193dfc1247697cb0ae15b17d27fc5b",
+ "lockedAmount": "0",
+ "unlockTime": "0"
+ },
+ {
+ "id": "0x1215fed867ad6eb5f078fc8b477a1a32eb59d75d",
+ "lockedAmount": "18752",
+ "unlockTime": "1730332800"
+ },
+ {
+ "id": "0x126bc064dbd1d0205fc608c3178a60c9706b482c",
+ "lockedAmount": "0",
+ "unlockTime": "0"
+ },
+ {
+ "id": "0x1280cfea89a214b490c202fa22688813df8d8c04",
+ "lockedAmount": "26000",
+ "unlockTime": "1727913600"
+ },
+ {
+ "id": "0x13203b4fef73f05b3db709c41c96179b37bf01eb",
+ "lockedAmount": "293",
+ "unlockTime": "1738195200"
+ },
+ {
+ "id": "0x1479a4884dee82dc8471e0006102f9d400445332",
+ "lockedAmount": "13009",
+ "unlockTime": "1698883200"
+ },
+ {
+ "id": "0x149756907221491eca8c5816a6b5d6b60fcd7d60",
+ "lockedAmount": "4985",
+ "unlockTime": "1701907200"
+ },
+ {
+ "id": "0x153785d85dffe5b92083e30003aa58f18344d032",
+ "lockedAmount": "50",
+ "unlockTime": "1802304000"
+ },
+ {
+ "id": "0x15558eb2aeb93ed561515a47441bf49250933ba9",
+ "lockedAmount": "500000",
+ "unlockTime": "1804118400"
+ },
+ {
+ "id": "0x15a919e499d88a71e94d34ab76986799f69b4ff2",
+ "lockedAmount": "4940",
+ "unlockTime": "1733961600"
+ },
+ {
+ "id": "0x15abf18f424cd2755e9d680eeeaa02bc00c1f00e",
+ "lockedAmount": "0",
+ "unlockTime": "0"
+ },
+ {
+ "id": "0x15f311af257d6e8520ebf29eae5ba76c4dd45c6a",
+ "lockedAmount": "1420",
+ "unlockTime": "1796860800"
+ },
+ {
+ "id": "0x1609665376e39e9d9cdfdc75e44f80bb899e9d21",
+ "lockedAmount": "8016",
+ "unlockTime": "1699488000"
+ },
+ {
+ "id": "0x1694ab8e597e90fcb4cd637bafa3e553fc1d0083",
+ "lockedAmount": "364",
+ "unlockTime": "1734566400"
+ },
+ {
+ "id": "0x175437b00da09f18d89571b95a41a15aa8415eba",
+ "lockedAmount": "88050",
+ "unlockTime": "1798675200"
+ },
+ {
+ "id": "0x1758bc68a87abfede6a213666d15c028f2708b2b",
+ "lockedAmount": "1494",
+ "unlockTime": "1731542400"
+ },
+ {
+ "id": "0x1789bf2df0fffa3ab5d235b41ecb72f48294d955",
+ "lockedAmount": "920",
+ "unlockTime": "1701302400"
+ },
+ {
+ "id": "0x1843c3d1dd3e2564fada8ea50bb73819c6b53047",
+ "lockedAmount": "3354",
+ "unlockTime": "1793836800"
+ },
+ {
+ "id": "0x184f19323defce76af86bb5a63aa976cd9f256d7",
+ "lockedAmount": "0",
+ "unlockTime": "0"
+ },
+ {
+ "id": "0x18559e7f5d87f5c607a34ed45453d62832804c97",
+ "lockedAmount": "3275",
+ "unlockTime": "1687996800"
+ },
+ {
+ "id": "0x1891c8d948bc041b5e7c1a35185cc593a33b4a6c",
+ "lockedAmount": "7436",
+ "unlockTime": "1790208000"
+ },
+ {
+ "id": "0x1a0d80e1bd429127bc9a4acee880426b818764ee",
+ "lockedAmount": "420",
+ "unlockTime": "1807747200"
+ },
+ {
+ "id": "0x1a2409444f2f349c2e539eb013eed985b9d54e2f",
+ "lockedAmount": "500",
+ "unlockTime": "1687996800"
+ },
+ {
+ "id": "0x1a9a6198c28d4dd5b9ab58e84677520ec741cb29",
+ "lockedAmount": "2565",
+ "unlockTime": "1683158400"
+ },
+ {
+ "id": "0x1ab21891e9230e4a8c3e09d88e3c0b48d54f1a86",
+ "lockedAmount": "980",
+ "unlockTime": "1734566400"
+ },
+ {
+ "id": "0x1bafc574581ea4b938dcfe0d0d93778303cb3fb7",
+ "lockedAmount": "0",
+ "unlockTime": "0"
+ },
+ {
+ "id": "0x1c175ce4f8f3e8a16df7165f15057a82a88c025c",
+ "lockedAmount": "953",
+ "unlockTime": "1692230400"
+ },
+ {
+ "id": "0x1c7b100cc8a2966d35ac6cc0ccaf4d5cba463b94",
+ "lockedAmount": "0",
+ "unlockTime": "0"
+ },
+ {
+ "id": "0x1cd1b778cdc329292d196e490b65b7950bee1c97",
+ "lockedAmount": "301",
+ "unlockTime": "1700092800"
+ },
+ {
+ "id": "0x1d11c308464f09228f7c81daa253ff9f415ea4f7",
+ "lockedAmount": "21908",
+ "unlockTime": "1697068800"
+ },
+ {
+ "id": "0x1d3c2dc18ca3da0406cfb3634faab589c769215b",
+ "lockedAmount": "625",
+ "unlockTime": "1689811200"
+ },
+ {
+ "id": "0x1dc865705a03d63953e7df83caefc8928e555b6c",
+ "lockedAmount": "5245",
+ "unlockTime": "1812585600"
+ },
+ {
+ "id": "0x1ddb98275a09552b5be11e8e3118684ed6a809fc",
+ "lockedAmount": "10000",
+ "unlockTime": "1725494400"
+ },
+ {
+ "id": "0x1e180d121eff6cd1b376af9318d4128093c46032",
+ "lockedAmount": "0",
+ "unlockTime": "0"
+ },
+ {
+ "id": "0x1e2394b6b88f9329127d98347f6e696e4af33e13",
+ "lockedAmount": "0",
+ "unlockTime": "0"
+ },
+ {
+ "id": "0x1e38e305126bfe9b6329f5fdce28d72fdf9d5647",
+ "lockedAmount": "183844",
+ "unlockTime": "1801699200"
+ },
+ {
+ "id": "0x1f130be1f04e159ef98c54f677b9b980b012417b",
+ "lockedAmount": "10663",
+ "unlockTime": "1745452800"
+ },
+ {
+ "id": "0x1f3bcd409b2b2d88259aca77115e858ea3c65e9c",
+ "lockedAmount": "2000",
+ "unlockTime": "1732147200"
+ },
+ {
+ "id": "0x1fac06467b7d9c3a9361f42ab7bd09e6a5719ec7",
+ "lockedAmount": "81285",
+ "unlockTime": "1802908800"
+ },
+ {
+ "id": "0x1fba4f4446859ab451cb7f3b8fbce9bcdc97fdb9",
+ "lockedAmount": "560",
+ "unlockTime": "1689206400"
+ },
+ {
+ "id": "0x200fa3e7e3fbfeb15b76e53f2810faec71a5336d",
+ "lockedAmount": "2375",
+ "unlockTime": "1805932800"
+ },
+ {
+ "id": "0x2017ade0a289de891ca7e733513b264cfec2c8ce",
+ "lockedAmount": "9119",
+ "unlockTime": "1703721600"
+ }
+ ]
+ }
+}
```
+{% endcode %}
diff --git a/developers/using-ocean-subgraph/get-data-nft-information.md b/developers/using-ocean-subgraph/get-data-nft-information.md
index eef65c24..7fc3bc0c 100644
--- a/developers/using-ocean-subgraph/get-data-nft-information.md
+++ b/developers/using-ocean-subgraph/get-data-nft-information.md
@@ -160,36 +160,37 @@ Copy the query to fetch the information about a data NFT in the Ocean Subgraph [
Sample response
+{% code overflow="wrap" %}
```json
{
- "data": {
- "nft": {
- "address": "0x1c161d721e6d99f58d47f709cdc77025056c544c",
- "assetState": 0,
- "block": 15185270,
- "createdTimestamp": 1658397870,
- "creator": "0xd30dd83132f2227f114db8b90f565bca2832afbd",
- "erc20DeployerRole": [
- "0x1706df1f2d93558d1d77bed49ccdb8b88fafc306"
- ],
- "id": "0x1c161d721e6d99f58d47f709cdc77025056c544c",
- "managerRole": [
- "0xd30dd83132f2227f114db8b90f565bca2832afbd"
- ],
- "metadataRole": null,
- "name": "Ocean Data NFT",
- "orderCount": "1",
- "owner": "0xd30dd83132f2227f114db8b90f565bca2832afbd",
- "providerUrl": "https://v4.provider.mainnet.oceanprotocol.com",
- "storeUpdateRole": null,
- "symbol": "OCEAN-NFT",
- "template": "",
- "tokenUri": "",
- "transferable": true,
- "tx": "0x327a9da0d2e9df945fd2f8e10b1caa77acf98e803c5a2f588597172a0bcbb93a"
+ "data": {
+ "nft": {
+ "address": "0x1c161d721e6d99f58d47f709cdc77025056c544c",
+ "assetState": 0,
+ "block": 15185270,
+ "createdTimestamp": 1658397870,
+ "erc20DeployerRole": [
+ "0x1706df1f2d93558d1d77bed49ccdb8b88fafc306"
+ ],
+ "id": "0x1c161d721e6d99f58d47f709cdc77025056c544c",
+ "managerRole": [
+ "0xd30dd83132f2227f114db8b90f565bca2832afbd"
+ ],
+ "metadataRole": null,
+ "name": "Ocean Data NFT",
+ "orderCount": "1",
+ "providerUrl": "https://v4.provider.mainnet.oceanprotocol.com",
+ "storeUpdateRole": null,
+ "symbol": "OCEAN-NFT",
+ "template": "",
+ "tokenUri": "data:application/json;base64,eyJuYW1lIjoiT2NlYW4gRGF0YSBORlQiLCJzeW1ib2wiOiJPQ0VBTi1ORlQiLCJkZXNjcmlwdGlvbiI6IlRoaXMgTkZUIHJlcHJlc2VudHMgYW4gYXNzZXQgaW4gdGhlIE9jZWFuIFByb3RvY29sIHY0IGVjb3N5c3RlbS5cblxuVmlldyBvbiBPY2VhbiBNYXJrZXQ6IGh0dHBzOi8vbWFya2V0Lm9jZWFucHJvdG9jb2wuY29tL2Fzc2V0L2RpZDpvcDo1YzdjNThjYWNhNDAzMmU2NzNhNDE2NWM3N2YxOGQ0MDVmYmVlODc3YzA3OGFhMjU3ZjY1ODdhZjM5NzhkYTVmIiwiZXh0ZXJuYWxfdXJsIjoiaHR0cHM6Ly9tYXJrZXQub2NlYW5wcm90b2NvbC5jb20vYXNzZXQvZGlkOm9wOjVjN2M1OGNhY2E0MDMyZTY3M2E0MTY1Yzc3ZjE4ZDQwNWZiZWU4NzdjMDc4YWEyNTdmNjU4N2FmMzk3OGRhNWYiLCJiYWNrZ3JvdW5kX2NvbG9yIjoiMTQxNDE0IiwiaW1hZ2VfZGF0YSI6ImRhdGE6aW1hZ2Uvc3ZnK3htbCwlM0Nzdmcgdmlld0JveD0nMCAwIDk5IDk5JyBmaWxsPSd1bmRlZmluZWQnIHhtbG5zPSdodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyclM0UlM0NwYXRoIGZpbGw9JyUyM2ZmNDA5Mjc3JyBkPSdNMCw5OUwwLDI3QzgsMjkgMTcsMzEgMjUsMzBDMzIsMjggMzgsMjQgNDYsMjVDNTMsMjUgNjIsMjkgNzIsMzFDODEsMzIgOTAsMzEgOTksMzBMOTksOTlaJy8lM0UlM0NwYXRoIGZpbGw9JyUyM2ZmNDA5MmJiJyBkPSdNMCw5OUwwLDU0QzgsNTIgMTcsNTAgMjYsNTFDMzQsNTEgNDIsNTUgNTEsNTVDNTksNTQgNjcsNDkgNzYsNDlDODQsNDggOTEsNTIgOTksNTZMOTksOTlaJyUzRSUzQy9wYXRoJTNFJTNDcGF0aCBmaWxsPSclMjNmZjQwOTJmZicgZD0nTTAsOTlMMCw4MEM4LDc4IDE3LDc3IDI3LDc3QzM2LDc2IDQ1LDc3IDUyLDc3QzU4LDc2IDYzLDc0IDcxLDczQzc4LDcxIDg4LDcxIDk5LDcxTDk5LDk5WiclM0UlM0MvcGF0aCUzRSUzQy9zdmclM0UifQ==",
+ "transferable": true,
+ "tx": "0x327a9da0d2e9df945fd2f8e10b1caa77acf98e803c5a2f588597172a0bcbb93a"
+ }
}
- }
}
+
```
+{% endcode %}
diff --git a/developers/using-ocean-subgraph/get-datatoken-information.md b/developers/using-ocean-subgraph/get-datatoken-information.md
index 07464971..bc25acc8 100644
--- a/developers/using-ocean-subgraph/get-datatoken-information.md
+++ b/developers/using-ocean-subgraph/get-datatoken-information.md
@@ -89,6 +89,10 @@ The Python script below can be used to run the query and fetch the datatoken inf
import requests
import json
+
+import requests
+import json
+
datatoken_address = "0x122d10d543bc600967b4db0f45f80cb1ddee43eb"
query = """
{{
@@ -130,14 +134,14 @@ query = """
)
base_url = "https://v4.subgraph.mainnet.oceanprotocol.com/"
-route = "/subgraphs/name/oceanprotocol/ocean-subgraph"
+route = "subgraphs/name/oceanprotocol/ocean-subgraph"
url = base_url + route
headers = {"Content-Type": "application/json"}
payload = json.dumps({"query": query})
response = requests.request("POST", url, headers=headers, data=payload)
-result = json.loads(response.text)
+result = response.json()
print(json.dumps(result, indent=4, sort_keys=True))
```
@@ -196,43 +200,121 @@ Copy the query to fetch the information of a datatoken in the Ocean Subgraph [Gr
Sample response
+{% code overflow="wrap" %}
```json
{
- "data": {
- "fixedRateExchanges": [
- {
- "active": true,
- "id": "0xfa48673a7c36a2a768f89ac1ee8c355d5c367b02-0x06284c39b48afe5f01a04d56f1aae45dbb29793b190ee11e93a4a77215383d44",
- "price": "33"
- },
- {
- "active": true,
- "id": "0xfa48673a7c36a2a768f89ac1ee8c355d5c367b02-0x2719862ebc4ed253f09088c878e00ef8ee2a792e1c5c765fac35dc18d7ef4deb",
- "price": "35"
- },
- {
- "active": true,
- "id": "0xfa48673a7c36a2a768f89ac1ee8c355d5c367b02-0x2dccaa373e4b65d5ec153c150270e989d1bda1efd3794c851e45314c40809f9c",
- "price": "33"
- }
- ],
- "token": {
- "cap": "115792089237316195423570985008687900000000000000000000000000",
- "holderCount": "0",
- "id": "0x122d10d543bc600967b4db0f45f80cb1ddee43eb",
- "isDatatoken": true,
- "name": "Brave Lobster Token",
- "nft": {
- "address": "0xea615374949a2405c3ee555053eca4d74ec4c2f0",
- "name": "Ocean Data NFT",
- "symbol": "OCEAN-NFT"
- },
- "orderCount": "0",
- "orders": [],
- "symbol": "BRALOB-11"
+ "data": {
+ "fixedRateExchanges": [
+ {
+ "active": true,
+ "id": "0xfa48673a7c36a2a768f89ac1ee8c355d5c367b02-0x06284c39b48afe5f01a04d56f1aae45dbb29793b190ee11e93a4a77215383d44",
+ "price": "600"
+ },
+ {
+ "active": true,
+ "id": "0xfa48673a7c36a2a768f89ac1ee8c355d5c367b02-0x103714d9d215b971253ef72b4f5de6b0cb0df1ad9a3763cec698262c64cbecfe",
+ "price": "1000"
+ },
+ {
+ "active": true,
+ "id": "0xfa48673a7c36a2a768f89ac1ee8c355d5c367b02-0x2719862ebc4ed253f09088c878e00ef8ee2a792e1c5c765fac35dc18d7ef4deb",
+ "price": "35"
+ },
+ {
+ "active": true,
+ "id": "0xfa48673a7c36a2a768f89ac1ee8c355d5c367b02-0x2dccaa373e4b65d5ec153c150270e989d1bda1efd3794c851e45314c40809f9c",
+ "price": "33"
+ },
+ {
+ "active": true,
+ "id": "0xfa48673a7c36a2a768f89ac1ee8c355d5c367b02-0x43b8de24276d304c2dead8560db460aab3f81f173b4f3710f7d9bda4ae3cef22",
+ "price": "600"
+ },
+ {
+ "active": true,
+ "id": "0xfa48673a7c36a2a768f89ac1ee8c355d5c367b02-0x4d81e7e5944b819df7e978147fd2a94b09705938861bbbb496077913f80d824c",
+ "price": "5"
+ },
+ {
+ "active": true,
+ "id": "0xfa48673a7c36a2a768f89ac1ee8c355d5c367b02-0x6e4d73b0f346d03c82ebe7d41501d06d3c38f15ca19ee973029bc0a8d2da95fc",
+ "price": "50"
+ },
+ {
+ "active": true,
+ "id": "0xfa48673a7c36a2a768f89ac1ee8c355d5c367b02-0x82a659688a4df76226768ec49d9e994a83fb87410d00d88958eb603da0462341",
+ "price": "5"
+ },
+ {
+ "active": true,
+ "id": "0xfa48673a7c36a2a768f89ac1ee8c355d5c367b02-0x86162b68bcfcc3d8efb726e0c3ff85809e8e45568f3fd986eafe89eb8fa96b3f",
+ "price": "1"
+ },
+ {
+ "active": true,
+ "id": "0xfa48673a7c36a2a768f89ac1ee8c355d5c367b02-0x8d7ccaa8354664556735c75807f75a00ad3e8fa9e7b72d9ca5dc22eb852c5088",
+ "price": "5"
+ },
+ {
+ "active": true,
+ "id": "0xfa48673a7c36a2a768f89ac1ee8c355d5c367b02-0xb02d83434f392b295def216c5763e277265d3c0a414e73192961495408817d40",
+ "price": "1"
+ },
+ {
+ "active": true,
+ "id": "0xfa48673a7c36a2a768f89ac1ee8c355d5c367b02-0xb32cd1971f1a3e69b823a5b27caea8232fdcca9546e72cc34b569ce13aa78530",
+ "price": "250"
+ },
+ {
+ "active": true,
+ "id": "0xfa48673a7c36a2a768f89ac1ee8c355d5c367b02-0xb3fcb7ab8c771ddbf56bc3b6cd9f68dd8a5193dfcec68c17306f8c464eac6314",
+ "price": "6000"
+ },
+ {
+ "active": true,
+ "id": "0xfa48673a7c36a2a768f89ac1ee8c355d5c367b02-0xbceef39ad618897160748717cefe79fd49b9e9be37ae5021998cf82b3a345a78",
+ "price": "1000000"
+ },
+ {
+ "active": true,
+ "id": "0xfa48673a7c36a2a768f89ac1ee8c355d5c367b02-0xce52c09d65a8988096f274601247ebc63fed02fd3bfd56e991637f5ac4e44b2c",
+ "price": "40000"
+ },
+ {
+ "active": true,
+ "id": "0xfa48673a7c36a2a768f89ac1ee8c355d5c367b02-0xe3ac2efddaa5446436fb25560756d82ebcb865d4605a41997c4d4a6ca32e7273",
+ "price": "5800"
+ },
+ {
+ "active": true,
+ "id": "0xfa48673a7c36a2a768f89ac1ee8c355d5c367b02-0xf96208141ec3f5bc80cc05d265a5e13a71b1be7e66415ec241ebd100107d6a6d",
+ "price": "10"
+ },
+ {
+ "active": true,
+ "id": "0xfa48673a7c36a2a768f89ac1ee8c355d5c367b02-0xfcf20144a14c7b2f51319d938436e34041acbd65e1e29319549ed7923b9fd86e",
+ "price": "1000000"
+ }
+ ],
+ "token": {
+ "cap": "115792089237316195423570985008687900000000000000000000000000",
+ "holderCount": "0",
+ "id": "0x122d10d543bc600967b4db0f45f80cb1ddee43eb",
+ "isDatatoken": true,
+ "name": "Brave Lobster Token",
+ "nft": {
+ "address": "0xea615374949a2405c3ee555053eca4d74ec4c2f0",
+ "name": "Ocean Data NFT",
+ "symbol": "OCEAN-NFT"
+ },
+ "orderCount": "0",
+ "orders": [],
+ "symbol": "BRALOB-11"
+ }
}
- }
}
+
```
+{% endcode %}
diff --git a/developers/using-ocean-subgraph/list-data-nfts.md b/developers/using-ocean-subgraph/list-data-nfts.md
index 57d6683c..b4934f15 100644
--- a/developers/using-ocean-subgraph/list-data-nfts.md
+++ b/developers/using-ocean-subgraph/list-data-nfts.md
@@ -98,7 +98,7 @@ print(json.dumps(result, indent=4, sort_keys=True))
**Execute script**
-```
+```bash
python list_dataNFTs.py
```
{% endtab %}
@@ -128,6 +128,7 @@ Copy the query to fetch a list of data NFTs in the Ocean Subgraph [GraphiQL inte
Sample response
+{% code overflow="wrap" %}
```json
{
"data": {
@@ -246,5 +247,6 @@ Copy the query to fetch a list of data NFTs in the Ocean Subgraph [GraphiQL inte
}
}
```
+{% endcode %}
diff --git a/developers/using-ocean-subgraph/list-datatokens.md b/developers/using-ocean-subgraph/list-datatokens.md
index c5d32e6b..d47048e0 100644
--- a/developers/using-ocean-subgraph/list-datatokens.md
+++ b/developers/using-ocean-subgraph/list-datatokens.md
@@ -79,38 +79,36 @@ import requests
import json
query = """
-{{
- tokens(skip:0, first: 2, subgraphError: deny){{
+{
+ tokens(skip:0, first:2, subgraphError:deny) {
id
symbol
- nft {{
+ nft {
name
symbol
address
- }}
+ }
name
symbol
cap
isDatatoken
holderCount
orderCount
- orders(skip:0,first:1){{
+ orders(skip:0, first:1) {
amount
serviceIndex
- payer {{
+ payer {
id
- }}
- consumer{{
+ }
+ consumer {
id
- }}
+ }
estimatedUSDValue
lastPriceToken
lastPriceValue
- }}
-
-
- }}
-}}"""
+ }
+ }
+}"""
base_url = "https://v4.subgraph.mainnet.oceanprotocol.com"
route = "/subgraphs/name/oceanprotocol/ocean-subgraph"
@@ -128,7 +126,7 @@ print(json.dumps(result, indent=4, sort_keys=True))
**Execute script**
-```
+```bash
python list_all_tokens.py
```
{% endtab %}
@@ -175,39 +173,37 @@ Copy the query to fetch a list of datatokens in the Ocean Subgraph [GraphiQL int
Sample Response
+{% code overflow="wrap" %}
```json
{
- "data": {
- "tokens": [
- {
- "cap": null,
- "holderCount": "0",
- "id": "0x0642026e7f0b6ccac5925b4e7fa61384250e1701",
- "isDatatoken": false,
- "name": "H2O",
- "nft": null,
- "orderCount": "0",
- "orders": [],
- "symbol": "H2O"
- },
- {
- "cap": "115792089237316195423570985008687900000000000000000000000000",
- "holderCount": "0",
- "id": "0x122d10d543bc600967b4db0f45f80cb1ddee43eb",
- "isDatatoken": true,
- "name": "Brave Lobster Token",
- "nft": {
- "address": "0xea615374949a2405c3ee555053eca4d74ec4c2f0",
- "name": "Ocean Data NFT",
- "symbol": "OCEAN-NFT"
- },
- "orderCount": "0",
- "orders": [],
- "symbol": "BRALOB-11"
- }
- ]
- }
+ "data": {
+ "tokens": [
+ {
+ "cap": null,
+ "holderCount": "0",
+ "id": "0x0000000000000000000000000000000000000000",
+ "isDatatoken": false,
+ "name": null,
+ "nft": null,
+ "orderCount": "0",
+ "orders": [],
+ "symbol": null
+ },
+ {
+ "cap": null,
+ "holderCount": "0",
+ "id": "0x0642026e7f0b6ccac5925b4e7fa61384250e1701",
+ "isDatatoken": false,
+ "name": "H2O",
+ "nft": null,
+ "orderCount": "0",
+ "orders": [],
+ "symbol": "H2O"
+ }
+ ]
+ }
}
```
+{% endcode %}