Skip to content

Commit

Permalink
add mainnet default config (#49)
Browse files Browse the repository at this point in the history
  • Loading branch information
huangzhiran authored Nov 11, 2024
1 parent eac40d9 commit 57027ae
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions cmd/server/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,18 @@ var (
ProjectContractAddr: "0xf07336E1c77319B4e740b666eb0C2B19D11fc14F",
env: "TESTNET",
}
defaultMainnetConfig = &Config{
LogLevel: slog.LevelInfo,
ServiceEndpoint: ":9000",
DatabaseDSN: "postgres://postgres:mysecretpassword@postgres:5432/w3bstream?sslmode=disable",
ChainEndpoint: "https://babel-api.mainnet.iotex.io",
BeginningBlockNumber: 28685000,
IoIDProjectID: 6,
IoIDRegistryContractAddr: "0x04e4655Cf258EC802D17c23ec6112Ef7d97Fa2aF",
IoIDContractAddr: "0x1FCB980eD0287777ab05ADc93012332e11300e54",
ProjectContractAddr: "0xA596800891e6a95Bf737404411ef529c1F377b4e",
env: "MAINNET",
}
)

func (c *Config) init() error {
Expand All @@ -54,6 +66,8 @@ func Get() (*Config, error) {
switch env {
case "TESTNET":
conf = defaultTestnetConfig
case "MAINNET":
conf = defaultMainnetConfig
default:
env = "TESTNET"
conf = defaultTestnetConfig
Expand Down

0 comments on commit 57027ae

Please sign in to comment.