GITBOOK-614: Update doc Deploying Ocean Subgraph
BIN
.gitbook/assets/architecture (2).png
Normal file
After Width: | Height: | Size: 62 KiB |
BIN
.gitbook/assets/datanft-and-datatoken.png
Normal file
After Width: | Height: | Size: 41 KiB |
BIN
.gitbook/assets/ddo-flow.png
Normal file
After Width: | Height: | Size: 57 KiB |
BIN
.gitbook/assets/feature-compute@2x.webp
Normal file
After Width: | Height: | Size: 14 KiB |
BIN
.gitbook/assets/feature-datascience@2x.webp
Normal file
After Width: | Height: | Size: 23 KiB |
BIN
.gitbook/assets/feature-marketplaces@2x.webp
Normal file
After Width: | Height: | Size: 27 KiB |
BIN
.gitbook/assets/gif/200.webp
Normal file
After Width: | Height: | Size: 247 KiB |
BIN
.gitbook/assets/gif/anchorman-teamwork.gif
Normal file
After Width: | Height: | Size: 1.0 MiB |
BIN
.gitbook/assets/gif/big-money.gif
Normal file
After Width: | Height: | Size: 1.4 MiB |
BIN
.gitbook/assets/gif/cash-flow.gif
Normal file
After Width: | Height: | Size: 706 KiB |
BIN
.gitbook/assets/gif/clueless-shopping.gif
Normal file
After Width: | Height: | Size: 1.7 MiB |
BIN
.gitbook/assets/gif/data_everywhere.gif
Normal file
After Width: | Height: | Size: 7.5 MiB |
BIN
.gitbook/assets/gif/dolphin.gif
Normal file
After Width: | Height: | Size: 2.3 MiB |
BIN
.gitbook/assets/gif/drew-barrymore-notes.gif
Normal file
After Width: | Height: | Size: 1.2 MiB |
BIN
.gitbook/assets/gif/follow-instructions.gif
Normal file
After Width: | Height: | Size: 6.1 MiB |
BIN
.gitbook/assets/gif/hustlin.gif
Normal file
After Width: | Height: | Size: 3.3 MiB |
BIN
.gitbook/assets/gif/i-know-kung-fu.gif
Normal file
After Width: | Height: | Size: 3.3 MiB |
BIN
.gitbook/assets/gif/just-publish.gif
Normal file
After Width: | Height: | Size: 3.9 MiB |
BIN
.gitbook/assets/gif/kermit-typing.gif
Normal file
After Width: | Height: | Size: 1.0 MiB |
BIN
.gitbook/assets/gif/like-a-boss.gif
Normal file
After Width: | Height: | Size: 2.1 MiB |
BIN
.gitbook/assets/gif/matrix-code (1).gif
Normal file
After Width: | Height: | Size: 62 KiB |
BIN
.gitbook/assets/gif/matrix-code.gif
Normal file
After Width: | Height: | Size: 62 KiB |
BIN
.gitbook/assets/gif/morpheus-taunting.gif
Normal file
After Width: | Height: | Size: 1.0 MiB |
BIN
.gitbook/assets/gif/morpheus.gif
Normal file
After Width: | Height: | Size: 789 KiB |
BIN
.gitbook/assets/gif/my-data (1).gif
Normal file
After Width: | Height: | Size: 3.7 MiB |
BIN
.gitbook/assets/gif/my-data.gif
Normal file
After Width: | Height: | Size: 3.7 MiB |
BIN
.gitbook/assets/gif/neo-bb.gif
Normal file
After Width: | Height: | Size: 4.6 MiB |
BIN
.gitbook/assets/gif/neo-blocking.gif
Normal file
After Width: | Height: | Size: 726 KiB |
BIN
.gitbook/assets/gif/neo-kinda-martial-arts.gif
Normal file
After Width: | Height: | Size: 7.6 MiB |
BIN
.gitbook/assets/gif/passive-income.gif
Normal file
After Width: | Height: | Size: 1.3 MiB |
BIN
.gitbook/assets/gif/shopping-minions.gif
Normal file
After Width: | Height: | Size: 491 KiB |
BIN
.gitbook/assets/gif/sponge-money.gif
Normal file
After Width: | Height: | Size: 442 KiB |
BIN
.gitbook/assets/gif/super-mario-coins.gif
Normal file
After Width: | Height: | Size: 398 KiB |
BIN
.gitbook/assets/gif/talk-data-to-me.gif
Normal file
After Width: | Height: | Size: 244 KiB |
BIN
.gitbook/assets/gif/tell-me-more.gif
Normal file
After Width: | Height: | Size: 415 KiB |
BIN
.gitbook/assets/gif/the-algorithm.gif
Normal file
After Width: | Height: | Size: 746 KiB |
BIN
.gitbook/assets/gif/to-the-computer.gif
Normal file
After Width: | Height: | Size: 2.2 MiB |
BIN
.gitbook/assets/gif/underwater-treasure.gif
Normal file
After Width: | Height: | Size: 3.2 MiB |
BIN
.gitbook/assets/gif/welcome-to-my-dojo.gif
Normal file
After Width: | Height: | Size: 2.0 MiB |
BIN
.gitbook/assets/gif/whats-a-wallet (1).gif
Normal file
After Width: | Height: | Size: 1.4 MiB |
BIN
.gitbook/assets/gif/whats-a-wallet.gif
Normal file
After Width: | Height: | Size: 1.4 MiB |
BIN
.gitbook/assets/new-ramp-on-crypto-ramp-off.webp
Normal file
After Width: | Height: | Size: 11 KiB |
BIN
.gitbook/assets/use-case (1) (1).png
Normal file
After Width: | Height: | Size: 63 KiB |
BIN
.gitbook/assets/use-case (1).png
Normal file
After Width: | Height: | Size: 63 KiB |
@ -32,7 +32,7 @@
|
||||
* [Harvest More Yield Data Farming](user-guides/how-to-data-farm.md)
|
||||
* [Claim Rewards Data Farming](user-guides/claim-ocean-rewards.md)
|
||||
* [Liquidity Pools \[deprecated\]](user-guides/remove-liquidity-pools.md)
|
||||
* [👨💻 Developers](developers/README.md)
|
||||
* [💻 Developers](developers/README.md)
|
||||
* [Architecture Overview](developers/architecture.md)
|
||||
* [Contracts](developers/contracts/README.md)
|
||||
* [Data NFTs](developers/contracts/data-nfts.md)
|
||||
|
@ -7,7 +7,7 @@ coverY: 0
|
||||
|
||||
# 🤝 Contribute
|
||||
|
||||
<figure><img src="../.gitbook/assets/to-the-computer.gif" alt=""><figcaption></figcaption></figure>
|
||||
<figure><img src="../.gitbook/assets/gif/to-the-computer.gif" alt=""><figcaption></figcaption></figure>
|
||||
|
||||
### Report a bug 🐞
|
||||
|
||||
@ -19,13 +19,13 @@ First, make sure that you search existing open + closed issues + PRs to see if y
|
||||
|
||||
Follow our steps below to properly document your bug! Paste the screenshots into your GitHub issue.
|
||||
|
||||
\{% @arcade/embed flowId="fUNrK6z2eurJ2C1ty2OG" url="https://app.arcade.software/share/fUNrK6z2eurJ2C1ty2OG" %\}
|
||||
{% @arcade/embed flowId="fUNrK6z2eurJ2C1ty2OG" url="https://app.arcade.software/share/fUNrK6z2eurJ2C1ty2OG" %}
|
||||
|
||||
### Report vulnerabilities
|
||||
|
||||
For all the super sleuths out there, you may be able to earn a bounty for reporting vulnerabilities in sensitive parts of our code. Check out our page on [Immunify](https://immunefi.com/bounty/oceanprotocol/) for the latest bug bounties available. You can also responsibly disclose flaws by emailing us at [security@oceanprotocol.com](mailto:security@oceanprotocol.com).
|
||||
|
||||
<figure><img src="../.gitbook/assets/matrix-code (1).gif" alt=""><figcaption><p>Did you find a glitch in our code matrix?</p></figcaption></figure>
|
||||
<figure><img src="../.gitbook/assets/gif/matrix-code.gif" alt=""><figcaption><p>Did you find a glitch in our code matrix?</p></figcaption></figure>
|
||||
|
||||
### Suggest a new feature 🤔💭
|
||||
|
||||
|
@ -5,7 +5,7 @@ description: We are so proud of the companies that use Ocean Protocol tools!
|
||||
|
||||
# Partners & Collaborators
|
||||
|
||||
<figure><img src="../.gitbook/assets/anchorman-teamwork.gif" alt=""><figcaption></figcaption></figure>
|
||||
<figure><img src="../.gitbook/assets/gif/anchorman-teamwork.gif" alt=""><figcaption></figcaption></figure>
|
||||
|
||||
From startups to full enterprises, we have so many partners and collaborators using Ocean tech. Curious who's working with Ocean tools? Check out our up-to-date list of our partners and collaborators on the [Collaborators page ](https://oceanprotocol.com/collaborators)of our website.
|
||||
|
||||
|
@ -6,7 +6,7 @@ coverY: 0
|
||||
|
||||
# 📊 Data Science
|
||||
|
||||
<figure><img src="../.gitbook/assets/my-data.gif" alt="" width="360"><figcaption><p>Ocean Protocol - Built to protect your precious.</p></figcaption></figure>
|
||||
<figure><img src="../.gitbook/assets/gif/my-data (1).gif" alt="" width="360"><figcaption><p>Ocean Protocol - Built to protect your precious.</p></figcaption></figure>
|
||||
|
||||
### Why should data scientists use Ocean Protocol?
|
||||
|
||||
|
@ -4,7 +4,7 @@ description: How to research where supply meets demand... 💰🧑🏫
|
||||
|
||||
# What data is valuable?
|
||||
|
||||
<figure><img src="../.gitbook/assets/big-money.gif" alt=""><figcaption><p>When you sell the right data at the right price to meet demand.</p></figcaption></figure>
|
||||
<figure><img src="../.gitbook/assets/gif/big-money.gif" alt=""><figcaption><p>When you sell the right data at the right price to meet demand.</p></figcaption></figure>
|
||||
|
||||
### Simple Truths
|
||||
|
||||
@ -12,7 +12,7 @@ A lot of people miss the mark on tokenizing data that actually _sells_. If your
|
||||
|
||||
To figure out which market segments are paying for data, then it may help you to **go to the Ocean Market and sort by Sales.**
|
||||
|
||||
But even then, it's not enough to just publish useful data on Ocean. **You need to market your data** **assets** to close sales.
|
||||
But even then, it's not enough to just publish useful data on Ocean. **You need to market your data** **assets** to close sales. 
|
||||
|
||||
Have you tried all these things and are still having trouble making money? Never fear! You can enter one of our [data challenges](https://oceanprotocol.com/challenges) to make sweet OCEAN rewards and build your data science skills.
|
||||
|
||||
|
@ -2,9 +2,9 @@
|
||||
description: When you have problems, but then you solve them 💁♀️
|
||||
---
|
||||
|
||||
# Data Value Creation Loop
|
||||
# The Data Value Creation Loop
|
||||
|
||||
<figure><img src="../.gitbook/assets/tell-me-more.gif" alt=""><figcaption><p>Tell me more.</p></figcaption></figure>
|
||||
<figure><img src="../.gitbook/assets/gif/tell-me-more.gif" alt=""><figcaption><p>Tell me more.</p></figcaption></figure>
|
||||
|
||||
### What is the Data Value Creation Loop?
|
||||
|
||||
@ -25,3 +25,12 @@ Here's a condensed breakdown of the loop:
|
||||
### What is an example of a Data Value Creation Loop?
|
||||
|
||||
Let's explore an example to showcase the process of the data value creation loop. Imagine a healthcare organization seeking to develop a predictive model for early detection of diseases. They collaborate with data engineers to collect and preprocess various medical datasets, including patient demographics, lab results, and medical imaging. These datasets are tokenized and made available on the Ocean Protocol platform for secure computation. Data scientists utilize the tokenized data to train machine learning models that can accurately identify early warning signs of diseases. These models are then published as compute assets on Ocean Market. Application developers work with the healthcare organization to integrate the models into their existing patient management system, allowing doctors to receive automated risk assessments and personalized recommendations for preventive care. As a result, patients benefit from early detection, doctors can make more informed decisions, and the healthcare organization generates insights to improve patient outcomes while fostering data and model asset collaboration. Et voilà!
|
||||
|
||||
|
||||
|
||||
   
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -7,7 +7,7 @@ cover: ../.gitbook/assets/cover/developer_banner.png
|
||||
coverY: 0
|
||||
---
|
||||
|
||||
# 👨💻 Developers
|
||||
# 💻 Developers
|
||||
|
||||
With Ocean, crypto wallets transform into magical data wallets, where your data can roam freely and securely. Crypto exchanges? Well, they've taken on a new role as data marketplaces, where you can showcase and trade your valuable data treasures. And hold on tight because DAOs are here to create epic data co-ops, where collaboration and innovation reign supreme! 🤝
|
||||
|
||||
|
@ -6,7 +6,7 @@ description: Explore and manage the revenue generated from your data NFTs.
|
||||
|
||||
Having a [data NFT](data-nfts.md) that generates revenue continuously, even when you're not actively involved, is an excellent source of income. This revenue stream allows you to earn consistently without actively dedicating your time and effort. Each time someone buys access to your NFT, you receive money, further enhancing the financial benefits. This steady income allows you to enjoy the rewards of your asset while minimizing the need for constant engagement:moneybag:
|
||||
|
||||
<figure><img src="../../.gitbook/assets/sponge-money.gif" alt=""><figcaption><p>Make it rain</p></figcaption></figure>
|
||||
<figure><img src="../../.gitbook/assets/gif/sponge-money.gif" alt=""><figcaption><p>Make it rain</p></figcaption></figure>
|
||||
|
||||
By default, the revenue generated from a [data NFT](data-nfts.md) is directed to the [owner](roles.md#nft-owner) of the NFT. This arrangement automatically updates whenever the data NFT is transferred to a new owner. C
|
||||
|
||||
@ -17,14 +17,18 @@ There are two templates available: [ERC20Template](datatoken-templates.md#regula
|
||||
|
||||
In the case of [ERC20TemplateEnterprise](datatoken-templates.md#enterprise-template), when you deploy a fixed rate exchange, the funds generated as revenue are automatically sent to the owner's address. The owner receives the revenue without any manual intervention.
|
||||
|
||||
|
||||
|
||||
On the other hand, with [ERC20Template](datatoken-templates.md#regular-template), for a fixed rate exchange, the revenue is available at the fixed rate exchange level. The owner or the payment collector has the authority to manually retrieve the revenue.
|
||||
{% endhint %}
|
||||
|
||||
There are several methods available for establishing a new **payment collector**. You have the option to utilize the ERC20Template/ERC20TemplateEnterprise contract directly. Another approach is to leverage the [ocean.py](../ocean.py) and [ocean.js](../ocean.js) libraries. Alternatively, you can employ the network explorer associated with your asset. Lastly, you can directly set it up within the Ocean Market.
|
||||
|
||||
|
||||
There are several methods available for establishing a new **payment collector**. You have the option to utilize the ERC20Template/ERC20TemplateEnterprise contract directly. Another approach is to leverage the [ocean.py](../ocean.py/) and [ocean.js](../ocean.js/) libraries. Alternatively, you can employ the network explorer associated with your asset. Lastly, you can directly set it up within the Ocean Market.
|
||||
|
||||
Here are some examples of how to set up a new payment collector using the mentioned methods:
|
||||
|
||||
1. Using [Ocean.js](https://github.com/oceanprotocol/ocean.js/blob/ae2ff1ccde53ace9841844c316a855de271f9a3f/src/contracts/Datatoken.ts#L393).
|
||||
1. Using [Ocean.js](https://github.com/oceanprotocol/ocean.js/blob/ae2ff1ccde53ace9841844c316a855de271f9a3f/src/contracts/Datatoken.ts#L393). 
|
||||
|
||||
```typescript
|
||||
datatokenAddress = 'Your datatoken address'
|
||||
@ -47,3 +51,4 @@ datatoken.setPaymentCollector(paymentCollectorAddress, {"from": publisher_wallet
|
||||
Go to the asset detail page and then click on “Edit Asset” and then scroll down to the field called “Payment Collector Address”. Add the new Ethereum address in this field and then click “Submit“. Finally, you will then need to sign two transactions to finalize the update.
|
||||
|
||||
<figure><img src="../../.gitbook/assets/market/change-payment-collector.png" alt=""><figcaption><p>Update payment collector</p></figcaption></figure>
|
||||
|
||||
|
@ -6,7 +6,7 @@ description: How can you enhance data discovery?
|
||||
|
||||
Metadata plays a **crucial role** in asset **discovery**, providing essential information such as **asset type, name, creation date, and licensing details**. Each data asset can have a [decentralized identifier (DID)](identifiers.md) that resolves to a DID document ([DDO](ddo-specification.md)) containing associated metadata. The DDO is essentially a collection of fields in a [JSON](https://www.json.org/) object. To understand working with OCEAN DIDs, you can refer to the [DID documentation](identifiers.md). For a more comprehensive understanding of metadata structure, the [DDO Specification](ddo-specification.md) documentation provides in-depth information.
|
||||
|
||||
<figure><img src="../.gitbook/assets/data_everywhere.gif" alt=""><figcaption><p>Data discovery</p></figcaption></figure>
|
||||
<figure><img src="../.gitbook/assets/gif/data_everywhere.gif" alt=""><figcaption><p>Data discovery</p></figcaption></figure>
|
||||
|
||||
In general, any dApp within the Ocean ecosystem is required to store metadata for every listed dataset. The metadata is useful to determine which datasets are the most relevant.
|
||||
|
||||
|
@ -33,13 +33,13 @@ You've now published an Ocean asset!
|
||||
* [`datatoken`](../contracts/datatokens.md) for access by others (licensing)
|
||||
* `ddo` holding metadata
|
||||
|
||||
<figure><img src="../../.gitbook/assets/200.webp" alt=""><figcaption></figcaption></figure>
|
||||
<figure><img src="../../.gitbook/assets/gif/200.webp" alt=""><figcaption></figcaption></figure>
|
||||
|
||||
### Appendix
|
||||
|
||||
For more information regarding: Data NFT & Datatokens interfaces and how they are implemented in Solidity, we suggest to follow up this [article](../contracts/datanft-and-datatoken.md) and [contracts repo](https://github.com/oceanprotocol/contracts) from GitHub.
|
||||
|
||||
As you may want to explore more the DDO specs, structure & meaning, we invite you to consult [DDO Specification](../ddo-specification.md) section.
|
||||
As you may want to explore more the DDO specs, structure & meaning, we invite you to consult [DDO Specification](../ddo-specification.md) section.
|
||||
|
||||
#### Publishing Alternatives
|
||||
|
||||
@ -113,7 +113,7 @@ If you call `create()` after this, you can pass in an argument `deployed_datatok
|
||||
|
||||
Ocean Assets allows you to bundle several common scenarios as a single transaction, thus lowering gas fees.
|
||||
|
||||
Any of the `ocean.assets.create_<type>_asset()` functions can also take an optional parameter that describes a bundled [pricing schema](https://github.com/oceanprotocol/ocean.py/blob/4aa12afd8a933d64bc2ed68d1e5359d0b9ae62f9/ocean\_lib/models/datatoken.py#LL199C5-L219C10) (Dispenser or Fixed Rate Exchange).
|
||||
Any of the `ocean.assets.create_<type>_asset()` functions can also take an optional parameter that describes a bundled [pricing schema](https://github.com/oceanprotocol/ocean.py/blob/4aa12afd8a933d64bc2ed68d1e5359d0b9ae62f9/ocean\_lib/models/datatoken.py#LL199C5-L219C10) (Dispenser or Fixed Rate Exchange). 
|
||||
|
||||
Here is an example involving an exchange:
|
||||
|
||||
@ -130,3 +130,4 @@ from ocean_lib.models.fixed_rate_exchange import ExchangeArguments
|
||||
assert len(datatoken.get_exchanges()) == 1
|
||||
```
|
||||
{% endcode %}
|
||||
|
||||
|
@ -14,7 +14,7 @@ Imagine this 💭: if you were to always fetch data from the on-chain, you'd sta
|
||||
|
||||
<div data-full-width="false">
|
||||
|
||||
<figure><img src="../../.gitbook/assets/dolphin.gif" alt=""><figcaption><p>High-speed subgraph</p></figcaption></figure>
|
||||
<figure><img src="../../.gitbook/assets/gif/dolphin.gif" alt=""><figcaption><p>High-speed subgraph</p></figcaption></figure>
|
||||
|
||||
</div>
|
||||
|
||||
@ -25,7 +25,7 @@ You can utilize the Subgraph instances provided by Ocean Protocol or deploy your
|
||||
If you're eager to use the Ocean Subgraph, here's some important information for you: We've deployed an Ocean Subgraph for each of the supported networks. Take a look at the table below, where you'll find handy links to both the subgraph instance and GraphiQL for each network. With the user-friendly GraphiQL interface, you can execute GraphQL queries directly, without any additional setup. It's a breeze! :ocean:
|
||||
|
||||
{% hint style="info" %}
|
||||
When it comes to fetching valuable information about [Data NFTs](../contracts/data-nfts.md) and [datatokens](../contracts/datatokens.md), the subgraph queries play a crucial role. They retrieve numerous details and information, but, the Subgraph cannot decrypt the DDO. But worry not, we have a dedicated component for that—[Aquarius](../aquarius/)! 🐬 Aquarius communicates with the provider and decrypts the encrypted information, making it readily available for queries.
|
||||
When it comes to fetching valuable information about [Data NFTs](../contracts/data-nfts.md) and [datatokens](../contracts/datatokens.md), the subgraph queries play a crucial role. They retrieve numerous details and information, but, the Subgraph cannot decrypt the DDO. But worry not, we have a dedicated component for that—[Aquarius](../aquarius/)! 🐬 Aquarius communicates with the provider and decrypts the encrypted information, making it readily available for queries. 
|
||||
{% endhint %}
|
||||
|
||||
### Ocean Subgraph deployments
|
||||
@ -44,7 +44,8 @@ When it comes to fetching valuable information about [Data NFTs](../contracts/da
|
||||
When making subgraph queries, please remember that the parameters you send, such as a datatoken address or a data NFT address, should be in **lowercase**. This is an essential requirement to ensure accurate processing of the queries. We kindly request your attention to this detail to facilitate a seamless query experience.
|
||||
{% endhint %}
|
||||
|
||||
In the following pages, we've prepared a few examples just for you. From running queries to exploring 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 examples that showcase the power and versatility of the Ocean Subgraph. So, grab a virtual snorkel, and let's explore together! 🤿\\
|
||||
In the following pages, we've prepared a few examples just for you. From running queries to exploring 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 examples 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.
|
||||
|
@ -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/drew-barrymore-notes.gif" alt=""><figcaption><p>Prepare yourself, my friend</p></figcaption></figure>
|
||||
<figure><img src="../.gitbook/assets/gif/drew-barrymore-notes.gif" alt=""><figcaption><p>Prepare yourself, my friend</p></figcaption></figure>
|
||||
|
||||
### Blockchain: The backbone of Ocean Protocol
|
||||
|
||||
|
@ -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/whats-a-wallet.gif" alt=""><figcaption></figcaption></figure>
|
||||
<figure><img src="../../.gitbook/assets/gif/whats-a-wallet.gif" alt=""><figcaption></figcaption></figure>
|
||||
|
||||
### What is a wallet?
|
||||
|
||||
|
@ -1,83 +1,751 @@
|
||||
# Deploying Ocean Subgraph
|
||||
|
||||
### About Ocean subgraph
|
||||
### About Ocean Subgraph
|
||||
|
||||
Ocean subgraph allows querying the datatoken, data NFT, and all event information using GraphQL. Hosting the Ocean subgraph saves the cost and time required in querying the data directly from the blockchain. The steps in this tutorial will explain how to host Ocean subgraph for the EVM-compatible chains supported by Ocean Protocol.
|
||||
|
||||
Ocean Subgraph is deployed on top of [graph-node](https://github.com/graphprotocol/graph-node), therefore, in this document, we will show first how to deploy graph-node - either using Docker Engine or Kubernetes - and then how to install Ocean Subgraph on the graph-node system. 
|
||||
|
||||
|
||||
|
||||
## Deploying Graph-node using Docker Engine and Docker Compose
|
||||
|
||||
|
||||
Ocean subgraph allows querying the datatoken, dataNFT, and all event information using GraphQL. Hosting the Ocean subgraph saves the cost and time required in querying the data directly from the blockchain. The steps in this tutorial will explain how to host Ocean subgraph for the EVM compatible chains supported by Ocean Protocol.
|
||||
|
||||
### Prerequisites
|
||||
|
||||
* A server for hosting Ocean subgraph. See [this guide](setup-server.md) on creating a server.
|
||||
* Docker and Docker compose are installed. Click [here](https://docs.docker.com/engine/install/) to view guide on installing docker.
|
||||
* [Obtain an API key](https://app.gitbook.com/o/mTcjMqA4ylf55anucjH8/s/BTXXhmDGzR0Xgj13fyfM/\~/changes/548/developers/obtaining-api-keys-for-blockchain-access)
|
||||
* A server for hosting Graph-node. See [this guide](setup-server.md) for how to create a server;
|
||||
* Docker Compose and Docker Engine are installed and configured on the server. See [this guide](setup-server.md#install-docker-engine-and-docker-compose) for how to install these products.
|
||||
* The RPC URLs and API keys for each of the networks to which Ocean Subgraph will be connected. See[ this guide](https://app.gitbook.com/o/mTcjMqA4ylf55anucjH8/s/BTXXhmDGzR0Xgj13fyfM/\~/changes/548/developers/obtaining-api-keys-for-blockchain-access) for how to obtain the URL and the API key.
|
||||
|
||||
### Create a working directory
|
||||
|
||||
```
|
||||
mkdir ocean-subgraph
|
||||
cd ocean-subgraph
|
||||
```
|
||||
|
||||
### Create a \`.env\` file
|
||||
### Steps
|
||||
|
||||
Copy the below content into the \`.env\` file and edit the values as needed.
|
||||
1. [Create the /etc/docker/compose/graph-node/docker-compose.yml file](deploying-ocean-subgraph.md#1.-create-the-etc-docker-compose-graph-node-docker-compose.yml-file)
|
||||
2. [Create the /etc/systemd/system/docker-compose@graph-node.service file](deploying-ocean-subgraph.md#2.-create-the-etc-systemd-system-docker-compose-graph-node.service-file)
|
||||
3. [Reload the systemd manager configuration](deploying-ocean-subgraph.md#3.-reload-the-systemd-manager-configuration)
|
||||
4. [Start the Ocean Subgraph service](deploying-ocean-subgraph.md#4.-start-the-ocean-subgraph-service)
|
||||
5. [Check the service's status](deploying-ocean-subgraph.md#5.-check-the-services-status)
|
||||
6. [Check Ocean Subgraph's service logs](deploying-ocean-subgraph.md#6.-check-ocean-subgraphs-service-logs)
|
||||
|
||||
{% code title=".env" %}
|
||||
```
|
||||
ETHEREUM_NODE_PROVIDER_API='mumbai:https://polygon-mumbai.infura.io/v3/${INFURA_PROJECT_ID}'
|
||||
```
|
||||
{% endcode %}
|
||||
|
||||
### Create docker-compose file
|
||||
|
||||
{% code title="docker-compose.yml" %}
|
||||
#### 1. Create the /etc/docker/compose/graph-node/docker-compose.yml file
|
||||
|
||||
From a terminal console, create the _/etc/docker/compose/graph-node/docker-compose.yml_ file, then copy and paste the following content to it (. Check the comments in the file and replace the fields with the specific values of your implementation. 
|
||||
|
||||
|
||||
|
||||
_/etc/docker/compose/graph-node/docker-compose.yml_ (annotated - example for `mumbai` network)
|
||||
|
||||
```yaml
|
||||
version: '3'
|
||||
services:
|
||||
graph-node:
|
||||
image: graphprotocol/graph-node:v0.26.0
|
||||
image: graphprotocol/graph-node:v0.28.2
|
||||
container_name: graph-node
|
||||
restart: on-failure
|
||||
ports:
|
||||
- '9000:8000'
|
||||
- '8001:8001'
|
||||
- '8000:8000'
|
||||
- '8020:8020'
|
||||
- '8030:8030'
|
||||
- '8040:8040'
|
||||
depends_on:
|
||||
- ipfs
|
||||
- postgres
|
||||
- postgres-graph
|
||||
environment:
|
||||
postgres_host: postgres
|
||||
postgres_host: postgres-graph
|
||||
postgres_user: graph-node
|
||||
postgres_pass: let-me-in
|
||||
postgres_db: graph-node
|
||||
postgres_pass: < password >
|
||||
postgres_db: mumbai
|
||||
ipfs: 'ipfs:5001'
|
||||
ethereum: ${ETHEREUM_NODE_PROVIDER_API}
|
||||
RUST_LOG: info
|
||||
ethereum: 'mumbai:https://polygon-mumbai.infura.io/v3/< INFURA ID >'
|
||||
GRAPH_LOG: info
|
||||
ipfs:
|
||||
image: ipfs/go-ipfs:v0.4.23
|
||||
container_name: ipfs
|
||||
restart: on-failure
|
||||
ports:
|
||||
- '5001:5001'
|
||||
volumes:
|
||||
- ./data/ipfs:/data/ipfs
|
||||
postgres:
|
||||
image: postgres
|
||||
- ipfs-graph-node:/data/ipfs
|
||||
postgres-graph:
|
||||
image: postgres:15.3
|
||||
container_name: postgres
|
||||
restart: on-failure
|
||||
ports:
|
||||
- '5432:5432'
|
||||
command: ['postgres', '-cshared_preload_libraries=pg_stat_statements']
|
||||
command: ["postgres", "-cshared_preload_libraries=pg_stat_statements"]
|
||||
environment:
|
||||
POSTGRES_USER: graph-node
|
||||
POSTGRES_PASSWORD: let-me-in
|
||||
POSTGRES_DB: graph-node
|
||||
POSTGRES_PASSWORD: < password >
|
||||
POSTGRES_DB: mumbai
|
||||
volumes:
|
||||
- ./data/postgres:/var/lib/postgresql/data
|
||||
- pgdata-graph-node:/var/lib/postgresql/data
|
||||
volumes:
|
||||
pgdata-graph-node:
|
||||
driver: local
|
||||
ipfs-graph-node:
|
||||
driver: local
|
||||
```
|
||||
{% endcode %}
|
||||
|
||||
### Start Ocean subgraph
|
||||
|
||||
|
||||
#### 2. Create the /etc/systemd/system/docker-compose@graph-node.service file
|
||||
|
||||
Create the _/etc/systemd/system/docker-compose@graph-node.service_ file then copy and paste the following content to it. This example file could be customized if needed.
|
||||
|
||||
```
|
||||
docker-compose \
|
||||
-f docker-compose.yml
|
||||
--env-file .env \
|
||||
-d \
|
||||
up
|
||||
[Unit]
|
||||
Description=%i service with docker compose
|
||||
Requires=docker.service
|
||||
After=docker.service
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
RemainAfterExit=true
|
||||
Environment="PROJECT=ocean"
|
||||
WorkingDirectory=/etc/docker/compose/%i
|
||||
ExecStartPre=/usr/bin/env docker-compose -p $PROJECT pull
|
||||
ExecStart=/usr/bin/env docker-compose -p $PROJECT up -d
|
||||
ExecStop=/usr/bin/env docker-compose -p $PROJECT stop
|
||||
ExecStopPost=/usr/bin/env docker-compose -p $PROJECT down
|
||||
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
```
|
||||
|
||||
|
||||
|
||||
#### 3. Reload the systemd manager configuration
|
||||
|
||||
Run the following command to reload the systemd manager configuration
|
||||
|
||||
```bash
|
||||
sudo systemctl daemon-reload
|
||||
```
|
||||
|
||||
Optionally, you can enable the services to start at boot, using the following command:
|
||||
|
||||
```bash
|
||||
sudo systemctl enable docker-compose@graph-node.service
|
||||
```
|
||||
|
||||
|
||||
|
||||
#### 4. Start graph-node service
|
||||
|
||||
To start the Ocean Subgraph service, run the following command:
|
||||
|
||||
```bash
|
||||
sudo systemctl start docker-compose@graph-node.service
|
||||
```
|
||||
|
||||
|
||||
|
||||
#### 5. Check the service's status
|
||||
|
||||
Check the status of the service by running the following command. The output of the command should be similar to the one presented here.
|
||||
|
||||
```bash
|
||||
$ sudo systemctl status docker-compose@graph-node.service
|
||||
● docker-compose@graph-node.service - graph-node service with docker compose
|
||||
Loaded: loaded (/etc/systemd/system/docker-compose@graph-node.service; disabled; vendor preset: enabled)
|
||||
Active: active (exited) since Sun 2023-06-25 17:05:25 UTC; 6s ago
|
||||
Process: 4878 ExecStartPre=/usr/bin/env docker-compose -p $PROJECT pull (code=exited, status=0/SUCCESS)
|
||||
Process: 4887 ExecStart=/usr/bin/env docker-compose -p $PROJECT up -d (code=exited, status=0/SUCCESS)
|
||||
Main PID: 4887 (code=exited, status=0/SUCCESS)
|
||||
CPU: 123ms
|
||||
|
||||
Jun 25 17:05:24 testvm env[4887]: Container ipfs Created
|
||||
Jun 25 17:05:24 testvm env[4887]: Container graph-node Creating
|
||||
Jun 25 17:05:24 testvm env[4887]: Container graph-node Created
|
||||
Jun 25 17:05:24 testvm env[4887]: Container ipfs Starting
|
||||
Jun 25 17:05:24 testvm env[4887]: Container postgres Starting
|
||||
Jun 25 17:05:24 testvm env[4887]: Container ipfs Started
|
||||
Jun 25 17:05:25 testvm env[4887]: Container postgres Started
|
||||
Jun 25 17:05:25 testvm env[4887]: Container graph-node Starting
|
||||
Jun 25 17:05:25 testvm env[4887]: Container graph-node Started
|
||||
Jun 25 17:05:25 testvm systemd[1]: Finished graph-node service with docker compose.
|
||||
|
||||
```
|
||||
|
||||
|
||||
|
||||
#### 6. Check graph-node service logs
|
||||
|
||||
If needed, use docker CLI to check Ocean Subgraph service logs.
|
||||
|
||||
First, chech the container status
|
||||
|
||||
```bash
|
||||
$ docker ps --format "table {{.Image}}\t{{.Ports}}\t{{.Names}}\t{{.Status}}"
|
||||
IMAGE PORTS NAMES STATUS
|
||||
graphprotocol/graph-node:v0.28.2 0.0.0.0:8000->8000/tcp, :::8000->8000/tcp, 0.0.0.0:8020->8020/tcp, :::8020->8020/tcp, 0.0.0.0:8030->8030/tcp, :::8030->8030/tcp, 0.0.0.0:8040->8040/tcp, :::8040->8040/tcp, 8001/tcp graph-node Up 55 minutes
|
||||
ipfs/go-ipfs:v0.4.23 4001/tcp, 8080-8081/tcp, 0.0.0.0:5001->5001/tcp, :::5001->5001/tcp ipfs Up 55 minutes
|
||||
postgres:15.3 0.0.0.0:5432->5432/tcp, :::5432->5432/tcp postgres Up 55 minutes
|
||||
```
|
||||
|
||||
Then, check the logs of the Ocean Subgraph docker container:
|
||||
|
||||
```bash
|
||||
docker logs graph-node [--follow]
|
||||
```
|
||||
|
||||
|
||||
|
||||
## Deploying graph-node using Kubernetes 
|
||||
|
||||
In this example, we will deploy graph-node as a Kubernetes deployment service. [graph-node](https://github.com/graphprotocol/graph-node) has the following dependencies: PostgreSQL and IPFS.
|
||||
|
||||
### Prerequisites:
|
||||
|
||||
* A server for hosting graph-node. See [this guide](setup-server.md) for how to create a server;
|
||||
* Kubernetes with Docker Engine is installed and configured on the server. See [this chapter](setup-server.md#install-kubernetes-with-docker-engine) for information on installing Kubernetes.
|
||||
* The RPC URLs and API keys for each of the networks to which the Provider will be connected. See[ this guide](https://app.gitbook.com/o/mTcjMqA4ylf55anucjH8/s/BTXXhmDGzR0Xgj13fyfM/\~/changes/548/developers/obtaining-api-keys-for-blockchain-access) for how to obtain the URL and the API key.
|
||||
|
||||
|
||||
|
||||
### Steps
|
||||
|
||||
1. [Deploy PostgreSQL](deploying-ocean-subgraph.md#1.-deploy-postgresql)
|
||||
2. [Deploy IPFS](deploying-ocean-subgraph.md#2.-deploy-ipfs)
|
||||
3. [Deploy Graph-node](deploying-ocean-subgraph.md#deploy-graph-node)
|
||||
|
||||
|
||||
|
||||
#### 1. Deploy PostgreSQL
|
||||
|
||||
It is recommended to deploy PostgreSQL as helm chart.
|
||||
|
||||
References: [https://github.com/bitnami/charts/tree/main/bitnami/postgresql/#installing-the-chart](https://github.com/bitnami/charts/tree/main/bitnami/postgresql/#installing-the-chart)
|
||||
|
||||
Once PostgreSQL pods are running, a database must be created: eg. `mumbai.`
|
||||
|
||||
|
||||
|
||||
#### 2. Deploy IPFS
|
||||
|
||||
The following template can be customized to deploy IPFS statefulset and service.
|
||||
|
||||
```yaml
|
||||
apiVersion: apps/v1
|
||||
kind: StatefulSet
|
||||
metadata:
|
||||
labels:
|
||||
app: ipfs
|
||||
name: ipfs
|
||||
spec:
|
||||
podManagementPolicy: OrderedReady
|
||||
replicas: 1
|
||||
revisionHistoryLimit: 10
|
||||
selector:
|
||||
matchLabels:
|
||||
app: ipfs
|
||||
serviceName: ipfs
|
||||
template:
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
app: ipfs
|
||||
spec:
|
||||
containers:
|
||||
- image: ipfs/go-ipfs:v0.4.22
|
||||
imagePullPolicy: IfNotPresent
|
||||
livenessProbe:
|
||||
failureThreshold: 3
|
||||
httpGet:
|
||||
path: /debug/metrics/prometheus
|
||||
port: api
|
||||
scheme: HTTP
|
||||
initialDelaySeconds: 15
|
||||
periodSeconds: 3
|
||||
successThreshold: 1
|
||||
timeoutSeconds: 1
|
||||
name: s1-ipfs
|
||||
ports:
|
||||
- containerPort: 5001
|
||||
name: api
|
||||
protocol: TCP
|
||||
- containerPort: 8080
|
||||
name: gateway
|
||||
protocol: TCP
|
||||
readinessProbe:
|
||||
failureThreshold: 3
|
||||
httpGet:
|
||||
path: /debug/metrics/prometheus
|
||||
port: api
|
||||
scheme: HTTP
|
||||
initialDelaySeconds: 15
|
||||
periodSeconds: 3
|
||||
successThreshold: 1
|
||||
timeoutSeconds: 1
|
||||
terminationMessagePath: /dev/termination-log
|
||||
terminationMessagePolicy: File
|
||||
volumeMounts:
|
||||
- mountPath: /data/ipfs
|
||||
name: ipfs-storage
|
||||
dnsPolicy: ClusterFirst
|
||||
restartPolicy: Always
|
||||
schedulerName: default-scheduler
|
||||
securityContext:
|
||||
fsGroup: 1000
|
||||
runAsUser: 1000
|
||||
terminationGracePeriodSeconds: 30
|
||||
updateStrategy:
|
||||
rollingUpdate:
|
||||
partition: 0
|
||||
type: RollingUpdate
|
||||
volumeClaimTemplates:
|
||||
- apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
name: ipfs-storage
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: 1G
|
||||
volumeMode: Filesystem
|
||||
status:
|
||||
phase: Pending
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
labels:
|
||||
app: ipfs
|
||||
name: ipfs
|
||||
spec:
|
||||
clusterIP:
|
||||
clusterIPs:
|
||||
ipFamilies:
|
||||
- IPv4
|
||||
ipFamilyPolicy: SingleStack
|
||||
ports:
|
||||
- name: api
|
||||
port: 5001
|
||||
- name: gateway
|
||||
port: 8080
|
||||
selector:
|
||||
app: ipfs
|
||||
```
|
||||
|
||||
|
||||
|
||||
#### Deploy Graph-node
|
||||
|
||||
The following annotated templated can be customized to deploy graph-node deployment and service:
|
||||
|
||||
```yaml
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
annotations:
|
||||
labels:
|
||||
app: mumbai-graph-node
|
||||
name: mumbai-graph-node
|
||||
spec:
|
||||
progressDeadlineSeconds: 600
|
||||
replicas: 1
|
||||
revisionHistoryLimit: 10
|
||||
selector:
|
||||
matchLabels:
|
||||
app: mumbai-graph-node
|
||||
strategy:
|
||||
rollingUpdate:
|
||||
maxSurge: 25%
|
||||
maxUnavailable: 25%
|
||||
type: RollingUpdate
|
||||
template:
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
labels:
|
||||
app: mumbai-graph-node
|
||||
spec:
|
||||
containers:
|
||||
- env:
|
||||
- name: ipfs
|
||||
value: ipfs.<namespace>.svc.cluster.local:5001
|
||||
- name: postgres_host
|
||||
value: postgresql.<namespace>.svc.cluster.local
|
||||
- name: postgres_user
|
||||
value: < postgresql user >
|
||||
- name: postgres_pass
|
||||
value: < postgresql database password >
|
||||
- name: postgres_db
|
||||
value: < postgresql database >
|
||||
- name: ethereum
|
||||
value: mumbai:https://polygon-mumbai.infura.io/v3/< INFURA ID>
|
||||
- name: GRAPH_KILL_IF_UNRESPONSIVE
|
||||
value: "true"
|
||||
image: graphprotocol/graph-node:v0.28.2
|
||||
imagePullPolicy: IfNotPresent
|
||||
livenessProbe:
|
||||
failureThreshold: 3
|
||||
httpGet:
|
||||
path: /
|
||||
port: 8000
|
||||
scheme: HTTP
|
||||
initialDelaySeconds: 20
|
||||
periodSeconds: 10
|
||||
successThreshold: 1
|
||||
timeoutSeconds: 1
|
||||
name: mumbai-graph-node
|
||||
ports:
|
||||
- containerPort: 8000
|
||||
name: graphql
|
||||
protocol: TCP
|
||||
- containerPort: 8020
|
||||
name: jsonrpc
|
||||
protocol: TCP
|
||||
- containerPort: 8030
|
||||
name: indexnode
|
||||
protocol: TCP
|
||||
- containerPort: 8040
|
||||
name: metrics
|
||||
protocol: TCP
|
||||
readinessProbe:
|
||||
failureThreshold: 3
|
||||
httpGet:
|
||||
path: /
|
||||
port: 8000
|
||||
scheme: HTTP
|
||||
initialDelaySeconds: 20
|
||||
periodSeconds: 10
|
||||
successThreshold: 1
|
||||
timeoutSeconds: 1
|
||||
resources:
|
||||
limits:
|
||||
cpu: "2"
|
||||
memory: 1536Mi
|
||||
requests:
|
||||
cpu: 1500m
|
||||
memory: 1536Mi
|
||||
terminationMessagePath: /dev/termination-log
|
||||
terminationMessagePolicy: File
|
||||
dnsPolicy: ClusterFirst
|
||||
restartPolicy: Always
|
||||
schedulerName: default-scheduler
|
||||
terminationGracePeriodSeconds: 30
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
labels:
|
||||
app: mumbai-graph-node
|
||||
name: mumbai-graph-node
|
||||
spec:
|
||||
clusterIP:
|
||||
clusterIPs:
|
||||
internalTrafficPolicy: Cluster
|
||||
ipFamilies:
|
||||
- IPv4
|
||||
ipFamilyPolicy: SingleStack
|
||||
ports:
|
||||
- name: graphql
|
||||
port: 8000
|
||||
- name: jsonrpc
|
||||
port: 8020
|
||||
- name: indexnode
|
||||
port: 8030
|
||||
- name: metrics
|
||||
port: 8040
|
||||
selector:
|
||||
app: mumbai-graph-nodeyam
|
||||
```
|
||||
|
||||
|
||||
|
||||
## Deploy Ocean Subgraph
|
||||
|
||||
After you deployed graph-node, either using Kubernetes or Docker Compose, you can proceed to deploy Ocean Subgraph on top of it. 
|
||||
|
||||
|
||||
|
||||
### Prerequisites
|
||||
|
||||
* graph-node up-and-running
|
||||
|
||||
|
||||
|
||||
### Steps
|
||||
|
||||
1. [Install Node.js locally](deploying-ocean-subgraph.md#1.-install-node.js-locally)
|
||||
2. [Download and extract Ocean-subgraph](deploying-ocean-subgraph.md#2.-download-and-extract-ocean-subgraph)
|
||||
|
||||
|
||||
|
||||
#### 1. Install Node.js locally
|
||||
|
||||
To install Node.js locally, please refer to this [link ](https://nodejs.org/en/download)for instructions.
|
||||
|
||||
|
||||
|
||||
#### 2. Download and extract Ocean-subgraph
|
||||
|
||||
Download and extract [Ocean-subgraph](https://github.com/oceanprotocol/ocean-subgraph) (check [here](https://github.com/oceanprotocol/ocean-subgraph/releases) the available releases).
|
||||
|
||||
|
||||
|
||||
#### 3. Install dependencies
|
||||
|
||||
From the directory where Ocean subgraph was extracted, run the following command:
|
||||
|
||||
```bash
|
||||
npm i
|
||||
```
|
||||
|
||||
|
||||
|
||||
#### 4. Deploy Ocean Subgraph
|
||||
|
||||
In the following example we are deploying on Ocean Subgraph on graph-node running for `mumbai` testnet.
|
||||
|
||||
Note: for `ocean-subgraph` deployment in Kubernetes environment, both `graph-node` and `ipfs` services must be locally forwarded using `kubectl port-forward` command.
|
||||
|
||||
Run the following command:
|
||||
|
||||
```bash
|
||||
$ npm run quickstart:mumbai
|
||||
|
||||
> ocean-subgraph@3.0.8 quickstart:mumbai
|
||||
> node ./scripts/generatenetworkssubgraphs.js mumbai && npm run codegen && npm run create:local && npm run deploy:local
|
||||
|
||||
Creating subgraph.yaml for mumbai
|
||||
Adding veOCEAN
|
||||
Skipping polygon
|
||||
Skipping bsc
|
||||
Skipping energyweb
|
||||
Skipping moonriver
|
||||
Skipping mainnet
|
||||
Skipping goerli
|
||||
Skipping polygonedge
|
||||
Skipping gaiaxtestnet
|
||||
Skipping alfajores
|
||||
Skipping gen-x-testnet
|
||||
Skipping filecointestnet
|
||||
|
||||
> ocean-subgraph@3.0.8 codegen
|
||||
> graph codegen --output-dir src/@types
|
||||
|
||||
Skip migration: Bump mapping apiVersion from 0.0.1 to 0.0.2
|
||||
Skip migration: Bump mapping apiVersion from 0.0.2 to 0.0.3
|
||||
Skip migration: Bump mapping apiVersion from 0.0.3 to 0.0.4
|
||||
Skip migration: Bump mapping apiVersion from 0.0.4 to 0.0.5
|
||||
Skip migration: Bump mapping apiVersion from 0.0.5 to 0.0.6
|
||||
Skip migration: Bump manifest specVersion from 0.0.1 to 0.0.2
|
||||
Apply migration: Bump manifest specVersion from 0.0.2 to 0.0.4
|
||||
✔ Apply migrations
|
||||
✔ Load subgraph from subgraph.yaml
|
||||
Load contract ABI from node_modules/@oceanprotocol/contracts/artifacts/contracts/ERC721Factory.sol/ERC721Factory.json
|
||||
Load contract ABI from abis/ERC20.json
|
||||
Load contract ABI from node_modules/@oceanprotocol/contracts/artifacts/contracts/pools/FactoryRouter.sol/FactoryRouter.json
|
||||
Load contract ABI from abis/ERC20.json
|
||||
Load contract ABI from node_modules/@oceanprotocol/contracts/artifacts/contracts/ve/veAllocate.sol/veAllocate.json
|
||||
Load contract ABI from node_modules/@oceanprotocol/contracts/artifacts/contracts/ve/veOCEAN.vy/veOCEAN.json
|
||||
Load contract ABI from node_modules/@oceanprotocol/contracts/artifacts/contracts/ve/veDelegation.vy/veDelegation.json
|
||||
Load contract ABI from node_modules/@oceanprotocol/contracts/artifacts/contracts/ve/veFeeDistributor.vy/veFeeDistributor.json
|
||||
Load contract ABI from node_modules/@oceanprotocol/contracts/artifacts/contracts/df/DFRewards.sol/DFRewards.json
|
||||
✔ Load contract ABIs
|
||||
Generate types for contract ABI: ERC721Factory (node_modules/@oceanprotocol/contracts/artifacts/contracts/ERC721Factory.sol/ERC721Factory.json)
|
||||
Write types to src/@types/ERC721Factory/ERC721Factory.ts
|
||||
Generate types for contract ABI: ERC20 (abis/ERC20.json)
|
||||
Write types to src/@types/ERC721Factory/ERC20.ts
|
||||
Generate types for contract ABI: FactoryRouter (node_modules/@oceanprotocol/contracts/artifacts/contracts/pools/FactoryRouter.sol/FactoryRouter.json)
|
||||
Write types to src/@types/FactoryRouter/FactoryRouter.ts
|
||||
Generate types for contract ABI: ERC20 (abis/ERC20.json)
|
||||
Write types to src/@types/FactoryRouter/ERC20.ts
|
||||
Generate types for contract ABI: veAllocate (node_modules/@oceanprotocol/contracts/artifacts/contracts/ve/veAllocate.sol/veAllocate.json)
|
||||
Write types to src/@types/veAllocate/veAllocate.ts
|
||||
Generate types for contract ABI: veOCEAN (node_modules/@oceanprotocol/contracts/artifacts/contracts/ve/veOCEAN.vy/veOCEAN.json)
|
||||
Write types to src/@types/veOCEAN/veOCEAN.ts
|
||||
Generate types for contract ABI: veDelegation (node_modules/@oceanprotocol/contracts/artifacts/contracts/ve/veDelegation.vy/veDelegation.json)
|
||||
Write types to src/@types/veDelegation/veDelegation.ts
|
||||
Generate types for contract ABI: veFeeDistributor (node_modules/@oceanprotocol/contracts/artifacts/contracts/ve/veFeeDistributor.vy/veFeeDistributor.json)
|
||||
Write types to src/@types/veFeeDistributor/veFeeDistributor.ts
|
||||
Generate types for contract ABI: DFRewards (node_modules/@oceanprotocol/contracts/artifacts/contracts/df/DFRewards.sol/DFRewards.json)
|
||||
Write types to src/@types/DFRewards/DFRewards.ts
|
||||
✔ Generate types for contract ABIs
|
||||
Generate types for data source template ERC20Template
|
||||
Generate types for data source template ERC721Template
|
||||
Generate types for data source template Dispenser
|
||||
Generate types for data source template FixedRateExchange
|
||||
Write types for templates to src/@types/templates.ts
|
||||
✔ Generate types for data source templates
|
||||
Load data source template ABI from node_modules/@oceanprotocol/contracts/artifacts/contracts/templates/ERC20Template.sol/ERC20Template.json
|
||||
Load data source template ABI from node_modules/@oceanprotocol/contracts/artifacts/contracts/templates/ERC20TemplateEnterprise.sol/ERC20TemplateEnterprise.json
|
||||
Load data source template ABI from abis/ERC20.json
|
||||
Load data source template ABI from node_modules/@oceanprotocol/contracts/artifacts/contracts/utils/ERC20Roles.sol/ERC20Roles.json
|
||||
Load data source template ABI from node_modules/@oceanprotocol/contracts/artifacts/contracts/templates/ERC721Template.sol/ERC721Template.json
|
||||
Load data source template ABI from node_modules/@oceanprotocol/contracts/artifacts/contracts/utils/ERC721RolesAddress.sol/ERC721RolesAddress.json
|
||||
Load data source template ABI from abis/ERC20.json
|
||||
Load data source template ABI from node_modules/@oceanprotocol/contracts/artifacts/contracts/pools/dispenser/Dispenser.sol/Dispenser.json
|
||||
Load data source template ABI from abis/ERC20.json
|
||||
Load data source template ABI from node_modules/@oceanprotocol/contracts/artifacts/contracts/pools/fixedRate/FixedRateExchange.sol/FixedRateExchange.json
|
||||
Load data source template ABI from abis/ERC20.json
|
||||
✔ Load data source template ABIs
|
||||
Generate types for data source template ABI: ERC20Template > ERC20Template (node_modules/@oceanprotocol/contracts/artifacts/contracts/templates/ERC20Template.sol/ERC20Template.json)
|
||||
Write types to src/@types/templates/ERC20Template/ERC20Template.ts
|
||||
Generate types for data source template ABI: ERC20Template > ERC20TemplateEnterprise (node_modules/@oceanprotocol/contracts/artifacts/contracts/templates/ERC20TemplateEnterprise.sol/ERC20TemplateEnterprise.json)
|
||||
Write types to src/@types/templates/ERC20Template/ERC20TemplateEnterprise.ts
|
||||
Generate types for data source template ABI: ERC20Template > ERC20 (abis/ERC20.json)
|
||||
Write types to src/@types/templates/ERC20Template/ERC20.ts
|
||||
Generate types for data source template ABI: ERC20Template > ERC20Roles (node_modules/@oceanprotocol/contracts/artifacts/contracts/utils/ERC20Roles.sol/ERC20Roles.json)
|
||||
Write types to src/@types/templates/ERC20Template/ERC20Roles.ts
|
||||
Generate types for data source template ABI: ERC721Template > ERC721Template (node_modules/@oceanprotocol/contracts/artifacts/contracts/templates/ERC721Template.sol/ERC721Template.json)
|
||||
Write types to src/@types/templates/ERC721Template/ERC721Template.ts
|
||||
Generate types for data source template ABI: ERC721Template > ERC721RolesAddress (node_modules/@oceanprotocol/contracts/artifacts/contracts/utils/ERC721RolesAddress.sol/ERC721RolesAddress.json)
|
||||
Write types to src/@types/templates/ERC721Template/ERC721RolesAddress.ts
|
||||
Generate types for data source template ABI: ERC721Template > ERC20 (abis/ERC20.json)
|
||||
Write types to src/@types/templates/ERC721Template/ERC20.ts
|
||||
Generate types for data source template ABI: Dispenser > Dispenser (node_modules/@oceanprotocol/contracts/artifacts/contracts/pools/dispenser/Dispenser.sol/Dispenser.json)
|
||||
Write types to src/@types/templates/Dispenser/Dispenser.ts
|
||||
Generate types for data source template ABI: Dispenser > ERC20 (abis/ERC20.json)
|
||||
Write types to src/@types/templates/Dispenser/ERC20.ts
|
||||
Generate types for data source template ABI: FixedRateExchange > FixedRateExchange (node_modules/@oceanprotocol/contracts/artifacts/contracts/pools/fixedRate/FixedRateExchange.sol/FixedRateExchange.json)
|
||||
Write types to src/@types/templates/FixedRateExchange/FixedRateExchange.ts
|
||||
Generate types for data source template ABI: FixedRateExchange > ERC20 (abis/ERC20.json)
|
||||
Write types to src/@types/templates/FixedRateExchange/ERC20.ts
|
||||
✔ Generate types for data source template ABIs
|
||||
✔ Load GraphQL schema from schema.graphql
|
||||
Write types to src/@types/schema.ts
|
||||
✔ Generate types for GraphQL schema
|
||||
|
||||
Types generated successfully
|
||||
|
||||
|
||||
> ocean-subgraph@3.0.8 create:local
|
||||
> graph create oceanprotocol/ocean-subgraph --node http://127.0.0.1:8020
|
||||
|
||||
Created subgraph: oceanprotocol/ocean-subgraph
|
||||
|
||||
> ocean-subgraph@3.0.8 deploy:local
|
||||
> graph deploy oceanprotocol/ocean-subgraph subgraph.yaml -l $npm_package_version --debug --ipfs http://127.0.0.1:5001 --node http://127.0.0.1:8020
|
||||
|
||||
Skip migration: Bump mapping apiVersion from 0.0.1 to 0.0.2
|
||||
Skip migration: Bump mapping apiVersion from 0.0.2 to 0.0.3
|
||||
Skip migration: Bump mapping apiVersion from 0.0.3 to 0.0.4
|
||||
Skip migration: Bump mapping apiVersion from 0.0.4 to 0.0.5
|
||||
Skip migration: Bump mapping apiVersion from 0.0.5 to 0.0.6
|
||||
Skip migration: Bump manifest specVersion from 0.0.1 to 0.0.2
|
||||
Skip migration: Bump manifest specVersion from 0.0.2 to 0.0.4
|
||||
✔ Apply migrations
|
||||
✔ Load subgraph from subgraph.yaml
|
||||
Compile data source: ERC721Factory => build/ERC721Factory/ERC721Factory.wasm
|
||||
Compile data source: FactoryRouter => build/FactoryRouter/FactoryRouter.wasm
|
||||
Compile data source: veAllocate => build/veAllocate/veAllocate.wasm
|
||||
Compile data source: veOCEAN => build/veOCEAN/veOCEAN.wasm
|
||||
Compile data source: veDelegation => build/veDelegation/veDelegation.wasm
|
||||
Compile data source: veFeeDistributor => build/veFeeDistributor/veFeeDistributor.wasm
|
||||
Compile data source: DFRewards => build/DFRewards/DFRewards.wasm
|
||||
Compile data source template: ERC20Template => build/templates/ERC20Template/ERC20Template.wasm
|
||||
Compile data source template: ERC721Template => build/templates/ERC721Template/ERC721Template.wasm
|
||||
Compile data source template: Dispenser => build/templates/Dispenser/Dispenser.wasm
|
||||
Compile data source template: FixedRateExchange => build/templates/FixedRateExchange/FixedRateExchange.wasm
|
||||
✔ Compile subgraph
|
||||
Copy schema file build/schema.graphql
|
||||
Write subgraph file build/ERC721Factory/node_modules/@oceanprotocol/contracts/artifacts/contracts/ERC721Factory.sol/ERC721Factory.json
|
||||
Write subgraph file build/ERC721Factory/abis/ERC20.json
|
||||
Write subgraph file build/FactoryRouter/node_modules/@oceanprotocol/contracts/artifacts/contracts/pools/FactoryRouter.sol/FactoryRouter.json
|
||||
Write subgraph file build/FactoryRouter/abis/ERC20.json
|
||||
Write subgraph file build/veAllocate/node_modules/@oceanprotocol/contracts/artifacts/contracts/ve/veAllocate.sol/veAllocate.json
|
||||
Write subgraph file build/veOCEAN/node_modules/@oceanprotocol/contracts/artifacts/contracts/ve/veOCEAN.vy/veOCEAN.json
|
||||
Write subgraph file build/veDelegation/node_modules/@oceanprotocol/contracts/artifacts/contracts/ve/veDelegation.vy/veDelegation.json
|
||||
Write subgraph file build/veFeeDistributor/node_modules/@oceanprotocol/contracts/artifacts/contracts/ve/veFeeDistributor.vy/veFeeDistributor.json
|
||||
Write subgraph file build/DFRewards/node_modules/@oceanprotocol/contracts/artifacts/contracts/df/DFRewards.sol/DFRewards.json
|
||||
Write subgraph file build/ERC20Template/node_modules/@oceanprotocol/contracts/artifacts/contracts/templates/ERC20Template.sol/ERC20Template.json
|
||||
Write subgraph file build/ERC20Template/node_modules/@oceanprotocol/contracts/artifacts/contracts/templates/ERC20TemplateEnterprise.sol/ERC20TemplateEnterprise.json
|
||||
Write subgraph file build/ERC20Template/abis/ERC20.json
|
||||
Write subgraph file build/ERC20Template/node_modules/@oceanprotocol/contracts/artifacts/contracts/utils/ERC20Roles.sol/ERC20Roles.json
|
||||
Write subgraph file build/ERC721Template/node_modules/@oceanprotocol/contracts/artifacts/contracts/templates/ERC721Template.sol/ERC721Template.json
|
||||
Write subgraph file build/ERC721Template/node_modules/@oceanprotocol/contracts/artifacts/contracts/utils/ERC721RolesAddress.sol/ERC721RolesAddress.json
|
||||
Write subgraph file build/ERC721Template/abis/ERC20.json
|
||||
Write subgraph file build/Dispenser/node_modules/@oceanprotocol/contracts/artifacts/contracts/pools/dispenser/Dispenser.sol/Dispenser.json
|
||||
Write subgraph file build/Dispenser/abis/ERC20.json
|
||||
Write subgraph file build/FixedRateExchange/node_modules/@oceanprotocol/contracts/artifacts/contracts/pools/fixedRate/FixedRateExchange.sol/FixedRateExchange.json
|
||||
Write subgraph file build/FixedRateExchange/abis/ERC20.json
|
||||
Write subgraph manifest build/subgraph.yaml
|
||||
✔ Write compiled subgraph to build/
|
||||
Add file to IPFS build/schema.graphql
|
||||
.. QmQa3a9ypCLC84prHGQdhbcGG4DHJceqADGxmZMmAAXuTz
|
||||
Add file to IPFS build/ERC721Factory/node_modules/@oceanprotocol/contracts/artifacts/contracts/ERC721Factory.sol/ERC721Factory.json
|
||||
.. QmSoG3r5vyWXqjEfKAQYjwtQcQkZCsZEcJXVFWVq1tT1dD
|
||||
Add file to IPFS build/ERC721Factory/abis/ERC20.json
|
||||
.. QmXuTbDkNrN27VydxbS2huvKRk62PMgUTdPDWkxcr2w7j2
|
||||
Add file to IPFS build/FactoryRouter/node_modules/@oceanprotocol/contracts/artifacts/contracts/pools/FactoryRouter.sol/FactoryRouter.json
|
||||
.. QmcBVA1R3yi2167UZMvV4LvG4cMHjL8ZZXmPMriCjn8DEe
|
||||
Add file to IPFS build/FactoryRouter/abis/ERC20.json
|
||||
.. QmXuTbDkNrN27VydxbS2huvKRk62PMgUTdPDWkxcr2w7j2 (already uploaded)
|
||||
Add file to IPFS build/veAllocate/node_modules/@oceanprotocol/contracts/artifacts/contracts/ve/veAllocate.sol/veAllocate.json
|
||||
.. Qmc3iwQkQAhqe1PjzTt6KZLh9rsWQvyxkFt7doj2iXv8C3
|
||||
Add file to IPFS build/veOCEAN/node_modules/@oceanprotocol/contracts/artifacts/contracts/ve/veOCEAN.vy/veOCEAN.json
|
||||
.. QmahFjirJqiwKpytFZ9CdE92LdPGBUDZs6AWpsrH2wn1VP
|
||||
Add file to IPFS build/veDelegation/node_modules/@oceanprotocol/contracts/artifacts/contracts/ve/veDelegation.vy/veDelegation.json
|
||||
.. QmfU6kZ5sksLdj3q88n7SUP63C1cnhQjU8vuMmRYwf2v5r
|
||||
Add file to IPFS build/veFeeDistributor/node_modules/@oceanprotocol/contracts/artifacts/contracts/ve/veFeeDistributor.vy/veFeeDistributor.json
|
||||
.. QmVU51oBr62D4UFXTwnMcbzuBBAAeQssqmqM9jic7A6L3v
|
||||
Add file to IPFS build/DFRewards/node_modules/@oceanprotocol/contracts/artifacts/contracts/df/DFRewards.sol/DFRewards.json
|
||||
.. QmcckRMahzpL7foEFGpWfkDBsyoWbNRfLC32uFq8ceUV3a
|
||||
Add file to IPFS build/ERC721Factory/ERC721Factory.wasm
|
||||
.. QmVfDAgZdKWxMuNfT7kso1LbFre2xhYbEeHBGm3gH3R9oE
|
||||
Add file to IPFS build/FactoryRouter/FactoryRouter.wasm
|
||||
.. QmYCC9AcaYw3nGSqNXNFHVsuB67FQEyZ8twRjRXrprcgyp
|
||||
Add file to IPFS build/veAllocate/veAllocate.wasm
|
||||
.. QmUFaYDxChi5nKEJLvHQZP1cRoqqP5k3fYSwk2JjuSceiJ
|
||||
Add file to IPFS build/veOCEAN/veOCEAN.wasm
|
||||
.. QmRYCyYKwHdSeM55vuvL1mdCooDkFQm6d2TQ7iK2N1qgur
|
||||
Add file to IPFS build/veDelegation/veDelegation.wasm
|
||||
.. QmaTjRLirzfidtQTYgzxqVVD9AX9e69TN1Y8fEsNQ9AEZq
|
||||
Add file to IPFS build/veFeeDistributor/veFeeDistributor.wasm
|
||||
.. QmZCEp4yxiDyuksEjSaceogJwLMto2UGfV1KxVuJTJLTqg
|
||||
Add file to IPFS build/DFRewards/DFRewards.wasm
|
||||
.. QmRSxe52B836bdfoJbuDY4tUCawzqgkHRNxe9ucU1JdYm5
|
||||
Add file to IPFS build/ERC20Template/node_modules/@oceanprotocol/contracts/artifacts/contracts/templates/ERC20Template.sol/ERC20Template.json
|
||||
.. QmPkhFvnBbqA3You7NsK5Zsyh8kkizXUHF9pcC5V6qDJQu
|
||||
Add file to IPFS build/ERC20Template/node_modules/@oceanprotocol/contracts/artifacts/contracts/templates/ERC20TemplateEnterprise.sol/ERC20TemplateEnterprise.json
|
||||
.. QmZnogwnfr4TeBPykvmCL2oaX63AKQP1F1uBAbbfnyPAzB
|
||||
Add file to IPFS build/ERC20Template/abis/ERC20.json
|
||||
.. QmXuTbDkNrN27VydxbS2huvKRk62PMgUTdPDWkxcr2w7j2 (already uploaded)
|
||||
Add file to IPFS build/ERC20Template/node_modules/@oceanprotocol/contracts/artifacts/contracts/utils/ERC20Roles.sol/ERC20Roles.json
|
||||
.. QmTWTzg4jTx4GxGApVyxirNRTxB7QovS4bHGuWnnW8Ciz2
|
||||
Add file to IPFS build/templates/ERC20Template/ERC20Template.wasm
|
||||
.. QmUcxes5La7n9481Vf9AoQ2Mjt1CrbS7T6tDhpnfF77Uh5
|
||||
Add file to IPFS build/ERC721Template/node_modules/@oceanprotocol/contracts/artifacts/contracts/templates/ERC721Template.sol/ERC721Template.json
|
||||
.. QmPE82CiACicgu1WxEjeFrLmskiJADroQRnxH7owpK6jaP
|
||||
Add file to IPFS build/ERC721Template/node_modules/@oceanprotocol/contracts/artifacts/contracts/utils/ERC721RolesAddress.sol/ERC721RolesAddress.json
|
||||
.. Qmdhi7UK6Ww8vXH9YC3JxVUEFjTyx3XycF53rRZapVK5c3
|
||||
Add file to IPFS build/ERC721Template/abis/ERC20.json
|
||||
.. QmXuTbDkNrN27VydxbS2huvKRk62PMgUTdPDWkxcr2w7j2 (already uploaded)
|
||||
Add file to IPFS build/templates/ERC721Template/ERC721Template.wasm
|
||||
.. QmNhLws24szwpz8LM2sL6HHKc6KK4vtJwzfeZWkghuqn7Q
|
||||
Add file to IPFS build/Dispenser/node_modules/@oceanprotocol/contracts/artifacts/contracts/pools/dispenser/Dispenser.sol/Dispenser.json
|
||||
.. QmdiN7Fhw9sjoVVJgHtTtzxv5fwtFMHLNH1x1yqbswsThW
|
||||
Add file to IPFS build/Dispenser/abis/ERC20.json
|
||||
.. QmXuTbDkNrN27VydxbS2huvKRk62PMgUTdPDWkxcr2w7j2 (already uploaded)
|
||||
Add file to IPFS build/templates/Dispenser/Dispenser.wasm
|
||||
.. QmTpn9wagpmH6byjjdCBZdgypFgcw2mva3bC52nC4z3eLW
|
||||
Add file to IPFS build/FixedRateExchange/node_modules/@oceanprotocol/contracts/artifacts/contracts/pools/fixedRate/FixedRateExchange.sol/FixedRateExchange.json
|
||||
.. Qmd2ToAptK74j8pGxe8mZXfAvY3AxstgmYH8JDMAfLtAGd
|
||||
Add file to IPFS build/FixedRateExchange/abis/ERC20.json
|
||||
.. QmXuTbDkNrN27VydxbS2huvKRk62PMgUTdPDWkxcr2w7j2 (already uploaded)
|
||||
Add file to IPFS build/templates/FixedRateExchange/FixedRateExchange.wasm
|
||||
.. QmRrwwoFF33LvPhnGCGgLBLyuLizrFgD44kW9io81tPZzX
|
||||
✔ Upload subgraph to IPFS
|
||||
|
||||
Build completed: QmVUKpgwuyDh9KgUxTzZvVNFJbdevc56YrZpZjQvu8Yp7q
|
||||
|
||||
Deployed to http://127.0.0.1:8000/subgraphs/name/oceanprotocol/ocean-subgraph/graphql
|
||||
|
||||
Subgraph endpoints:
|
||||
Queries (HTTP): http://127.0.0.1:8000/subgraphs/name/oceanprotocol/ocean-subgraph
|
||||
```
|
||||
|
||||
Ocean Subgraph is deployed under /subgraphs/name/oceanprotocol/ocean-subgraph/. To access it from the server on which is was deployed, open a browser and go to [http://127.0.0.1:8000/subgraphs/name/oceanprotocol/ocean-subgraph/graphql](http://127.0.0.1:8000/subgraphs/name/oceanprotocol/ocean-subgraph/graphql).
|
||||
|
||||
|
||||
|
||||
|
@ -4,7 +4,7 @@ description: Learn the basic moves to start kicking a** Data Farming
|
||||
|
||||
# DF Basic Actions (Blue Belt)
|
||||
|
||||
<figure><img src="../.gitbook/assets/neo-kinda-martial-arts.gif" alt=""><figcaption><p>Like Neo, you have great potential.</p></figcaption></figure>
|
||||
<figure><img src="../.gitbook/assets/gif/neo-kinda-martial-arts.gif" alt=""><figcaption><p>Like Neo, you have great potential.</p></figcaption></figure>
|
||||
|
||||
### Get Started
|
||||
|
||||
|
@ -7,7 +7,7 @@ description: >-
|
||||
|
||||
# DF Emissions & APYs (Black Belt)
|
||||
|
||||
<figure><img src="../.gitbook/assets/neo-bb.gif" alt=""><figcaption><p>Like a true master of The Way of Data Farming.</p></figcaption></figure>
|
||||
<figure><img src="../.gitbook/assets/gif/neo-bb.gif" alt=""><figcaption><p>Like a true master of The Way of Data Farming.</p></figcaption></figure>
|
||||
|
||||
### Why veOCEAN is important to OceanDAO
|
||||
|
||||
@ -51,9 +51,10 @@ The plot below shows estimated APY over time. Green includes both passive and ac
|
||||
|
||||
APYs are an estimate because APY depends on OCEAN locked. OCEAN locked for future weeks is not known precisely; it must be estimated. The yellow line is the model for OCEAN locked. We modeled OCEAN locked by observing linear growth from week 5 (when OCEAN locking was introduced) to week 28 (now): OCEAN locked grew from 7.89M OCEAN to 34.98M OCEAN respectively, or 1.177M more OCEAN locked per week.
|
||||
|
||||
\\
|
||||
\
|
||||
|
||||
<figure><img src="../.gitbook/assets/rewards/example_apys.png" alt="" width="563"><figcaption><p><em>Green: estimated APYs (passive + active). Black: estimated APYs (just passive). Yellow: estimated staking</em></p></figcaption></figure>
|
||||
|
||||
<figure><img src="../.gitbook/assets/rewards/example_apys.png" alt="" width="563"><figcaption><p><em>Green: estimated APYs (passive + active). Black: estimated APYs (just passive). Yellow: estimated staking</em> </p></figcaption></figure>
|
||||
|
||||
All the plots are calculated from [this Google Sheet](https://docs.google.com/spreadsheets/d/1F4o7PbV45yW1aPWOJ2rwZEKkgJXbIk5Yq7tj8749drc/edit#gid=1051477754).
|
||||
|
||||
|
@ -4,7 +4,7 @@ description: Learn the fundamentals of The Way of Data Farming 🧑🏫
|
||||
|
||||
# Data Farming 101 (White Belt)
|
||||
|
||||
<figure><img src="../.gitbook/assets/morpheus.gif" alt=""><figcaption><p>Meet your sensei.</p></figcaption></figure>
|
||||
<figure><img src="../.gitbook/assets/gif/morpheus.gif" alt=""><figcaption><p>Meet your sensei.</p></figcaption></figure>
|
||||
|
||||
### What is Data Farming?
|
||||
|
||||
@ -24,7 +24,7 @@ Every week OCEAN rewards are paid out to Data Farmers in two different ways: **p
|
||||
|
||||
Passive rewards are the OCEAN rewards paid to Data Farmers just for locking their OCEAN tokens.
|
||||
|
||||
<figure><img src="../.gitbook/assets/passive-income.gif" alt=""><figcaption></figcaption></figure>
|
||||
<figure><img src="../.gitbook/assets/gif/passive-income.gif" alt=""><figcaption></figcaption></figure>
|
||||
|
||||
[To start getting passive rewards, go here.](../user-guides/get-started-df.md)
|
||||
|
||||
@ -46,7 +46,7 @@ Each Data Farming weekly round has a pool of OCEAN rewards, and 50% of the pool
|
||||
|
||||
### What are Publisher Rewards?
|
||||
|
||||
<figure><img src="../.gitbook/assets/just-publish.gif" alt=""><figcaption><p>Publishing makes you *more* OCEAN rewards</p></figcaption></figure>
|
||||
<figure><img src="../.gitbook/assets/gif/just-publish.gif" alt=""><figcaption><p>Publishing makes you *more* OCEAN rewards</p></figcaption></figure>
|
||||
|
||||
Data Farming strongly incentivizes publishing assets in the Ocean ecosystem by giving double the active rewards to Data Farmers that allocate to their own published assets.
|
||||
|
||||
|
@ -6,7 +6,7 @@ description: >-
|
||||
|
||||
# DF Max Out Yield (Purple Belt)
|
||||
|
||||
<figure><img src="../.gitbook/assets/i-know-kung-fu.gif" alt=""><figcaption><p>You know enough to be dangerous.</p></figcaption></figure>
|
||||
<figure><img src="../.gitbook/assets/gif/i-know-kung-fu.gif" alt=""><figcaption><p>You know enough to be dangerous.</p></figcaption></figure>
|
||||
|
||||
### How to Maximize Your Yield
|
||||
|
||||
@ -23,7 +23,7 @@ Thus, if you really want to max out your APY:
|
||||
|
||||
Marketing your assets to buyers is your challenge. Just because you publish them in the Ocean ecosystem doesn't mean that they will sell. It will take real work. Your reward is great APY. It’s incentives all the way down :)
|
||||
|
||||
<figure><img src="../.gitbook/assets/hustlin.gif" alt=""><figcaption></figcaption></figure>
|
||||
<figure><img src="../.gitbook/assets/gif/hustlin.gif" alt=""><figcaption></figcaption></figure>
|
||||
|
||||
### Measuring Data Farming's Success
|
||||
|
||||
@ -50,7 +50,7 @@ At the top-end, this helps increase quality and diversification of inventory.
|
||||
|
||||
At the bottom-end, this eliminates some potential free-rider issues and smooths out the reward distribution.
|
||||
|
||||
![Ranked Rewards](../.gitbook/assets/rewards/ranked\_rewards\_study.png)
|
||||
![Ranked Rewards](../.gitbook/assets/rewards/ranked_rewards_study.png)
|
||||
|
||||
You can read more about the why, what, and how of Ranked Rewards [in this blog post](https://blog.oceanprotocol.com/data-farming-df22-completed-df23-started-reward-function-tuned-ffd4359657ee) and find the full study [in these slides](https://docs.google.com/presentation/d/1HIA2zV8NUPpCELmi2WFwnAbHmFFrcXjNQiCpEqJ2Jdg/).
|
||||
|
||||
@ -89,4 +89,4 @@ The table below shows the total amount of OCEAN rewards that will be distributed
|
||||
|
||||
<figure><img src="../.gitbook/assets/rewards/reward_schedule.png" alt=""><figcaption><p><em>Ocean Reward Schedule for the next 20+ years</em></p></figcaption></figure>
|
||||
|
||||
<figure><img src="../.gitbook/assets/cash-flow.gif" alt=""><figcaption></figcaption></figure>
|
||||
<figure><img src="../.gitbook/assets/gif/cash-flow.gif" alt=""><figcaption></figcaption></figure>
|
||||
|
@ -6,7 +6,7 @@ description: >-
|
||||
|
||||
# DF "ve" in veOCEAN (Brown Belt)
|
||||
|
||||
<figure><img src="../.gitbook/assets/neo-blocking.gif" alt=""><figcaption><p>Data Farming is getting effortless.</p></figcaption></figure>
|
||||
<figure><img src="../.gitbook/assets/gif/neo-blocking.gif" alt=""><figcaption><p>Data Farming is getting effortless.</p></figcaption></figure>
|
||||
|
||||
### What does the "ve" in veOCEAN stand for?
|
||||
|
||||
@ -45,7 +45,7 @@ Active rewards follow the usual Data Farming formula: $ of sales of the asset \*
|
||||
|
||||
### veOCEAN Time Locking
|
||||
|
||||
Users can lock their OCEAN for different lengths of time to gain more veOCEAN **voting power**. The Data Farming dApp is designed to lock OCEAN for **a minimum of 2 weeks and a maximum of four years** (for max rewards). The longer you lock your OCEAN, the more veOCEAN + OCEAN rewards you get!
|
||||
Users can lock their OCEAN for different lengths of time to gain more veOCEAN **voting power**. The Data Farming dApp is designed to lock OCEAN for **a minimum of 2 weeks and a maximum of four years** (for max rewards). The longer you lock your OCEAN, the more veOCEAN + OCEAN rewards you get!  
|
||||
|
||||
On the dApp's [veOCEAN page](https://df.oceandao.org/veocean), the "Lock Multiplier" represents the percentage amount of veOCEAN tokens received per OCEAN token locked.
|
||||
|
||||
@ -111,6 +111,8 @@ After the Lock End Date, then you can withdraw your principal OCEAN tokens on th
|
||||
|
||||
The image below illustrates the flow of value. On the left, at time 0, the staker locks their OCEAN into the veOCEAN contract, and receives veOCEAN. In the middle, the staker receives OCEAN rewards every time there’s revenue to the Ocean Protocol Community (top), and also as part of Data Farming rewards (bottom). On the right, when the lock expires (e.g. 4 years) then the staker is able to move their OCEAN around again.
|
||||
|
||||
 
|
||||
|
||||
<figure><img src="../.gitbook/assets/rewards/flow_of_value.png" alt=""><figcaption><p>Flow of Value</p></figcaption></figure>
|
||||
|
||||
The veOCEAN design is in accordance with the Web3 Sustainability Loop, which Ocean uses as its system-level design.
|
||||
@ -121,7 +123,7 @@ The veOCEAN code was forked from the veCRV code. veCRV parameters will be the st
|
||||
|
||||
The "veTokenomics" model of veOCEAN (vote-escrowed token economics) is inspired by Curve Finance's [veCRV](https://curve.readthedocs.io/dao-fees.html) token code. We took this inspiration to enable our users to participate in on-chain governance and earn rewards within the Ocean Protocol ecosystem.
|
||||
|
||||
[Here is Ocean Protocol's open-source code](https://github.com/oceanprotocol/contracts/blob/main/contracts/ve/veFeeDistributor.vy#L240-L256) for veOCEAN, and if you're a developer, then you'll notice the strong similarities to [veCRV's](https://curve.readthedocs.io/dao-fees.html) code.
|
||||
[Here is Ocean Protocol's open-source code](https://github.com/oceanprotocol/contracts/blob/main/contracts/ve/veFeeDistributor.vy#L240-L256) for veOCEAN, and if you're a developer, then you'll notice the strong similarities to [veCRV's](https://curve.readthedocs.io/dao-fees.html) code.
|
||||
|
||||
### veOCEAN's Smart Contracts Security
|
||||
|
||||
@ -130,3 +132,4 @@ The "veTokenomics" model of veOCEAN (vote-escrowed token economics) is inspired
|
||||
We have built [a new contract](https://github.com/oceanprotocol/contracts/blob/main/contracts/ve/veAllocate.sol) for users to point their veOCEAN towards given data assets (“allocate veOCEAN”). These new contracts do not control the veOCEAN core contracts at all. In the event of a breach, the only funds at risk would be the rewards distributed for a single week; and we would be able to redirect future funds to a different contract.
|
||||
|
||||
We have an [ongoing bug bounty via Immunefi](https://immunefi.com/bounty/oceanprotocol/) for Ocean software, including veOCEAN and DF components. If you identify an issue, please report it there and get rewarded.
|
||||
|
||||
|
@ -8,7 +8,7 @@ coverY: 0
|
||||
|
||||
# 📚 User Guides
|
||||
|
||||
<figure><img src="../.gitbook/assets/follow-instructions.gif" alt="" width="375"><figcaption></figcaption></figure>
|
||||
<figure><img src="../.gitbook/assets/gif/follow-instructions.gif" alt="" width="375"><figcaption></figcaption></figure>
|
||||
|
||||
### Tokenize your cool stuff and make money 🤑
|
||||
|
||||
|
@ -4,7 +4,7 @@ description: How to Buy and Download Data on the Ocean Market
|
||||
|
||||
# Buy NFT Data
|
||||
|
||||
<figure><img src="../.gitbook/assets/clueless-shopping.gif" alt=""><figcaption><p>That moment when you buy your first datatoken</p></figcaption></figure>
|
||||
<figure><img src="../.gitbook/assets/gif/clueless-shopping.gif" alt=""><figcaption><p>That moment when you buy your first datatoken</p></figcaption></figure>
|
||||
|
||||
### Let's Go Shopping! 💁♀️🛍️
|
||||
|
||||
|
@ -4,7 +4,7 @@ description: How to claim OCEAN token rewards from data farming 🧑🌾🥕
|
||||
|
||||
# Claim Rewards Data Farming
|
||||
|
||||
<figure><img src="../.gitbook/assets/underwater-treasure.gif" alt=""><figcaption></figcaption></figure>
|
||||
<figure><img src="../.gitbook/assets/gif/underwater-treasure.gif" alt=""><figcaption></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!
|
||||
|
||||
|
@ -6,7 +6,7 @@ description: >-
|
||||
|
||||
# Make a Boss C2D Algorithm
|
||||
|
||||
<figure><img src="../../.gitbook/assets/like-a-boss.gif" alt=""><figcaption></figcaption></figure>
|
||||
<figure><img src="../../.gitbook/assets/gif/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.
|
||||
|
||||
|
@ -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/the-algorithm.gif" alt=""><figcaption><p>You're an algorithm guru after all!</p></figcaption></figure>
|
||||
<figure><img src="../../.gitbook/assets/gif/the-algorithm.gif" alt=""><figcaption><p>You're an algorithm guru after all!</p></figcaption></figure>
|
||||
|
||||
### Publish Your Algorithm NFT
|
||||
|
||||
|
@ -4,7 +4,7 @@ description: How to publish a data NFT with C2D configurations
|
||||
|
||||
# Publish a C2D Data NFT
|
||||
|
||||
<figure><img src="../../.gitbook/assets/talk-data-to-me.gif" alt="" width="375"><figcaption></figcaption></figure>
|
||||
<figure><img src="../../.gitbook/assets/gif/talk-data-to-me.gif" alt="" width="375"><figcaption></figcaption></figure>
|
||||
|
||||
#### Step 1 - Navigate to the Ocean Market
|
||||
|
||||
|
@ -6,9 +6,9 @@ description: Get veOCEAN tokens to use the Data Farming dApp and make yield!
|
||||
|
||||
### What the \*@$! is Data Farming?
|
||||
|
||||
[Data Farming](https://df.oceandao.org) is our dApp that generates yield for participants that curate and publish valuable assets in the Ocean ecosystem.
|
||||
[Data Farming](https://df.oceandao.org) is our dApp that generates yield for participants that curate and publish valuable assets in the Ocean ecosystem. 
|
||||
|
||||
<figure><img src="../.gitbook/assets/super-mario-coins.gif" alt="" width="250"><figcaption><p>Get veOCEAN tokens</p></figcaption></figure>
|
||||
<figure><img src="../.gitbook/assets/gif/super-mario-coins.gif" alt="" width="250"><figcaption><p>Get veOCEAN tokens</p></figcaption></figure>
|
||||
|
||||
### What is veOCEAN and why do you want it? 🌊
|
||||
|
||||
@ -40,7 +40,7 @@ Watch and learn, friend
|
||||
|
||||
* 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:
|
||||
|
||||
|
@ -6,9 +6,9 @@ description: >-
|
||||
|
||||
# Join a Data Challenge
|
||||
|
||||
<figure><img src="../.gitbook/assets/morpheus-taunting.gif" alt=""><figcaption><p>Bring on the data challenges.</p></figcaption></figure>
|
||||
<figure><img src="../.gitbook/assets/gif/morpheus-taunting.gif" alt=""><figcaption><p>Bring on the data challenges.</p></figcaption></figure>
|
||||
|
||||
Hone your skills, work on real business problems, and earn sweet dosh along the way.
|
||||
Hone your skills, work on real business problems, and earn sweet dosh along the way. 
|
||||
|
||||
### What is an Ocean Protocol data challenge?
|
||||
|
||||
|
@ -4,7 +4,7 @@ description: How to Mint and Publish Data NFTs Using the Ocean Market
|
||||
|
||||
# Publish Data NFTs
|
||||
|
||||
<figure><img src="../.gitbook/assets/kermit-typing.gif" alt=""><figcaption></figcaption></figure>
|
||||
<figure><img src="../.gitbook/assets/gif/kermit-typing.gif" alt=""><figcaption></figcaption></figure>
|
||||
|
||||
### What to Publish? 🤷♀️
|
||||
|
||||
|
@ -4,13 +4,13 @@ description: Sponsor a data challenge to crowdsource solutions for your business
|
||||
|
||||
# Sponsor a Data Challenge
|
||||
|
||||
<figure><img src="../.gitbook/assets/welcome-to-my-dojo.gif" alt=""><figcaption><p>Make the game, set the rules.</p></figcaption></figure>
|
||||
<figure><img src="../.gitbook/assets/gif/welcome-to-my-dojo.gif" alt=""><figcaption><p>Make the game, set the rules.</p></figcaption></figure>
|
||||
|
||||
Hosting a data challenge is a fun way to engage data scientists and machine learning experts around the world to **solve your real business problems**. Incentivize participants to **build products using your data**, **explain insights in your data**, or **provide useful data predictions** for your business. Plus, it's a whole lot cheaper than hiring an in-house data science team!
|
||||
|
||||
### How to sponsor an Ocean Protocol data challenge?
|
||||
|
||||
1. Establish the business problem you want to solve. The first step in building a data solution is understanding what you want to solve. For example, you may want to be able to predict the drought risk in an area to help price parametric insurance, or predict the price of ETH to optimize Uniswap LPing.
|
||||
1. Establish the business problem you want to solve. The first step in building a data solution is understanding what you want to solve. For example, you may want to be able to predict the drought risk in an area to help price parametric insurance, or predict the price of ETH to optimize Uniswap LPing. 
|
||||
2. Curate the dataset(s) that participants will use for the challenge. The key to hosting a good data challenge is to provide an exciting and through dataset that participants can use to build their solutions. Do your research to understand what data is available, whether it be free from an API, available for download, require any transformations, etc. For the first challenge, it is alright if the created dataset is a static file. However, it is best to ensure there is a path to making the data available from a dynamic endpoint so that entires can eventually be applied to current, real-world use cases.
|
||||
3. Decide how the judging process will occur. This includes how long to make review period, how to score submissions, and how to decide any prizes will be divided among participants
|
||||
4. Work with Ocean Protocol to gather participants for your data challenge. Creating blog posts and hosting Twitter Spaces is a good way to spread the word about your data challenge.
|
||||
|
@ -4,7 +4,7 @@ description: Buy, mint, and sell all sorts of data on the Ocean Market
|
||||
|
||||
# Guide to the Ocean Market
|
||||
|
||||
<figure><img src="../.gitbook/assets/shopping-minions.gif" alt=""><figcaption><p>Retail therapy mood!</p></figcaption></figure>
|
||||
<figure><img src="../.gitbook/assets/gif/shopping-minions.gif" alt=""><figcaption><p>Retail therapy mood!</p></figcaption></figure>
|
||||
|
||||
### What is the [Ocean Market](https://market.oceanprotocol.com/)? 🛒
|
||||
|
||||
|