diff --git a/app/test_helpers.go b/app/test_helpers.go index 3676eafaab..b2539ab9f3 100644 --- a/app/test_helpers.go +++ b/app/test_helpers.go @@ -266,9 +266,11 @@ func IntegrationTestNetworkConfig() network.Config { // execute ballot voting and thus clear out previous exchange rates, since we // are not running a price-feeder. oracleGenState.Params.VotePeriod = 1000 - oracleGenState.ExchangeRates = append(oracleGenState.ExchangeRates, oracletypes.NewExchangeRateTuple( - params.DisplayDenom, sdk.MustNewDecFromStr("34.21"), - )) + oracleGenState.ExchangeRates = append(oracleGenState.ExchangeRates, oracletypes.ExchangeRate{ + Denom: params.DisplayDenom, + Rate: sdk.MustNewDecFromStr("34.21"), + Timestamp: time.Now(), + }) // Set mock historic medians to satisfy leverage module's 24 median requirement for i := 1; i <= 24; i++ { median := oracletypes.Price{ diff --git a/proto/umee/oracle/v1/genesis.proto b/proto/umee/oracle/v1/genesis.proto index 57e1c76f55..4643e25fc9 100644 --- a/proto/umee/oracle/v1/genesis.proto +++ b/proto/umee/oracle/v1/genesis.proto @@ -10,22 +10,15 @@ option (gogoproto.goproto_getters_all) = false; // GenesisState defines the oracle module's genesis state. message GenesisState { - Params params = 1 [(gogoproto.nullable) = false]; - repeated FeederDelegation feeder_delegations = 2 - [(gogoproto.nullable) = false]; - // TODO: need to update this to save data with timestamp - repeated ExchangeRateTuple exchange_rates = 3 [ - (gogoproto.castrepeated) = "ExchangeRateTuples", - (gogoproto.nullable) = false - ]; + Params params = 1 [(gogoproto.nullable) = false]; + repeated FeederDelegation feeder_delegations = 2 [(gogoproto.nullable) = false]; + repeated ExchangeRate exchange_rates = 3 [(gogoproto.nullable) = false]; repeated MissCounter miss_counters = 4 [(gogoproto.nullable) = false]; - repeated AggregateExchangeRatePrevote aggregate_exchange_rate_prevotes = 5 - [(gogoproto.nullable) = false]; - repeated AggregateExchangeRateVote aggregate_exchange_rate_votes = 6 - [(gogoproto.nullable) = false]; - repeated Price medians = 7 [(gogoproto.nullable) = false]; - repeated Price historic_prices = 8 [(gogoproto.nullable) = false]; - repeated Price medianDeviations = 9 [(gogoproto.nullable) = false]; + repeated AggregateExchangeRatePrevote aggregate_exchange_rate_prevotes = 5 [(gogoproto.nullable) = false]; + repeated AggregateExchangeRateVote aggregate_exchange_rate_votes = 6 [(gogoproto.nullable) = false]; + repeated Price medians = 7 [(gogoproto.nullable) = false]; + repeated Price historic_prices = 8 [(gogoproto.nullable) = false]; + repeated Price medianDeviations = 9 [(gogoproto.nullable) = false]; // Historic Avg Counter params AvgCounterParams avg_counter_params = 10 [ (gogoproto.moretags) = "yaml:\"avg_counter_params\"", diff --git a/proto/umee/oracle/v1/oracle.proto b/proto/umee/oracle/v1/oracle.proto index 8cecd4a33b..c1dfca0352 100644 --- a/proto/umee/oracle/v1/oracle.proto +++ b/proto/umee/oracle/v1/oracle.proto @@ -149,8 +149,8 @@ message AvgCounter { message ExchangeRate { option (gogoproto.equal) = false; option (gogoproto.goproto_stringer) = false; - - string rate = 1 [ + string denom = 1 [(gogoproto.moretags) = "yaml:\"denom\""]; + string rate = 2 [ (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false ]; diff --git a/x/leverage/simulation/operations_test.go b/x/leverage/simulation/operations_test.go index 51990e4931..d868a2ec1c 100644 --- a/x/leverage/simulation/operations_test.go +++ b/x/leverage/simulation/operations_test.go @@ -38,7 +38,7 @@ func (s *SimTestSuite) SetupTest() { // Use default umee token for sim tests s.Require().NoError(app.LeverageKeeper.SetTokenSettings(ctx, fixtures.Token("uumee", "UMEE", 6))) - app.OracleKeeper.SetExchangeRate(ctx, "UMEE", sdk.MustNewDecFromStr("100.0")) + app.OracleKeeper.SetExchangeRate(ctx, "UMEE", sdk.MustNewDecFromStr("100.0"), s.ctx.BlockTime()) for i := 1; i <= 24; i++ { // set historic medians for UMEE on blocks 1-24 (without actually advancing block height) // this is to accommodate leverage module's default 24 historic median requirement diff --git a/x/oracle/abci.go b/x/oracle/abci.go index 28f9d73461..4dd8294712 100644 --- a/x/oracle/abci.go +++ b/x/oracle/abci.go @@ -77,7 +77,8 @@ func CalcPrices(ctx sdk.Context, params types.Params, k keeper.Keeper) error { if err != nil { return err } - k.SetExchangeRateWithEvent(ctx, denom, exchangeRate) + // save the exchange rate to store with denom and timestamp + k.SetExchangeRateWithEvent(ctx, denom, exchangeRate, ctx.BlockTime()) if k.IsPeriodLastBlock(ctx, params.HistoricStampPeriod) { k.AddHistoricPrice(ctx, denom, exchangeRate) diff --git a/x/oracle/abci_test.go b/x/oracle/abci_test.go index 6b57cb318c..385565ca07 100644 --- a/x/oracle/abci_test.go +++ b/x/oracle/abci_test.go @@ -156,7 +156,10 @@ func (s *IntegrationTestSuite) TestEndBlockerVoteThreshold() { for _, denom := range app.OracleKeeper.AcceptList(ctx) { rate, err := app.OracleKeeper.GetExchangeRate(ctx, denom.SymbolDenom) s.Require().NoError(err) - s.Require().Equal(types.ExchangeRate{Rate: sdk.OneDec(), Timestamp: ctx.BlockTime()}, + s.Require().Equal(types.ExchangeRate{ + Rate: sdk.OneDec(), + Denom: denom.SymbolDenom, + Timestamp: ctx.BlockTime()}, rate) } @@ -199,7 +202,8 @@ func (s *IntegrationTestSuite) TestEndBlockerVoteThreshold() { for _, denom := range app.OracleKeeper.AcceptList(ctx) { rate, err := app.OracleKeeper.GetExchangeRate(ctx, denom.SymbolDenom) s.Require().NoError(err) - s.Require().Equal(types.ExchangeRate{Rate: sdk.NewDecWithPrec(5, 1), Timestamp: ctx.BlockTime()}, rate) + s.Require().Equal(types.ExchangeRate{ + Denom: denom.SymbolDenom, Rate: sdk.NewDecWithPrec(5, 1), Timestamp: ctx.BlockTime()}, rate) } // TODO: check reward distribution @@ -236,9 +240,9 @@ func (s *IntegrationTestSuite) TestEndBlockerVoteThreshold() { rate, err := app.OracleKeeper.GetExchangeRate(ctx, "umee") s.Require().NoError(err) - s.Require().Equal(types.ExchangeRate{Rate: sdk.OneDec(), Timestamp: ctx.BlockTime()}, rate) - rate, err = app.OracleKeeper.GetExchangeRate(ctx, "atom") - s.Require().ErrorIs(err, types.ErrUnknownDenom.Wrap("atom")) + s.Require().Equal(types.ExchangeRate{Denom: "UMEE", Rate: sdk.OneDec(), Timestamp: ctx.BlockTime()}, rate) + rate, err = app.OracleKeeper.GetExchangeRate(ctx, "ATOM") + s.Require().ErrorIs(err, types.ErrUnknownDenom.Wrap("ATOM")) s.Require().Equal(types.ExchangeRate{}, rate) } diff --git a/x/oracle/genesis.go b/x/oracle/genesis.go index f979ea2238..8d8114893e 100644 --- a/x/oracle/genesis.go +++ b/x/oracle/genesis.go @@ -23,7 +23,7 @@ func InitGenesis(ctx sdk.Context, keeper keeper.Keeper, genState types.GenesisSt } for _, ex := range genState.ExchangeRates { - keeper.SetExchangeRate(ctx, ex.Denom, ex.ExchangeRate) + keeper.SetExchangeRate(ctx, ex.Denom, ex.Rate, ex.Timestamp) } for _, mc := range genState.MissCounters { @@ -91,13 +91,9 @@ func ExportGenesis(ctx sdk.Context, keeper keeper.Keeper) *types.GenesisState { return false }) - exchangeRates := []types.ExchangeRateTuple{} - keeper.IterateExchangeRates(ctx, func(denom string, rate sdk.Dec) (stop bool) { - exchangeRates = append(exchangeRates, types.ExchangeRateTuple{ - Denom: denom, - ExchangeRate: rate, - }) - + exchangeRates := []types.ExchangeRate{} + keeper.IterateExchangeRates(ctx, func(er types.ExchangeRate) (stop bool) { + exchangeRates = append(exchangeRates, er) return false }) diff --git a/x/oracle/genesis_test.go b/x/oracle/genesis_test.go index 5ba2e03352..e7ed120900 100644 --- a/x/oracle/genesis_test.go +++ b/x/oracle/genesis_test.go @@ -54,10 +54,11 @@ func (s *IntegrationTestSuite) TestGenesis_InitGenesis() { "valid", types.GenesisState{ Params: types.DefaultParams(), - ExchangeRates: types.ExchangeRateTuples{ - types.ExchangeRateTuple{ - Denom: denom, - ExchangeRate: exchangeRate, + ExchangeRates: []types.ExchangeRate{ + { + Denom: denom, + Rate: exchangeRate, + Timestamp: ctx.BlockTime(), }, }, HistoricPrices: types.Prices{ @@ -152,10 +153,11 @@ func (s *IntegrationTestSuite) TestGenesis_ExportGenesis() { ValidatorAddress: umeevaloperAddr, }, } - exchangeRateTuples := types.ExchangeRateTuples{ - types.ExchangeRateTuple{ - Denom: upperDenom, - ExchangeRate: exchangeRate, + exchangeRateTuples := []types.ExchangeRate{ + { + Denom: upperDenom, + Rate: exchangeRate, + Timestamp: ctx.BlockTime(), }, } missCounters := []types.MissCounter{ diff --git a/x/oracle/keeper/ballot_test.go b/x/oracle/keeper/ballot_test.go index cc6ff3fc98..e952d4a2d7 100644 --- a/x/oracle/keeper/ballot_test.go +++ b/x/oracle/keeper/ballot_test.go @@ -8,7 +8,7 @@ import ( func (s *IntegrationTestSuite) TestBallot_OrganizeBallotByDenom() { require := s.Require() - s.app.OracleKeeper.SetExchangeRate(s.ctx, displayDenom, sdk.OneDec()) + s.app.OracleKeeper.SetExchangeRate(s.ctx, displayDenom, sdk.OneDec(), s.ctx.BlockTime()) claimMap := make(map[string]types.Claim) // Empty Map diff --git a/x/oracle/keeper/grpc_query.go b/x/oracle/keeper/grpc_query.go index 7d297ae7c7..635e5cc4ce 100644 --- a/x/oracle/keeper/grpc_query.go +++ b/x/oracle/keeper/grpc_query.go @@ -64,8 +64,8 @@ func (q querier) ExchangeRates( exchangeRates = exchangeRates.Add(sdk.NewDecCoinFromDec(req.Denom, exchangeRate.Rate)) } else { - q.IterateExchangeRates(ctx, func(denom string, rate sdk.Dec) (stop bool) { - exchangeRates = exchangeRates.Add(sdk.NewDecCoinFromDec(denom, rate)) + q.IterateExchangeRates(ctx, func(exgRate types.ExchangeRate) (stop bool) { + exchangeRates = exchangeRates.Add(sdk.NewDecCoinFromDec(exgRate.Denom, exgRate.Rate)) return false }) } @@ -85,8 +85,8 @@ func (q querier) ActiveExchangeRates( ctx := sdk.UnwrapSDKContext(goCtx) denoms := []string{} - q.IterateExchangeRates(ctx, func(denom string, _ sdk.Dec) (stop bool) { - denoms = append(denoms, denom) + q.IterateExchangeRates(ctx, func(exgRate types.ExchangeRate) (stop bool) { + denoms = append(denoms, exgRate.Denom) return false }) diff --git a/x/oracle/keeper/grpc_query_test.go b/x/oracle/keeper/grpc_query_test.go index 9f6bc75bd5..7c33a96563 100644 --- a/x/oracle/keeper/grpc_query_test.go +++ b/x/oracle/keeper/grpc_query_test.go @@ -12,14 +12,14 @@ import ( ) func (s *IntegrationTestSuite) TestQuerier_ActiveExchangeRates() { - s.app.OracleKeeper.SetExchangeRate(s.ctx, displayDenom, sdk.OneDec()) + s.app.OracleKeeper.SetExchangeRate(s.ctx, displayDenom, sdk.OneDec(), s.ctx.BlockTime()) res, err := s.queryClient.ActiveExchangeRates(s.ctx.Context(), &types.QueryActiveExchangeRates{}) s.Require().NoError(err) s.Require().Equal([]string{displayDenom}, res.ActiveRates) } func (s *IntegrationTestSuite) TestQuerier_ExchangeRates() { - s.app.OracleKeeper.SetExchangeRate(s.ctx, displayDenom, sdk.OneDec()) + s.app.OracleKeeper.SetExchangeRate(s.ctx, displayDenom, sdk.OneDec(), s.ctx.BlockTime()) res, err := s.queryClient.ExchangeRates(s.ctx.Context(), &types.QueryExchangeRates{}) s.Require().NoError(err) s.Require().Equal(sdk.DecCoins{ @@ -193,8 +193,13 @@ func (s *IntegrationTestSuite) TestQuerier_AggregatePrevotesAppendVotes() { } func (s *IntegrationTestSuite) TestQuerier_AggregateVotesAppendVotes() { + exgRateTuples := types.ExchangeRateTuples{} + + for _, er := range types.DefaultGenesisState().ExchangeRates { + exgRateTuples = append(exgRateTuples, types.ExchangeRateTuple{Denom: er.Denom, ExchangeRate: er.Rate}) + } s.app.OracleKeeper.SetAggregateExchangeRateVote(s.ctx, valAddr, types.NewAggregateExchangeRateVote( - types.DefaultGenesisState().ExchangeRates, + exgRateTuples, valAddr, )) diff --git a/x/oracle/keeper/keeper.go b/x/oracle/keeper/keeper.go index 35ccd7e1eb..6f350a4c8e 100644 --- a/x/oracle/keeper/keeper.go +++ b/x/oracle/keeper/keeper.go @@ -2,6 +2,7 @@ package keeper import ( "fmt" + "time" "github.com/cosmos/cosmos-sdk/codec" storetypes "github.com/cosmos/cosmos-sdk/store/types" @@ -111,38 +112,35 @@ func (k Keeper) GetExchangeRateBase(ctx sdk.Context, denom string) (sdk.Dec, err } // SetExchangeRate sets the consensus exchange rate of USD denominated in the -// denom asset to the store. -func (k Keeper) SetExchangeRate(ctx sdk.Context, denom string, rate sdk.Dec) { +// denom asset to the store with timestamp +func (k Keeper) SetExchangeRate(ctx sdk.Context, denom string, rate sdk.Dec, t time.Time) { key := types.KeyExchangeRate(denom) - val := types.ExchangeRate{Rate: rate, Timestamp: ctx.BlockTime()} - err := store.SetValue(ctx.KVStore(k.storeKey), key, &val, "exchange_rate") + val := types.ExchangeRate{Denom: denom, Rate: rate, Timestamp: t} + err := store.SetValue[*types.ExchangeRate](ctx.KVStore(k.storeKey), key, &val, "exchange_rate") util.Panic(err) } // SetExchangeRateWithEvent sets an consensus // exchange rate to the store with ABCI event -func (k Keeper) SetExchangeRateWithEvent(ctx sdk.Context, denom string, exchangeRate sdk.Dec) { - k.SetExchangeRate(ctx, denom, exchangeRate) +func (k Keeper) SetExchangeRateWithEvent(ctx sdk.Context, denom string, rate sdk.Dec, t time.Time) { + k.SetExchangeRate(ctx, denom, rate, t) sdkutil.Emit(&ctx, &types.EventSetFxRate{ - Denom: denom, Rate: exchangeRate, + Denom: denom, Rate: rate, }) } // IterateExchangeRates iterates over all USD rates in the store. // TODO: handler should use ExchangeRate type rather than Dec -func (k Keeper) IterateExchangeRates(ctx sdk.Context, handler func(string, sdk.Dec) bool) { +func (k Keeper) IterateExchangeRates(ctx sdk.Context, handler func(types.ExchangeRate) bool) { store := ctx.KVStore(k.storeKey) iter := sdk.KVStorePrefixIterator(store, types.KeyPrefixExchangeRate) defer iter.Close() - prefixLen := len(types.KeyPrefixExchangeRate) for ; iter.Valid(); iter.Next() { - key := iter.Key() - denom := string(key[prefixLen : len(key)-1]) // -1 to remove the null suffix var er types.ExchangeRate k.cdc.MustUnmarshal(iter.Value(), &er) - if handler(denom, er.Rate) { + if handler(er) { break } } diff --git a/x/oracle/keeper/keeper_test.go b/x/oracle/keeper/keeper_test.go index 2d2d8d56d9..83682b0a2a 100644 --- a/x/oracle/keeper/keeper_test.go +++ b/x/oracle/keeper/keeper_test.go @@ -206,10 +206,10 @@ func (s *IntegrationTestSuite) TestAggregateExchangeRateVoteError() { func (s *IntegrationTestSuite) TestSetExchangeRateWithEvent() { v := sdk.OneDec() - s.app.OracleKeeper.SetExchangeRateWithEvent(s.ctx, displayDenom, v) + s.app.OracleKeeper.SetExchangeRateWithEvent(s.ctx, displayDenom, v, s.ctx.BlockTime()) rate, err := s.app.OracleKeeper.GetExchangeRate(s.ctx, displayDenom) s.Require().NoError(err) - s.Require().Equal(rate, types.ExchangeRate{Rate: v, Timestamp: s.ctx.BlockTime()}) + s.Require().Equal(rate, types.ExchangeRate{Rate: v, Timestamp: s.ctx.BlockTime(), Denom: displayDenom}) } func (s *IntegrationTestSuite) TestGetExchangeRate_InvalidDenom() { @@ -228,13 +228,13 @@ func (s *IntegrationTestSuite) TestGetExchangeRate_NotSet() { func (s *IntegrationTestSuite) TestGetExchangeRate_Valid() { v := sdk.OneDec() - expected := types.ExchangeRate{Rate: v, Timestamp: s.ctx.BlockTime()} - s.app.OracleKeeper.SetExchangeRate(s.ctx, displayDenom, v) + expected := types.ExchangeRate{Rate: v, Timestamp: s.ctx.BlockTime(), Denom: displayDenom} + s.app.OracleKeeper.SetExchangeRate(s.ctx, displayDenom, v, s.ctx.BlockTime()) rate, err := s.app.OracleKeeper.GetExchangeRate(s.ctx, displayDenom) s.Require().NoError(err) s.Require().Equal(rate, expected) - s.app.OracleKeeper.SetExchangeRate(s.ctx, strings.ToLower(displayDenom), sdk.OneDec()) + s.app.OracleKeeper.SetExchangeRate(s.ctx, displayDenom, sdk.OneDec(), s.ctx.BlockTime()) rate, err = s.app.OracleKeeper.GetExchangeRate(s.ctx, displayDenom) s.Require().NoError(err) s.Require().Equal(rate, expected) @@ -252,12 +252,12 @@ func (s *IntegrationTestSuite) TestGetExchangeRateBase() { power := sdk.MustNewDecFromStr("10").Power(exponent) - s.app.OracleKeeper.SetExchangeRate(s.ctx, displayDenom, sdk.OneDec()) + s.app.OracleKeeper.SetExchangeRate(s.ctx, displayDenom, sdk.OneDec(), s.ctx.BlockTime()) rate, err := s.app.OracleKeeper.GetExchangeRateBase(s.ctx, bondDenom) s.Require().NoError(err) s.Require().Equal(rate.Mul(power), sdk.OneDec()) - s.app.OracleKeeper.SetExchangeRate(s.ctx, strings.ToLower(displayDenom), sdk.OneDec()) + s.app.OracleKeeper.SetExchangeRate(s.ctx, strings.ToLower(displayDenom), sdk.OneDec(), s.ctx.BlockTime()) rate, err = s.app.OracleKeeper.GetExchangeRateBase(s.ctx, bondDenom) s.Require().NoError(err) s.Require().Equal(rate.Mul(power), sdk.OneDec()) @@ -266,7 +266,7 @@ func (s *IntegrationTestSuite) TestGetExchangeRateBase() { func (s *IntegrationTestSuite) TestClearExchangeRate() { app, ctx := s.app, s.ctx - app.OracleKeeper.SetExchangeRate(ctx, displayDenom, sdk.OneDec()) + app.OracleKeeper.SetExchangeRate(ctx, displayDenom, sdk.OneDec(), s.ctx.BlockTime()) app.OracleKeeper.ClearExchangeRates(ctx) _, err := app.OracleKeeper.GetExchangeRate(ctx, displayDenom) s.Require().Error(err) diff --git a/x/oracle/keeper/msg_server_test.go b/x/oracle/keeper/msg_server_test.go index e0fbec1f80..636c9d6b2e 100644 --- a/x/oracle/keeper/msg_server_test.go +++ b/x/oracle/keeper/msg_server_test.go @@ -98,7 +98,7 @@ func (s *IntegrationTestSuite) TestMsgServer_AggregateExchangeRateVote() { acceptList := s.app.OracleKeeper.GetParams(ctx).AcceptList var acceptListFlat []string for _, v := range acceptList { - acceptListFlat = append(acceptListFlat, v.SymbolDenom) + acceptListFlat = append(acceptListFlat, strings.ToUpper(v.SymbolDenom)) } // No existing prevote @@ -122,7 +122,7 @@ func (s *IntegrationTestSuite) TestMsgServer_AggregateExchangeRateVote() { vote, err := s.app.OracleKeeper.GetAggregateExchangeRateVote(ctx, valAddr) s.Require().Nil(err) for _, v := range vote.ExchangeRateTuples { - s.Require().Contains(acceptListFlat, strings.ToLower(v.Denom)) + s.Require().Contains(acceptListFlat, v.Denom) } // Valid, but with an exchange rate which isn't in AcceptList @@ -132,12 +132,13 @@ func (s *IntegrationTestSuite) TestMsgServer_AggregateExchangeRateVote() { types.NewAggregateExchangeRatePrevote( hashInvalidRate, valAddr, 1, )) + _, err = s.msgServer.AggregateExchangeRateVote(sdk.WrapSDKContext(ctx), voteMsgInvalidRate) s.Require().NoError(err) vote, err = s.app.OracleKeeper.GetAggregateExchangeRateVote(ctx, valAddr) s.Require().NoError(err) for _, v := range vote.ExchangeRateTuples { - s.Require().Contains(acceptListFlat, strings.ToLower(v.Denom)) + s.Require().Contains(acceptListFlat, v.Denom) } } diff --git a/x/oracle/types/asset.go b/x/oracle/types/asset.go index 7ef07be2aa..49d99aa42a 100644 --- a/x/oracle/types/asset.go +++ b/x/oracle/types/asset.go @@ -7,17 +7,17 @@ import ( ) const ( - UmeeDenom string = appparams.BondDenom - UmeeSymbol string = "umee" - UmeeExponent = uint32(6) - USDDenom string = "USD" - BlocksPerMinute = uint64(10) - BlocksPerHour = BlocksPerMinute * 60 - BlocksPerDay = BlocksPerHour * 24 - BlocksPerWeek = BlocksPerDay * 7 - BlocksPerMonth = BlocksPerDay * 30 - BlocksPerYear = BlocksPerDay * 365 - MicroUnit = int64(1e6) + UmeeDenom = appparams.BondDenom + UmeeSymbol = "UMEE" + UmeeExponent = uint32(6) + USDDenom = "USD" + BlocksPerMinute = uint64(10) + BlocksPerHour = BlocksPerMinute * 60 + BlocksPerDay = BlocksPerHour * 24 + BlocksPerWeek = BlocksPerDay * 7 + BlocksPerMonth = BlocksPerDay * 30 + BlocksPerYear = BlocksPerDay * 365 + MicroUnit = int64(1e6) ) type ( diff --git a/x/oracle/types/denom_test.go b/x/oracle/types/denom_test.go index 9dc49894c9..9c566beb94 100644 --- a/x/oracle/types/denom_test.go +++ b/x/oracle/types/denom_test.go @@ -14,7 +14,7 @@ func TestDenomString(t *testing.T) { }{ { denom: types.DenomUmee, - expectedStr: "base_denom: uumee\nsymbol_denom: umee\nexponent: 6\n", + expectedStr: "base_denom: uumee\nsymbol_denom: UMEE\nexponent: 6\n", }, { denom: types.DenomLuna, @@ -76,7 +76,7 @@ func TestDenomListString(t *testing.T) { }{ { denomList: types.DenomList{types.DenomUmee}, - expectedStr: "base_denom: uumee\nsymbol_denom: umee\nexponent: 6", + expectedStr: "base_denom: uumee\nsymbol_denom: UMEE\nexponent: 6", }, { denomList: types.DenomList{types.DenomAtom, types.DenomLuna}, diff --git a/x/oracle/types/genesis.go b/x/oracle/types/genesis.go index 946a0fb220..d9c3bc0180 100644 --- a/x/oracle/types/genesis.go +++ b/x/oracle/types/genesis.go @@ -10,7 +10,7 @@ import ( // NewGenesisState creates a new GenesisState object func NewGenesisState( params Params, - rates []ExchangeRateTuple, + rates []ExchangeRate, feederDelegations []FeederDelegation, missCounters []MissCounter, aggregateExchangeRatePrevotes []AggregateExchangeRatePrevote, @@ -39,7 +39,7 @@ func NewGenesisState( func DefaultGenesisState() *GenesisState { return &GenesisState{ Params: DefaultParams(), - ExchangeRates: []ExchangeRateTuple{}, + ExchangeRates: []ExchangeRate{}, FeederDelegations: []FeederDelegation{}, MissCounters: []MissCounter{}, AggregateExchangeRatePrevotes: []AggregateExchangeRatePrevote{}, diff --git a/x/oracle/types/genesis.pb.go b/x/oracle/types/genesis.pb.go index b4862a32bf..1bb5da2b07 100644 --- a/x/oracle/types/genesis.pb.go +++ b/x/oracle/types/genesis.pb.go @@ -25,10 +25,9 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // GenesisState defines the oracle module's genesis state. type GenesisState struct { - Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` - FeederDelegations []FeederDelegation `protobuf:"bytes,2,rep,name=feeder_delegations,json=feederDelegations,proto3" json:"feeder_delegations"` - // TODO: need to update this to save data with timestamp - ExchangeRates ExchangeRateTuples `protobuf:"bytes,3,rep,name=exchange_rates,json=exchangeRates,proto3,castrepeated=ExchangeRateTuples" json:"exchange_rates"` + Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` + FeederDelegations []FeederDelegation `protobuf:"bytes,2,rep,name=feeder_delegations,json=feederDelegations,proto3" json:"feeder_delegations"` + ExchangeRates []ExchangeRate `protobuf:"bytes,3,rep,name=exchange_rates,json=exchangeRates,proto3" json:"exchange_rates"` MissCounters []MissCounter `protobuf:"bytes,4,rep,name=miss_counters,json=missCounters,proto3" json:"miss_counters"` AggregateExchangeRatePrevotes []AggregateExchangeRatePrevote `protobuf:"bytes,5,rep,name=aggregate_exchange_rate_prevotes,json=aggregateExchangeRatePrevotes,proto3" json:"aggregate_exchange_rate_prevotes"` AggregateExchangeRateVotes []AggregateExchangeRateVote `protobuf:"bytes,6,rep,name=aggregate_exchange_rate_votes,json=aggregateExchangeRateVotes,proto3" json:"aggregate_exchange_rate_votes"` @@ -202,46 +201,46 @@ func init() { func init() { proto.RegisterFile("umee/oracle/v1/genesis.proto", fileDescriptor_c99b4af40468acc1) } var fileDescriptor_c99b4af40468acc1 = []byte{ - // 620 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x54, 0xdd, 0x4e, 0xd4, 0x4e, - 0x14, 0xdf, 0xf2, 0xb1, 0xc0, 0x2c, 0xec, 0x7f, 0x99, 0xbf, 0x9a, 0xba, 0x48, 0x59, 0x9a, 0x98, - 0x60, 0xd4, 0x36, 0xe0, 0xc7, 0x85, 0x77, 0x20, 0xc2, 0x8d, 0x1a, 0x52, 0xbf, 0x12, 0x13, 0xd3, - 0x0c, 0xed, 0xa1, 0x34, 0xb4, 0x9d, 0x3a, 0x33, 0xad, 0x10, 0xe3, 0x3b, 0xf8, 0x1c, 0x3e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00, 0x00, 0xff, 0xff, 0x72, 0xa7, 0x58, 0xb8, 0x73, 0x05, 0x00, 0x00, + // 611 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x94, 0x5d, 0x4f, 0xd4, 0x4e, + 0x14, 0xc6, 0xb7, 0xbc, 0x2c, 0x30, 0x0b, 0xfb, 0x5f, 0xe6, 0xaf, 0xa6, 0xf2, 0x52, 0x96, 0x26, + 0x26, 0x18, 0xb5, 0x0d, 0xf8, 0x72, 0xe1, 0x1d, 0x88, 0x10, 0x13, 0x35, 0x64, 0x7d, 0x4b, 0x4c, + 0x4c, 0x33, 0xb4, 0x87, 0xd2, 0xd0, 0x76, 0xea, 0xcc, 0xb4, 0x42, 0x8c, 0xdf, 0xc1, 0x8f, 0xc5, + 0x25, 0x97, 0x5c, 0x11, 0x65, 0xbf, 0x81, 0x9f, 0xc0, 0x74, 0x3a, 0x65, 0x77, 0xbb, 0xbc, 0x78, + 0x07, 0xe7, 0x3c, 0xe7, 0xf7, 0x9c, 0x6c, 0x9f, 0x33, 0x68, 0x21, 0x8d, 0x00, 0x6c, 0xca, 0x88, + 0x1b, 0x82, 0x9d, 0xad, 0xda, 0x3e, 0xc4, 0xc0, 0x03, 0x6e, 0x25, 0x8c, 0x0a, 0x8a, 0x9b, 0x79, + 0xd7, 0x2a, 0xba, 0x56, 0xb6, 0x3a, 0x77, 0xcb, 0xa7, 0x3e, 0x95, 0x2d, 0x3b, 0xff, 0xab, 0x50, + 0xcd, 0xcd, 0x57, 0x18, 0x4a, 0x2f, 0x9b, 0xe6, 0x69, 0x1d, 0x4d, 0x6f, 0x17, 0xd0, 0x77, 0x82, + 0x08, 0xc0, 0x4f, 0x50, 0x3d, 0x21, 0x8c, 0x44, 0x5c, 0xd7, 0xda, 0xda, 0x4a, 0x63, 0xed, 0x8e, + 0x35, 0x68, 0x62, 0xed, 0xc8, 0xee, 0xc6, 0xd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x46, 0x1b, 0xaf, 0x8f, 0x7f, 0x1b, 0xb5, 0xe3, 0x73, 0x43, 0x3b, + 0x39, 0x37, 0xb4, 0x5f, 0xe7, 0x86, 0xf6, 0xb3, 0x6b, 0xd4, 0x4e, 0xba, 0x46, 0xed, 0xb4, 0x6b, + 0xd4, 0x3e, 0x5b, 0x7e, 0x20, 0xf6, 0xd3, 0x5d, 0xcb, 0xa5, 0x91, 0x9d, 0x2f, 0xf0, 0x28, 0x06, + 0xf1, 0x8d, 0xb2, 0x03, 0xf9, 0x8f, 0x9d, 0x3d, 0xb3, 0x0f, 0xcb, 0x87, 0x4f, 0x1c, 0x25, 0xc0, + 0x77, 0xeb, 0xf2, 0xd5, 0x7b, 0xfc, 0x37, 0x00, 0x00, 0xff, 0xff, 0x0e, 0x0f, 0xe5, 0xce, 0x58, + 0x05, 0x00, 0x00, } func (m *GenesisState) Marshal() (dAtA []byte, err error) { @@ -759,7 +758,7 @@ func (m *GenesisState) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.ExchangeRates = append(m.ExchangeRates, ExchangeRateTuple{}) + m.ExchangeRates = append(m.ExchangeRates, ExchangeRate{}) if err := m.ExchangeRates[len(m.ExchangeRates)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } diff --git a/x/oracle/types/genesis_test.go b/x/oracle/types/genesis_test.go index 9067fbcce2..ce96d7fac5 100644 --- a/x/oracle/types/genesis_test.go +++ b/x/oracle/types/genesis_test.go @@ -62,7 +62,7 @@ func TestGenesisValidation(t *testing.T) { func TestGetGenesisStateFromAppState(t *testing.T) { emptyGenesis := GenesisState{ Params: Params{}, - ExchangeRates: []ExchangeRateTuple{}, + ExchangeRates: []ExchangeRate{}, FeederDelegations: []FeederDelegation{}, MissCounters: []MissCounter{}, AggregateExchangeRatePrevotes: []AggregateExchangeRatePrevote{}, diff --git a/x/oracle/types/oracle.pb.go b/x/oracle/types/oracle.pb.go index 4d51ad8e5b..527149b73c 100644 --- a/x/oracle/types/oracle.pb.go +++ b/x/oracle/types/oracle.pb.go @@ -332,7 +332,8 @@ var xxx_messageInfo_AvgCounter proto.InternalMessageInfo // ExchangeRate stores exchange rate with timestamp type ExchangeRate struct { - Rate github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,1,opt,name=rate,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"rate"` + Denom string `protobuf:"bytes,1,opt,name=denom,proto3" json:"denom,omitempty" yaml:"denom"` + Rate github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,2,opt,name=rate,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"rate"` Timestamp time.Time `protobuf:"bytes,3,opt,name=timestamp,proto3,stdtime" json:"timestamp"` } @@ -382,75 +383,75 @@ func init() { func init() { proto.RegisterFile("umee/oracle/v1/oracle.proto", fileDescriptor_8893c9e0e94ceb54) } var fileDescriptor_8893c9e0e94ceb54 = []byte{ - // 1074 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x56, 0xcd, 0x6f, 0x1b, 0x45, - 0x14, 0xf7, 0x92, 0x8f, 0xda, 0xe3, 0xa4, 0x4d, 0x36, 0x0e, 0xb8, 0x09, 0xf2, 0xa6, 0x8b, 0x28, - 0x39, 0xd0, 0x35, 0x4d, 0xf9, 0x10, 0x39, 0xd1, 0x25, 0x94, 0x4b, 0x2b, 0x45, 0xdb, 0xa8, 0x48, - 0x5c, 0x56, 0xe3, 0xdd, 0xc9, 0x7a, 0x14, 0xef, 0x8e, 0x35, 0x33, 0xeb, 0x24, 0x17, 0xce, 0x9c, - 0x50, 0x8f, 0x3d, 0xe6, 0xc4, 0x81, 0x1b, 0x88, 0x3f, 0x22, 0xc7, 0x1e, 0x11, 0x87, 0x2d, 0x24, - 0x17, 0xc4, 0x09, 0xf9, 0x2f, 0x40, 0xf3, 0xb1, 0xde, 0x71, 0x13, 0x21, 0x0c, 0x27, 0xef, 0x9b, - 0xdf, 0xfc, 0xde, 0xfb, 0xbd, 0x37, 0xef, 0x3d, 0x19, 0x6c, 0xe6, 0x29, 0x42, 0x5d, 0x42, 0x61, - 0x34, 0x40, 0xdd, 0xd1, 0x7d, 0xfd, 0xe5, 0x0d, 0x29, 0xe1, 0xc4, 0xbe, 0x29, 0x40, 0x4f, 0x1f, - 0x8d, 0xee, 0x6f, 0xb4, 0x12, 0x92, 0x10, 0x09, 0x75, 0xc5, 0x97, 0xba, 0xb5, 0xe1, 0x24, 0x84, - 0x24, 0x03, 0xd4, 0x95, 0x56, 0x2f, 0x3f, 0xec, 0x72, 0x9c, 0x22, 0xc6, 0x61, 0x3a, 0xd4, 0x17, - 0x3a, 0xaf, 0x5f, 0x88, 0x73, 0x0a, 0x39, 0x26, 0x99, 0xc2, 0xdd, 0xe2, 0x06, 0x58, 0xdc, 0x87, - 0x14, 0xa6, 0xcc, 0xfe, 0x04, 0x34, 0x47, 0x84, 0xa3, 0x70, 0x88, 0x28, 0x26, 0x71, 0xdb, 0xda, - 0xb2, 0xb6, 0xe7, 0xfd, 0x37, 0xc7, 0x85, 0x63, 0x9f, 0xc2, 0x74, 0xb0, 0xeb, 0x1a, 0xa0, 0x1b, - 0x00, 0x61, 0xed, 0x4b, 0xc3, 0xce, 0xc0, 0x4d, 0x89, 0xf1, 0x3e, 0x45, 0xac, 0x4f, 0x06, 0x71, - 0xfb, 0x8d, 0x2d, 0x6b, 0xbb, 0xe1, 0x7f, 0x79, 0x5e, 0x38, 0xb5, 0x5f, 0x0b, 0xe7, 0x6e, 0x82, - 0x79, 0x3f, 0xef, 0x79, 0x11, 0x49, 0xbb, 0x11, 0x61, 0x29, 0x61, 0xfa, 0xe7, 0x1e, 0x8b, 0x8f, - 0xba, 0xfc, 0x74, 0x88, 0x98, 0xb7, 0x87, 0xa2, 0x71, 0xe1, 0xac, 0x1b, 0x91, 0x26, 0xde, 0xdc, - 0x60, 0x59, 0x1c,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0xc9, 0xcc, 0x8a, 0x37, 0x55, 0xc4, 0xeb, - 0x7c, 0xba, 0xc1, 0x6a, 0x8a, 0xb3, 0x67, 0xe2, 0x74, 0x1f, 0x51, 0x1d, 0x7f, 0x07, 0xac, 0xf7, - 0x31, 0xe3, 0x84, 0xe2, 0x28, 0x94, 0x43, 0x54, 0xce, 0x42, 0x43, 0x24, 0x11, 0xac, 0x95, 0xe0, - 0x53, 0x81, 0xe9, 0xe6, 0xf7, 0xc0, 0x5a, 0x8a, 0x62, 0x0c, 0xb3, 0x69, 0x06, 0x90, 0x8c, 0x55, - 0x05, 0x99, 0xf7, 0x3f, 0x00, 0xad, 0x14, 0x9e, 0xe0, 0x34, 0x4f, 0xc3, 0x21, 0xc5, 0x11, 0x52, - 0x34, 0xd6, 0x6e, 0x4a, 0x82, 0xad, 0xb1, 0x7d, 0x01, 0x49, 0x1a, 0x13, 0xaa, 0x4a, 0x86, 0x19, - 0x89, 0xb5, 0x97, 0x94, 0x2a, 0x0d, 0x3e, 0xa9, 0x42, 0xb1, 0xdd, 0xfa, 0x8b, 0x33, 0xa7, 0xf6, - 0xc7, 0x99, 0x63, 0xb9, 0x7f, 0x59, 0x60, 0xe5, 0xe1, 0x28, 0xf9, 0x9c, 0xe4, 0x19, 0x47, 0x54, - 0x8f, 0x3a, 0x01, 0x00, 0x8e, 0x12, 0x73, 0xd2, 0x9b, 0x3b, 0xb7, 0x3d, 0xb5, 0x2a, 0xbc, 0x72, - 0x55, 0x78, 0x7b, 0x7a, 0x55, 0xf8, 0x1f, 0x89, 0xca, 0xff, 0x59, 0x38, 0xad, 0x8a, 0xf4, 0x3e, - 0x49, 0x31, 0x47, 0xe9, 0x90, 0x9f, 0x8e, 0x0b, 0x67, 0x55, 0x37, 0xe4, 0x04, 0x75, 0x5f, 0xbc, - 0x72, 0xac, 0xa0, 0x01, 0x47, 0x89, 0xce, 0xfa, 0x08, 0x08, 0x23, 0x64, 0x7d, 0x7c, 0xc8, 0xe5, - 0x76, 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c, 0xf7, 0x4e, - 0xed, 0xfc, 0xa2, 0x63, 0xbd, 0xbc, 0xe8, 0x58, 0xbf, 0x5d, 0x74, 0xac, 0xe7, 0x97, 0x9d, 0xda, - 0xcb, 0xcb, 0x4e, 0xed, 0x97, 0xcb, 0x4e, 0xed, 0x6b, 0xcf, 0x50, 0x26, 0x9a, 0xf9, 0x5e, 0x86, - 0xf8, 0x31, 0xa1, 0x47, 0xd2, 0xe8, 0x8e, 0x3e, 0xee, 0x9e, 0x94, 0xff, 0xef, 0xa4, 0xca, 0xde, - 0xa2, 0x14, 0xf0, 0xe0, 0xef, 0x00, 0x00, 0x00, 0xff, 0xff, 0xed, 0xc7, 0x26, 0x38, 0xfb, 0x09, - 0x00, 0x00, + // 1076 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x56, 0xbf, 0x6f, 0xdb, 0x46, + 0x14, 0x16, 0x6b, 0x3b, 0x91, 0x4e, 0x76, 0x62, 0xd3, 0x72, 0xab, 0xd8, 0x85, 0xe8, 0xb0, 0x68, + 0xea, 0xa1, 0xa1, 0x1a, 0xa7, 0x3f, 0x50, 0x4f, 0x0d, 0xeb, 0xa6, 0x4b, 0x02, 0x18, 0x8c, 0x91, + 0x02, 0x5d, 0x88, 0x13, 0x79, 0xa6, 0x0e, 0x16, 0x79, 0xc2, 0xdd, 0x51, 0xb6, 0x97, 0xce, 0x9d, + 0x8a, 0x8c, 0x19, 0x33, 0x75, 0xe8, 0xd6, 0xa2, 0x7f, 0x84, 0xc7, 0x8c, 0x45, 0x07, 0xa6, 0xb5, + 0x97, 0xa2, 0x53, 0xa1, 0xbf, 0xa0, 0xb8, 0x1f, 0x14, 0x4f, 0x91, 0x51, 0x44, 0xe8, 0x24, 0xbe, + 0xfb, 0xee, 0x7b, 0xef, 0x7b, 0xef, 0xde, 0x7b, 0x10, 0xd8, 0xca, 0x53, 0x84, 0xba, 0x84, 0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xf8, 0xbb, 0x60, 0xa3, + 0x8f, 0x19, 0x27, 0x14, 0x47, 0xa1, 0x1c, 0xa2, 0x72, 0x16, 0x1a, 0x22, 0x89, 0x60, 0xbd, 0x04, + 0x9f, 0x08, 0x4c, 0x37, 0xbf, 0x07, 0xd6, 0x53, 0x14, 0x63, 0x98, 0x4d, 0x33, 0x80, 0x64, 0xac, + 0x29, 0xc8, 0xbc, 0xff, 0x11, 0x68, 0xa5, 0xf0, 0x14, 0xa7, 0x79, 0x1a, 0x0e, 0x29, 0x8e, 0x90, + 0xa2, 0xb1, 0x76, 0x53, 0x12, 0x6c, 0x8d, 0x1d, 0x08, 0x48, 0xd2, 0x98, 0x50, 0x55, 0x32, 0xcc, + 0x48, 0xac, 0xbd, 0xac, 0x54, 0x69, 0xf0, 0x71, 0x15, 0x8a, 0xed, 0xd5, 0x9f, 0xbf, 0x70, 0x6a, + 0x7f, 0xbd, 0x70, 0x2c, 0xf7, 0x1f, 0x0b, 0xac, 0x3e, 0x18, 0x25, 0x5f, 0x92, 0x3c, 0xe3, 0x88, + 0xea, 0x51, 0x27, 0x00, 0xc0, 0x51, 0x62, 0x4e, 0x7a, 0x73, 0xf7, 0x96, 0xa7, 0x56, 0x85, 0x57, + 0xae, 0x0a, 0x6f, 0x5f, 0xaf, 0x0a, 0xff, 0x13, 0x51, 0xf9, 0xbf, 0x0b, 0xa7, 0x55, 0x91, 0x3e, + 0x24, 0x29, 0xe6, 0x28, 0x1d, 0xf2, 0xb3, 0x71, 0xe1, 0xac, 0xe9, 0x86, 0x9c, 0xa0, 0xee, 0xf3, + 0x57, 0x8e, 0x15, 0x34, 0xe0, 0x28, 0xd1, 0x59, 0x1f, 0x03, 0x61, 0x84, 0xac, 0x8f, 0x8f, 0xb8, + 0xdc, 0x0e, 0xff, 0x19, 0xef, 0xbe, 0x8e, 0xb7, 0x3e, 0xe1, 0x4c, 0x85, 0x5b, 0xad, 0xc2, 0x49, + 0x50, 0x45, 0xab, 0xc3, 0x51, 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, 0xcb, 0xcb, 0x4e, 0xed, 0xb7, 0xcb, 0x4e, 0xed, 0x5b, 0xcf, 0x50, 0x26, 0x9a, 0xfe, + 0x6e, 0x86, 0xf8, 0x09, 0xa1, 0xc7, 0xd2, 0xe8, 0x8e, 0x3e, 0xed, 0x9e, 0x96, 0xff, 0x03, 0xa5, + 0xca, 0xde, 0x35, 0x29, 0xe0, 0xfe, 0xbf, 0x01, 0x00, 0x00, 0xff, 0xff, 0x1e, 0x56, 0x46, 0x8e, + 0x23, 0x0a, 0x00, 0x00, } func (this *Params) Equal(that interface{}) bool { @@ -917,7 +918,14 @@ func (m *ExchangeRate) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintOracle(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0xa + dAtA[i] = 0x12 + if len(m.Denom) > 0 { + i -= len(m.Denom) + copy(dAtA[i:], m.Denom) + i = encodeVarintOracle(dAtA, i, uint64(len(m.Denom))) + i-- + dAtA[i] = 0xa + } return len(dAtA) - i, nil } @@ -1085,6 +1093,10 @@ func (m *ExchangeRate) Size() (n int) { } var l int _ = l + l = len(m.Denom) + if l > 0 { + n += 1 + l + sovOracle(uint64(l)) + } l = m.Rate.Size() n += 1 + l + sovOracle(uint64(l)) l = github_com_gogo_protobuf_types.SizeOfStdTime(m.Timestamp) @@ -2231,6 +2243,38 @@ func (m *ExchangeRate) Unmarshal(dAtA []byte) error { } switch fieldNum { case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Denom", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOracle + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthOracle + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthOracle + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Denom = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Rate", wireType) }