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

GITBOOK-261: change request with no subject merged in GitBook

This commit is contained in:
Veronica Manuel 2023-05-24 11:29:00 +00:00 committed by gitbook-bot
parent 6d17a61659
commit 8943f16a28
No known key found for this signature in database
GPG Key ID: 07D2180C7B12D0FF
45 changed files with 765 additions and 58 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 MiB

View File

Before

Width:  |  Height:  |  Size: 1.7 MiB

After

Width:  |  Height:  |  Size: 1.7 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 320 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 320 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 320 KiB

View File

Before

Width:  |  Height:  |  Size: 2.3 MiB

After

Width:  |  Height:  |  Size: 2.3 MiB

View File

Before

Width:  |  Height:  |  Size: 1.2 MiB

After

Width:  |  Height:  |  Size: 1.2 MiB

View File

Before

Width:  |  Height:  |  Size: 6.1 MiB

After

Width:  |  Height:  |  Size: 6.1 MiB

View File

Before

Width:  |  Height:  |  Size: 1.0 MiB

After

Width:  |  Height:  |  Size: 1.0 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 MiB

View File

Before

Width:  |  Height:  |  Size: 2.1 MiB

After

Width:  |  Height:  |  Size: 2.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 MiB

View File

Before

Width:  |  Height:  |  Size: 2.4 MiB

After

Width:  |  Height:  |  Size: 2.4 MiB

View File

Before

Width:  |  Height:  |  Size: 491 KiB

After

Width:  |  Height:  |  Size: 491 KiB

View File

Before

Width:  |  Height:  |  Size: 1.4 MiB

After

Width:  |  Height:  |  Size: 1.4 MiB

View File

Before

Width:  |  Height:  |  Size: 398 KiB

After

Width:  |  Height:  |  Size: 398 KiB

View File

Before

Width:  |  Height:  |  Size: 244 KiB

After

Width:  |  Height:  |  Size: 244 KiB

View File

Before

Width:  |  Height:  |  Size: 746 KiB

After

Width:  |  Height:  |  Size: 746 KiB

View File

Before

Width:  |  Height:  |  Size: 3.2 MiB

After

Width:  |  Height:  |  Size: 3.2 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 278 KiB

View File

@ -47,6 +47,7 @@
* [Get datatokens](developers/using-ocean-subgraph/list-datatokens.md)
* [Get datatoken information](developers/using-ocean-subgraph/get-datatoken-information.md)
* [Get fixed-rate exchanges](developers/using-ocean-subgraph/list-fixed-rate-exchanges.md)
* [Get veOcean stats](developers/subgraph/get-veocean-stats.md)
* [Ocean.py](developers/ocean.py/README.md)
* [Page 1](developers/ocean.py/page-1.md)
* [Ocean Libraries](developers/ocean-libraries/README.md)

View File

@ -62,7 +62,7 @@ Ocean provides convenient methods to list ERC20 datatokens for sale, with fixed-
### High-Level Behavior
![High-Level Flow](<../.gitbook/assets/architecture/high-level-flow (1).png>)
![High-Level Flow](../.gitbook/assets/architecture/high-level-flow.png)
Here's an example.

View File

@ -1,20 +1,20 @@
---
description: >-
Unlocking the Speed: Subgraph - Bringing Lightning-Fast Retrieval to
On-Chain Data.
Unlocking the Speed: Subgraph - Bringing Lightning-Fast Retrieval to On-Chain
Data.
---
# Ocean Subgraph
# Subgraph
### What is the Subgraph?
The [Ocean Subgraph](https://github.com/oceanprotocol/ocean-subgraph) is built on top of [The Graph](https://thegraph.com/)(the popular :sunglasses: indexing and querying protocol for blockchain data). It is an essential component of the Ocean Protocol ecosystem. It provides an off-chain service that utilizes GraphQL to offer efficient access to information related to datatokens, users, and balances. By leveraging the subgraph, data retrieval becomes faster compared to an on-chain query. The data sourced from the Ocean subgraph can be accessed through [GraphQL](https://graphql.org/learn/) queries.
Imagine this 💭: if you were to always fetch data from the on-chain, you'd start to feel a little...old :older\_woman:. Like your queries are stuck in a time warp. But fear not! When you embrace the power of the subgraph, data becomes your elixir of youth. It's snappy, it's swift, and it's refreshingly retrievable. With the subgraph, you can sail through data like a sprightly dolphin 🐬&#x20;
Imagine this 💭: if you were to always fetch data from the on-chain, you'd start to feel a little...old :older\_woman:. Like your queries are stuck in a time warp. But fear not! When you embrace the power of the subgraph, data becomes your elixir of youth. It's snappy, it's swift, and it's refreshingly retrievable. With the subgraph, you can sail through data like a sprightly dolphin 🐬
<div data-full-width="false">
<figure><img src="../../.gitbook/assets/gif/dolphin.gif" alt=""><figcaption><p>High-speed subgraph</p></figcaption></figure>
<figure><img src="../../.gitbook/assets/dolphin.gif" alt=""><figcaption><p>High-speed subgraph</p></figcaption></figure>
</div>
@ -36,4 +36,10 @@ If you're eager to use the Ocean Subgraph, here's some important information for
| Mumbai | [Subgraph](https://v4.subgraph.mumbai.oceanprotocol.com) | [GraphiQL](https://v4.subgraph.mumbai.oceanprotocol.com/subgraphs/name/oceanprotocol/ocean-subgraph/graphql) |
| Görli | [Subgraph](https://v4.subgraph.goerli.oceanprotocol.com) | [GraphiQL](https://v4.subgraph.goerli.oceanprotocol.com/subgraphs/name/oceanprotocol/ocean-subgraph/graphql) |
Now that you're familiar with what the Ocean Subgraph is all about, get ready for some hands-on fun! In the following pages, we've prepared a few examples just for you. From running queries to exploring fascinating data, you'll have the chance to dive right into the Ocean Subgraph data. So, grab a virtual snorkel, and let's explore together!
Now that you're familiar with what the Ocean Subgraph is all about, get ready for some hands-on fun! In the following pages, we've prepared a few examples just for you. From running queries to exploring fascinating data, you'll have the chance to dive right into the Ocean Subgraph data. There, you'll find a wide range of additional code snippets and projects that showcase the power and versatility of the Ocean Subgraph. So, grab a virtual snorkel, and let's explore together!\
\
{% hint style="info" %}
For more examples, visit the subgraph GitHub [repository](https://github.com/oceanprotocol/ocean-subgraph), where you'll discover an extensive collection of code snippets and examples that highlight the Subgraph's capabilities and adaptability.
{% endhint %}

View File

@ -0,0 +1,714 @@
# Get veOcean stats
If you are already familiarized with veOCEAN, you're off to a great start. However, if you need a refresher, we recommend visiting the [veOCEAN](../../rewards/veocean.md) page for a quick overview.
### Get the total amount of locked Ocean tokens
{% tabs %}
{% tab title="JavaScript" %}
You can utilize the following JavaScript code snippet to execute the query and retrieve the total number of locked Ocean tokens:
```runkit nodeVersion="18.x.x"
var axios = require('axios');
const query = `query{
globalStatistics{
totalOceanLocked
}
}`
var config = {
method: 'post',
url: `https://v4.subgraph.mainnet.oceanprotocol.com/subgraphs/name/oceanprotocol/ocean-subgraph`,
headers: { "Content-Type": "application/json" },
data: JSON.stringify({ "query": query })
};
axios(config)
.then(function (response) {
console.log(response.data.data.globalStatistics)
})
.catch(function (error) {
console.log(error);
});
```
{% endtab %}
{% tab title="Python" %}
You can employ the following Python script to execute the query and retrieve the total amount of locked Ocean tokens from the subgraph:
**Create script**
{% code title="get_ocean_locked.py" %}
```python
import requests
import json
query = """
{
query {
globalStatistics{
totalOceanLocked
}
}
}"""
base_url = "https://v4.subgraph.mainnet.oceanprotocol.com"
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)
print(json.dumps(result, indent=4, sort_keys=True))
```
{% endcode %}
**Execute script**
```
python get_ocean_locked.py
```
{% endtab %}
{% tab title="Query" %}
To fetch the total amount of Ocean locked in the Ocean Subgraph [GraphiQL](https://v4.subgraph.mainnet.oceanprotocol.com/subgraphs/name/oceanprotocol/ocean-subgraph/graphql) interface, you can use the following query:
```graphql
query {
globalStatistics {
totalOceanLocked
}
}
```
{% endtab %}
{% endtabs %}
<details>
<summary>Sample response</summary>
```json
{
"data": {
"globalStatistics": [
{
"totalOceanLocked": "37649265.935690381628861228"
}
]
}
}
```
</details>
### Get the veOcean holders list
{% tabs %}
{% tab title="JavaScript" %}
You can utilize the following JavaScript code snippet to execute the query and fetch the list of veOcean holders.
```runkit nodeVersion="18.x.x"
var axios = require('axios');
const query = `query {
veOCEANs {
id,
lockedAmount
unlockTime
}
}`
var config = {
method: 'post',
url: `https://v4.subgraph.mainnet.oceanprotocol.com/subgraphs/name/oceanprotocol/ocean-subgraph`,
headers: { "Content-Type": "application/json" },
data: JSON.stringify({ "query": query })
};
axios(config)
.then(function (response) {
for (let veHolder of response.data.data.veOCEANs) {
console.log(veHolder)
}
})
.catch(function (error) {
console.log(error);
});
```
{% endtab %}
{% tab title="Python" %}
You can employ the following Python script to execute the query and fetch the list of veOcean holders from the subgraph.&#x20;
{% code title="get_veOcean_holders.py" %}
```python
import requests
import json
query = """
{
query {
veOCEANs {
id,
lockedAmount
unlockTime
}
}
}"""
base_url = "https://v4.subgraph.mainnet.oceanprotocol.com"
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)
print(json.dumps(result, indent=4, sort_keys=True))
```
{% endcode %}
**Execute script**
```
python get_veOcean_holders.py
```
{% endtab %}
{% tab title="Query" %}
To fetch the list of veOcean holders in the Ocean Subgraph [GraphiQL](https://v4.subgraph.mainnet.oceanprotocol.com/subgraphs/name/oceanprotocol/ocean-subgraph/graphql) interface, you can use the following query:
```graphql
query {
veOCEANs {
id,
lockedAmount
unlockTime
}
}
```
{% endtab %}
{% endtabs %}
<details>
<summary>Sample response</summary>
```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"
}
]
}
```
</details>

View File

@ -156,8 +156,6 @@ Copy the query to fetch the information about a data NFT in the Ocean Subgraph [
{% endtab %}
{% endtabs %}
#### Response
<details>
<summary>Sample response</summary>

View File

@ -192,8 +192,6 @@ Copy the query to fetch the information of a datatoken in the Ocean Subgraph [Gr
{% endtab %}
{% endtabs %}
#### Response
<details>
<summary>Sample response</summary>

View File

@ -6,7 +6,7 @@ description: 'Discover the World of NFTs: Retrieving a List of Data NFTs'
If you are already familiarized with the concept of NFTs, you're off to a great start. However, if you require a refresher, we recommend visiting the [data NFTs and datatokens page](../datanft-and-datatoken.md) for a quick overview.&#x20;
Now, let us delve into the fascinating realm of utilizing the subgraph to extract a list of data NFTs that have been published using the Ocean contracts. By employing GraphQL queries, we can seamlessly retrieve the desired information from the subgraph. You'll see how simple it is :sunglasses:
Now, let us delve into the realm of utilizing the subgraph to extract a list of data NFTs that have been published using the Ocean contracts. By employing GraphQL queries, we can seamlessly retrieve the desired information from the subgraph. You'll see how simple it is :sunglasses:
You'll find below an example of a GraphQL query that retrieves the first 10 data NFTs from the subgraph. The GraphQL query is structured to access the "nfts" route, extracting the first 10 elements. For each item retrieved, it retrieves the "id," "name," "symbol," "owner," "address," "assetState," "tx," "block," and "transferable" parameters.
@ -124,8 +124,6 @@ Copy the query to fetch a list of data NFTs in the Ocean Subgraph [GraphiQL inte
{% endtab %}
{% endtabs %}
#### Response
<details>
<summary>Sample response</summary>

View File

@ -171,8 +171,6 @@ Copy the query to fetch a list of datatokens in the Ocean Subgraph [GraphiQL int
{% endtab %}
{% endtabs %}
#### Response
<details>
<summary>Sample Response</summary>

View File

@ -180,8 +180,6 @@ Copy the query to fetch a list of fixed-rate exchanges in the Ocean Subgraph [Gr
{% endtab %}
{% endtabs %}
#### Response
<details>
<summary>Sample response</summary>

View File

@ -6,7 +6,7 @@ description: Learn the Web3 concepts backing up Ocean Protocol tech
You'll need to know a thing or two about **Web3** to fully understand Ocean Protocol's tech... Let's get started with the basics. 🧑‍🏫
<figure><img src="../.gitbook/assets/gif/drew-barrymore-notes.gif" alt=""><figcaption><p>Prepare yourself, my friend</p></figcaption></figure>
<figure><img src="../.gitbook/assets/drew-barrymore-notes.gif" alt=""><figcaption><p>Prepare yourself, my friend</p></figcaption></figure>
### Blockchain: The backbone of Ocean Protocol
@ -31,6 +31,6 @@ Ocean tokens (**OCEAN**) are the native cryptocurrency of the Ocean Protocol eco
1. **Data Ownership**: Ocean tokens empower data owners by providing them with control over their data assets. Through the use of smart contracts, data owners can define access permissions, usage rights, and pricing terms for their data. By holding and staking Ocean tokens, data owners can maintain ownership and exercise greater control over their data assets.
2. **Data Monetization**: Ocean tokens enable data owners to monetize their data assets. Data owners can set a price in Ocean tokens for accessing and utilizing their data. This creates opportunities for data owners to unlock value from their data assets by offering them for sale or licensing them to interested parties. The use of Ocean tokens ensures secure and transparent transactions, enabling data owners to be fairly compensated for their valuable data.
3. **Data Consumption**: Consumers of data services within the Ocean ecosystem utilize Ocean tokens to access and utilize data assets. By paying the required amount of Ocean tokens, consumers can obtain access to high-quality data, enabling them to enhance their research, analysis, and AI model training. Ocean tokens facilitate seamless and secure transactions between data providers and consumers, fostering a thriving data marketplace.
4. **Stake for veOcean and Curate Data sets**: Through the Data Farming initiative, you are incentivized to lock Ocean tokens for [veOCEAN](../rewards/veocean.md). By staking your tokens, you not only support the growth and sustainability of the ecosystem but also earn a share of the generated incentives💰. The Data Farming initiative offers participants a unique opportunity to earn [rewards](../rewards/) while making a meaningful impact in the data marketplace.&#x20;
4. **Stake for veOcean and Curate Data sets**: Through the Data Farming initiative, you are incentivized to lock Ocean tokens for [veOCEAN](../rewards/veocean.md). By staking your tokens, you not only support the growth and sustainability of the ecosystem but also earn a share of the generated incentives💰. The Data Farming initiative offers participants a unique opportunity to earn [rewards](../rewards/) while making a meaningful impact in the data marketplace.
Get ready to engage with Ocean Protocol by understanding the key components required. Learn how to connect your web3 wallet, choose the appropriate network (mainnet or testnet), and interact with smart contracts to buy, sell, or trade data assets.

View File

@ -4,13 +4,13 @@ description: What is Ocean Protocol?
# Explore
Ocean Protocol is a **decentralized data exchange protocol** that empowers you to monetize and share your data with others on-chain. ⛓️ By leveraging **blockchain technology** and **smart contracts**, Ocean Protocol offers **open-source tools** to securely publish NFTs of your data and algorithms to seamlessly collaborate, trade, and innovate with others.&#x20;
Ocean Protocol is a **decentralized data exchange protocol** that empowers you to monetize and share your data with others on-chain. ⛓️ By leveraging **blockchain technology** and **smart contracts**, Ocean Protocol offers **open-source tools** to securely publish NFTs of your data and algorithms to seamlessly collaborate, trade, and innovate with others.
<figure><img src="../.gitbook/assets/ocean-jelly-hyperrealistic.jpeg" alt="" width="375"><figcaption><p>A vast ocean of data awaits you...</p></figcaption></figure>
Let's embark on a journey of discovery and explore the possibilities that await you with Ocean Protocol! Get a glimpse into some of the things you can do - the opportunities with our protocol are vast and ever-evolving. Together, we can dive deeper and uncover even more ways to leverage the power of decentralized data.&#x20;
Let's embark on a journey of discovery and explore the possibilities that await you with Ocean Protocol! Get a glimpse into some of the things you can do - the opportunities with our protocol are vast and ever-evolving. Together, we can dive deeper and uncover even more ways to leverage the power of decentralized data.
<figure><img src="../.gitbook/assets/gif/penguin-diving.gif" alt="" width="360"><figcaption></figcaption></figure>
<figure><img src="../.gitbook/assets/penguin-diving.gif" alt="" width="360"><figcaption></figcaption></figure>
<details>
@ -33,8 +33,6 @@ These are a few examples of what can be built on top of Ocean.
4. [Ocean Gate](https://tokengate.oceanprotocol.com/) - Tokengated content [marketplace](https://github.com/oceanprotocol/token-gating-template)
5. [Acentrik Market](https://market.acentrik.io/) - Enterprise decentralized data marketplace
</details>
<details>
@ -76,7 +74,7 @@ The following guides will help you get started with buying and selling data:
<summary><mark style="color:purple;">Earn Rewards</mark><br><br>The <a href="../rewards/df-background.md">Data Farming</a> initiative is a key feature of Ocean Protocol that empowers participants to earn <a href="../rewards/">rewards</a> while contributing to a decentralized data economy. By staking Ocean tokens and actively participating in data markets, users play a vital role in enhancing the availability and accessibility of valuable data assets</summary>
Through the Data Farming initiative, you are incentivized to lock Ocean tokens for [veOcean](../rewards/veocean.md). By staking your tokens, you not only support the growth and sustainability of the ecosystem but also earn a share of the generated incentives💰. The Data Farming initiative offers participants a unique opportunity to earn [rewards](../rewards/) while making a meaningful impact in the data marketplace.&#x20;
Through the Data Farming initiative, you are incentivized to lock Ocean tokens for [veOcean](../rewards/veocean.md). By staking your tokens, you not only support the growth and sustainability of the ecosystem but also earn a share of the generated incentives💰. The Data Farming initiative offers participants a unique opportunity to earn [rewards](../rewards/) while making a meaningful impact in the data marketplace.
Participating in the Data Farming initiative demonstrates a commitment to the principles of **fairness**, **transparency**, and **collaboration** that underpin Ocean Protocol. It allows you to actively engage with the ecosystem, promoting innovation, and driving the evolution of the decentralized data economy.
@ -98,6 +96,4 @@ As an Ocean Ambassador, you become an advocate for the protocol, promoting its v
</details>
This is just the beginning of what Ocean Protocol has to offer. Join us as we explore, innovate, and push the boundaries of what's possible with decentralized data. Together, we can shape a future where data is accessible, secure, and empowers individuals and organizations alike. Let's dive in and discover the endless possibilities of Ocean Protocol :ocean:

View File

@ -6,7 +6,7 @@ description: Fundamental knowledge of using ERC-20 crypto wallets.
Ocean Protocol users require an ERC-20 compatible wallet to manage their OCEAN and ETH tokens. In this guide, we will provide some recommendations for different wallet options.
<figure><img src="../.gitbook/assets/gif/whats-a-wallet (1).gif" alt=""><figcaption></figcaption></figure>
<figure><img src="../.gitbook/assets/whats-a-wallet.gif" alt=""><figcaption></figcaption></figure>
### What is a wallet?

View File

@ -28,7 +28,7 @@ Select Ubuntu OS and choose a plan. The required CPU, Memory depends on the numb
Also, select the region where you want Aquarius to be hosted and a root password.
![Select region](../.gitbook/assets/server-setup/server-setup3.png)
![Select region](<../.gitbook/assets/server-setup/server-setup3 (1).png>)
![Click create Droplet](../.gitbook/assets/server-setup/server-setup4.png)

View File

@ -8,7 +8,7 @@ coverY: 0
# 📚 User Guides
<figure><img src="../.gitbook/assets/gif/follow-instructions.gif" alt="" width="375"><figcaption></figcaption></figure>
<figure><img src="../.gitbook/assets/follow-instructions.gif" alt="" width="375"><figcaption></figcaption></figure>
### Tokenize your cool stuff and make money 🤑

View File

@ -18,41 +18,41 @@ Create an account on [Azure](https://azure.microsoft.com/en-us/). Users might al
Go to the Azure portal: https://portal.azure.com/#home and select `Storage accounts` as shown below.
![Select storage accounts](<../../.gitbook/assets/hosting/azure1 (1).png>)
![Select storage accounts](../../.gitbook/assets/hosting/azure1.png)
**Create a new storage account**
![Create a storage account](../../.gitbook/assets/hosting/azure2.png)
![Create a storage account](<../../.gitbook/assets/hosting/azure2 (1).png>)
**Fill in the details**
![Add details](<../../.gitbook/assets/hosting/azure3 (1).png>)
![Add details](../../.gitbook/assets/hosting/azure3.png)
**Storage account created**
![Storage account created](../../.gitbook/assets/hosting/azure4.png)
![Storage account created](<../../.gitbook/assets/hosting/azure4 (1).png>)
**Step 2 - Create a blob container**
![Create a blob container](<../../.gitbook/assets/hosting/azure5 (1).png>)
![Create a blob container](../../.gitbook/assets/hosting/azure5.png)
**Step 3 - Upload a file**
![Upload a file](../../.gitbook/assets/hosting/azure6.png)
![Upload a file](<../../.gitbook/assets/hosting/azure6 (1).png>)
**Step 4 - Share the file**
**Select the file to be published and click Generate SAS**
![Click generate SAS](<../../.gitbook/assets/hosting/azure7 (1).png>)
![Click generate SAS](../../.gitbook/assets/hosting/azure7.png)
**Configure the SAS details and click `Generate SAS token and URL`**
![Generate link to file](../../.gitbook/assets/hosting/azure8.png)
![Generate link to file](<../../.gitbook/assets/hosting/azure8 (1).png>)
**Copy the generated link**
![Copy the link](../../.gitbook/assets/hosting/azure9.png)
![Copy the link](<../../.gitbook/assets/hosting/azure9 (1).png>)
**Step 5 - Publish the asset using the generated link**

View File

@ -4,7 +4,7 @@ description: How to claim OCEAN token rewards from data farming 🧑‍🌾🥕
# Claim OCEAN Rewards
<figure><img src="../.gitbook/assets/gif/underwater-treasure.gif" alt=""><figcaption><p>Show me the OCEAN rewards!</p></figcaption></figure>
<figure><img src="../.gitbook/assets/underwater-treasure.gif" alt=""><figcaption><p>Show me the OCEAN rewards!</p></figcaption></figure>
Ocean Protocol's Data Farming dapp dispenses rewards every Thursday to its participants. 💰 To claim your OCEAN token rewards for data farming, simply navigate to the Data Farming [Rewards page](https://df.oceandao.org/activerewards) and click the Claim OCEAN rewards buttons that will appear pink and clickable each Thursday. Yeehaw!
@ -14,7 +14,7 @@ Want to begin [data farming](https://df.oceandao.org)? Start [here](get-veocean-
Go to [https://df.oceandao.org/](https://df.oceandao.org), and click the Rewards [link](https://df.oceandao.org/activerewards) at the top of the page.
<figure><img src="../.gitbook/assets/rewards/Rewards-Tab.png" alt=""><figcaption><p>Click the Rewards link at the top of the page</p></figcaption></figure>
<figure><img src="../.gitbook/assets/rewards/Rewards-Tab (1).png" alt=""><figcaption><p>Click the Rewards link at the top of the page</p></figcaption></figure>
### Step 2 - Click the pink 'Claim # OCEAN' buttons 🛎️

View File

@ -6,13 +6,13 @@ description: >-
# Make a Boss C2D Algorithm
<figure><img src="../../.gitbook/assets/gif/like-a-boss.gif" alt=""><figcaption></figcaption></figure>
<figure><img src="../../.gitbook/assets/like-a-boss.gif" alt=""><figcaption></figcaption></figure>
The beginning of any great algorithm for Compute-to-Data starts by referencing the dataset asset correctly on the Docker container. Read on, anon.
### Open the local dataset file
This code goes at the top of your algorithm file for your algorithm NFT asset to use with Compute-to-Data. It references your data NFT asset file on the Docker container you selected.&#x20;
This code goes at the top of your algorithm file for your algorithm NFT asset to use with Compute-to-Data. It references your data NFT asset file on the Docker container you selected.
{% tabs %}
{% tab title="Python" %}

View File

@ -4,7 +4,7 @@ description: How to publish a C2D algorithm NFT on the Ocean Market
# Publish a C2D Algorithm NFT
<figure><img src="../../.gitbook/assets/gif/the-algorithm.gif" alt=""><figcaption><p>You're an algorithm guru after all!</p></figcaption></figure>
<figure><img src="../../.gitbook/assets/the-algorithm.gif" alt=""><figcaption><p>You're an algorithm guru after all!</p></figcaption></figure>
### Publish Your Algorithm NFT
@ -50,7 +50,7 @@ description: How to publish a C2D algorithm NFT on the Ocean Market
* Your preview should look like the following:
<figure><img src="../../.gitbook/assets/c2d/preview-publish (1).png" alt="" width="375"><figcaption></figcaption></figure>
<figure><img src="../../.gitbook/assets/c2d/preview-publish.png" alt="" width="375"><figcaption></figcaption></figure>
#### Step 8 - Submit the transactions

View File

@ -4,7 +4,7 @@ description: How to publish a data NFT with C2D configurations
# Publish a C2D Data NFT
<figure><img src="../../.gitbook/assets/gif/talk-data-to-me.gif" alt="" width="375"><figcaption></figcaption></figure>
<figure><img src="../../.gitbook/assets/talk-data-to-me.gif" alt="" width="375"><figcaption></figcaption></figure>
#### Step 1 - Navigate to the Ocean Market
@ -78,7 +78,7 @@ description: How to publish a data NFT with C2D configurations
#### Congratulations! You have fully finished the C2D flow. Check your work by verifying that your algorithm appears on the data NFT's page, like in the following example:
<figure><img src="../../.gitbook/assets/c2d/double-check-work.png" alt="" width="375"><figcaption><p>Your algorithm should appear now on the data NFT's page!</p></figcaption></figure>
<figure><img src="../../.gitbook/assets/c2d/double-check-work (1).png" alt="" width="375"><figcaption><p>Your algorithm should appear now on the data NFT's page!</p></figcaption></figure>
If you would like to run the compute job, then simply click the radio button to the left of the algorithm's name and click Buy Compute Job.

View File

@ -4,7 +4,7 @@ description: Learn how to get veOCEAN tokens to use the Data Farming dapp 🧑
# Get veOCEAN Tokens
<figure><img src="../.gitbook/assets/gif/super-mario-coins.gif" alt="" width="250"><figcaption><p>Get veOCEAN tokens</p></figcaption></figure>
<figure><img src="../.gitbook/assets/super-mario-coins.gif" alt="" width="250"><figcaption><p>Get veOCEAN tokens</p></figcaption></figure>
### What is veOCEAN? 🌊
@ -30,7 +30,7 @@ veOCEAN is a 'voting escrowed' token used in Ocean Protocol's Data Farming dapp
* Click on the purple circles in our interactive demo to walk through the steps for locking your OCEAN tokens for veOCEAN tokens.
{% @arcade/embed flowId="FUSkygksSRsJHwle1zFs" url="https://app.arcade.software/share/FUSkygksSRsJHwle1zFs" %}
\{% @arcade/embed flowId="FUSkygksSRsJHwle1zFs" url="https://app.arcade.software/share/FUSkygksSRsJHwle1zFs" %\}
In this step you will:

View File

@ -4,7 +4,7 @@ description: How to buy and download NFT assets on the Ocean Market
# Buy NFT Assets
<figure><img src="../.gitbook/assets/gif/clueless-shopping.gif" alt=""><figcaption><p>That moment when you buy your first datatoken</p></figcaption></figure>
<figure><img src="../.gitbook/assets/clueless-shopping.gif" alt=""><figcaption><p>That moment when you buy your first datatoken</p></figcaption></figure>
### Let's Go Shopping! 💁‍♀️🛍️

View File

@ -4,11 +4,11 @@ description: How to Publish Data and Algorithms as NFTs Using the Ocean Market
# Publish an NFT
<figure><img src="../.gitbook/assets/gif/kermit-typing.gif" alt=""><figcaption></figcaption></figure>
<figure><img src="../.gitbook/assets/kermit-typing.gif" alt=""><figcaption></figcaption></figure>
### What to Publish? 🤷‍♀️
Ocean Protocol has a convenient marketplace, called the Ocean Market, for publishers and consumers of data and algorithm NFTs. These assets span anything from .CSVs and .XLSX files to images, audio, videos, algorithms in any language, or combinations of all these things! There is no exhaustive list of what type of data can be published on the Market.&#x20;
Ocean Protocol has a convenient marketplace, called the Ocean Market, for publishers and consumers of data and algorithm NFTs. These assets span anything from .CSVs and .XLSX files to images, audio, videos, algorithms in any language, or combinations of all these things! There is no exhaustive list of what type of data can be published on the Market.
Please note Ocean Protocol maintains a purgatory list [here](https://github.com/oceanprotocol/list-purgatory) to block addresses and remove assets for any violations.
@ -21,7 +21,7 @@ Don't enjoy reading? Watch our video tutorial!
#### Getting Started 🏃💨
1. Go to the [Ocean Market](https://v4.market.oceanprotocol.com).
2. Connect your wallet.&#x20;
2. Connect your wallet.
3. Select the network where you would like to publish your NFT (ex. Ethereum, Polygon, etc).
![Connect wallet](../.gitbook/assets/market/marketplace-connect-wallet.png)

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.
<figure><img src="../.gitbook/assets/liquidity/remove-liquidity-2 (1) (1).png" alt=""><figcaption><p>Balance Of</p></figcaption></figure>
<figure><img src="../.gitbook/assets/liquidity/remove-liquidity-2 (1).png" alt=""><figcaption><p>Balance Of</p></figcaption></figure>
5\. Copy this number as later you will use it as the `poolAmountIn` parameter.

View File

@ -4,7 +4,7 @@ description: Buy, mint, and sell all sorts of data on the Ocean Market
# Guide to Ocean Market
<figure><img src="../.gitbook/assets/gif/shopping-minions.gif" alt=""><figcaption><p>Retail therapy mood!</p></figcaption></figure>
<figure><img src="../.gitbook/assets/shopping-minions.gif" alt=""><figcaption><p>Retail therapy mood!</p></figcaption></figure>
### What is the [Ocean Market](https://market.oceanprotocol.com/)? 🛒