-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathconstants.js
91 lines (85 loc) · 3.18 KB
/
constants.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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
const config = require('@config/config')
const SupportedChainId = {
MAINNET: 1,
GOERLI: 5,
POLYGON: 137,
CELO: 42220,
BASE: 8453,
GNOSIS: 100,
OPTIMISM: 10,
ARBITRUM: 42161,
AVALANCHE: 43114,
}
const SBT_DEPLOYER_ADDRESSES = {
[SupportedChainId.GOERLI]: "0xD123b939B5022608241b08c41ece044059bE00f5",
[SupportedChainId.POLYGON]: '0x022e58834d2c91Ed9C06E977B6e8aaDf019b514D',
}
const GNOSIS_API_ENDPOINT = {
[SupportedChainId.GOERLI]: "https://safe-transaction-goerli.safe.global",
[SupportedChainId.POLYGON]: 'https://safe-transaction-polygon.safe.global',
[SupportedChainId.MAINNET]: 'https://safe-transaction-mainnet.safe.global',
[SupportedChainId.CELO]: 'https://safe-transaction-celo.safe.global',
[SupportedChainId.BASE]: 'https://safe-transaction-base.safe.global',
[SupportedChainId.GNOSIS]: 'https://safe-transaction-gnosis-chain.safe.global/',
[SupportedChainId.OPTIMISM]:'https://safe-transaction-optimism.safe.global',
[SupportedChainId.ARBITRUM]:'https://safe-transaction-arbitrum.safe.global',
[SupportedChainId.AVALANCHE]:'https://safe-transaction-avalanche.safe.global',
}
const INFURA_NETWORK_URLS = (INFURA_KEY) => {
return {
[SupportedChainId.MAINNET]: `https://mainnet.infura.io/v3/${INFURA_KEY}`,
[SupportedChainId.GOERLI]: `https://goerli.infura.io/v3/${INFURA_KEY}`,
[SupportedChainId.POLYGON]: `https://polygon-mainnet.infura.io/v3/${INFURA_KEY}`,
[SupportedChainId.CELO]: `https://celo-mainnet.infura.io/v3/${INFURA_KEY}`,
[SupportedChainId.BASE]: `https://base-mainnet.infura.io/v3/${INFURA_KEY}`,
[SupportedChainId.GNOSIS]: `https://gnosis-mainnet.infura.io/v3/${INFURA_KEY}`,
[SupportedChainId.OPTIMISM]: `https://optimism-mainnet.infura.io/v3/${INFURA_KEY}`,
[SupportedChainId.ARBITRUM]: `https://arbitrum-mainnet.infura.io/v3/${INFURA_KEY}`,
[SupportedChainId.AVALANCHE]: `https://avalanche-mainnet.infura.io/v3/${INFURA_KEY}`,
}
}
const NETWORK_SCAN_LINKS = {
[SupportedChainId.MAINNET]: {
baseUrl: `https://api.etherscan.io/`,
apiKey: config.etherScanKey
},
[SupportedChainId.GOERLI]: {
baseUrl: `https://api-goerli.etherscan.io/`,
apiKey: config.etherScanKey
},
[SupportedChainId.POLYGON]: {
baseUrl: `https://api.polygonscan.com/`,
apiKey: config.polyScanKey
},
[SupportedChainId.CELO]: {
baseUrl: `https://api.celoscan.com/`,
apiKey: config.celoScanKey
},
[SupportedChainId.BASE]: {
baseUrl: `https://basescan.org`,
apiKey: config.baseScanKey
},
[SupportedChainId.GNOSIS]: {
baseUrl: `https://gnosisscan.io`,
apiKey: config.gnosisScanKey
},
[SupportedChainId.OPT]: {
baseUrl: `https://optimistic.etherscan.io`,
apiKey: config.optScanKey
},
[SupportedChainId.ARB]: {
baseUrl: `https://arbiscan.io`,
apiKey: config.arbScanKey
},
[SupportedChainId.AVAX]: {
baseUrl: `https://snowtrace.io`,
apiKey: config.avaxScanKey
},
}
module.exports = {
SupportedChainId,
SBT_DEPLOYER_ADDRESSES,
INFURA_NETWORK_URLS,
NETWORK_SCAN_LINKS,
GNOSIS_API_ENDPOINT
}