2022-12-02 14:46:10 +05:30
|
|
|
export const devNets = ["hardhat", "localhost"];
|
|
|
|
|
2022-12-06 13:46:27 +05:30
|
|
|
export const testNets = ["goerli", "localhost_integration"];
|
2022-11-25 11:13:49 +05:30
|
|
|
|
2022-11-25 11:38:38 +05:30
|
|
|
export const prodNets = ["mainnet"];
|
2022-11-25 11:13:49 +05:30
|
|
|
|
2022-11-25 11:38:38 +05:30
|
|
|
export const isDevNet = (networkName: string) => devNets.includes(networkName);
|
2022-12-02 14:46:10 +05:30
|
|
|
|
|
|
|
export const isTestNet = (networkName: string) =>
|
|
|
|
testNets.includes(networkName);
|
|
|
|
|
|
|
|
export const isProdNet = (networkName: string) =>
|
|
|
|
prodNets.includes(networkName);
|
|
|
|
|
2022-12-06 13:46:27 +05:30
|
|
|
export const useRealVerifier = (networkName: string) =>
|
|
|
|
networkName === "localhost_integration";
|
|
|
|
|
2022-12-02 14:46:10 +05:30
|
|
|
export const getInterepAddress = (networkName: string) => {
|
|
|
|
switch (networkName) {
|
|
|
|
case "mainnet":
|
|
|
|
throw new Error("Interep not deployed on mainnet yet.");
|
|
|
|
case "goerli":
|
|
|
|
return "0x9f44be9F69aF1e049dCeCDb2d9296f36C49Ceafb";
|
|
|
|
default:
|
|
|
|
throw new Error(`Unknown network name: ${networkName}`);
|
|
|
|
}
|
|
|
|
};
|