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

GITBOOK-340: more Ocean.js updates

This commit is contained in:
Bogdan Fazakas 2023-06-09 13:10:40 +00:00 committed by gitbook-bot
parent 3210088235
commit d03a281c33
No known key found for this signature in database
GPG Key ID: 07D2180C7B12D0FF
17 changed files with 277 additions and 30 deletions

View File

@ -5,8 +5,8 @@
* [Explore](discover/explore.md) * [Explore](discover/explore.md)
* [Basic Concepts](discover/engage.md) * [Basic Concepts](discover/engage.md)
* [Ocean 101](discover/ocean-101.md) * [Ocean 101](discover/ocean-101.md)
* [Wallets](discover/wallets/README.md) * [Wallets](discover/wallets.md)
* [Set Up MetaMask Wallet](discover/wallets/metamask-setup.md) * [Set Up MetaMask Wallet](discover/metamask-setup.md)
* [Networks](discover/networks/README.md) * [Networks](discover/networks/README.md)
* [Bridges](discover/networks/bridges.md) * [Bridges](discover/networks/bridges.md)
* [Manage Your OCEAN Tokens](discover/wallets-and-ocean-tokens.md) * [Manage Your OCEAN Tokens](discover/wallets-and-ocean-tokens.md)
@ -42,12 +42,13 @@
* [Pricing Schemas](developers/asset-pricing.md) * [Pricing Schemas](developers/asset-pricing.md)
* [Fees](developers/fees.md) * [Fees](developers/fees.md)
* [Metadata](developers/contracts/metadata.md) * [Metadata](developers/contracts/metadata.md)
* [Fractional Ownership](developers/fractional-ownership.md) * [Fractional Ownership](developers/datanft-and-datatoken/fractional-ownership.md)
* [Community Monetization](developers/community-monetization.md) * [Community Monetization](developers/community-monetization.md)
* [Identifiers & Metadata](developers/Identifiers-Metadata.md) * [Identifiers & Metadata](developers/Identifiers-Metadata.md)
* [DDO Specification](developers/ddo-specification.md) * [DDO Specification](developers/ddo-specification.md)
* [Storage Specifications](developers/storage-specifications.md) * [Storage Specifications](developers/storage-specifications.md)
* [Fine-Grained Permissions](developers/Fine-Grained-Permissions.md) * [Fine-Grained Permissions](developers/Fine-Grained-Permissions.md)
* [Barge](developers/barge.md)
* [Local Setup - Barge](developers/local-setup-ganache.md) * [Local Setup - Barge](developers/local-setup-ganache.md)
* [Build a Marketplace](developers/build-a-marketplace/README.md) * [Build a Marketplace](developers/build-a-marketplace/README.md)
* [Forking Ocean Market](developers/build-a-marketplace/forking-ocean-market.md) * [Forking Ocean Market](developers/build-a-marketplace/forking-ocean-market.md)
@ -79,7 +80,8 @@
* [Mint Datatokens](developers/ocean.js/mint-datatoken.md) * [Mint Datatokens](developers/ocean.js/mint-datatoken.md)
* [Update Metadata](developers/ocean.js/update-metadata.md) * [Update Metadata](developers/ocean.js/update-metadata.md)
* [Asset Visibility](developers/ocean.js/remove-asset.md) * [Asset Visibility](developers/ocean.js/remove-asset.md)
* [CoD Asset](developers/ocean.js/cod-asset.md) * [Consume Asset](developers/ocean.js/consume-asset.md)
* [Run C2D Jobs](developers/ocean.js/cod-asset.md)
* [Compute to data](developers/compute-to-data/README.md) * [Compute to data](developers/compute-to-data/README.md)
* [Architecture](developers/compute-to-data/compute-to-data-architecture.md) * [Architecture](developers/compute-to-data/compute-to-data-architecture.md)
* [Datasets & Algorithms](developers/compute-to-data/compute-to-data-datasets-algorithms.md) * [Datasets & Algorithms](developers/compute-to-data/compute-to-data-datasets-algorithms.md)

View File

@ -23,4 +23,4 @@ These [smart contracts](contracts/) form the backbone of Ocean Protocol, empower
<figure><img src="../.gitbook/assets/smart-contracts.png" alt=""><figcaption><p>Smart Contracts</p></figcaption></figure> <figure><img src="../.gitbook/assets/smart-contracts.png" alt=""><figcaption><p>Smart Contracts</p></figcaption></figure>
Now, if you're new to the world of web3 and blockchain technologies, fear not! We've got you covered. Before diving into the depths of Ocean Protocol, we recommend starting with some introductory guides. These [guides](../user-guides/) will gently introduce you to the magical world of [web3](../discover/wallets/) and help you understand the [basics](../discover/wallets-and-ocean-tokens.md) before you embark on your epic data-driven adventure. Now, if you're new to the world of web3 and blockchain technologies, fear not! We've got you covered. Before diving into the depths of Ocean Protocol, we recommend starting with some introductory guides. These [guides](../user-guides/) will gently introduce you to the magical world of [web3](../discover/wallets.md) and help you understand the [basics](../discover/wallets-and-ocean-tokens.md) before you embark on your epic data-driven adventure.

View File

@ -46,7 +46,7 @@ Prominently featured within this layer is [Ocean Market](../user-guides/using-oc
### Layer 4: The Friendly Wallets ### Layer 4: The Friendly Wallets
At the top of the Ocean Protocol ecosystem, we find the esteemed [Web 3 Wallets](../discover/wallets/), the gateway for users to immerse themselves in the world of decentralized data transactions. These wallets serve as trusted companions, enabling users to seamlessly transact within the ecosystem, purchase and sell data NFTs, and acquire valuable datatokens. For a more detailed exploration of Web 3 Wallets and their capabilities, you can refer to the [wallet intro page](../discover/wallets/). At the top of the Ocean Protocol ecosystem, we find the esteemed [Web 3 Wallets](../discover/wallets.md), the gateway for users to immerse themselves in the world of decentralized data transactions. These wallets serve as trusted companions, enabling users to seamlessly transact within the ecosystem, purchase and sell data NFTs, and acquire valuable datatokens. For a more detailed exploration of Web 3 Wallets and their capabilities, you can refer to the [wallet intro page](../discover/wallets.md).

15
developers/barge.md Normal file
View File

@ -0,0 +1,15 @@
---
description: 🧑🏽‍💻 Local Development Environment for Ocean Protocol
---
# Barge
The Barge component of Ocean Protocol is a powerful tool designed to simplify the development process by providing Docker Compose files for running the full Ocean Protocol stack locally. It allows developers to easily set up and configure the various services required by Ocean Protocol for local testing and development purposes.
By using the Barge component, developers can quickly spin up an environment that includes default versions of Aquarius, Provider, Subgraph, and Compute-to-Data. Additionally, it deploys all the smart contracts from the ocean-contracts repository, ensuring a complete and functional local setup. Barge component also starts additional services like Ganache, which is a local blockchain simulator used for smart contract development, and Elasticsearch, a powerful search and analytics engine required by Aquarius for efficient indexing and querying of data sets. Full list of components and exposed ports can be found here: [https://github.com/oceanprotocol/barge#component-versions-and-exposed-ports](https://github.com/oceanprotocol/barge#component-versions-and-exposed-ports)
To explore all the available options and gain a deeper understanding of how to utilize the Barge component, you can visit the official GitHub repository of Ocean Protocol at the following link: [https://github.com/oceanprotocol/barge#all-options](https://github.com/oceanprotocol/barge#all-options).
By utilizing the Barge component, developers gain the freedom to conduct experiments, customize, and fine-tune their local development environment, and offers the flexibility to override the Docker image tag associated with specific components. By simply setting the appropriate environment variable before executing the start\_ocean.sh command, developers can customize the versions of various components according to their requirements. For instance, developers can modify the: AQUARIUS\_VERSION, PROVIDER\_VERSION, CONTRACTS\_VERSION, RBAC\_VERSION, and ELASTICSEARCH\_VERSION environment variables to specify the desired Docker image tags for each respective component.&#x20;
By leveraging the power of the Barge component, developers can accelerate their development workflows.\

View File

@ -17,3 +17,17 @@ Ocean.js is part of the [Ocean Protocol](https://oceanprotocol.com) toolset.
{% embed url="https://www.youtube.com/watch?v=lqGXPkPUCqI" %} {% embed url="https://www.youtube.com/watch?v=lqGXPkPUCqI" %}
Introducing Ocean.JS Introducing Ocean.JS
{% endembed %} {% endembed %}
The Ocean.js library adopts the module architectural pattern, ensuring clear separation and organization of code units. Utilizing ES6 modules simplifies the process by allowing you to import only the necessary module for your specific task.
Our module structure follows this format:
* Types
* Config
* Contracts
* Services
* Utils
When working with a particular module, you will need to provide different parameters. To instantiate classes from the contracts module, you must pass objects such as Signer, which represents the wallet instance, or the contract address you wish to utilize, depending on the scenario. As for the services modules, you will need to provide the provider URI or metadata cache URI.
&#x20;&#x20;

View File

@ -104,7 +104,7 @@ Let's install Oceanjs library into your current project by running:
{% tab title="Terminal" %} {% tab title="Terminal" %}
```bash ```bash
npm init npm init
npm i @oceanprotocol/lib@3.0.0-next.5 dotenv crypto-js ethers@5.7.4 @truffle/hdwallet-provider npm i @oceanprotocol/lib@latest dotenv crypto-js ethers@5.7.4 @truffle/hdwallet-provider
``` ```
{% endtab %} {% endtab %}
{% endtabs %} {% endtabs %}
@ -135,12 +135,10 @@ async function oceanConfig(){
provider provider
); );
const publisherAccount = await ethersProvider.provider.getSigner(ethersProvider.address); const publisherAccount = wallet.connect(provider);
const consumerAccount = publisherAccount
const stakerAccount = publisherAccount
let oceanConfig = new ConfigHelper().getConfig( let oceanConfig = new ConfigHelper().getConfig(
parseInt(String((await provider.getSigner(0).provider.getNetwork()).chainId)) parseInt(String((await publisherAccount.provider.getNetwork()).chainId))
) )
const aquarius = new Aquarius(oceanConfig?.metadataCacheUri) const aquarius = new Aquarius(oceanConfig?.metadataCacheUri)
@ -173,8 +171,7 @@ async function oceanConfig(){
publisherAccount: publisherAccount, publisherAccount: publisherAccount,
consumerAccount: consumerAccount, consumerAccount: consumerAccount,
stakerAccount: stakerAccount, stakerAccount: stakerAccount,
aquarius: aquarius, aquarius: aquarius
ethersProvider: ethersProvider,
}; };
return oceanConfig return oceanConfig

View File

@ -0,0 +1,115 @@
# Consume Asset
Consuming an asset involves a two-step process: placing an order and then utilizing the order transaction to download and access the asset's files. Let's delve into each step in more detail.
To initiate the ordering process, there are two scenarios depending on the pricing schema of the asset. Firstly, if the asset has a fixed rate pricing schema configured, you would need to acquire the corresponding datatoken by purchasing it. Once you have obtained the datatoken, you send it to the publisher to place the order for the asset.
The second scenario applies when the asset follows a free pricing schema. In this case, you can obtain a free datatoken from the dispenser service provided by Ocean Protocol. Using the acquired free datatoken, you can place the order for the desired asset.
However, it's crucial to note that even when utilizing free assets, network gas fees still apply. These fees cover the costs associated with executing transactions on the blockchain network.
Additionally, the specific type of datatoken associated with an asset influences the ordering process. There are two common datatoken templates: Template 1 (regular template) and Template 2 (enterprise template). The type of template determines the sequence of method calls required before placing an order.
For assets utilizing Template '1', prior to ordering, you need to perform two separate method calls. First, you need to call the `approve` method to grant permission for the fixedRateExchange contract to spend the required amount of datatokens. Then, you proceed to call the `buyDatatokens` method from the fixedRateExchange contract. This process ensures that you have the necessary datatokens in your possession to successfully place the order. Alternatively, if the asset follows a free pricing schema, you can employ the `dispenser.dispense` method to obtain the free datatoken before proceeding with the order.
On the other hand, assets utilizing Template '2' offer bundled methods for a more streamlined approach. For ordering such assets, you can use methods like `buyFromFreeAndOrder` or `buyFromDispenserAndOrder`. These bundled methods handle the acquisition of the necessary datatokens and the subsequent ordering process in a single step, simplifying the workflow for enterprise-template assets.
Later on, when working with the ocean.js library, you can use this order transaction identifier to call the `getDownloadUrl` method from the provider service class. This method allows you to retrieve the download URL for accessing the asset's files.
#### Prerequisites
* [Obtain an API key](broken-reference)
* [Set up the .env file](broken-reference)
* [Install the dependencies](broken-reference)
* [Create a configuration file](configuration.md)
{% hint style="info" %}
The variable **AQUARIUS\_URL** and **PROVIDER\_URL** should be set correctly in `.env` file
{% endhint %}
#### Create a script to consume an asset
Create a new file in the same working directory where configuration file (`config.js`) and `.env` files are present, and copy the code as listed below.
<pre class="language-javascript"><code class="lang-javascript">// Note: Make sure .env file and config.js are created and setup correctly
const { oceanConfig } = require('./config.js');
const { ZERO_ADDRESS, NftFactory, getHash, Nft } = require ('@oceanprotocol/lib');
// replace the did here
const did = "did:op:a419f07306d71f3357f8df74807d5d12bddd6bcd738eb0b461470c64859d6f0f";
// This function takes did as a parameter and updates the data NFT information
const consumeAsset = async (did) => {
const consumer = await oceanConfig.consumer.getAddress();
// Fetch ddo from Aquarius
const asset = await await oceanConfig.aquarius.resolve(did);
const nft = new Nft(oceanConfig.ethersProvider);
await approve(
consumerAccount,
config,
await consumerAccount.getAddress(),
addresses.Ocean,
freAddress,
'1'
)
const fixedRate = new FixedRateExchange(fixedRateExchangeAddress, consumerAccount)
<strong> const tx =await fixedRate.buyDatatokens(fixedRateId, '1', '2')
</strong><strong>
</strong><strong> const initializeData = await ProviderInstance.initialize(
</strong> resolvedDDO.id,
resolvedDDO.services[0].id,
0,
await consumerAccount.getAddress(),
providerUrl
)
const providerFees: ProviderFees = {
providerFeeAddress: initializeData.providerFee.providerFeeAddress,
providerFeeToken: initializeData.providerFee.providerFeeToken,
providerFeeAmount: initializeData.providerFee.providerFeeAmount,
v: initializeData.providerFee.v,
r: initializeData.providerFee.r,
s: initializeData.providerFee.s,
providerData: initializeData.providerFee.providerData,
validUntil: initializeData.providerFee.validUntil
}
datatoken = new Datatoken(consumerAccount)
const tx = await datatoken.startOrder(
freDatatokenAddress,
await consumerAccount.getAddress(),
0,
providerFees
)
const orderTx = await tx.wait()
const orderStartedTx = getEventFromTx(orderTx, 'OrderStarted')
const downloadURL = await ProviderInstance.getDownloadUrl(
fixedDDO.id,
fixedDDO.services[0].id,
0,
orderStartedTx.transactionHash,
providerUrl,
consumerAccount
<strong> )
</strong> console.log(`Resolved asset did [${updatedAsset.id}]from aquarius.`);
console.log(`Updated asset state: [${updatedAsset.nft.state}].`);
};
// Call setMetadata(...) function defined above
updateAssetState(did).then(() => {
process.exit();
}).catch((err) => {
console.error(err);
process.exit(1);
});
</code></pre>

View File

@ -29,7 +29,7 @@ const createDataNFT = async () => {
// Create a NFTFactory // Create a NFTFactory
const factory = new NftFactory(config.nftFactoryAddress, config.publisherAccount); const factory = new NftFactory(config.nftFactoryAddress, config.publisherAccount);
const publisherAccount = await config.publisherAccount.getAddress(); const publisherAddress = await config.publisherAccount.getAddress();
// Define dataNFT parameters // Define dataNFT parameters
const nftParams = { const nftParams = {
@ -39,7 +39,7 @@ const createDataNFT = async () => {
templateIndex: 1, templateIndex: 1,
tokenURI: 'https://example.com', tokenURI: 'https://example.com',
transferable: true, transferable: true,
owner: publisherAccount owner: publisherAddress
}; };
const bundleNFT = await factory.createNFT(nftParams); const bundleNFT = await factory.createNFT(nftParams);

View File

@ -21,3 +21,68 @@ Now let's explain each state in more detail:
6. **Asset unlisted**: Assets in the "Asset unlisted" state are not discoverable. However, users can still place orders for these assets, making them accessible. Unlisted assets are listed under the owner's profile, allowing users to view and access them. 6. **Asset unlisted**: Assets in the "Asset unlisted" state are not discoverable. However, users can still place orders for these assets, making them accessible. Unlisted assets are listed under the owner's profile, allowing users to view and access them.
By assigning specific states to assets, Ocean Protocol enables a structured approach to asset management and visibility. These states help regulate asset discoverability, ordering permissions, and the representation of assets in user profiles, ensuring a controlled and reliable asset ecosystem. By assigning specific states to assets, Ocean Protocol enables a structured approach to asset management and visibility. These states help regulate asset discoverability, ordering permissions, and the representation of assets in user profiles, ensuring a controlled and reliable asset ecosystem.
It is possible to remove assets from Ocean Protocol by modifying the state of the asset. Each asset has a state, which is stored in the NFT contract. Additional details regarding asset states can be found at this link: [https://docs.oceanprotocol.com/core-concepts/did-ddo#state](https://docs.oceanprotocol.com/core-concepts/did-ddo#state). There is also an assets purgatory that contains information about the purgatory status of an asset, as defined in the list-purgatory. For more information about the purgatory, please refer to: [https://docs.oceanprotocol.com/core-concepts/did-ddo#purgatory](https://docs.oceanprotocol.com/core-concepts/did-ddo#purgatory).
We can utilize a portion of the previous tutorial on updating metadata and incorporate the steps to update the asset's state in the asset DDO.
#### Prerequisites
* [Obtain an API key](broken-reference)
* [Set up the .env file](broken-reference)
* [Install the dependencies](broken-reference)
* [Create a configuration file](configuration.md)
{% hint style="info" %}
The variable **AQUARIUS\_URL** and **PROVIDER\_URL** should be set correctly in `.env` file
{% endhint %}
#### Create a script to update the state of an asset by updating the assets metatada
Create a new file in the same working directory where configuration file (`config.js`) and `.env` files are present, and copy the code as listed below.
```javascript
// Note: Make sure .env file and config.js are created and setup correctly
const { oceanConfig } = require('./config.js');
const { ZERO_ADDRESS, NftFactory, getHash, Nft } = require ('@oceanprotocol/lib');
// replace the did here
const did = "did:op:a419f07306d71f3357f8df74807d5d12bddd6bcd738eb0b461470c64859d6f0f";
// This function takes did as a parameter and updates the data NFT information
const updateAssetState = async (did) => {
const publisherAccount = await oceanConfig.publisherAccount.getAddress();
// Fetch ddo from Aquarius
const asset = await await oceanConfig.aquarius.resolve(did);
const nft = new Nft(oceanConfig.ethersProvider);
// Update the metadata state and bring it to end-of-life state ("1")
await nft.setMetadataState(
asset?.nft?.address,
publisherAccount,
1
)
// Check if ddo is correctly udpated in Aquarius
await oceanConfig.aquarius.waitForAqua(ddo.id);
// Fetch updated asset from Aquarius
const updatedAsset = await await oceanConfig.aquarius.resolve(did);
console.log(`Resolved asset did [${updatedAsset.id}]from aquarius.`);
console.log(`Updated asset state: [${updatedAsset.nft.state}].`);
};
// Call setMetadata(...) function defined above
updateAssetState(did).then(() => {
process.exit();
}).catch((err) => {
console.error(err);
process.exit(1);
});
```

View File

@ -36,7 +36,7 @@ const setMetadata = async (did) => {
// Fetch ddo from Aquarius // Fetch ddo from Aquarius
const ddo = await await oceanConfig.aquarius.resolve(did); const ddo = await await oceanConfig.aquarius.resolve(did);
const nft = new Nft(oceanConfig.ethersProvider); const nft = new Nft(config.publisherAccount);
// update the ddo here // update the ddo here
ddo.metadata.name = "Sample dataset v2"; ddo.metadata.name = "Sample dataset v2";

View File

@ -525,6 +525,42 @@ A dictionary which contains the following keys (`providerFeeAddress`, `providerF
</details> </details>
<details>
<summary><a href="https://github.com/oceanprotocol/ocean.py/blob/4aa12afd8a933d64bc2ed68d1e5359d0b9ae62f9/ocean_lib/ocean/ocean_assets.py#LL178C1-L185C82"><code>ocean.assets.create_url_asset( self, name: str, url: str, publisher_wallet, wait_for_aqua: bool = True ) -> tuple</code></a></summary>
It is the most used functions in all the READMEs.
Creates asset of type "dataset", having `UrlFiles`, with good defaults.
It can be called after instantiating Ocean object.
Params:
1. `name` - name of the asset, `string`
2. `url` - url that is stored in the asset, `string`
3. `publisher_wallet` - wallet of the asset publisher/owner, `Brownie account`
4. `wait_for_aqua` - boolean value which default is `True`, waiting for aquarius to fetch the asset takes additional time, but if you want to be sure that your asset is indexed, keep the default value.
Return:
A tuple which contains the data NFT, datatoken and the data asset.
{% code overflow="wrap" %}
```python
@enforce_types
def create_url_asset(
self, name: str, url: str, publisher_wallet, wait_for_aqua: bool = True
) -> tuple:
"""Create asset of type "data", having UrlFiles, with good defaults"""
metadata = self._default_metadata(name, publisher_wallet)
files = [UrlFile(url)]
return self._create_1dt(metadata, files, publisher_wallet, wait_for_aqua)
```
{% endcode %}
</details>
### Ocean Compute ### Ocean Compute
<details> <details>

View File

@ -64,7 +64,10 @@ Note, that you can also copy and paste the contents of the query function below
```runkit nodeVersion="18.x.x" ```runkit nodeVersion="18.x.x"
const axios = require('axios') const axios = require('axios')
const query = `{ token(id :"0x9a9e3fb78b021ce12fc4e23bde1cb0104913ea93") { const datatoken = "0xc22bfd40f81c4a28c809f80d05070b95a11829d9".toLowerCase()
const query = `{
token(id : "${datatoken}") {
id, id,
orders( orders(
orderBy: createdTimestamp orderBy: createdTimestamp

View File

@ -12,27 +12,27 @@ Before you can publish or purchase assets, you will need a crypto wallet. As Met
1. Go to the [Chrome Web Store for extensions](https://chrome.google.com/webstore/category/extensions) and search for MetaMask. 1. Go to the [Chrome Web Store for extensions](https://chrome.google.com/webstore/category/extensions) and search for MetaMask.
![metamask-chrome-store](../../.gitbook/assets/wallet/metamask-chrome-extension.png) ![metamask-chrome-store](../.gitbook/assets/wallet/metamask-chrome-extension.png)
* Install MetaMask. The wallet provides a friendly user interface that will help you through each step. MetaMask gives you two options: importing an existing wallet or creating a new one. Choose to `Create a Wallet`: * Install MetaMask. The wallet provides a friendly user interface that will help you through each step. MetaMask gives you two options: importing an existing wallet or creating a new one. Choose to `Create a Wallet`:
![Create a wallet](../../.gitbook/assets/wallet/create-new-metamask-wallet.png) ![Create a wallet](../.gitbook/assets/wallet/create-new-metamask-wallet.png)
* In the next step create a new password for your wallet. Read through and accept the terms and conditions. After that, MetaMask will generate Secret Backup Phrase for you. Write it down and store it in a safe place. * In the next step create a new password for your wallet. Read through and accept the terms and conditions. After that, MetaMask will generate Secret Backup Phrase for you. Write it down and store it in a safe place.
![Secret Backup Phrase](../../.gitbook/assets/wallet/secret-backup-phrase.png) ![Secret Backup Phrase](../.gitbook/assets/wallet/secret-backup-phrase.png)
* Continue forward. On the next page, MetaMask will ask you to confirm the backup phrase. Select the words in the correct sequence: * Continue forward. On the next page, MetaMask will ask you to confirm the backup phrase. Select the words in the correct sequence:
![Confirm secret backup phrase](../../.gitbook/assets/wallet/confirm-backup-phrase.png) ![Confirm secret backup phrase](../.gitbook/assets/wallet/confirm-backup-phrase.png)
* Voila! Your account is now created. You can access MetaMask via the browser extension in the top right corner of your browser. * Voila! Your account is now created. You can access MetaMask via the browser extension in the top right corner of your browser.
![MetaMask browser extension](../../.gitbook/assets/wallet/metamask-browser-extension.png) ![MetaMask browser extension](../.gitbook/assets/wallet/metamask-browser-extension.png)
* You can now manage Ether and Ocean Tokens with your wallet. You can copy your account address to the clipboard from the options. When you want someone to send Ether or Ocean Tokens to you, you will have to give them that address. It's not a secret. * You can now manage Ether and Ocean Tokens with your wallet. You can copy your account address to the clipboard from the options. When you want someone to send Ether or Ocean Tokens to you, you will have to give them that address. It's not a secret.
![Manage tokens](../../.gitbook/assets/wallet/manage-tokens.png) ![Manage tokens](../.gitbook/assets/wallet/manage-tokens.png)
You can also watch our [tutorial video snippets](https://www.youtube.com/playlist?list=PL\_dn0wVs9kWolBCbtHaFxsi408cumOeth) if you want more help setting up MetaMask. You can also watch our [tutorial video snippets](https://www.youtube.com/playlist?list=PL\_dn0wVs9kWolBCbtHaFxsi408cumOeth) if you want more help setting up MetaMask.
@ -42,7 +42,7 @@ Sometimes it is required to use custom or external networks in MetaMask. We can
Open the Settings menu and find the `Networks` option. When you open it, you'll be able to see all available networks your MetaMask wallet currently use. Click the `Add Network` button. Open the Settings menu and find the `Networks` option. When you open it, you'll be able to see all available networks your MetaMask wallet currently use. Click the `Add Network` button.
![Add custom/external network](../../.gitbook/assets/wallet/metamask-add-network.png) ![Add custom/external network](../.gitbook/assets/wallet/metamask-add-network.png)
There are a few empty inputs we need to fill in: There are a few empty inputs we need to fill in:

View File

@ -77,4 +77,4 @@ Alternatively, you can manually configure the network on Metamask by using the f
| Currency Symbol | `MATIC` | | Currency Symbol | `MATIC` |
| Block Explorer URL | [`https://polygonscan.com`](https://polygonscan.com) | | Block Explorer URL | [`https://polygonscan.com`](https://polygonscan.com) |
Follow our guide to learn how to use those values to [set up a custom network in MetaMask](../wallets/metamask-setup.md#set-up-custom-network). Follow our guide to learn how to use those values to [set up a custom network in MetaMask](../metamask-setup.md#set-up-custom-network).

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. 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/whats-a-wallet.gif" alt=""><figcaption></figcaption></figure>
### What is a wallet? ### What is a wallet?

View File

@ -25,6 +25,6 @@ The Ocean Market is a place for buyers + sellers of top-notch data and algorithm
**If you are new to web3** and blockchain technologies then we suggest you first get familiar with some Web3 basics: **If you are new to web3** and blockchain technologies then we suggest you first get familiar with some Web3 basics:
* [Wallet Basics](../discover/wallets/) 👛 * [Wallet Basics](../discover/wallets.md) 👛
* [Set Up MetaMask](../discover/wallets/metamask-setup.md) [Wallet ](../discover/wallets/metamask-setup.md)🦊 * [Set Up MetaMask](../discover/metamask-setup.md) [Wallet ](../discover/metamask-setup.md)🦊
* [Manage Your OCEAN Tokens](../discover/wallets-and-ocean-tokens.md) 🪙 * [Manage Your OCEAN Tokens](../discover/wallets-and-ocean-tokens.md) 🪙