-
Notifications
You must be signed in to change notification settings - Fork 12
/
constants.ts
35 lines (30 loc) · 1.24 KB
/
constants.ts
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
require("dotenv").config({ path: `.env.build` })
import _ from "lodash"
export const OPTIMISM_GOERLI_WEB3_ENDPOINT = _.defaultTo(process.env["OPTIMISM_GOERLI_WEB3_ENDPOINT"], "")
export const OPTIMISM_GOERLI_DEPLOYER_MNEMONIC = _.defaultTo(process.env["OPTIMISM_GOERLI_DEPLOYER_MNEMONIC"], "")
export const OPTIMISM_WEB3_ENDPOINT = _.defaultTo(process.env["OPTIMISM_WEB3_ENDPOINT"], "")
export const OPTIMISM_DEPLOYER_MNEMONIC = _.defaultTo(process.env["OPTIMISM_DEPLOYER_MNEMONIC"], "")
export const COMPANION_NETWORK = _.defaultTo(process.env["COMPANION_NETWORK"], "")
if (_.isEmpty(OPTIMISM_GOERLI_DEPLOYER_MNEMONIC)) {
console.warn("OPTIMISM_GOERLI_DEPLOYER_MNEMONIC is empty")
}
if (_.isEmpty(OPTIMISM_GOERLI_WEB3_ENDPOINT)) {
console.warn("OPTIMISM_GOERLI_WEB3_ENDPOINT is empty")
}
if (_.isEmpty(OPTIMISM_DEPLOYER_MNEMONIC)) {
console.warn("OPTIMISM_DEPLOYER_MNEMONIC is empty")
}
if (_.isEmpty(OPTIMISM_WEB3_ENDPOINT)) {
console.warn("OPTIMISM_WEB3_ENDPOINT is empty")
}
if (_.isEmpty(COMPANION_NETWORK)) {
console.warn("COMPANION_NETWORK is empty")
}
export enum ChainId {
OPTIMISM_CHAIN_ID = 10,
OPTIMISM_GOERLI_CHAIN_ID = 420,
}
export enum CompanionNetwork {
optimism = "optimism",
optimismGoerli = "optimismGoerli",
}