Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove infura and alchemy keys from config #98

Merged
merged 1 commit into from
Feb 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions .env.sample
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
# https://{NETWORK}.infura.io/v3/{INFURA_API_KEY}
INFURA_API_KEY=

# https://eth-{NETWORK}.alchemyapi.io/v2/{ALCHEMY_API_KEY}
ALCHEMY_API_KEY=

# EL_RPC_URLS_{CHAIN_ID} list or URLs delimeted by commas, first entry is primary, else are fallbacks
EL_RPC_URLS_1=
EL_RPC_URLS_5=
Expand Down
4 changes: 1 addition & 3 deletions next-logger.config.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@ const projectDir = process.cwd()
loadEnvConfig(projectDir)

const patterns = [
...commonPatterns,
process.env.INFURA_API_KEY,
process.env.ALCHEMY_API_KEY,
...commonPatterns,
];

const mask = satanizer(patterns);
Expand Down
14 changes: 2 additions & 12 deletions next.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,13 @@ import buildDynamics from './scripts/build-dynamics.mjs';

buildDynamics();

const infuraApiKey = process.env.INFURA_API_KEY;
const alchemyApiKey = process.env.ALCHEMY_API_KEY;
const rpcUrls_1 =
(process.env.EL_RPC_URLS_1 && process.env.EL_RPC_URLS_1.split(',')) ||
[
alchemyApiKey && `https://eth-mainnet.alchemyapi.io/v2/${alchemyApiKey}`,
infuraApiKey && `https://mainnet.infura.io/v3/${infuraApiKey}`,
].filter(Boolean);
[].filter(Boolean);

const rpcUrls_5 =
(process.env.EL_RPC_URLS_5 && process.env.EL_RPC_URLS_5.split(',')) ||
[
alchemyApiKey && `https://eth-goerli.alchemyapi.io/v2/${alchemyApiKey}`,
infuraApiKey && `https://goerli.infura.io/v3/${infuraApiKey}`,
].filter(Boolean);
[].filter(Boolean);

const cspTrustedHosts = process.env.CSP_TRUSTED_HOSTS?.split(',') ?? [
'https://*.lido.fi',
Expand Down Expand Up @@ -166,8 +158,6 @@ export default {
];
},
serverRuntimeConfig: {
infuraApiKey,
alchemyApiKey,
rpcUrls_1,
rpcUrls_5,
rateLimit,
Expand Down
Loading