diff --git a/CHANGELOG.md b/CHANGELOG.md index 38ac68d16..660aa1b68 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -58,7 +58,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Features * [#791](https://github.com/NibiruChain/nibiru/pull/791) Add the x/oracle module -- [#813](https://github.com/NibiruChain/nibiru/pull/813) - (vpool): Expose mark price, mark TWAP, index price, and k (swap invariant) in the all-pools query +* [#816](https://github.com/NibiruChain/nibiru/pull/816) - Remove tobin tax from x/oracle +* [#813](https://github.com/NibiruChain/nibiru/pull/813) - (vpool): Expose mark price, mark TWAP, index price, and k (swap invariant) in the all-pools query * [#810](https://github.com/NibiruChain/nibiru/pull/810) - feat(x/perp): expose 'marginRatioIndex' and block number on QueryTraderPosition ## [v0.12.1](https://github.com/NibiruChain/nibiru/releases/tag/v0.12.1) - 2022-08-04 diff --git a/proto/oracle/v1beta1/genesis.proto b/proto/oracle/v1beta1/genesis.proto index 50005fe2e..c40beafd9 100644 --- a/proto/oracle/v1beta1/genesis.proto +++ b/proto/oracle/v1beta1/genesis.proto @@ -16,7 +16,7 @@ message GenesisState { 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 TobinTax tobin_taxes = 7 [(gogoproto.nullable) = false]; + repeated Pair pairs = 7 [(gogoproto.nullable) = false]; } // FeederDelegation is the address for where oracle feeder authority are @@ -33,11 +33,3 @@ message MissCounter { string validator_address = 1; uint64 miss_counter = 2; } - -// TobinTax defines a pair and tobin_tax pair used in -// oracle module's genesis state -message TobinTax { - string pair = 1; - string tobin_tax = 2 - [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false]; -} \ No newline at end of file diff --git a/proto/oracle/v1beta1/oracle.proto b/proto/oracle/v1beta1/oracle.proto index 80debcc06..744c21e05 100644 --- a/proto/oracle/v1beta1/oracle.proto +++ b/proto/oracle/v1beta1/oracle.proto @@ -48,11 +48,6 @@ message Pair { option (gogoproto.goproto_stringer) = false; string name = 1 [(gogoproto.moretags) = "yaml:\"name\""]; - string tobin_tax = 2 [ - (gogoproto.moretags) = "yaml:\"tobin_tax\"", - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; } // struct for aggregate prevoting on the ExchangeRateVote. diff --git a/proto/oracle/v1beta1/query.proto b/proto/oracle/v1beta1/query.proto index 3e4b263f2..0e1fa66bf 100644 --- a/proto/oracle/v1beta1/query.proto +++ b/proto/oracle/v1beta1/query.proto @@ -20,16 +20,6 @@ service Query { option (google.api.http).get = "/nibiru/oracle/v1beta1/pairs/exchange_rates"; } - // TobinTax returns tobin tax of a pair - rpc TobinTax(QueryTobinTaxRequest) returns (QueryTobinTaxResponse) { - option (google.api.http).get = "/nibiru/oracle/v1beta1/pairs/{pair}/tobin_tax"; - } - - // TobinTaxes returns tobin taxes of all pairs - rpc TobinTaxes(QueryTobinTaxesRequest) returns (QueryTobinTaxesResponse) { - option (google.api.http).get = "/nibiru/oracle/v1beta1/pairs/tobin_taxes"; - } - // Actives returns all active pairs rpc Actives(QueryActivesRequest) returns (QueryActivesResponse) { option (google.api.http).get = "/nibiru/oracle/v1beta1/pairs/actives"; @@ -106,37 +96,6 @@ message QueryExchangeRatesResponse { ]; } -// QueryTobinTaxRequest is the request type for the Query/TobinTax RPC method. -message QueryTobinTaxRequest { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - // pair defines the asset to query for. - string pair = 1; -} - -// QueryTobinTaxResponse is response type for the -// Query/TobinTax RPC method. -message QueryTobinTaxResponse { - // tobin_taxe defines the tobin tax of a pair - string tobin_tax = 1 - [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false]; -} - -// QueryTobinTaxesRequest is the request type for the Query/TobinTaxes RPC method. -message QueryTobinTaxesRequest {} - -// QueryTobinTaxesResponse is response type for the -// Query/TobinTaxes RPC method. -message QueryTobinTaxesResponse { - // tobin_taxes defines a list of the tobin tax of all whitelisted pairs - repeated Pair tobin_taxes = 1 [ - (gogoproto.moretags) = "yaml:\"tobin_taxes\"", - (gogoproto.castrepeated) = "PairList", - (gogoproto.nullable) = false - ]; -} - // QueryActivesRequest is the request type for the Query/Actives RPC method. message QueryActivesRequest {} diff --git a/x/oracle/abci.go b/x/oracle/abci.go index 28fdf8b0d..a6076f465 100644 --- a/x/oracle/abci.go +++ b/x/oracle/abci.go @@ -37,10 +37,9 @@ func EndBlocker(ctx sdk.Context, k keeper.Keeper) { } } - // Pair-TobinTax map - pairTobinTaxMap := make(map[string]sdk.Dec) - k.IterateTobinTaxes(ctx, func(pair string, tobinTax sdk.Dec) bool { - pairTobinTaxMap[pair] = tobinTax + pairsMap := make(map[string]struct{}) + k.IteratePairs(ctx, func(pair string) bool { + pairsMap[pair] = struct{}{} return false }) @@ -55,7 +54,7 @@ func EndBlocker(ctx sdk.Context, k keeper.Keeper) { // NOTE: **Make abstain votes to have zero vote power** pairBallotMap := k.OrganizeBallotByPair(ctx, validatorClaimMap) - if referencePair := PickReferencePair(ctx, k, pairTobinTaxMap, pairBallotMap); referencePair != "" { + if referencePair := PickReferencePair(ctx, k, pairsMap, pairBallotMap); referencePair != "" { // make voteMap of reference pair to calculate cross exchange rates referenceBallot := pairBallotMap[referencePair] referenceValidatorExchangeRateMap := referenceBallot.ToMap() @@ -83,7 +82,7 @@ func EndBlocker(ctx sdk.Context, k keeper.Keeper) { //--------------------------- // Do miss counting & slashing - voteTargetsLen := len(pairTobinTaxMap) + voteTargetsLen := len(pairsMap) for _, claim := range validatorClaimMap { // Skip abstain & valid voters if int(claim.WinCount) == voteTargetsLen { @@ -99,7 +98,7 @@ func EndBlocker(ctx sdk.Context, k keeper.Keeper) { ctx, (int64)(params.VotePeriod), (int64)(params.RewardDistributionWindow), - pairTobinTaxMap, + pairsMap, validatorClaimMap, ) @@ -107,7 +106,7 @@ func EndBlocker(ctx sdk.Context, k keeper.Keeper) { k.ClearBallots(ctx, params.VotePeriod) // Update vote targets and tobin tax - k.ApplyWhitelist(ctx, params.Whitelist, pairTobinTaxMap) + k.ApplyWhitelist(ctx, params.Whitelist, pairsMap) } // Do slash who did miss voting over threshold and diff --git a/x/oracle/abci_test.go b/x/oracle/abci_test.go index a0eac9c3b..9e79f6a5e 100644 --- a/x/oracle/abci_test.go +++ b/x/oracle/abci_test.go @@ -263,12 +263,12 @@ func TestOracleRewardDistribution(t *testing.T) { func TestOracleRewardBand(t *testing.T) { input, h := setup(t) params := input.OracleKeeper.GetParams(input.Ctx) - params.Whitelist = types.PairList{{Name: common.PairGovStable.String(), TobinTax: types.DefaultTobinTax}} + params.Whitelist = types.PairList{{Name: common.PairGovStable.String()}} input.OracleKeeper.SetParams(input.Ctx, params) - // clear tobin tax to reset vote targets - input.OracleKeeper.ClearTobinTaxes(input.Ctx) - input.OracleKeeper.SetTobinTax(input.Ctx, common.PairGovStable.String(), types.DefaultTobinTax) + // clear pairs to reset vote targets + input.OracleKeeper.ClearPairs(input.Ctx) + input.OracleKeeper.SetPair(input.Ctx, common.PairGovStable.String()) rewardSpread := randomExchangeRate.Mul(input.OracleKeeper.RewardBand(input.Ctx).QuoInt64(2)) @@ -461,9 +461,9 @@ func TestOracleExchangeRateVal5(t *testing.T) { func TestInvalidVotesSlashing(t *testing.T) { input, h := setup(t) params := input.OracleKeeper.GetParams(input.Ctx) - params.Whitelist = types.PairList{{Name: common.PairGovStable.String(), TobinTax: types.DefaultTobinTax}} + params.Whitelist = types.PairList{{Name: common.PairGovStable.String()}} input.OracleKeeper.SetParams(input.Ctx, params) - input.OracleKeeper.SetTobinTax(input.Ctx, common.PairGovStable.String(), types.DefaultTobinTax) + input.OracleKeeper.SetPair(input.Ctx, common.PairGovStable.String()) votePeriodsPerWindow := sdk.NewDec(int64(input.OracleKeeper.SlashWindow(input.Ctx))).QuoInt64(int64(input.OracleKeeper.VotePeriod(input.Ctx))).TruncateInt64() slashFraction := input.OracleKeeper.SlashFraction(input.Ctx) @@ -542,12 +542,12 @@ func TestWhitelistSlashing(t *testing.T) { func TestNotPassedBallotSlashing(t *testing.T) { input, h := setup(t) params := input.OracleKeeper.GetParams(input.Ctx) - params.Whitelist = types.PairList{{Name: common.PairGovStable.String(), TobinTax: types.DefaultTobinTax}} + params.Whitelist = types.PairList{{Name: common.PairGovStable.String()}} input.OracleKeeper.SetParams(input.Ctx, params) // clear tobin tax to reset vote targets - input.OracleKeeper.ClearTobinTaxes(input.Ctx) - input.OracleKeeper.SetTobinTax(input.Ctx, common.PairGovStable.String(), types.DefaultTobinTax) + input.OracleKeeper.ClearPairs(input.Ctx) + input.OracleKeeper.SetPair(input.Ctx, common.PairGovStable.String()) input.Ctx = input.Ctx.WithBlockHeight(input.Ctx.BlockHeight() + 1) @@ -563,12 +563,12 @@ func TestNotPassedBallotSlashing(t *testing.T) { func TestAbstainSlashing(t *testing.T) { input, h := setup(t) params := input.OracleKeeper.GetParams(input.Ctx) - params.Whitelist = types.PairList{{Name: common.PairGovStable.String(), TobinTax: types.DefaultTobinTax}} + params.Whitelist = types.PairList{{Name: common.PairGovStable.String()}} input.OracleKeeper.SetParams(input.Ctx, params) // clear tobin tax to reset vote targets - input.OracleKeeper.ClearTobinTaxes(input.Ctx) - input.OracleKeeper.SetTobinTax(input.Ctx, common.PairGovStable.String(), types.DefaultTobinTax) + input.OracleKeeper.ClearPairs(input.Ctx) + input.OracleKeeper.SetPair(input.Ctx, common.PairGovStable.String()) votePeriodsPerWindow := sdk.NewDec(int64(input.OracleKeeper.SlashWindow(input.Ctx))).QuoInt64(int64(input.OracleKeeper.VotePeriod(input.Ctx))).TruncateInt64() minValidPerWindow := input.OracleKeeper.MinValidPerWindow(input.Ctx) @@ -596,12 +596,12 @@ func TestAbstainSlashing(t *testing.T) { func TestVoteTargets(t *testing.T) { input, h := setup(t) params := input.OracleKeeper.GetParams(input.Ctx) - params.Whitelist = types.PairList{{Name: common.PairGovStable.String(), TobinTax: types.DefaultTobinTax}, {Name: common.PairBTCStable.String(), TobinTax: types.DefaultTobinTax}} + params.Whitelist = types.PairList{{Name: common.PairGovStable.String()}, {Name: common.PairBTCStable.String()}} input.OracleKeeper.SetParams(input.Ctx, params) // clear tobin tax to reset vote targets - input.OracleKeeper.ClearTobinTaxes(input.Ctx) - input.OracleKeeper.SetTobinTax(input.Ctx, common.PairGovStable.String(), types.DefaultTobinTax) + input.OracleKeeper.ClearPairs(input.Ctx) + input.OracleKeeper.SetPair(input.Ctx, common.PairGovStable.String()) // govstable makeAggregatePrevoteAndVote(t, input, h, 0, types.ExchangeRateTuples{{Pair: common.PairGovStable.String(), ExchangeRate: randomExchangeRate}}, 0) @@ -618,13 +618,8 @@ func TestVoteTargets(t *testing.T) { // vote targets are {govstable, btcstable} require.Equal(t, []string{common.PairBTCStable.String(), common.PairGovStable.String()}, input.OracleKeeper.GetVoteTargets(input.Ctx)) - // tobin tax must be exists for btcstable - btcStableTax, err := input.OracleKeeper.GetTobinTax(input.Ctx, common.PairBTCStable.String()) - require.NoError(t, err) - require.Equal(t, types.DefaultTobinTax, btcStableTax) - // delete btcstable - params.Whitelist = types.PairList{{Name: common.PairGovStable.String(), TobinTax: types.DefaultTobinTax}} + params.Whitelist = types.PairList{{Name: common.PairGovStable.String()}} input.OracleKeeper.SetParams(input.Ctx, params) // govstable, missing @@ -641,11 +636,11 @@ func TestVoteTargets(t *testing.T) { // btcstable must be deleted require.Equal(t, []string{common.PairGovStable.String()}, input.OracleKeeper.GetVoteTargets(input.Ctx)) - _, err = input.OracleKeeper.GetTobinTax(input.Ctx, common.PairBTCStable.String()) - require.Error(t, err) + exists := input.OracleKeeper.PairExists(input.Ctx, common.PairBTCStable.String()) + require.False(t, exists) // change govstable tobin tax - params.Whitelist = types.PairList{{Name: common.PairGovStable.String(), TobinTax: sdk.ZeroDec()}} + params.Whitelist = types.PairList{{Name: common.PairGovStable.String()}} input.OracleKeeper.SetParams(input.Ctx, params) // govstable, no missing @@ -658,19 +653,14 @@ func TestVoteTargets(t *testing.T) { require.Equal(t, uint64(1), input.OracleKeeper.GetMissCounter(input.Ctx, keeper.ValAddrs[0])) require.Equal(t, uint64(1), input.OracleKeeper.GetMissCounter(input.Ctx, keeper.ValAddrs[1])) require.Equal(t, uint64(1), input.OracleKeeper.GetMissCounter(input.Ctx, keeper.ValAddrs[2])) - - // govstable tobin tax must be 0 - tobinTax, err := input.OracleKeeper.GetTobinTax(input.Ctx, common.PairGovStable.String()) - require.NoError(t, err) - require.True(t, sdk.ZeroDec().Equal(tobinTax)) } func TestAbstainWithSmallStakingPower(t *testing.T) { input, h := setupWithSmallVotingPower(t) // clear tobin tax to reset vote targets - input.OracleKeeper.ClearTobinTaxes(input.Ctx) - input.OracleKeeper.SetTobinTax(input.Ctx, common.PairGovStable.String(), types.DefaultTobinTax) + input.OracleKeeper.ClearPairs(input.Ctx) + input.OracleKeeper.SetPair(input.Ctx, common.PairGovStable.String()) makeAggregatePrevoteAndVote(t, input, h, 0, types.ExchangeRateTuples{{Pair: common.PairGovStable.String(), ExchangeRate: sdk.ZeroDec()}}, 0) oracle.EndBlocker(input.Ctx, input.OracleKeeper) diff --git a/x/oracle/client/cli/query.go b/x/oracle/client/cli/query.go index 15bf14cc7..1925965a4 100644 --- a/x/oracle/client/cli/query.go +++ b/x/oracle/client/cli/query.go @@ -32,7 +32,6 @@ func GetQueryCmd() *cobra.Command { GetCmdQueryAggregatePrevote(), GetCmdQueryAggregateVote(), GetCmdQueryVoteTargets(), - GetCmdQueryTobinTaxes(), ) return oracleQueryCmd @@ -365,56 +364,3 @@ func GetCmdQueryVoteTargets() *cobra.Command { flags.AddQueryFlagsToCmd(cmd) return cmd } - -// GetCmdQueryTobinTaxes implements the query params command. -func GetCmdQueryTobinTaxes() *cobra.Command { - cmd := &cobra.Command{ - Use: "tobin-taxes [pair]", - Args: cobra.RangeArgs(0, 1), - Short: "Query the current Oracle tobin taxes.", - Long: strings.TrimSpace(` -Query the current Oracle tobin taxes. - -$ nibid query oracle tobin-taxes - -Or, can filter with pair - -$ nibid query oracle tobin-taxes nibi:usd - -Or, can -`), - RunE: func(cmd *cobra.Command, args []string) error { - clientCtx, err := client.GetClientQueryContext(cmd) - if err != nil { - return err - } - queryClient := types.NewQueryClient(clientCtx) - - if len(args) == 0 { - res, err := queryClient.TobinTaxes( - context.Background(), - &types.QueryTobinTaxesRequest{}, - ) - if err != nil { - return err - } - - return clientCtx.PrintProto(res) - } - - pair := args[0] - res, err := queryClient.TobinTax( - context.Background(), - &types.QueryTobinTaxRequest{Pair: pair}, - ) - if err != nil { - return err - } - - return clientCtx.PrintProto(res) - }, - } - - flags.AddQueryFlagsToCmd(cmd) - return cmd -} diff --git a/x/oracle/genesis.go b/x/oracle/genesis.go index 374654815..5f11a6921 100644 --- a/x/oracle/genesis.go +++ b/x/oracle/genesis.go @@ -57,13 +57,13 @@ func InitGenesis(ctx sdk.Context, keeper keeper.Keeper, data *types.GenesisState keeper.SetAggregateExchangeRateVote(ctx, valAddr, av) } - if len(data.TobinTaxes) > 0 { - for _, tt := range data.TobinTaxes { - keeper.SetTobinTax(ctx, tt.Pair, tt.TobinTax) + if len(data.Pairs) > 0 { + for _, tt := range data.Pairs { + keeper.SetPair(ctx, tt.Name) } } else { for _, item := range data.Params.Whitelist { - keeper.SetTobinTax(ctx, item.Name, item.TobinTax) + keeper.SetPair(ctx, item.Name) } } @@ -117,9 +117,9 @@ func ExportGenesis(ctx sdk.Context, keeper keeper.Keeper) *types.GenesisState { return false }) - tobinTaxes := []types.TobinTax{} - keeper.IterateTobinTaxes(ctx, func(pair string, tobinTax sdk.Dec) (stop bool) { - tobinTaxes = append(tobinTaxes, types.TobinTax{Pair: pair, TobinTax: tobinTax}) + pairs := []types.Pair{} + keeper.IteratePairs(ctx, func(pair string) (stop bool) { + pairs = append(pairs, types.Pair{Name: pair}) return false }) @@ -129,5 +129,5 @@ func ExportGenesis(ctx sdk.Context, keeper keeper.Keeper) *types.GenesisState { missCounters, aggregateExchangeRatePrevotes, aggregateExchangeRateVotes, - tobinTaxes) + pairs) } diff --git a/x/oracle/genesis_test.go b/x/oracle/genesis_test.go index ed7c51039..30521aee6 100644 --- a/x/oracle/genesis_test.go +++ b/x/oracle/genesis_test.go @@ -19,8 +19,8 @@ func TestExportInitGenesis(t *testing.T) { input.OracleKeeper.SetExchangeRate(input.Ctx, "denom", sdk.NewDec(123)) input.OracleKeeper.SetAggregateExchangeRatePrevote(input.Ctx, keeper.ValAddrs[0], types.NewAggregateExchangeRatePrevote(types.AggregateVoteHash{123}, keeper.ValAddrs[0], uint64(2))) input.OracleKeeper.SetAggregateExchangeRateVote(input.Ctx, keeper.ValAddrs[0], types.NewAggregateExchangeRateVote(types.ExchangeRateTuples{{Pair: "foo", ExchangeRate: sdk.NewDec(123)}}, keeper.ValAddrs[0])) - input.OracleKeeper.SetTobinTax(input.Ctx, "denom", sdk.NewDecWithPrec(123, 3)) - input.OracleKeeper.SetTobinTax(input.Ctx, "denom2", sdk.NewDecWithPrec(123, 3)) + input.OracleKeeper.SetPair(input.Ctx, "pair1:pair1") + input.OracleKeeper.SetPair(input.Ctx, "pair2:pair2") input.OracleKeeper.SetMissCounter(input.Ctx, keeper.ValAddrs[0], 10) genesis := oracle.ExportGenesis(input.Ctx, input.OracleKeeper) diff --git a/x/oracle/keeper/ballot.go b/x/oracle/keeper/ballot.go index d2d977a75..88e24a38c 100644 --- a/x/oracle/keeper/ballot.go +++ b/x/oracle/keeper/ballot.go @@ -66,15 +66,19 @@ func (k Keeper) ClearBallots(ctx sdk.Context, votePeriod uint64) { }) } -// ApplyWhitelist update vote target pair list and set tobin tax with params whitelist -func (k Keeper) ApplyWhitelist(ctx sdk.Context, whitelist types.PairList, voteTargets map[string]sdk.Dec) { +// ApplyWhitelist updates the whitelist by detecting possible changes between +// the current vote targets and the current updated whitelist. +func (k Keeper) ApplyWhitelist(ctx sdk.Context, whitelist types.PairList, voteTargets map[string]struct{}) { // check is there any update in whitelist params updateRequired := false + // fast path if len(voteTargets) != len(whitelist) { updateRequired = true + // slow path, we need to check differences } else { - for _, item := range whitelist { - if tobinTax, ok := voteTargets[item.Name]; !ok || !tobinTax.Equal(item.TobinTax) { + for _, pair := range whitelist { + _, exists := voteTargets[pair.Name] + if !exists { updateRequired = true break } @@ -82,10 +86,9 @@ func (k Keeper) ApplyWhitelist(ctx sdk.Context, whitelist types.PairList, voteTa } if updateRequired { - k.ClearTobinTaxes(ctx) - - for _, item := range whitelist { - k.SetTobinTax(ctx, item.Name, item.TobinTax) + k.ClearPairs(ctx) + for _, pair := range whitelist { + k.SetPair(ctx, pair.Name) } } } diff --git a/x/oracle/keeper/ballot_test.go b/x/oracle/keeper/ballot_test.go index 5f4a33c54..982e95f0c 100644 --- a/x/oracle/keeper/ballot_test.go +++ b/x/oracle/keeper/ballot_test.go @@ -156,26 +156,70 @@ func TestClearBallots(t *testing.T) { func TestApplyWhitelist(t *testing.T) { input := CreateTestInput(t) - // no update - input.OracleKeeper.ApplyWhitelist(input.Ctx, types.PairList{ + whitelist := types.PairList{ types.Pair{ - Name: "nibi:usd", - TobinTax: sdk.OneDec(), + Name: "nibi:usd", }, types.Pair{ - Name: "btc:usd", - TobinTax: sdk.OneDec(), + Name: "btc:usd", }, - }, map[string]sdk.Dec{ - "nibi:usd": sdk.ZeroDec(), - "btc:usd": sdk.ZeroDec(), + } + + // prepare test by resetting the genesis pairs + input.OracleKeeper.ClearPairs(input.Ctx) + for _, p := range whitelist { + input.OracleKeeper.SetPair(input.Ctx, p.Name) + } + + voteTargets := map[string]struct{}{ + "nibi:usd": {}, + "btc:usd": {}, + } + // no updates case + input.OracleKeeper.ApplyWhitelist(input.Ctx, whitelist, voteTargets) + + gotPairs := types.PairList{} + + input.OracleKeeper.IteratePairs(input.Ctx, func(pair string) (stop bool) { + gotPairs = append(gotPairs, types.Pair{Name: pair}) + return false }) - price, err := input.OracleKeeper.GetTobinTax(input.Ctx, "nibi:usd") - require.NoError(t, err) - require.Equal(t, price, sdk.OneDec()) + sort.Slice(whitelist, func(i, j int) bool { + return whitelist[i].Name < whitelist[j].Name + }) + require.Equal(t, whitelist, gotPairs) - price, err = input.OracleKeeper.GetTobinTax(input.Ctx, "btc:usd") - require.NoError(t, err) - require.Equal(t, price, sdk.OneDec()) + // len update (fast path) + whitelist = append(whitelist, types.Pair{Name: "nibi:eth"}) + input.OracleKeeper.ApplyWhitelist(input.Ctx, whitelist, voteTargets) + + gotPairs = types.PairList{} + + input.OracleKeeper.IteratePairs(input.Ctx, func(pair string) (stop bool) { + gotPairs = append(gotPairs, types.Pair{Name: pair}) + return false + }) + + sort.Slice(whitelist, func(i, j int) bool { + return whitelist[i].Name < whitelist[j].Name + }) + require.Equal(t, whitelist, gotPairs) + + // diff update (slow path) + voteTargets["nibi:eth"] = struct{}{} // add previous pair + whitelist[0] = types.Pair{Name: "nibi:usdt"} // update first pair + input.OracleKeeper.ApplyWhitelist(input.Ctx, whitelist, voteTargets) + + gotPairs = types.PairList{} + + input.OracleKeeper.IteratePairs(input.Ctx, func(pair string) (stop bool) { + gotPairs = append(gotPairs, types.Pair{Name: pair}) + return false + }) + + sort.Slice(whitelist, func(i, j int) bool { + return whitelist[i].Name < whitelist[j].Name + }) + require.Equal(t, whitelist, gotPairs) } diff --git a/x/oracle/keeper/keeper.go b/x/oracle/keeper/keeper.go index 82bbe9d54..75a04de2b 100644 --- a/x/oracle/keeper/keeper.go +++ b/x/oracle/keeper/keeper.go @@ -292,50 +292,38 @@ func (k Keeper) IterateAggregateExchangeRateVotes(ctx sdk.Context, handler func( } } -// GetTobinTax return tobin tax for the pair +// PairExists return tobin tax for the pair // TODO(mercilex): use AssetPair -func (k Keeper) GetTobinTax(ctx sdk.Context, pair string) (sdk.Dec, error) { +func (k Keeper) PairExists(ctx sdk.Context, pair string) bool { store := ctx.KVStore(k.storeKey) - bz := store.Get(types.GetTobinTaxKey(pair)) - if bz == nil { - err := sdkerrors.Wrap(types.ErrNoTobinTax, pair) - return sdk.Dec{}, err - } - - tobinTax := sdk.DecProto{} - k.cdc.MustUnmarshal(bz, &tobinTax) - - return tobinTax.Dec, nil + bz := store.Get(types.GetPairKey(pair)) + return bz != nil } -// SetTobinTax updates tobin tax for the pair +// SetPair updates tobin tax for the pair // TODO(mercilex): use AssetPair -func (k Keeper) SetTobinTax(ctx sdk.Context, pair string, tobinTax sdk.Dec) { +func (k Keeper) SetPair(ctx sdk.Context, pair string) { store := ctx.KVStore(k.storeKey) - bz := k.cdc.MustMarshal(&sdk.DecProto{Dec: tobinTax}) - store.Set(types.GetTobinTaxKey(pair), bz) + store.Set(types.GetPairKey(pair), []byte{}) } -// IterateTobinTaxes iterates rate over tobin taxes in the store -func (k Keeper) IterateTobinTaxes(ctx sdk.Context, handler func(pair string, tobinTax sdk.Dec) (stop bool)) { +// IteratePairs iterates rate over tobin taxes in the store +func (k Keeper) IteratePairs(ctx sdk.Context, handler func(pair string) (stop bool)) { store := ctx.KVStore(k.storeKey) - iter := sdk.KVStorePrefixIterator(store, types.TobinTaxKey) + iter := sdk.KVStorePrefixIterator(store, types.PairsKey) defer iter.Close() for ; iter.Valid(); iter.Next() { - pair := types.ExtractPairFromTobinTaxKey(iter.Key()) - - var tobinTax sdk.DecProto - k.cdc.MustUnmarshal(iter.Value(), &tobinTax) - if handler(pair, tobinTax.Dec) { + pair := types.ExtractPairFromPairKey(iter.Key()) + if handler(pair) { break } } } -// ClearTobinTaxes clears tobin taxes -func (k Keeper) ClearTobinTaxes(ctx sdk.Context) { +// ClearPairs clears tobin taxes +func (k Keeper) ClearPairs(ctx sdk.Context) { store := ctx.KVStore(k.storeKey) - iter := sdk.KVStorePrefixIterator(store, types.TobinTaxKey) + iter := sdk.KVStorePrefixIterator(store, types.PairsKey) defer iter.Close() for ; iter.Valid(); iter.Next() { store.Delete(iter.Key()) diff --git a/x/oracle/keeper/keeper_test.go b/x/oracle/keeper/keeper_test.go index ccf1e0699..4161efa86 100644 --- a/x/oracle/keeper/keeper_test.go +++ b/x/oracle/keeper/keeper_test.go @@ -106,8 +106,8 @@ func TestParams(t *testing.T) { slashWindow := uint64(1000) minValidPerWindow := sdk.NewDecWithPrec(1, 4) whitelist := types.PairList{ - {Name: common.PairETHStable.String(), TobinTax: types.DefaultTobinTax}, - {Name: common.PairBTCStable.String(), TobinTax: types.DefaultTobinTax}, + {Name: common.PairETHStable.String()}, + {Name: common.PairBTCStable.String()}, } // Should really test validateParams, but skipping because obvious @@ -299,32 +299,31 @@ func TestAggregateVoteIterate(t *testing.T) { }) } -func TestTobinTaxGetSet(t *testing.T) { +func TestPairGetSetIterate(t *testing.T) { input := CreateTestInput(t) - tobinTaxes := map[string]sdk.Dec{ - common.PairBTCStable.String(): sdk.NewDec(1), - common.PairGovStable.String(): sdk.NewDecWithPrec(123, 3), - common.PairCollStable.String(): sdk.NewDecWithPrec(1423, 4), - common.PairETHStable.String(): sdk.NewDecWithPrec(15956, 5), + pairs := []string{ + common.PairBTCStable.String(), + common.PairGovStable.String(), + common.PairCollStable.String(), + common.PairETHStable.String(), } - for denom, tobinTax := range tobinTaxes { - input.OracleKeeper.SetTobinTax(input.Ctx, denom, tobinTax) - factor, err := input.OracleKeeper.GetTobinTax(input.Ctx, denom) - require.NoError(t, err) - require.Equal(t, tobinTaxes[denom], factor) + for _, pair := range pairs { + input.OracleKeeper.SetPair(input.Ctx, pair) + exists := input.OracleKeeper.PairExists(input.Ctx, pair) + require.True(t, exists) } - input.OracleKeeper.IterateTobinTaxes(input.Ctx, func(denom string, tobinTax sdk.Dec) (stop bool) { - require.Equal(t, tobinTaxes[denom], tobinTax) + input.OracleKeeper.IteratePairs(input.Ctx, func(pair string) (stop bool) { + require.Contains(t, pairs, pair) return false }) - input.OracleKeeper.ClearTobinTaxes(input.Ctx) - for denom := range tobinTaxes { - _, err := input.OracleKeeper.GetTobinTax(input.Ctx, denom) - require.Error(t, err) + input.OracleKeeper.ClearPairs(input.Ctx) + for _, pair := range pairs { + exists := input.OracleKeeper.PairExists(input.Ctx, pair) + require.False(t, exists) } } diff --git a/x/oracle/keeper/querier.go b/x/oracle/keeper/querier.go index 67fa267e9..dcf8303d8 100644 --- a/x/oracle/keeper/querier.go +++ b/x/oracle/keeper/querier.go @@ -68,41 +68,6 @@ func (q querier) ExchangeRates(c context.Context, _ *types.QueryExchangeRatesReq return &types.QueryExchangeRatesResponse{ExchangeRates: exchangeRates}, nil } -// TobinTax queries tobin tax of a pair -func (q querier) TobinTax(c context.Context, req *types.QueryTobinTaxRequest) (*types.QueryTobinTaxResponse, error) { - if req == nil { - return nil, status.Error(codes.InvalidArgument, "invalid request") - } - - if len(req.Pair) == 0 { - return nil, status.Error(codes.InvalidArgument, "empty pair") - } - - ctx := sdk.UnwrapSDKContext(c) - tobinTax, err := q.GetTobinTax(ctx, req.Pair) - if err != nil { - return nil, err - } - - return &types.QueryTobinTaxResponse{TobinTax: tobinTax}, nil -} - -// TobinTaxes queries tobin taxes of all pairs -func (q querier) TobinTaxes(c context.Context, _ *types.QueryTobinTaxesRequest) (*types.QueryTobinTaxesResponse, error) { - ctx := sdk.UnwrapSDKContext(c) - - var tobinTaxes types.PairList - q.IterateTobinTaxes(ctx, func(pair string, rate sdk.Dec) (stop bool) { - tobinTaxes = append(tobinTaxes, types.Pair{ - Name: pair, - TobinTax: rate, - }) - return false - }) - - return &types.QueryTobinTaxesResponse{TobinTaxes: tobinTaxes}, nil -} - // Actives queries all pairs for which exchange rates exist func (q querier) Actives(c context.Context, _ *types.QueryActivesRequest) (*types.QueryActivesResponse, error) { ctx := sdk.UnwrapSDKContext(c) diff --git a/x/oracle/keeper/querier_test.go b/x/oracle/keeper/querier_test.go index 844611443..b4ba3d6d3 100644 --- a/x/oracle/keeper/querier_test.go +++ b/x/oracle/keeper/querier_test.go @@ -235,59 +235,15 @@ func TestQueryVoteTargets(t *testing.T) { ctx := sdk.WrapSDKContext(input.Ctx) querier := NewQuerier(input.OracleKeeper) - // clear tobin taxes - input.OracleKeeper.ClearTobinTaxes(input.Ctx) + // clear pairs + input.OracleKeeper.ClearPairs(input.Ctx) voteTargets := []string{"denom", "denom2", "denom3"} for _, target := range voteTargets { - input.OracleKeeper.SetTobinTax(input.Ctx, target, sdk.OneDec()) + input.OracleKeeper.SetPair(input.Ctx, target) } res, err := querier.VoteTargets(ctx, &types.QueryVoteTargetsRequest{}) require.NoError(t, err) require.Equal(t, voteTargets, res.VoteTargets) } - -func TestQueryTobinTaxes(t *testing.T) { - input := CreateTestInput(t) - ctx := sdk.WrapSDKContext(input.Ctx) - querier := NewQuerier(input.OracleKeeper) - - // clear tobin taxes - input.OracleKeeper.ClearTobinTaxes(input.Ctx) - - tobinTaxes := types.PairList{{ - Name: common.PairBTCStable.String(), - TobinTax: sdk.OneDec(), - }, { - Name: common.PairETHStable.String(), - TobinTax: sdk.NewDecWithPrec(123, 2), - }} - for _, item := range tobinTaxes { - input.OracleKeeper.SetTobinTax(input.Ctx, item.Name, item.TobinTax) - } - - res, err := querier.TobinTaxes(ctx, &types.QueryTobinTaxesRequest{}) - require.NoError(t, err) - require.Equal(t, tobinTaxes, res.TobinTaxes) -} - -func TestQueryTobinTax(t *testing.T) { - input := CreateTestInput(t) - ctx := sdk.WrapSDKContext(input.Ctx) - querier := NewQuerier(input.OracleKeeper) - - denom := types.Pair{Name: common.PairBTCStable.String(), TobinTax: sdk.OneDec()} - input.OracleKeeper.SetTobinTax(input.Ctx, denom.Name, denom.TobinTax) - - // empty request - _, err := querier.TobinTax(ctx, nil) - require.Error(t, err) - - res, err := querier.TobinTax(ctx, &types.QueryTobinTaxRequest{ - Pair: common.PairBTCStable.String(), - }) - require.NoError(t, err) - - require.Equal(t, denom.TobinTax, res.TobinTax) -} diff --git a/x/oracle/keeper/reward.go b/x/oracle/keeper/reward.go index a4117a4b7..acacb95da 100644 --- a/x/oracle/keeper/reward.go +++ b/x/oracle/keeper/reward.go @@ -18,7 +18,7 @@ func (k Keeper) RewardBallotWinners( ctx sdk.Context, votePeriod int64, rewardDistributionWindow int64, - voteTargets map[string]sdk.Dec, + voteTargets map[string]struct{}, ballotWinners map[string]types.Claim, ) { rewardDenoms := make([]string, len(voteTargets)+1) diff --git a/x/oracle/keeper/reward_test.go b/x/oracle/keeper/reward_test.go index a71845ec7..62d4f88f8 100644 --- a/x/oracle/keeper/reward_test.go +++ b/x/oracle/keeper/reward_test.go @@ -44,7 +44,7 @@ func TestRewardBallotWinners(t *testing.T) { require.NoError(t, err) voteTargets := make(map[string]sdk.Dec) - input.OracleKeeper.IterateTobinTaxes(ctx, func(denom string, tobinTax sdk.Dec) bool { + input.OracleKeeper.IteratePairs(ctx, func(denom string, tobinTax sdk.Dec) bool { voteTargets[denom] = tobinTax return false }) diff --git a/x/oracle/keeper/test_utils.go b/x/oracle/keeper/test_utils.go index edeef016e..904dc4c71 100644 --- a/x/oracle/keeper/test_utils.go +++ b/x/oracle/keeper/test_utils.go @@ -238,7 +238,7 @@ func CreateTestInput(t *testing.T) TestInput { keeper.SetParams(ctx, defaults) for _, denom := range defaults.Whitelist { - keeper.SetTobinTax(ctx, denom.Name, denom.TobinTax) + keeper.SetPair(ctx, denom.Name) } return TestInput{ctx, legacyAmino, accountKeeper, bankKeeper, keeper, stakingKeeper, distrKeeper} diff --git a/x/oracle/keeper/vote_target.go b/x/oracle/keeper/vote_target.go index 96930ed80..6a977386e 100644 --- a/x/oracle/keeper/vote_target.go +++ b/x/oracle/keeper/vote_target.go @@ -4,13 +4,12 @@ import sdk "github.com/cosmos/cosmos-sdk/types" // IsVoteTarget returns existence of a pair in the voting target list func (k Keeper) IsVoteTarget(ctx sdk.Context, pair string) bool { - _, err := k.GetTobinTax(ctx, pair) - return err == nil + return k.PairExists(ctx, pair) } // GetVoteTargets returns the voting target list on current vote period func (k Keeper) GetVoteTargets(ctx sdk.Context) (voteTargets []string) { - k.IterateTobinTaxes(ctx, func(pair string, _ sdk.Dec) bool { + k.IteratePairs(ctx, func(pair string) bool { voteTargets = append(voteTargets, pair) return false }) diff --git a/x/oracle/keeper/vote_target_test.go b/x/oracle/keeper/vote_target_test.go index 252323c09..631e755a7 100644 --- a/x/oracle/keeper/vote_target_test.go +++ b/x/oracle/keeper/vote_target_test.go @@ -4,18 +4,16 @@ import ( "testing" "github.com/stretchr/testify/require" - - sdk "github.com/cosmos/cosmos-sdk/types" ) func TestKeeper_GetVoteTargets(t *testing.T) { input := CreateTestInput(t) - input.OracleKeeper.ClearTobinTaxes(input.Ctx) + input.OracleKeeper.ClearPairs(input.Ctx) expectedTargets := []string{"bar", "foo", "whoowhoo"} for _, target := range expectedTargets { - input.OracleKeeper.SetTobinTax(input.Ctx, target, sdk.OneDec()) + input.OracleKeeper.SetPair(input.Ctx, target) } targets := input.OracleKeeper.GetVoteTargets(input.Ctx) @@ -25,11 +23,11 @@ func TestKeeper_GetVoteTargets(t *testing.T) { func TestKeeper_IsVoteTarget(t *testing.T) { input := CreateTestInput(t) - input.OracleKeeper.ClearTobinTaxes(input.Ctx) + input.OracleKeeper.ClearPairs(input.Ctx) validTargets := []string{"bar", "foo", "whoowhoo"} for _, target := range validTargets { - input.OracleKeeper.SetTobinTax(input.Ctx, target, sdk.OneDec()) + input.OracleKeeper.SetPair(input.Ctx, target) require.True(t, input.OracleKeeper.IsVoteTarget(input.Ctx, target)) } } diff --git a/x/oracle/simulation/decoder.go b/x/oracle/simulation/decoder.go index b90d8bea7..29e12cb41 100644 --- a/x/oracle/simulation/decoder.go +++ b/x/oracle/simulation/decoder.go @@ -40,11 +40,8 @@ func NewDecodeStore(cdc codec.Codec) func(kvA, kvB kv.Pair) string { cdc.MustUnmarshal(kvA.Value, &voteA) cdc.MustUnmarshal(kvB.Value, &voteB) return fmt.Sprintf("%v\n%v", voteA, voteB) - case bytes.Equal(kvA.Key[:1], types.TobinTaxKey): - var tobinTaxA, tobinTaxB sdk.DecProto - cdc.MustUnmarshal(kvA.Value, &tobinTaxA) - cdc.MustUnmarshal(kvB.Value, &tobinTaxB) - return fmt.Sprintf("%v\n%v", tobinTaxA, tobinTaxB) + case bytes.Equal(kvA.Key[:1], types.PairsKey): + return fmt.Sprintf("%s\n%s", types.ExtractPairFromPairKey(kvA.Key), types.ExtractPairFromPairKey(kvB.Key)) default: panic(fmt.Sprintf("invalid oracle key prefix %X", kvA.Key[:1])) } diff --git a/x/oracle/simulation/decoder_test.go b/x/oracle/simulation/decoder_test.go index b6b8dc724..49e42f04b 100644 --- a/x/oracle/simulation/decoder_test.go +++ b/x/oracle/simulation/decoder_test.go @@ -34,11 +34,11 @@ func TestDecodeDistributionStore(t *testing.T) { aggregatePrevote := types.NewAggregateExchangeRatePrevote(types.AggregateVoteHash([]byte("12345")), valAddr, 123) aggregateVote := types.NewAggregateExchangeRateVote(types.ExchangeRateTuples{ - {Pair: common.DenomStable, ExchangeRate: sdk.NewDecWithPrec(1234, 1)}, - {Pair: common.DenomStable, ExchangeRate: sdk.NewDecWithPrec(4321, 1)}, + {Pair: common.PairGovStable.String(), ExchangeRate: sdk.NewDecWithPrec(1234, 1)}, + {Pair: common.PairETHStable.String(), ExchangeRate: sdk.NewDecWithPrec(4321, 1)}, }, valAddr) - tobinTax := sdk.NewDecWithPrec(2, 2) + pair := "btc:usd" kvPairs := kv.Pairs{ Pairs: []kv.Pair{ @@ -47,7 +47,7 @@ func TestDecodeDistributionStore(t *testing.T) { {Key: types.MissCounterKey, Value: cdc.MustMarshal(&gogotypes.UInt64Value{Value: missCounter})}, {Key: types.AggregateExchangeRatePrevoteKey, Value: cdc.MustMarshal(&aggregatePrevote)}, {Key: types.AggregateExchangeRateVoteKey, Value: cdc.MustMarshal(&aggregateVote)}, - {Key: types.TobinTaxKey, Value: cdc.MustMarshal(&sdk.DecProto{Dec: tobinTax})}, + {Key: types.GetPairKey(pair), Value: []byte{}}, {Key: []byte{0x99}, Value: []byte{0x99}}, }, } @@ -61,7 +61,7 @@ func TestDecodeDistributionStore(t *testing.T) { {"MissCounter", fmt.Sprintf("%v\n%v", missCounter, missCounter)}, {"AggregatePrevote", fmt.Sprintf("%v\n%v", aggregatePrevote, aggregatePrevote)}, {"AggregateVote", fmt.Sprintf("%v\n%v", aggregateVote, aggregateVote)}, - {"TobinTax", fmt.Sprintf("%v\n%v", tobinTax, tobinTax)}, + {"Pairs", fmt.Sprintf("%s\n%s", pair, pair)}, {"other", ""}, } diff --git a/x/oracle/simulation/genesis.go b/x/oracle/simulation/genesis.go index 0bd2a0f81..b50c89655 100644 --- a/x/oracle/simulation/genesis.go +++ b/x/oracle/simulation/genesis.go @@ -112,10 +112,11 @@ func RandomizedGenState(simState *module.SimulationState) { RewardBand: rewardBand, RewardDistributionWindow: rewardDistributionWindow, Whitelist: types.PairList{ - {Name: common.PairETHStable.String(), TobinTax: types.DefaultTobinTax}, - {Name: common.PairCollStable.String(), TobinTax: types.DefaultTobinTax}, - {Name: common.PairBTCStable.String(), TobinTax: types.DefaultTobinTax}, - {Name: common.PairGovStable.String(), TobinTax: sdk.NewDecWithPrec(2, 2)}}, + {Name: common.PairETHStable.String()}, + {Name: common.PairCollStable.String()}, + {Name: common.PairBTCStable.String()}, + {Name: common.PairGovStable.String()}, + }, SlashFraction: slashFraction, SlashWindow: slashWindow, MinValidPerWindow: minValidPerWindow, @@ -125,7 +126,7 @@ func RandomizedGenState(simState *module.SimulationState) { []types.MissCounter{}, []types.AggregateExchangeRatePrevote{}, []types.AggregateExchangeRateVote{}, - []types.TobinTax{}, + []types.Pair{}, ) bz, err := json.MarshalIndent(&oracleGenesis.Params, "", " ") diff --git a/x/oracle/spec/06_params.md b/x/oracle/spec/06_params.md index a95d3dbe5..00b02a854 100644 --- a/x/oracle/spec/06_params.md +++ b/x/oracle/spec/06_params.md @@ -13,7 +13,7 @@ The market module contains the following parameters: | votethreshold | string (dec) | "0.500000000000000000" | | rewardband | string (dec) | "0.020000000000000000" | | rewarddistributionwindow | string (int) | "5256000" | -| whitelist | []PairList | [{"name": "unibi:unusd", tobin_tax": "0.002000000000000000"}] | +| whitelist | []PairList | [{"name": "unibi:unusd"}] | | slashfraction | string (dec) | "0.001000000000000000" | | slashwindow | string (int) | "100800" | | minvalidperwindow | string (int) | "0.050000000000000000" | diff --git a/x/oracle/spec/README.md b/x/oracle/spec/README.md index 8f89a2faa..2d8b2f554 100644 --- a/x/oracle/spec/README.md +++ b/x/oracle/spec/README.md @@ -21,7 +21,7 @@ As price information is extrinsic to the blockchain, the Nibiru network relies o - [MissCounter](02_state.md#MissCounter) - [AggregateExchangeRatePrevote](02_state.md#AggregateExchangeRatePrevote) - [AggregateExchangeRateVote](02_state.md#AggregateExchangeRateVote) - - [TobinTax](02_state.md#TobinTax) + - [Pair](02_state.md#Pair) 3. **[EndBlock](03_end_block.md)** - [Tally Exchange Rate Votes](03_end_block.md#Tally-Exchange-Rate-Votes) 4. **[Messages](04_messages.md)** diff --git a/x/oracle/tally.go b/x/oracle/tally.go index 19be12db1..cbada8761 100644 --- a/x/oracle/tally.go +++ b/x/oracle/tally.go @@ -45,7 +45,7 @@ func ballotIsPassing(ballot types.ExchangeRateBallot, thresholdVotes sdk.Int) (s // PickReferencePair choose Reference pair with the highest voter turnout // If the voting power of the two denominations is the same, // select reference pair in alphabetical order. -func PickReferencePair(ctx sdk.Context, k keeper.Keeper, voteTargets map[string]sdk.Dec, voteMap map[string]types.ExchangeRateBallot) string { +func PickReferencePair(ctx sdk.Context, k keeper.Keeper, voteTargets map[string]struct{}, voteMap map[string]types.ExchangeRateBallot) string { largestBallotPower := int64(0) referencePair := "" diff --git a/x/oracle/tally_fuzz_test.go b/x/oracle/tally_fuzz_test.go index f33296c41..4fffb24d4 100644 --- a/x/oracle/tally_fuzz_test.go +++ b/x/oracle/tally_fuzz_test.go @@ -126,7 +126,7 @@ func TestFuzz_PickReferencePair(t *testing.T) { input, _ := setup(t) - voteTargets := map[string]sdk.Dec{} + voteTargets := map[string]struct{}{} f.Fuzz(&voteTargets) voteMap := map[string]types.ExchangeRateBallot{} diff --git a/x/oracle/types/errors.go b/x/oracle/types/errors.go index 0fa3fe99e..c3f866118 100644 --- a/x/oracle/types/errors.go +++ b/x/oracle/types/errors.go @@ -21,6 +21,5 @@ var ( ErrInvalidSaltLength = sdkerrors.Register(ModuleName, 10, "invalid salt length; should be 1~4") ErrNoAggregatePrevote = sdkerrors.Register(ModuleName, 11, "no aggregate prevote") ErrNoAggregateVote = sdkerrors.Register(ModuleName, 12, "no aggregate vote") - ErrNoTobinTax = sdkerrors.Register(ModuleName, 13, "no tobin tax") - ErrUnknownPair = sdkerrors.Register(ModuleName, 14, "unknown pair") + ErrUnknownPair = sdkerrors.Register(ModuleName, 13, "unknown pair") ) diff --git a/x/oracle/types/genesis.go b/x/oracle/types/genesis.go index c6b959033..baacaca8e 100644 --- a/x/oracle/types/genesis.go +++ b/x/oracle/types/genesis.go @@ -12,7 +12,7 @@ func NewGenesisState( feederDelegations []FeederDelegation, missCounters []MissCounter, aggregateExchangeRatePrevotes []AggregateExchangeRatePrevote, aggregateExchangeRateVotes []AggregateExchangeRateVote, - TobinTaxes []TobinTax, + pairs []Pair, ) *GenesisState { return &GenesisState{ Params: params, @@ -21,11 +21,11 @@ func NewGenesisState( MissCounters: missCounters, AggregateExchangeRatePrevotes: aggregateExchangeRatePrevotes, AggregateExchangeRateVotes: aggregateExchangeRateVotes, - TobinTaxes: TobinTaxes, + Pairs: pairs, } } -// DefaultGenesisState - default GenesisState used by columbus-2 +// DefaultGenesisState - default GenesisState func DefaultGenesisState() *GenesisState { return NewGenesisState(DefaultParams(), []ExchangeRateTuple{}, @@ -33,7 +33,7 @@ func DefaultGenesisState() *GenesisState { []MissCounter{}, []AggregateExchangeRatePrevote{}, []AggregateExchangeRateVote{}, - []TobinTax{}) + []Pair{}) } // ValidateGenesis validates the oracle genesis state diff --git a/x/oracle/types/genesis.pb.go b/x/oracle/types/genesis.pb.go index 874696aef..598491a71 100644 --- a/x/oracle/types/genesis.pb.go +++ b/x/oracle/types/genesis.pb.go @@ -6,7 +6,6 @@ package types import ( fmt "fmt" _ "github.com/cosmos/cosmos-sdk/types" - github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" io "io" @@ -33,7 +32,7 @@ type GenesisState struct { 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"` - TobinTaxes []TobinTax `protobuf:"bytes,7,rep,name=tobin_taxes,json=tobinTaxes,proto3" json:"tobin_taxes"` + Pairs []Pair `protobuf:"bytes,7,rep,name=pairs,proto3" json:"pairs"` } func (m *GenesisState) Reset() { *m = GenesisState{} } @@ -111,9 +110,9 @@ func (m *GenesisState) GetAggregateExchangeRateVotes() []AggregateExchangeRateVo return nil } -func (m *GenesisState) GetTobinTaxes() []TobinTax { +func (m *GenesisState) GetPairs() []Pair { if m != nil { - return m.TobinTaxes + return m.Pairs } return nil } @@ -227,100 +226,48 @@ func (m *MissCounter) GetMissCounter() uint64 { return 0 } -// TobinTax defines a pair and tobin_tax pair used in -// oracle module's genesis state -type TobinTax struct { - Pair string `protobuf:"bytes,1,opt,name=pair,proto3" json:"pair,omitempty"` - TobinTax github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,2,opt,name=tobin_tax,json=tobinTax,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"tobin_tax"` -} - -func (m *TobinTax) Reset() { *m = TobinTax{} } -func (m *TobinTax) String() string { return proto.CompactTextString(m) } -func (*TobinTax) ProtoMessage() {} -func (*TobinTax) Descriptor() ([]byte, []int) { - return fileDescriptor_6d8ee91da7d45482, []int{3} -} -func (m *TobinTax) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *TobinTax) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_TobinTax.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *TobinTax) XXX_Merge(src proto.Message) { - xxx_messageInfo_TobinTax.Merge(m, src) -} -func (m *TobinTax) XXX_Size() int { - return m.Size() -} -func (m *TobinTax) XXX_DiscardUnknown() { - xxx_messageInfo_TobinTax.DiscardUnknown(m) -} - -var xxx_messageInfo_TobinTax proto.InternalMessageInfo - -func (m *TobinTax) GetPair() string { - if m != nil { - return m.Pair - } - return "" -} - func init() { proto.RegisterType((*GenesisState)(nil), "nibiru.oracle.v1beta1.GenesisState") proto.RegisterType((*FeederDelegation)(nil), "nibiru.oracle.v1beta1.FeederDelegation") proto.RegisterType((*MissCounter)(nil), "nibiru.oracle.v1beta1.MissCounter") - proto.RegisterType((*TobinTax)(nil), "nibiru.oracle.v1beta1.TobinTax") } func init() { proto.RegisterFile("oracle/v1beta1/genesis.proto", fileDescriptor_6d8ee91da7d45482) } var fileDescriptor_6d8ee91da7d45482 = []byte{ - // 569 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x94, 0xc1, 0x6e, 0xd3, 0x40, - 0x10, 0x86, 0xe3, 0x36, 0x2d, 0xed, 0xa6, 0xad, 0xda, 0x15, 0x48, 0x51, 0xa0, 0x4e, 0x89, 0x04, - 0x54, 0x02, 0x6c, 0xda, 0x1e, 0x39, 0x35, 0x2d, 0xe5, 0x80, 0x8a, 0x2a, 0x53, 0x71, 0x40, 0x20, - 0x6b, 0x6d, 0x4f, 0xdd, 0x55, 0x13, 0xaf, 0xe5, 0xd9, 0x54, 0xe9, 0x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fa, 0x38, 0x61, 0xe0, 0xd6, 0x27, 0x52, 0x2b, 0x5c, - 0xe9, 0xec, 0x5a, 0x6b, 0x76, 0x2d, 0x7d, 0x48, 0x56, 0x8a, 0xab, 0xa3, 0x3c, 0xaa, 0x5e, 0xad, - 0xb0, 0x0f, 0xad, 0x0b, 0xb2, 0x34, 0x1a, 0x92, 0x52, 0x52, 0x4d, 0x19, 0xcf, 0x8c, 0x9c, 0x7a, - 0xa6, 0x6f, 0xc8, 0xf2, 0xf8, 0xb8, 0x74, 0x8f, 0x6d, 0x27, 0x3f, 0x8b, 0x1f, 0xb7, 0xcd, 0xc7, - 0x31, 0x97, 0xe7, 0xbd, 0xc0, 0x09, 0x45, 0xd7, 0x35, 0x2f, 0xb7, 0xfe, 0x79, 0x8e, 0xd1, 0x85, - 0x2b, 0xaf, 0x52, 0x40, 0xe7, 0x10, 0x42, 0x6f, 0x69, 0x74, 0x6a, 0xed, 0xa3, 0xeb, 0x81, 0x6d, - 0xdd, 0x0c, 0x6c, 0xeb, 0xd7, 0xc0, 0xb6, 0xbe, 0x0c, 0xed, 0xca, 0xcd, 0xd0, 0xae, 0x7c, 0x1f, - 0xda, 0x95, 0x0f, 0xcf, 0x0a, 0x5a, 0x6f, 0xd5, 0x55, 0x1c, 0x9c, 0x33, 0x9e, 0xb8, 0xfa, 0x5a, - 0xdc, 0xbe, 0xf9, 0x96, 0x68, 0xd5, 0x60, 0x51, 0x7d, 0x32, 0xf6, 0x7e, 0x07, 0x00, 0x00, 0xff, - 0xff, 0x7c, 0x61, 0x66, 0xd3, 0xbc, 0x04, 0x00, 0x00, + // 509 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x93, 0xc1, 0x6e, 0xd3, 0x40, + 0x10, 0x86, 0xe3, 0x36, 0x09, 0x62, 0x93, 0x54, 0xed, 0x0a, 0xa4, 0x28, 0x25, 0x6e, 0x88, 0x84, + 0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 0x27, + 0x64, 0x67, 0xca, 0xc6, 0x3c, 0x64, 0x4a, 0x2c, 0xc9, 0x0d, 0x4d, 0x6e, 0xdf, 0x24, 0x2c, 0xdc, + 0xfe, 0x44, 0x2a, 0x99, 0x7f, 0xb8, 0x5e, 0xeb, 0xac, 0xd7, 0xd2, 0x87, 0xa4, 0x9a, 0xbd, 0x15, + 0xed, 0x51, 0xec, 0x55, 0x32, 0x07, 0xd0, 0x3d, 0xb9, 0x9c, 0xb9, 0xce, 0xd5, 0xcc, 0x75, 0x7e, + 0xcf, 0x5c, 0xe7, 0xeb, 0xdc, 0x2d, 0x5c, 0xcd, 0xdd, 0xc2, 0x8f, 0xb9, 0x5b, 0xf8, 0xf0, 0x34, + 0xe2, 0x6a, 0x34, 0x19, 0x78, 0x81, 0x88, 0xfd, 0x37, 0x7a, 0x29, 0xc7, 0x23, 0xc6, 0x13, 0xdf, + 0x2c, 0xc8, 0x3f, 0xb7, 0xef, 0xd9, 0x57, 0x17, 0x29, 0xe0, 0xa0, 0xac, 0x9f, 0xed, 0xe1, 0x9f, + 0x00, 0x00, 0x00, 0xff, 0xff, 0xe0, 0x3d, 0x9d, 0x94, 0x40, 0x04, 0x00, 0x00, } func (m *GenesisState) Marshal() (dAtA []byte, err error) { @@ -343,10 +290,10 @@ func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if len(m.TobinTaxes) > 0 { - for iNdEx := len(m.TobinTaxes) - 1; iNdEx >= 0; iNdEx-- { + if len(m.Pairs) > 0 { + for iNdEx := len(m.Pairs) - 1; iNdEx >= 0; iNdEx-- { { - size, err := m.TobinTaxes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + size, err := m.Pairs[iNdEx].MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -512,46 +459,6 @@ func (m *MissCounter) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *TobinTax) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *TobinTax) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *TobinTax) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size := m.TobinTax.Size() - i -= size - if _, err := m.TobinTax.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintGenesis(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - if len(m.Pair) > 0 { - i -= len(m.Pair) - copy(dAtA[i:], m.Pair) - i = encodeVarintGenesis(dAtA, i, uint64(len(m.Pair))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - func encodeVarintGenesis(dAtA []byte, offset int, v uint64) int { offset -= sovGenesis(v) base := offset @@ -601,8 +508,8 @@ func (m *GenesisState) Size() (n int) { n += 1 + l + sovGenesis(uint64(l)) } } - if len(m.TobinTaxes) > 0 { - for _, e := range m.TobinTaxes { + if len(m.Pairs) > 0 { + for _, e := range m.Pairs { l = e.Size() n += 1 + l + sovGenesis(uint64(l)) } @@ -643,21 +550,6 @@ func (m *MissCounter) Size() (n int) { return n } -func (m *TobinTax) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Pair) - if l > 0 { - n += 1 + l + sovGenesis(uint64(l)) - } - l = m.TobinTax.Size() - n += 1 + l + sovGenesis(uint64(l)) - return n -} - func sovGenesis(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -898,7 +790,7 @@ func (m *GenesisState) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 7: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TobinTaxes", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Pairs", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -925,8 +817,8 @@ func (m *GenesisState) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.TobinTaxes = append(m.TobinTaxes, TobinTax{}) - if err := m.TobinTaxes[len(m.TobinTaxes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.Pairs = append(m.Pairs, Pair{}) + if err := m.Pairs[len(m.Pairs)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -1166,122 +1058,6 @@ func (m *MissCounter) Unmarshal(dAtA []byte) error { } return nil } -func (m *TobinTax) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: TobinTax: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: TobinTax: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Pair", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - 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 ErrInvalidLengthGenesis - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenesis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Pair = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TobinTax", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - 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 ErrInvalidLengthGenesis - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenesis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.TobinTax.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenesis(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenesis - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} func skipGenesis(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/x/oracle/types/keys.go b/x/oracle/types/keys.go index 6094646f1..2e037ce34 100644 --- a/x/oracle/types/keys.go +++ b/x/oracle/types/keys.go @@ -38,9 +38,9 @@ var ( ExchangeRateKey = []byte{0x01} // prefix for each key to a rate FeederDelegationKey = []byte{0x02} // prefix for each key to a feeder delegation MissCounterKey = []byte{0x03} // prefix for each key to a miss counter - AggregateExchangeRatePrevoteKey = []byte{0x04} // prefix for each key to a aggregate prevote - AggregateExchangeRateVoteKey = []byte{0x05} // prefix for each key to a aggregate vote - TobinTaxKey = []byte{0x06} // prefix for each key to a tobin tax + AggregateExchangeRatePrevoteKey = []byte{0x04} // prefix for each key to an aggregate prevote + AggregateExchangeRateVoteKey = []byte{0x05} // prefix for each key to an aggregate vote + PairsKey = []byte{0x06} // prefix for each key to a pair ) // GetExchangeRateKey - stored by *pair* @@ -68,13 +68,13 @@ func GetAggregateExchangeRateVoteKey(v sdk.ValAddress) []byte { return append(AggregateExchangeRateVoteKey, address.MustLengthPrefix(v)...) } -// GetTobinTaxKey - stored by *pair* bytes -func GetTobinTaxKey(d string) []byte { - return append(TobinTaxKey, append([]byte(d), 0x00)...) +// GetPairKey - stored by *pair* bytes +func GetPairKey(d string) []byte { + return append(PairsKey, append([]byte(d), 0x00)...) } -// ExtractPairFromTobinTaxKey - split pair from the tobin tax key -func ExtractPairFromTobinTaxKey(key []byte) (pair string) { +// ExtractPairFromPairKey - split pair from the pair key +func ExtractPairFromPairKey(key []byte) (pair string) { pair = string(key[1 : len(key)-1]) return } diff --git a/x/oracle/types/oracle.pb.go b/x/oracle/types/oracle.pb.go index 6a3b1f6d0..4def9f4f2 100644 --- a/x/oracle/types/oracle.pb.go +++ b/x/oracle/types/oracle.pb.go @@ -99,8 +99,7 @@ func (m *Params) GetSlashWindow() uint64 { // Pair is the object that holds configuration of each pair. type Pair struct { - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty" yaml:"name"` - TobinTax github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,2,opt,name=tobin_tax,json=tobinTax,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"tobin_tax" yaml:"tobin_tax"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty" yaml:"name"` } func (m *Pair) Reset() { *m = Pair{} } @@ -264,55 +263,53 @@ func init() { func init() { proto.RegisterFile("oracle/v1beta1/oracle.proto", fileDescriptor_2784fd4b0e83b02f) } var fileDescriptor_2784fd4b0e83b02f = []byte{ - // 763 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x55, 0x31, 0x6f, 0xdb, 0x46, - 0x14, 0x16, 0x6b, 0x59, 0x95, 0x4f, 0x72, 0x6b, 0xb3, 0x72, 0xcb, 0xda, 0x85, 0xe8, 0x5e, 0x5b, - 0x43, 0x43, 0x2b, 0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, 0x33, 0x4b, 0xef, 0x32, 0x73, 0xab, - 0x47, 0x78, 0x38, 0xf0, 0xda, 0x3e, 0x8d, 0x2d, 0x25, 0x27, 0xff, 0xf9, 0x27, 0x0d, 0x0e, 0x2c, - 0x7e, 0xd4, 0xc7, 0x69, 0x7b, 0x07, 0xfb, 0xe3, 0xcc, 0x5c, 0x2b, 0x74, 0xba, 0x64, 0x83, 0xce, - 0xb2, 0x48, 0xec, 0x5d, 0xc4, 0x3a, 0x06, 0x35, 0x86, 0x87, 0x88, 0x05, 0xae, 0x87, 0x92, 0xc0, - 0x58, 0x90, 0xcd, 0x76, 0xe6, 0x6e, 0xa6, 0xae, 0x55, 0xa0, 0x82, 0x0e, 0xc8, 0x23, 0x1b, 0x25, - 0x81, 0xee, 0x83, 0x75, 0x85, 0x05, 0x24, 0xe5, 0x8c, 0x78, 0x03, 0x4e, 0x68, 0xe2, 0x0e, 0x49, - 0x12, 0xd0, 0xa1, 0x51, 0x96, 0xe3, 0xf9, 0x6b, 0x9c, 0x99, 0xbf, 0x4f, 0xf0, 0xcc, 0xa8, 0x85, - 0x8e, 0x91, 0x83, 0x3b, 0x05, 0xec, 0x81, 0x84, 0x74, 0x17, 0x2c, 0x0d, 0x43, 0xc2, 0x71, 0x44, - 0x52, 0x6e, 0x2c, 0x6e, 0x2e, 0xb4, 0x6a, 0xff, 0x6e, 0xb4, 0x67, 0x1a, 0xdc, 0xee, 0x22, 0xc2, - 0xec, 0x3f, 0xc5, 0x35, 0xc7, 0x99, 0xb9, 0x92, 0x37, 0xbd, 0x3c, 0x0b, 0x5f, 0xbd, 0x37, 0xab, - 0xa2, 0xe2, 0x2e, 0x49, 0xb9, 0x73, 0xc5, 0x29, 0xcc, 0x49, 0x23, 0x94, 0x86, 0xee, 0x23, 0x86, - 0x7c, 0xd1, 0xd8, 0xa8, 0x7c, 0x9b, 0x39, 0x93, 0x6c, 0xd0, 0x59, 0x96, 0x89, 0x5d, 0x15, 0xeb, - 0x1d, 0x50, 0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xe1, 0xae, 0x17, 0x51, 0xff, 0x40, 0xae, 0xdb, - 0xa4, 0xa1, 0x05, 0x54, 0x18, 0x2a, 0x43, 0x5b, 0x44, 0xd7, 0x74, 0x7f, 0xd2, 0xc0, 0xaf, 0x33, - 0x75, 0xef, 0x0b, 0xd1, 0xcf, 0x35, 0xd0, 0xc0, 0x2a, 0xe9, 0x32, 0x24, 0xfe, 0x01, 0x06, 0xfd, - 0x08, 0xa7, 0x86, 0x26, 0xb7, 0xa2, 0xf5, 0x85, 0xad, 0x28, 0xf2, 0xec, 0x89, 0x03, 0xf6, 0x0d, - 0xb5, 0x22, 0xca, 0xfd, 0x59, 0x9c, 0x62, 0x5b, 0xf4, 0xa9, 0x93, 0xa9, 0xa3, 0xe3, 0xa9, 0xdc, - 0xd7, 0xce, 0xe9, 0xda, 0x5d, 0x5f, 0x6b, 0x60, 0x75, 0xaa, 0x81, 0x30, 0xa6, 0x8f, 0x08, 0x9b, - 0x36, 0x46, 0x64, 0xa1, 0x23, 0x41, 0xfd, 0x00, 0x2c, 0x4f, 0x68, 0x56, 0x8d, 0x77, 0xe7, 0x7e, - 0xa3, 0x1a, 0x33, 0x06, 0x00, 0x9d, 0x7a, 0xf1, 0x8e, 0x93, 0xaa, 0xed, 0xdd, 0x93, 0xb3, 0xa6, - 0x76, 0x7a, 0xd6, 0xd4, 0x3e, 0x9c, 0x35, 0xb5, 0xa7, 0xe7, 0xcd, 0xd2, 0xe9, 0x79, 0xb3, 0xf4, - 0xf6, 0xbc, 0x59, 0x7a, 0xf8, 0x77, 0xa1, 0xeb, 0x7d, 0x69, 0xc4, 0xad, 0x10, 0x91, 0xc4, 0xca, - 0x4d, 0xb1, 0x46, 0xea, 0x13, 0x95, 0xf7, 0xf7, 0x2a, 0xf2, 0xe3, 0xf2, 0xdf, 0xe7, 0x00, 0x00, - 0x00, 0xff, 0xff, 0x16, 0xe3, 0xae, 0xaa, 0xc8, 0x06, 0x00, 0x00, + // 734 bytes of a gzipped FileDescriptor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53, 0xdf, 0x47, 0x71, 0xd4, 0x86, 0x05, 0x10, 0x3a, 0x40, + 0x44, 0x1d, 0x19, 0xe8, 0x09, 0xf8, 0x47, 0x62, 0x69, 0xc8, 0x30, 0x0f, 0x69, 0x14, 0x18, 0x7f, + 0xad, 0x68, 0xcd, 0x59, 0xfb, 0xf1, 0x61, 0x66, 0x96, 0xbe, 0x64, 0xe6, 0x6a, 0x97, 0xa4, 0x61, + 0xdf, 0x6b, 0xf9, 0x34, 0xb6, 0x54, 0x3b, 0xf9, 0xc7, 0x1d, 0x1e, 0xec, 0x58, 0xe9, 0x7e, 0x0f, + 0xf3, 0xd6, 0x06, 0xf6, 0x87, 0x99, 0xb9, 0x58, 0x50, 0x3a, 0x63, 0x83, 0xce, 0x9c, 0x48, 0x6c, + 0x9d, 0xc6, 0x3a, 0x06, 0x55, 0x86, 0x07, 0x88, 0x05, 0xae, 0x87, 0x92, 0xc0, 0x98, 0x92, 0x62, + 0x1b, 0x97, 0x16, 0x53, 0xd7, 0x2a, 0x50, 0x41, 0x07, 0xe4, 0x91, 0x8d, 0x92, 0x40, 0xf7, 0xc1, + 0x92, 0xc2, 0x02, 0xc2, 0x53, 0x46, 0xbc, 0x7e, 0x4a, 0x68, 0xe2, 0x0e, 0x48, 0x12, 0xd0, 0x81, + 0x51, 0x96, 0xf6, 0xdc, 0x1a, 0x66, 0xe6, 0xf5, 0x11, 0x9e, 0x09, 0xb5, 0xd0, 0x31, 0x72, 0x70, + 0xa3, 0x80, 0x3d, 0x97, 0x90, 0xee, 0x82, 0xd9, 0x41, 0x48, 0x52, 0x1c, 0x11, 0x9e, 0x1a, 0xd3, + 0x2b, 0x53, 0xcd, 0xea, 0xdd, 0xe5, 0xd6, 0xc4, 0x01, 0xb7, 0x3a, 0x88, 0x30, 0xfb, 0xa6, 0xb8, + 0xe6, 0x30, 0x33, 0xe7, 0x73, 0xd1, 0xb3, 0xb3, 0xf0, 0xc3, 0x57, 0x73, 0x46, 0x54, 0x3c, 0x21, + 0x3c, 0x75, 0xce, 0x39, 0xc5, 0x70, 0x78, 0x84, 0x78, 0xe8, 0xbe, 0x64, 0xc8, 0x17, 0xc2, 0x46, + 0xe5, 0xcf, 0x86, 0x33, 0xca, 0x06, 0x9d, 0x39, 0x99, 0xd8, 0x54, 0xb1, 0xde, 0x06, 0xb5, 0xbc, + 0x42, 0xf9, 0xf4, 0xb7, 0xf4, 0xe9, 0xca, 0x30, 0x33, 0xff, 0x2b, 0x9e, 0x3f, 0x75, 0xa6, 0x2a, + 0x43, 0x65, 0xc6, 0x2b, 0x50, 0x8f, 0x49, 0xe2, 0xee, 0xa2, 0x88, 0x04, 0x62, 0xd3, 0x4e, 0x39, + 0x66, 0x64, 0xc7, 0x4f, 0x2f, 0xdd, 0xf1, 0x72, 0xae, 0x38, 0x89, 0x13, 0x3a, 0x0b, 0x31, 0x49, + 0xb6, 0x45, 0xb6, 0x83, 0x59, 0xae, 0xdf, 0x9e, 0x79, 0x7f, 0x60, 0x96, 0xbe, 0x1f, 0x98, 0x1a, + 0x5c, 0x07, 0x65, 0x61, 0xa6, 0x7e, 0x03, 0x94, 0x13, 0x14, 0x63, 0xf9, 0x18, 0x66, 0xed, 0x7f, + 0x87, 0x99, 0x59, 0xcd, 0x39, 0x45, 0x16, 0x3a, 0x12, 0x6c, 0xd7, 0x5e, 0x1f, 0x98, 0x25, 0x75, + 0xb4, 0x04, 0x3f, 0x69, 0xe0, 0xda, 0x83, 0x6e, 0x97, 0xe1, 0x2e, 0x4a, 0xf1, 0xa3, 0x3d, 0x3f, + 0x44, 0x49, 0x17, 0x3b, 0x28, 0xc5, 0x1d, 0x86, 0xc5, 0x1e, 0x0b, 0xce, 0x10, 0xf1, 0x70, 0x9c, + 0x53, 0x64, 0xa1, 0x23, 0x41, 0x7d, 0x15, 0x4c, 0x8b, 0x62, 0xa6, 0x9e, 0xd2, 0xfc, 0x30, 0x33, + 0x6b, 0xe7, 0x8f, 0x83, 0x41, 0x27, 0x87, 0xa5, 0x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func (this *Params) Equal(that interface{}) bool { @@ -477,16 +474,6 @@ func (m *Pair) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - { - size := m.TobinTax.Size() - i -= size - if _, err := m.TobinTax.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintOracle(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 if len(m.Name) > 0 { i -= len(m.Name) copy(dAtA[i:], m.Name) @@ -676,8 +663,6 @@ func (m *Pair) Size() (n int) { if l > 0 { n += 1 + l + sovOracle(uint64(l)) } - l = m.TobinTax.Size() - n += 1 + l + sovOracle(uint64(l)) return n } @@ -1079,40 +1064,6 @@ func (m *Pair) Unmarshal(dAtA []byte) error { } m.Name = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TobinTax", 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 - } - if err := m.TobinTax.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipOracle(dAtA[iNdEx:]) diff --git a/x/oracle/types/pair_list.go b/x/oracle/types/pair_list.go index 7b7a26f4f..24e1ef816 100644 --- a/x/oracle/types/pair_list.go +++ b/x/oracle/types/pair_list.go @@ -14,7 +14,7 @@ func (m Pair) String() string { // Equal implements equal interface func (m Pair) Equal(pair *Pair) bool { - return m.Name == pair.Name && m.TobinTax.Equal(pair.TobinTax) + return m.Name == pair.Name } // PairList is array of Pair diff --git a/x/oracle/types/params.go b/x/oracle/types/params.go index 6a4be1271..6f85d0f82 100644 --- a/x/oracle/types/params.go +++ b/x/oracle/types/params.go @@ -38,23 +38,18 @@ const ( var ( DefaultVoteThreshold = sdk.NewDecWithPrec(50, 2) // 50% DefaultRewardBand = sdk.NewDecWithPrec(2, 2) // 2% (-1, 1) - DefaultTobinTax = sdk.NewDecWithPrec(25, 4) // 0.25% DefaultWhitelist = PairList{ { - Name: common.PairBTCStable.String(), - TobinTax: DefaultTobinTax, + Name: common.PairBTCStable.String(), }, { - Name: common.PairCollStable.String(), - TobinTax: DefaultTobinTax, + Name: common.PairCollStable.String(), }, { - Name: common.PairETHStable.String(), - TobinTax: DefaultTobinTax, + Name: common.PairETHStable.String(), }, { - Name: common.PairGovStable.String(), - TobinTax: DefaultTobinTax, + Name: common.PairGovStable.String(), }, } DefaultSlashFraction = sdk.NewDecWithPrec(1, 4) // 0.01% @@ -133,11 +128,8 @@ func (p Params) Validate() error { } for _, pair := range p.Whitelist { - if pair.TobinTax.GT(sdk.OneDec()) || pair.TobinTax.IsNegative() { - return fmt.Errorf("oracle parameter Whitelist Pair must have TobinTax between [0, 1]") - } - if len(pair.Name) == 0 { - return fmt.Errorf("oracle parameter Whitelist Pair must have name") + if _, err := common.NewAssetPair(pair.Name); err != nil { + return fmt.Errorf("oracle parameter Whitelist Pair invalid format: %w", err) } } return nil @@ -210,11 +202,8 @@ func validateWhitelist(i interface{}) error { } for _, d := range v { - if d.TobinTax.GT(sdk.OneDec()) || d.TobinTax.IsNegative() { - return fmt.Errorf("oracle parameter Whitelist Pair must have TobinTax between [0, 1]") - } - if len(d.Name) == 0 { - return fmt.Errorf("oracle parameter Whitelist Pair must have name") + if _, err := common.NewAssetPair(d.Name); err != nil { + return fmt.Errorf("oracle parameter Whitelist Pair invalid format: %w", err) } } diff --git a/x/oracle/types/params_test.go b/x/oracle/types/params_test.go index 8f72daf0f..406c31387 100644 --- a/x/oracle/types/params_test.go +++ b/x/oracle/types/params_test.go @@ -57,18 +57,6 @@ func TestParamsEqual(t *testing.T) { err = p7.Validate() require.Error(t, err) - // non-positive tobin tax - p8 := types.DefaultParams() - p8.Whitelist[0].Name = "" - err = p8.Validate() - require.Error(t, err) - - // invalid name tobin tax - p9 := types.DefaultParams() - p9.Whitelist[0].TobinTax = sdk.NewDec(-1) - err = p9.Validate() - require.Error(t, err) - // empty name p10 := types.DefaultParams() p10.Whitelist[0].Name = "" @@ -106,27 +94,13 @@ func TestValidate(t *testing.T) { case bytes.Equal(types.KeyWhitelist, pair.Key): require.NoError(t, pair.ValidatorFn(types.PairList{ { - Name: "BTC:USDT", - TobinTax: sdk.NewDecWithPrec(10, 2), + Name: "BTC:USDT", }, })) require.Error(t, pair.ValidatorFn("invalid")) require.Error(t, pair.ValidatorFn(types.PairList{ { - Name: "", - TobinTax: sdk.NewDecWithPrec(10, 2), - }, - })) - require.Error(t, pair.ValidatorFn(types.PairList{ - { - Name: "BTC:USD", - TobinTax: sdk.NewDecWithPrec(101, 2), - }, - })) - require.Error(t, pair.ValidatorFn(types.PairList{ - { - Name: "BTC:BTC", - TobinTax: sdk.NewDecWithPrec(-1, 2), + Name: "", }, })) } diff --git a/x/oracle/types/query.pb.go b/x/oracle/types/query.pb.go index 2f249e698..e1ee9f576 100644 --- a/x/oracle/types/query.pb.go +++ b/x/oracle/types/query.pb.go @@ -194,169 +194,6 @@ func (m *QueryExchangeRatesResponse) GetExchangeRates() ExchangeRateTuples { return nil } -// QueryTobinTaxRequest is the request type for the Query/TobinTax RPC method. -type QueryTobinTaxRequest struct { - // pair defines the asset to query for. - Pair string `protobuf:"bytes,1,opt,name=pair,proto3" json:"pair,omitempty"` -} - -func (m *QueryTobinTaxRequest) Reset() { *m = QueryTobinTaxRequest{} } -func (m *QueryTobinTaxRequest) String() string { return proto.CompactTextString(m) } -func (*QueryTobinTaxRequest) ProtoMessage() {} -func (*QueryTobinTaxRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_812803c014dfa45a, []int{4} -} -func (m *QueryTobinTaxRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryTobinTaxRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryTobinTaxRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *QueryTobinTaxRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryTobinTaxRequest.Merge(m, src) -} -func (m *QueryTobinTaxRequest) XXX_Size() int { - return m.Size() -} -func (m *QueryTobinTaxRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueryTobinTaxRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryTobinTaxRequest proto.InternalMessageInfo - -// QueryTobinTaxResponse is response type for the -// Query/TobinTax RPC method. -type QueryTobinTaxResponse struct { - // tobin_taxe defines the tobin tax of a pair - TobinTax github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,1,opt,name=tobin_tax,json=tobinTax,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"tobin_tax"` -} - -func (m *QueryTobinTaxResponse) Reset() { *m = QueryTobinTaxResponse{} } -func (m *QueryTobinTaxResponse) String() string { return proto.CompactTextString(m) } -func (*QueryTobinTaxResponse) ProtoMessage() {} -func (*QueryTobinTaxResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_812803c014dfa45a, []int{5} -} -func (m *QueryTobinTaxResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryTobinTaxResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryTobinTaxResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *QueryTobinTaxResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryTobinTaxResponse.Merge(m, src) -} -func (m *QueryTobinTaxResponse) XXX_Size() int { - return m.Size() -} -func (m *QueryTobinTaxResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryTobinTaxResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryTobinTaxResponse proto.InternalMessageInfo - -// QueryTobinTaxesRequest is the request type for the Query/TobinTaxes RPC method. -type QueryTobinTaxesRequest struct { -} - -func (m *QueryTobinTaxesRequest) Reset() { *m = QueryTobinTaxesRequest{} } -func (m *QueryTobinTaxesRequest) String() string { return proto.CompactTextString(m) } -func (*QueryTobinTaxesRequest) ProtoMessage() {} -func (*QueryTobinTaxesRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_812803c014dfa45a, []int{6} -} -func (m *QueryTobinTaxesRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryTobinTaxesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryTobinTaxesRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *QueryTobinTaxesRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryTobinTaxesRequest.Merge(m, src) -} -func (m *QueryTobinTaxesRequest) XXX_Size() int { - return m.Size() -} -func (m *QueryTobinTaxesRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueryTobinTaxesRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryTobinTaxesRequest proto.InternalMessageInfo - -// QueryTobinTaxesResponse is response type for the -// Query/TobinTaxes RPC method. -type QueryTobinTaxesResponse struct { - // tobin_taxes defines a list of the tobin tax of all whitelisted pairs - TobinTaxes PairList `protobuf:"bytes,1,rep,name=tobin_taxes,json=tobinTaxes,proto3,castrepeated=PairList" json:"tobin_taxes" yaml:"tobin_taxes"` -} - -func (m *QueryTobinTaxesResponse) Reset() { *m = QueryTobinTaxesResponse{} } -func (m *QueryTobinTaxesResponse) String() string { return proto.CompactTextString(m) } -func (*QueryTobinTaxesResponse) ProtoMessage() {} -func (*QueryTobinTaxesResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_812803c014dfa45a, []int{7} -} -func (m *QueryTobinTaxesResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryTobinTaxesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryTobinTaxesResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *QueryTobinTaxesResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryTobinTaxesResponse.Merge(m, src) -} -func (m *QueryTobinTaxesResponse) XXX_Size() int { - return m.Size() -} -func (m *QueryTobinTaxesResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryTobinTaxesResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryTobinTaxesResponse proto.InternalMessageInfo - -func (m *QueryTobinTaxesResponse) GetTobinTaxes() PairList { - if m != nil { - return m.TobinTaxes - } - return nil -} - // QueryActivesRequest is the request type for the Query/Actives RPC method. type QueryActivesRequest struct { } @@ -365,7 +202,7 @@ func (m *QueryActivesRequest) Reset() { *m = QueryActivesRequest{} } func (m *QueryActivesRequest) String() string { return proto.CompactTextString(m) } func (*QueryActivesRequest) ProtoMessage() {} func (*QueryActivesRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_812803c014dfa45a, []int{8} + return fileDescriptor_812803c014dfa45a, []int{4} } func (m *QueryActivesRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -405,7 +242,7 @@ func (m *QueryActivesResponse) Reset() { *m = QueryActivesResponse{} } func (m *QueryActivesResponse) String() string { return proto.CompactTextString(m) } func (*QueryActivesResponse) ProtoMessage() {} func (*QueryActivesResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_812803c014dfa45a, []int{9} + return fileDescriptor_812803c014dfa45a, []int{5} } func (m *QueryActivesResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -449,7 +286,7 @@ func (m *QueryVoteTargetsRequest) Reset() { *m = QueryVoteTargetsRequest func (m *QueryVoteTargetsRequest) String() string { return proto.CompactTextString(m) } func (*QueryVoteTargetsRequest) ProtoMessage() {} func (*QueryVoteTargetsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_812803c014dfa45a, []int{10} + return fileDescriptor_812803c014dfa45a, []int{6} } func (m *QueryVoteTargetsRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -490,7 +327,7 @@ func (m *QueryVoteTargetsResponse) Reset() { *m = QueryVoteTargetsRespon func (m *QueryVoteTargetsResponse) String() string { return proto.CompactTextString(m) } func (*QueryVoteTargetsResponse) ProtoMessage() {} func (*QueryVoteTargetsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_812803c014dfa45a, []int{11} + return fileDescriptor_812803c014dfa45a, []int{7} } func (m *QueryVoteTargetsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -536,7 +373,7 @@ func (m *QueryFeederDelegationRequest) Reset() { *m = QueryFeederDelegat func (m *QueryFeederDelegationRequest) String() string { return proto.CompactTextString(m) } func (*QueryFeederDelegationRequest) ProtoMessage() {} func (*QueryFeederDelegationRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_812803c014dfa45a, []int{12} + return fileDescriptor_812803c014dfa45a, []int{8} } func (m *QueryFeederDelegationRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -576,7 +413,7 @@ func (m *QueryFeederDelegationResponse) Reset() { *m = QueryFeederDelega func (m *QueryFeederDelegationResponse) String() string { return proto.CompactTextString(m) } func (*QueryFeederDelegationResponse) ProtoMessage() {} func (*QueryFeederDelegationResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_812803c014dfa45a, []int{13} + return fileDescriptor_812803c014dfa45a, []int{9} } func (m *QueryFeederDelegationResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -622,7 +459,7 @@ func (m *QueryMissCounterRequest) Reset() { *m = QueryMissCounterRequest func (m *QueryMissCounterRequest) String() string { return proto.CompactTextString(m) } func (*QueryMissCounterRequest) ProtoMessage() {} func (*QueryMissCounterRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_812803c014dfa45a, []int{14} + return fileDescriptor_812803c014dfa45a, []int{10} } func (m *QueryMissCounterRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -662,7 +499,7 @@ func (m *QueryMissCounterResponse) Reset() { *m = QueryMissCounterRespon func (m *QueryMissCounterResponse) String() string { return proto.CompactTextString(m) } func (*QueryMissCounterResponse) ProtoMessage() {} func (*QueryMissCounterResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_812803c014dfa45a, []int{15} + return fileDescriptor_812803c014dfa45a, []int{11} } func (m *QueryMissCounterResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -708,7 +545,7 @@ func (m *QueryAggregatePrevoteRequest) Reset() { *m = QueryAggregatePrev func (m *QueryAggregatePrevoteRequest) String() string { return proto.CompactTextString(m) } func (*QueryAggregatePrevoteRequest) ProtoMessage() {} func (*QueryAggregatePrevoteRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_812803c014dfa45a, []int{16} + return fileDescriptor_812803c014dfa45a, []int{12} } func (m *QueryAggregatePrevoteRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -748,7 +585,7 @@ func (m *QueryAggregatePrevoteResponse) Reset() { *m = QueryAggregatePre func (m *QueryAggregatePrevoteResponse) String() string { return proto.CompactTextString(m) } func (*QueryAggregatePrevoteResponse) ProtoMessage() {} func (*QueryAggregatePrevoteResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_812803c014dfa45a, []int{17} + return fileDescriptor_812803c014dfa45a, []int{13} } func (m *QueryAggregatePrevoteResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -792,7 +629,7 @@ func (m *QueryAggregatePrevotesRequest) Reset() { *m = QueryAggregatePre func (m *QueryAggregatePrevotesRequest) String() string { return proto.CompactTextString(m) } func (*QueryAggregatePrevotesRequest) ProtoMessage() {} func (*QueryAggregatePrevotesRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_812803c014dfa45a, []int{18} + return fileDescriptor_812803c014dfa45a, []int{14} } func (m *QueryAggregatePrevotesRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -832,7 +669,7 @@ func (m *QueryAggregatePrevotesResponse) Reset() { *m = QueryAggregatePr func (m *QueryAggregatePrevotesResponse) String() string { return proto.CompactTextString(m) } func (*QueryAggregatePrevotesResponse) ProtoMessage() {} func (*QueryAggregatePrevotesResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_812803c014dfa45a, []int{19} + return fileDescriptor_812803c014dfa45a, []int{15} } func (m *QueryAggregatePrevotesResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -878,7 +715,7 @@ func (m *QueryAggregateVoteRequest) Reset() { *m = QueryAggregateVoteReq func (m *QueryAggregateVoteRequest) String() string { return proto.CompactTextString(m) } func (*QueryAggregateVoteRequest) ProtoMessage() {} func (*QueryAggregateVoteRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_812803c014dfa45a, []int{20} + return fileDescriptor_812803c014dfa45a, []int{16} } func (m *QueryAggregateVoteRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -918,7 +755,7 @@ func (m *QueryAggregateVoteResponse) Reset() { *m = QueryAggregateVoteRe func (m *QueryAggregateVoteResponse) String() string { return proto.CompactTextString(m) } func (*QueryAggregateVoteResponse) ProtoMessage() {} func (*QueryAggregateVoteResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_812803c014dfa45a, []int{21} + return fileDescriptor_812803c014dfa45a, []int{17} } func (m *QueryAggregateVoteResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -962,7 +799,7 @@ func (m *QueryAggregateVotesRequest) Reset() { *m = QueryAggregateVotesR func (m *QueryAggregateVotesRequest) String() string { return proto.CompactTextString(m) } func (*QueryAggregateVotesRequest) ProtoMessage() {} func (*QueryAggregateVotesRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_812803c014dfa45a, []int{22} + return fileDescriptor_812803c014dfa45a, []int{18} } func (m *QueryAggregateVotesRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1002,7 +839,7 @@ func (m *QueryAggregateVotesResponse) Reset() { *m = QueryAggregateVotes func (m *QueryAggregateVotesResponse) String() string { return proto.CompactTextString(m) } func (*QueryAggregateVotesResponse) ProtoMessage() {} func (*QueryAggregateVotesResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_812803c014dfa45a, []int{23} + return fileDescriptor_812803c014dfa45a, []int{19} } func (m *QueryAggregateVotesResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1046,7 +883,7 @@ func (m *QueryParamsRequest) Reset() { *m = QueryParamsRequest{} } func (m *QueryParamsRequest) String() string { return proto.CompactTextString(m) } func (*QueryParamsRequest) ProtoMessage() {} func (*QueryParamsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_812803c014dfa45a, []int{24} + return fileDescriptor_812803c014dfa45a, []int{20} } func (m *QueryParamsRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1085,7 +922,7 @@ func (m *QueryParamsResponse) Reset() { *m = QueryParamsResponse{} } func (m *QueryParamsResponse) String() string { return proto.CompactTextString(m) } func (*QueryParamsResponse) ProtoMessage() {} func (*QueryParamsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_812803c014dfa45a, []int{25} + return fileDescriptor_812803c014dfa45a, []int{21} } func (m *QueryParamsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1126,10 +963,6 @@ func init() { proto.RegisterType((*QueryExchangeRateResponse)(nil), "nibiru.oracle.v1beta1.QueryExchangeRateResponse") proto.RegisterType((*QueryExchangeRatesRequest)(nil), "nibiru.oracle.v1beta1.QueryExchangeRatesRequest") proto.RegisterType((*QueryExchangeRatesResponse)(nil), "nibiru.oracle.v1beta1.QueryExchangeRatesResponse") - proto.RegisterType((*QueryTobinTaxRequest)(nil), "nibiru.oracle.v1beta1.QueryTobinTaxRequest") - proto.RegisterType((*QueryTobinTaxResponse)(nil), "nibiru.oracle.v1beta1.QueryTobinTaxResponse") - proto.RegisterType((*QueryTobinTaxesRequest)(nil), "nibiru.oracle.v1beta1.QueryTobinTaxesRequest") - proto.RegisterType((*QueryTobinTaxesResponse)(nil), "nibiru.oracle.v1beta1.QueryTobinTaxesResponse") proto.RegisterType((*QueryActivesRequest)(nil), "nibiru.oracle.v1beta1.QueryActivesRequest") proto.RegisterType((*QueryActivesResponse)(nil), "nibiru.oracle.v1beta1.QueryActivesResponse") proto.RegisterType((*QueryVoteTargetsRequest)(nil), "nibiru.oracle.v1beta1.QueryVoteTargetsRequest") @@ -1153,84 +986,75 @@ func init() { func init() { proto.RegisterFile("oracle/v1beta1/query.proto", fileDescriptor_812803c014dfa45a) } var fileDescriptor_812803c014dfa45a = []byte{ - // 1225 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x98, 0x4d, 0x6f, 0x1b, 0x45, - 0x18, 0xc7, 0x3d, 0x10, 0xd2, 0xe4, 0x71, 0x1c, 0x92, 0x21, 0x81, 0x74, 0x93, 0xd8, 0x65, 0x45, - 0xa3, 0x34, 0x2f, 0xde, 0xbc, 0x15, 0x48, 0x0b, 0x82, 0xbc, 0x10, 0x09, 0x08, 0x10, 0x4c, 0x94, - 0x03, 0x12, 0xb2, 0xc6, 0xf6, 0xd4, 0x59, 0xd5, 0xf6, 0xba, 0x3b, 0x63, 0x2b, 0x51, 0x54, 0x90, - 0x38, 0xf0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0xce, 0xfd, 0xb3, 0x34, 0x7a, 0x70, - 0x96, 0x46, 0x7f, 0x9f, 0xa5, 0xd1, 0x9d, 0xf3, 0x74, 0xe2, 0xc1, 0x79, 0x3a, 0xf1, 0xc7, 0x79, - 0x3a, 0xf1, 0xe1, 0x82, 0xe7, 0x27, 0xee, 0xbb, 0x22, 0xc4, 0xd6, 0x21, 0xd1, 0x6b, 0x4e, 0xb8, - 0x23, 0x27, 0xa0, 0xf8, 0xb1, 0x5b, 0xe8, 0x17, 0xff, 0xd6, 0x58, 0xfd, 0x3f, 0x00, 0x00, 0xff, - 0xff, 0xb7, 0x31, 0x4f, 0x5b, 0x7c, 0x11, 0x00, 0x00, + // 1073 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x97, 0xcf, 0x6f, 0x1b, 0x45, + 0x14, 0xc7, 0x3d, 0x50, 0x52, 0xfa, 0x1c, 0xbb, 0xc9, 0x90, 0x8a, 0x74, 0x93, 0xd8, 0x65, 0x45, + 0xab, 0xb4, 0x69, 0xbd, 0x71, 0x5c, 0x7e, 0x84, 0x82, 0xc0, 0x49, 0x88, 0x04, 0x2a, 0x50, 0x96, + 0x2a, 0x07, 0x24, 0x64, 0x8d, 0xed, 0xe9, 0x66, 0x55, 0x7b, 0x67, 0xbb, 0xb3, 0xb6, 0x5a, 0x45, + 0xe5, 0xc0, 0x81, 0x5f, 0xa7, 0x4a, 0x9c, 0x91, 0xca, 0x11, 0x84, 0x84, 0xc4, 0x1f, 0x00, 0x1c, + 0x2b, 0x71, 0xa9, 0xc4, 0x05, 0x71, 0x28, 0x28, 0xe1, 0xc0, 0x9f, 0x81, 0x76, 0x76, 0x76, 0xbd, + 0x6b, 0xef, 0x6e, 0x6d, 0xf7, 0x14, 0x67, 0xe6, 0xbd, 0xef, 0xfb, 0xbc, 0x37, 0xe3, 0xf9, 0xca, + 0xa0, 0x30, 0x87, 0xb4, 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e, 0x95, 0x72, 0x7f, 0x1e, 0x95, 0x72, 0x1f, 0x5f, 0x8c, 0xfc, 0x6a, 0x7b, + 0x5f, 0x48, 0x6c, 0xef, 0x13, 0xd3, 0x0a, 0xe4, 0x6e, 0x07, 0x82, 0xe2, 0xf7, 0x5b, 0x73, 0x46, + 0xfc, 0xc0, 0xac, 0xfd, 0x1f, 0x00, 0x00, 0xff, 0xff, 0x43, 0x4b, 0x5a, 0x52, 0x06, 0x0f, 0x00, + 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1249,10 +1073,6 @@ type QueryClient interface { ExchangeRate(ctx context.Context, in *QueryExchangeRateRequest, opts ...grpc.CallOption) (*QueryExchangeRateResponse, error) // ExchangeRates returns exchange rates of all pairs ExchangeRates(ctx context.Context, in *QueryExchangeRatesRequest, opts ...grpc.CallOption) (*QueryExchangeRatesResponse, error) - // TobinTax returns tobin tax of a pair - TobinTax(ctx context.Context, in *QueryTobinTaxRequest, opts ...grpc.CallOption) (*QueryTobinTaxResponse, error) - // TobinTaxes returns tobin taxes of all pairs - TobinTaxes(ctx context.Context, in *QueryTobinTaxesRequest, opts ...grpc.CallOption) (*QueryTobinTaxesResponse, error) // Actives returns all active pairs Actives(ctx context.Context, in *QueryActivesRequest, opts ...grpc.CallOption) (*QueryActivesResponse, error) // VoteTargets returns all vote target for pairs @@ -1299,24 +1119,6 @@ func (c *queryClient) ExchangeRates(ctx context.Context, in *QueryExchangeRatesR return out, nil } -func (c *queryClient) TobinTax(ctx context.Context, in *QueryTobinTaxRequest, opts ...grpc.CallOption) (*QueryTobinTaxResponse, error) { - out := new(QueryTobinTaxResponse) - err := c.cc.Invoke(ctx, "/nibiru.oracle.v1beta1.Query/TobinTax", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) TobinTaxes(ctx context.Context, in *QueryTobinTaxesRequest, opts ...grpc.CallOption) (*QueryTobinTaxesResponse, error) { - out := new(QueryTobinTaxesResponse) - err := c.cc.Invoke(ctx, "/nibiru.oracle.v1beta1.Query/TobinTaxes", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - func (c *queryClient) Actives(ctx context.Context, in *QueryActivesRequest, opts ...grpc.CallOption) (*QueryActivesResponse, error) { out := new(QueryActivesResponse) err := c.cc.Invoke(ctx, "/nibiru.oracle.v1beta1.Query/Actives", in, out, opts...) @@ -1404,10 +1206,6 @@ type QueryServer interface { ExchangeRate(context.Context, *QueryExchangeRateRequest) (*QueryExchangeRateResponse, error) // ExchangeRates returns exchange rates of all pairs ExchangeRates(context.Context, *QueryExchangeRatesRequest) (*QueryExchangeRatesResponse, error) - // TobinTax returns tobin tax of a pair - TobinTax(context.Context, *QueryTobinTaxRequest) (*QueryTobinTaxResponse, error) - // TobinTaxes returns tobin taxes of all pairs - TobinTaxes(context.Context, *QueryTobinTaxesRequest) (*QueryTobinTaxesResponse, error) // Actives returns all active pairs Actives(context.Context, *QueryActivesRequest) (*QueryActivesResponse, error) // VoteTargets returns all vote target for pairs @@ -1438,12 +1236,6 @@ func (*UnimplementedQueryServer) ExchangeRate(ctx context.Context, req *QueryExc func (*UnimplementedQueryServer) ExchangeRates(ctx context.Context, req *QueryExchangeRatesRequest) (*QueryExchangeRatesResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ExchangeRates not implemented") } -func (*UnimplementedQueryServer) TobinTax(ctx context.Context, req *QueryTobinTaxRequest) (*QueryTobinTaxResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method TobinTax not implemented") -} -func (*UnimplementedQueryServer) TobinTaxes(ctx context.Context, req *QueryTobinTaxesRequest) (*QueryTobinTaxesResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method TobinTaxes not implemented") -} func (*UnimplementedQueryServer) Actives(ctx context.Context, req *QueryActivesRequest) (*QueryActivesResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Actives not implemented") } @@ -1512,42 +1304,6 @@ func _Query_ExchangeRates_Handler(srv interface{}, ctx context.Context, dec func return interceptor(ctx, in, info, handler) } -func _Query_TobinTax_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryTobinTaxRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).TobinTax(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/nibiru.oracle.v1beta1.Query/TobinTax", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).TobinTax(ctx, req.(*QueryTobinTaxRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_TobinTaxes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryTobinTaxesRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).TobinTaxes(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/nibiru.oracle.v1beta1.Query/TobinTaxes", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).TobinTaxes(ctx, req.(*QueryTobinTaxesRequest)) - } - return interceptor(ctx, in, info, handler) -} - func _Query_Actives_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(QueryActivesRequest) if err := dec(in); err != nil { @@ -1722,14 +1478,6 @@ var _Query_serviceDesc = grpc.ServiceDesc{ MethodName: "ExchangeRates", Handler: _Query_ExchangeRates_Handler, }, - { - MethodName: "TobinTax", - Handler: _Query_TobinTax_Handler, - }, - { - MethodName: "TobinTaxes", - Handler: _Query_TobinTaxes_Handler, - }, { MethodName: "Actives", Handler: _Query_Actives_Handler, @@ -1894,7 +1642,7 @@ func (m *QueryExchangeRatesResponse) MarshalToSizedBuffer(dAtA []byte) (int, err return len(dAtA) - i, nil } -func (m *QueryTobinTaxRequest) Marshal() (dAtA []byte, err error) { +func (m *QueryActivesRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1904,27 +1652,20 @@ func (m *QueryTobinTaxRequest) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *QueryTobinTaxRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryActivesRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryTobinTaxRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryActivesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if len(m.Pair) > 0 { - i -= len(m.Pair) - copy(dAtA[i:], m.Pair) - i = encodeVarintQuery(dAtA, i, uint64(len(m.Pair))) - i-- - dAtA[i] = 0xa - } return len(dAtA) - i, nil } -func (m *QueryTobinTaxResponse) Marshal() (dAtA []byte, err error) { +func (m *QueryActivesResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1934,30 +1675,29 @@ func (m *QueryTobinTaxResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *QueryTobinTaxResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryActivesResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryTobinTaxResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryActivesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - { - size := m.TobinTax.Size() - i -= size - if _, err := m.TobinTax.MarshalTo(dAtA[i:]); err != nil { - return 0, err + if len(m.Actives) > 0 { + for iNdEx := len(m.Actives) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Actives[iNdEx]) + copy(dAtA[i:], m.Actives[iNdEx]) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Actives[iNdEx]))) + i-- + dAtA[i] = 0xa } - i = encodeVarintQuery(dAtA, i, uint64(size)) } - i-- - dAtA[i] = 0xa return len(dAtA) - i, nil } -func (m *QueryTobinTaxesRequest) Marshal() (dAtA []byte, err error) { +func (m *QueryVoteTargetsRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1967,12 +1707,12 @@ func (m *QueryTobinTaxesRequest) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *QueryTobinTaxesRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryVoteTargetsRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryTobinTaxesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryVoteTargetsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -1980,7 +1720,7 @@ func (m *QueryTobinTaxesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) return len(dAtA) - i, nil } -func (m *QueryTobinTaxesResponse) Marshal() (dAtA []byte, err error) { +func (m *QueryVoteTargetsResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1990,26 +1730,21 @@ func (m *QueryTobinTaxesResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *QueryTobinTaxesResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryVoteTargetsResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryTobinTaxesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryVoteTargetsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if len(m.TobinTaxes) > 0 { - for iNdEx := len(m.TobinTaxes) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.TobinTaxes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } + if len(m.VoteTargets) > 0 { + for iNdEx := len(m.VoteTargets) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.VoteTargets[iNdEx]) + copy(dAtA[i:], m.VoteTargets[iNdEx]) + i = encodeVarintQuery(dAtA, i, uint64(len(m.VoteTargets[iNdEx]))) i-- dAtA[i] = 0xa } @@ -2017,7 +1752,7 @@ func (m *QueryTobinTaxesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) return len(dAtA) - i, nil } -func (m *QueryActivesRequest) Marshal() (dAtA []byte, err error) { +func (m *QueryFeederDelegationRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -2027,20 +1762,27 @@ func (m *QueryActivesRequest) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *QueryActivesRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryFeederDelegationRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryActivesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryFeederDelegationRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l + if len(m.ValidatorAddr) > 0 { + i -= len(m.ValidatorAddr) + copy(dAtA[i:], m.ValidatorAddr) + i = encodeVarintQuery(dAtA, i, uint64(len(m.ValidatorAddr))) + i-- + dAtA[i] = 0xa + } return len(dAtA) - i, nil } -func (m *QueryActivesResponse) Marshal() (dAtA []byte, err error) { +func (m *QueryFeederDelegationResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -2050,29 +1792,27 @@ func (m *QueryActivesResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *QueryActivesResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryFeederDelegationResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryActivesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryFeederDelegationResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if len(m.Actives) > 0 { - for iNdEx := len(m.Actives) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Actives[iNdEx]) - copy(dAtA[i:], m.Actives[iNdEx]) - i = encodeVarintQuery(dAtA, i, uint64(len(m.Actives[iNdEx]))) - i-- - dAtA[i] = 0xa - } + if len(m.FeederAddr) > 0 { + i -= len(m.FeederAddr) + copy(dAtA[i:], m.FeederAddr) + i = encodeVarintQuery(dAtA, i, uint64(len(m.FeederAddr))) + i-- + dAtA[i] = 0xa } return len(dAtA) - i, nil } -func (m *QueryVoteTargetsRequest) Marshal() (dAtA []byte, err error) { +func (m *QueryMissCounterRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -2082,127 +1822,12 @@ func (m *QueryVoteTargetsRequest) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *QueryVoteTargetsRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryMissCounterRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryVoteTargetsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func (m *QueryVoteTargetsResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *QueryVoteTargetsResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryVoteTargetsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.VoteTargets) > 0 { - for iNdEx := len(m.VoteTargets) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.VoteTargets[iNdEx]) - copy(dAtA[i:], m.VoteTargets[iNdEx]) - i = encodeVarintQuery(dAtA, i, uint64(len(m.VoteTargets[iNdEx]))) - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *QueryFeederDelegationRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *QueryFeederDelegationRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryFeederDelegationRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.ValidatorAddr) > 0 { - i -= len(m.ValidatorAddr) - copy(dAtA[i:], m.ValidatorAddr) - i = encodeVarintQuery(dAtA, i, uint64(len(m.ValidatorAddr))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *QueryFeederDelegationResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *QueryFeederDelegationResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryFeederDelegationResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.FeederAddr) > 0 { - i -= len(m.FeederAddr) - copy(dAtA[i:], m.FeederAddr) - i = encodeVarintQuery(dAtA, i, uint64(len(m.FeederAddr))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *QueryMissCounterRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *QueryMissCounterRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryMissCounterRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryMissCounterRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -2606,54 +2231,6 @@ func (m *QueryExchangeRatesResponse) Size() (n int) { return n } -func (m *QueryTobinTaxRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Pair) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *QueryTobinTaxResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.TobinTax.Size() - n += 1 + l + sovQuery(uint64(l)) - return n -} - -func (m *QueryTobinTaxesRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *QueryTobinTaxesResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.TobinTaxes) > 0 { - for _, e := range m.TobinTaxes { - l = e.Size() - n += 1 + l + sovQuery(uint64(l)) - } - } - return n -} - func (m *QueryActivesRequest) Size() (n int) { if m == nil { return 0 @@ -3175,306 +2752,6 @@ func (m *QueryExchangeRatesResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryTobinTaxRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QueryTobinTaxRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryTobinTaxRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Pair", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - 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 ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Pair = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryTobinTaxResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QueryTobinTaxResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryTobinTaxResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TobinTax", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - 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 ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.TobinTax.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryTobinTaxesRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QueryTobinTaxesRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryTobinTaxesRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryTobinTaxesResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QueryTobinTaxesResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryTobinTaxesResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TobinTaxes", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.TobinTaxes = append(m.TobinTaxes, Pair{}) - if err := m.TobinTaxes[len(m.TobinTaxes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} func (m *QueryActivesRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 diff --git a/x/oracle/types/query.pb.gw.go b/x/oracle/types/query.pb.gw.go index 8d6dc99b9..05e1f8787 100644 --- a/x/oracle/types/query.pb.gw.go +++ b/x/oracle/types/query.pb.gw.go @@ -103,78 +103,6 @@ func local_request_Query_ExchangeRates_0(ctx context.Context, marshaler runtime. } -func request_Query_TobinTax_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryTobinTaxRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["pair"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "pair") - } - - protoReq.Pair, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "pair", err) - } - - msg, err := client.TobinTax(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Query_TobinTax_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryTobinTaxRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["pair"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "pair") - } - - protoReq.Pair, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "pair", err) - } - - msg, err := server.TobinTax(ctx, &protoReq) - return msg, metadata, err - -} - -func request_Query_TobinTaxes_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryTobinTaxesRequest - var metadata runtime.ServerMetadata - - msg, err := client.TobinTaxes(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Query_TobinTaxes_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryTobinTaxesRequest - var metadata runtime.ServerMetadata - - msg, err := server.TobinTaxes(ctx, &protoReq) - return msg, metadata, err - -} - func request_Query_Actives_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq QueryActivesRequest var metadata runtime.ServerMetadata @@ -527,46 +455,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv }) - mux.Handle("GET", pattern_Query_TobinTax_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_Query_TobinTax_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_TobinTax_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Query_TobinTaxes_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_Query_TobinTaxes_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_TobinTaxes_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - mux.Handle("GET", pattern_Query_Actives_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -828,46 +716,6 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie }) - mux.Handle("GET", pattern_Query_TobinTax_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_Query_TobinTax_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_TobinTax_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Query_TobinTaxes_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_Query_TobinTaxes_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_TobinTaxes_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - mux.Handle("GET", pattern_Query_Actives_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -1056,10 +904,6 @@ var ( pattern_Query_ExchangeRates_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"nibiru", "oracle", "v1beta1", "pairs", "exchange_rates"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_TobinTax_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5}, []string{"nibiru", "oracle", "v1beta1", "pairs", "pair", "tobin_tax"}, "", runtime.AssumeColonVerbOpt(false))) - - pattern_Query_TobinTaxes_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"nibiru", "oracle", "v1beta1", "pairs", "tobin_taxes"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_Actives_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"nibiru", "oracle", "v1beta1", "pairs", "actives"}, "", runtime.AssumeColonVerbOpt(false))) pattern_Query_VoteTargets_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"nibiru", "oracle", "v1beta1", "pairs", "vote_targets"}, "", runtime.AssumeColonVerbOpt(false))) @@ -1084,10 +928,6 @@ var ( forward_Query_ExchangeRates_0 = runtime.ForwardResponseMessage - forward_Query_TobinTax_0 = runtime.ForwardResponseMessage - - forward_Query_TobinTaxes_0 = runtime.ForwardResponseMessage - forward_Query_Actives_0 = runtime.ForwardResponseMessage forward_Query_VoteTargets_0 = runtime.ForwardResponseMessage