mirror of
https://github.com/oceanprotocol/docs.git
synced 2024-11-26 19:49:26 +01:00
Merge pull request #390 from oceanprotocol/feature/token-swap
Token Swap
This commit is contained in:
commit
2444cbae92
@ -10,6 +10,7 @@ before_install:
|
||||
- sudo apt-get -qq update
|
||||
- sudo apt-get install python3-pip
|
||||
- sudo -H pip3 install --upgrade pip
|
||||
- sudo -H pip3 install -U setuptools
|
||||
|
||||
script:
|
||||
# will run `npm ci` automatically here
|
||||
|
@ -52,6 +52,10 @@ module.exports = {
|
||||
{
|
||||
from: '/references/squid-java/',
|
||||
to: 'https://www.javadoc.io/doc/com.oceanprotocol/squid/'
|
||||
},
|
||||
{
|
||||
from: '/tutorials/token-bridge/',
|
||||
to: '/tutorials/'
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -7,11 +7,13 @@ description: The technical basics and most important infos about Ocean Tokens in
|
||||
|
||||
**Ocean Tokens** are the [cryptocurrency](https://en.wikipedia.org/wiki/Cryptocurrency) associated with Ocean Protocol. They are standards-compliant [ERC-20 tokens](https://en.wikipedia.org/wiki/ERC-20).
|
||||
|
||||
Ocean Tokens can, in principle, live in any EVM-compatible network. The [Ocean Token contract](https://github.com/oceanprotocol/keeper-contracts/blob/develop/contracts/OceanToken.sol) is deployed in the Ethereum Mainnet, Pacific Mainnet, and the Nile Testnet. The tokens sold in the Ocean Protocol token sale were in the Ethereum Mainnet.
|
||||
Ocean Tokens can, in principle, live in any EVM-compatible network. The Ocean Token contract is deployed in the Ethereum Mainnet, Pacific Mainnet, and the Nile Testnet.
|
||||
|
||||
Only OCEAN within the Ethereum Mainnet carry any value, reflected [on our token page](https://oceanprotocol.com/token).
|
||||
|
||||
| Property | Value |
|
||||
| ------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
||||
| Token Contract Addresses | _Ethereum Mainnet_<br /> [`0x985dd3D42De1e256d09e1c10F112bCCB8015AD41`](https://etherscan.io/token/0x985dd3d42de1e256d09e1c10f112bccb8015ad41)<br /><br />_Pacific Mainnet_<br /> [`0x012578f9381e876A9E2a9111Dfd436FF91A451ae`](https://submarine.oceanprotocol.com/address/0x012578f9381e876a9e2a9111dfd436ff91a451ae/transactions)<br /><br />_Nile Testnet_<br />[`0x9861Da395d7da984D5E8C712c2EDE44b41F777Ad`](https://submarine.nile.dev-ocean.com/address/0x9861Da395d7da984D5E8C712c2EDE44b41F777Ad) |
|
||||
| Token Contract Addresses | _Ethereum Mainnet_<br /> [`0x7AFeBBB46fDb47ed17b22ed075Cde2447694fB9e`](https://etherscan.io/token/0x7AFeBBB46fDb47ed17b22ed075Cde2447694fB9e)<br /><br />_Pacific Mainnet_<br /> [`0x012578f9381e876A9E2a9111Dfd436FF91A451ae`](https://submarine.oceanprotocol.com/address/0x012578f9381e876a9e2a9111dfd436ff91a451ae/transactions)<br /><br />_Nile Testnet_<br />[`0x9861Da395d7da984D5E8C712c2EDE44b41F777Ad`](https://submarine.nile.dev-ocean.com/address/0x9861Da395d7da984D5E8C712c2EDE44b41F777Ad) |
|
||||
| Token Symbol | OCEAN |
|
||||
| Decimals of Precision | 18 |
|
||||
|
||||
@ -31,8 +33,8 @@ The initial circulating supply of Ethereum Mainnet Ocean Tokens became available
|
||||
|
||||
At the time of writing, you could use Ethereum Mainnet Ocean Tokens to do various things in the Ethereum Mainnet, including but not limited to:
|
||||
|
||||
- buy other cryptocurrencies. See the next subsection for more details.
|
||||
- stake in [dxDAO](https://dxdao.daostack.io/).
|
||||
- buy other cryptocurrencies
|
||||
- provide liquidity in decentralized exchanges like Uniswap or Balancer
|
||||
|
||||
### Check Your Ethereum Mainnet Ocean Token Balance
|
||||
|
||||
@ -66,19 +68,6 @@ You can buy or sell Ethereum Mainnet Ocean Tokens (OCEAN) via any exchange that
|
||||
|
||||
Ocean Tokens in Ocean's Mainnet, [Pacific](/concepts/pacific-network/), represent the same value as in the Ethereum Mainnet. The only way to get Ocean Tokens in Pacific is to transfer them from the Ethereum Mainnet.
|
||||
|
||||
### Ocean Token Bridge
|
||||
|
||||
For this purpose there is a token bridge between the Ethereum Mainnet and the Pacific Network, allowing anyone with Ocean Tokens to move them from the Ethereum Mainnet to the Pacific Network, and vice versa.
|
||||
|
||||
- [**Ocean Token Bridge**](https://bridge.oceanprotocol.com)
|
||||
- [Tutorial: Transfer Ocean Tokens between Networks](/tutorials/token-bridge/)
|
||||
|
||||
[![The Ocean token bridge user interface](../tutorials/images/tb02.png)](https://bridge.oceanprotocol.com)
|
||||
|
||||
Once you have some Ocean Tokens in Pacific, you can use them for all currently-implemented Ocean Protocol tasks _in Pacific_ (e.g. buying assets from a marketplace connected to Pacific).
|
||||
|
||||
However, please be aware that transferring tokens between networks can put your Ocean Tokens at risk.
|
||||
|
||||
## Testnet Ocean Tokens
|
||||
|
||||
There are Ocean Tokens in several testnets, including the Nile testnet. They are just testnet Ocean Tokens (i.e. for testing purposes only) and they aren't interchangeable with Ethereum Mainnet Ocean Tokens. For more details, see the the [page about Testnets](/concepts/testnets/) and the [tutorials](/tutorials/introduction/).
|
||||
|
@ -38,15 +38,6 @@ Instances are deployed for:
|
||||
|
||||
<repo name="blockscout"></repo>
|
||||
|
||||
## Ocean Token Bridge
|
||||
|
||||
The Ocean Token Bridge between the Ethereum Mainnet and the Pacific Network allows anyone with Ocean Tokens to move them from the Ethereum Mainnet to the Pacific Network.
|
||||
|
||||
- [**Ocean Token Bridge**](https://bridge.oceanprotocol.com)
|
||||
- [Tutorial: Transfer Ocean Tokens between Networks](/tutorials/token-bridge/)
|
||||
|
||||
<repo name="token-bridge-ui"></repo>
|
||||
|
||||
## Ocean Network Status
|
||||
|
||||
The Ocean status page checks all Ocean network connections from your browser.
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 56 KiB |
Binary file not shown.
Before Width: | Height: | Size: 83 KiB |
Binary file not shown.
Before Width: | Height: | Size: 66 KiB |
Binary file not shown.
Before Width: | Height: | Size: 57 KiB |
Binary file not shown.
Before Width: | Height: | Size: 84 KiB |
@ -1,63 +0,0 @@
|
||||
---
|
||||
title: Transfer Ocean Tokens between Networks
|
||||
description: How to use the token bridge to transfer Ocean Tokens from the Ethereum Mainnet to the Pacific Network, and vice versa.
|
||||
---
|
||||
|
||||
## Introduction
|
||||
|
||||
There is a token bridge between the Ethereum Mainnet and the [Pacific Network](/concepts/pacific-network/) available under [**bridge.oceanprotocol.com**](https://bridge.oceanprotocol.com) to transfer [Ocean Tokens](/concepts/ocean-tokens/) (OCEAN) between those networks.
|
||||
|
||||
[![The Ocean token bridge user interface](images/tb02.png)](https://bridge.oceanprotocol.com)
|
||||
|
||||
It's based on the [TokenBridge by POA Network](https://medium.com/poa-network/introducing-the-erc20-to-erc20-tokenbridge-ce266cc1a2d0) (the company), but the user interface was modified to conform to the Ocean Protocol style, and the loaded contracts are fixed to a specific security-checked version.[^1]
|
||||
|
||||
## Using the Token Bridge
|
||||
|
||||
### Ethereum Mainnet → Ocean Pacific
|
||||
|
||||
If you want to transfer OCEAN out of the Ethereum Mainnet, then first you need an Ethereum account with some OCEAN in the Ethereum Mainnet, and be connected to Ethereum Mainnet in MetaMask. If you want to get some OCEAN in the Ethereum Mainnet, then see the page about [Ocean Tokens](/concepts/ocean-tokens/).
|
||||
|
||||
Below is a screenshot of MetaMask showing an account (with address `0x8…`) which has 500 OCEAN in the Ethereum Mainnet. If you want MetaMask to show OCEAN, then see the page about [using your wallet to manage Ocean Tokens](/tutorials/wallets-and-ocean-tokens/).
|
||||
|
||||
![MetaMask showing an account that has 500 OCEAN in the Ethereum Mainnet](./images/tb01.png)
|
||||
|
||||
To use the token bridge to transfer Ocean Tokens from the Ethereum Mainnet to the Pacific Network, go to [**bridge.oceanprotocol.com**](https://bridge.oceanprotocol.com) while being connected to the Ethereum Mainnet in MetaMask.
|
||||
|
||||
You should see something like this:
|
||||
|
||||
[![From Ethereum Mainnet to Ocean Pacific](images/tb02.png)](https://bridge.oceanprotocol.com)
|
||||
|
||||
The above screenshot shows that the account with address `0x8…` has 500 OCEAN in the Ethereum Mainnet and 0 OCEAN in the Pacific Network.
|
||||
|
||||
- Enter the amount of OCEAN you want to transfer (e.g. 1 OCEAN)
|
||||
- Click _Transfer_
|
||||
|
||||
A confirmation dialog box like the following should appear.
|
||||
|
||||
![Confirmation dialog box](./images/tb03.png)
|
||||
|
||||
- Click _Continue_
|
||||
|
||||
After the end of some status updates you should see a success message with a transaction ID.
|
||||
|
||||
If you go back to MetaMask and switch the network to Pacific, then the account's OCEAN balance in Pacific should be higher by the amount just transferred.
|
||||
|
||||
![MetaMask showing an account that has 1 OCEAN in the Pacific Network](./images/tb06.png)
|
||||
|
||||
### Ocean Pacific → Ethereum Mainnet
|
||||
|
||||
To go the other way around, transfering Ocean Tokens from Pacific back into the Ethereum Mainnet, you simply connect to Pacific in MetaMask when visiting [**bridge.oceanprotocol.com**](https://bridge.oceanprotocol.com).
|
||||
|
||||
This will reverse the order of the token bridge networks:
|
||||
|
||||
![From Pacific to Ethereum Mainnet](./images/tb07.png)
|
||||
|
||||
Then follow the same steps as outlined above to transfer Ocean Tokens between the networks.
|
||||
|
||||
## Reporting Issues
|
||||
|
||||
If you found something was not working right for you, feel free to reach out to us and open an issue on the [`token-bridge-ui`](https://github.com/oceanprotocol/token-bridge-ui) repository:
|
||||
|
||||
<repo name="token-bridge-ui" />
|
||||
|
||||
[^1]: The code for the Ocean Protocol version of the token bridge UI and all technical documentation is in the [oceanprotocol/token-bridge-ui](https://github.com/oceanprotocol/token-bridge-ui) repo on GitHub.
|
@ -5,49 +5,26 @@ description: How to use crypto wallet software to check your Ocean Token balance
|
||||
|
||||
If you don't see any Ocean Tokens in your crypto wallet software (e.g. MetaMask or MyEtherWallet), don't worry! It might not know how to manage Ocean Tokens yet.
|
||||
|
||||
## Step 1: Determine the Ocean Token Contract Address in the Network You're Using
|
||||
## Token Information
|
||||
|
||||
If you know the URL of a Brizo instance attached to the network you're using, then just go to that URL in your web browser and get the value of `contracts.OceanToken`.
|
||||
Almost all ERC-20 wallets require these values for adding a custom token:
|
||||
|
||||
### Ethereum Mainnet
|
||||
- Contract Address: `0x7AFeBBB46fDb47ed17b22ed075Cde2447694fB9e`
|
||||
- Symbol: `OCEAN`
|
||||
- Number of precision: `18`
|
||||
|
||||
The Ocean Token contract address in the Ethereum Mainnet is:
|
||||
## MetaMask
|
||||
|
||||
[`0x985dd3D42De1e256d09e1c10F112bCCB8015AD41`](https://etherscan.io/token/0x985dd3d42de1e256d09e1c10f112bccb8015ad41)
|
||||
|
||||
### Pacific Network
|
||||
|
||||
The Ocean Token contract address in the [Pacific Network](/concepts/pacific-network/) is:
|
||||
|
||||
[`0x012578f9381e876A9E2a9111Dfd436FF91A451ae`](https://submarine.oceanprotocol.com/address/0x012578f9381e876a9e2a9111dfd436ff91a451ae/transactions)
|
||||
|
||||
### Nile Testnet
|
||||
|
||||
The Ocean Token contract address in the [Nile Testnet](/concepts/testnets/#the-nile-testnet) is:
|
||||
|
||||
[`0x9861Da395d7da984D5E8C712c2EDE44b41F777Ad`](https://submarine.nile.dev-ocean.com/address/0x9861Da395d7da984D5E8C712c2EDE44b41F777Ad)
|
||||
|
||||
### Spree or Ganache-Based Testnet
|
||||
|
||||
If you're using [Barge](https://github.com/oceanprotocol/barge) to run a local Spree Testnet or a local Ganache-based testnet, then you can get the address of the OceanToken contract by looking at the value of `"address"` in:
|
||||
|
||||
- `$HOME/.ocean/keeper-contracts/artifacts/OceanToken.spree.json` for Spree
|
||||
- `$HOME/.ocean/keeper-contracts/artifacts/OceanToken.development.json` for Ganache
|
||||
|
||||
## Step 2: Teach Your Wallet Software about Ocean Tokens
|
||||
|
||||
### MetaMask Instructions
|
||||
|
||||
1. Make sure MetaMask is connected to the correct network (Pacific, Nile or whatever). See [the tutorial about how to do that](/tutorials/connect-to-networks/).
|
||||
2. For the account you want to manage, click the `☰` (hamburger menu icon).
|
||||
1. Make sure MetaMask is connected to the Ethereum Mainnet.
|
||||
2. Select the account you want to manage.
|
||||
3. Scroll down until the `Add Token` link is visible, then click on it.
|
||||
4. Click on `Custom Token`.
|
||||
5. Paste the OceanToken contract address (from Step 1 above) into the "Token Contract Address" field. The other two fields should auto-fill. If they don't then something is wrong.
|
||||
5. Paste the Ocean Token contract address listed above into the _Token Contract Address_ field. The other two fields should auto-fill. If not, add `OCEAN` for the symbol and `18` for the precision.
|
||||
6. Click `Next`.
|
||||
7. Click `Add Tokens`.
|
||||
|
||||
MetaMask should now show your Ocean Token (OCEAN) balance, and when you're looking at that, there should be a `Send` button to send Ocean Tokens to others. For help with that, see [the MetaMask docs about how to send tokens](https://metamask.zendesk.com/hc/en-us/articles/360015488931-How-to-Send-Tokens).
|
||||
|
||||
### Other Wallet Software
|
||||
## Other Wallet Software
|
||||
|
||||
Do a web search to find out how to add a custom ERC-20 token to the wallet software you're using.
|
||||
|
@ -38,7 +38,6 @@
|
||||
- name: tuna
|
||||
- name: plecos
|
||||
- name: faucet
|
||||
- name: token-bridge-ui
|
||||
- name: status
|
||||
- name: blockscout
|
||||
- name: ipfs
|
||||
|
@ -7,14 +7,12 @@
|
||||
items:
|
||||
- title: Set Up MetaMask
|
||||
link: /tutorials/metamask-setup/
|
||||
- title: Connect to Ocean-Related Networks
|
||||
link: /tutorials/connect-to-networks/
|
||||
- title: Use Your Wallet to Manage Ocean Tokens
|
||||
link: /tutorials/wallets-and-ocean-tokens/
|
||||
- title: Get Ether and Ocean Tokens
|
||||
link: /tutorials/get-ether-and-ocean-tokens/
|
||||
- title: Transfer Ocean Tokens between Networks
|
||||
link: /tutorials/token-bridge/
|
||||
- title: Connect to Ocean-Related Networks
|
||||
link: /tutorials/connect-to-networks/
|
||||
|
||||
- group: Storage Setup
|
||||
items:
|
||||
|
Loading…
Reference in New Issue
Block a user