diff --git a/CHANGELOG.md b/CHANGELOG.md index 7ce9634072e..9315564afc5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -74,6 +74,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 * [#5927] (https://github.com/osmosis-labs/osmosis/pull/5927) Add gas metering to x/tokenfactory trackBeforeSend hook * [#5890](https://github.com/osmosis-labs/osmosis/pull/5890) feat: CreateCLPool & LinkCFMMtoCL pool into one gov-prop * [#5964](https://github.com/osmosis-labs/osmosis/pull/5964) fix e2e test concurrency bugs +* [#5948] (https://github.com/osmosis-labs/osmosis/pull/5948) Parameterizing Pool Type Information in Protorev ### Minor improvements & Bug Fixes diff --git a/app/upgrades/v17/upgrades.go b/app/upgrades/v17/upgrades.go index f01cb002a83..419e25fdce7 100644 --- a/app/upgrades/v17/upgrades.go +++ b/app/upgrades/v17/upgrades.go @@ -123,12 +123,7 @@ func CreateUpgradeHandler( keepers.DistrKeeper.SetFeePool(ctx, feePool) // Reset the pool weights upon upgrade. This will add support for CW pools on ProtoRev. - keepers.ProtoRevKeeper.SetPoolWeights(ctx, types.PoolWeights{ - BalancerWeight: 1, - StableWeight: 4, - ConcentratedWeight: 300, - CosmwasmWeight: 300, - }) + keepers.ProtoRevKeeper.SetInfoByPoolType(ctx, types.DefaultPoolTypeInfo) return migrations, nil } diff --git a/proto/osmosis/protorev/v1beta1/genesis.proto b/proto/osmosis/protorev/v1beta1/genesis.proto index 38dfc6442b1..689f984526c 100644 --- a/proto/osmosis/protorev/v1beta1/genesis.proto +++ b/proto/osmosis/protorev/v1beta1/genesis.proto @@ -27,6 +27,9 @@ message GenesisState { ]; // The pool weights that are being used to calculate the weight (compute cost) // of each route. + // + // DEPRECATED: This field is deprecated and will be removed in the next + // release. It is replaced by the `info_by_pool_type` field. PoolWeights pool_weights = 4 [ (gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"pool_weights\"" @@ -63,4 +66,10 @@ message GenesisState { (gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"profits\"" ]; + // Information that is used to estimate execution time / gas + // consumption of a swap on a given pool type. + InfoByPoolType info_by_pool_type = 13 [ + (gogoproto.nullable) = false, + (gogoproto.moretags) = "yaml:\"info_by_pool_type\"" + ]; } \ No newline at end of file diff --git a/proto/osmosis/protorev/v1beta1/protorev.proto b/proto/osmosis/protorev/v1beta1/protorev.proto index c3dbda4db31..34e624e34df 100644 --- a/proto/osmosis/protorev/v1beta1/protorev.proto +++ b/proto/osmosis/protorev/v1beta1/protorev.proto @@ -78,6 +78,9 @@ message RouteStatistics { // significantly between the different pool types. Each weight roughly // corresponds to the amount of time (in ms) it takes to execute a swap on that // pool type. +// +// DEPRECATED: This field is deprecated and will be removed in the next +// release. It is replaced by the `info_by_pool_type` field. message PoolWeights { // The weight of a stableswap pool uint64 stable_weight = 1 [ (gogoproto.moretags) = "yaml:\"stable_weight\"" ]; @@ -92,6 +95,74 @@ message PoolWeights { [ (gogoproto.moretags) = "yaml:\"cosmwasm_weight\"" ]; } +// InfoByPoolType contains information pertaining to how expensive (in terms of +// gas and time) it is to execute a swap on a given pool type. This distinction +// is made and necessary because the execution time ranges significantly between +// the different pool types. +message InfoByPoolType { + // The stable pool info + StablePoolInfo stable = 1 [ + (gogoproto.moretags) = "yaml:\"stable\"", + (gogoproto.nullable) = false + ]; + // The balancer pool info + BalancerPoolInfo balancer = 2 [ + (gogoproto.moretags) = "yaml:\"balancer\"", + (gogoproto.nullable) = false + ]; + // The concentrated pool info + ConcentratedPoolInfo concentrated = 3 [ + (gogoproto.moretags) = "yaml:\"concentrated\"", + (gogoproto.nullable) = false + ]; + // The cosmwasm pool info + CosmwasmPoolInfo cosmwasm = 4 [ + (gogoproto.moretags) = "yaml:\"cosmwasm\"", + (gogoproto.nullable) = false + ]; +} + +// StablePoolInfo contains meta data pertaining to a stableswap pool type. +message StablePoolInfo { + // The weight of a stableswap pool + uint64 weight = 1 [ (gogoproto.moretags) = "yaml:\"weight\"" ]; +} + +// BalancerPoolInfo contains meta data pertaining to a balancer pool type. +message BalancerPoolInfo { + // The weight of a balancer pool + uint64 weight = 1 [ (gogoproto.moretags) = "yaml:\"weight\"" ]; +} + +// ConcentratedPoolInfo contains meta data pertaining to a concentrated pool +// type. +message ConcentratedPoolInfo { + // The weight of a concentrated pool + uint64 weight = 1 [ (gogoproto.moretags) = "yaml:\"weight\"" ]; + // The maximum number of ticks we can move when rebalancing + uint64 max_ticks_crossed = 2 + [ (gogoproto.moretags) = "yaml:\"max_ticks_crossed\"" ]; +} + +// CosmwasmPoolInfo contains meta data pertaining to a cosmwasm pool type. +message CosmwasmPoolInfo { + // The weight of a cosmwasm pool (by contract address) + repeated WeightMap weight_maps = 1 [ + (gogoproto.moretags) = "yaml:\"weight_maps\"", + (gogoproto.nullable) = false + ]; +} + +// WeightMap maps a contract address to a weight. The weight of an address +// corresponds to the amount of ms required to execute a swap on that contract. +message WeightMap { + // The weight of a cosmwasm pool (by contract address) + uint64 weight = 1 [ (gogoproto.moretags) = "yaml:\"weight\"" ]; + // The contract address + string contract_address = 2 + [ (gogoproto.moretags) = "yaml:\"contract_address\"" ]; +} + // BaseDenom represents a single base denom that the module uses for its // arbitrage trades. It contains the denom name alongside the step size of the // binary search that is used to find the optimal swap amount diff --git a/proto/osmosis/protorev/v1beta1/query.proto b/proto/osmosis/protorev/v1beta1/query.proto index 0c0b3f13bcc..a57757a9aff 100644 --- a/proto/osmosis/protorev/v1beta1/query.proto +++ b/proto/osmosis/protorev/v1beta1/query.proto @@ -71,11 +71,11 @@ service Query { option (google.api.http).get = "/osmosis/protorev/developer_account"; } - // GetProtoRevPoolWeights queries the weights of each pool type currently - // being used by the module - rpc GetProtoRevPoolWeights(QueryGetProtoRevPoolWeightsRequest) - returns (QueryGetProtoRevPoolWeightsResponse) { - option (google.api.http).get = "/osmosis/protorev/pool_weights"; + // GetProtoRevInfoByPoolType queries pool type information that is currently + // being utilized by the module + rpc GetProtoRevInfoByPoolType(QueryGetProtoRevInfoByPoolTypeRequest) + returns (QueryGetProtoRevInfoByPoolTypeResponse) { + option (google.api.http).get = "/osmosis/protorev/info_by_pool_type"; } // GetProtoRevMaxPoolPointsPerTx queries the maximum number of pool points @@ -242,16 +242,17 @@ message QueryGetProtoRevDeveloperAccountResponse { [ (gogoproto.moretags) = "yaml:\"developer_account\"" ]; } -// QueryGetProtoRevPoolWeightsRequest is request type for the -// Query/GetProtoRevPoolWeights RPC method. -message QueryGetProtoRevPoolWeightsRequest {} - -// QueryGetProtoRevPoolWeightsResponse is response type for the -// Query/GetProtoRevPoolWeights RPC method. -message QueryGetProtoRevPoolWeightsResponse { - // pool_weights is a list of all of the pool weights - PoolWeights pool_weights = 1 [ - (gogoproto.moretags) = "yaml:\"pool_weights\"", +// QueryGetProtoRevInfoByPoolTypeRequest is request type for the +// Query/GetProtoRevInfoByPoolType RPC method. +message QueryGetProtoRevInfoByPoolTypeRequest {} + +// QueryGetProtoRevInfoByPoolTypeResponse is response type for the +// Query/GetProtoRevInfoByPoolType RPC method. +message QueryGetProtoRevInfoByPoolTypeResponse { + // InfoByPoolType contains all information pertaining to how different + // pool types are handled by the module. + InfoByPoolType info_by_pool_type = 1 [ + (gogoproto.moretags) = "yaml:\"info_by_pool_type\"", (gogoproto.nullable) = false ]; } diff --git a/proto/osmosis/protorev/v1beta1/tx.proto b/proto/osmosis/protorev/v1beta1/tx.proto index 4fb23be05b3..9c59aaa3d38 100644 --- a/proto/osmosis/protorev/v1beta1/tx.proto +++ b/proto/osmosis/protorev/v1beta1/tx.proto @@ -39,10 +39,11 @@ service Msg { "/osmosis/protorev/set_max_pool_points_per_block"; }; - // SetPoolWeights sets the weights of each pool type in the store. Can only be - // called by the admin account. - rpc SetPoolWeights(MsgSetPoolWeights) returns (MsgSetPoolWeightsResponse) { - option (google.api.http).post = "/osmosis/protorev/set_pool_weights"; + // SetInfoByPoolType sets the pool type information needed to make smart + // assumptions about swapping on different pool types + rpc SetInfoByPoolType(MsgSetInfoByPoolType) + returns (MsgSetInfoByPoolTypeResponse) { + option (google.api.http).post = "/osmosis/protorev/set_info_by_pool_type"; }; // SetBaseDenoms sets the base denoms that will be used to create cyclic @@ -90,24 +91,24 @@ message MsgSetDeveloperAccount { // type. message MsgSetDeveloperAccountResponse {} -// MsgSetPoolWeights defines the Msg/SetPoolWeights request type. -message MsgSetPoolWeights { - option (amino.name) = "osmosis/MsgSetPoolWeights"; +// MsgSetInfoByPoolType defines the Msg/SetInfoByPoolType request type. +message MsgSetInfoByPoolType { + option (amino.name) = "osmosis/MsgSetInfoByPoolType"; // admin is the account that is authorized to set the pool weights. string admin = 1 [ (gogoproto.moretags) = "yaml:\"admin\"", (cosmos_proto.scalar) = "cosmos.AddressString" ]; - // pool_weights is the list of pool weights to set. - PoolWeights pool_weights = 2 [ - (gogoproto.moretags) = "yaml:\"pool_weights\"", + // info_by_pool_type contains information about the pool types. + InfoByPoolType info_by_pool_type = 2 [ + (gogoproto.moretags) = "yaml:\"info_by_pool_type\"", (gogoproto.nullable) = false ]; } -// MsgSetPoolWeightsResponse defines the Msg/SetPoolWeights response type. -message MsgSetPoolWeightsResponse {} +// MsgSetInfoByPoolTypeResponse defines the Msg/SetInfoByPoolType response type. +message MsgSetInfoByPoolTypeResponse {} // MsgSetMaxPoolPointsPerTx defines the Msg/SetMaxPoolPointsPerTx request type. message MsgSetMaxPoolPointsPerTx { diff --git a/tests/e2e/configurer/chain/queries.go b/tests/e2e/configurer/chain/queries.go index 759dc7a12e1..67483c74c08 100644 --- a/tests/e2e/configurer/chain/queries.go +++ b/tests/e2e/configurer/chain/queries.go @@ -118,20 +118,20 @@ func (n *NodeConfig) QueryProtoRevDeveloperAccount() (sdk.AccAddress, error) { return account, nil } -// QueryProtoRevPoolWeights gets the pool point weights of the module. -func (n *NodeConfig) QueryProtoRevPoolWeights() (protorevtypes.PoolWeights, error) { - path := "/osmosis/protorev/pool_weights" +// QueryProtoRevInfoByPoolType gets information on how the module handles different pool types. +func (n *NodeConfig) QueryProtoRevInfoByPoolType() (*protorevtypes.InfoByPoolType, error) { + path := "/osmosis/protorev/info_by_pool_type" bz, err := n.QueryGRPCGateway(path) if err != nil { - return protorevtypes.PoolWeights{}, err + return nil, err } // nolint: staticcheck - var response protorevtypes.QueryGetProtoRevPoolWeightsResponse + var response protorevtypes.QueryGetProtoRevInfoByPoolTypeResponse err = util.Cdc.UnmarshalJSON(bz, &response) require.NoError(n.t, err) // this error should not happen - return response.PoolWeights, nil + return &response.InfoByPoolType, nil } // QueryProtoRevMaxPoolPointsPerTx gets the max pool points per tx of the module. diff --git a/tests/e2e/e2e_test.go b/tests/e2e/e2e_test.go index b67d061d20e..18fc4cd6a6b 100644 --- a/tests/e2e/e2e_test.go +++ b/tests/e2e/e2e_test.go @@ -222,10 +222,10 @@ func (s *IntegrationTestSuite) ProtoRev() { s.Require().Error(err) // The module should have pool weights by default. - poolWeights, err := chainANode.QueryProtoRevPoolWeights() - s.T().Logf("checking that the protorev module has pool weights on init: %v", poolWeights) + info, err := chainANode.QueryProtoRevInfoByPoolType() + s.T().Logf("checking that the protorev module has pool info on init: %v", info) s.Require().NoError(err) - s.Require().NotNil(poolWeights) + s.Require().NotNil(info) // The module should have max pool points per tx by default. maxPoolPointsPerTx, err := chainANode.QueryProtoRevMaxPoolPointsPerTx() diff --git a/x/protorev/client/cli/query.go b/x/protorev/client/cli/query.go index afded878afd..7e8af2fdded 100644 --- a/x/protorev/client/cli/query.go +++ b/x/protorev/client/cli/query.go @@ -28,7 +28,7 @@ func NewCmdQuery() *cobra.Command { osmocli.AddQueryCmd(cmd, types.NewQueryClient, NewQueryMaxPoolPointsPerBlockCmd) osmocli.AddQueryCmd(cmd, types.NewQueryClient, NewQueryBaseDenomsCmd) osmocli.AddQueryCmd(cmd, types.NewQueryClient, NewQueryEnabledCmd) - osmocli.AddQueryCmd(cmd, types.NewQueryClient, NewQueryPoolWeightsCmd) + osmocli.AddQueryCmd(cmd, types.NewQueryClient, NewQueryInfoByPoolTypeCmd) osmocli.AddQueryCmd(cmd, types.NewQueryClient, NewQueryPoolCmd) return cmd @@ -141,12 +141,12 @@ func NewQueryEnabledCmd() (*osmocli.QueryDescriptor, *types.QueryGetProtoRevEnab }, &types.QueryGetProtoRevEnabledRequest{} } -// NewQueryPoolWeightsCmd returns the command to query the pool weights of protorev -func NewQueryPoolWeightsCmd() (*osmocli.QueryDescriptor, *types.QueryGetProtoRevPoolWeightsRequest) { +// NewQueryInfoByPoolTypeCmd returns the command to query the pool type info of protorev +func NewQueryInfoByPoolTypeCmd() (*osmocli.QueryDescriptor, *types.QueryGetProtoRevInfoByPoolTypeRequest) { return &osmocli.QueryDescriptor{ - Use: "pool-weights", - Short: "Query the pool weights used to determine how computationally expensive a route is", - }, &types.QueryGetProtoRevPoolWeightsRequest{} + Use: "info-by-pool-type", + Short: "Query the pool info used to determine how computationally expensive a route is", + }, &types.QueryGetProtoRevInfoByPoolTypeRequest{} } // NewQueryPoolCmd returns the command to query the pool id for a given denom pair stored via the highest liquidity method in ProtoRev diff --git a/x/protorev/client/cli/tx.go b/x/protorev/client/cli/tx.go index ffe479b749a..4d02d54e36c 100644 --- a/x/protorev/client/cli/tx.go +++ b/x/protorev/client/cli/tx.go @@ -29,7 +29,7 @@ func NewCmdTx() *cobra.Command { osmocli.AddTxCmd(txCmd, CmdSetMaxPoolPointsPerBlock) txCmd.AddCommand( CmdSetDeveloperHotRoutes().BuildCommandCustomFn(), - CmdSetPoolWeights().BuildCommandCustomFn(), + CmdSetInfoByPoolType().BuildCommandCustomFn(), CmdSetBaseDenoms().BuildCommandCustomFn(), CmdSetProtoRevAdminAccountProposal(), CmdSetProtoRevEnabledProposal(), @@ -141,22 +141,35 @@ func CmdSetMaxPoolPointsPerBlock() (*osmocli.TxCliDesc, *types.MsgSetMaxPoolPoin }, &types.MsgSetMaxPoolPointsPerBlock{} } -// CmdSetPoolWeights implements the command to set the pool weights used to estimate execution costs -func CmdSetPoolWeights() *osmocli.TxCliDesc { +// CmdSetInfoByPoolType implements the command to set the pool information used throughout the module +func CmdSetInfoByPoolType() *osmocli.TxCliDesc { desc := osmocli.TxCliDesc{ - Use: "set-pool-weights [path/to/routes.json]", - Short: "set the protorev pool weights", - Long: `Must provide a json file with all the pool weights that will be set. + Use: "set-info-by-pool-type [path/to/pool_info.json]", + Short: "set the protorev pool type info", + Long: `Must provide a json file with all the pool info that will be set. This does NOT set info for a single pool type. + All information must be provided across all pool types in the json file. Sample json file: { - "stable_weight" : 1, - "balancer_weight" : 1, - "concentrated_weight" : 1 + "stable" : { + "weight" : 1, + }, + "concentrated" : { + "weight" : 1, + "max_ticks_crossed": 10, + }, + "balancer" : { + "weight" : 1, + }, + "cosmwasm" : { + "weight_maps" : [ + {"contract_address" : "cosmos123...", "weight" : 1} + ], + }, } `, - Example: fmt.Sprintf(`$ %s tx protorev set-pool-weights weights.json --from mykey`, version.AppName), + Example: fmt.Sprintf(`$ %s tx protorev set-info-by-pool-type pool_info.json --from mykey`, version.AppName), NumArgs: 1, - ParseAndBuildMsg: BuildSetPoolWeightsMsg, + ParseAndBuildMsg: BuildSetInfoByPoolTypeMsg, } return &desc diff --git a/x/protorev/client/cli/utils.go b/x/protorev/client/cli/utils.go index 689c5682b04..bdbc01fef7d 100644 --- a/x/protorev/client/cli/utils.go +++ b/x/protorev/client/cli/utils.go @@ -122,38 +122,76 @@ func BuildSetHotRoutesMsg(clientCtx client.Context, args []string, fs *flag.Flag }, nil } -// ------------ types/functions to handle a SetPoolWeights CLI TX ------------ // -type createPoolWeightsInput types.PoolWeights +// ------------ types/functions to handle a SetInfoByPoolType CLI TX ------------ // +type InfoByPoolTypeInput struct { + Stable StablePoolInfoInput `json:"stable"` + Balancer BalancerPoolInfoInput `json:"balancer"` + Concentrated ConcentratedPoolInfoInput `json:"concentrated"` + Cosmwasm CosmwasmPoolInfoInput `json:"cosmwasm"` +} + +type StablePoolInfoInput struct { + Weight uint64 `json:"weight"` +} + +type BalancerPoolInfoInput struct { + Weight uint64 `json:"weight"` +} + +type ConcentratedPoolInfoInput struct { + Weight uint64 `json:"weight"` + MaxTicksCrossed uint64 `json:"max_ticks_crossed"` +} -type XCreatePoolWeightsInputs createPoolWeightsInput +type CosmwasmPoolInfoInput struct { + WeightMap map[string]uint64 `json:"weight_map"` +} +type createInfoByPoolTypeInput types.InfoByPoolType -type XCreatePoolWeightsExceptions struct { - XCreatePoolWeightsInputs +type XCreateInfoByPoolTypeInputs createInfoByPoolTypeInput + +type XCreateInfoByPoolTypeExceptions struct { + XCreateInfoByPoolTypeInputs Other *string // Other won't raise an error } // UnmarshalJSON should error if there are fields unexpected. -func (release *createPoolWeightsInput) UnmarshalJSON(data []byte) error { - var createPoolWeightsE XCreatePoolWeightsExceptions +func (release *createInfoByPoolTypeInput) UnmarshalJSON(data []byte) error { + var createInfoByPoolTypeE XCreateInfoByPoolTypeExceptions dec := json.NewDecoder(bytes.NewReader(data)) dec.DisallowUnknownFields() // Force - if err := dec.Decode(&createPoolWeightsE); err != nil { + if err := dec.Decode(&createInfoByPoolTypeE); err != nil { return err } - *release = createPoolWeightsInput(createPoolWeightsE.XCreatePoolWeightsInputs) + *release = createInfoByPoolTypeInput(createInfoByPoolTypeE.XCreateInfoByPoolTypeInputs) return nil } -// BuildSetPoolWeightsMsg builds a MsgSetPoolWeights from the provided json file -func BuildSetPoolWeightsMsg(clientCtx client.Context, args []string, fs *flag.FlagSet) (sdk.Msg, error) { +// createInfoByPoolTypeInput converts the input to the types.InfoByPoolType type +func (release *createInfoByPoolTypeInput) convertToInfoByPoolType() types.InfoByPoolType { + if release == nil { + return types.InfoByPoolType{} + } + + infoByPoolType := types.InfoByPoolType{} + infoByPoolType.Stable = release.Stable + infoByPoolType.Balancer = release.Balancer + infoByPoolType.Concentrated = release.Concentrated + infoByPoolType.Cosmwasm = release.Cosmwasm + + return infoByPoolType +} + +// BuildSetInfoByPoolTypeMsg builds a MsgSetInfoByPoolType from the provided json file +func BuildSetInfoByPoolTypeMsg(clientCtx client.Context, args []string, fs *flag.FlagSet) (sdk.Msg, error) { if len(args) == 0 { return nil, fmt.Errorf("must provide a json file") } // Read the json file - input := &createPoolWeightsInput{} + input := &createInfoByPoolTypeInput{} path := args[0] contents, err := os.ReadFile(path) if err != nil { @@ -167,9 +205,9 @@ func BuildSetPoolWeightsMsg(clientCtx client.Context, args []string, fs *flag.Fl // Build the msg admin := clientCtx.GetFromAddress().String() - return &types.MsgSetPoolWeights{ - Admin: admin, - PoolWeights: types.PoolWeights(*input), + return &types.MsgSetInfoByPoolType{ + Admin: admin, + InfoByPoolType: input.convertToInfoByPoolType(), }, nil } diff --git a/x/protorev/keeper/genesis.go b/x/protorev/keeper/genesis.go index 6f88098aa66..cd4621741f3 100644 --- a/x/protorev/keeper/genesis.go +++ b/x/protorev/keeper/genesis.go @@ -77,9 +77,8 @@ func (k Keeper) InitGenesis(ctx sdk.Context, genState types.GenesisState) { // Set the number of pool points that have been consumed in the current block. k.SetPointCountForBlock(ctx, genState.PointCountForBlock) - // Configure the pool weights for genesis. This roughly correlates to the ms of execution time - // by pool type. - k.SetPoolWeights(ctx, genState.PoolWeights) + // Configure the pool info for genesis. + k.SetInfoByPoolType(ctx, genState.InfoByPoolType) // Set the profits that have been collected by Protorev. for _, coin := range genState.Profits { @@ -99,7 +98,7 @@ func (k Keeper) ExportGenesis(ctx sdk.Context) *types.GenesisState { genesis.Params = k.GetParams(ctx) // Export the pool weights. - genesis.PoolWeights = k.GetPoolWeights(ctx) + genesis.InfoByPoolType = k.GetInfoByPoolType(ctx) // Export the token pair arb routes (hot routes). routes, err := k.GetAllTokenPairArbRoutes(ctx) diff --git a/x/protorev/keeper/genesis_test.go b/x/protorev/keeper/genesis_test.go index d68f647f2c1..3ddba2cfd88 100644 --- a/x/protorev/keeper/genesis_test.go +++ b/x/protorev/keeper/genesis_test.go @@ -23,8 +23,8 @@ func (s *KeeperTestSuite) TestInitGenesis() { params := s.App.ProtoRevKeeper.GetParams(s.Ctx) s.Require().Equal(params, exportedGenesis.Params) - poolWeights := s.App.ProtoRevKeeper.GetPoolWeights(s.Ctx) - s.Require().Equal(poolWeights, exportedGenesis.PoolWeights) + poolInfo := s.App.ProtoRevKeeper.GetInfoByPoolType(s.Ctx) + s.Require().Equal(poolInfo, exportedGenesis.InfoByPoolType) daysSinceGenesis, err := s.App.ProtoRevKeeper.GetDaysSinceModuleGenesis(s.Ctx) s.Require().NoError(err) diff --git a/x/protorev/keeper/grpc_query.go b/x/protorev/keeper/grpc_query.go index 49f23b4f461..6bf05c7f54a 100644 --- a/x/protorev/keeper/grpc_query.go +++ b/x/protorev/keeper/grpc_query.go @@ -169,15 +169,15 @@ func (q Querier) GetProtoRevDeveloperAccount(c context.Context, req *types.Query return &types.QueryGetProtoRevDeveloperAccountResponse{DeveloperAccount: developerAccount.String()}, nil } -// GetProtoRevPoolWeights queries the weights of each pool type that is being used for arbitrage -func (q Querier) GetProtoRevPoolWeights(c context.Context, req *types.QueryGetProtoRevPoolWeightsRequest) (*types.QueryGetProtoRevPoolWeightsResponse, error) { +// GetProtoRevInfoByPoolType queries information pertaining to each pool type the module is using for arbitrage +func (q Querier) GetProtoRevInfoByPoolType(c context.Context, req *types.QueryGetProtoRevInfoByPoolTypeRequest) (*types.QueryGetProtoRevInfoByPoolTypeResponse, error) { if req == nil { return nil, status.Error(codes.InvalidArgument, "invalid request") } ctx := sdk.UnwrapSDKContext(c) - poolWeights := q.Keeper.GetPoolWeights(ctx) + infoByPoolType := q.Keeper.GetInfoByPoolType(ctx) - return &types.QueryGetProtoRevPoolWeightsResponse{PoolWeights: poolWeights}, nil + return &types.QueryGetProtoRevInfoByPoolTypeResponse{InfoByPoolType: infoByPoolType}, nil } // GetProtoRevPoolPointsPerTx queries the maximum number of pool points that can be consumed per transaction diff --git a/x/protorev/keeper/grpc_query_test.go b/x/protorev/keeper/grpc_query_test.go index de1f85d350c..11b8620dc54 100644 --- a/x/protorev/keeper/grpc_query_test.go +++ b/x/protorev/keeper/grpc_query_test.go @@ -281,20 +281,23 @@ func (s *KeeperTestSuite) TestGetProtoRevDeveloperAccount() { s.Require().Equal(developerAccount.String(), res.DeveloperAccount) } -// TestGetProtoRevPoolWeights tests the query to retrieve the pool weights -func (s *KeeperTestSuite) TestGetProtoRevPoolWeights() { +// TestGetProtoRevInfoByPoolType tests the query to retrieve the pool info +func (s *KeeperTestSuite) TestGetProtoRevInfoByPoolType() { // Set the pool weights - poolWeights := types.PoolWeights{ - StableWeight: 5, - BalancerWeight: 1, - ConcentratedWeight: 3, + poolInfo := types.InfoByPoolType{ + Stable: types.StablePoolInfo{Weight: 1}, + Balancer: types.BalancerPoolInfo{Weight: 1}, + Concentrated: types.ConcentratedPoolInfo{Weight: 1, MaxTicksCrossed: 1}, + Cosmwasm: types.CosmwasmPoolInfo{WeightMaps: []types.WeightMap{ + {ContractAddress: "test", Weight: 1}, + }}, } - s.App.AppKeepers.ProtoRevKeeper.SetPoolWeights(s.Ctx, poolWeights) + s.App.AppKeepers.ProtoRevKeeper.SetInfoByPoolType(s.Ctx, poolInfo) - req := &types.QueryGetProtoRevPoolWeightsRequest{} - res, err := s.queryClient.GetProtoRevPoolWeights(sdk.WrapSDKContext(s.Ctx), req) + req := &types.QueryGetProtoRevInfoByPoolTypeRequest{} + res, err := s.queryClient.GetProtoRevInfoByPoolType(sdk.WrapSDKContext(s.Ctx), req) s.Require().NoError(err) - s.Require().Equal(poolWeights, res.PoolWeights) + s.Require().Equal(poolInfo, res.InfoByPoolType) } // TestGetProtoRevMaxPoolPointsPerTx tests the query to retrieve the max pool points per tx diff --git a/x/protorev/keeper/keeper_test.go b/x/protorev/keeper/keeper_test.go index 0cb50715022..b0e73167292 100644 --- a/x/protorev/keeper/keeper_test.go +++ b/x/protorev/keeper/keeper_test.go @@ -78,13 +78,6 @@ func (s *KeeperTestSuite) SetupTest() { panic(err) } - poolWeights := types.PoolWeights{ - StableWeight: 5, // it takes around 5 ms to simulate and execute a stable swap - BalancerWeight: 2, // it takes around 2 ms to simulate and execute a balancer swap - ConcentratedWeight: 2, // it takes around 2 ms to simulate and execute a concentrated swap - } - s.App.ProtoRevKeeper.SetPoolWeights(s.Ctx, poolWeights) - // Configure the initial base denoms used for cyclic route building baseDenomPriorities := []types.BaseDenom{ { @@ -911,7 +904,17 @@ func (s *KeeperTestSuite) setUpPools() { // Create a cosmwasm pool for testing // Pool 51 - s.PrepareCosmWasmPool() + cwPool := s.PrepareCosmWasmPool() + + // Add the new cosmwasm pool to the pool info + poolInfo := types.DefaultPoolTypeInfo + poolInfo.Cosmwasm.WeightMaps = []types.WeightMap{ + { + ContractAddress: cwPool.GetContractAddress(), + Weight: 4, + }, + } + s.App.ProtoRevKeeper.SetInfoByPoolType(s.Ctx, poolInfo) // Create a concentrated liquidity pool for range testing // Pool 52 diff --git a/x/protorev/keeper/msg_server.go b/x/protorev/keeper/msg_server.go index 04ece97a5b5..d8a2fa53e26 100644 --- a/x/protorev/keeper/msg_server.go +++ b/x/protorev/keeper/msg_server.go @@ -114,10 +114,9 @@ func (m MsgServer) SetMaxPoolPointsPerBlock(c context.Context, msg *types.MsgSet return &types.MsgSetMaxPoolPointsPerBlockResponse{}, nil } -// SetPoolWeights sets the weights corresponding to each pool type. This distinction is necessary because the -// pool types have different execution times. Each weight roughly corresponds to the amount of time (in ms) it takes -// to simulate and execute a trade. -func (m MsgServer) SetPoolWeights(c context.Context, msg *types.MsgSetPoolWeights) (*types.MsgSetPoolWeightsResponse, error) { +// SetInfoByPoolType sets the execution time/gas consumption parameters corresponding to each pool type. +// This distinction is necessary because the pool types have different execution times / gas consumption. +func (m MsgServer) SetInfoByPoolType(c context.Context, msg *types.MsgSetInfoByPoolType) (*types.MsgSetInfoByPoolTypeResponse, error) { ctx := sdk.UnwrapSDKContext(c) // Ensure the account has the admin role and can make the tx @@ -125,9 +124,9 @@ func (m MsgServer) SetPoolWeights(c context.Context, msg *types.MsgSetPoolWeight return nil, err } - m.k.SetPoolWeights(ctx, msg.PoolWeights) + m.k.SetInfoByPoolType(ctx, msg.InfoByPoolType) - return &types.MsgSetPoolWeightsResponse{}, nil + return &types.MsgSetInfoByPoolTypeResponse{}, nil } // SetBaseDenoms sets the base denoms that will be used to generate cyclic arbitrage routes diff --git a/x/protorev/keeper/msg_server_test.go b/x/protorev/keeper/msg_server_test.go index 9ca1a591079..103a751e87d 100644 --- a/x/protorev/keeper/msg_server_test.go +++ b/x/protorev/keeper/msg_server_test.go @@ -465,23 +465,23 @@ func (s *KeeperTestSuite) TestMsgSetMaxPoolPointsPerBlock() { } } -// TestMsgSetPoolWeights tests the MsgSetPoolWeights message. -func (s *KeeperTestSuite) TestMsgSetPoolWeights() { +// TestMsgSetPoolTypeInfo tests the MsgSetInfoByPoolType message. +func (s *KeeperTestSuite) TestMsgSetPoolTypeInfo() { cases := []struct { description string admin string - poolWeights types.PoolWeights + poolInfo types.InfoByPoolType passValidateBasic bool pass bool }{ { "Invalid message (invalid admin)", "admin", - types.PoolWeights{ - StableWeight: 1, - BalancerWeight: 2, - ConcentratedWeight: 3, - CosmwasmWeight: 4, + types.InfoByPoolType{ + Stable: types.StablePoolInfo{Weight: 1}, + Balancer: types.BalancerPoolInfo{Weight: 1}, + Concentrated: types.ConcentratedPoolInfo{Weight: 1, MaxTicksCrossed: 1}, + Cosmwasm: types.CosmwasmPoolInfo{WeightMaps: nil}, }, false, false, @@ -489,11 +489,11 @@ func (s *KeeperTestSuite) TestMsgSetPoolWeights() { { "Invalid message (invalid pool weight)", s.adminAccount.String(), - types.PoolWeights{ - StableWeight: 0, - BalancerWeight: 2, - ConcentratedWeight: 1, - CosmwasmWeight: 4, + types.InfoByPoolType{ + Stable: types.StablePoolInfo{Weight: 0}, + Balancer: types.BalancerPoolInfo{Weight: 1}, + Concentrated: types.ConcentratedPoolInfo{Weight: 1, MaxTicksCrossed: 1}, + Cosmwasm: types.CosmwasmPoolInfo{WeightMaps: nil}, }, false, false, @@ -501,9 +501,10 @@ func (s *KeeperTestSuite) TestMsgSetPoolWeights() { { "Invalid message (unset pool weight)", s.adminAccount.String(), - types.PoolWeights{ - StableWeight: 1, - CosmwasmWeight: 4, + types.InfoByPoolType{ + Stable: types.StablePoolInfo{Weight: 1}, + Concentrated: types.ConcentratedPoolInfo{Weight: 1, MaxTicksCrossed: 1}, + Cosmwasm: types.CosmwasmPoolInfo{WeightMaps: nil}, }, false, false, @@ -511,11 +512,11 @@ func (s *KeeperTestSuite) TestMsgSetPoolWeights() { { "Invalid message (wrong admin)", apptesting.CreateRandomAccounts(1)[0].String(), - types.PoolWeights{ - StableWeight: 1, - BalancerWeight: 2, - ConcentratedWeight: 3, - CosmwasmWeight: 4, + types.InfoByPoolType{ + Stable: types.StablePoolInfo{Weight: 1}, + Balancer: types.BalancerPoolInfo{Weight: 1}, + Concentrated: types.ConcentratedPoolInfo{Weight: 1, MaxTicksCrossed: 1}, + Cosmwasm: types.CosmwasmPoolInfo{WeightMaps: nil}, }, true, false, @@ -523,11 +524,11 @@ func (s *KeeperTestSuite) TestMsgSetPoolWeights() { { "Valid message (correct admin)", s.adminAccount.String(), - types.PoolWeights{ - StableWeight: 1, - BalancerWeight: 2, - ConcentratedWeight: 3, - CosmwasmWeight: 4, + types.InfoByPoolType{ + Stable: types.StablePoolInfo{Weight: 1}, + Balancer: types.BalancerPoolInfo{Weight: 1}, + Concentrated: types.ConcentratedPoolInfo{Weight: 1, MaxTicksCrossed: 1}, + Cosmwasm: types.CosmwasmPoolInfo{WeightMaps: nil}, }, true, true, @@ -536,7 +537,7 @@ func (s *KeeperTestSuite) TestMsgSetPoolWeights() { for _, testCase := range cases { s.Run(testCase.description, func() { - msg := types.NewMsgSetPoolWeights(testCase.admin, testCase.poolWeights) + msg := types.NewMsgSetPoolTypeInfo(testCase.admin, testCase.poolInfo) err := msg.ValidateBasic() if testCase.passValidateBasic { @@ -548,14 +549,14 @@ func (s *KeeperTestSuite) TestMsgSetPoolWeights() { server := keeper.NewMsgServer(*s.App.AppKeepers.ProtoRevKeeper) wrappedCtx := sdk.WrapSDKContext(s.Ctx) - response, err := server.SetPoolWeights(wrappedCtx, msg) + response, err := server.SetInfoByPoolType(wrappedCtx, msg) if testCase.pass { s.Require().NoError(err) - s.Require().Equal(response, &types.MsgSetPoolWeightsResponse{}) + s.Require().Equal(response, &types.MsgSetInfoByPoolTypeResponse{}) - poolWeights := s.App.AppKeepers.ProtoRevKeeper.GetPoolWeights(s.Ctx) + poolWeights := s.App.AppKeepers.ProtoRevKeeper.GetInfoByPoolType(s.Ctx) s.Require().NoError(err) - s.Require().Equal(testCase.poolWeights, poolWeights) + s.Require().Equal(testCase.poolInfo, poolWeights) } else { s.Require().Error(err) } diff --git a/x/protorev/keeper/posthandler_test.go b/x/protorev/keeper/posthandler_test.go index 1897f807669..784d7493a01 100644 --- a/x/protorev/keeper/posthandler_test.go +++ b/x/protorev/keeper/posthandler_test.go @@ -342,7 +342,6 @@ func (s *KeeperTestSuite) TestAnteHandle() { s.Require().NoError(err) err = s.App.ProtoRevKeeper.SetMaxPointsPerBlock(s.Ctx, 100) s.Require().NoError(err) - s.App.ProtoRevKeeper.SetPoolWeights(s.Ctx, types.PoolWeights{StableWeight: 5, BalancerWeight: 2, ConcentratedWeight: 2}) for _, tc := range tests { s.Run(tc.name, func() { @@ -703,7 +702,6 @@ func setUpBenchmarkSuite(msgs []sdk.Msg) (*KeeperTestSuite, authsigning.Tx, sdk. s.Ctx = s.Ctx.WithGasMeter(sdk.NewInfiniteGasMeter()) err := s.App.ProtoRevKeeper.SetMaxPointsPerTx(s.Ctx, 40) s.Require().NoError(err) - s.App.ProtoRevKeeper.SetPoolWeights(s.Ctx, types.PoolWeights{StableWeight: 5, BalancerWeight: 2, ConcentratedWeight: 2}) // Init a new account and fund it with tokens for gas fees priv0, _, addr0 := testdata.KeyTestPubAddr() diff --git a/x/protorev/keeper/protorev.go b/x/protorev/keeper/protorev.go index fac66ce78fe..0a97320eeff 100644 --- a/x/protorev/keeper/protorev.go +++ b/x/protorev/keeper/protorev.go @@ -448,17 +448,17 @@ func (k Keeper) SetMaxPointsPerBlock(ctx sdk.Context, maxPoints uint64) error { return nil } -// GetPoolWeights retrieves the weights of different pool types. The weight of a pool type roughly -// corresponds to the amount of time it will take to simulate and execute a swap on that pool type (in ms). -func (k Keeper) GetPoolWeights(ctx sdk.Context) types.PoolWeights { - store := prefix.NewStore(ctx.KVStore(k.storeKey), types.KeyPrefixPoolWeights) - poolWeights := &types.PoolWeights{} - osmoutils.MustGet(store, types.KeyPrefixPoolWeights, poolWeights) +// GetInfoByPoolType retrieves the metadata about the different pool types. This is used to determine the execution costs of +// different pool types when calculating the optimal route (in terms of time and gas consumption). +func (k Keeper) GetInfoByPoolType(ctx sdk.Context) types.InfoByPoolType { + store := prefix.NewStore(ctx.KVStore(k.storeKey), types.KeyPrefixInfoByPoolType) + poolWeights := &types.InfoByPoolType{} + osmoutils.MustGet(store, types.KeyPrefixInfoByPoolType, poolWeights) return *poolWeights } -// SetPoolWeights sets the weights of different pool types. -func (k Keeper) SetPoolWeights(ctx sdk.Context, poolWeights types.PoolWeights) { - store := prefix.NewStore(ctx.KVStore(k.storeKey), types.KeyPrefixPoolWeights) - osmoutils.MustSet(store, types.KeyPrefixPoolWeights, &poolWeights) +// SetInfoByPoolType sets the pool type information. +func (k Keeper) SetInfoByPoolType(ctx sdk.Context, poolWeights types.InfoByPoolType) { + store := prefix.NewStore(ctx.KVStore(k.storeKey), types.KeyPrefixInfoByPoolType) + osmoutils.MustSet(store, types.KeyPrefixInfoByPoolType, &poolWeights) } diff --git a/x/protorev/keeper/protorev_test.go b/x/protorev/keeper/protorev_test.go index d2cae88e96f..5168e2ac7cf 100644 --- a/x/protorev/keeper/protorev_test.go +++ b/x/protorev/keeper/protorev_test.go @@ -305,21 +305,20 @@ func (s *KeeperTestSuite) TestGetMaxPointsPerBlock() { s.Require().Error(err) } -// TestGetPoolWeights tests the GetPoolWeights and SetPoolWeights functions. -func (s *KeeperTestSuite) TestGetPoolWeights() { - // Should be initialized on genesis - poolWeights := s.App.ProtoRevKeeper.GetPoolWeights(s.Ctx) - s.Require().Equal(types.PoolWeights{StableWeight: 5, BalancerWeight: 2, ConcentratedWeight: 2}, poolWeights) - - // Should be able to set the PoolWeights - newRouteWeights := types.PoolWeights{ - StableWeight: 10, - BalancerWeight: 2, - ConcentratedWeight: 22, +// TestGetInfoByPoolType tests the GetInfoByPoolType and SetInfoByPoolType functions. +func (s *KeeperTestSuite) TestGetInfoByPoolType() { + // Should be able to set the InfoByPoolType + newRouteWeights := types.DefaultPoolTypeInfo + newRouteWeights.Balancer.Weight = 100 + newRouteWeights.Cosmwasm.WeightMaps = []types.WeightMap{ + { + ContractAddress: "contractAddress", + Weight: 1, + }, } - s.App.ProtoRevKeeper.SetPoolWeights(s.Ctx, newRouteWeights) + s.App.ProtoRevKeeper.SetInfoByPoolType(s.Ctx, newRouteWeights) - poolWeights = s.App.ProtoRevKeeper.GetPoolWeights(s.Ctx) + poolWeights := s.App.ProtoRevKeeper.GetInfoByPoolType(s.Ctx) s.Require().Equal(newRouteWeights, poolWeights) } diff --git a/x/protorev/keeper/rebalance.go b/x/protorev/keeper/rebalance.go index f1df9655f2f..1be215948d8 100644 --- a/x/protorev/keeper/rebalance.go +++ b/x/protorev/keeper/rebalance.go @@ -207,6 +207,8 @@ func (k Keeper) CalculateUpperBoundForSearch( ) (sdk.Int, error) { var intermidiateCoin sdk.Coin + poolInfo := k.GetInfoByPoolType(ctx) + // Iterate through all CL pools and determine the maximal amount of input that can be used // respecting the max ticks moved. for index := route.Route.Length() - 1; index >= 0; index-- { @@ -230,7 +232,7 @@ func (k Keeper) CalculateUpperBoundForSearch( ctx, pool.GetId(), tokenInDenom, - types.MaxTicksCrossed, + poolInfo.Concentrated.MaxTicksCrossed, ) if err != nil { return sdk.ZeroInt(), err diff --git a/x/protorev/keeper/routes.go b/x/protorev/keeper/routes.go index 404b6576ee8..d33ee42c900 100644 --- a/x/protorev/keeper/routes.go +++ b/x/protorev/keeper/routes.go @@ -153,7 +153,7 @@ func (k Keeper) BuildHighestLiquidityRoute(ctx sdk.Context, swapDenom types.Base // is only added to the global pool point counter if the route simulated is minimally profitable i.e. it will make a profit. func (k Keeper) CalculateRoutePoolPoints(ctx sdk.Context, route poolmanagertypes.SwapAmountInRoutes) (uint64, error) { // Calculate the number of pool points this route will consume - poolWeights := k.GetPoolWeights(ctx) + infoByPoolType := k.GetInfoByPoolType(ctx) totalWeight := uint64(0) for _, poolId := range route.PoolIds() { @@ -169,13 +169,25 @@ func (k Keeper) CalculateRoutePoolPoints(ctx sdk.Context, route poolmanagertypes switch pool.GetType() { case poolmanagertypes.Balancer: - totalWeight += poolWeights.BalancerWeight + totalWeight += infoByPoolType.Balancer.Weight case poolmanagertypes.Stableswap: - totalWeight += poolWeights.StableWeight + totalWeight += infoByPoolType.Stable.Weight case poolmanagertypes.Concentrated: - totalWeight += poolWeights.ConcentratedWeight + totalWeight += infoByPoolType.Concentrated.Weight case poolmanagertypes.CosmWasm: - totalWeight += poolWeights.CosmwasmWeight + weight, ok := uint64(0), false + for _, weightMap := range infoByPoolType.Cosmwasm.WeightMaps { + if weightMap.ContractAddress == pool.GetAddress().String() { + weight = weightMap.Weight + ok = true + break + } + } + if !ok { + return 0, fmt.Errorf("cosmwasm pool %d does not have a weight", poolId) + } + + totalWeight += weight default: return 0, fmt.Errorf("invalid pool type") } diff --git a/x/protorev/keeper/routes_test.go b/x/protorev/keeper/routes_test.go index 70ac96276a0..86c8e3a2833 100644 --- a/x/protorev/keeper/routes_test.go +++ b/x/protorev/keeper/routes_test.go @@ -199,11 +199,7 @@ func (s *KeeperTestSuite) TestBuildHighestLiquidityRoute() { for _, tc := range cases { s.Run(tc.description, func() { - s.App.ProtoRevKeeper.SetPoolWeights(s.Ctx, types.PoolWeights{ - StableWeight: 5, - BalancerWeight: 2, - ConcentratedWeight: 2, - }) + s.App.ProtoRevKeeper.SetInfoByPoolType(s.Ctx, types.DefaultPoolTypeInfo) baseDenom := types.BaseDenom{ Denom: tc.swapDenom, @@ -274,11 +270,7 @@ func (s *KeeperTestSuite) TestBuildHotRoutes() { for _, tc := range cases { s.Run(tc.description, func() { - s.App.ProtoRevKeeper.SetPoolWeights(s.Ctx, types.PoolWeights{ - StableWeight: 5, - BalancerWeight: 2, - ConcentratedWeight: 2, - }) + s.App.ProtoRevKeeper.SetInfoByPoolType(s.Ctx, types.DefaultPoolTypeInfo) routes, err := s.App.ProtoRevKeeper.BuildHotRoutes(s.Ctx, tc.swapIn, tc.swapOut, tc.poolId) @@ -332,13 +324,13 @@ func (s *KeeperTestSuite) TestCalculateRoutePoolPoints() { { description: "Valid route containing only stable swap pools", route: []poolmanagertypes.SwapAmountInRoute{{PoolId: 40, TokenOutDenom: ""}, {PoolId: 40, TokenOutDenom: ""}, {PoolId: 40, TokenOutDenom: ""}}, - expectedRoutePoolPoints: 9, + expectedRoutePoolPoints: 15, expectedPass: true, }, { description: "Valid route with more than 3 hops", route: []poolmanagertypes.SwapAmountInRoute{{PoolId: 40, TokenOutDenom: ""}, {PoolId: 40, TokenOutDenom: ""}, {PoolId: 40, TokenOutDenom: ""}, {PoolId: 1, TokenOutDenom: ""}}, - expectedRoutePoolPoints: 11, + expectedRoutePoolPoints: 17, expectedPass: true, }, { @@ -356,7 +348,7 @@ func (s *KeeperTestSuite) TestCalculateRoutePoolPoints() { { description: "Valid route with cw pool, balancer, stable swap and cl pool", route: []poolmanagertypes.SwapAmountInRoute{{PoolId: 1, TokenOutDenom: ""}, {PoolId: 51, TokenOutDenom: ""}, {PoolId: 40, TokenOutDenom: ""}, {PoolId: 50, TokenOutDenom: ""}}, - expectedRoutePoolPoints: 10, + expectedRoutePoolPoints: 18, expectedPass: true, }, } @@ -364,12 +356,8 @@ func (s *KeeperTestSuite) TestCalculateRoutePoolPoints() { for _, tc := range cases { s.Run(tc.description, func() { s.SetupTest() - s.App.ProtoRevKeeper.SetPoolWeights(s.Ctx, types.PoolWeights{ - StableWeight: 3, - BalancerWeight: 2, - ConcentratedWeight: 1, - CosmwasmWeight: 4, - }) + s.Require().NoError(s.App.ProtoRevKeeper.SetMaxPointsPerTx(s.Ctx, 25)) + s.Require().NoError(s.App.ProtoRevKeeper.SetMaxPointsPerBlock(s.Ctx, 100)) routePoolPoints, err := s.App.ProtoRevKeeper.CalculateRoutePoolPoints(s.Ctx, tc.route) if tc.expectedPass { diff --git a/x/protorev/types/codec.go b/x/protorev/types/codec.go index ea8308a2e43..c5bf7fe4c5b 100644 --- a/x/protorev/types/codec.go +++ b/x/protorev/types/codec.go @@ -20,7 +20,7 @@ const ( setDeveloperAccount = "osmosis/MsgSetDeveloperAccount" setMaxPoolPointsPerTx = "osmosis/MsgSetMaxPoolPointsPerTx" setMaxPoolPointsPerBlock = "osmosis/MsgSetMaxPoolPointsPerBlock" - setPoolWeights = "osmosis/MsgSetPoolWeights" + setInfoByPoolType = "osmosis/MsgSetInfoByPoolType" setBaseDenoms = "osmosis/MsgSetBaseDenoms" // proposals @@ -40,7 +40,7 @@ func RegisterCodec(cdc *codec.LegacyAmino) { cdc.RegisterConcrete(&MsgSetDeveloperAccount{}, setDeveloperAccount, nil) cdc.RegisterConcrete(&MsgSetMaxPoolPointsPerTx{}, setMaxPoolPointsPerTx, nil) cdc.RegisterConcrete(&MsgSetMaxPoolPointsPerBlock{}, setMaxPoolPointsPerBlock, nil) - cdc.RegisterConcrete(&MsgSetPoolWeights{}, setPoolWeights, nil) + cdc.RegisterConcrete(&MsgSetInfoByPoolType{}, setInfoByPoolType, nil) cdc.RegisterConcrete(&MsgSetBaseDenoms{}, setBaseDenoms, nil) // proposals @@ -55,7 +55,7 @@ func RegisterInterfaces(registry cdctypes.InterfaceRegistry) { &MsgSetDeveloperAccount{}, &MsgSetMaxPoolPointsPerTx{}, &MsgSetMaxPoolPointsPerBlock{}, - &MsgSetPoolWeights{}, + &MsgSetInfoByPoolType{}, &MsgSetBaseDenoms{}, ) diff --git a/x/protorev/types/constants.go b/x/protorev/types/constants.go index ffdc56c2a7f..23c0cbc7772 100644 --- a/x/protorev/types/constants.go +++ b/x/protorev/types/constants.go @@ -27,9 +27,8 @@ const MaxPoolPointsPerTx uint64 = 50 // to the maximum execution time (in ms) of protorev per block const MaxPoolPointsPerBlock uint64 = 200 -// Max number of ticks we can move in a concentrated pool swap. This will be parameterized in a -// follow up PR. -const MaxTicksCrossed uint64 = 5 +// Max number of ticks we can move in a concentrated pool swap. +const MaxTicksCrossed uint64 = 10 // ---------------- Module Profit Splitting Constants ---------------- // diff --git a/x/protorev/types/genesis.go b/x/protorev/types/genesis.go index cb7466f5ce0..aa6672a2fe5 100644 --- a/x/protorev/types/genesis.go +++ b/x/protorev/types/genesis.go @@ -16,14 +16,18 @@ var ( StepSize: sdk.NewInt(1_000_000), }, } - DefaultPoolWeights = PoolWeights{ - StableWeight: 5, // it takes around 5 ms to simulate and execute a stable swap - BalancerWeight: 2, // it takes around 2 ms to simulate and execute a balancer swap - ConcentratedWeight: 2, // it takes around 2 ms to simulate and execute a concentrated swap - - // TODO: This is a temporary weight until we can get a more accurate weight for cosmwasm swaps - // ref: https://github.com/osmosis-labs/osmosis/issues/5858 - CosmwasmWeight: 5, // it takes around 5 ms to simulate and execute a cosmwasm swap + DefaultPoolTypeInfo = InfoByPoolType{ + Balancer: BalancerPoolInfo{ + Weight: 2, // it takes around 2 ms to simulate and execute a balancer swap + }, + Stable: StablePoolInfo{ + Weight: 5, // it takes around 5 ms to simulate and execute a stable swap + }, + Concentrated: ConcentratedPoolInfo{ + Weight: 7, // it takes around 7 ms to simulate and execute a concentrated swap + MaxTicksCrossed: 5, + }, + Cosmwasm: CosmwasmPoolInfo{}, } DefaultDaysSinceModuleGenesis = uint64(0) DefaultDeveloperFees = []sdk.Coin{} @@ -41,7 +45,7 @@ func DefaultGenesis() *GenesisState { Params: DefaultParams(), TokenPairArbRoutes: DefaultTokenPairArbRoutes, BaseDenoms: DefaultBaseDenoms, - PoolWeights: DefaultPoolWeights, + InfoByPoolType: DefaultPoolTypeInfo, DaysSinceModuleGenesis: DefaultDaysSinceModuleGenesis, DeveloperFees: DefaultDeveloperFees, DeveloperAddress: DefaultDeveloperAddress, @@ -65,8 +69,8 @@ func (gs GenesisState) Validate() error { return err } - // Validate the pool weights - if err := gs.PoolWeights.Validate(); err != nil { + // Validate the pool type information + if err := gs.InfoByPoolType.Validate(); err != nil { return err } diff --git a/x/protorev/types/genesis.pb.go b/x/protorev/types/genesis.pb.go index b6f6fded674..a3e31189ba1 100644 --- a/x/protorev/types/genesis.pb.go +++ b/x/protorev/types/genesis.pb.go @@ -36,6 +36,9 @@ type GenesisState struct { BaseDenoms []BaseDenom `protobuf:"bytes,3,rep,name=base_denoms,json=baseDenoms,proto3" json:"base_denoms" yaml:"base_denoms"` // The pool weights that are being used to calculate the weight (compute cost) // of each route. + // + // DEPRECATED: This field is deprecated and will be removed in the next + // release. It is replaced by the `info_by_pool_type` field. PoolWeights PoolWeights `protobuf:"bytes,4,opt,name=pool_weights,json=poolWeights,proto3" json:"pool_weights" yaml:"pool_weights"` // The number of days since module genesis. DaysSinceModuleGenesis uint64 `protobuf:"varint,5,opt,name=days_since_module_genesis,json=daysSinceModuleGenesis,proto3" json:"days_since_module_genesis,omitempty" yaml:"days_since_module_genesis"` @@ -55,6 +58,9 @@ type GenesisState struct { PointCountForBlock uint64 `protobuf:"varint,11,opt,name=point_count_for_block,json=pointCountForBlock,proto3" json:"point_count_for_block,omitempty" yaml:"point_count_for_block"` // All of the profits that have been accumulated by the module. Profits []types.Coin `protobuf:"bytes,12,rep,name=profits,proto3" json:"profits" yaml:"profits"` + // Information that is used to estimate execution time / gas + // consumption of a swap on a given pool type. + InfoByPoolType InfoByPoolType `protobuf:"bytes,13,opt,name=info_by_pool_type,json=infoByPoolType,proto3" json:"info_by_pool_type" yaml:"info_by_pool_type"` } func (m *GenesisState) Reset() { *m = GenesisState{} } @@ -174,6 +180,13 @@ func (m *GenesisState) GetProfits() []types.Coin { return nil } +func (m *GenesisState) GetInfoByPoolType() InfoByPoolType { + if m != nil { + return m.InfoByPoolType + } + return InfoByPoolType{} +} + func init() { proto.RegisterType((*GenesisState)(nil), "osmosis.protorev.v1beta1.GenesisState") } @@ -183,50 +196,53 @@ func init() { } var fileDescriptor_3c77fc2da5752af2 = []byte{ - // 688 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x94, 0xcf, 0x6e, 0xd3, 0x4a, - 0x14, 0xc6, 0xe3, 0xdb, 0xde, 0xfe, 0x99, 0xf4, 0x56, 0xb7, 0xd3, 0x9b, 0xca, 0xc9, 0xa5, 0x8e, - 0x31, 0x2d, 0x64, 0x41, 0x6d, 0xb5, 0x20, 0x21, 0xb1, 0x40, 0xaa, 0x8b, 0x0a, 0x12, 0xa2, 0x8a, - 0xa6, 0x45, 0x48, 0x20, 0x31, 0x8c, 0x93, 0x69, 0x6a, 0xd5, 0xf6, 0x58, 0x9e, 0x49, 0x48, 0x1f, - 0x80, 0x3d, 0x0f, 0xc3, 0x43, 0x74, 0x59, 0xb1, 0x62, 0x15, 0xa1, 0x76, 0xc1, 0x3e, 0x4f, 0x80, - 0x3c, 0x33, 0x49, 0x4a, 0x89, 0x61, 0x97, 0x39, 0xe7, 0x77, 0xbe, 0xef, 0x9c, 0x99, 0xe3, 0x80, - 0xbb, 0x8c, 0xc7, 0x8c, 0x87, 0xdc, 0x4b, 0x33, 0x26, 0x58, 0x46, 0x7b, 0x5e, 0x6f, 0x3b, 0xa0, - 0x82, 0x6c, 0x7b, 0x1d, 0x9a, 0x50, 0x1e, 0x72, 0x57, 0x26, 0xa0, 0xa9, 0x39, 0x77, 0xc4, 0xb9, - 0x9a, 0xab, 0xfd, 0xd7, 0x61, 0x1d, 0x26, 0xa3, 0x5e, 0xfe, 0x4b, 0x01, 0xb5, 0x7b, 0x85, 0xba, - 0x63, 0x01, 0x05, 0x6e, 0x16, 0x83, 0x24, 0x23, 0xb1, 0x36, 0xac, 0x55, 0x5b, 0x92, 0xc3, 0xca, - 0x48, 0x1d, 0x74,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0x17, 0x6f, 0xca, 0x4c, 0x93, 0x66, 0x72, 0x04, 0xf8, 0x0a, 0xac, 0x4d, 0x2b, 0x12, - 0x7d, 0x13, 0x48, 0xf1, 0xdb, 0xc3, 0x41, 0x7d, 0xbd, 0x58, 0x5c, 0xf4, 0x1d, 0x04, 0x6f, 0x2a, - 0x1f, 0xf5, 0xe1, 0x21, 0xa8, 0x48, 0x0a, 0xb7, 0x58, 0x37, 0x11, 0xf8, 0x98, 0x8d, 0x5a, 0x2e, - 0x4b, 0x55, 0x7b, 0xf2, 0x0d, 0x4d, 0xc5, 0x1c, 0x04, 0x65, 0x7c, 0x2f, 0x0f, 0xef, 0x33, 0xdd, - 0xeb, 0x0b, 0x30, 0x9f, 0x66, 0xec, 0x38, 0x14, 0xdc, 0x5c, 0xfa, 0xd3, 0x4a, 0xac, 0xe9, 0x95, - 0x58, 0xd6, 0x2e, 0xaa, 0xce, 0x41, 0x23, 0x05, 0xff, 0xe0, 0xfc, 0xd2, 0x32, 0x2e, 0x2e, 0x2d, - 0xe3, 0xdb, 0xa5, 0x65, 0x7c, 0xba, 0xb2, 0x4a, 0x17, 0x57, 0x56, 0xe9, 0xeb, 0x95, 0x55, 0x7a, - 0xf3, 0xb0, 0x13, 0x8a, 0x93, 0x6e, 0xe0, 0xb6, 0x58, 0xec, 0xe9, 0x8f, 0x67, 0x2b, 0x22, 0x01, - 0x1f, 0x1d, 0xbc, 0xde, 0xf6, 0x23, 0xaf, 0x3f, 0xf9, 0x0f, 0x14, 0x67, 0x29, 0xe5, 0xc1, 0x9c, - 0x3c, 0x3f, 0xf8, 0x11, 0x00, 0x00, 0xff, 0xff, 0xf2, 0x2a, 0x10, 0x89, 0xa5, 0x05, 0x00, 0x00, + // 728 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x94, 0xcd, 0x6e, 0xd3, 0x4a, + 0x14, 0xc7, 0xe3, 0xdb, 0xde, 0xf6, 0x76, 0xd2, 0x46, 0xb7, 0xd3, 0x9b, 0xca, 0xc9, 0xa5, 0x8e, + 0x31, 0x2d, 0x64, 0x41, 0x6d, 0xb5, 0x20, 0x21, 0xb1, 0x40, 0xaa, 0x8b, 0x0a, 0x08, 0x51, 0x45, + 0x6e, 0x11, 0x12, 0x48, 0x0c, 0xe3, 0x64, 0x92, 0x5a, 0xb5, 0x3d, 0x96, 0x67, 0x12, 0x92, 0x07, + 0x60, 0xcf, 0xc3, 0xf0, 0x10, 0x5d, 0x56, 0xac, 0x58, 0x45, 0xa8, 0x7d, 0x83, 0x3c, 0x01, 0xf2, + 0xcc, 0x24, 0xe9, 0x47, 0x0c, 0x3b, 0xcf, 0x39, 0xbf, 0xf3, 0xff, 0x9f, 0x33, 0x1f, 0x06, 0xf7, + 0x29, 0x8b, 0x28, 0x0b, 0x98, 0x93, 0xa4, 0x94, 0xd3, 0x94, 0xf4, 0x9c, 0xde, 0x8e, 0x4f, 0x38, + 0xde, 0x71, 0x3a, 0x24, 0x26, 0x2c, 0x60, 0xb6, 0x48, 0x40, 0x5d, 0x71, 0xf6, 0x98, 0xb3, 0x15, + 0x57, 0xfd, 0xaf, 0x43, 0x3b, 0x54, 0x44, 0x9d, 0xec, 0x4b, 0x02, 0xd5, 0x07, 0xb9, 0xba, 0x13, + 0x01, 0x09, 0x6e, 0xe5, 0x83, 0x38, 0xc5, 0x91, 0x32, 0xac, 0x56, 0x9a, 0x82, 0x43, 0xd2, 0x48, + 0x2e, 0x54, 0xca, 0x90, 0x2b, 0xc7, 0xc7, 0x8c, 0x4c, 0x8a, 0x9b, 0x34, 0x88, 0x65, 0xde, 0x1a, + 0x2e, 0x81, 0xe5, 0x17, 0x72, 0x98, 0x23, 0x8e, 0x39, 0x81, 0xcf, 0xc0, 0x82, 0xd4, 0xd6, 0x35, + 0x53, 0xab, 0x17, 0x77, 0x4d, 0x3b, 0x6f, 0x38, 0xbb, 0x21, 0x38, 0x77, 0xfe, 0x6c, 0x58, 0x2b, + 0x78, 0xaa, 0x0a, 0x7e, 0xd1, 0x40, 0x99, 0xd3, 0x53, 0x12, 0xa3, 0x04, 0x07, 0x29, 0xc2, 0xa9, + 0x8f, 0x52, 0xda, 0xe5, 0x84, 0xe9, 0x7f, 0x99, 0x73, 0xf5, 0xe2, 0xee, 0xc3, 0x7c, 0xbd, 0xe3, + 0xac, 0xac, 0x81, 0x83, 0x74, 0x2f, 0xf5, 0x3d, 0x51, 0xe3, 0x6e, 0x66, 0xda, 0xa3, 0x61, 0xed, + 0xce, 0x00, 0x47, 0xe1, 0x53, 0x6b, 0xa6, 0xb0, 0xe5, 0x41, 0x7e, 0xab, 0x12, 0x7e, 0x02, 0xc5, + 0x6c, 0x66, 0xd4, 0x22, 0x31, 0x8d, 0x98, 0x3e, 0x27, 0xcc, 0xef, 0xe5, 0x9b, 0xbb, 0x98, 0x91, + 0xe7, 0x19, 0xeb, 0x56, 0x95, 0x27, 0x94, 0x9e, 0x57, 0x54, 0x2c, 0x0f, 0xf8, 0x63, 0x8c, 0x41, + 0x02, 0x96, 0x13, 0x4a, 0x43, 0xf4, 0x99, 0x04, 0x9d, 0x13, 0xce, 0xf4, 0x79, 0xb1, 0x5f, 0x5b, + 0xbf, 0xd9, 0x2f, 0x4a, 0xc3, 0x77, 0x12, 0x76, 0xff, 0x57, 0x26, 0x6b, 0xd2, 0xe4, 0xaa, 0x90, + 0xe5, 0x15, 0x93, 0x29, 0x09, 0x11, 0xa8, 0xb4, 0xf0, 0x80, 0x21, 0x16, 0xc4, 0x4d, 0x82, 0x22, + 0xda, 0xea, 0x86, 0x04, 0xa9, 0xfb, 0xa7, 0xff, 0x6d, 0x6a, 0xf5, 0x79, 0x77, 0x73, 0x34, 0xac, + 0x99, 0x52, 0x28, 0x17, 0xb5, 0xbc, 0xf5, 0x2c, 0x77, 0x94, 0xa5, 0xde, 0x88, 0x8c, 0x3a, 0x76, + 0x88, 0x40, 0xa9, 0x45, 0x7a, 0x24, 0xa4, 0x09, 0x49, 0x51, 0x9b, 0x10, 0xa6, 0x2f, 0x88, 0xcd, + 0xaa, 0xd8, 0xea, 0x26, 0x65, 0x33, 0x4f, 0x86, 0xd8, 0xa7, 0x41, 0xec, 0x6e, 0xa8, 0xee, 0xcb, + 0xca, 0xf4, 0x5a, 0xb9, 0xe5, 0xad, 0x4c, 0x02, 0x07, 0x84, 0x30, 0x78, 0x08, 0xd6, 0x42, 0xcc, + 0x09, 0xe3, 0xc8, 0x0f, 0x69, 0xf3, 0x14, 0x9d, 0x88, 0xc9, 0xf4, 0x45, 0xd1, 0xbb, 0x31, 0x1a, + 0xd6, 0xaa, 0x52, 0x66, 0x06, 0x64, 0x79, 0xab, 0x32, 0xea, 0x66, 0xc1, 0x97, 0x22, 0x06, 0x3f, + 0x80, 0xd5, 0xa9, 0x23, 0x6e, 0xb5, 0x52, 0xc2, 0x98, 0xfe, 0x8f, 0xa9, 0xd5, 0x97, 0x5c, 0x7b, + 0x34, 0xac, 0xe9, 0x37, 0x9b, 0x52, 0x88, 0xf5, 0xfd, 0xdb, 0x76, 0x49, 0x8d, 0xb4, 0x27, 0x43, + 0xde, 0xbf, 0x13, 0x4a, 0x45, 0xe0, 0x47, 0x50, 0x89, 0x70, 0x1f, 0x89, 0x03, 0x49, 0x68, 0x10, + 0x73, 0x86, 0x32, 0x0d, 0xd1, 0x94, 0xbe, 0x74, 0x73, 0xbb, 0x73, 0x51, 0xcb, 0x2b, 0x47, 0xb8, + 0x9f, 0x9d, 0x78, 0x43, 0x64, 0x1a, 0x24, 0x15, 0x23, 0xc0, 0xb7, 0x60, 0x7d, 0x56, 0x11, 0xef, + 0xeb, 0x40, 0x88, 0xdf, 0x1d, 0x0d, 0x6b, 0x1b, 0xf9, 0xe2, 0xbc, 0x6f, 0x79, 0xf0, 0xa6, 0xf2, + 0x71, 0x1f, 0x1e, 0x81, 0xb2, 0xa0, 0x50, 0x93, 0x76, 0x63, 0x8e, 0xda, 0x74, 0xdc, 0x72, 0x51, + 0xa8, 0x9a, 0xd3, 0x37, 0x34, 0x13, 0xb3, 0x3c, 0x28, 0xe2, 0xfb, 0x59, 0xf8, 0x80, 0xaa, 0x5e, + 0x5f, 0x83, 0xc5, 0x24, 0xa5, 0xed, 0x80, 0x33, 0x7d, 0xf9, 0x4f, 0x57, 0x62, 0x5d, 0x5d, 0x89, + 0x92, 0x72, 0x91, 0x75, 0x96, 0x37, 0x56, 0x80, 0x5d, 0xb0, 0x1a, 0xc4, 0x6d, 0x8a, 0xfc, 0x81, + 0x1c, 0x8a, 0x0f, 0x12, 0xa2, 0xaf, 0x88, 0x37, 0x53, 0xcf, 0x7f, 0x33, 0xaf, 0xe2, 0x36, 0x75, + 0x07, 0xd9, 0xb4, 0xc7, 0x83, 0x84, 0xb8, 0xa6, 0x72, 0x51, 0x67, 0x7c, 0x4b, 0xd0, 0xf2, 0x4a, + 0xc1, 0xf5, 0x8a, 0xc3, 0xb3, 0x0b, 0x43, 0x3b, 0xbf, 0x30, 0xb4, 0x9f, 0x17, 0x86, 0xf6, 0xf5, + 0xd2, 0x28, 0x9c, 0x5f, 0x1a, 0x85, 0x1f, 0x97, 0x46, 0xe1, 0xfd, 0xe3, 0x4e, 0xc0, 0x4f, 0xba, + 0xbe, 0xdd, 0xa4, 0x91, 0xa3, 0xfc, 0xb7, 0x43, 0xec, 0xb3, 0xf1, 0xc2, 0xe9, 0xed, 0x3c, 0x71, + 0xfa, 0xd3, 0x5f, 0x6f, 0xa6, 0xcf, 0xfc, 0x05, 0xb1, 0x7e, 0xf4, 0x2b, 0x00, 0x00, 0xff, 0xff, + 0x04, 0xad, 0x0a, 0x11, 0x1c, 0x06, 0x00, 0x00, } func (m *GenesisState) Marshal() (dAtA []byte, err error) { @@ -249,6 +265,16 @@ func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + { + size, err := m.InfoByPoolType.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x6a if len(m.Profits) > 0 { for iNdEx := len(m.Profits) - 1; iNdEx >= 0; iNdEx-- { { @@ -424,6 +450,8 @@ func (m *GenesisState) Size() (n int) { n += 1 + l + sovGenesis(uint64(l)) } } + l = m.InfoByPoolType.Size() + n += 1 + l + sovGenesis(uint64(l)) return n } @@ -791,6 +819,39 @@ func (m *GenesisState) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 13: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field InfoByPoolType", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.InfoByPoolType.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenesis(dAtA[iNdEx:]) diff --git a/x/protorev/types/keys.go b/x/protorev/types/keys.go index 86aeb24733a..cb5c906f289 100644 --- a/x/protorev/types/keys.go +++ b/x/protorev/types/keys.go @@ -34,7 +34,7 @@ const ( prefixMaxPoolPointsPerBlock prefixPoolPointCountForBlock prefixLatestBlockHeight - prefixPoolWeights + prefixInfoByPoolType prefixSwapsToBackrun ) @@ -84,8 +84,8 @@ var ( // KeyPrefixLatestBlockHeight is the prefix for store that keeps track of the latest recorded block height KeyPrefixLatestBlockHeight = []byte{prefixLatestBlockHeight} - // KeyPrefixPoolWeights is the prefix for store that keeps track of the weights for different pool types - KeyPrefixPoolWeights = []byte{prefixPoolWeights} + // KeyPrefixInfoByPoolType is the prefix for store that keeps track of the pool type info + KeyPrefixInfoByPoolType = []byte{prefixInfoByPoolType} // KeyPrefixSwapsToBackrun is the prefix for store that keeps track of the swaps that need to be backrun for a given tx KeyPrefixSwapsToBackrun = []byte{prefixSwapsToBackrun} diff --git a/x/protorev/types/msg.go b/x/protorev/types/msg.go index 1210405a36c..26cd32a2a6a 100644 --- a/x/protorev/types/msg.go +++ b/x/protorev/types/msg.go @@ -10,7 +10,7 @@ var ( _ sdk.Msg = &MsgSetDeveloperAccount{} _ sdk.Msg = &MsgSetMaxPoolPointsPerTx{} _ sdk.Msg = &MsgSetMaxPoolPointsPerBlock{} - _ sdk.Msg = &MsgSetPoolWeights{} + _ sdk.Msg = &MsgSetInfoByPoolType{} _ sdk.Msg = &MsgSetBaseDenoms{} ) @@ -19,7 +19,7 @@ const ( TypeMsgSetDeveloperAccount = "set_developer_account" TypeMsgSetMaxPoolPointsPerTx = "set_max_pool_points_per_tx" TypeMsgSetMaxPoolPointsPerBlock = "set_max_pool_points_per_block" - TypeMsgSetPoolWeights = "set_pool_weights" + TypeMsgSetPoolTypeInfo = "set_info_by_pool_type" TypeMsgSetBaseDenoms = "set_base_denoms" ) @@ -205,33 +205,33 @@ func (msg MsgSetMaxPoolPointsPerBlock) GetSigners() []sdk.AccAddress { return []sdk.AccAddress{addr} } -// ---------------------- Interface for MsgSetPoolWeights ---------------------- // -// NewMsgSetPoolWeights creates a new MsgSetPoolWeights instance -func NewMsgSetPoolWeights(admin string, poolWeights PoolWeights) *MsgSetPoolWeights { - return &MsgSetPoolWeights{ - Admin: admin, - PoolWeights: poolWeights, +// ---------------------- Interface for MsgSetInfoByPoolType ---------------------- // +// NewMsgSetPoolTypeInfo creates a new MsgSetInfoByPoolType instance +func NewMsgSetPoolTypeInfo(admin string, infoByPoolType InfoByPoolType) *MsgSetInfoByPoolType { + return &MsgSetInfoByPoolType{ + Admin: admin, + InfoByPoolType: infoByPoolType, } } // Route returns the name of the module -func (msg MsgSetPoolWeights) Route() string { +func (msg MsgSetInfoByPoolType) Route() string { return RouterKey } // Type returns the type of the message -func (msg MsgSetPoolWeights) Type() string { - return TypeMsgSetPoolWeights +func (msg MsgSetInfoByPoolType) Type() string { + return TypeMsgSetPoolTypeInfo } -// ValidateBasic validates the MsgSetPoolWeights -func (msg MsgSetPoolWeights) ValidateBasic() error { +// ValidateBasic validates the MsgSetInfoByPoolType +func (msg MsgSetInfoByPoolType) ValidateBasic() error { // Account must be a valid bech32 address if _, err := sdk.AccAddressFromBech32(msg.Admin); err != nil { return errorsmod.Wrap(err, "invalid admin address (must be bech32)") } - if err := msg.PoolWeights.Validate(); err != nil { + if err := msg.InfoByPoolType.Validate(); err != nil { return err } @@ -239,12 +239,12 @@ func (msg MsgSetPoolWeights) ValidateBasic() error { } // GetSignBytes encodes the message for signing -func (msg MsgSetPoolWeights) GetSignBytes() []byte { +func (msg MsgSetInfoByPoolType) GetSignBytes() []byte { return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(&msg)) } // GetSigners defines whose signature is required -func (msg MsgSetPoolWeights) GetSigners() []sdk.AccAddress { +func (msg MsgSetInfoByPoolType) GetSigners() []sdk.AccAddress { addr := sdk.MustAccAddressFromBech32(msg.Admin) return []sdk.AccAddress{addr} } diff --git a/x/protorev/types/msg_test.go b/x/protorev/types/msg_test.go index 32dcdc40371..93115703be0 100644 --- a/x/protorev/types/msg_test.go +++ b/x/protorev/types/msg_test.go @@ -506,43 +506,79 @@ func TestMsgSetMaxPoolPointsPerBlock(t *testing.T) { } } -func TestMsgSetPoolWeights(t *testing.T) { +func TestMsgSetPoolTypeInfo(t *testing.T) { cases := []struct { - description string - admin string - poolWeights types.PoolWeights - pass bool + description string + admin string + infoByPoolType types.InfoByPoolType + pass bool }{ { "Invalid message (invalid admin)", "admin", - types.PoolWeights{ - BalancerWeight: 1, - StableWeight: 1, - ConcentratedWeight: 1, - CosmwasmWeight: 1, + types.InfoByPoolType{ + Balancer: types.BalancerPoolInfo{Weight: 1}, + Stable: types.StablePoolInfo{Weight: 1}, + Concentrated: types.ConcentratedPoolInfo{Weight: 1, MaxTicksCrossed: 1}, + Cosmwasm: types.CosmwasmPoolInfo{}, }, false, }, { - "Invalid message (invalid pool weights)", + "Invalid message (invalid pool weights for balancer)", createAccount().String(), - types.PoolWeights{ - BalancerWeight: 0, - StableWeight: 1, - ConcentratedWeight: 1, - CosmwasmWeight: 1, + types.InfoByPoolType{ + Balancer: types.BalancerPoolInfo{Weight: 0}, + Stable: types.StablePoolInfo{Weight: 1}, + Concentrated: types.ConcentratedPoolInfo{Weight: 1, MaxTicksCrossed: 1}, + Cosmwasm: types.CosmwasmPoolInfo{}, + }, + false, + }, + { + "Invalid message (invalid pool info for cosmwasm)", + createAccount().String(), + types.InfoByPoolType{ + Balancer: types.BalancerPoolInfo{Weight: 1}, + Stable: types.StablePoolInfo{Weight: 1}, + Concentrated: types.ConcentratedPoolInfo{Weight: 1, MaxTicksCrossed: 1}, + Cosmwasm: types.CosmwasmPoolInfo{ + WeightMaps: []types.WeightMap{ + { + ContractAddress: "contractAddress", + Weight: 1, + }, + }, + }, + }, + false, + }, + { + "Invalid message (invalid pool info for concentrated)", + createAccount().String(), + types.InfoByPoolType{ + Balancer: types.BalancerPoolInfo{Weight: 1}, + Stable: types.StablePoolInfo{Weight: 1}, + Concentrated: types.ConcentratedPoolInfo{Weight: 1}, + Cosmwasm: types.CosmwasmPoolInfo{}, }, false, }, { "Valid message", createAccount().String(), - types.PoolWeights{ - BalancerWeight: 1, - StableWeight: 1, - ConcentratedWeight: 1, - CosmwasmWeight: 1, + types.InfoByPoolType{ + Balancer: types.BalancerPoolInfo{Weight: 1}, + Stable: types.StablePoolInfo{Weight: 1}, + Concentrated: types.ConcentratedPoolInfo{Weight: 1, MaxTicksCrossed: 1}, + Cosmwasm: types.CosmwasmPoolInfo{ + WeightMaps: []types.WeightMap{ + { + ContractAddress: createAccount().String(), + Weight: 1, + }, + }, + }, }, true, }, @@ -550,7 +586,7 @@ func TestMsgSetPoolWeights(t *testing.T) { for _, tc := range cases { t.Run(tc.description, func(t *testing.T) { - msg := types.NewMsgSetPoolWeights(tc.admin, tc.poolWeights) + msg := types.NewMsgSetPoolTypeInfo(tc.admin, tc.infoByPoolType) err := msg.ValidateBasic() if tc.pass { require.NoError(t, err) diff --git a/x/protorev/types/protorev.pb.go b/x/protorev/types/protorev.pb.go index d6409e24beb..2a343ed2ce7 100644 --- a/x/protorev/types/protorev.pb.go +++ b/x/protorev/types/protorev.pb.go @@ -268,6 +268,9 @@ func (m *RouteStatistics) GetRoute() []uint64 { // significantly between the different pool types. Each weight roughly // corresponds to the amount of time (in ms) it takes to execute a swap on that // pool type. +// +// DEPRECATED: This field is deprecated and will be removed in the next +// release. It is replaced by the `info_by_pool_type` field. type PoolWeights struct { // The weight of a stableswap pool StableWeight uint64 `protobuf:"varint,1,opt,name=stable_weight,json=stableWeight,proto3" json:"stable_weight,omitempty" yaml:"stable_weight"` @@ -340,6 +343,332 @@ func (m *PoolWeights) GetCosmwasmWeight() uint64 { return 0 } +// InfoByPoolType contains information pertaining to how expensive (in terms of +// gas and time) it is to execute a swap on a given pool type. This distinction +// is made and necessary because the execution time ranges significantly between +// the different pool types. +type InfoByPoolType struct { + // The stable pool info + Stable StablePoolInfo `protobuf:"bytes,1,opt,name=stable,proto3" json:"stable" yaml:"stable"` + // The balancer pool info + Balancer BalancerPoolInfo `protobuf:"bytes,2,opt,name=balancer,proto3" json:"balancer" yaml:"balancer"` + // The concentrated pool info + Concentrated ConcentratedPoolInfo `protobuf:"bytes,3,opt,name=concentrated,proto3" json:"concentrated" yaml:"concentrated"` + // The cosmwasm pool info + Cosmwasm CosmwasmPoolInfo `protobuf:"bytes,4,opt,name=cosmwasm,proto3" json:"cosmwasm" yaml:"cosmwasm"` +} + +func (m *InfoByPoolType) Reset() { *m = InfoByPoolType{} } +func (m *InfoByPoolType) String() string { return proto.CompactTextString(m) } +func (*InfoByPoolType) ProtoMessage() {} +func (*InfoByPoolType) Descriptor() ([]byte, []int) { + return fileDescriptor_1e9f2391fd9fec01, []int{5} +} +func (m *InfoByPoolType) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *InfoByPoolType) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_InfoByPoolType.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 *InfoByPoolType) XXX_Merge(src proto.Message) { + xxx_messageInfo_InfoByPoolType.Merge(m, src) +} +func (m *InfoByPoolType) XXX_Size() int { + return m.Size() +} +func (m *InfoByPoolType) XXX_DiscardUnknown() { + xxx_messageInfo_InfoByPoolType.DiscardUnknown(m) +} + +var xxx_messageInfo_InfoByPoolType proto.InternalMessageInfo + +func (m *InfoByPoolType) GetStable() StablePoolInfo { + if m != nil { + return m.Stable + } + return StablePoolInfo{} +} + +func (m *InfoByPoolType) GetBalancer() BalancerPoolInfo { + if m != nil { + return m.Balancer + } + return BalancerPoolInfo{} +} + +func (m *InfoByPoolType) GetConcentrated() ConcentratedPoolInfo { + if m != nil { + return m.Concentrated + } + return ConcentratedPoolInfo{} +} + +func (m *InfoByPoolType) GetCosmwasm() CosmwasmPoolInfo { + if m != nil { + return m.Cosmwasm + } + return CosmwasmPoolInfo{} +} + +// StablePoolInfo contains meta data pertaining to a stableswap pool type. +type StablePoolInfo struct { + // The weight of a stableswap pool + Weight uint64 `protobuf:"varint,1,opt,name=weight,proto3" json:"weight,omitempty" yaml:"weight"` +} + +func (m *StablePoolInfo) Reset() { *m = StablePoolInfo{} } +func (m *StablePoolInfo) String() string { return proto.CompactTextString(m) } +func (*StablePoolInfo) ProtoMessage() {} +func (*StablePoolInfo) Descriptor() ([]byte, []int) { + return fileDescriptor_1e9f2391fd9fec01, []int{6} +} +func (m *StablePoolInfo) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *StablePoolInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_StablePoolInfo.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 *StablePoolInfo) XXX_Merge(src proto.Message) { + xxx_messageInfo_StablePoolInfo.Merge(m, src) +} +func (m *StablePoolInfo) XXX_Size() int { + return m.Size() +} +func (m *StablePoolInfo) XXX_DiscardUnknown() { + xxx_messageInfo_StablePoolInfo.DiscardUnknown(m) +} + +var xxx_messageInfo_StablePoolInfo proto.InternalMessageInfo + +func (m *StablePoolInfo) GetWeight() uint64 { + if m != nil { + return m.Weight + } + return 0 +} + +// BalancerPoolInfo contains meta data pertaining to a balancer pool type. +type BalancerPoolInfo struct { + // The weight of a balancer pool + Weight uint64 `protobuf:"varint,1,opt,name=weight,proto3" json:"weight,omitempty" yaml:"weight"` +} + +func (m *BalancerPoolInfo) Reset() { *m = BalancerPoolInfo{} } +func (m *BalancerPoolInfo) String() string { return proto.CompactTextString(m) } +func (*BalancerPoolInfo) ProtoMessage() {} +func (*BalancerPoolInfo) Descriptor() ([]byte, []int) { + return fileDescriptor_1e9f2391fd9fec01, []int{7} +} +func (m *BalancerPoolInfo) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *BalancerPoolInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_BalancerPoolInfo.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 *BalancerPoolInfo) XXX_Merge(src proto.Message) { + xxx_messageInfo_BalancerPoolInfo.Merge(m, src) +} +func (m *BalancerPoolInfo) XXX_Size() int { + return m.Size() +} +func (m *BalancerPoolInfo) XXX_DiscardUnknown() { + xxx_messageInfo_BalancerPoolInfo.DiscardUnknown(m) +} + +var xxx_messageInfo_BalancerPoolInfo proto.InternalMessageInfo + +func (m *BalancerPoolInfo) GetWeight() uint64 { + if m != nil { + return m.Weight + } + return 0 +} + +// ConcentratedPoolInfo contains meta data pertaining to a concentrated pool +// type. +type ConcentratedPoolInfo struct { + // The weight of a concentrated pool + Weight uint64 `protobuf:"varint,1,opt,name=weight,proto3" json:"weight,omitempty" yaml:"weight"` + // The maximum number of ticks we can move when rebalancing + MaxTicksCrossed uint64 `protobuf:"varint,2,opt,name=max_ticks_crossed,json=maxTicksCrossed,proto3" json:"max_ticks_crossed,omitempty" yaml:"max_ticks_crossed"` +} + +func (m *ConcentratedPoolInfo) Reset() { *m = ConcentratedPoolInfo{} } +func (m *ConcentratedPoolInfo) String() string { return proto.CompactTextString(m) } +func (*ConcentratedPoolInfo) ProtoMessage() {} +func (*ConcentratedPoolInfo) Descriptor() ([]byte, []int) { + return fileDescriptor_1e9f2391fd9fec01, []int{8} +} +func (m *ConcentratedPoolInfo) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ConcentratedPoolInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ConcentratedPoolInfo.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 *ConcentratedPoolInfo) XXX_Merge(src proto.Message) { + xxx_messageInfo_ConcentratedPoolInfo.Merge(m, src) +} +func (m *ConcentratedPoolInfo) XXX_Size() int { + return m.Size() +} +func (m *ConcentratedPoolInfo) XXX_DiscardUnknown() { + xxx_messageInfo_ConcentratedPoolInfo.DiscardUnknown(m) +} + +var xxx_messageInfo_ConcentratedPoolInfo proto.InternalMessageInfo + +func (m *ConcentratedPoolInfo) GetWeight() uint64 { + if m != nil { + return m.Weight + } + return 0 +} + +func (m *ConcentratedPoolInfo) GetMaxTicksCrossed() uint64 { + if m != nil { + return m.MaxTicksCrossed + } + return 0 +} + +// CosmwasmPoolInfo contains meta data pertaining to a cosmwasm pool type. +type CosmwasmPoolInfo struct { + // The weight of a cosmwasm pool (by contract address) + WeightMaps []WeightMap `protobuf:"bytes,1,rep,name=weight_maps,json=weightMaps,proto3" json:"weight_maps" yaml:"weight_maps"` +} + +func (m *CosmwasmPoolInfo) Reset() { *m = CosmwasmPoolInfo{} } +func (m *CosmwasmPoolInfo) String() string { return proto.CompactTextString(m) } +func (*CosmwasmPoolInfo) ProtoMessage() {} +func (*CosmwasmPoolInfo) Descriptor() ([]byte, []int) { + return fileDescriptor_1e9f2391fd9fec01, []int{9} +} +func (m *CosmwasmPoolInfo) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *CosmwasmPoolInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_CosmwasmPoolInfo.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 *CosmwasmPoolInfo) XXX_Merge(src proto.Message) { + xxx_messageInfo_CosmwasmPoolInfo.Merge(m, src) +} +func (m *CosmwasmPoolInfo) XXX_Size() int { + return m.Size() +} +func (m *CosmwasmPoolInfo) XXX_DiscardUnknown() { + xxx_messageInfo_CosmwasmPoolInfo.DiscardUnknown(m) +} + +var xxx_messageInfo_CosmwasmPoolInfo proto.InternalMessageInfo + +func (m *CosmwasmPoolInfo) GetWeightMaps() []WeightMap { + if m != nil { + return m.WeightMaps + } + return nil +} + +// WeightMap maps a contract address to a weight. The weight of an address +// corresponds to the amount of ms required to execute a swap on that contract. +type WeightMap struct { + // The weight of a cosmwasm pool (by contract address) + Weight uint64 `protobuf:"varint,1,opt,name=weight,proto3" json:"weight,omitempty" yaml:"weight"` + // The contract address + ContractAddress string `protobuf:"bytes,2,opt,name=contract_address,json=contractAddress,proto3" json:"contract_address,omitempty" yaml:"contract_address"` +} + +func (m *WeightMap) Reset() { *m = WeightMap{} } +func (m *WeightMap) String() string { return proto.CompactTextString(m) } +func (*WeightMap) ProtoMessage() {} +func (*WeightMap) Descriptor() ([]byte, []int) { + return fileDescriptor_1e9f2391fd9fec01, []int{10} +} +func (m *WeightMap) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *WeightMap) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_WeightMap.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 *WeightMap) XXX_Merge(src proto.Message) { + xxx_messageInfo_WeightMap.Merge(m, src) +} +func (m *WeightMap) XXX_Size() int { + return m.Size() +} +func (m *WeightMap) XXX_DiscardUnknown() { + xxx_messageInfo_WeightMap.DiscardUnknown(m) +} + +var xxx_messageInfo_WeightMap proto.InternalMessageInfo + +func (m *WeightMap) GetWeight() uint64 { + if m != nil { + return m.Weight + } + return 0 +} + +func (m *WeightMap) GetContractAddress() string { + if m != nil { + return m.ContractAddress + } + return "" +} + // BaseDenom represents a single base denom that the module uses for its // arbitrage trades. It contains the denom name alongside the step size of the // binary search that is used to find the optimal swap amount @@ -355,7 +684,7 @@ func (m *BaseDenom) Reset() { *m = BaseDenom{} } func (m *BaseDenom) String() string { return proto.CompactTextString(m) } func (*BaseDenom) ProtoMessage() {} func (*BaseDenom) Descriptor() ([]byte, []int) { - return fileDescriptor_1e9f2391fd9fec01, []int{5} + return fileDescriptor_1e9f2391fd9fec01, []int{11} } func (m *BaseDenom) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -397,6 +726,12 @@ func init() { proto.RegisterType((*Trade)(nil), "osmosis.protorev.v1beta1.Trade") proto.RegisterType((*RouteStatistics)(nil), "osmosis.protorev.v1beta1.RouteStatistics") proto.RegisterType((*PoolWeights)(nil), "osmosis.protorev.v1beta1.PoolWeights") + proto.RegisterType((*InfoByPoolType)(nil), "osmosis.protorev.v1beta1.InfoByPoolType") + proto.RegisterType((*StablePoolInfo)(nil), "osmosis.protorev.v1beta1.StablePoolInfo") + proto.RegisterType((*BalancerPoolInfo)(nil), "osmosis.protorev.v1beta1.BalancerPoolInfo") + proto.RegisterType((*ConcentratedPoolInfo)(nil), "osmosis.protorev.v1beta1.ConcentratedPoolInfo") + proto.RegisterType((*CosmwasmPoolInfo)(nil), "osmosis.protorev.v1beta1.CosmwasmPoolInfo") + proto.RegisterType((*WeightMap)(nil), "osmosis.protorev.v1beta1.WeightMap") proto.RegisterType((*BaseDenom)(nil), "osmosis.protorev.v1beta1.BaseDenom") } @@ -405,50 +740,67 @@ func init() { } var fileDescriptor_1e9f2391fd9fec01 = []byte{ - // 682 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x54, 0xbf, 0x6f, 0xd3, 0x40, - 0x14, 0xce, 0x35, 0xe9, 0x8f, 0x5c, 0xdb, 0xa4, 0xb8, 0xa5, 0xb8, 0x19, 0xec, 0xe8, 0x90, 0x4a, - 0x96, 0xda, 0x0a, 0x20, 0x21, 0x55, 0x62, 0xc0, 0x65, 0xa9, 0x90, 0xda, 0xea, 0x5a, 0x09, 0xc1, - 0x62, 0x9d, 0x9d, 0x6b, 0x6a, 0x35, 0xf1, 0x45, 0xbe, 0x4b, 0x4b, 0xfb, 0x57, 0x30, 0xc0, 0xce, - 0xc6, 0x7f, 0xc1, 0xdc, 0xb1, 0x63, 0xc5, 0x60, 0xa1, 0x76, 0x61, 0xf6, 0xca, 0x82, 0x7c, 0x77, - 0x4e, 0xa2, 0x08, 0x24, 0x18, 0x60, 0xca, 0xbd, 0xef, 0xbd, 0xef, 0x7b, 0xf7, 0xbe, 0x77, 0x31, - 0x7c, 0xc4, 0x78, 0x9f, 0xf1, 0x88, 0xbb, 0x83, 0x84, 0x09, 0x96, 0xd0, 0x33, 0xf7, 0xac, 0x1d, - 0x50, 0x41, 0xda, 0x23, 0xc0, 0x91, 0x07, 0xc3, 0xd4, 0x85, 0xce, 0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, 0x7b, 0x22, 0xb8, 0xf1, 0x1c, 0x2e, 0x73, - 0x41, 0x82, 0x1e, 0xf5, 0xcf, 0x25, 0xa2, 0x97, 0x64, 0x66, 0xa9, 0xbd, 0x56, 0xac, 0x78, 0x22, - 0x8d, 0xf0, 0x92, 0x8a, 0x15, 0xdf, 0xd8, 0x81, 0xf5, 0x80, 0xf4, 0x48, 0x1c, 0xd2, 0xa4, 0x10, - 0x98, 0x91, 0x02, 0x8d, 0x2c, 0xb5, 0xd7, 0x95, 0xc0, 0x54, 0x01, 0xc2, 0xb5, 0x02, 0xd1, 0x22, - 0xfb, 0x70, 0x35, 0x64, 0x71, 0x48, 0x63, 0x91, 0x10, 0x41, 0x3b, 0x85, 0x50, 0x59, 0x0a, 0x59, - 0x59, 0x6a, 0x37, 0x94, 0xd0, 0x2f, 0x8a, 0x10, 0x36, 0x26, 0xd1, 0xf1, 0xad, 0x72, 0x3f, 0xcf, - 0x09, 0xef, 0x17, 0x62, 0x95, 0xe9, 0x5b, 0x4d, 0x15, 0x20, 0x5c, 0x2b, 0x10, 0x25, 0x82, 0x3e, - 0x00, 0x58, 0xf5, 0x08, 0xa7, 0x2f, 0x69, 0xcc, 0xfa, 0xb9, 0xbf, 0x9d, 0xfc, 0x20, 0xfd, 0xa9, - 0x4e, 0xfa, 0x2b, 0x61, 0x84, 0x55, 0xfa, 0x9f, 0xff, 0xb9, 0xbc, 0xbd, 0xab, 0x5b, 0x0b, 0x5c, - 0xdf, 0x5a, 0xe0, 0xdb, 0xad, 0x05, 0xde, 0xdf, 0x59, 0xa5, 0xeb, 0x3b, 0xab, 0x74, 0x73, 0x67, - 0x95, 0xde, 0x3e, 0x9d, 0xd0, 0xd7, 0x5f, 0x88, 0xad, 0x1e, 0x09, 0x78, 0x11, 0xb8, 0x67, 0xed, - 0x67, 0xee, 0xbb, 0xf1, 0xe7, 0x5b, 0x76, 0x0c, 0xe6, 0x64, 0xfc, 0xe4, 0x67, 0x00, 0x00, 0x00, - 0xff, 0xff, 0x25, 0xcc, 0x13, 0x2b, 0xdf, 0x05, 0x00, 0x00, + // 950 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x56, 0xcf, 0x6f, 0x1b, 0x45, + 0x14, 0xce, 0xc6, 0x4e, 0x1a, 0x8f, 0x53, 0xdb, 0x99, 0x84, 0xd6, 0x71, 0x91, 0x37, 0x9a, 0x4a, + 0xc5, 0x20, 0x75, 0xad, 0x04, 0x24, 0xa4, 0xa2, 0x1e, 0xba, 0x46, 0x88, 0x08, 0xd1, 0x54, 0x13, + 0x4b, 0x15, 0x5c, 0x96, 0xd9, 0xf5, 0x24, 0x5d, 0xc5, 0xbb, 0x63, 0xed, 0x8c, 0xf3, 0xa3, 0x07, + 0xfe, 0x01, 0x2e, 0x1c, 0xe0, 0xc6, 0x81, 0x1b, 0xff, 0x05, 0xe7, 0x1e, 0x7b, 0xac, 0x38, 0xac, + 0x50, 0x72, 0xe1, 0xbc, 0x57, 0x2e, 0x68, 0xe7, 0xc7, 0xda, 0x71, 0x63, 0x84, 0x0f, 0xf4, 0x94, + 0x99, 0xef, 0x7d, 0xef, 0x7b, 0xf3, 0xbe, 0x37, 0x3b, 0x31, 0xf8, 0x80, 0xf1, 0x88, 0xf1, 0x90, + 0x77, 0x47, 0x09, 0x13, 0x2c, 0xa1, 0xa7, 0xdd, 0xd3, 0x5d, 0x9f, 0x0a, 0xb2, 0x5b, 0x00, 0x8e, + 0x5c, 0xc0, 0xa6, 0x26, 0x3a, 0x05, 0xae, 0x89, 0xad, 0xed, 0x40, 0x86, 0x3c, 0x19, 0xe8, 0xaa, + 0x8d, 0x62, 0xb5, 0xb6, 0x8e, 0xd9, 0x31, 0x53, 0x78, 0xbe, 0xd2, 0x68, 0x5b, 0x71, 0xba, 0x3e, + 0xe1, 0xb4, 0x28, 0x17, 0xb0, 0x30, 0x56, 0x71, 0xf4, 0xc6, 0x02, 0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, 0x0c, 0x49, 0x1c, 0xd0, 0xc4, 0x08, 0x2c, 0x4b, + 0x81, 0x56, 0x96, 0xda, 0x77, 0x94, 0xc0, 0x0c, 0x01, 0xe1, 0x9a, 0x41, 0xb4, 0xc8, 0x01, 0xd8, + 0x0c, 0x58, 0x1c, 0xd0, 0x58, 0x24, 0x44, 0xd0, 0x81, 0x11, 0x2a, 0x49, 0xa1, 0x76, 0x96, 0xda, + 0x2d, 0x25, 0x74, 0x03, 0x09, 0x61, 0x38, 0x8d, 0x4e, 0x4e, 0x95, 0xfb, 0x79, 0x46, 0x78, 0x64, + 0xc4, 0xca, 0xb3, 0xa7, 0x9a, 0x21, 0x20, 0x5c, 0x33, 0x88, 0x12, 0x41, 0xbf, 0x94, 0x40, 0x6d, + 0x3f, 0x3e, 0x62, 0xee, 0x45, 0xee, 0x57, 0xff, 0x62, 0x44, 0xe1, 0x73, 0xb0, 0xaa, 0xba, 0x97, + 0x2e, 0x55, 0xf7, 0x3a, 0xf3, 0xbf, 0xc4, 0x43, 0xc9, 0xcb, 0x33, 0xa5, 0xc6, 0xcc, 0x27, 0xa9, + 0x54, 0x10, 0xd6, 0x72, 0xd0, 0x03, 0x6b, 0xc6, 0x13, 0xe9, 0x5f, 0x75, 0xef, 0xa3, 0xf9, 0xd2, + 0xae, 0x66, 0x16, 0xe2, 0x77, 0xb5, 0x78, 0xfd, 0xba, 0xdf, 0x08, 0x17, 0xa2, 0x90, 0x81, 0xf5, + 0x69, 0x9f, 0xa4, 0xb7, 0xd5, 0x3d, 0x67, 0x7e, 0x91, 0xde, 0x14, 0xbb, 0x28, 0x74, 0x4f, 0x17, + 0xda, 0x7c, 0x7b, 0x1e, 0x08, 0x5f, 0x2b, 0x90, 0x77, 0x64, 0xfc, 0x94, 0xde, 0xff, 0x6b, 0x47, + 0x3d, 0xcd, 0x9c, 0xd7, 0x91, 0x51, 0x42, 0xb8, 0x10, 0x45, 0x9f, 0x81, 0xda, 0x75, 0x8f, 0xe1, + 0x87,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bd, 0xf4, 0xe6, 0xaa, 0xbd, 0xf4, 0xed, 0x27, 0x53, + 0xfa, 0x7a, 0x0e, 0x0f, 0x87, 0xc4, 0xe7, 0x66, 0xd3, 0x3d, 0xdd, 0xfd, 0xb4, 0x7b, 0x3e, 0xf9, + 0x75, 0x25, 0x2b, 0xfa, 0xab, 0x72, 0xff, 0xf1, 0x3f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x86, 0x45, + 0x14, 0x25, 0x7e, 0x09, 0x00, 0x00, } func (this *TokenPairArbRoutes) Equal(that interface{}) bool { @@ -796,7 +1148,7 @@ func (m *PoolWeights) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *BaseDenom) Marshal() (dAtA []byte, err error) { +func (m *InfoByPoolType) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -806,66 +1158,290 @@ func (m *BaseDenom) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *BaseDenom) MarshalTo(dAtA []byte) (int, error) { +func (m *InfoByPoolType) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *BaseDenom) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *InfoByPoolType) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l { - size := m.StepSize.Size() + size, err := m.Cosmwasm.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } i -= size - if _, err := m.StepSize.MarshalTo(dAtA[i:]); err != nil { + i = encodeVarintProtorev(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + { + size, err := m.Concentrated.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintProtorev(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + { + size, err := m.Balancer.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { return 0, err } + i -= size i = encodeVarintProtorev(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x12 - if len(m.Denom) > 0 { - i -= len(m.Denom) - copy(dAtA[i:], m.Denom) - i = encodeVarintProtorev(dAtA, i, uint64(len(m.Denom))) - i-- - dAtA[i] = 0xa + { + size, err := m.Stable.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintProtorev(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0xa return len(dAtA) - i, nil } -func encodeVarintProtorev(dAtA []byte, offset int, v uint64) int { - offset -= sovProtorev(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ +func (m *StablePoolInfo) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } - dAtA[offset] = uint8(v) - return base + return dAtA[:n], nil } -func (m *TokenPairArbRoutes) Size() (n int) { - if m == nil { - return 0 - } + +func (m *StablePoolInfo) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *StablePoolInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i var l int _ = l - if len(m.ArbRoutes) > 0 { - for _, e := range m.ArbRoutes { - l = e.Size() - n += 1 + l + sovProtorev(uint64(l)) - } - } - l = len(m.TokenIn) - if l > 0 { - n += 1 + l + sovProtorev(uint64(l)) - } - l = len(m.TokenOut) - if l > 0 { - n += 1 + l + sovProtorev(uint64(l)) + if m.Weight != 0 { + i = encodeVarintProtorev(dAtA, i, uint64(m.Weight)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *BalancerPoolInfo) 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 *BalancerPoolInfo) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *BalancerPoolInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Weight != 0 { + i = encodeVarintProtorev(dAtA, i, uint64(m.Weight)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *ConcentratedPoolInfo) 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 *ConcentratedPoolInfo) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ConcentratedPoolInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.MaxTicksCrossed != 0 { + i = encodeVarintProtorev(dAtA, i, uint64(m.MaxTicksCrossed)) + i-- + dAtA[i] = 0x10 + } + if m.Weight != 0 { + i = encodeVarintProtorev(dAtA, i, uint64(m.Weight)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *CosmwasmPoolInfo) 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 *CosmwasmPoolInfo) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *CosmwasmPoolInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.WeightMaps) > 0 { + for iNdEx := len(m.WeightMaps) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.WeightMaps[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintProtorev(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *WeightMap) 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 *WeightMap) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *WeightMap) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.ContractAddress) > 0 { + i -= len(m.ContractAddress) + copy(dAtA[i:], m.ContractAddress) + i = encodeVarintProtorev(dAtA, i, uint64(len(m.ContractAddress))) + i-- + dAtA[i] = 0x12 + } + if m.Weight != 0 { + i = encodeVarintProtorev(dAtA, i, uint64(m.Weight)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *BaseDenom) 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 *BaseDenom) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *BaseDenom) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size := m.StepSize.Size() + i -= size + if _, err := m.StepSize.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintProtorev(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + if len(m.Denom) > 0 { + i -= len(m.Denom) + copy(dAtA[i:], m.Denom) + i = encodeVarintProtorev(dAtA, i, uint64(len(m.Denom))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintProtorev(dAtA []byte, offset int, v uint64) int { + offset -= sovProtorev(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *TokenPairArbRoutes) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.ArbRoutes) > 0 { + for _, e := range m.ArbRoutes { + l = e.Size() + n += 1 + l + sovProtorev(uint64(l)) + } + } + l = len(m.TokenIn) + if l > 0 { + n += 1 + l + sovProtorev(uint64(l)) + } + l = len(m.TokenOut) + if l > 0 { + n += 1 + l + sovProtorev(uint64(l)) } return n } @@ -952,6 +1528,93 @@ func (m *PoolWeights) Size() (n int) { return n } +func (m *InfoByPoolType) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Stable.Size() + n += 1 + l + sovProtorev(uint64(l)) + l = m.Balancer.Size() + n += 1 + l + sovProtorev(uint64(l)) + l = m.Concentrated.Size() + n += 1 + l + sovProtorev(uint64(l)) + l = m.Cosmwasm.Size() + n += 1 + l + sovProtorev(uint64(l)) + return n +} + +func (m *StablePoolInfo) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Weight != 0 { + n += 1 + sovProtorev(uint64(m.Weight)) + } + return n +} + +func (m *BalancerPoolInfo) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Weight != 0 { + n += 1 + sovProtorev(uint64(m.Weight)) + } + return n +} + +func (m *ConcentratedPoolInfo) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Weight != 0 { + n += 1 + sovProtorev(uint64(m.Weight)) + } + if m.MaxTicksCrossed != 0 { + n += 1 + sovProtorev(uint64(m.MaxTicksCrossed)) + } + return n +} + +func (m *CosmwasmPoolInfo) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.WeightMaps) > 0 { + for _, e := range m.WeightMaps { + l = e.Size() + n += 1 + l + sovProtorev(uint64(l)) + } + } + return n +} + +func (m *WeightMap) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Weight != 0 { + n += 1 + sovProtorev(uint64(m.Weight)) + } + l = len(m.ContractAddress) + if l > 0 { + n += 1 + l + sovProtorev(uint64(l)) + } + return n +} + func (m *BaseDenom) Size() (n int) { if m == nil { return 0 @@ -1692,6 +2355,599 @@ func (m *PoolWeights) Unmarshal(dAtA []byte) error { } return nil } +func (m *InfoByPoolType) 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 ErrIntOverflowProtorev + } + 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: InfoByPoolType: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: InfoByPoolType: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Stable", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProtorev + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthProtorev + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthProtorev + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Stable.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Balancer", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProtorev + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthProtorev + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthProtorev + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Balancer.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Concentrated", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProtorev + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthProtorev + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthProtorev + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Concentrated.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Cosmwasm", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProtorev + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthProtorev + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthProtorev + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Cosmwasm.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipProtorev(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthProtorev + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *StablePoolInfo) 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 ErrIntOverflowProtorev + } + 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: StablePoolInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: StablePoolInfo: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Weight", wireType) + } + m.Weight = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProtorev + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Weight |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipProtorev(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthProtorev + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *BalancerPoolInfo) 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 ErrIntOverflowProtorev + } + 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: BalancerPoolInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: BalancerPoolInfo: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Weight", wireType) + } + m.Weight = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProtorev + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Weight |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipProtorev(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthProtorev + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ConcentratedPoolInfo) 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 ErrIntOverflowProtorev + } + 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: ConcentratedPoolInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ConcentratedPoolInfo: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Weight", wireType) + } + m.Weight = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProtorev + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Weight |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MaxTicksCrossed", wireType) + } + m.MaxTicksCrossed = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProtorev + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.MaxTicksCrossed |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipProtorev(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthProtorev + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CosmwasmPoolInfo) 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 ErrIntOverflowProtorev + } + 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: CosmwasmPoolInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CosmwasmPoolInfo: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field WeightMaps", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProtorev + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthProtorev + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthProtorev + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.WeightMaps = append(m.WeightMaps, WeightMap{}) + if err := m.WeightMaps[len(m.WeightMaps)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipProtorev(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthProtorev + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *WeightMap) 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 ErrIntOverflowProtorev + } + 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: WeightMap: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: WeightMap: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Weight", wireType) + } + m.Weight = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProtorev + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Weight |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ContractAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProtorev + } + 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 ErrInvalidLengthProtorev + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProtorev + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ContractAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipProtorev(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthProtorev + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *BaseDenom) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 diff --git a/x/protorev/types/query.pb.go b/x/protorev/types/query.pb.go index 5b639a6faa2..eba853f61a9 100644 --- a/x/protorev/types/query.pb.go +++ b/x/protorev/types/query.pb.go @@ -839,23 +839,23 @@ func (m *QueryGetProtoRevDeveloperAccountResponse) GetDeveloperAccount() string return "" } -// QueryGetProtoRevPoolWeightsRequest is request type for the -// Query/GetProtoRevPoolWeights RPC method. -type QueryGetProtoRevPoolWeightsRequest struct { +// QueryGetProtoRevInfoByPoolTypeRequest is request type for the +// Query/GetProtoRevInfoByPoolType RPC method. +type QueryGetProtoRevInfoByPoolTypeRequest struct { } -func (m *QueryGetProtoRevPoolWeightsRequest) Reset() { *m = QueryGetProtoRevPoolWeightsRequest{} } -func (m *QueryGetProtoRevPoolWeightsRequest) String() string { return proto.CompactTextString(m) } -func (*QueryGetProtoRevPoolWeightsRequest) ProtoMessage() {} -func (*QueryGetProtoRevPoolWeightsRequest) Descriptor() ([]byte, []int) { +func (m *QueryGetProtoRevInfoByPoolTypeRequest) Reset() { *m = QueryGetProtoRevInfoByPoolTypeRequest{} } +func (m *QueryGetProtoRevInfoByPoolTypeRequest) String() string { return proto.CompactTextString(m) } +func (*QueryGetProtoRevInfoByPoolTypeRequest) ProtoMessage() {} +func (*QueryGetProtoRevInfoByPoolTypeRequest) Descriptor() ([]byte, []int) { return fileDescriptor_f5e7ac9973cce389, []int{18} } -func (m *QueryGetProtoRevPoolWeightsRequest) XXX_Unmarshal(b []byte) error { +func (m *QueryGetProtoRevInfoByPoolTypeRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *QueryGetProtoRevPoolWeightsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *QueryGetProtoRevInfoByPoolTypeRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_QueryGetProtoRevPoolWeightsRequest.Marshal(b, m, deterministic) + return xxx_messageInfo_QueryGetProtoRevInfoByPoolTypeRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -865,37 +865,40 @@ func (m *QueryGetProtoRevPoolWeightsRequest) XXX_Marshal(b []byte, deterministic return b[:n], nil } } -func (m *QueryGetProtoRevPoolWeightsRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryGetProtoRevPoolWeightsRequest.Merge(m, src) +func (m *QueryGetProtoRevInfoByPoolTypeRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryGetProtoRevInfoByPoolTypeRequest.Merge(m, src) } -func (m *QueryGetProtoRevPoolWeightsRequest) XXX_Size() int { +func (m *QueryGetProtoRevInfoByPoolTypeRequest) XXX_Size() int { return m.Size() } -func (m *QueryGetProtoRevPoolWeightsRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueryGetProtoRevPoolWeightsRequest.DiscardUnknown(m) +func (m *QueryGetProtoRevInfoByPoolTypeRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryGetProtoRevInfoByPoolTypeRequest.DiscardUnknown(m) } -var xxx_messageInfo_QueryGetProtoRevPoolWeightsRequest proto.InternalMessageInfo +var xxx_messageInfo_QueryGetProtoRevInfoByPoolTypeRequest proto.InternalMessageInfo -// QueryGetProtoRevPoolWeightsResponse is response type for the -// Query/GetProtoRevPoolWeights RPC method. -type QueryGetProtoRevPoolWeightsResponse struct { - // pool_weights is a list of all of the pool weights - PoolWeights PoolWeights `protobuf:"bytes,1,opt,name=pool_weights,json=poolWeights,proto3" json:"pool_weights" yaml:"pool_weights"` +// QueryGetProtoRevInfoByPoolTypeResponse is response type for the +// Query/GetProtoRevInfoByPoolType RPC method. +type QueryGetProtoRevInfoByPoolTypeResponse struct { + // InfoByPoolType contains all information pertaining to how different + // pool types are handled by the module. + InfoByPoolType InfoByPoolType `protobuf:"bytes,1,opt,name=info_by_pool_type,json=infoByPoolType,proto3" json:"info_by_pool_type" yaml:"info_by_pool_type"` } -func (m *QueryGetProtoRevPoolWeightsResponse) Reset() { *m = QueryGetProtoRevPoolWeightsResponse{} } -func (m *QueryGetProtoRevPoolWeightsResponse) String() string { return proto.CompactTextString(m) } -func (*QueryGetProtoRevPoolWeightsResponse) ProtoMessage() {} -func (*QueryGetProtoRevPoolWeightsResponse) Descriptor() ([]byte, []int) { +func (m *QueryGetProtoRevInfoByPoolTypeResponse) Reset() { + *m = QueryGetProtoRevInfoByPoolTypeResponse{} +} +func (m *QueryGetProtoRevInfoByPoolTypeResponse) String() string { return proto.CompactTextString(m) } +func (*QueryGetProtoRevInfoByPoolTypeResponse) ProtoMessage() {} +func (*QueryGetProtoRevInfoByPoolTypeResponse) Descriptor() ([]byte, []int) { return fileDescriptor_f5e7ac9973cce389, []int{19} } -func (m *QueryGetProtoRevPoolWeightsResponse) XXX_Unmarshal(b []byte) error { +func (m *QueryGetProtoRevInfoByPoolTypeResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *QueryGetProtoRevPoolWeightsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *QueryGetProtoRevInfoByPoolTypeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_QueryGetProtoRevPoolWeightsResponse.Marshal(b, m, deterministic) + return xxx_messageInfo_QueryGetProtoRevInfoByPoolTypeResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -905,23 +908,23 @@ func (m *QueryGetProtoRevPoolWeightsResponse) XXX_Marshal(b []byte, deterministi return b[:n], nil } } -func (m *QueryGetProtoRevPoolWeightsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryGetProtoRevPoolWeightsResponse.Merge(m, src) +func (m *QueryGetProtoRevInfoByPoolTypeResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryGetProtoRevInfoByPoolTypeResponse.Merge(m, src) } -func (m *QueryGetProtoRevPoolWeightsResponse) XXX_Size() int { +func (m *QueryGetProtoRevInfoByPoolTypeResponse) XXX_Size() int { return m.Size() } -func (m *QueryGetProtoRevPoolWeightsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryGetProtoRevPoolWeightsResponse.DiscardUnknown(m) +func (m *QueryGetProtoRevInfoByPoolTypeResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryGetProtoRevInfoByPoolTypeResponse.DiscardUnknown(m) } -var xxx_messageInfo_QueryGetProtoRevPoolWeightsResponse proto.InternalMessageInfo +var xxx_messageInfo_QueryGetProtoRevInfoByPoolTypeResponse proto.InternalMessageInfo -func (m *QueryGetProtoRevPoolWeightsResponse) GetPoolWeights() PoolWeights { +func (m *QueryGetProtoRevInfoByPoolTypeResponse) GetInfoByPoolType() InfoByPoolType { if m != nil { - return m.PoolWeights + return m.InfoByPoolType } - return PoolWeights{} + return InfoByPoolType{} } // QueryGetProtoRevMaxPoolPointsPerBlockRequest is request type for the @@ -1405,8 +1408,8 @@ func init() { proto.RegisterType((*QueryGetProtoRevAdminAccountResponse)(nil), "osmosis.protorev.v1beta1.QueryGetProtoRevAdminAccountResponse") proto.RegisterType((*QueryGetProtoRevDeveloperAccountRequest)(nil), "osmosis.protorev.v1beta1.QueryGetProtoRevDeveloperAccountRequest") proto.RegisterType((*QueryGetProtoRevDeveloperAccountResponse)(nil), "osmosis.protorev.v1beta1.QueryGetProtoRevDeveloperAccountResponse") - proto.RegisterType((*QueryGetProtoRevPoolWeightsRequest)(nil), "osmosis.protorev.v1beta1.QueryGetProtoRevPoolWeightsRequest") - proto.RegisterType((*QueryGetProtoRevPoolWeightsResponse)(nil), "osmosis.protorev.v1beta1.QueryGetProtoRevPoolWeightsResponse") + proto.RegisterType((*QueryGetProtoRevInfoByPoolTypeRequest)(nil), "osmosis.protorev.v1beta1.QueryGetProtoRevInfoByPoolTypeRequest") + proto.RegisterType((*QueryGetProtoRevInfoByPoolTypeResponse)(nil), "osmosis.protorev.v1beta1.QueryGetProtoRevInfoByPoolTypeResponse") proto.RegisterType((*QueryGetProtoRevMaxPoolPointsPerBlockRequest)(nil), "osmosis.protorev.v1beta1.QueryGetProtoRevMaxPoolPointsPerBlockRequest") proto.RegisterType((*QueryGetProtoRevMaxPoolPointsPerBlockResponse)(nil), "osmosis.protorev.v1beta1.QueryGetProtoRevMaxPoolPointsPerBlockResponse") proto.RegisterType((*QueryGetProtoRevMaxPoolPointsPerTxRequest)(nil), "osmosis.protorev.v1beta1.QueryGetProtoRevMaxPoolPointsPerTxRequest") @@ -1424,103 +1427,103 @@ func init() { } var fileDescriptor_f5e7ac9973cce389 = []byte{ - // 1531 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x58, 0x5d, 0x6f, 0x1b, 0xc5, - 0x1a, 0xce, 0xf6, 0x23, 0x39, 0x9d, 0xb4, 0x3d, 0xed, 0xb4, 0x49, 0x93, 0x4d, 0x6a, 0x3b, 0x93, - 0x38, 0x9f, 0x8d, 0x7d, 0xfa, 0x71, 0x4e, 0x0f, 0x1f, 0x05, 0xb2, 0x0d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44, 0x17, 0xd3, 0xc4, 0x96, 0xf5, 0x46, - 0x01, 0x41, 0xef, 0x26, 0x1a, 0xad, 0xf3, 0x19, 0xd8, 0x94, 0xe9, 0x9c, 0x10, 0x93, 0xf3, 0xb7, - 0xbc, 0xb3, 0x1f, 0x37, 0x99, 0x69, 0x6b, 0x67, 0x43, 0x3b, 0xc1, 0x53, 0xfc, 0x9d, 0x10, 0x3f, - 0xe6, 0xd1, 0x5c, 0xb4, 0xde, 0x86, 0x65, 0x41, 0xc9, 0x60, 0x17, 0x1e, 0x20, 0xd2, 0x2f, 0x08, - 0x08, 0xdd, 0x46, 0x63, 0x02, 0xd4, 0x5f, 0xf7, 0xa3, 0xfd, 0x19, 0x4d, 0xc2, 0xf9, 0x38, 0x1d, - 0x66, 0xe5, 0x12, 0x7d, 0xac, 0xf3, 0x0b, 0x2d, 0x47, 0x4b, 0xbe, 0xee, 0x77, 0x97, 0xeb, 0x99, - 0x65, 0x57, 0x6b, 0xea, 0xac, 0xe1, 0xd1, 0xd0, 0xda, 0x3a, 0xfe, 0x37, 0x2f, 0x7b, 0x2c, 0xbc, - 0xb6, 0x7c, 0x98, 0xe8, 0x62, 0x9a, 0x7c, 0xae, 0xa0, 0x95, 0x01, 0x40, 0x41, 0x4e, 0x05, 0x21, - 0xb7, 0x33, 0x09, 0x6b, 0xbc, 0x92, 0x7c, 0xf0, 0x79, 0x72, 0x08, 0x6d, 0x1a, 0x14, 0x9e, 0x15, - 0x4c, 0xba, 0x50, 0x44, 0x0f, 0xe1, 0x92, 0x35, 0x99, 0xd2, 0x86, 0x65, 0x45, 0xc0, 0x82, 0x7d, - 0xf8, 0x42, 0x41, 0xab, 0x83, 0x44, 0x27, 0x28, 0x38, 0xfa, 0x4f, 0x29, 0xb8, 0xcb, 0xee, 0x53, - 0xbb, 0x60, 0x98, 0xce, 0x86, 0x53, 0xe2, 0xa8, 0x1d, 0x05, 0x1f, 0xc7, 0x28, 0x88, 0x8b, 0x06, - 0x05, 0x6f, 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 0xbd, 0x47, 0xcd, 0x3a, 0x75, 0x4b, 0xa3, 0xfc, 0xfb, 0xea, 0xdf, 0x01, 0x00, - 0x00, 0xff, 0xff, 0xea, 0xd0, 0xea, 0xdc, 0x70, 0x17, 0x00, 0x00, + // 1532 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x58, 0xdb, 0x6f, 0x1b, 0xc5, + 0x17, 0xce, 0xf6, 0x92, 0xfc, 0x3a, 0xbd, 0xfc, 0x9a, 0xa1, 0x49, 0x93, 0x6d, 0x6a, 0x3b, 0x93, + 0x7b, 0xd2, 0xd8, 0xf4, 0x02, 0xe5, 0x56, 0x20, 0xdb, 0x40, 0x15, 0x55, 0x34, 0x66, 0x09, 0x2f, + 0x20, 0x61, 0xd6, 0xf6, 0x24, 0x5d, 0x75, 0xbd, 0xe3, 0xee, 0xae, 0xa3, 0xf8, 0x15, 0x24, 0x10, + 0x12, 0x12, 0xb7, 0x67, 0x04, 0x7f, 0x00, 0xff, 0x40, 0x1f, 0x79, 0xab, 0xe0, 0xa5, 0x08, 0x09, + 0xa1, 0x82, 0x2c, 0xd4, 0xf2, 0xc0, 0xb3, 0xff, 0x02, 0xb4, 0x33, 0x67, 0xed, 0xf5, 0xce, 0xae, + 0xe3, 0x4d, 0x24, 0x9e, 0x62, 0xef, 0x39, 0xe7, 0x3b, 0xdf, 0x37, 0x67, 0x67, 0xe6, 0x73, 0xd0, + 0x2c, 0x73, 0x6b, 0xcc, 0x35, 0xdd, 0x42, 0xdd, 0x61, 0x1e, 0x73, 0xe8, 0x6e, 0x61, 0xf7, 0x72, + 0x99, 0x7a, 0xc6, 0xe5, 0xc2, 0xfd, 0x06, 0x75, 0x9a, 0x79, 0xfe, 0x18, 0x4f, 0x40, 0x56, 0x3e, + 0xc8, 0xca, 0x43, 0x96, 0x7a, 0x6e, 0x87, 0xed, 0x30, 0xfe, 0xb4, 0xe0, 0x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xe9, 0x30, 0x93, 0xfc, 0xc6, 0x74, 0x20, 0x34, 0x15, 0x5e, 0x16, + 0x2c, 0x04, 0x84, 0x50, 0x88, 0x8e, 0xca, 0x9d, 0x4e, 0x24, 0x87, 0x32, 0x51, 0x1e, 0x6f, 0xd8, + 0x46, 0xd9, 0xa2, 0xd5, 0x80, 0xea, 0x26, 0xca, 0x26, 0x66, 0x00, 0xcd, 0x4b, 0x68, 0x84, 0x8a, + 0x47, 0x7c, 0xe9, 0xfe, 0xa7, 0xe1, 0xee, 0x9d, 0x07, 0x01, 0xa2, 0x07, 0x29, 0xe4, 0x73, 0x05, + 0x5d, 0x90, 0x2e, 0x7f, 0xc6, 0xac, 0xe0, 0x9e, 0xbb, 0x86, 0x50, 0x97, 0x2e, 0x6c, 0xe2, 0xb1, + 0xee, 0x01, 0xdd, 0x8d, 0x11, 0xfd, 0x44, 0x47, 0x09, 0xbe, 0x8e, 0x4e, 0x32, 0xef, 0x2e, 0x75, + 0xa0, 0xec, 0x08, 0x2f, 0x1b, 0xef, 0xae, 0x40, 0x28, 0x48, 0x74, 0xc4, 0xbf, 0xf1, 0x42, 0x72, + 0x1b, 0x4d, 0xc5, 0xb3, 0x01, 0x71, 0x2b, 0x68, 0x84, 0x8f, 0xde, 0xac, 0xc2, 0x7b, 0x11, 0x12, + 0x07, 0x01, 0xdf, 0x67, 0x30, 0x66, 0x6d, 0x54, 0xaf, 0x3c, 0x38, 0x8f, 0x8e, 0x73, 0x34, 0xfc, + 0xa9, 0x82, 0x86, 0x85, 0x4b, 0xc4, 0x7d, 0x8e, 0x73, 0xd9, 0x9c, 0xaa, 0xab, 0x03, 0x66, 0x0b, + 0x7a, 0x24, 0xf7, 0xd1, 0xaf, 0x7f, 0x7f, 0x73, 0x44, 0xc5, 0x13, 0x05, 0xc9, 0x33, 0x0b, 0x17, + 0x8a, 0x7f, 0x52, 0xd0, 0x64, 0xa2, 0xaf, 0xc4, 0xaf, 0xed, 0xd3, 0x6e, 0x3f, 0x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 0x98, 0x7e, 0xfc, 0xbd, 0x82, 0xfe, 0x1f, 0x71, 0xd8, + 0xf8, 0xb9, 0x14, 0x66, 0xab, 0xfb, 0xfb, 0x40, 0x7d, 0x3e, 0x6d, 0x19, 0xb0, 0xcc, 0x70, 0x96, + 0x13, 0x78, 0x3c, 0xc6, 0x99, 0x31, 0x66, 0x69, 0x77, 0x1e, 0x3e, 0xc9, 0x28, 0x8f, 0x9e, 0x64, + 0x94, 0xbf, 0x9e, 0x64, 0x94, 0x2f, 0x9f, 0x66, 0x86, 0x1e, 0x3d, 0xcd, 0x0c, 0xfd, 0xfe, 0x34, + 0x33, 0xf4, 0xde, 0xb5, 0xd0, 0x7f, 0x54, 0xa1, 0x76, 0xd5, 0x32, 0xca, 0x6e, 0x07, 0x68, 0xf7, + 0xf2, 0xf5, 0xc2, 0x5e, 0xe8, 0x76, 0x6a, 0xd6, 0xa9, 0x5b, 0x1e, 0xe6, 0xdf, 0xaf, 0xfe, 0x1b, + 0x00, 0x00, 0xff, 0xff, 0xf0, 0x78, 0x37, 0xe1, 0x94, 0x17, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1558,9 +1561,9 @@ type QueryClient interface { GetProtoRevAdminAccount(ctx context.Context, in *QueryGetProtoRevAdminAccountRequest, opts ...grpc.CallOption) (*QueryGetProtoRevAdminAccountResponse, error) // GetProtoRevDeveloperAccount queries the developer account of the module GetProtoRevDeveloperAccount(ctx context.Context, in *QueryGetProtoRevDeveloperAccountRequest, opts ...grpc.CallOption) (*QueryGetProtoRevDeveloperAccountResponse, error) - // GetProtoRevPoolWeights queries the weights of each pool type currently - // being used by the module - GetProtoRevPoolWeights(ctx context.Context, in *QueryGetProtoRevPoolWeightsRequest, opts ...grpc.CallOption) (*QueryGetProtoRevPoolWeightsResponse, error) + // GetProtoRevInfoByPoolType queries pool type information that is currently + // being utilized by the module + GetProtoRevInfoByPoolType(ctx context.Context, in *QueryGetProtoRevInfoByPoolTypeRequest, opts ...grpc.CallOption) (*QueryGetProtoRevInfoByPoolTypeResponse, error) // GetProtoRevMaxPoolPointsPerTx queries the maximum number of pool points // that can be consumed per transaction GetProtoRevMaxPoolPointsPerTx(ctx context.Context, in *QueryGetProtoRevMaxPoolPointsPerTxRequest, opts ...grpc.CallOption) (*QueryGetProtoRevMaxPoolPointsPerTxResponse, error) @@ -1666,9 +1669,9 @@ func (c *queryClient) GetProtoRevDeveloperAccount(ctx context.Context, in *Query return out, nil } -func (c *queryClient) GetProtoRevPoolWeights(ctx context.Context, in *QueryGetProtoRevPoolWeightsRequest, opts ...grpc.CallOption) (*QueryGetProtoRevPoolWeightsResponse, error) { - out := new(QueryGetProtoRevPoolWeightsResponse) - err := c.cc.Invoke(ctx, "/osmosis.protorev.v1beta1.Query/GetProtoRevPoolWeights", in, out, opts...) +func (c *queryClient) GetProtoRevInfoByPoolType(ctx context.Context, in *QueryGetProtoRevInfoByPoolTypeRequest, opts ...grpc.CallOption) (*QueryGetProtoRevInfoByPoolTypeResponse, error) { + out := new(QueryGetProtoRevInfoByPoolTypeResponse) + err := c.cc.Invoke(ctx, "/osmosis.protorev.v1beta1.Query/GetProtoRevInfoByPoolType", in, out, opts...) if err != nil { return nil, err } @@ -1745,9 +1748,9 @@ type QueryServer interface { GetProtoRevAdminAccount(context.Context, *QueryGetProtoRevAdminAccountRequest) (*QueryGetProtoRevAdminAccountResponse, error) // GetProtoRevDeveloperAccount queries the developer account of the module GetProtoRevDeveloperAccount(context.Context, *QueryGetProtoRevDeveloperAccountRequest) (*QueryGetProtoRevDeveloperAccountResponse, error) - // GetProtoRevPoolWeights queries the weights of each pool type currently - // being used by the module - GetProtoRevPoolWeights(context.Context, *QueryGetProtoRevPoolWeightsRequest) (*QueryGetProtoRevPoolWeightsResponse, error) + // GetProtoRevInfoByPoolType queries pool type information that is currently + // being utilized by the module + GetProtoRevInfoByPoolType(context.Context, *QueryGetProtoRevInfoByPoolTypeRequest) (*QueryGetProtoRevInfoByPoolTypeResponse, error) // GetProtoRevMaxPoolPointsPerTx queries the maximum number of pool points // that can be consumed per transaction GetProtoRevMaxPoolPointsPerTx(context.Context, *QueryGetProtoRevMaxPoolPointsPerTxRequest) (*QueryGetProtoRevMaxPoolPointsPerTxResponse, error) @@ -1795,8 +1798,8 @@ func (*UnimplementedQueryServer) GetProtoRevAdminAccount(ctx context.Context, re func (*UnimplementedQueryServer) GetProtoRevDeveloperAccount(ctx context.Context, req *QueryGetProtoRevDeveloperAccountRequest) (*QueryGetProtoRevDeveloperAccountResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetProtoRevDeveloperAccount not implemented") } -func (*UnimplementedQueryServer) GetProtoRevPoolWeights(ctx context.Context, req *QueryGetProtoRevPoolWeightsRequest) (*QueryGetProtoRevPoolWeightsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetProtoRevPoolWeights not implemented") +func (*UnimplementedQueryServer) GetProtoRevInfoByPoolType(ctx context.Context, req *QueryGetProtoRevInfoByPoolTypeRequest) (*QueryGetProtoRevInfoByPoolTypeResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetProtoRevInfoByPoolType not implemented") } func (*UnimplementedQueryServer) GetProtoRevMaxPoolPointsPerTx(ctx context.Context, req *QueryGetProtoRevMaxPoolPointsPerTxRequest) (*QueryGetProtoRevMaxPoolPointsPerTxResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetProtoRevMaxPoolPointsPerTx not implemented") @@ -1980,20 +1983,20 @@ func _Query_GetProtoRevDeveloperAccount_Handler(srv interface{}, ctx context.Con return interceptor(ctx, in, info, handler) } -func _Query_GetProtoRevPoolWeights_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryGetProtoRevPoolWeightsRequest) +func _Query_GetProtoRevInfoByPoolType_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryGetProtoRevInfoByPoolTypeRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(QueryServer).GetProtoRevPoolWeights(ctx, in) + return srv.(QueryServer).GetProtoRevInfoByPoolType(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/osmosis.protorev.v1beta1.Query/GetProtoRevPoolWeights", + FullMethod: "/osmosis.protorev.v1beta1.Query/GetProtoRevInfoByPoolType", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).GetProtoRevPoolWeights(ctx, req.(*QueryGetProtoRevPoolWeightsRequest)) + return srv.(QueryServer).GetProtoRevInfoByPoolType(ctx, req.(*QueryGetProtoRevInfoByPoolTypeRequest)) } return interceptor(ctx, in, info, handler) } @@ -2129,8 +2132,8 @@ var _Query_serviceDesc = grpc.ServiceDesc{ Handler: _Query_GetProtoRevDeveloperAccount_Handler, }, { - MethodName: "GetProtoRevPoolWeights", - Handler: _Query_GetProtoRevPoolWeights_Handler, + MethodName: "GetProtoRevInfoByPoolType", + Handler: _Query_GetProtoRevInfoByPoolType_Handler, }, { MethodName: "GetProtoRevMaxPoolPointsPerTx", @@ -2694,7 +2697,7 @@ func (m *QueryGetProtoRevDeveloperAccountResponse) MarshalToSizedBuffer(dAtA []b return len(dAtA) - i, nil } -func (m *QueryGetProtoRevPoolWeightsRequest) Marshal() (dAtA []byte, err error) { +func (m *QueryGetProtoRevInfoByPoolTypeRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -2704,12 +2707,12 @@ func (m *QueryGetProtoRevPoolWeightsRequest) Marshal() (dAtA []byte, err error) return dAtA[:n], nil } -func (m *QueryGetProtoRevPoolWeightsRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryGetProtoRevInfoByPoolTypeRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryGetProtoRevPoolWeightsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryGetProtoRevInfoByPoolTypeRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -2717,7 +2720,7 @@ func (m *QueryGetProtoRevPoolWeightsRequest) MarshalToSizedBuffer(dAtA []byte) ( return len(dAtA) - i, nil } -func (m *QueryGetProtoRevPoolWeightsResponse) Marshal() (dAtA []byte, err error) { +func (m *QueryGetProtoRevInfoByPoolTypeResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -2727,18 +2730,18 @@ func (m *QueryGetProtoRevPoolWeightsResponse) Marshal() (dAtA []byte, err error) return dAtA[:n], nil } -func (m *QueryGetProtoRevPoolWeightsResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryGetProtoRevInfoByPoolTypeResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryGetProtoRevPoolWeightsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryGetProtoRevInfoByPoolTypeResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l { - size, err := m.PoolWeights.MarshalToSizedBuffer(dAtA[:i]) + size, err := m.InfoByPoolType.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -3253,7 +3256,7 @@ func (m *QueryGetProtoRevDeveloperAccountResponse) Size() (n int) { return n } -func (m *QueryGetProtoRevPoolWeightsRequest) Size() (n int) { +func (m *QueryGetProtoRevInfoByPoolTypeRequest) Size() (n int) { if m == nil { return 0 } @@ -3262,13 +3265,13 @@ func (m *QueryGetProtoRevPoolWeightsRequest) Size() (n int) { return n } -func (m *QueryGetProtoRevPoolWeightsResponse) Size() (n int) { +func (m *QueryGetProtoRevInfoByPoolTypeResponse) Size() (n int) { if m == nil { return 0 } var l int _ = l - l = m.PoolWeights.Size() + l = m.InfoByPoolType.Size() n += 1 + l + sovQuery(uint64(l)) return n } @@ -4705,7 +4708,7 @@ func (m *QueryGetProtoRevDeveloperAccountResponse) Unmarshal(dAtA []byte) error } return nil } -func (m *QueryGetProtoRevPoolWeightsRequest) Unmarshal(dAtA []byte) error { +func (m *QueryGetProtoRevInfoByPoolTypeRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4728,10 +4731,10 @@ func (m *QueryGetProtoRevPoolWeightsRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryGetProtoRevPoolWeightsRequest: wiretype end group for non-group") + return fmt.Errorf("proto: QueryGetProtoRevInfoByPoolTypeRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryGetProtoRevPoolWeightsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryGetProtoRevInfoByPoolTypeRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: @@ -4755,7 +4758,7 @@ func (m *QueryGetProtoRevPoolWeightsRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryGetProtoRevPoolWeightsResponse) Unmarshal(dAtA []byte) error { +func (m *QueryGetProtoRevInfoByPoolTypeResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4778,15 +4781,15 @@ func (m *QueryGetProtoRevPoolWeightsResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryGetProtoRevPoolWeightsResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QueryGetProtoRevInfoByPoolTypeResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryGetProtoRevPoolWeightsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryGetProtoRevInfoByPoolTypeResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PoolWeights", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field InfoByPoolType", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -4813,7 +4816,7 @@ func (m *QueryGetProtoRevPoolWeightsResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.PoolWeights.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.InfoByPoolType.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex diff --git a/x/protorev/types/query.pb.gw.go b/x/protorev/types/query.pb.gw.go index 159161f6ef3..0aab022797c 100644 --- a/x/protorev/types/query.pb.gw.go +++ b/x/protorev/types/query.pb.gw.go @@ -231,20 +231,20 @@ func local_request_Query_GetProtoRevDeveloperAccount_0(ctx context.Context, mars } -func request_Query_GetProtoRevPoolWeights_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryGetProtoRevPoolWeightsRequest +func request_Query_GetProtoRevInfoByPoolType_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryGetProtoRevInfoByPoolTypeRequest var metadata runtime.ServerMetadata - msg, err := client.GetProtoRevPoolWeights(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + msg, err := client.GetProtoRevInfoByPoolType(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } -func local_request_Query_GetProtoRevPoolWeights_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryGetProtoRevPoolWeightsRequest +func local_request_Query_GetProtoRevInfoByPoolType_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryGetProtoRevInfoByPoolTypeRequest var metadata runtime.ServerMetadata - msg, err := server.GetProtoRevPoolWeights(ctx, &protoReq) + msg, err := server.GetProtoRevInfoByPoolType(ctx, &protoReq) return msg, metadata, err } @@ -570,7 +570,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv }) - mux.Handle("GET", pattern_Query_GetProtoRevPoolWeights_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_Query_GetProtoRevInfoByPoolType_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream @@ -581,7 +581,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_Query_GetProtoRevPoolWeights_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_Query_GetProtoRevInfoByPoolType_0(rctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { @@ -589,7 +589,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } - forward_Query_GetProtoRevPoolWeights_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_GetProtoRevInfoByPoolType_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -929,7 +929,7 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie }) - mux.Handle("GET", pattern_Query_GetProtoRevPoolWeights_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_Query_GetProtoRevInfoByPoolType_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) @@ -938,14 +938,14 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_Query_GetProtoRevPoolWeights_0(rctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_Query_GetProtoRevInfoByPoolType_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_GetProtoRevPoolWeights_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_GetProtoRevInfoByPoolType_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -1071,7 +1071,7 @@ var ( pattern_Query_GetProtoRevDeveloperAccount_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"osmosis", "protorev", "developer_account"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_GetProtoRevPoolWeights_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"osmosis", "protorev", "pool_weights"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_GetProtoRevInfoByPoolType_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"osmosis", "protorev", "info_by_pool_type"}, "", runtime.AssumeColonVerbOpt(false))) pattern_Query_GetProtoRevMaxPoolPointsPerTx_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"osmosis", "protorev", "max_pool_points_per_tx"}, "", runtime.AssumeColonVerbOpt(false))) @@ -1103,7 +1103,7 @@ var ( forward_Query_GetProtoRevDeveloperAccount_0 = runtime.ForwardResponseMessage - forward_Query_GetProtoRevPoolWeights_0 = runtime.ForwardResponseMessage + forward_Query_GetProtoRevInfoByPoolType_0 = runtime.ForwardResponseMessage forward_Query_GetProtoRevMaxPoolPointsPerTx_0 = runtime.ForwardResponseMessage diff --git a/x/protorev/types/tx.pb.go b/x/protorev/types/tx.pb.go index a6f8966046e..57ace2f65ec 100644 --- a/x/protorev/types/tx.pb.go +++ b/x/protorev/types/tx.pb.go @@ -217,26 +217,26 @@ func (m *MsgSetDeveloperAccountResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgSetDeveloperAccountResponse proto.InternalMessageInfo -// MsgSetPoolWeights defines the Msg/SetPoolWeights request type. -type MsgSetPoolWeights struct { +// MsgSetInfoByPoolType defines the Msg/SetInfoByPoolType request type. +type MsgSetInfoByPoolType struct { // admin is the account that is authorized to set the pool weights. Admin string `protobuf:"bytes,1,opt,name=admin,proto3" json:"admin,omitempty" yaml:"admin"` - // pool_weights is the list of pool weights to set. - PoolWeights PoolWeights `protobuf:"bytes,2,opt,name=pool_weights,json=poolWeights,proto3" json:"pool_weights" yaml:"pool_weights"` + // info_by_pool_type contains information about the pool types. + InfoByPoolType InfoByPoolType `protobuf:"bytes,2,opt,name=info_by_pool_type,json=infoByPoolType,proto3" json:"info_by_pool_type" yaml:"info_by_pool_type"` } -func (m *MsgSetPoolWeights) Reset() { *m = MsgSetPoolWeights{} } -func (m *MsgSetPoolWeights) String() string { return proto.CompactTextString(m) } -func (*MsgSetPoolWeights) ProtoMessage() {} -func (*MsgSetPoolWeights) Descriptor() ([]byte, []int) { +func (m *MsgSetInfoByPoolType) Reset() { *m = MsgSetInfoByPoolType{} } +func (m *MsgSetInfoByPoolType) String() string { return proto.CompactTextString(m) } +func (*MsgSetInfoByPoolType) ProtoMessage() {} +func (*MsgSetInfoByPoolType) Descriptor() ([]byte, []int) { return fileDescriptor_2783dce032fc6954, []int{4} } -func (m *MsgSetPoolWeights) XXX_Unmarshal(b []byte) error { +func (m *MsgSetInfoByPoolType) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *MsgSetPoolWeights) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *MsgSetInfoByPoolType) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_MsgSetPoolWeights.Marshal(b, m, deterministic) + return xxx_messageInfo_MsgSetInfoByPoolType.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -246,48 +246,48 @@ func (m *MsgSetPoolWeights) XXX_Marshal(b []byte, deterministic bool) ([]byte, e return b[:n], nil } } -func (m *MsgSetPoolWeights) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgSetPoolWeights.Merge(m, src) +func (m *MsgSetInfoByPoolType) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgSetInfoByPoolType.Merge(m, src) } -func (m *MsgSetPoolWeights) XXX_Size() int { +func (m *MsgSetInfoByPoolType) XXX_Size() int { return m.Size() } -func (m *MsgSetPoolWeights) XXX_DiscardUnknown() { - xxx_messageInfo_MsgSetPoolWeights.DiscardUnknown(m) +func (m *MsgSetInfoByPoolType) XXX_DiscardUnknown() { + xxx_messageInfo_MsgSetInfoByPoolType.DiscardUnknown(m) } -var xxx_messageInfo_MsgSetPoolWeights proto.InternalMessageInfo +var xxx_messageInfo_MsgSetInfoByPoolType proto.InternalMessageInfo -func (m *MsgSetPoolWeights) GetAdmin() string { +func (m *MsgSetInfoByPoolType) GetAdmin() string { if m != nil { return m.Admin } return "" } -func (m *MsgSetPoolWeights) GetPoolWeights() PoolWeights { +func (m *MsgSetInfoByPoolType) GetInfoByPoolType() InfoByPoolType { if m != nil { - return m.PoolWeights + return m.InfoByPoolType } - return PoolWeights{} + return InfoByPoolType{} } -// MsgSetPoolWeightsResponse defines the Msg/SetPoolWeights response type. -type MsgSetPoolWeightsResponse struct { +// MsgSetInfoByPoolTypeResponse defines the Msg/SetInfoByPoolType response type. +type MsgSetInfoByPoolTypeResponse struct { } -func (m *MsgSetPoolWeightsResponse) Reset() { *m = MsgSetPoolWeightsResponse{} } -func (m *MsgSetPoolWeightsResponse) String() string { return proto.CompactTextString(m) } -func (*MsgSetPoolWeightsResponse) ProtoMessage() {} -func (*MsgSetPoolWeightsResponse) Descriptor() ([]byte, []int) { +func (m *MsgSetInfoByPoolTypeResponse) Reset() { *m = MsgSetInfoByPoolTypeResponse{} } +func (m *MsgSetInfoByPoolTypeResponse) String() string { return proto.CompactTextString(m) } +func (*MsgSetInfoByPoolTypeResponse) ProtoMessage() {} +func (*MsgSetInfoByPoolTypeResponse) Descriptor() ([]byte, []int) { return fileDescriptor_2783dce032fc6954, []int{5} } -func (m *MsgSetPoolWeightsResponse) XXX_Unmarshal(b []byte) error { +func (m *MsgSetInfoByPoolTypeResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *MsgSetPoolWeightsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *MsgSetInfoByPoolTypeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_MsgSetPoolWeightsResponse.Marshal(b, m, deterministic) + return xxx_messageInfo_MsgSetInfoByPoolTypeResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -297,17 +297,17 @@ func (m *MsgSetPoolWeightsResponse) XXX_Marshal(b []byte, deterministic bool) ([ return b[:n], nil } } -func (m *MsgSetPoolWeightsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgSetPoolWeightsResponse.Merge(m, src) +func (m *MsgSetInfoByPoolTypeResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgSetInfoByPoolTypeResponse.Merge(m, src) } -func (m *MsgSetPoolWeightsResponse) XXX_Size() int { +func (m *MsgSetInfoByPoolTypeResponse) XXX_Size() int { return m.Size() } -func (m *MsgSetPoolWeightsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgSetPoolWeightsResponse.DiscardUnknown(m) +func (m *MsgSetInfoByPoolTypeResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgSetInfoByPoolTypeResponse.DiscardUnknown(m) } -var xxx_messageInfo_MsgSetPoolWeightsResponse proto.InternalMessageInfo +var xxx_messageInfo_MsgSetInfoByPoolTypeResponse proto.InternalMessageInfo // MsgSetMaxPoolPointsPerTx defines the Msg/SetMaxPoolPointsPerTx request type. type MsgSetMaxPoolPointsPerTx struct { @@ -596,8 +596,8 @@ func init() { proto.RegisterType((*MsgSetHotRoutesResponse)(nil), "osmosis.protorev.v1beta1.MsgSetHotRoutesResponse") proto.RegisterType((*MsgSetDeveloperAccount)(nil), "osmosis.protorev.v1beta1.MsgSetDeveloperAccount") proto.RegisterType((*MsgSetDeveloperAccountResponse)(nil), "osmosis.protorev.v1beta1.MsgSetDeveloperAccountResponse") - proto.RegisterType((*MsgSetPoolWeights)(nil), "osmosis.protorev.v1beta1.MsgSetPoolWeights") - proto.RegisterType((*MsgSetPoolWeightsResponse)(nil), "osmosis.protorev.v1beta1.MsgSetPoolWeightsResponse") + proto.RegisterType((*MsgSetInfoByPoolType)(nil), "osmosis.protorev.v1beta1.MsgSetInfoByPoolType") + proto.RegisterType((*MsgSetInfoByPoolTypeResponse)(nil), "osmosis.protorev.v1beta1.MsgSetInfoByPoolTypeResponse") proto.RegisterType((*MsgSetMaxPoolPointsPerTx)(nil), "osmosis.protorev.v1beta1.MsgSetMaxPoolPointsPerTx") proto.RegisterType((*MsgSetMaxPoolPointsPerTxResponse)(nil), "osmosis.protorev.v1beta1.MsgSetMaxPoolPointsPerTxResponse") proto.RegisterType((*MsgSetMaxPoolPointsPerBlock)(nil), "osmosis.protorev.v1beta1.MsgSetMaxPoolPointsPerBlock") @@ -609,62 +609,63 @@ func init() { func init() { proto.RegisterFile("osmosis/protorev/v1beta1/tx.proto", fileDescriptor_2783dce032fc6954) } var fileDescriptor_2783dce032fc6954 = []byte{ - // 876 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x95, 0x4f, 0x6f, 0xe3, 0x44, - 0x18, 0xc6, 0x33, 0x5d, 0x40, 0xec, 0xa4, 0xc0, 0xc6, 0xfb, 0xcf, 0x71, 0xbb, 0x4e, 0x3a, 0xd9, - 0x6a, 0xd3, 0xb2, 0x1b, 0x93, 0xec, 0xa2, 0x45, 0x91, 0x40, 0xaa, 0xb5, 0x07, 0x38, 0x14, 0x45, - 0xde, 0x45, 0x48, 0x1c, 0x30, 0x76, 0x32, 0x38, 0xd6, 0xc6, 0x1e, 0xcb, 0x33, 0x0d, 0xd9, 0x2b, - 0x47, 0x4e, 0x48, 0x48, 0x1c, 0x90, 0xe0, 0x33, 0x20, 0xc4, 0x95, 0x7b, 0xb9, 0x55, 0xf4, 0x40, - 0x85, 0x44, 0x84, 0x5a, 0x24, 0xee, 0xf9, 0x04, 0xc8, 0x33, 0x8e, 0xf3, 0xcf, 0x26, 0x0d, 0xb9, - 0x54, 0xcd, 0xcc, 0x33, 0xcf, 0xfb, 0x7b, 0xde, 0x19, 0xbd, 0x86, 0x3b, 0x84, 0x7a, 0x84, 0xba, - 0x54, 0x0b, 0x42, 0xc2, 0x48, 0x88, 0xfb, 0x5a, 0xbf, 0x6e, 0x63, 0x66, 0xd5, 0x35, 0x36, 0xa8, - 0xf1, 0x35, 0x49, 0x8e, 0x25, 0xb5, 0xb1, 0xa4, 0x16, 0x4b, 0x94, 0x1b, 0x0e, 0x71, 0x08, 0x5f, - 0xd5, 0xa2, 0xff, 0x84, 0x40, 0x29, 0x58, 0x9e, 0xeb, 0x13, 0x8d, 0xff, 0x8d, 0x97, 0xb6, 0x1d, - 0x42, 0x9c, 0x1e, 0xd6, 0xac, 0xc0, 0xd5, 0x2c, 0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, 0x9f, 0x8e, 0x9e, 0x3e, - 0x6e, 0xa4, 0x5f, 0x01, 0x94, 0x33, 0x67, 0xc1, 0xdb, 0xab, 0xe2, 0xf0, 0x63, 0xca, 0xbb, 0xff, - 0xeb, 0x58, 0x12, 0xe4, 0x31, 0x0f, 0x52, 0x47, 0xda, 0xe5, 0x83, 0xf0, 0x91, 0x21, 0xfd, 0x00, - 0xe0, 0xeb, 0x73, 0x1f, 0xb4, 0x37, 0x97, 0xa1, 0x4c, 0x89, 0x95, 0x87, 0x2b, 0x88, 0x13, 0xda, - 0x7d, 0x4e, 0x7b, 0x17, 0xa1, 0x74, 0xda, 0xe9, 0xaf, 0x98, 0xf4, 0x1d, 0x80, 0xaf, 0xcd, 0x4e, - 0x9c, 0xfd, 0x65, 0x25, 0x27, 0x5a, 0xa5, 0x71, 0x79, 0x6d, 0x42, 0xb7, 0xc7, 0xe9, 0x2a, 0x68, - 0x27, 0x9d, 0x6e, 0x6a, 0xce, 0xe8, 0x1f, 0x1e, 0x9f, 0xab, 0xe0, 0xe4, 0x5c, 0x05, 0x7f, 0x9d, - 0xab, 0xe0, 0xeb, 0x0b, 0x35, 0x77, 0x72, 0xa1, 0xe6, 0xce, 0x2e, 0xd4, 0xdc, 0x27, 0x8f, 0x1c, - 0x97, 0x75, 0x8f, 0xec, 0x5a, 0x9b, 0x78, 0x63, 0x9b, 0x07, 0x3d, 0xcb, 0xa6, 0x89, 0x67, 0xbf, - 0xfe, 0x58, 0x1b, 0x4c, 0x9c, 0xd9, 0x8b, 0x00, 0x53, 0xfb, 0x15, 0xfe, 0xfb, 0xe1, 0xbf, 0x01, - 0x00, 0x00, 0xff, 0xff, 0xc6, 0xa0, 0x48, 0x69, 0x14, 0x0b, 0x00, 0x00, + // 889 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x55, 0xc1, 0x6f, 0xdb, 0x54, + 0x1c, 0xee, 0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 0xc7, 0x84, 0x59, 0xe4, 0x90, 0x61, 0x2a, + 0x7d, 0x04, 0x5f, 0x76, 0xfa, 0x81, 0x1f, 0xd6, 0x81, 0x0a, 0xda, 0x97, 0xcd, 0xf6, 0x64, 0xdc, + 0xba, 0x32, 0x72, 0x82, 0x81, 0x81, 0x78, 0x19, 0xfd, 0xfe, 0xcb, 0xbd, 0xf5, 0x94, 0x64, 0xbb, + 0xdf, 0x8f, 0x31, 0xa5, 0x8f, 0x59, 0xec, 0x87, 0x9e, 0x25, 0xda, 0xa4, 0x7d, 0x08, 0x0f, 0x08, + 0xb3, 0x63, 0xce, 0x56, 0x5f, 0x55, 0x2f, 0xb5, 0xd7, 0xba, 0x77, 0xb5, 0xaa, 0x34, 0xb4, 0x3d, + 0xf2, 0x04, 0x87, 0xbb, 0x8e, 0x1f, 0x6f, 0xc7, 0xae, 0x50, 0x60, 0x36, 0x8e, 0xc7, 0xad, 0x95, + 0xc9, 0xb8, 0x55, 0x13, 0x63, 0x67, 0x6c, 0xc8, 0xba, 0x7c, 0x30, 0xd5, 0x69, 0x34, 0xbf, 0xfe, + 0xe7, 0xa7, 0x3b, 0x37, 0xa6, 0x21, 0xcc, 0xb9, 0x40, 0x0d, 0x78, 0x63, 0xae, 0x64, 0x61, 0x1a, + 0x91, 0x90, 0x62, 0x74, 0x0c, 0xe0, 0x75, 0x71, 0xf6, 0x10, 0x1f, 0xe1, 0x01, 0x89, 0x70, 0xbc, + 0xdd, 0xeb, 0x91, 0xc3, 0x90, 0x2d, 0xed, 0xfd, 0x11, 0xac, 0xf5, 0xa7, 0x9c, 0xb6, 0x23, 0x48, + 0xeb, 0xab, 0x9c, 0xab, 0x39, 0x19, 0xb7, 0xea, 0x82, 0xab, 0x00, 0x41, 0xd6, 0xd5, 0xfe, 0x9c, + 0x14, 0x63, 0x33, 0xb1, 0xa7, 0xe4, 0xed, 0xcd, 0xeb, 0x45, 0x2a, 0x54, 0xca, 0x4f, 0x32, 0xb3, + 0xff, 0x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0xb7, + 0xc9, 0x1f, 0xbe, 0x50, 0x5b, 0x66, 0xe4, 0x01, 0x37, 0xd2, 0x41, 0xfa, 0xc5, 0x8d, 0xf0, 0x95, + 0x21, 0xfd, 0x08, 0x60, 0xad, 0xf8, 0xa5, 0xd3, 0xce, 0x53, 0x93, 0xc7, 0xcb, 0xef, 0x2f, 0x86, + 0xbf, 0xe8, 0xa3, 0x53, 0xf8, 0xb8, 0x49, 0xdf, 0x03, 0xf8, 0x5a, 0x7e, 0xff, 0xdc, 0x39, 0x6f, + 0xf4, 0x0c, 0x2b, 0x77, 0x2f, 0x8e, 0xcd, 0x24, 0x6e, 0x71, 0x89, 0x9b, 0x68, 0xa3, 0x5c, 0xe2, + 0x99, 0xad, 0x63, 0x7e, 0x72, 0x7c, 0xa2, 0x80, 0xa7, 0x27, 0x0a, 0xf8, 0xeb, 0x44, 0x01, 0xdf, + 0x9c, 0x2a, 0x2b, 0x4f, 0x4f, 0x95, 0x95, 0xe7, 0xa7, 0xca, 0xca, 0xe7, 0xf7, 0x3d, 0x9f, 0x1d, + 0x1c, 0xba, 0x5a, 0x8f, 0x04, 0x53, 0x9a, 0x7b, 0x03, 0xc7, 0xa5, 0x19, 0xe7, 0x51, 0xe7, 0x81, + 0x3e, 0x9c, 0x31, 0x27, 0x5e, 0xa9, 0xfb, 0x0a, 0xbf, 0x7e, 0xf7, 0xbf, 0x00, 0x00, 0x00, 0xff, + 0xff, 0x62, 0x22, 0x73, 0xe0, 0x3b, 0x0b, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -691,9 +692,9 @@ type MsgClient interface { // SetMaxPoolPointsPerBlock sets the maximum number of pool points that can be // consumed per block. Can only be called by the admin account. SetMaxPoolPointsPerBlock(ctx context.Context, in *MsgSetMaxPoolPointsPerBlock, opts ...grpc.CallOption) (*MsgSetMaxPoolPointsPerBlockResponse, error) - // SetPoolWeights sets the weights of each pool type in the store. Can only be - // called by the admin account. - SetPoolWeights(ctx context.Context, in *MsgSetPoolWeights, opts ...grpc.CallOption) (*MsgSetPoolWeightsResponse, error) + // SetInfoByPoolType sets the pool type information needed to make smart + // assumptions about swapping on different pool types + SetInfoByPoolType(ctx context.Context, in *MsgSetInfoByPoolType, opts ...grpc.CallOption) (*MsgSetInfoByPoolTypeResponse, error) // SetBaseDenoms sets the base denoms that will be used to create cyclic // arbitrage routes. Can only be called by the admin account. SetBaseDenoms(ctx context.Context, in *MsgSetBaseDenoms, opts ...grpc.CallOption) (*MsgSetBaseDenomsResponse, error) @@ -743,9 +744,9 @@ func (c *msgClient) SetMaxPoolPointsPerBlock(ctx context.Context, in *MsgSetMaxP return out, nil } -func (c *msgClient) SetPoolWeights(ctx context.Context, in *MsgSetPoolWeights, opts ...grpc.CallOption) (*MsgSetPoolWeightsResponse, error) { - out := new(MsgSetPoolWeightsResponse) - err := c.cc.Invoke(ctx, "/osmosis.protorev.v1beta1.Msg/SetPoolWeights", in, out, opts...) +func (c *msgClient) SetInfoByPoolType(ctx context.Context, in *MsgSetInfoByPoolType, opts ...grpc.CallOption) (*MsgSetInfoByPoolTypeResponse, error) { + out := new(MsgSetInfoByPoolTypeResponse) + err := c.cc.Invoke(ctx, "/osmosis.protorev.v1beta1.Msg/SetInfoByPoolType", in, out, opts...) if err != nil { return nil, err } @@ -775,9 +776,9 @@ type MsgServer interface { // SetMaxPoolPointsPerBlock sets the maximum number of pool points that can be // consumed per block. Can only be called by the admin account. SetMaxPoolPointsPerBlock(context.Context, *MsgSetMaxPoolPointsPerBlock) (*MsgSetMaxPoolPointsPerBlockResponse, error) - // SetPoolWeights sets the weights of each pool type in the store. Can only be - // called by the admin account. - SetPoolWeights(context.Context, *MsgSetPoolWeights) (*MsgSetPoolWeightsResponse, error) + // SetInfoByPoolType sets the pool type information needed to make smart + // assumptions about swapping on different pool types + SetInfoByPoolType(context.Context, *MsgSetInfoByPoolType) (*MsgSetInfoByPoolTypeResponse, error) // SetBaseDenoms sets the base denoms that will be used to create cyclic // arbitrage routes. Can only be called by the admin account. SetBaseDenoms(context.Context, *MsgSetBaseDenoms) (*MsgSetBaseDenomsResponse, error) @@ -799,8 +800,8 @@ func (*UnimplementedMsgServer) SetMaxPoolPointsPerTx(ctx context.Context, req *M func (*UnimplementedMsgServer) SetMaxPoolPointsPerBlock(ctx context.Context, req *MsgSetMaxPoolPointsPerBlock) (*MsgSetMaxPoolPointsPerBlockResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method SetMaxPoolPointsPerBlock not implemented") } -func (*UnimplementedMsgServer) SetPoolWeights(ctx context.Context, req *MsgSetPoolWeights) (*MsgSetPoolWeightsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method SetPoolWeights not implemented") +func (*UnimplementedMsgServer) SetInfoByPoolType(ctx context.Context, req *MsgSetInfoByPoolType) (*MsgSetInfoByPoolTypeResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SetInfoByPoolType not implemented") } func (*UnimplementedMsgServer) SetBaseDenoms(ctx context.Context, req *MsgSetBaseDenoms) (*MsgSetBaseDenomsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method SetBaseDenoms not implemented") @@ -882,20 +883,20 @@ func _Msg_SetMaxPoolPointsPerBlock_Handler(srv interface{}, ctx context.Context, return interceptor(ctx, in, info, handler) } -func _Msg_SetPoolWeights_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgSetPoolWeights) +func _Msg_SetInfoByPoolType_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgSetInfoByPoolType) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(MsgServer).SetPoolWeights(ctx, in) + return srv.(MsgServer).SetInfoByPoolType(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/osmosis.protorev.v1beta1.Msg/SetPoolWeights", + FullMethod: "/osmosis.protorev.v1beta1.Msg/SetInfoByPoolType", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).SetPoolWeights(ctx, req.(*MsgSetPoolWeights)) + return srv.(MsgServer).SetInfoByPoolType(ctx, req.(*MsgSetInfoByPoolType)) } return interceptor(ctx, in, info, handler) } @@ -939,8 +940,8 @@ var _Msg_serviceDesc = grpc.ServiceDesc{ Handler: _Msg_SetMaxPoolPointsPerBlock_Handler, }, { - MethodName: "SetPoolWeights", - Handler: _Msg_SetPoolWeights_Handler, + MethodName: "SetInfoByPoolType", + Handler: _Msg_SetInfoByPoolType_Handler, }, { MethodName: "SetBaseDenoms", @@ -1078,7 +1079,7 @@ func (m *MsgSetDeveloperAccountResponse) MarshalToSizedBuffer(dAtA []byte) (int, return len(dAtA) - i, nil } -func (m *MsgSetPoolWeights) Marshal() (dAtA []byte, err error) { +func (m *MsgSetInfoByPoolType) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1088,18 +1089,18 @@ func (m *MsgSetPoolWeights) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *MsgSetPoolWeights) MarshalTo(dAtA []byte) (int, error) { +func (m *MsgSetInfoByPoolType) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *MsgSetPoolWeights) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *MsgSetInfoByPoolType) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l { - size, err := m.PoolWeights.MarshalToSizedBuffer(dAtA[:i]) + size, err := m.InfoByPoolType.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -1118,7 +1119,7 @@ func (m *MsgSetPoolWeights) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *MsgSetPoolWeightsResponse) Marshal() (dAtA []byte, err error) { +func (m *MsgSetInfoByPoolTypeResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1128,12 +1129,12 @@ func (m *MsgSetPoolWeightsResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *MsgSetPoolWeightsResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *MsgSetInfoByPoolTypeResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *MsgSetPoolWeightsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *MsgSetInfoByPoolTypeResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -1389,7 +1390,7 @@ func (m *MsgSetDeveloperAccountResponse) Size() (n int) { return n } -func (m *MsgSetPoolWeights) Size() (n int) { +func (m *MsgSetInfoByPoolType) Size() (n int) { if m == nil { return 0 } @@ -1399,12 +1400,12 @@ func (m *MsgSetPoolWeights) Size() (n int) { if l > 0 { n += 1 + l + sovTx(uint64(l)) } - l = m.PoolWeights.Size() + l = m.InfoByPoolType.Size() n += 1 + l + sovTx(uint64(l)) return n } -func (m *MsgSetPoolWeightsResponse) Size() (n int) { +func (m *MsgSetInfoByPoolTypeResponse) Size() (n int) { if m == nil { return 0 } @@ -1827,7 +1828,7 @@ func (m *MsgSetDeveloperAccountResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgSetPoolWeights) Unmarshal(dAtA []byte) error { +func (m *MsgSetInfoByPoolType) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -1850,10 +1851,10 @@ func (m *MsgSetPoolWeights) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgSetPoolWeights: wiretype end group for non-group") + return fmt.Errorf("proto: MsgSetInfoByPoolType: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgSetPoolWeights: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgSetInfoByPoolType: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -1890,7 +1891,7 @@ func (m *MsgSetPoolWeights) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PoolWeights", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field InfoByPoolType", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -1917,7 +1918,7 @@ func (m *MsgSetPoolWeights) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.PoolWeights.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.InfoByPoolType.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -1942,7 +1943,7 @@ func (m *MsgSetPoolWeights) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgSetPoolWeightsResponse) Unmarshal(dAtA []byte) error { +func (m *MsgSetInfoByPoolTypeResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -1965,10 +1966,10 @@ func (m *MsgSetPoolWeightsResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgSetPoolWeightsResponse: wiretype end group for non-group") + return fmt.Errorf("proto: MsgSetInfoByPoolTypeResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgSetPoolWeightsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgSetInfoByPoolTypeResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: diff --git a/x/protorev/types/tx.pb.gw.go b/x/protorev/types/tx.pb.gw.go index dfa28a0f86a..c7bd774100e 100644 --- a/x/protorev/types/tx.pb.gw.go +++ b/x/protorev/types/tx.pb.gw.go @@ -178,37 +178,37 @@ func local_request_Msg_SetMaxPoolPointsPerBlock_0(ctx context.Context, marshaler } var ( - filter_Msg_SetPoolWeights_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} + filter_Msg_SetInfoByPoolType_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} ) -func request_Msg_SetPoolWeights_0(ctx context.Context, marshaler runtime.Marshaler, client MsgClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq MsgSetPoolWeights +func request_Msg_SetInfoByPoolType_0(ctx context.Context, marshaler runtime.Marshaler, client MsgClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq MsgSetInfoByPoolType var metadata runtime.ServerMetadata if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Msg_SetPoolWeights_0); err != nil { + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Msg_SetInfoByPoolType_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.SetPoolWeights(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + msg, err := client.SetInfoByPoolType(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } -func local_request_Msg_SetPoolWeights_0(ctx context.Context, marshaler runtime.Marshaler, server MsgServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq MsgSetPoolWeights +func local_request_Msg_SetInfoByPoolType_0(ctx context.Context, marshaler runtime.Marshaler, server MsgServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq MsgSetInfoByPoolType var metadata runtime.ServerMetadata if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Msg_SetPoolWeights_0); err != nil { + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Msg_SetInfoByPoolType_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.SetPoolWeights(ctx, &protoReq) + msg, err := server.SetInfoByPoolType(ctx, &protoReq) return msg, metadata, err } @@ -347,7 +347,7 @@ func RegisterMsgHandlerServer(ctx context.Context, mux *runtime.ServeMux, server }) - mux.Handle("POST", pattern_Msg_SetPoolWeights_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("POST", pattern_Msg_SetInfoByPoolType_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream @@ -358,7 +358,7 @@ func RegisterMsgHandlerServer(ctx context.Context, mux *runtime.ServeMux, server runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_Msg_SetPoolWeights_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_Msg_SetInfoByPoolType_0(rctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { @@ -366,7 +366,7 @@ func RegisterMsgHandlerServer(ctx context.Context, mux *runtime.ServeMux, server return } - forward_Msg_SetPoolWeights_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Msg_SetInfoByPoolType_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -514,7 +514,7 @@ func RegisterMsgHandlerClient(ctx context.Context, mux *runtime.ServeMux, client }) - mux.Handle("POST", pattern_Msg_SetPoolWeights_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("POST", pattern_Msg_SetInfoByPoolType_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) @@ -523,14 +523,14 @@ func RegisterMsgHandlerClient(ctx context.Context, mux *runtime.ServeMux, client runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_Msg_SetPoolWeights_0(rctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_Msg_SetInfoByPoolType_0(rctx, inboundMarshaler, client, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_Msg_SetPoolWeights_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Msg_SetInfoByPoolType_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -566,7 +566,7 @@ var ( pattern_Msg_SetMaxPoolPointsPerBlock_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"osmosis", "protorev", "set_max_pool_points_per_block"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Msg_SetPoolWeights_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"osmosis", "protorev", "set_pool_weights"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Msg_SetInfoByPoolType_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"osmosis", "protorev", "set_info_by_pool_type"}, "", runtime.AssumeColonVerbOpt(false))) pattern_Msg_SetBaseDenoms_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"osmosis", "protorev", "set_base_denoms"}, "", runtime.AssumeColonVerbOpt(false))) ) @@ -580,7 +580,7 @@ var ( forward_Msg_SetMaxPoolPointsPerBlock_0 = runtime.ForwardResponseMessage - forward_Msg_SetPoolWeights_0 = runtime.ForwardResponseMessage + forward_Msg_SetInfoByPoolType_0 = runtime.ForwardResponseMessage forward_Msg_SetBaseDenoms_0 = runtime.ForwardResponseMessage ) diff --git a/x/protorev/types/validate.go b/x/protorev/types/validate.go index ce8df75707b..8bc2627b855 100644 --- a/x/protorev/types/validate.go +++ b/x/protorev/types/validate.go @@ -42,15 +42,90 @@ func ValidateBaseDenoms(denoms []BaseDenom) error { return nil } -// ---------------------- PoolWeights Validation ---------------------- // -// Validates that the pool weights object is ready for use in the module. -func (pw *PoolWeights) Validate() error { - if pw == nil { - return fmt.Errorf("pool weights cannot be nil") +// ---------------------- InfoByPoolType Validation ---------------------- // +// Validates the information about each pool type that is used throughout the module. +func (info *InfoByPoolType) Validate() error { + if info == nil { + return fmt.Errorf("pool type info cannot be nil") } - if pw.BalancerWeight == 0 || pw.StableWeight == 0 || pw.ConcentratedWeight == 0 || pw.CosmwasmWeight == 0 { - return fmt.Errorf("pool weights cannot be 0") + if err := info.Balancer.Validate(); err != nil { + return err + } + + if err := info.Stable.Validate(); err != nil { + return err + } + + if err := info.Concentrated.Validate(); err != nil { + return err + } + + if err := info.Cosmwasm.Validate(); err != nil { + return err + } + + return nil +} + +// Validates balancer pool information. +func (b *BalancerPoolInfo) Validate() error { + if b == nil { + return fmt.Errorf("balancer pool info cannot be nil") + } + + if b.Weight == 0 { + return fmt.Errorf("balancer pool weight cannot be 0") + } + + return nil +} + +// Validates stable pool information. +func (s *StablePoolInfo) Validate() error { + if s == nil { + return fmt.Errorf("stable pool info cannot be nil") + } + + if s.Weight == 0 { + return fmt.Errorf("stable pool weight cannot be 0") + } + + return nil +} + +// Validates concentrated pool information. +func (c *ConcentratedPoolInfo) Validate() error { + if c == nil { + return fmt.Errorf("concentrated pool info cannot be nil") + } + + if c.Weight == 0 { + return fmt.Errorf("concentrated pool weight cannot be 0") + } + + if c.MaxTicksCrossed == 0 || c.MaxTicksCrossed > MaxTicksCrossed { + return fmt.Errorf("max ticks moved cannot be 0 or greater than %d", MaxTicksCrossed) + } + + return nil +} + +// Validates cosmwasm pool information. +func (c *CosmwasmPoolInfo) Validate() error { + if c == nil { + return fmt.Errorf("cosmwasm pool info cannot be nil") + } + + for _, weightMap := range c.WeightMaps { + address, err := sdk.AccAddressFromBech32(weightMap.ContractAddress) + if err != nil { + return err + } + + if weightMap.Weight == 0 { + return fmt.Errorf("cosmwasm pool weight cannot be 0 for contract address %s", address) + } } return nil