Locus Coeruleus

Sep 17, 2022

Use Uniswap SDK with Custom Network

to add custom network, go to

1
vim node_modules/@ethersproject/networks/lib/index.js

add the following code in the variable “networks” code block

1
2
3
4
5
classic: {
chainId: 61,
name: "classic",
_defaultProvider: etcDefaultProvider("https:/\/www.ethercluster.com/etc", "classic")
},

note that you have to change the chainId and the url, as well as network name

for example:

1
2
3
4
5
ethw: {
chainId: 10001,
name: "ethw",
_defaultProvider: etcDefaultProvider("https:/\/mainnet.ethereumpow.org", "ethw")
},
OLDER > < NEWER