mirror of
https://github.com/luxfi/explore.git
synced 2026-09-24 00:28:18 +00:00
@@ -53,3 +53,7 @@ NEXT_PUBLIC_VISUALIZE_API_HOST=__PLACEHOLDER_FOR_NEXT_PUBLIC_VISUALIZE_API_HOST_
|
||||
NEXT_PUBLIC_SENTRY_DSN=__PLACEHOLDER_FOR_NEXT_PUBLIC_SENTRY_DSN__
|
||||
NEXT_PUBLIC_AUTH0_CLIENT_ID=__PLACEHOLDER_FOR_NEXT_PUBLIC_AUTH0_CLIENT_ID__
|
||||
NEXT_PUBLIC_WALLET_CONNECT_PROJECT_ID=__PLACEHOLDER_FOR_NEXT_PUBLIC_WALLET_CONNECT_PROJECT_ID__
|
||||
|
||||
# l2 config
|
||||
NEXT_PUBLIC_IS_L2_NETWORK=__PLACEHOLDER_FOR_NEXT_PUBLIC_IS_L2_NETWORKL__
|
||||
NEXT_PUBLIC_L1_BASE_URL=__PLACEHOLDER_FOR_NEXT_PUBLIC_L1_BASE_URL__
|
||||
|
||||
@@ -128,6 +128,12 @@ The app instance could be customized by passing following variables to NodeJS en
|
||||
| NEXT_PUBLIC_AUTH0_CLIENT_ID | `string` *(optional)* | Client id for [Auth0](https://auth0.com/) provider | `<secret>` |
|
||||
| NEXT_PUBLIC_WALLET_CONNECT_PROJECT_ID | `string` | Project id for [WalletConnect](https://docs.walletconnect.com/2.0/web3modal/react/installation#obtain-project-id) integration | `<secret>` |
|
||||
|
||||
### L2 configuration
|
||||
| Variable | Type | Description | Default value
|
||||
| --- | --- | --- | --- |
|
||||
| NEXT_PUBLIC_IS_L2_NETWORK | `boolean` *(optional)* | Set to true for L2 solutions (Optimism Bedrock based) | false |
|
||||
| NEXT_PUBLIC_L1_BASE_URL | `string` *(optional)* | Base Blockscout URL for L1 network | `'http://eth-goerli.blockscout.com'` |
|
||||
|
||||
### Marketplace app configuration properties
|
||||
|
||||
| Property | Type | Description | Example value
|
||||
|
||||
@@ -104,6 +104,10 @@ const config = Object.freeze({
|
||||
socket: apiHost ? `wss://${ apiHost }` : 'wss://blockscout.com',
|
||||
basePath: stripTrailingSlash(getEnvValue(process.env.NEXT_PUBLIC_API_BASE_PATH) || ''),
|
||||
},
|
||||
L2: {
|
||||
isL2Network: getEnvValue(process.env.NEXT_PUBLIC_IS_L2_NETWORK) === 'true',
|
||||
L1BaseUrl: getEnvValue(process.env.NEXT_PUBLIC_L1_BASE_URL),
|
||||
},
|
||||
statsApi: {
|
||||
endpoint: getEnvValue(process.env.NEXT_PUBLIC_STATS_API_HOST),
|
||||
basePath: '',
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,15 @@
|
||||
import type { GetServerSideProps } from 'next';
|
||||
|
||||
import appConfig from 'configs/app/config';
|
||||
import type { Props } from 'lib/next/getServerSideProps';
|
||||
import { getServerSideProps as getServerSidePropsBase } from 'lib/next/getServerSideProps';
|
||||
|
||||
export const getServerSideProps: GetServerSideProps<Props> = async(args) => {
|
||||
if (!appConfig.L2.isL2Network) {
|
||||
return {
|
||||
notFound: true,
|
||||
};
|
||||
}
|
||||
|
||||
return getServerSidePropsBase(args);
|
||||
};
|
||||
@@ -12,6 +12,7 @@
|
||||
"dev:local": "./node_modules/.bin/dotenv -e ./configs/envs/.env.localhost -e ./configs/envs/.env.secrets next dev | ./node_modules/.bin/pino-pretty",
|
||||
"dev:poa_core": "./node_modules/.bin/dotenv -e ./configs/envs/.env.poa_core -e ./configs/envs/.env.common -e ./configs/envs/.env.secrets next dev | ./node_modules/.bin/pino-pretty",
|
||||
"dev:goerli": "./node_modules/.bin/dotenv -e ./configs/envs/.env.goerli -e ./configs/envs/.env.common -e ./configs/envs/.env.secrets next dev | ./node_modules/.bin/pino-pretty",
|
||||
"dev:goerli:l2test": "./node_modules/.bin/dotenv -e ./configs/envs/.env.goerli.l2test -e ./configs/envs/.env.common -e ./configs/envs/.env.secrets next dev | ./node_modules/.bin/pino-pretty",
|
||||
"build": "next build",
|
||||
"build:docker": "docker build --build-arg GIT_COMMIT_SHA=$(git rev-parse HEAD) -t blockscout ./",
|
||||
"start": "next start",
|
||||
|
||||
Reference in New Issue
Block a user