diff --git a/core/chains/cosmos/chain.go b/core/chains/cosmos/chain.go index 5b9a1557de9..d182d57f8f8 100644 --- a/core/chains/cosmos/chain.go +++ b/core/chains/cosmos/chain.go @@ -62,7 +62,7 @@ func newChain(id string, cfg coscfg.Config, db *sqlx.DB, ks keystore.Cosmos, log gpe := cosmosclient.NewMustGasPriceEstimator([]cosmosclient.GasPricesEstimator{ cosmosclient.NewClosureGasPriceEstimator(func() (map[string]sdk.DecCoin, error) { return map[string]sdk.DecCoin{ - "uatom": sdk.NewDecCoinFromDec("uatom", cfg.FallbackGasPriceUAtom()), + "uatom": sdk.NewDecCoinFromDec("uatom", cfg.FallbackGasPrice()), }, nil }), }, lggr) diff --git a/core/chains/cosmos/config.go b/core/chains/cosmos/config.go index 10ce2fbce22..780e83f1279 100644 --- a/core/chains/cosmos/config.go +++ b/core/chains/cosmos/config.go @@ -264,8 +264,8 @@ func setFromChain(c, f *coscfg.Chain) { if f.ConfirmPollPeriod != nil { c.ConfirmPollPeriod = f.ConfirmPollPeriod } - if f.FallbackGasPriceUAtom != nil { - c.FallbackGasPriceUAtom = f.FallbackGasPriceUAtom + if f.FallbackGasPrice != nil { + c.FallbackGasPrice = f.FallbackGasPrice } if f.FCDURL != nil { c.FCDURL = f.FCDURL @@ -323,8 +323,8 @@ func (c *CosmosConfig) ConfirmPollPeriod() time.Duration { return c.Chain.ConfirmPollPeriod.Duration() } -func (c *CosmosConfig) FallbackGasPriceUAtom() sdk.Dec { - return sdkDecFromDecimal(c.Chain.FallbackGasPriceUAtom) +func (c *CosmosConfig) FallbackGasPrice() sdk.Dec { + return sdkDecFromDecimal(c.Chain.FallbackGasPrice) } func (c *CosmosConfig) FCDURL() url.URL { diff --git a/core/chains/cosmos/cosmostxm/txm_test.go b/core/chains/cosmos/cosmostxm/txm_test.go index 50d6380eb32..3ae1f89b3f1 100644 --- a/core/chains/cosmos/cosmostxm/txm_test.go +++ b/core/chains/cosmos/cosmostxm/txm_test.go @@ -37,8 +37,8 @@ func TestTxm_Integration(t *testing.T) { chainID := cosmotest.RandomChainID() fallbackGasPrice := sdk.NewDecCoinFromDec("uatom", sdk.MustNewDecFromStr("0.01")) chain := cosmos.CosmosConfig{ChainID: &chainID, Enabled: ptr(true), Chain: coscfg.Chain{ - FallbackGasPriceUAtom: ptr(decimal.RequireFromString("0.01")), - GasLimitMultiplier: ptr(decimal.RequireFromString("1.5")), + FallbackGasPrice: ptr(decimal.RequireFromString("0.01")), + GasLimitMultiplier: ptr(decimal.RequireFromString("1.5")), }} cfg, db := heavyweight.FullTestDBNoFixturesV2(t, "cosmos_txm", func(c *chainlink.Config, s *chainlink.Secrets) { c.Cosmos = cosmos.CosmosConfigs{&chain} diff --git a/core/config/docs/chains-cosmos.toml b/core/config/docs/chains-cosmos.toml index 1c30b8987b8..1a5155f3cd6 100644 --- a/core/config/docs/chains-cosmos.toml +++ b/core/config/docs/chains-cosmos.toml @@ -9,8 +9,8 @@ BlockRate = '6s' # Default BlocksUntilTxTimeout = 30 # Default # ConfirmPollPeriod sets how often check for tx confirmation. ConfirmPollPeriod = '1s' # Default -# FallbackGasPriceUAtom sets a fallback gas price to use when the estimator is not available. -FallbackGasPriceUAtom = '0.015' # Default +# FallbackGasPrice sets a fallback gas price to use when the estimator is not available. +FallbackGasPrice = '0.015' # Default # FCDURL sets the FCD (Full Client Daemon) URL. FCDURL = 'http://cosmos.com' # Example # GasLimitMultiplier scales the estimated gas limit. diff --git a/core/scripts/go.mod b/core/scripts/go.mod index ab720e9b01d..60493a7aaa7 100644 --- a/core/scripts/go.mod +++ b/core/scripts/go.mod @@ -290,7 +290,7 @@ require ( github.com/shirou/gopsutil/v3 v3.22.12 // indirect github.com/sirupsen/logrus v1.9.3 // indirect github.com/smartcontractkit/caigo v0.0.0-20230621050857-b29a4ca8c704 // indirect - github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20230525203711-20bed74ac906 // indirect + github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20230714113758-258965668789 // indirect github.com/smartcontractkit/chainlink-relay v0.1.7-0.20230620171700-bbcb3a99b7d3 // indirect github.com/smartcontractkit/chainlink-solana v1.0.3-0.20230612131011-369bfb503592 // indirect github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20230622060316-7ce48476dd7d // indirect diff --git a/core/scripts/go.sum b/core/scripts/go.sum index 9a94138a369..41f022f004c 100644 --- a/core/scripts/go.sum +++ b/core/scripts/go.sum @@ -1386,8 +1386,8 @@ github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/smartcontractkit/caigo v0.0.0-20230621050857-b29a4ca8c704 h1:T3lFWumvbfM1u/etVq42Afwq/jtNSBSOA8n5jntnNPo= github.com/smartcontractkit/caigo v0.0.0-20230621050857-b29a4ca8c704/go.mod h1:2QuJdEouTWjh5BDy5o/vgGXQtR4Gz8yH1IYB5eT7u4M= -github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20230525203711-20bed74ac906 h1:u7Lw7oqLEjADlJPJQnzlCLNSbj038QttaKY0lCa3V78= -github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20230525203711-20bed74ac906/go.mod h1:MH+MRJaG4SZAbRq5g7//AFY9H9sg5+lLDQnm85aHP6A= +github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20230714113758-258965668789 h1:S+JQhiaZGYk3zuNXksH52j90n+dZA0HKOH5XpYMNfwc= +github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20230714113758-258965668789/go.mod h1:pZJODK8XXR/XOs/1Jqnxgrlga2LLoAQHbM+gStkO63U= github.com/smartcontractkit/chainlink-relay v0.1.7-0.20230620171700-bbcb3a99b7d3 h1:rlNWHk15A2im/e9U95q4AkHZk5Wbc77lpx6ys4kUyCE= github.com/smartcontractkit/chainlink-relay v0.1.7-0.20230620171700-bbcb3a99b7d3/go.mod h1:MfZBUifutkv3aK7abyw5YmTJbqt8iFwcQDFikrxC/uI= github.com/smartcontractkit/chainlink-solana v1.0.3-0.20230612131011-369bfb503592 h1:3Ul/LkULxrolCVguHUFnWJamgUDsSGISlm/DzclstmE= diff --git a/core/services/chainlink/config_test.go b/core/services/chainlink/config_test.go index 577d8919de9..020f4911ddb 100644 --- a/core/services/chainlink/config_test.go +++ b/core/services/chainlink/config_test.go @@ -606,16 +606,16 @@ func TestConfig_Marshal(t *testing.T) { ChainID: ptr("Malaga-420"), Enabled: ptr(true), Chain: coscfg.Chain{ - BlockRate: relayutils.MustNewDuration(time.Minute), - BlocksUntilTxTimeout: ptr[int64](12), - ConfirmPollPeriod: relayutils.MustNewDuration(time.Second), - FallbackGasPriceUAtom: mustDecimal("0.001"), - FCDURL: relayutils.MustParseURL("http://cosmos.com"), - GasLimitMultiplier: mustDecimal("1.2"), - MaxMsgsPerBatch: ptr[int64](17), - OCR2CachePollPeriod: relayutils.MustNewDuration(time.Minute), - OCR2CacheTTL: relayutils.MustNewDuration(time.Hour), - TxMsgTimeout: relayutils.MustNewDuration(time.Second), + BlockRate: relayutils.MustNewDuration(time.Minute), + BlocksUntilTxTimeout: ptr[int64](12), + ConfirmPollPeriod: relayutils.MustNewDuration(time.Second), + FallbackGasPrice: mustDecimal("0.001"), + FCDURL: relayutils.MustParseURL("http://cosmos.com"), + GasLimitMultiplier: mustDecimal("1.2"), + MaxMsgsPerBatch: ptr[int64](17), + OCR2CachePollPeriod: relayutils.MustNewDuration(time.Minute), + OCR2CacheTTL: relayutils.MustNewDuration(time.Hour), + TxMsgTimeout: relayutils.MustNewDuration(time.Second), }, Nodes: []*coscfg.Node{ {Name: ptr("primary"), TendermintURL: relayutils.MustParseURL("http://tender.mint")}, @@ -954,7 +954,7 @@ Enabled = true BlockRate = '1m0s' BlocksUntilTxTimeout = 12 ConfirmPollPeriod = '1s' -FallbackGasPriceUAtom = '0.001' +FallbackGasPrice = '0.001' FCDURL = 'http://cosmos.com' GasLimitMultiplier = '1.2' MaxMsgsPerBatch = 17 diff --git a/core/services/chainlink/testdata/config-full.toml b/core/services/chainlink/testdata/config-full.toml index e10486ac00b..b3e8ed1a746 100644 --- a/core/services/chainlink/testdata/config-full.toml +++ b/core/services/chainlink/testdata/config-full.toml @@ -321,7 +321,7 @@ Enabled = true BlockRate = '1m0s' BlocksUntilTxTimeout = 12 ConfirmPollPeriod = '1s' -FallbackGasPriceUAtom = '0.001' +FallbackGasPrice = '0.001' FCDURL = 'http://cosmos.com' GasLimitMultiplier = '1.2' MaxMsgsPerBatch = 17 diff --git a/core/services/chainlink/testdata/config-multi-chain-effective.toml b/core/services/chainlink/testdata/config-multi-chain-effective.toml index 0d37e2a002b..61bad94547f 100644 --- a/core/services/chainlink/testdata/config-multi-chain-effective.toml +++ b/core/services/chainlink/testdata/config-multi-chain-effective.toml @@ -450,7 +450,7 @@ ChainID = 'Ibiza-808' BlockRate = '6s' BlocksUntilTxTimeout = 30 ConfirmPollPeriod = '1s' -FallbackGasPriceUAtom = '0.015' +FallbackGasPrice = '0.015' FCDURL = '' GasLimitMultiplier = '1.5' MaxMsgsPerBatch = 13 @@ -467,7 +467,7 @@ ChainID = 'Malaga-420' BlockRate = '6s' BlocksUntilTxTimeout = 20 ConfirmPollPeriod = '1s' -FallbackGasPriceUAtom = '0.015' +FallbackGasPrice = '0.015' FCDURL = '' GasLimitMultiplier = '1.5' MaxMsgsPerBatch = 100 diff --git a/core/web/cosmos_chains_controller_test.go b/core/web/cosmos_chains_controller_test.go index b490d87f0b2..d8389cbb21e 100644 --- a/core/web/cosmos_chains_controller_test.go +++ b/core/web/cosmos_chains_controller_test.go @@ -46,7 +46,7 @@ Enabled = true BlockRate = '6s' BlocksUntilTxTimeout = 30 ConfirmPollPeriod = '1s' -FallbackGasPriceUAtom = '9.999' +FallbackGasPrice = '9.999' FCDURL = '' GasLimitMultiplier = '1.55555' MaxMsgsPerBatch = 100 @@ -79,8 +79,8 @@ Nodes = [] ChainID: ptr(validId), Enabled: ptr(true), Chain: coscfg.Chain{ - FallbackGasPriceUAtom: ptr(decimal.RequireFromString("9.999")), - GasLimitMultiplier: ptr(decimal.RequireFromString("1.55555")), + FallbackGasPrice: ptr(decimal.RequireFromString("9.999")), + GasLimitMultiplier: ptr(decimal.RequireFromString("1.55555")), }}) wantedResult := tc.want(t, controller.app) @@ -109,7 +109,7 @@ func Test_CosmosChainsController_Index(t *testing.T) { ChainID: ptr(cosmostest.RandomChainID()), Enabled: ptr(true), Chain: coscfg.Chain{ - FallbackGasPriceUAtom: ptr(decimal.RequireFromString("9.999")), + FallbackGasPrice: ptr(decimal.RequireFromString("9.999")), }, } chainB := &cosmos.CosmosConfig{ diff --git a/core/web/resolver/testdata/config-full.toml b/core/web/resolver/testdata/config-full.toml index 603d5df9655..2429a36eade 100644 --- a/core/web/resolver/testdata/config-full.toml +++ b/core/web/resolver/testdata/config-full.toml @@ -320,7 +320,7 @@ Enabled = true BlockRate = '1m0s' BlocksUntilTxTimeout = 12 ConfirmPollPeriod = '1s' -FallbackGasPriceUAtom = '0.001' +FallbackGasPrice = '0.001' FCDURL = 'http://cosmos.com' GasLimitMultiplier = '1.2' MaxMsgsPerBatch = 17 diff --git a/core/web/resolver/testdata/config-multi-chain-effective.toml b/core/web/resolver/testdata/config-multi-chain-effective.toml index 0d37e2a002b..61bad94547f 100644 --- a/core/web/resolver/testdata/config-multi-chain-effective.toml +++ b/core/web/resolver/testdata/config-multi-chain-effective.toml @@ -450,7 +450,7 @@ ChainID = 'Ibiza-808' BlockRate = '6s' BlocksUntilTxTimeout = 30 ConfirmPollPeriod = '1s' -FallbackGasPriceUAtom = '0.015' +FallbackGasPrice = '0.015' FCDURL = '' GasLimitMultiplier = '1.5' MaxMsgsPerBatch = 13 @@ -467,7 +467,7 @@ ChainID = 'Malaga-420' BlockRate = '6s' BlocksUntilTxTimeout = 20 ConfirmPollPeriod = '1s' -FallbackGasPriceUAtom = '0.015' +FallbackGasPrice = '0.015' FCDURL = '' GasLimitMultiplier = '1.5' MaxMsgsPerBatch = 100 diff --git a/docs/CONFIG.md b/docs/CONFIG.md index b817ddd143e..400bf6b29e1 100644 --- a/docs/CONFIG.md +++ b/docs/CONFIG.md @@ -4703,7 +4703,7 @@ Enabled = true # Default BlockRate = '6s' # Default BlocksUntilTxTimeout = 30 # Default ConfirmPollPeriod = '1s' # Default -FallbackGasPriceUAtom = '0.015' # Default +FallbackGasPrice = '0.015' # Default FCDURL = 'http://cosmos.com' # Example GasLimitMultiplier = '1.5' # Default MaxMsgsPerBatch = 100 # Default @@ -4743,11 +4743,11 @@ ConfirmPollPeriod = '1s' # Default ``` ConfirmPollPeriod sets how often check for tx confirmation. -### FallbackGasPriceUAtom +### FallbackGasPrice ```toml -FallbackGasPriceUAtom = '0.015' # Default +FallbackGasPrice = '0.015' # Default ``` -FallbackGasPriceUAtom sets a fallback gas price to use when the estimator is not available. +FallbackGasPrice sets a fallback gas price to use when the estimator is not available. ### FCDURL ```toml diff --git a/go.mod b/go.mod index 02db25dd4c9..a54ce39a5eb 100644 --- a/go.mod +++ b/go.mod @@ -64,7 +64,7 @@ require ( github.com/shirou/gopsutil/v3 v3.22.12 github.com/shopspring/decimal v1.3.1 github.com/smartcontractkit/caigo v0.0.0-20230621050857-b29a4ca8c704 - github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20230525203711-20bed74ac906 + github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20230714113758-258965668789 github.com/smartcontractkit/chainlink-relay v0.1.7-0.20230620171700-bbcb3a99b7d3 github.com/smartcontractkit/chainlink-solana v1.0.3-0.20230612131011-369bfb503592 github.com/smartcontractkit/chainlink-starknet/relayer v0.0.1-beta-test.0.20230622060316-7ce48476dd7d diff --git a/go.sum b/go.sum index c24f500c3fe..4f299b8d6ca 100644 --- a/go.sum +++ b/go.sum @@ -1391,8 +1391,8 @@ github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/smartcontractkit/caigo v0.0.0-20230621050857-b29a4ca8c704 h1:T3lFWumvbfM1u/etVq42Afwq/jtNSBSOA8n5jntnNPo= github.com/smartcontractkit/caigo v0.0.0-20230621050857-b29a4ca8c704/go.mod h1:2QuJdEouTWjh5BDy5o/vgGXQtR4Gz8yH1IYB5eT7u4M= -github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20230525203711-20bed74ac906 h1:u7Lw7oqLEjADlJPJQnzlCLNSbj038QttaKY0lCa3V78= -github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20230525203711-20bed74ac906/go.mod h1:MH+MRJaG4SZAbRq5g7//AFY9H9sg5+lLDQnm85aHP6A= +github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20230714113758-258965668789 h1:S+JQhiaZGYk3zuNXksH52j90n+dZA0HKOH5XpYMNfwc= +github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20230714113758-258965668789/go.mod h1:pZJODK8XXR/XOs/1Jqnxgrlga2LLoAQHbM+gStkO63U= github.com/smartcontractkit/chainlink-relay v0.1.7-0.20230620171700-bbcb3a99b7d3 h1:rlNWHk15A2im/e9U95q4AkHZk5Wbc77lpx6ys4kUyCE= github.com/smartcontractkit/chainlink-relay v0.1.7-0.20230620171700-bbcb3a99b7d3/go.mod h1:MfZBUifutkv3aK7abyw5YmTJbqt8iFwcQDFikrxC/uI= github.com/smartcontractkit/chainlink-solana v1.0.3-0.20230612131011-369bfb503592 h1:3Ul/LkULxrolCVguHUFnWJamgUDsSGISlm/DzclstmE= diff --git a/integration-tests/go.sum b/integration-tests/go.sum index 771a259c524..e6f798f319a 100644 --- a/integration-tests/go.sum +++ b/integration-tests/go.sum @@ -1367,7 +1367,7 @@ github.com/slack-go/slack v0.12.2 h1:x3OppyMyGIbbiyFhsBmpf9pwkUzMhthJMRNmNlA4LaQ github.com/slack-go/slack v0.12.2/go.mod h1:hlGi5oXA+Gt+yWTPP0plCdRKmjsDxecdHxYQdlMQKOw= github.com/smartcontractkit/caigo v0.0.0-20230621050857-b29a4ca8c704 h1:T3lFWumvbfM1u/etVq42Afwq/jtNSBSOA8n5jntnNPo= github.com/smartcontractkit/caigo v0.0.0-20230621050857-b29a4ca8c704/go.mod h1:2QuJdEouTWjh5BDy5o/vgGXQtR4Gz8yH1IYB5eT7u4M= -github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20230525203711-20bed74ac906 h1:u7Lw7oqLEjADlJPJQnzlCLNSbj038QttaKY0lCa3V78= +github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20230714113758-258965668789 h1:S+JQhiaZGYk3zuNXksH52j90n+dZA0HKOH5XpYMNfwc= github.com/smartcontractkit/chainlink-env v0.34.2 h1:wo3srthdNAHuYsNvKAl0Vbm4R7TyQtaQmRoZyaWzQC8= github.com/smartcontractkit/chainlink-env v0.34.2/go.mod h1:hMOkTDW5k0C5B5lup1+xpPiZQPkq84YGLuFDVdTKU7A= github.com/smartcontractkit/chainlink-relay v0.1.7-0.20230620171700-bbcb3a99b7d3 h1:rlNWHk15A2im/e9U95q4AkHZk5Wbc77lpx6ys4kUyCE=