Skip to content
This repository has been archived by the owner on Mar 24, 2023. It is now read-only.

Commit

Permalink
refactor: use lazyloading for entrypoint env
Browse files Browse the repository at this point in the history
  • Loading branch information
RetricSu committed Nov 30, 2022
1 parent 3067266 commit a0d8a40
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/api-server/src/base/env-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ export const envConfig = {
get godwokenJsonRpc() {
return getRequired("GODWOKEN_JSON_RPC");
},
get gaslessEntrypointAddress() {
return getRequired("GASLESS_ENTRYPOINT_ADDRESS");
},

_newRelicLicenseKey: getOptional("NEW_RELIC_LICENSE_KEY"),
clusterCount: getOptional("CLUSTER_COUNT"),
Expand Down Expand Up @@ -38,7 +41,6 @@ export const envConfig = {
minGasPriceUpperLimit: getOptional("MIN_GAS_PRICE_UPPER_LIMIT"),
minGasPriceLowerLimit: getOptional("MIN_GAS_PRICE_LOWER_LIMIT"),
blockCongestionGasUsed: getOptional("BLOCK_CONGESTION_GAS_USED"),
gaslessEntrypointAddress: getRequired("GASLESS_ENTRYPOINT_ADDRESS"),
};

function getRequired(name: string): string {
Expand Down

0 comments on commit a0d8a40

Please sign in to comment.