Hey is a decentralized and permissionless social media app built with Lens Protocol 馃尶
1import { LENS_NETWORK } from "../constants";
2import { MAINNET_CONTRACTS, TESTNET_CONTRACTS } from "../contracts";
3import { LENS_ENDPOINT } from "../lens-endpoints";
4
5const config = {
6 mainnet: {
7 appAddress: MAINNET_CONTRACTS.app,
8 defaultCollectToken: MAINNET_CONTRACTS.defaultToken,
9 lensApiEndpoint: LENS_ENDPOINT.Mainnet
10 },
11 staging: {
12 appAddress: TESTNET_CONTRACTS.app,
13 defaultCollectToken: TESTNET_CONTRACTS.defaultToken,
14 lensApiEndpoint: LENS_ENDPOINT.Staging
15 },
16 testnet: {
17 appAddress: TESTNET_CONTRACTS.app,
18 defaultCollectToken: TESTNET_CONTRACTS.defaultToken,
19 lensApiEndpoint: LENS_ENDPOINT.Testnet
20 }
21};
22
23type Config = (typeof config)[keyof typeof config];
24
25const getEnvConfig = (): Config => {
26 return config[LENS_NETWORK as keyof typeof config] ?? config.mainnet;
27};
28
29export default getEnvConfig;