-
Notifications
You must be signed in to change notification settings - Fork 35
/
Copy pathmigration-config.js
67 lines (66 loc) · 3.11 KB
/
migration-config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
function getNetworkConfig(network, accounts) {
if (["bsc", "bsc-fork"].includes(network)) {
console.log(`Deploying with ${network} config.`)
return {
factoryAddress: '0x0841BD0B734E4F5853f0dD8d7Ea041c241fb0Da6',
routerAddress: '0xcF0feBd3f17CEf5b47b0cD257aCf6025c5BFf3b7',
wrappedAddress: '0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c',
feeAddress: '0x94bfE225859347f2B2dd7EB8CBF35B84b4e8Df69',
liquidityHelper: '0x7BfCD7d5D95b7ce2C4CF30D9e0aB535eD5D34968',
multicall: '0xC50F4c1E81c873B2204D7eFf7069Ffec6Fbe136D',
}
} else if (['testnet', 'testnet-fork'].includes(network)) {
console.log(`Deploying with ${network} config.`)
return {
factoryAddress: '0x152349604d49c2Af10ADeE94b918b051104a143E',
routerAddress: '0x3380aE82e39E42Ca34EbEd69aF67fAa0683Bb5c1',
wrappedAddress: '0xae13d989dac2f0debff460ac112a837c89baa7cd'
}
} else if (['development'].includes(network)) {
console.log(`Deploying with ${network} config.`)
return {
factoryAddress: '0x804962FAc9268A54dF121f129C4a21d7c0aD70b7',
routerAddress: '0x',
wrappedAddress: '0x0000000000000000000000000000000000000000'
}
} else if (['polygon', 'polygon-fork'].includes(network)) {
console.log(`Deploying with ${network} config.`)
return {
factoryAddress: '0xCf083Be4164828f00cAE704EC15a36D711491284',
routerAddress: '0xC0788A3aD43d79aa53B09c2EaCc313A787d1d607',
wrappedAddress: '0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270'
}
} else if (['polygonTestnet', 'polygonTestnet-fork'].includes(network)) {
console.log(`Deploying with ${network} config.`)
return {
factoryAddress: '0xe145a77c21437e3FD32ce2731833114F0B53405b',
routerAddress: '0x',
wrappedAddress: '0x'
}
} else if (['eth', 'ethereum'].includes(network)) {
console.log(`Deploying with ${network} config.`)
return {
factoryAddress: '0xe145a77c21437e3FD32ce2731833114F0B53405b',
routerAddress: '0x',
wrappedAddress: '0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2'
}
} else if (['ropsten'].includes(network)) {
console.log(`Deploying with ${network} config.`)
return {
factoryAddress: '0x0187D959A28B0D3B490c2D898fA1CcD054cCC3cd',
routerAddress: '0x',
wrappedAddress: '0xc778417E063141139Fce010982780140Aa0cD5Ab'
}
} else if (['arbitrum', 'arbitrum-fork'].includes(network)) {
console.log(`Deploying with ${network} config.`)
return {
factoryAddress: '0xCf083Be4164828f00cAE704EC15a36D711491284',
routerAddress: '0x',
wrappedAddress: '0x82af49447d8a07e3bd95bd0d56f35241523fbab1' // wETH on Arbitrum
// wrappedAddress: '0x652a5D4DF76C5bfa3cB87FFD6877260600C2745d' // Immutable wETH on Arbitrum
}
} else {
throw new Error(`No config found for network ${network}.`)
}
}
module.exports = { getNetworkConfig };