1
0
mirror of https://github.com/oceanprotocol/docs.git synced 2024-11-02 16:25:37 +01:00
docs/content/tutorials/connect-to-networks.md

31 lines
1.6 KiB
Markdown
Raw Normal View History

2019-03-18 14:14:40 +01:00
---
title: Connect to Ocean-Related Networks
description: On connecting to Ethereum, Rinkeby and Your Local Network.
2019-03-18 14:14:40 +01:00
---
2020-10-27 10:06:05 +01:00
## Connect to Ethereum mainnet
2019-03-18 14:14:40 +01:00
2020-10-21 09:33:07 +02:00
Metamask and other ERC20 wallets default to Ethereum mainnet. Therefore your wallet is almost certainly pointing to Ethereum by default.
2019-03-18 14:14:40 +01:00
2020-10-21 09:33:07 +02:00
Some apps may need `network_id` and `chain_id`. The values are both `1` for Ethereum mainnet. `Symbol` and `nickname` can be whatever value you like.
2019-07-08 17:29:12 +02:00
2020-10-27 10:06:05 +01:00
## Connect to Rinkeby testnet
2019-07-08 17:29:12 +02:00
In MetaMask, click on the network name dropdown, then select `Rinkeby`.
2019-07-08 17:29:12 +02:00
2020-10-21 09:33:07 +02:00
Its `network_id` is 3 and `chain_id` is 3.
2019-03-18 14:14:40 +01:00
2020-10-27 10:06:05 +01:00
## Connect to local Ganache network
2019-03-18 14:14:40 +01:00
2020-10-21 09:33:07 +02:00
**Metamask.** In MetaMask, click on the network name then click on `Custom RPC` in the drop-down list. Scroll down to the `New Network` section. Enter the above RPC URL. You don't need to add a port number to the end of the RPC URL. Enter the ChainID, Symbol and Nickname if you like. See the [MetaMask docs about how it uses the ChainID](https://metamask.github.io/metamask-docs/Main_Concepts/Sending_Transactions).
2019-03-18 14:14:40 +01:00
2020-10-21 09:33:07 +02:00
**Barge.** If you're using Ocean [Barge](https://github.com/oceanprotocol/barge) to help run a local network, you can connect to that local node at RPC URL [http://localhost:8545](http://localhost:8545) (called "Localhost 8545" in MetaMask). You can configure that local node by editing the files in the `barge/networks/pacific/config/` directory.
2019-03-18 14:14:40 +01:00
2020-10-21 09:33:07 +02:00
## More info
- [List of Ethereum's Major Networks and Chain ids](https://medium.com/@piyopiyo/list-of-ethereums-major-network-and-chain-ids-2bc58e928508).
- [Ganache documentation](https://www.trufflesuite.com/ganache)
2019-03-18 14:14:40 +01:00