From 0ff7ff1a004c369af43a23e0bad0918ddef962a2 Mon Sep 17 00:00:00 2001 From: artpav <19916123+artemijspavlovs@users.noreply.github.com> Date: Sun, 5 Jan 2025 10:26:47 +0700 Subject: [PATCH] fix: mainnet gas prices for dym and tia (#1220) --- cmd/consts/dymension.go | 2 +- data_layer/celestia/celestia.go | 11 ++++++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/cmd/consts/dymension.go b/cmd/consts/dymension.go index cf178c65..1401dc62 100644 --- a/cmd/consts/dymension.go +++ b/cmd/consts/dymension.go @@ -6,7 +6,7 @@ var MainnetHubData = HubData{ ID: MainnetHubID, RpcUrl: "https://dymension-mainnet-tendermint.public.blastapi.io", ArchiveRpcUrl: "https://dymension-mainnet-tendermint.public.blastapi.io", - GasPrice: "20000000000", + GasPrice: "7000000000", DaNetwork: CelestiaMainnet, } diff --git a/data_layer/celestia/celestia.go b/data_layer/celestia/celestia.go index 3ddb46f7..628070c9 100644 --- a/data_layer/celestia/celestia.go +++ b/data_layer/celestia/celestia.go @@ -374,9 +374,18 @@ func (c *Celestia) GetSequencerDAConfig(nt string) string { panic(err) } + var daGasPrices float64 + switch raCfg.Environment { + case consts.MainnetHubData.Environment: + daGasPrices = 0.0045 + default: + daGasPrices = 0.02 + } + return fmt.Sprintf( - `{"base_url": "%s", "timeout": 60000000000, "gas_prices":0.02, "gas_adjustment": 1.3, "namespace_id":"%s","auth_token":"%s","backoff":{"initial_delay":6000000000,"max_delay":6000000000,"growth_factor":2},"retry_attempts":4,"retry_delay":3000000000}`, + `{"base_url": "%s", "timeout": 60000000000, "gas_prices":%f, "gas_adjustment": 1.3, "namespace_id":"%s","auth_token":"%s","backoff":{"initial_delay":6000000000,"max_delay":6000000000,"growth_factor":2},"retry_attempts":4,"retry_delay":3000000000}`, lcEndpoint, + daGasPrices, c.NamespaceID, authToken, )