Skip to content

Commit

Permalink
config and deployed contracts for ropsten
Browse files Browse the repository at this point in the history
  • Loading branch information
mikemcdonald committed Apr 11, 2020
1 parent 3beac70 commit 9e433af
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@ REACT_APP_SUBGRAPH_URL={subgraph url for network}

# Backup node url
REACT_APP_RPC_URL_1="https://mainnet.infura.io/v3/{apiKey}"
REACT_APP_RPC_URL_3="https://ropsten.infura.io/v3/{apiKey}"
REACT_APP_RPC_URL_42="https://kovan.infura.io/v3/{apiKey}"
REACT_APP_RPC_URL_LOCAL="http://localhost:8545"

# Supported Network ID (e.g. mainnet = 1, rinkeby = 4, kovan = 42)
# Supported Network ID (e.g. mainnet = 1, ropsten = 3, rinkeby = 4, kovan = 42)
REACT_APP_SUPPORTED_NETWORK_ID="42"
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
```
# Backup node url
REACT_APP_RPC_URL_1="https://mainnet.infura.io/v3/{apiKey}"
REACT_APP_RPC_URL_3="https://ropsten.infura.io/v3/{apiKey}"
REACT_APP_RPC_URL_42="https://kovan.infura.io/v3/{apiKey}"
REACT_APP_RPC_URL_LOCAL="http://localhost:8545"
```
Expand Down
23 changes: 23 additions & 0 deletions src/deployed.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,27 @@
{
"ropsten": {
"chainId": 3,
"bFactory": "0xeb12Ce3D5C1B34baa3e3dF03D61fCBf4A3E45104",
"proxy": "0x4345a1065079d2D2B97BA069fd28A9E5b8D29456",
"weth": "0xc778417E063141139Fce010982780140Aa0cD5Ab",
"multicall": "0x835E81CB4a45b6338B43A7a66ba1C78900A76Ef3",
"tokens": [
{
"symbol": "ETH",
"address": "ether",
"decimals": 18,
"iconAddress": "ether",
"precision": 4
},
{
"symbol": "DAI",
"address": "0xDc497593C97cf51aC80F1338bD20A7572B824646",
"decimals": 18,
"iconAddress": "0x6b175474e89094c44da98b954eedeac495271d0f",
"precision": 2
}
]
},
"kovan": {
"chainId": 42,
"bFactory": "0x8f7F78080219d4066A8036ccD30D588B416a40DB",
Expand Down
3 changes: 3 additions & 0 deletions src/provider/connectors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ export const getSupportedChainName = () => {

export const chainNameById = {
'1': 'mainnet',
'3': 'ropsten',
'42': 'kovan',
};

Expand All @@ -44,11 +45,13 @@ export const isChainIdSupported = (chainId: number): boolean => {

const RPC_URLS: { [chainId: number]: string } = {
1: process.env.REACT_APP_RPC_URL_1 as string,
3: process.env.REACT_APP_RPC_URL_3 as string,
42: process.env.REACT_APP_RPC_URL_42 as string,
};

export const SUBGRAPH_URLS: { [chainId: number]: string } = {
1: process.env.REACT_APP_SUBGRAPH_URL_1 as string,
3: process.env.REACT_APP_SUBGRAPH_URL_3 as string,
42: process.env.REACT_APP_SUBGRAPH_URL_42 as string,
};

Expand Down

0 comments on commit 9e433af

Please sign in to comment.