diff --git a/.env.example b/.env.example index bd17dfb..3c9a120 100644 --- a/.env.example +++ b/.env.example @@ -4,4 +4,7 @@ export ETH_NODE_URI="http://localhost:8545" # export ETH_NODE_BACKUP_URI="https://mainnet.infura.io/v3/API_KEY" # optional # Beacon node is required for bid collection -# export BEACON_URI="http://localhost:3500" \ No newline at end of file +# export BEACON_URI="http://localhost:3500" + +# Genesis time is used to calculate slot numbers, if use devnet/custom chain, set this +# export GENESIS="1606824023" diff --git a/vars/vars.go b/vars/vars.go index 5fe34a9..6e651d6 100644 --- a/vars/vars.go +++ b/vars/vars.go @@ -4,6 +4,8 @@ package vars import ( "os" + "github.com/flashbots/go-utils/cli" + relaycommon "github.com/flashbots/mev-boost-relay/common" ) @@ -11,7 +13,7 @@ var ( Version = "dev" // is set during build process LogDebug = os.Getenv("DEBUG") != "" LogJSON = os.Getenv("LOG_JSON") != "" - Genesis = 1_606_824_023 + Genesis = cli.GetEnvInt("GENESIS", 1_606_824_023) DefaultBeaconURI = relaycommon.GetEnv("BEACON_URI", "http://localhost:3500") DefaultPostgresDSN = relaycommon.GetEnv("POSTGRES_DSN", "postgres://postgres:postgres@localhost:5432/postgres?sslmode=disable")