Skip to content

Commit

Permalink
Remove v14 from protos and run proto gen
Browse files Browse the repository at this point in the history
  • Loading branch information
NotJeremyLiu committed Jul 18, 2023
1 parent c26756d commit 920d1a4
Show file tree
Hide file tree
Showing 8 changed files with 247 additions and 252 deletions.
32 changes: 15 additions & 17 deletions proto/osmosis/protorev/v1beta1/query.proto
Original file line number Diff line number Diff line change
Expand Up @@ -15,76 +15,74 @@ option go_package = "github.com/osmosis-labs/osmosis/v16/x/protorev/types";
service Query {
// Params queries the parameters of the module.
rpc Params(QueryParamsRequest) returns (QueryParamsResponse) {
option (google.api.http).get = "/osmosis/v14/protorev/params";
option (google.api.http).get = "/osmosis/protorev/params";
}

// GetProtoRevNumberOfTrades queries the number of arbitrage trades the module
// has executed
rpc GetProtoRevNumberOfTrades(QueryGetProtoRevNumberOfTradesRequest)
returns (QueryGetProtoRevNumberOfTradesResponse) {
option (google.api.http).get = "/osmosis/v14/protorev/number_of_trades";
option (google.api.http).get = "/osmosis/protorev/number_of_trades";
}

// GetProtoRevProfitsByDenom queries the profits of the module by denom
rpc GetProtoRevProfitsByDenom(QueryGetProtoRevProfitsByDenomRequest)
returns (QueryGetProtoRevProfitsByDenomResponse) {
option (google.api.http).get = "/osmosis/v14/protorev/profits_by_denom";
option (google.api.http).get = "/osmosis/protorev/profits_by_denom";
}

// GetProtoRevAllProfits queries all of the profits from the module
rpc GetProtoRevAllProfits(QueryGetProtoRevAllProfitsRequest)
returns (QueryGetProtoRevAllProfitsResponse) {
option (google.api.http).get = "/osmosis/v14/protorev/all_profits";
option (google.api.http).get = "/osmosis/protorev/all_profits";
}

// GetProtoRevStatisticsByRoute queries the number of arbitrages and profits
// that have been executed for a given route
rpc GetProtoRevStatisticsByRoute(QueryGetProtoRevStatisticsByRouteRequest)
returns (QueryGetProtoRevStatisticsByRouteResponse) {
option (google.api.http).get = "/osmosis/v14/protorev/statistics_by_route";
option (google.api.http).get = "/osmosis/protorev/statistics_by_route";
}

// GetProtoRevAllRouteStatistics queries all of routes that the module has
// arbitraged against and the number of trades and profits that have been
// accumulated for each route
rpc GetProtoRevAllRouteStatistics(QueryGetProtoRevAllRouteStatisticsRequest)
returns (QueryGetProtoRevAllRouteStatisticsResponse) {
option (google.api.http).get = "/osmosis/v14/protorev/all_route_statistics";
option (google.api.http).get = "/osmosis/protorev/all_route_statistics";
}

// GetProtoRevTokenPairArbRoutes queries all of the hot routes that the module
// is currently arbitraging
rpc GetProtoRevTokenPairArbRoutes(QueryGetProtoRevTokenPairArbRoutesRequest)
returns (QueryGetProtoRevTokenPairArbRoutesResponse) {
option (google.api.http).get =
"/osmosis/v14/protorev/token_pair_arb_routes";
option (google.api.http).get = "/osmosis/protorev/token_pair_arb_routes";
}

// GetProtoRevAdminAccount queries the admin account of the module
rpc GetProtoRevAdminAccount(QueryGetProtoRevAdminAccountRequest)
returns (QueryGetProtoRevAdminAccountResponse) {
option (google.api.http).get = "/osmosis/v14/protorev/admin_account";
option (google.api.http).get = "/osmosis/protorev/admin_account";
}

// GetProtoRevDeveloperAccount queries the developer account of the module
rpc GetProtoRevDeveloperAccount(QueryGetProtoRevDeveloperAccountRequest)
returns (QueryGetProtoRevDeveloperAccountResponse) {
option (google.api.http).get = "/osmosis/v14/protorev/developer_account";
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/v14/protorev/pool_weights";
option (google.api.http).get = "/osmosis/protorev/pool_weights";
}

// GetProtoRevMaxPoolPointsPerTx queries the maximum number of pool points
// that can be consumed per transaction
rpc GetProtoRevMaxPoolPointsPerTx(QueryGetProtoRevMaxPoolPointsPerTxRequest)
returns (QueryGetProtoRevMaxPoolPointsPerTxResponse) {
option (google.api.http).get =
"/osmosis/v14/protorev/max_pool_points_per_tx";
option (google.api.http).get = "/osmosis/protorev/max_pool_points_per_tx";
}

// GetProtoRevMaxPoolPointsPerBlock queries the maximum number of pool points
Expand All @@ -93,27 +91,27 @@ service Query {
QueryGetProtoRevMaxPoolPointsPerBlockRequest)
returns (QueryGetProtoRevMaxPoolPointsPerBlockResponse) {
option (google.api.http).get =
"/osmosis/v14/protorev/max_pool_points_per_block";
"/osmosis/protorev/max_pool_points_per_block";
}

// GetProtoRevBaseDenoms queries the base denoms that the module is currently
// utilizing for arbitrage
rpc GetProtoRevBaseDenoms(QueryGetProtoRevBaseDenomsRequest)
returns (QueryGetProtoRevBaseDenomsResponse) {
option (google.api.http).get = "/osmosis/v14/protorev/base_denoms";
option (google.api.http).get = "/osmosis/protorev/base_denoms";
}

// GetProtoRevEnabled queries whether the module is enabled or not
rpc GetProtoRevEnabled(QueryGetProtoRevEnabledRequest)
returns (QueryGetProtoRevEnabledResponse) {
option (google.api.http).get = "/osmosis/v14/protorev/enabled";
option (google.api.http).get = "/osmosis/protorev/enabled";
}

// GetProtoRevPool queries the pool id used via the highest liquidity method
// for arbitrage route building given a pair of denominations
rpc GetProtoRevPool(QueryGetProtoRevPoolRequest)
returns (QueryGetProtoRevPoolResponse) {
option (google.api.http).get = "/osmosis/v14/protorev/pool";
option (google.api.http).get = "/osmosis/protorev/pool";
}
}

Expand Down
13 changes: 6 additions & 7 deletions proto/osmosis/protorev/v1beta1/tx.proto
Original file line number Diff line number Diff line change
Expand Up @@ -13,43 +13,42 @@ service Msg {
// SetHotRoutes sets the hot routes that will be explored when creating
// cyclic arbitrage routes. Can only be called by the admin account.
rpc SetHotRoutes(MsgSetHotRoutes) returns (MsgSetHotRoutesResponse) {
option (google.api.http).post = "/osmosis/v14/protorev/set_hot_routes";
option (google.api.http).post = "/osmosis/protorev/set_hot_routes";
};

// SetDeveloperAccount sets the account that can withdraw a portion of the
// profits from the protorev module. This will be Skip's address.
rpc SetDeveloperAccount(MsgSetDeveloperAccount)
returns (MsgSetDeveloperAccountResponse) {
option (google.api.http).post =
"/osmosis/v14/protorev/set_developer_account";
option (google.api.http).post = "/osmosis/protorev/set_developer_account";
};

// SetMaxPoolPointsPerTx sets the maximum number of pool points that can be
// consumed per transaction. Can only be called by the admin account.
rpc SetMaxPoolPointsPerTx(MsgSetMaxPoolPointsPerTx)
returns (MsgSetMaxPoolPointsPerTxResponse) {
option (google.api.http).post =
"/osmosis/v14/protorev/set_max_pool_points_per_tx";
"/osmosis/protorev/set_max_pool_points_per_tx";
};

// SetMaxPoolPointsPerBlock sets the maximum number of pool points that can be
// consumed per block. Can only be called by the admin account.
rpc SetMaxPoolPointsPerBlock(MsgSetMaxPoolPointsPerBlock)
returns (MsgSetMaxPoolPointsPerBlockResponse) {
option (google.api.http).post =
"/osmosis/v14/protorev/set_max_pool_points_per_block";
"/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/v14/protorev/set_pool_weights";
option (google.api.http).post = "/osmosis/protorev/set_pool_weights";
};

// SetBaseDenoms sets the base denoms that will be used to create cyclic
// arbitrage routes. Can only be called by the admin account.
rpc SetBaseDenoms(MsgSetBaseDenoms) returns (MsgSetBaseDenomsResponse) {
option (google.api.http).post = "/osmosis/v14/protorev/set_base_denoms";
option (google.api.http).post = "/osmosis/protorev/set_base_denoms";
};
}

Expand Down
20 changes: 10 additions & 10 deletions tests/e2e/configurer/chain/queries.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ import (

// QueryProtoRevNumberOfTrades gets the number of trades the protorev module has executed.
func (n *NodeConfig) QueryProtoRevNumberOfTrades() (sdk.Int, error) {
path := "/osmosis/v14/protorev/number_of_trades"
path := "/osmosis/protorev/number_of_trades"

bz, err := n.QueryGRPCGateway(path)
if err != nil {
Expand All @@ -50,7 +50,7 @@ func (n *NodeConfig) QueryProtoRevNumberOfTrades() (sdk.Int, error) {

// QueryProtoRevProfits gets the profits the protorev module has made.
func (n *NodeConfig) QueryProtoRevProfits() ([]sdk.Coin, error) {
path := "/osmosis/v14/protorev/all_profits"
path := "/osmosis/protorev/all_profits"

bz, err := n.QueryGRPCGateway(path)
if err != nil {
Expand All @@ -66,7 +66,7 @@ func (n *NodeConfig) QueryProtoRevProfits() ([]sdk.Coin, error) {

// QueryProtoRevAllRouteStatistics gets all of the route statistics that the module has recorded.
func (n *NodeConfig) QueryProtoRevAllRouteStatistics() ([]protorevtypes.RouteStatistics, error) {
path := "/osmosis/v14/protorev/all_route_statistics"
path := "/osmosis/protorev/all_route_statistics"

bz, err := n.QueryGRPCGateway(path)
if err != nil {
Expand All @@ -82,7 +82,7 @@ func (n *NodeConfig) QueryProtoRevAllRouteStatistics() ([]protorevtypes.RouteSta

// QueryProtoRevTokenPairArbRoutes gets all of the token pair hot routes that the module is currently using.
func (n *NodeConfig) QueryProtoRevTokenPairArbRoutes() ([]protorevtypes.TokenPairArbRoutes, error) {
path := "/osmosis/v14/protorev/token_pair_arb_routes"
path := "/osmosis/protorev/token_pair_arb_routes"

bz, err := n.QueryGRPCGateway(path)
if err != nil {
Expand All @@ -98,7 +98,7 @@ func (n *NodeConfig) QueryProtoRevTokenPairArbRoutes() ([]protorevtypes.TokenPai

// QueryProtoRevDeveloperAccount gets the developer account of the module.
func (n *NodeConfig) QueryProtoRevDeveloperAccount() (sdk.AccAddress, error) {
path := "/osmosis/v14/protorev/developer_account"
path := "/osmosis/protorev/developer_account"

bz, err := n.QueryGRPCGateway(path)
if err != nil {
Expand All @@ -120,7 +120,7 @@ func (n *NodeConfig) QueryProtoRevDeveloperAccount() (sdk.AccAddress, error) {

// QueryProtoRevPoolWeights gets the pool point weights of the module.
func (n *NodeConfig) QueryProtoRevPoolWeights() (protorevtypes.PoolWeights, error) {
path := "/osmosis/v14/protorev/pool_weights"
path := "/osmosis/protorev/pool_weights"

bz, err := n.QueryGRPCGateway(path)
if err != nil {
Expand All @@ -136,7 +136,7 @@ func (n *NodeConfig) QueryProtoRevPoolWeights() (protorevtypes.PoolWeights, erro

// QueryProtoRevMaxPoolPointsPerTx gets the max pool points per tx of the module.
func (n *NodeConfig) QueryProtoRevMaxPoolPointsPerTx() (uint64, error) {
path := "/osmosis/v14/protorev/max_pool_points_per_tx"
path := "/osmosis/protorev/max_pool_points_per_tx"

bz, err := n.QueryGRPCGateway(path)
if err != nil {
Expand All @@ -152,7 +152,7 @@ func (n *NodeConfig) QueryProtoRevMaxPoolPointsPerTx() (uint64, error) {

// QueryProtoRevMaxPoolPointsPerBlock gets the max pool points per block of the module.
func (n *NodeConfig) QueryProtoRevMaxPoolPointsPerBlock() (uint64, error) {
path := "/osmosis/v14/protorev/max_pool_points_per_block"
path := "/osmosis/protorev/max_pool_points_per_block"

bz, err := n.QueryGRPCGateway(path)
if err != nil {
Expand All @@ -168,7 +168,7 @@ func (n *NodeConfig) QueryProtoRevMaxPoolPointsPerBlock() (uint64, error) {

// QueryProtoRevBaseDenoms gets the base denoms used to construct cyclic arbitrage routes.
func (n *NodeConfig) QueryProtoRevBaseDenoms() ([]protorevtypes.BaseDenom, error) {
path := "/osmosis/v14/protorev/base_denoms"
path := "/osmosis/protorev/base_denoms"

bz, err := n.QueryGRPCGateway(path)
if err != nil {
Expand All @@ -184,7 +184,7 @@ func (n *NodeConfig) QueryProtoRevBaseDenoms() ([]protorevtypes.BaseDenom, error

// QueryProtoRevEnabled queries if the protorev module is enabled.
func (n *NodeConfig) QueryProtoRevEnabled() (bool, error) {
path := "/osmosis/v14/protorev/enabled"
path := "/osmosis/protorev/enabled"

bz, err := n.QueryGRPCGateway(path)
if err != nil {
Expand Down
Loading

0 comments on commit 920d1a4

Please sign in to comment.