From 934b5828b798f401a86444553c9080990fa7a22d Mon Sep 17 00:00:00 2001 From: Robert Zaremba Date: Tue, 19 Dec 2023 20:48:31 +0100 Subject: [PATCH 1/8] docs: update example gas_adjustment config (#322) --- price-feeder.example.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/price-feeder.example.toml b/price-feeder.example.toml index 5edf1d9..7ac9f08 100644 --- a/price-feeder.example.toml +++ b/price-feeder.example.toml @@ -1,6 +1,6 @@ config_dir = "umee-provider-config" -gas_adjustment = 1.1 +gas_adjustment = 1.9 provider_timeout = "1000000s" [server] From fa73366530c55c311dc86777f93cf7d8aff9cd33 Mon Sep 17 00:00:00 2001 From: Sai Kumar <17549398+gsk967@users.noreply.github.com> Date: Thu, 11 Jan 2024 22:36:05 +0530 Subject: [PATCH 2/8] feat: supporting ststars/stars config (#330) --- config/supported_assets.go | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/config/supported_assets.go b/config/supported_assets.go index 1dde7b1..32b2337 100644 --- a/config/supported_assets.go +++ b/config/supported_assets.go @@ -41,11 +41,12 @@ var ( {Base: "ATOM", Quote: "USD"}: {}, {Base: "OSMO", Quote: "USD"}: {}, - {Base: "OSMO", Quote: "USDT"}: {}, - {Base: "JUNO", Quote: "USDT"}: {}, - {Base: "UMEE", Quote: "USDT"}: {}, - {Base: "WETH", Quote: "USDC"}: {}, - {Base: "WBTC", Quote: "WETH"}: {}, + {Base: "OSMO", Quote: "USDT"}: {}, + {Base: "JUNO", Quote: "USDT"}: {}, + {Base: "UMEE", Quote: "USDT"}: {}, + {Base: "WETH", Quote: "USDC"}: {}, + {Base: "WBTC", Quote: "WETH"}: {}, + {Base: "STARS", Quote: "OSMO"}: {}, } SupportedUniswapCurrencies = map[string]struct{}{ From 405a0f234cd250c4bd0187ce38bd209d2534dcef Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Tue, 16 Jan 2024 19:33:53 -0800 Subject: [PATCH 3/8] feat: static gas (backport #331) (#333) * feat: static gas (#331) (cherry picked from commit c8537cc11addbbe745d4bac6ac4ef6d96d3c9a03) # Conflicts: # README.md * Update README.md * md updates --------- Co-authored-by: Adam Wozniak <29418299+adamewozniak@users.noreply.github.com> --- README.md | 13 ++++++++++--- cmd/price-feeder.go | 1 + config/config.go | 17 +++++++++++++++-- oracle/client/client.go | 22 +++++++++++++++++----- oracle/client/tx.go | 12 +++++++----- 5 files changed, 50 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index ab1918d..1019d5f 100644 --- a/README.md +++ b/README.md @@ -11,8 +11,6 @@ core differences are as follows: - The `price-feeder` combines both `feeder` and `price-server` into a single Golang-based application for better UX, testability, and integration. -This instance of the price feeder is intended to be used as a library for [Umee's Price Feeder](https://github.com/umee-network/umee/tree/main/price-feeder), in order to prevent double work. - ## Background The `price-feeder` tool is responsible for performing the following: @@ -53,12 +51,21 @@ The keyring's password is defined via environment variables or user input. More information on the keyring can be found [here](#keyring) Please see the [example configuration](price-feeder.example.toml) for more details. The path to the node-config is required as the first argument. You can optionally add all configuration options to the node-config file or use the config-dir flag to point to a directory containing the other configuration files. -The files in the provider-config folder define what exchange rates to fetch and what providers to get them from. They also contain deviation thresholds and API endpoints. Please see the [example configuration](ojo-provider-config) for more details. +The files in the provider-config folder define what exchange rates to fetch and what providers to get them from. They also contain deviation thresholds and API endpoints. Please see the [example configuration](umee-provider-config) for more details. ```shell $ price-feeder /path/to/price_feeder_config.toml ``` +Chain rules for checking the free oracle transactions are: + +- must be only prevote or vote +- gas is limited to [`MaxMsgGasUsage`](https://github.com/ojo-network/ojo/blob/main/ante/fee.go#L13) constant. + +So, if you don't want to pay for gas, TX must be below `MaxMsgGasUsage`. If you set too much gas (which is what is happening when when you set `gas_adjustment` to 2), then the tx will allocate 2x gas, and hence will go above the free quota, so you would need to attach fee to pay for that gas. +The easiest is to just set constant gas. We recommend 10k below the `MaxMsgGasUsage`. + +Note that either `gas_adjustment` or `gas` can be used. Both can not be set. ## Configuration ### `telemetry` diff --git a/cmd/price-feeder.go b/cmd/price-feeder.go index ed94a40..4a1e9b9 100644 --- a/cmd/price-feeder.go +++ b/cmd/price-feeder.go @@ -150,6 +150,7 @@ func priceFeederCmdHandler(cmd *cobra.Command, args []string) error { cfg.Account.Validator, cfg.RPC.GRPCEndpoint, cfg.GasAdjustment, + cfg.Gas, ) if err != nil { return err diff --git a/config/config.go b/config/config.go index 11a300d..725d539 100644 --- a/config/config.go +++ b/config/config.go @@ -46,7 +46,8 @@ type ( Keyring Keyring `mapstructure:"keyring" validate:"required,gt=0,dive,required"` RPC RPC `mapstructure:"rpc" validate:"required,gt=0,dive,required"` Telemetry telemetry.Config `mapstructure:"telemetry"` - GasAdjustment float64 `mapstructure:"gas_adjustment" validate:"required"` + GasAdjustment float64 `mapstructure:"gas_adjustment"` + Gas uint64 `mapstructure:"gas"` ProviderTimeout string `mapstructure:"provider_timeout"` ProviderMinOverride bool `mapstructure:"provider_min_override"` ProviderEndpoints []provider.Endpoint `mapstructure:"provider_endpoints" validate:"dive"` @@ -141,10 +142,12 @@ func (c Config) Validate() (err error) { if err = c.validateCurrencyPairs(); err != nil { return err } - if err = c.validateDeviations(); err != nil { return err } + if err = c.validateGas(); err != nil { + return err + } validate.RegisterStructValidation(telemetryValidation, telemetry.Config{}) validate.RegisterStructValidation(endpointValidation, provider.Endpoint{}) @@ -165,6 +168,16 @@ func (c Config) validateDeviations() error { return nil } +func (c Config) validateGas() error { + if c.Gas <= 0 && c.GasAdjustment <= 0 { + return fmt.Errorf("gas or gas adjustment must be set") + } + if c.GasAdjustment > 0 && c.Gas > 0 { + return fmt.Errorf("gas and gas adjustment may not both be set") + } + return nil +} + func (c Config) validateCurrencyPairs() error { OUTER: for _, cp := range c.CurrencyPairs { diff --git a/oracle/client/client.go b/oracle/client/client.go index e85ea82..cfcba9e 100644 --- a/oracle/client/client.go +++ b/oracle/client/client.go @@ -43,6 +43,7 @@ type ( Encoding testutil.TestEncodingConfig GasPrices string GasAdjustment float64 + Gas uint64 GRPCEndpoint string KeyringPassphrase string ChainHeight *ChainHeight @@ -67,6 +68,7 @@ func NewOracleClient( validatorAddrString string, grpcEndpoint string, gasAdjustment float64, + gas uint64, ) (OracleClient, error) { oracleAddr, err := sdk.AccAddressFromBech32(oracleAddrString) if err != nil { @@ -87,6 +89,7 @@ func NewOracleClient( ValidatorAddrString: validatorAddrString, Encoding: umeeapp.MakeEncodingConfig(), GasAdjustment: gasAdjustment, + Gas: gas, GRPCEndpoint: grpcEndpoint, } @@ -269,15 +272,24 @@ func (oc OracleClient) CreateTxFactory() (tx.Factory, error) { return tx.Factory{}, err } - txFactory := tx.Factory{}. + if oc.GasAdjustment > 0 { + return tx.Factory{}. + WithAccountRetriever(clientCtx.AccountRetriever). + WithChainID(oc.ChainID). + WithTxConfig(clientCtx.TxConfig). + WithGasAdjustment(oc.GasAdjustment). + WithGasPrices(oc.GasPrices). + WithKeybase(clientCtx.Keyring). + WithSignMode(signing.SignMode_SIGN_MODE_DIRECT). + WithSimulateAndExecute(true), nil + } + return tx.Factory{}. WithAccountRetriever(clientCtx.AccountRetriever). WithChainID(oc.ChainID). WithTxConfig(clientCtx.TxConfig). - WithGasAdjustment(oc.GasAdjustment). + WithGas(oc.Gas). WithGasPrices(oc.GasPrices). WithKeybase(clientCtx.Keyring). WithSignMode(signing.SignMode_SIGN_MODE_DIRECT). - WithSimulateAndExecute(true) - - return txFactory, nil + WithSimulateAndExecute(true), nil } diff --git a/oracle/client/tx.go b/oracle/client/tx.go index 43c5f59..c42b04b 100644 --- a/oracle/client/tx.go +++ b/oracle/client/tx.go @@ -19,12 +19,14 @@ func BroadcastTx(clientCtx client.Context, txf tx.Factory, msgs ...sdk.Msg) (*sd return nil, err } - _, adjusted, err := tx.CalculateGas(clientCtx, txf, msgs...) - if err != nil { - return nil, err - } + if txf.GasAdjustment() > 0 { + _, adjusted, err := tx.CalculateGas(clientCtx, txf, msgs...) + if err != nil { + return nil, err + } - txf = txf.WithGas(adjusted) + txf = txf.WithGas(adjusted) + } unsignedTx, err := txf.BuildUnsignedTx(msgs...) if err != nil { From d5357cc435ad35d558dcf3c131523149cf4f3813 Mon Sep 17 00:00:00 2001 From: Robert Zaremba Date: Thu, 18 Jan 2024 16:45:14 +0100 Subject: [PATCH 4/8] feat: support fixed gas for vote and prevote transactions (#337) * feat: support fixed gas for vote and prevote transactions * update config * changelog --- CHANGELOG.md | 6 ++++++ README.md | 8 ++++++-- cmd/price-feeder.go | 3 ++- config/config.go | 19 ++++++++++++++----- oracle/client/client.go | 23 +++++++++++++++-------- oracle/oracle.go | 15 ++++++++------- price-feeder.example.toml | 7 +++++-- 7 files changed, 56 insertions(+), 25 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5878d9b..c6a554d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -45,6 +45,12 @@ Ref: https://keepachangelog.com/en/1.0.0/ ## Unreleased +## v2.4.0 + +- [337](https://github.com/ojo-network/price-feeder/pull/337) feat: support fixed gas for vote and prevote transactions. + +## Old + ### Improvements - [48](https://github.com/ojo-network/price-feeder/pull/48) Update goreleaser to have release process for umee price-feeder - [55](https://github.com/ojo-network/price-feeder/pull/55) Update DockerFile to work in umee's e2e test diff --git a/README.md b/README.md index 1019d5f..a51c1e6 100644 --- a/README.md +++ b/README.md @@ -62,10 +62,14 @@ Chain rules for checking the free oracle transactions are: - must be only prevote or vote - gas is limited to [`MaxMsgGasUsage`](https://github.com/ojo-network/ojo/blob/main/ante/fee.go#L13) constant. -So, if you don't want to pay for gas, TX must be below `MaxMsgGasUsage`. If you set too much gas (which is what is happening when when you set `gas_adjustment` to 2), then the tx will allocate 2x gas, and hence will go above the free quota, so you would need to attach fee to pay for that gas. +So, if you don't want to pay for gas, TX must be below `MaxMsgGasUsage`. If you set too much gas (which is what is happening when you use high `gas_adjustment`, eg more than 2), then the tx will allocate 2x gas, and hence will go above the free quota, so you would need to attach fee to pay for that gas. The easiest is to just set constant gas. We recommend 10k below the `MaxMsgGasUsage`. -Note that either `gas_adjustment` or `gas` can be used. Both can not be set. +In the PF config file you can set either: + +* `gas_adjustment` +* or `gas_prevote` and `gas_vote` - fixed amount of gas used for `MsgAggregateExchangeRatePrevote` and `MsgAggregateExchangeRateVote` transactions respectively. + ## Configuration ### `telemetry` diff --git a/cmd/price-feeder.go b/cmd/price-feeder.go index 4a1e9b9..a522be4 100644 --- a/cmd/price-feeder.go +++ b/cmd/price-feeder.go @@ -150,7 +150,8 @@ func priceFeederCmdHandler(cmd *cobra.Command, args []string) error { cfg.Account.Validator, cfg.RPC.GRPCEndpoint, cfg.GasAdjustment, - cfg.Gas, + cfg.GasPrevote, + cfg.GasVote, ) if err != nil { return err diff --git a/config/config.go b/config/config.go index 725d539..3431171 100644 --- a/config/config.go +++ b/config/config.go @@ -3,6 +3,7 @@ package config import ( "errors" "fmt" + "strings" "time" "github.com/cosmos/cosmos-sdk/telemetry" @@ -47,7 +48,8 @@ type ( RPC RPC `mapstructure:"rpc" validate:"required,gt=0,dive,required"` Telemetry telemetry.Config `mapstructure:"telemetry"` GasAdjustment float64 `mapstructure:"gas_adjustment"` - Gas uint64 `mapstructure:"gas"` + GasVote uint64 `mapstructure:"gas_vote"` + GasPrevote uint64 `mapstructure:"gas_prevote"` ProviderTimeout string `mapstructure:"provider_timeout"` ProviderMinOverride bool `mapstructure:"provider_min_override"` ProviderEndpoints []provider.Endpoint `mapstructure:"provider_endpoints" validate:"dive"` @@ -169,11 +171,18 @@ func (c Config) validateDeviations() error { } func (c Config) validateGas() error { - if c.Gas <= 0 && c.GasAdjustment <= 0 { - return fmt.Errorf("gas or gas adjustment must be set") + var errs []string + if (c.GasPrevote > 0) != (c.GasVote > 0) { + errs = append(errs, "if gas_prevote is set, then gas_vote must be set as well; similarly, if gas_vote is set, then gas_prevote must be set as well") } - if c.GasAdjustment > 0 && c.Gas > 0 { - return fmt.Errorf("gas and gas adjustment may not both be set") + if c.GasVote <= 0 && c.GasAdjustment <= 0 { + errs = append(errs, "either gas_vote and gas_prevote must be set or gas_adjustment must be set") + } + if c.GasAdjustment > 0 && c.GasVote > 0 { + errs = append(errs, "gas and gas adjustment may not both be set") + } + if len(errs) > 0 { + return errors.New(strings.Join(errs, ". ")) } return nil } diff --git a/oracle/client/client.go b/oracle/client/client.go index cfcba9e..4240691 100644 --- a/oracle/client/client.go +++ b/oracle/client/client.go @@ -43,7 +43,8 @@ type ( Encoding testutil.TestEncodingConfig GasPrices string GasAdjustment float64 - Gas uint64 + GasPrevote uint64 + GasVote uint64 GRPCEndpoint string KeyringPassphrase string ChainHeight *ChainHeight @@ -68,7 +69,8 @@ func NewOracleClient( validatorAddrString string, grpcEndpoint string, gasAdjustment float64, - gas uint64, + gasPrevote uint64, + gasVote uint64, ) (OracleClient, error) { oracleAddr, err := sdk.AccAddressFromBech32(oracleAddrString) if err != nil { @@ -89,7 +91,8 @@ func NewOracleClient( ValidatorAddrString: validatorAddrString, Encoding: umeeapp.MakeEncodingConfig(), GasAdjustment: gasAdjustment, - Gas: gas, + GasPrevote: gasPrevote, + GasVote: gasVote, GRPCEndpoint: grpcEndpoint, } @@ -138,7 +141,7 @@ func (r *passReader) Read(p []byte) (n int, err error) { // BroadcastTx attempts to broadcast a signed transaction. If it fails, a few re-attempts // will be made until the transaction succeeds or ultimately times out or fails. // Ref: https://github.com/terra-money/oracle-feeder/blob/baef2a4a02f57a2ffeaa207932b2e03d7fb0fb25/feeder/src/vote.ts#L230 -func (oc OracleClient) BroadcastTx(nextBlockHeight, timeoutHeight int64, msgs ...sdk.Msg) error { +func (oc OracleClient) BroadcastTx(nextBlockHeight, timeoutHeight int64, isPrevote bool, msgs sdk.Msg) error { maxBlockHeight := nextBlockHeight + timeoutHeight lastCheckHeight := nextBlockHeight - 1 @@ -147,7 +150,7 @@ func (oc OracleClient) BroadcastTx(nextBlockHeight, timeoutHeight int64, msgs .. return err } - factory, err := oc.CreateTxFactory() + factory, err := oc.CreateTxFactory(isPrevote) if err != nil { return err } @@ -166,7 +169,7 @@ func (oc OracleClient) BroadcastTx(nextBlockHeight, timeoutHeight int64, msgs .. // set last check height to latest block height lastCheckHeight = latestBlockHeight - resp, err := BroadcastTx(clientCtx, factory, msgs...) + resp, err := BroadcastTx(clientCtx, factory, msgs) if resp != nil && resp.Code != 0 { telemetry.IncrCounter(1, "failure", "tx", "code") err = fmt.Errorf("invalid response code from tx: %d", resp.Code) @@ -266,7 +269,7 @@ func (oc OracleClient) CreateClientContext() (client.Context, error) { // CreateTxFactory creates an SDK Factory instance used for transaction // generation, signing and broadcasting. -func (oc OracleClient) CreateTxFactory() (tx.Factory, error) { +func (oc OracleClient) CreateTxFactory(isPrevote bool) (tx.Factory, error) { clientCtx, err := oc.CreateClientContext() if err != nil { return tx.Factory{}, err @@ -283,11 +286,15 @@ func (oc OracleClient) CreateTxFactory() (tx.Factory, error) { WithSignMode(signing.SignMode_SIGN_MODE_DIRECT). WithSimulateAndExecute(true), nil } + gas := oc.GasVote + if isPrevote { + gas = oc.GasVote + } return tx.Factory{}. WithAccountRetriever(clientCtx.AccountRetriever). WithChainID(oc.ChainID). WithTxConfig(clientCtx.TxConfig). - WithGas(oc.Gas). + WithGas(gas). WithGasPrices(oc.GasPrices). WithKeybase(clientCtx.Keyring). WithSignMode(signing.SignMode_SIGN_MODE_DIRECT). diff --git a/oracle/oracle.go b/oracle/oracle.go index 9ccfc43..367646b 100644 --- a/oracle/oracle.go +++ b/oracle/oracle.go @@ -557,24 +557,24 @@ func (o *Oracle) tick(ctx context.Context) error { exchangeRatesStr := GenerateExchangeRatesString(o.prices) hash := oracletypes.GetAggregateVoteHash(salt, exchangeRatesStr, valAddr) - preVoteMsg := &oracletypes.MsgAggregateExchangeRatePrevote{ - Hash: hash.String(), // hash of prices from the oracle - Feeder: o.oracleClient.OracleAddrString, - Validator: valAddr.String(), - } - isPrevoteOnlyTx := o.previousPrevote == nil + if isPrevoteOnlyTx { // This timeout could be as small as oracleVotePeriod-indexInVotePeriod, // but we give it some extra time just in case. // // Ref : https://github.com/terra-money/oracle-feeder/blob/baef2a4a02f57a2ffeaa207932b2e03d7fb0fb25/feeder/src/vote.ts#L222 + preVoteMsg := &oracletypes.MsgAggregateExchangeRatePrevote{ + Hash: hash.String(), // hash of prices from the oracle + Feeder: o.oracleClient.OracleAddrString, + Validator: valAddr.String(), + } o.logger.Info(). Str("hash", hash.String()). Str("validator", preVoteMsg.Validator). Str("feeder", preVoteMsg.Feeder). Msg("broadcasting pre-vote") - if err := o.oracleClient.BroadcastTx(nextBlockHeight, oracleVotePeriod*2, preVoteMsg); err != nil { + if err := o.oracleClient.BroadcastTx(nextBlockHeight, oracleVotePeriod*2, isPrevoteOnlyTx, preVoteMsg); err != nil { return err } @@ -606,6 +606,7 @@ func (o *Oracle) tick(ctx context.Context) error { if err := o.oracleClient.BroadcastTx( nextBlockHeight, oracleVotePeriod-indexInVotePeriod, + isPrevoteOnlyTx, voteMsg, ); err != nil { return err diff --git a/price-feeder.example.toml b/price-feeder.example.toml index 7ac9f08..e2af458 100644 --- a/price-feeder.example.toml +++ b/price-feeder.example.toml @@ -1,8 +1,11 @@ config_dir = "umee-provider-config" - -gas_adjustment = 1.9 provider_timeout = "1000000s" +gas_prevote = 55000 +gas_vote = 160000 +# instead of fixed gas settings, gas adjustment can be used: +# gas_adjustment = 1.9 + [server] listen_addr = "0.0.0.0:7171" read_timeout = "20s" From b086a557d7418247cbc98e2be29a6ee98055186d Mon Sep 17 00:00:00 2001 From: Adam Wozniak <29418299+adamewozniak@users.noreply.github.com> Date: Thu, 18 Jan 2024 07:57:55 -0800 Subject: [PATCH 5/8] fix: lint for #337 (#339) --- config/config.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/config/config.go b/config/config.go index 3431171..92cc6c2 100644 --- a/config/config.go +++ b/config/config.go @@ -173,7 +173,10 @@ func (c Config) validateDeviations() error { func (c Config) validateGas() error { var errs []string if (c.GasPrevote > 0) != (c.GasVote > 0) { - errs = append(errs, "if gas_prevote is set, then gas_vote must be set as well; similarly, if gas_vote is set, then gas_prevote must be set as well") + errs = append(errs, + fmt.Sprintf("%s%s", "if gas_prevote is set, then gas_vote must be set as well;", + "similarly, if gas_vote is set, then gas_prevote must be set as well"), + ) } if c.GasVote <= 0 && c.GasAdjustment <= 0 { errs = append(errs, "either gas_vote and gas_prevote must be set or gas_adjustment must be set") From 48af9fdbca4f3bc59e4b723048b006bf0762fa3c Mon Sep 17 00:00:00 2001 From: Sai Kumar <17549398+gsk967@users.noreply.github.com> Date: Thu, 18 Jan 2024 22:24:32 +0530 Subject: [PATCH 6/8] adding strd to umee pf config (#338) --- umee-provider-config/currency-pairs.toml | 16 +++++++++++++++- umee-provider-config/deviation-thresholds.toml | 4 ++++ 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/umee-provider-config/currency-pairs.toml b/umee-provider-config/currency-pairs.toml index fcbed8b..99ff6df 100644 --- a/umee-provider-config/currency-pairs.toml +++ b/umee-provider-config/currency-pairs.toml @@ -398,4 +398,18 @@ providers = [ "bitget", "gate", ] -quote = "USDT" \ No newline at end of file +quote = "USDT" + +[[currency_pairs]] +base = "STRD" +providers = [ + "osmosis", +] +quote = "OSMO" + +[[currency_pairs]] +base = "STRD" +providers = [ + "osmosis", +] +quote = "USDC" diff --git a/umee-provider-config/deviation-thresholds.toml b/umee-provider-config/deviation-thresholds.toml index c1a6187..0b486b8 100644 --- a/umee-provider-config/deviation-thresholds.toml +++ b/umee-provider-config/deviation-thresholds.toml @@ -148,4 +148,8 @@ threshold = "2" [[deviation_thresholds]] base = "TIA" +threshold = "2" + +[[deviation_thresholds]] +base = "STRD" threshold = "2" \ No newline at end of file From 177a3f638198f8b5e896b214ca98605bcf52520d Mon Sep 17 00:00:00 2001 From: Robert Zaremba Date: Thu, 18 Jan 2024 19:25:29 +0100 Subject: [PATCH 7/8] fix: prevote gas allocation (#342) --- oracle/client/client.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/oracle/client/client.go b/oracle/client/client.go index 4240691..2a2a847 100644 --- a/oracle/client/client.go +++ b/oracle/client/client.go @@ -288,7 +288,7 @@ func (oc OracleClient) CreateTxFactory(isPrevote bool) (tx.Factory, error) { } gas := oc.GasVote if isPrevote { - gas = oc.GasVote + gas = oc.GasPrevote } return tx.Factory{}. WithAccountRetriever(clientCtx.AccountRetriever). From 9c240bd6790e995b0294b6cfe9c2f5d479e6d2ce Mon Sep 17 00:00:00 2001 From: Sai Kumar <17549398+gsk967@users.noreply.github.com> Date: Tue, 23 Jan 2024 23:20:43 +0530 Subject: [PATCH 8/8] chore: support TIA as quote for milkTIA asset (#344) * supporting TIA as quote and add config for milkTIA * update the milkTIA config * remove the milkTIA config --- config/supported_assets.go | 1 + umee-provider-config/currency-pairs.toml | 1 + umee-provider-config/deviation-thresholds.toml | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/config/supported_assets.go b/config/supported_assets.go index 32b2337..096b977 100644 --- a/config/supported_assets.go +++ b/config/supported_assets.go @@ -47,6 +47,7 @@ var ( {Base: "WETH", Quote: "USDC"}: {}, {Base: "WBTC", Quote: "WETH"}: {}, {Base: "STARS", Quote: "OSMO"}: {}, + {Base: "TIA", Quote: "USDT"}: {}, } SupportedUniswapCurrencies = map[string]struct{}{ diff --git a/umee-provider-config/currency-pairs.toml b/umee-provider-config/currency-pairs.toml index 99ff6df..7e8f35b 100644 --- a/umee-provider-config/currency-pairs.toml +++ b/umee-provider-config/currency-pairs.toml @@ -413,3 +413,4 @@ providers = [ "osmosis", ] quote = "USDC" + diff --git a/umee-provider-config/deviation-thresholds.toml b/umee-provider-config/deviation-thresholds.toml index 0b486b8..d34b381 100644 --- a/umee-provider-config/deviation-thresholds.toml +++ b/umee-provider-config/deviation-thresholds.toml @@ -152,4 +152,4 @@ threshold = "2" [[deviation_thresholds]] base = "STRD" -threshold = "2" \ No newline at end of file +threshold = "2"