From d546acecfb3250e888969e3cf3c185d33f591b6d Mon Sep 17 00:00:00 2001 From: leonz789 Date: Fri, 20 Sep 2024 08:59:09 +0800 Subject: [PATCH] add query clis, update ut, use 32 base to calculate balance change --- proto/exocore/oracle/v1/native_token.proto | 5 +- proto/exocore/oracle/v1/query.proto | 26 +- x/assets/types/general.go | 21 +- x/operator/keeper/usd_value.go | 4 - x/oracle/client/cli/query.go | 2 + x/oracle/client/cli/query_native_token.go | 69 ++ x/oracle/keeper/native_token.go | 57 +- x/oracle/keeper/native_token_test.go | 32 +- x/oracle/keeper/query_native_token.go | 36 + x/oracle/module.go | 7 - x/oracle/types/events.go | 2 +- x/oracle/types/key_native_token.go | 12 + x/oracle/types/native_token.go | 6 +- x/oracle/types/native_token.pb.go | 97 +- x/oracle/types/query.pb.go | 1045 +++++++++++++++++--- x/oracle/types/query.pb.gw.go | 166 ++++ 16 files changed, 1356 insertions(+), 231 deletions(-) create mode 100644 x/oracle/client/cli/query_native_token.go create mode 100644 x/oracle/keeper/query_native_token.go diff --git a/proto/exocore/oracle/v1/native_token.proto b/proto/exocore/oracle/v1/native_token.proto index fc95d5ff4..4cbc87db8 100644 --- a/proto/exocore/oracle/v1/native_token.proto +++ b/proto/exocore/oracle/v1/native_token.proto @@ -6,6 +6,7 @@ import "gogoproto/gogo.proto"; option go_package = "github.com/ExocoreNetwork/exocore/x/oracle/types"; +// BalanceInfo tells effective-balance for native-restaking asset message BalanceInfo { uint64 round_id = 1 [(gogoproto.customname)="RoundID"]; uint64 block = 2; @@ -25,13 +26,15 @@ message BalanceInfo { Action change = 5; } +// StakerInfo represents all related information for a staker of native-restaking message StakerInfo { string staker_addr = 1; int64 staker_index = 2; - repeated uint64 validator_indexs = 3; + repeated uint64 validator_indexes = 3; repeated BalanceInfo balance_list = 5; } +// StakerList tells which stakers are active for one specific native-restaking asset message StakerList { repeated string staker_addrs = 1; } diff --git a/proto/exocore/oracle/v1/query.proto b/proto/exocore/oracle/v1/query.proto index 9fe82d7f7..3ab0f89d6 100644 --- a/proto/exocore/oracle/v1/query.proto +++ b/proto/exocore/oracle/v1/query.proto @@ -11,6 +11,7 @@ import "exocore/oracle/v1/prices.proto"; import "exocore/oracle/v1/recent_msg.proto"; import "exocore/oracle/v1/recent_params.proto"; import "exocore/oracle/v1/validator_update_block.proto"; +import "exocore/oracle/v1/native_token.proto"; import "gogoproto/gogo.proto"; import "google/api/annotations.proto"; @@ -18,6 +19,14 @@ option go_package = "github.com/ExocoreNetwork/exocore/x/oracle/types"; // Query defines the gRPC querier service. service Query { + + rpc StakerList (QueryStakerListRequest) returns (QueryStakerListResponse) { + option (google.api.http).get = "/ExocoreNetwork/exocore/oracle/staker_list"; + } + + rpc StakerInfos (QueryStakerInfosRequest) returns (QueryStakerInfosResponse) { + option (google.api.http).get = "/ExocoreNetwork/exocore/oracle/staker_infos"; + } // Parameters queries the parameters of the module. rpc Params (QueryParamsRequest) returns (QueryParamsResponse) { @@ -84,6 +93,22 @@ service Query { } } + +message QueryStakerListRequest { + string asset_id = 1[(gogoproto.customname) = "AssetID"]; +} + +message QueryStakerListResponse { + StakerList staker_list = 1; +} + +message QueryStakerInfosRequest { + string asset_id = 1[(gogoproto.customname) = "AssetID"]; +} + +message QueryStakerInfosResponse { + repeated StakerInfo staker_infos = 1; +} // QueryParamsRequest is request type for the Query/Params RPC method. message QueryParamsRequest {} @@ -211,4 +236,3 @@ message QueryAllRecentParamsResponse { // info of pagination cosmos.base.query.v1beta1.PageResponse pagination = 2; } - diff --git a/x/assets/types/general.go b/x/assets/types/general.go index 74912dc20..721355955 100644 --- a/x/assets/types/general.go +++ b/x/assets/types/general.go @@ -30,13 +30,8 @@ const ( // TODO: update before merge NativeETHAssetID = "0x01_0x01" - ETHAssetID = "0x02_0x01" ) -var NativeTokenBaseMap = map[string]string{ - NativeETHAssetID: ETHAssetID, -} - const ( Deposit CrossChainOpType = iota WithdrawPrincipal @@ -46,6 +41,10 @@ const ( Slash ) +var NativeAssets = []string{ + NativeETHAssetID, +} + var MaxAssetTotalSupply = math.NewIntWithDecimal(1, MaxDecForTotalSupply) type GeneralAssetsAddr [32]byte @@ -172,15 +171,15 @@ func UpdateAssetDecValue(valueToUpdate *math.LegacyDec, changeValue *math.Legacy } func IsNativeToken(assetID string) bool { - // TODO: native token should be a list which able to config, we currently only support ETH, so it's fine for now - return assetID == NativeETHAssetID + for _, aID := range NativeAssets { + if assetID == aID { + return true + } + } + return false } func GetNativeTokenAssetIDs() []string { // TODO: we currently have native_eth only return []string{NativeETHAssetID} } - -func GetBaseTokenForNativeToken(assetID string) string { - return NativeTokenBaseMap[assetID] -} diff --git a/x/operator/keeper/usd_value.go b/x/operator/keeper/usd_value.go index f1e46ec40..7c4dbc2d9 100644 --- a/x/operator/keeper/usd_value.go +++ b/x/operator/keeper/usd_value.go @@ -3,7 +3,6 @@ package keeper import ( "errors" "fmt" - "strings" assetstype "github.com/ExocoreNetwork/exocore/x/assets/types" delegationkeeper "github.com/ExocoreNetwork/exocore/x/delegation/keeper" @@ -300,9 +299,6 @@ func (k *Keeper) CalculateUSDValueForOperator( if isForSlash { // when calculated the USD value for slashing, the input prices map is null // so the price needs to be retrieved here - if assetstype.IsNativeToken(assetID) { - assetID = strings.Join([]string{assetID, operator}, "_") - } price, err = k.oracleKeeper.GetSpecifiedAssetsPrice(ctx, assetID) if err != nil { // TODO: when assetID is not registered in oracle module, this error will finally lead to panic diff --git a/x/oracle/client/cli/query.go b/x/oracle/client/cli/query.go index e8fa48377..707c362df 100644 --- a/x/oracle/client/cli/query.go +++ b/x/oracle/client/cli/query.go @@ -35,6 +35,8 @@ func GetQueryCmd(_ string) *cobra.Command { cmd.AddCommand(CmdShowRecentMsg()) cmd.AddCommand(CmdListRecentParams()) cmd.AddCommand(CmdShowRecentParams()) + cmd.AddCommand(CmdQueryStakerInfos()) + cmd.AddCommand(CmdQueryStakerList()) // this line is used by starport scaffolding # 1 return cmd diff --git a/x/oracle/client/cli/query_native_token.go b/x/oracle/client/cli/query_native_token.go new file mode 100644 index 000000000..ede1fb188 --- /dev/null +++ b/x/oracle/client/cli/query_native_token.go @@ -0,0 +1,69 @@ +package cli + +import ( + "github.com/ExocoreNetwork/exocore/x/oracle/types" + "github.com/cosmos/cosmos-sdk/client" + "github.com/cosmos/cosmos-sdk/client/flags" + "github.com/spf13/cobra" +) + +func CmdQueryStakerInfos() *cobra.Command { + cmd := &cobra.Command{ + Use: "show-staker-infos", + Short: "shows all staker infos including stakerAddr, validators of that staker, latest balance...", + Args: cobra.ExactArgs(1), + RunE: func(cmd *cobra.Command, args []string) (err error) { + clientCtx, err := client.GetClientQueryContext(cmd) + if err != nil { + return err + } + + queryClient := types.NewQueryClient(clientCtx) + + assetID := args[0] + + request := &types.QueryStakerInfosRequest{ + AssetID: assetID, + } + + res, err := queryClient.StakerInfos(cmd.Context(), request) + if err != nil { + return err + } + + return clientCtx.PrintProto(res) + }, + } + + flags.AddQueryFlagsToCmd(cmd) + + return cmd +} + +func CmdQueryStakerList() *cobra.Command { + cmd := &cobra.Command{ + Use: "show-staker-list", + Short: "shows staker list including all staker addresses", + Args: cobra.NoArgs, + RunE: func(cmd *cobra.Command, _ []string) (err error) { + clientCtx, err := client.GetClientQueryContext(cmd) + if err != nil { + return err + } + + queryClient := types.NewQueryClient(clientCtx) + + res, err := queryClient.StakerList(cmd.Context(), &types.QueryStakerListRequest{}) + if err != nil { + return err + } + + return clientCtx.PrintProto(res) + }, + } + + flags.AddQueryFlagsToCmd(cmd) + + return cmd + +} diff --git a/x/oracle/keeper/native_token.go b/x/oracle/keeper/native_token.go index e3f1a77cd..f7158334d 100644 --- a/x/oracle/keeper/native_token.go +++ b/x/oracle/keeper/native_token.go @@ -16,6 +16,8 @@ import ( // undelegate: update operator's price, operator's totalAmount, operator's totalShare, staker's share // msg(refund or slash on beaconChain): update staker's price, operator's price +const maxEffectiveBalance = 32 + var stakerList types.StakerList // GetStakerInfo returns details about staker for native-restaking under asset of assetID @@ -30,9 +32,6 @@ func (k Keeper) GetStakerInfo(ctx sdk.Context, assetID, stakerAddr string) types return stakerInfo } -// TODO, NOTE: price changes will effect reward/slash calculation, every time one staker's price changed, it's reward/slash amount(LST) should be cleaned or recalculated immediately -// TODO: validatorIndex -// amount: represents for originalToken func (k Keeper) UpdateNativeTokenByDepositOrWithdraw(ctx sdk.Context, assetID, stakerAddr string, amount sdkmath.Int, validatorIndex uint64) sdkmath.Int { // emit an event to tell that a staker's validator list has changed ctx.EventManager().EmitEvent(sdk.NewEvent( @@ -49,7 +48,7 @@ func (k Keeper) UpdateNativeTokenByDepositOrWithdraw(ctx sdk.Context, assetID, s k.cdc.MustUnmarshal(value, stakerInfo) if amount.IsPositive() { // deopsit add a new validator into staker's validatorList - stakerInfo.ValidatorIndexs = append(stakerInfo.ValidatorIndexs, validatorIndex) + stakerInfo.ValidatorIndexes = append(stakerInfo.ValidatorIndexes, validatorIndex) } } @@ -68,9 +67,9 @@ func (k Keeper) UpdateNativeTokenByDepositOrWithdraw(ctx sdk.Context, assetID, s // TODO: check if this validator has withdraw all its asset and then we can move it out from the staker's validatorList // currently when withdraw happened we assume this validator has left the staker's validatorList (deposit/withdraw all of that validator's staking ETH(<=32)) newBalance.Change = types.BalanceInfo_ACTION_WITHDRAW - for i, vIdx := range stakerInfo.ValidatorIndexs { + for i, vIdx := range stakerInfo.ValidatorIndexes { if vIdx == validatorIndex { - stakerInfo.ValidatorIndexs = append(stakerInfo.ValidatorIndexs[:i], stakerInfo.ValidatorIndexs[i+1:]...) + stakerInfo.ValidatorIndexes = append(stakerInfo.ValidatorIndexes[:i], stakerInfo.ValidatorIndexes[i+1:]...) break } } @@ -126,6 +125,23 @@ func (k Keeper) UpdateNativeTokenByDepositOrWithdraw(ctx sdk.Context, assetID, s return amount } +// GetStakerInfos returns all stakers information +func (k Keeper) GetStakerInfos(ctx sdk.Context, assetID string) (ret []*types.StakerInfo) { + store := ctx.KVStore(k.storeKey) + iterator := sdk.KVStorePrefixIterator(store, types.NativeTokenStakerKeyPrefix(assetID)) + defer iterator.Close() + for ; iterator.Valid(); iterator.Next() { + sInfo := types.StakerInfo{} + k.cdc.MustUnmarshal(iterator.Value(), &sInfo) + // keep only the latest effective-balance + sInfo.BalanceList = sInfo.BalanceList[:len(sInfo.BalanceList)-1] + // this is mainly used by price feeder, so we remove the stakerAddr to reduce the size of return value + sInfo.StakerAddr = "" + ret = append(ret, &sInfo) + } + return ret +} + // GetstakerList return stakerList for native-restaking asset of assetID func (k Keeper) GetStakerList(ctx sdk.Context, assetID string) types.StakerList { store := ctx.KVStore(k.storeKey) @@ -152,7 +168,9 @@ func (k Keeper) UpdateNativeTokenByBalanceChange(ctx sdk.Context, assetID string return err } store := ctx.KVStore(k.storeKey) - for stakerAddr, change := range stakerChanges { + for _, stakerAddr := range sl.StakerAddrs { + // if stakerAddr is not in stakerChanges, then the change would be set to 0 which is expected + change := stakerChanges[stakerAddr] key := types.NativeTokenStakerKey(assetID, stakerAddr) value := store.Get(key) if value == nil { @@ -172,11 +190,21 @@ func (k Keeper) UpdateNativeTokenByBalanceChange(ctx sdk.Context, assetID string newBalance.Index = 0 } newBalance.Change = types.BalanceInfo_ACTION_SLASH_REFUND - newBalance.Balance += int64(change) + // balance update are based on initial/max effective balance: 32 + maxBalance := maxEffectiveBalance * (len(stakerInfo.ValidatorIndexes)) + balance := maxBalance + change + if balance > maxBalance { + return errors.New("effective balance should never exceeds 32") + } + if delta := int64(balance) - newBalance.Balance; delta != 0 { + // TODO: call assetsmodule. func(k Keeper) UpdateNativeRestakingBalance(ctx sdk.Context, stakerID, assetID string, amount sdkmath.Int) error + _ = balance + newBalance.Balance = int64(balance) + } + // newBalance.Balance += int64(change) stakerInfo.Append(&newBalance) bz := k.cdc.MustMarshal(stakerInfo) store.Set(key, bz) - // TODO: call assetsmodule. func(k Keeper) UpdateNativeRestakingBalance(ctx sdk.Context, stakerID, assetID string, amount sdkmath.Int) error } return nil } @@ -191,14 +219,21 @@ func (k Keeper) getStakerList(ctx sdk.Context, assetID string) types.StakerList // parseBalanceChange parses rawData to details of amount change for all stakers relative to native restaking func parseBalanceChange(rawData []byte, sl types.StakerList) (map[string]int, error) { - indexs := rawData[:32] + // eg. 0100-000011 + // first part 0100 tells that the effective-balance of staker corresponding to index 2 in StakerList + // the lenft part 000011. we use the first 4 bits to tell the length of this number, and it shows as 1 here, the 5th bit is used to tell symbol of the number, 1 means negative, then we can get the abs number indicate by the length. It's -1 here, means effective-balane is 32-1 on beacon chain for now + // the first 32 bytes are information to indicates effective-balance of which staker has changed, 1 means changed, 0 means not. 32 bytes can represents changes for at most 256 stakers + indexes := rawData[:32] + // bytes after first 32 are details of effective-balance change for each staker which has been marked with 1 in the first 32 bytes, for those who are marked with 0 will just be ignored + // For each staker we support at most 256 validators to join, so the biggest effective-balance change we would have is 256*16, then we need 12 bits to represents the number for each staker. And for compression we use 4 bits to tell then length of bits without leading 0 this number has. + // Then with the symbol we need at most 17 bits for each staker's effective-balance change: 0000.0.0000-0000-0000 (the leading 0 will be ignored for the last 12 bits) changes := rawData[32:] index := -1 byteIndex := 0 bitOffset := 0 lengthBits := 5 stakerChanges := make(map[string]int) - for _, b := range indexs { + for _, b := range indexes { for i := 7; i >= 0; i-- { index++ if (b>>i)&1 == 1 { diff --git a/x/oracle/keeper/native_token_test.go b/x/oracle/keeper/native_token_test.go index d99b6e255..cb99f2616 100644 --- a/x/oracle/keeper/native_token_test.go +++ b/x/oracle/keeper/native_token_test.go @@ -42,7 +42,9 @@ func (ks *KeeperSuite) TestNativeTokenLifeCycleOneStaker() { stakerStr := common.Address(operator.Bytes()).String() assetID := assetstypes.NativeETHAssetID // 1. deposit amount 100 + // 100 is not a possible nubmer with one validator, it's ok to use this as a start and we'll check the number to be updated to a right number(uncer 32 with one validator) amount100 := sdkmath.NewIntFromUint64(100) + amount32 := sdkmath.NewIntFromUint64(32) ks.k.UpdateNativeTokenByDepositOrWithdraw(ks.ctx, assetID, stakerStr, amount100, 199) // - 1.1 check stakerInfo stakerInfo := ks.k.GetStakerInfo(ks.ctx, assetID, stakerStr) @@ -52,14 +54,14 @@ func (ks *KeeperSuite) TestNativeTokenLifeCycleOneStaker() { Change: types.BalanceInfo_ACTION_DEPOSIT, Balance: 100, }, *stakerInfo.BalanceList[0]) - ks.Equal([]uint64{199}, stakerInfo.ValidatorIndexs) + ks.Equal([]uint64{199}, stakerInfo.ValidatorIndexes) // - 1.2 check stakerList stakerList := ks.k.GetStakerList(ks.ctx, assetID) ks.Equal(stakerList.StakerAddrs[0], stakerStr) // 2. Msg. minus staker's balance stakerChanges := [][]int{ - {0, -50}, + {0, -10}, } rawData := convertBalanceChangeToBytes(stakerChanges) ks.k.UpdateNativeTokenByBalanceChange(ks.ctx, assetID, rawData, 9) @@ -69,11 +71,12 @@ func (ks *KeeperSuite) TestNativeTokenLifeCycleOneStaker() { Block: 2, RoundID: 9, Change: types.BalanceInfo_ACTION_SLASH_REFUND, - Balance: 50, + // this is expected to be 32-10=22, not 100-10 + Balance: 22, }, *stakerInfo.BalanceList[1]) // 3. deposit more. 100 - ks.k.UpdateNativeTokenByDepositOrWithdraw(ks.ctx, assetID, stakerStr, amount100, 999) + ks.k.UpdateNativeTokenByDepositOrWithdraw(ks.ctx, assetID, stakerStr, amount32, 999) // - 3.1 check stakerInfo stakerInfo = ks.k.GetStakerInfo(ks.ctx, assetID, stakerStr) ks.Equal(types.BalanceInfo{ @@ -81,20 +84,22 @@ func (ks *KeeperSuite) TestNativeTokenLifeCycleOneStaker() { RoundID: 9, Index: 1, Change: types.BalanceInfo_ACTION_DEPOSIT, - Balance: 150, + Balance: 54, }, *stakerInfo.BalanceList[2]) - ks.Equal([]uint64{199, 999}, stakerInfo.ValidatorIndexs) + ks.Equal([]uint64{199, 999}, stakerInfo.ValidatorIndexes) // 4. Msg. add staker's balance + // at this point the system correct number should be 32*2-10 = 52, if some validator do refund, means the delta should be less than 10 stakerChanges = [][]int{ - {0, 30}, + // means delta from -10 change to -5 + {0, -5}, } rawData = convertBalanceChangeToBytes(stakerChanges) ks.k.UpdateNativeTokenByBalanceChange(ks.ctx, assetID, rawData, 11) // - 4.1 check stakerInfo stakerInfo = ks.k.GetStakerInfo(ks.ctx, assetID, stakerStr) ks.Equal(types.BalanceInfo{ - Balance: 180, + Balance: 59, Block: 2, RoundID: 11, Index: 0, @@ -102,21 +107,22 @@ func (ks *KeeperSuite) TestNativeTokenLifeCycleOneStaker() { }, *stakerInfo.BalanceList[3]) // 5. withdraw - amount80N := sdkmath.NewInt(-80) - ks.k.UpdateNativeTokenByDepositOrWithdraw(ks.ctx, assetID, stakerStr, amount80N, 199) + amount30N := sdkmath.NewInt(-30) + ks.k.UpdateNativeTokenByDepositOrWithdraw(ks.ctx, assetID, stakerStr, amount30N, 199) // - 5.1 check stakerInfo stakerInfo = ks.k.GetStakerInfo(ks.ctx, assetID, stakerStr) ks.Equal(types.BalanceInfo{ - Balance: 100, + Balance: 29, Block: 2, RoundID: 11, Index: 1, Change: types.BalanceInfo_ACTION_WITHDRAW, }, *stakerInfo.BalanceList[4]) - ks.Equal([]uint64{999}, stakerInfo.ValidatorIndexs) + // withdraw will remove this validator + ks.Equal([]uint64{999}, stakerInfo.ValidatorIndexes) // 6.withdrawall - amount100N := sdkmath.NewInt(-100) + amount100N := sdkmath.NewInt(-29) ks.k.UpdateNativeTokenByDepositOrWithdraw(ks.ctx, assetID, stakerStr, amount100N, 999) // - 6.1 check stakerInfo stakerInfo = ks.k.GetStakerInfo(ks.ctx, assetID, stakerStr) diff --git a/x/oracle/keeper/query_native_token.go b/x/oracle/keeper/query_native_token.go new file mode 100644 index 000000000..11124d896 --- /dev/null +++ b/x/oracle/keeper/query_native_token.go @@ -0,0 +1,36 @@ +package keeper + +import ( + "context" + "errors" + + assetstypes "github.com/ExocoreNetwork/exocore/x/assets/types" + "github.com/ExocoreNetwork/exocore/x/oracle/types" + sdk "github.com/cosmos/cosmos-sdk/types" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" +) + +func (k Keeper) StakerInfos(goCtx context.Context, req *types.QueryStakerInfosRequest) (*types.QueryStakerInfosResponse, error) { + if req == nil { + return nil, status.Error(codes.InvalidArgument, "invalid request for stakerInfos") + } + if !assetstypes.IsNativeToken(req.AssetID) { + return nil, errors.New("assetID doesn't reprensents any supported nativeRestakingToken") + } + ctx := sdk.UnwrapSDKContext(goCtx) + stakerInfos := k.GetStakerInfos(ctx, req.AssetID) + return &types.QueryStakerInfosResponse{StakerInfos: stakerInfos}, nil +} + +func (k Keeper) StakerList(goCtx context.Context, req *types.QueryStakerListRequest) (*types.QueryStakerListResponse, error) { + if req == nil { + return nil, status.Error(codes.InvalidArgument, "invalid request for stakerList") + } + if !assetstypes.IsNativeToken(req.AssetID) { + return nil, errors.New("assetID doesn't reprensents any supported nativeRestakingToken") + } + ctx := sdk.UnwrapSDKContext(goCtx) + stakerList := k.GetStakerList(ctx, req.AssetID) + return &types.QueryStakerListResponse{StakerList: &stakerList}, nil +} diff --git a/x/oracle/module.go b/x/oracle/module.go index d173a8461..3d28b1429 100644 --- a/x/oracle/module.go +++ b/x/oracle/module.go @@ -5,7 +5,6 @@ import ( "encoding/json" "fmt" "math/big" - "strconv" "strings" // this line is used by starport scaffolding # 1 @@ -163,12 +162,6 @@ func (am AppModule) BeginBlock(ctx sdk.Context, _ abci.RequestBeginBlock) { // EndBlock contains the logic that is automatically triggered at the end of each block func (am AppModule) EndBlock(ctx sdk.Context, _ abci.RequestEndBlock) []abci.ValidatorUpdate { - // debug: this is for test only to trigger this event every block - eventValue := fmt.Sprintf("%s_%s_%s", types.AttributeValueNativeTokenWithdraw, "0xabcefz", strconv.FormatUint(1977, 10)) - ctx.EventManager().EmitEvent(sdk.NewEvent( - types.EventTypeCreatePrice, - sdk.NewAttribute(types.AttributeKeyNativeTokenChange, eventValue), - )) cs := keeper.GetCaches() validatorUpdates := am.keeper.GetValidatorUpdates(ctx) forceSeal := false diff --git a/x/oracle/types/events.go b/x/oracle/types/events.go index 65a47d03a..f8c61132f 100644 --- a/x/oracle/types/events.go +++ b/x/oracle/types/events.go @@ -18,6 +18,6 @@ const ( AttributeValuePriceUpdatedSuccess = "success" AttributeValueParamsUpdatedSuccess = "success" AttributeValueNativeTokenUpdate = "update" - AttributeValueNativeTokenDeposit = "depposit" + AttributeValueNativeTokenDeposit = "deposit" AttributeValueNativeTokenWithdraw = "withdraw" ) diff --git a/x/oracle/types/key_native_token.go b/x/oracle/types/key_native_token.go index 1ea037a87..0758017f1 100644 --- a/x/oracle/types/key_native_token.go +++ b/x/oracle/types/key_native_token.go @@ -26,7 +26,19 @@ func NativeTokenStakerKey(assetID, stakerAddr string) []byte { return append([]byte(NativeTokenStakerInfoKeyPrefix), []byte(assetID)...) } +func NativeTokenStakerKeyPrefix(assetID string) []byte { + return append([]byte(NativeTokenStakerInfoKeyPrefix), []byte(assetID)...) +} + func NativeTokenOperatorKey(assetID, operatorAddr string) []byte { assetID = strings.Join([]string{assetID, operatorAddr}, "/") return append([]byte(NativeTokenOperatorInfoKeyPrefix), []byte(assetID)...) } + +func ParseNativeTokenStakerKey(key []byte) (assetID, stakerAddr string) { + parsed := strings.Split(string(key), "/") + if len(parsed) != 3 { + panic("key of stakerInfo must be construct by 3 info: prefix/assetID/stakerAddr") + } + return parsed[1], parsed[2] +} diff --git a/x/oracle/types/native_token.go b/x/oracle/types/native_token.go index f95112af9..4651881f0 100644 --- a/x/oracle/types/native_token.go +++ b/x/oracle/types/native_token.go @@ -3,15 +3,13 @@ package types const maxSize = 100 // TODO: vlaidatorIndex need bridge data -// func NewStakerInfo(stakerAddr string, validatorIndex uint64) *StakerInfo { func NewStakerInfo(stakerAddr string, validatorIndex uint64) *StakerInfo { return &StakerInfo{ StakerAddr: stakerAddr, StakerIndex: 0, // TODO: need bridge information - ValidatorIndexs: []uint64{validatorIndex}, - // ValidatorIndexs: make([]uint64, 0, 1), - BalanceList: make([]*BalanceInfo, 0, 1), + ValidatorIndexes: []uint64{validatorIndex}, + BalanceList: make([]*BalanceInfo, 0, 1), } } diff --git a/x/oracle/types/native_token.pb.go b/x/oracle/types/native_token.pb.go index 55a82dea9..97e54236d 100644 --- a/x/oracle/types/native_token.pb.go +++ b/x/oracle/types/native_token.pb.go @@ -54,6 +54,7 @@ func (BalanceInfo_Action) EnumDescriptor() ([]byte, []int) { return fileDescriptor_ed348d855b8fd9a8, []int{0, 0} } +// BalanceInfo tells effective-balance for native-restaking asset type BalanceInfo struct { RoundID uint64 `protobuf:"varint,1,opt,name=round_id,json=roundId,proto3" json:"round_id,omitempty"` Block uint64 `protobuf:"varint,2,opt,name=block,proto3" json:"block,omitempty"` @@ -133,11 +134,12 @@ func (m *BalanceInfo) GetChange() BalanceInfo_Action { return BalanceInfo_ACTION_ROUND } +// StakerInfo represents all related information for a staker of native-restaking type StakerInfo struct { - StakerAddr string `protobuf:"bytes,1,opt,name=staker_addr,json=stakerAddr,proto3" json:"staker_addr,omitempty"` - StakerIndex int64 `protobuf:"varint,2,opt,name=staker_index,json=stakerIndex,proto3" json:"staker_index,omitempty"` - ValidatorIndexs []uint64 `protobuf:"varint,3,rep,packed,name=validator_indexs,json=validatorIndexs,proto3" json:"validator_indexs,omitempty"` - BalanceList []*BalanceInfo `protobuf:"bytes,5,rep,name=balance_list,json=balanceList,proto3" json:"balance_list,omitempty"` + StakerAddr string `protobuf:"bytes,1,opt,name=staker_addr,json=stakerAddr,proto3" json:"staker_addr,omitempty"` + StakerIndex int64 `protobuf:"varint,2,opt,name=staker_index,json=stakerIndex,proto3" json:"staker_index,omitempty"` + ValidatorIndexes []uint64 `protobuf:"varint,3,rep,packed,name=validator_indexes,json=validatorIndexes,proto3" json:"validator_indexes,omitempty"` + BalanceList []*BalanceInfo `protobuf:"bytes,5,rep,name=balance_list,json=balanceList,proto3" json:"balance_list,omitempty"` } func (m *StakerInfo) Reset() { *m = StakerInfo{} } @@ -187,9 +189,9 @@ func (m *StakerInfo) GetStakerIndex() int64 { return 0 } -func (m *StakerInfo) GetValidatorIndexs() []uint64 { +func (m *StakerInfo) GetValidatorIndexes() []uint64 { if m != nil { - return m.ValidatorIndexs + return m.ValidatorIndexes } return nil } @@ -201,6 +203,7 @@ func (m *StakerInfo) GetBalanceList() []*BalanceInfo { return nil } +// StakerList tells which stakers are active for one specific native-restaking asset type StakerList struct { StakerAddrs []string `protobuf:"bytes,1,rep,name=staker_addrs,json=stakerAddrs,proto3" json:"staker_addrs,omitempty"` } @@ -257,37 +260,37 @@ func init() { } var fileDescriptor_ed348d855b8fd9a8 = []byte{ - // 466 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x92, 0x41, 0x6f, 0xd3, 0x30, - 0x1c, 0xc5, 0xeb, 0x66, 0x6d, 0xd9, 0x3f, 0xd5, 0x16, 0xbc, 0x49, 0x44, 0x1c, 0xb2, 0x50, 0x01, - 0x0a, 0x97, 0x84, 0x8d, 0x33, 0x87, 0x94, 0x16, 0x2d, 0x68, 0x6a, 0x91, 0x5b, 0x34, 0x09, 0x21, - 0x45, 0x69, 0x6c, 0xba, 0xa8, 0x21, 0x9e, 0x12, 0xaf, 0x94, 0x6f, 0xc1, 0x91, 0x4f, 0xc3, 0x99, - 0xe3, 0x8e, 0x9c, 0x10, 0x6a, 0xbf, 0x08, 0x8a, 0xed, 0xa0, 0x49, 0x48, 0xdc, 0xf2, 0x7e, 0x7e, - 0xff, 0xf8, 0xf9, 0xe9, 0x0f, 0x8f, 0xd9, 0x86, 0xa7, 0xbc, 0x64, 0x01, 0x2f, 0x93, 0x34, 0x67, - 0xc1, 0xfa, 0x34, 0x28, 0x12, 0x91, 0xad, 0x59, 0x2c, 0xf8, 0x8a, 0x15, 0xfe, 0x75, 0xc9, 0x05, - 0xc7, 0xf7, 0xb5, 0xcb, 0x57, 0x2e, 0x7f, 0x7d, 0xfa, 0xf0, 0x78, 0xc9, 0x97, 0x5c, 0x9e, 0x06, - 0xf5, 0x97, 0x32, 0x0e, 0xbe, 0xb5, 0xc1, 0x1c, 0x26, 0x79, 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 0xa0, - 0xaf, 0x0d, 0xaa, 0x83, 0xb6, 0x7c, 0xab, 0x1e, 0x8a, 0x64, 0x13, 0xcf, 0xc0, 0x5a, 0x27, 0x79, - 0x46, 0x13, 0xc1, 0xb5, 0xab, 0xb2, 0x0d, 0xd7, 0xf0, 0xf6, 0xc8, 0xe1, 0x5f, 0x2e, 0x9d, 0x15, - 0x0e, 0xa1, 0xaf, 0x5b, 0x8a, 0xf3, 0xac, 0x12, 0x76, 0xc7, 0x35, 0x3c, 0xf3, 0xcc, 0xf9, 0x7f, - 0x41, 0xc4, 0xd4, 0x33, 0x17, 0x59, 0x25, 0x06, 0x41, 0x93, 0xbf, 0x56, 0x77, 0xe2, 0xd5, 0xf9, - 0x2b, 0x1b, 0xb9, 0x86, 0xb7, 0xdf, 0xc4, 0xab, 0x1f, 0x50, 0x0d, 0xdf, 0xfc, 0xd8, 0x3a, 0xe8, - 0x76, 0xeb, 0xa0, 0xdf, 0x5b, 0x07, 0x7d, 0xdd, 0x39, 0xad, 0xdb, 0x9d, 0xd3, 0xfa, 0xb9, 0x73, - 0x5a, 0xef, 0x9f, 0x2f, 0x33, 0x71, 0x75, 0xb3, 0xf0, 0x53, 0xfe, 0x29, 0x18, 0xab, 0x04, 0x13, - 0x26, 0x3e, 0xf3, 0x72, 0x15, 0x34, 0xfb, 0xb8, 0x69, 0x36, 0x52, 0x7c, 0xb9, 0x66, 0xd5, 0xa2, - 0x2b, 0xf7, 0xeb, 0xc5, 0x9f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x73, 0xa1, 0x5a, 0x2b, 0xb0, 0x02, - 0x00, 0x00, + // 467 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x92, 0x41, 0x8b, 0xd3, 0x40, + 0x14, 0xc7, 0x3b, 0xcd, 0xb6, 0x75, 0x5f, 0xca, 0x9a, 0x9d, 0x5d, 0x30, 0x78, 0xc8, 0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0x32, 0xbb, 0xe3, 0x22, 0xef, 0xe0, 0xec, 0x89, 0xff, 0x8f, 0x6f, 0xff, + 0x8e, 0x3b, 0x3f, 0x4c, 0x45, 0xc6, 0x0b, 0xa2, 0x87, 0x06, 0x1f, 0xa0, 0xab, 0x08, 0xb6, 0xa0, + 0x1f, 0xbe, 0x9a, 0x47, 0xd3, 0x49, 0x4c, 0xa6, 0xef, 0x26, 0x23, 0xab, 0x85, 0x31, 0x1c, 0x68, + 0x32, 0x1a, 0xbf, 0x9d, 0xce, 0xa2, 0xb9, 0x85, 0xf0, 0x11, 0xdc, 0xd7, 0xec, 0x32, 0x9a, 0x9f, + 0x8f, 0x48, 0x78, 0x69, 0xb5, 0xf1, 0x03, 0x38, 0xd2, 0x70, 0x76, 0x11, 0xce, 0xce, 0x63, 0x32, + 0x7e, 0x5d, 0xff, 0xc1, 0x18, 0x7c, 0x47, 0x00, 0x33, 0x91, 0xac, 0x58, 0x29, 0x93, 0x39, 0x01, + 0xb3, 0x92, 0x55, 0x9c, 0x50, 0x5a, 0xca, 0x70, 0xf6, 0x09, 0x28, 0x14, 0x52, 0x5a, 0xe2, 0x47, + 0xd0, 0xd7, 0x02, 0x95, 0x41, 0x5b, 0xee, 0xaa, 0x87, 0x22, 0x99, 0xc4, 0x33, 0x38, 0x5c, 0x27, + 0x79, 0x46, 0x13, 0xc1, 0xb5, 0x8a, 0x55, 0xb6, 0xe1, 0x1a, 0xde, 0x1e, 0xb1, 0xfe, 0x36, 0x22, + 0xc5, 0x71, 0x08, 0x7d, 0x9d, 0x53, 0x9c, 0x67, 0x95, 0xb0, 0x3b, 0xae, 0xe1, 0x99, 0x67, 0xce, + 0xff, 0x23, 0x22, 0xa6, 0x9e, 0xb9, 0xc8, 0x2a, 0x31, 0x08, 0x9a, 0x0d, 0xea, 0xea, 0x8e, 0xc1, + 0x7a, 0x83, 0xca, 0x46, 0xae, 0xe1, 0xed, 0x37, 0x06, 0xeb, 0x15, 0xaa, 0xe1, 0x9b, 0x1f, 0x5b, + 0x07, 0xdd, 0x6e, 0x1d, 0xf4, 0x7b, 0xeb, 0xa0, 0xaf, 0x3b, 0xa7, 0x75, 0xbb, 0x73, 0x5a, 0x3f, + 0x77, 0x4e, 0xeb, 0xfd, 0xf3, 0x65, 0x26, 0xae, 0x6e, 0x16, 0x7e, 0xca, 0x3f, 0x05, 0x63, 0xe5, + 0x60, 0xc2, 0xc4, 0x67, 0x5e, 0xae, 0x82, 0xe6, 0x22, 0x37, 0xcd, 0x4d, 0x8a, 0x2f, 0xd7, 0xac, + 0x5a, 0x74, 0xe5, 0x85, 0xbd, 0xf8, 0x13, 0x00, 0x00, 0xff, 0xff, 0x69, 0x6d, 0x1d, 0x25, 0xb2, + 0x02, 0x00, 0x00, } func (m *BalanceInfo) Marshal() (dAtA []byte, err error) { @@ -372,10 +375,10 @@ func (m *StakerInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { dAtA[i] = 0x2a } } - if len(m.ValidatorIndexs) > 0 { - dAtA2 := make([]byte, len(m.ValidatorIndexs)*10) + if len(m.ValidatorIndexes) > 0 { + dAtA2 := make([]byte, len(m.ValidatorIndexes)*10) var j1 int - for _, num := range m.ValidatorIndexs { + for _, num := range m.ValidatorIndexes { for num >= 1<<7 { dAtA2[j1] = uint8(uint64(num)&0x7f | 0x80) num >>= 7 @@ -485,9 +488,9 @@ func (m *StakerInfo) Size() (n int) { if m.StakerIndex != 0 { n += 1 + sovNativeToken(uint64(m.StakerIndex)) } - if len(m.ValidatorIndexs) > 0 { + if len(m.ValidatorIndexes) > 0 { l = 0 - for _, e := range m.ValidatorIndexs { + for _, e := range m.ValidatorIndexes { l += sovNativeToken(uint64(e)) } n += 1 + sovNativeToken(uint64(l)) + l @@ -764,7 +767,7 @@ func (m *StakerInfo) Unmarshal(dAtA []byte) error { break } } - m.ValidatorIndexs = append(m.ValidatorIndexs, v) + m.ValidatorIndexes = append(m.ValidatorIndexes, v) } else if wireType == 2 { var packedLen int for shift := uint(0); ; shift += 7 { @@ -799,8 +802,8 @@ func (m *StakerInfo) Unmarshal(dAtA []byte) error { } } elementCount = count - if elementCount != 0 && len(m.ValidatorIndexs) == 0 { - m.ValidatorIndexs = make([]uint64, 0, elementCount) + if elementCount != 0 && len(m.ValidatorIndexes) == 0 { + m.ValidatorIndexes = make([]uint64, 0, elementCount) } for iNdEx < postIndex { var v uint64 @@ -818,10 +821,10 @@ func (m *StakerInfo) Unmarshal(dAtA []byte) error { break } } - m.ValidatorIndexs = append(m.ValidatorIndexs, v) + m.ValidatorIndexes = append(m.ValidatorIndexes, v) } } else { - return fmt.Errorf("proto: wrong wireType = %d for field ValidatorIndexs", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ValidatorIndexes", wireType) } case 5: if wireType != 2 { diff --git a/x/oracle/types/query.pb.go b/x/oracle/types/query.pb.go index c68c77c13..d980f4de6 100644 --- a/x/oracle/types/query.pb.go +++ b/x/oracle/types/query.pb.go @@ -30,6 +30,182 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +type QueryStakerListRequest struct { + AssetID string `protobuf:"bytes,1,opt,name=asset_id,json=assetId,proto3" json:"asset_id,omitempty"` +} + +func (m *QueryStakerListRequest) Reset() { *m = QueryStakerListRequest{} } +func (m *QueryStakerListRequest) String() string { return proto.CompactTextString(m) } +func (*QueryStakerListRequest) ProtoMessage() {} +func (*QueryStakerListRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_b8cba1249806967d, []int{0} +} +func (m *QueryStakerListRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryStakerListRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryStakerListRequest.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 *QueryStakerListRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryStakerListRequest.Merge(m, src) +} +func (m *QueryStakerListRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryStakerListRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryStakerListRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryStakerListRequest proto.InternalMessageInfo + +func (m *QueryStakerListRequest) GetAssetID() string { + if m != nil { + return m.AssetID + } + return "" +} + +type QueryStakerListResponse struct { + StakerList *StakerList `protobuf:"bytes,1,opt,name=staker_list,json=stakerList,proto3" json:"staker_list,omitempty"` +} + +func (m *QueryStakerListResponse) Reset() { *m = QueryStakerListResponse{} } +func (m *QueryStakerListResponse) String() string { return proto.CompactTextString(m) } +func (*QueryStakerListResponse) ProtoMessage() {} +func (*QueryStakerListResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_b8cba1249806967d, []int{1} +} +func (m *QueryStakerListResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryStakerListResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryStakerListResponse.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 *QueryStakerListResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryStakerListResponse.Merge(m, src) +} +func (m *QueryStakerListResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryStakerListResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryStakerListResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryStakerListResponse proto.InternalMessageInfo + +func (m *QueryStakerListResponse) GetStakerList() *StakerList { + if m != nil { + return m.StakerList + } + return nil +} + +type QueryStakerInfosRequest struct { + AssetID string `protobuf:"bytes,1,opt,name=asset_id,json=assetId,proto3" json:"asset_id,omitempty"` +} + +func (m *QueryStakerInfosRequest) Reset() { *m = QueryStakerInfosRequest{} } +func (m *QueryStakerInfosRequest) String() string { return proto.CompactTextString(m) } +func (*QueryStakerInfosRequest) ProtoMessage() {} +func (*QueryStakerInfosRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_b8cba1249806967d, []int{2} +} +func (m *QueryStakerInfosRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryStakerInfosRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryStakerInfosRequest.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 *QueryStakerInfosRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryStakerInfosRequest.Merge(m, src) +} +func (m *QueryStakerInfosRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryStakerInfosRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryStakerInfosRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryStakerInfosRequest proto.InternalMessageInfo + +func (m *QueryStakerInfosRequest) GetAssetID() string { + if m != nil { + return m.AssetID + } + return "" +} + +type QueryStakerInfosResponse struct { + StakerInfos []*StakerInfo `protobuf:"bytes,1,rep,name=staker_infos,json=stakerInfos,proto3" json:"staker_infos,omitempty"` +} + +func (m *QueryStakerInfosResponse) Reset() { *m = QueryStakerInfosResponse{} } +func (m *QueryStakerInfosResponse) String() string { return proto.CompactTextString(m) } +func (*QueryStakerInfosResponse) ProtoMessage() {} +func (*QueryStakerInfosResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_b8cba1249806967d, []int{3} +} +func (m *QueryStakerInfosResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryStakerInfosResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryStakerInfosResponse.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 *QueryStakerInfosResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryStakerInfosResponse.Merge(m, src) +} +func (m *QueryStakerInfosResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryStakerInfosResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryStakerInfosResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryStakerInfosResponse proto.InternalMessageInfo + +func (m *QueryStakerInfosResponse) GetStakerInfos() []*StakerInfo { + if m != nil { + return m.StakerInfos + } + return nil +} + // QueryParamsRequest is request type for the Query/Params RPC method. type QueryParamsRequest struct { } @@ -38,7 +214,7 @@ func (m *QueryParamsRequest) Reset() { *m = QueryParamsRequest{} } func (m *QueryParamsRequest) String() string { return proto.CompactTextString(m) } func (*QueryParamsRequest) ProtoMessage() {} func (*QueryParamsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_b8cba1249806967d, []int{0} + return fileDescriptor_b8cba1249806967d, []int{4} } func (m *QueryParamsRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -77,7 +253,7 @@ func (m *QueryParamsResponse) Reset() { *m = QueryParamsResponse{} } func (m *QueryParamsResponse) String() string { return proto.CompactTextString(m) } func (*QueryParamsResponse) ProtoMessage() {} func (*QueryParamsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_b8cba1249806967d, []int{1} + return fileDescriptor_b8cba1249806967d, []int{5} } func (m *QueryParamsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -123,7 +299,7 @@ func (m *QueryGetPricesRequest) Reset() { *m = QueryGetPricesRequest{} } func (m *QueryGetPricesRequest) String() string { return proto.CompactTextString(m) } func (*QueryGetPricesRequest) ProtoMessage() {} func (*QueryGetPricesRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_b8cba1249806967d, []int{2} + return fileDescriptor_b8cba1249806967d, []int{6} } func (m *QueryGetPricesRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -169,7 +345,7 @@ func (m *QueryGetLatestPriceRequest) Reset() { *m = QueryGetLatestPriceR func (m *QueryGetLatestPriceRequest) String() string { return proto.CompactTextString(m) } func (*QueryGetLatestPriceRequest) ProtoMessage() {} func (*QueryGetLatestPriceRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_b8cba1249806967d, []int{3} + return fileDescriptor_b8cba1249806967d, []int{7} } func (m *QueryGetLatestPriceRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -215,7 +391,7 @@ func (m *QueryGetPricesResponse) Reset() { *m = QueryGetPricesResponse{} func (m *QueryGetPricesResponse) String() string { return proto.CompactTextString(m) } func (*QueryGetPricesResponse) ProtoMessage() {} func (*QueryGetPricesResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_b8cba1249806967d, []int{4} + return fileDescriptor_b8cba1249806967d, []int{8} } func (m *QueryGetPricesResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -261,7 +437,7 @@ func (m *QueryGetLatestPriceResponse) Reset() { *m = QueryGetLatestPrice func (m *QueryGetLatestPriceResponse) String() string { return proto.CompactTextString(m) } func (*QueryGetLatestPriceResponse) ProtoMessage() {} func (*QueryGetLatestPriceResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_b8cba1249806967d, []int{5} + return fileDescriptor_b8cba1249806967d, []int{9} } func (m *QueryGetLatestPriceResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -307,7 +483,7 @@ func (m *QueryAllPricesRequest) Reset() { *m = QueryAllPricesRequest{} } func (m *QueryAllPricesRequest) String() string { return proto.CompactTextString(m) } func (*QueryAllPricesRequest) ProtoMessage() {} func (*QueryAllPricesRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_b8cba1249806967d, []int{6} + return fileDescriptor_b8cba1249806967d, []int{10} } func (m *QueryAllPricesRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -355,7 +531,7 @@ func (m *QueryAllPricesResponse) Reset() { *m = QueryAllPricesResponse{} func (m *QueryAllPricesResponse) String() string { return proto.CompactTextString(m) } func (*QueryAllPricesResponse) ProtoMessage() {} func (*QueryAllPricesResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_b8cba1249806967d, []int{7} + return fileDescriptor_b8cba1249806967d, []int{11} } func (m *QueryAllPricesResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -406,7 +582,7 @@ func (m *QueryGetValidatorUpdateBlockRequest) Reset() { *m = QueryGetVal func (m *QueryGetValidatorUpdateBlockRequest) String() string { return proto.CompactTextString(m) } func (*QueryGetValidatorUpdateBlockRequest) ProtoMessage() {} func (*QueryGetValidatorUpdateBlockRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_b8cba1249806967d, []int{8} + return fileDescriptor_b8cba1249806967d, []int{12} } func (m *QueryGetValidatorUpdateBlockRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -445,7 +621,7 @@ func (m *QueryGetValidatorUpdateBlockResponse) Reset() { *m = QueryGetVa func (m *QueryGetValidatorUpdateBlockResponse) String() string { return proto.CompactTextString(m) } func (*QueryGetValidatorUpdateBlockResponse) ProtoMessage() {} func (*QueryGetValidatorUpdateBlockResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_b8cba1249806967d, []int{9} + return fileDescriptor_b8cba1249806967d, []int{13} } func (m *QueryGetValidatorUpdateBlockResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -489,7 +665,7 @@ func (m *QueryGetIndexRecentParamsRequest) Reset() { *m = QueryGetIndexR func (m *QueryGetIndexRecentParamsRequest) String() string { return proto.CompactTextString(m) } func (*QueryGetIndexRecentParamsRequest) ProtoMessage() {} func (*QueryGetIndexRecentParamsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_b8cba1249806967d, []int{10} + return fileDescriptor_b8cba1249806967d, []int{14} } func (m *QueryGetIndexRecentParamsRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -528,7 +704,7 @@ func (m *QueryGetIndexRecentParamsResponse) Reset() { *m = QueryGetIndex func (m *QueryGetIndexRecentParamsResponse) String() string { return proto.CompactTextString(m) } func (*QueryGetIndexRecentParamsResponse) ProtoMessage() {} func (*QueryGetIndexRecentParamsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_b8cba1249806967d, []int{11} + return fileDescriptor_b8cba1249806967d, []int{15} } func (m *QueryGetIndexRecentParamsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -572,7 +748,7 @@ func (m *QueryGetIndexRecentMsgRequest) Reset() { *m = QueryGetIndexRece func (m *QueryGetIndexRecentMsgRequest) String() string { return proto.CompactTextString(m) } func (*QueryGetIndexRecentMsgRequest) ProtoMessage() {} func (*QueryGetIndexRecentMsgRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_b8cba1249806967d, []int{12} + return fileDescriptor_b8cba1249806967d, []int{16} } func (m *QueryGetIndexRecentMsgRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -611,7 +787,7 @@ func (m *QueryGetIndexRecentMsgResponse) Reset() { *m = QueryGetIndexRec func (m *QueryGetIndexRecentMsgResponse) String() string { return proto.CompactTextString(m) } func (*QueryGetIndexRecentMsgResponse) ProtoMessage() {} func (*QueryGetIndexRecentMsgResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_b8cba1249806967d, []int{13} + return fileDescriptor_b8cba1249806967d, []int{17} } func (m *QueryGetIndexRecentMsgResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -657,7 +833,7 @@ func (m *QueryGetRecentMsgRequest) Reset() { *m = QueryGetRecentMsgReque func (m *QueryGetRecentMsgRequest) String() string { return proto.CompactTextString(m) } func (*QueryGetRecentMsgRequest) ProtoMessage() {} func (*QueryGetRecentMsgRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_b8cba1249806967d, []int{14} + return fileDescriptor_b8cba1249806967d, []int{18} } func (m *QueryGetRecentMsgRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -703,7 +879,7 @@ func (m *QueryGetRecentMsgResponse) Reset() { *m = QueryGetRecentMsgResp func (m *QueryGetRecentMsgResponse) String() string { return proto.CompactTextString(m) } func (*QueryGetRecentMsgResponse) ProtoMessage() {} func (*QueryGetRecentMsgResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_b8cba1249806967d, []int{15} + return fileDescriptor_b8cba1249806967d, []int{19} } func (m *QueryGetRecentMsgResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -749,7 +925,7 @@ func (m *QueryAllRecentMsgRequest) Reset() { *m = QueryAllRecentMsgReque func (m *QueryAllRecentMsgRequest) String() string { return proto.CompactTextString(m) } func (*QueryAllRecentMsgRequest) ProtoMessage() {} func (*QueryAllRecentMsgRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_b8cba1249806967d, []int{16} + return fileDescriptor_b8cba1249806967d, []int{20} } func (m *QueryAllRecentMsgRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -797,7 +973,7 @@ func (m *QueryAllRecentMsgResponse) Reset() { *m = QueryAllRecentMsgResp func (m *QueryAllRecentMsgResponse) String() string { return proto.CompactTextString(m) } func (*QueryAllRecentMsgResponse) ProtoMessage() {} func (*QueryAllRecentMsgResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_b8cba1249806967d, []int{17} + return fileDescriptor_b8cba1249806967d, []int{21} } func (m *QueryAllRecentMsgResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -850,7 +1026,7 @@ func (m *QueryGetRecentParamsRequest) Reset() { *m = QueryGetRecentParam func (m *QueryGetRecentParamsRequest) String() string { return proto.CompactTextString(m) } func (*QueryGetRecentParamsRequest) ProtoMessage() {} func (*QueryGetRecentParamsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_b8cba1249806967d, []int{18} + return fileDescriptor_b8cba1249806967d, []int{22} } func (m *QueryGetRecentParamsRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -896,7 +1072,7 @@ func (m *QueryGetRecentParamsResponse) Reset() { *m = QueryGetRecentPara func (m *QueryGetRecentParamsResponse) String() string { return proto.CompactTextString(m) } func (*QueryGetRecentParamsResponse) ProtoMessage() {} func (*QueryGetRecentParamsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_b8cba1249806967d, []int{19} + return fileDescriptor_b8cba1249806967d, []int{23} } func (m *QueryGetRecentParamsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -942,7 +1118,7 @@ func (m *QueryAllRecentParamsRequest) Reset() { *m = QueryAllRecentParam func (m *QueryAllRecentParamsRequest) String() string { return proto.CompactTextString(m) } func (*QueryAllRecentParamsRequest) ProtoMessage() {} func (*QueryAllRecentParamsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_b8cba1249806967d, []int{20} + return fileDescriptor_b8cba1249806967d, []int{24} } func (m *QueryAllRecentParamsRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -990,7 +1166,7 @@ func (m *QueryAllRecentParamsResponse) Reset() { *m = QueryAllRecentPara func (m *QueryAllRecentParamsResponse) String() string { return proto.CompactTextString(m) } func (*QueryAllRecentParamsResponse) ProtoMessage() {} func (*QueryAllRecentParamsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_b8cba1249806967d, []int{21} + return fileDescriptor_b8cba1249806967d, []int{25} } func (m *QueryAllRecentParamsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1034,6 +1210,10 @@ func (m *QueryAllRecentParamsResponse) GetPagination() *query.PageResponse { } func init() { + proto.RegisterType((*QueryStakerListRequest)(nil), "exocore.oracle.v1.QueryStakerListRequest") + proto.RegisterType((*QueryStakerListResponse)(nil), "exocore.oracle.v1.QueryStakerListResponse") + proto.RegisterType((*QueryStakerInfosRequest)(nil), "exocore.oracle.v1.QueryStakerInfosRequest") + proto.RegisterType((*QueryStakerInfosResponse)(nil), "exocore.oracle.v1.QueryStakerInfosResponse") proto.RegisterType((*QueryParamsRequest)(nil), "exocore.oracle.v1.QueryParamsRequest") proto.RegisterType((*QueryParamsResponse)(nil), "exocore.oracle.v1.QueryParamsResponse") proto.RegisterType((*QueryGetPricesRequest)(nil), "exocore.oracle.v1.QueryGetPricesRequest") @@ -1061,74 +1241,85 @@ func init() { func init() { proto.RegisterFile("exocore/oracle/v1/query.proto", fileDescriptor_b8cba1249806967d) } var fileDescriptor_b8cba1249806967d = []byte{ - // 1061 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x97, 0xcf, 0x6f, 0xdc, 0x54, - 0x10, 0xc7, 0xf3, 0x9a, 0x1f, 0xd0, 0xe9, 0x0f, 0xc8, 0xeb, 0x52, 0x35, 0x26, 0xdd, 0xb4, 0xa6, - 0x69, 0x52, 0xd2, 0xda, 0xd9, 0x4d, 0xc8, 0x16, 0x44, 0x91, 0x12, 0x09, 0xaa, 0x56, 0x50, 0x25, - 0x2b, 0xe0, 0x50, 0x21, 0x56, 0xde, 0xdd, 0x27, 0x63, 0xe2, 0xf5, 0xdb, 0xda, 0xde, 0x25, 0x55, - 0x55, 0x21, 0x71, 0xe0, 0xc2, 0x05, 0x89, 0x03, 0x12, 0xe2, 0xc2, 0x09, 0x0e, 0xd0, 0x0b, 0x37, - 0xfe, 0x00, 0xd4, 0x63, 0x25, 0x2e, 0x9c, 0x10, 0x4a, 0xf8, 0x43, 0x90, 0x9f, 0xc7, 0xbb, 0xeb, - 0xf5, 0xf3, 0x8f, 0xad, 0x72, 0xcb, 0xfa, 0x7d, 0x67, 0xe6, 0x33, 0xf3, 0x66, 0x3c, 0x0e, 0x5c, - 0x64, 0x07, 0xbc, 0xc5, 0x5d, 0xa6, 0x73, 0xd7, 0x68, 0xd9, 0x4c, 0xef, 0x57, 0xf4, 0x07, 0x3d, - 0xe6, 0x3e, 0xd4, 0xba, 0x2e,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 0x9f, - 0x12, 0x2c, 0xe0, 0x8a, 0x24, 0x43, 0x99, 0x43, 0xcc, 0xb7, 0xd4, 0x97, 0x9c, 0xa9, 0x2a, 0x5c, - 0x8a, 0x60, 0xee, 0x04, 0x6f, 0x9a, 0xba, 0x18, 0xdf, 0xf8, 0x10, 0x7d, 0x09, 0x97, 0x33, 0x34, - 0x48, 0x7b, 0x1f, 0xce, 0x49, 0x5e, 0x55, 0x88, 0x7a, 0x45, 0x82, 0x9a, 0x70, 0x85, 0x9c, 0xf3, - 0xd6, 0xf8, 0x81, 0xba, 0x04, 0x17, 0x25, 0x00, 0x1f, 0x78, 0x66, 0x44, 0xe8, 0x41, 0x39, 0x4d, - 0x80, 0x78, 0x7b, 0xf0, 0xf2, 0xf8, 0x3b, 0x37, 0xa3, 0xc9, 0xe3, 0x4e, 0x10, 0xec, 0xac, 0x15, - 0x7b, 0xaa, 0xae, 0xc3, 0x85, 0x28, 0xe8, 0x38, 0x10, 0x2d, 0xc1, 0xec, 0xf0, 0xaa, 0x66, 0xea, - 0xe1, 0x0f, 0xf5, 0x53, 0x58, 0x90, 0x58, 0x20, 0xe1, 0x36, 0x40, 0x82, 0x6d, 0x51, 0xc2, 0x36, - 0x8e, 0x75, 0xd2, 0x1d, 0x10, 0x35, 0x91, 0x68, 0xdb, 0xb6, 0x13, 0x44, 0xc7, 0x35, 0x82, 0x3f, - 0x13, 0x4c, 0x22, 0x1e, 0x24, 0x25, 0x89, 0xe9, 0x89, 0x93, 0x38, 0xbe, 0x79, 0xdc, 0x18, 0xbe, - 0xeb, 0x24, 0x5d, 0x9d, 0x72, 0x45, 0x9f, 0xc3, 0xa2, 0xdc, 0x08, 0x13, 0xbc, 0x0b, 0x67, 0x64, - 0x0d, 0xbe, 0x94, 0x9a, 0x63, 0xac, 0xb7, 0x4f, 0xbb, 0xa3, 0x6d, 0xcd, 0x10, 0x70, 0x50, 0xc9, - 0x38, 0xe0, 0x71, 0xdd, 0xd8, 0xef, 0x04, 0x73,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, 0x39, 0x27, 0xfe, 0xa7, 0xdd, 0xf8, 0x3f, 0x00, 0x00, 0xff, 0xff, 0x4f, 0x40, 0xa3, - 0x27, 0x98, 0x10, 0x00, 0x00, + // 1236 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x98, 0x4b, 0x6f, 0x1b, 0x55, + 0x14, 0x80, 0x33, 0xcd, 0xab, 0x39, 0x09, 0x2d, 0xb9, 0x0d, 0x25, 0x19, 0x12, 0x27, 0x1d, 0xf2, + 0x7e, 0xcc, 0xc4, 0x4e, 0x48, 0x0a, 0xa2, 0x55, 0x1d, 0x01, 0x51, 0xaa, 0x52, 0x25, 0xe6, 0x21, + 0x51, 0x55, 0x58, 0x63, 0xfb, 0x62, 0x86, 0x8c, 0x3d, 0xee, 0xcc, 0xd8, 0xa4, 0xaa, 0x2a, 0x24, + 0x16, 0x6c, 0xd8, 0x20, 0xb1, 0x40, 0x02, 0x36, 0xac, 0x60, 0x01, 0x6c, 0xd8, 0xf1, 0x03, 0x50, + 0x97, 0x95, 0xd8, 0xb0, 0xaa, 0x50, 0x82, 0xf8, 0x1d, 0x68, 0xee, 0x9c, 0xb1, 0x67, 0x3c, 0x77, + 0x1e, 0x46, 0xd9, 0xd9, 0xf7, 0x9e, 0xc7, 0x77, 0x1e, 0x3e, 0xf7, 0xc8, 0x30, 0x43, 0x4f, 0x8c, + 0xb2, 0x61, 0x52, 0xc5, 0x30, 0xd5, 0xb2, 0x4e, 0x95, 0x56, 0x56, 0x79, 0xd0, 0xa4, 0xe6, 0x43, + 0xb9, 0x61, 0x1a, 0xb6, 0x41, 0xc6, 0xf1, 0x5a, 0x76, 0xaf, 0xe5, 0x56, 0x56, 0x5c, 0x2d, 0x1b, + 0x56, 0xcd, 0xb0, 0x94, 0x92, 0x6a, 0x51, 0x57, 0x56, 0x69, 0x65, 0x4b, 0xd4, 0x56, 0xb3, 0x4a, + 0x43,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5, 0x30, 0xea, 0x16, 0x25, 0x37, 0x61, 0xd4, 0x62, 0xa7, + 0x45, 0x5d, 0xb3, 0x6c, 0x66, 0x65, 0x34, 0x37, 0x23, 0x87, 0x9a, 0x47, 0xf6, 0xe9, 0x82, 0xd5, + 0xfe, 0x2c, 0xe5, 0x03, 0xa6, 0x0f, 0xea, 0x1f, 0x19, 0x56, 0xaf, 0x74, 0xf7, 0x61, 0x32, 0x6c, + 0x02, 0xf1, 0x6e, 0xc1, 0x18, 0xe2, 0x69, 0xce, 0xf9, 0xa4, 0x30, 0xd7, 0x1f, 0xcb, 0xe7, 0x68, + 0x17, 0x30, 0x22, 0x66, 0x49, 0x9a, 0x00, 0xc2, 0xac, 0x1f, 0xb2, 0xe2, 0x22, 0x9b, 0x74, 0x17, + 0xae, 0x04, 0x4e, 0xd1, 0xdd, 0x2e, 0x0c, 0xb9, 0x4d, 0x80, 0x89, 0x98, 0xe2, 0x38, 0x72, 0x55, + 0xf6, 0x06, 0x9e, 0x3c, 0x9b, 0xed, 0x2b, 0xa0, 0xb8, 0x94, 0x83, 0x17, 0x98, 0xbd, 0x7d, 0x6a, + 0x1f, 0xb2, 0x86, 0xf4, 0x92, 0x30, 0x05, 0x17, 0x59, 0xfd, 0xbd, 0x24, 0x0c, 0x14, 0x86, 0xd9, + 0xf7, 0x83, 0x8a, 0xb4, 0x0b, 0xa2, 0xa7, 0x73, 0x47, 0xb5, 0xa9, 0xe5, 0x6a, 0xa6, 0x50, 0x3c, + 0xc2, 0x86, 0xf0, 0x39, 0xf3, 0xf1, 0xb3, 0x93, 0x38, 0x7e, 0x26, 0xd0, 0xe6, 0x67, 0xdf, 0xa4, + 0xfb, 0xf0, 0x12, 0x97, 0x05, 0xed, 0xde, 0x80, 0x41, 0x26, 0x88, 0x66, 0xaf, 0x45, 0x99, 0x7d, + 0x57, 0xab, 0xd1, 0x82, 0xd1, 0xac, 0x57, 0xd0, 0xbc, 0xab, 0x25, 0x15, 0x31, 0x3b, 0x79, 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 0xca, 0x42, 0x94, 0xb3, + 0x40, 0xc7, 0x89, 0x8b, 0x49, 0x62, 0x88, 0xb3, 0xc1, 0x70, 0x96, 0xc8, 0x42, 0x02, 0x8e, 0xdb, + 0x4e, 0x4e, 0x01, 0x87, 0xdc, 0xa7, 0x97, 0x2c, 0x47, 0x79, 0xe8, 0x5e, 0xa8, 0xc4, 0x95, 0x14, + 0x92, 0x88, 0x73, 0x9d, 0xe1, 0xe4, 0xc8, 0x66, 0x12, 0x0e, 0x53, 0x53, 0x1e, 0x79, 0xfb, 0xd6, + 0x63, 0xf2, 0xb3, 0x00, 0xa3, 0xbe, 0x3d, 0x88, 0x6c, 0xc4, 0x38, 0x0d, 0xef, 0x6e, 0xa2, 0x9c, + 0x56, 0x1c, 0x41, 0x6f, 0x32, 0xd0, 0xeb, 0x64, 0x27, 0x01, 0x54, 0x67, 0xba, 0x45, 0xc6, 0xeb, + 0xc7, 0xfd, 0x43, 0x80, 0x09, 0xde, 0x0b, 0x4f, 0x76, 0x62, 0x40, 0x62, 0x76, 0x11, 0x71, 0xb7, + 0x67, 0x3d, 0x8c, 0xe4, 0x06, 0x8b, 0x64, 0x97, 0xbc, 0x92, 0x10, 0x09, 0x7f, 0x81, 0x21, 0xbf, + 0x0b, 0x30, 0x1e, 0x7a, 0xff, 0xc9, 0x56, 0x0c, 0x4d, 0xd4, 0x72, 0x22, 0x6e, 0xf7, 0xa6, 0x84, + 0xfc, 0xaf, 0x31, 0xfe, 0x6d, 0x92, 0x4b, 0xe0, 0xe7, 0xac, 0x34, 0xe4, 0x57, 0x01, 0x2e, 0x05, + 0x17, 0x04, 0xb2, 0x99, 0x0e, 0xa2, 0xf3, 0x1c, 0x8b, 0xd9, 0x1e, 0x34, 0x90, 0x79, 0x97, 0x31, + 0x67, 0x89, 0xd2, 0x0b, 0x73, 0xcd, 0xaa, 0x92, 0x1f, 0x04, 0x18, 0xe9, 0xb0, 0xae, 0xc5, 0x78, + 0x0e, 0x61, 0xae, 0xa7, 0x13, 0x46, 0xc2, 0x57, 0x19, 0xe1, 0x16, 0xc9, 0x26, 0x10, 0x76, 0xd8, + 0x94, 0x47, 0xac, 0x21, 0x1e, 0x93, 0xef, 0x05, 0x18, 0x6b, 0x1b, 0xcc, 0xeb, 0x7a, 0x34, 0x26, + 0x67, 0xb9, 0x89, 0xc6, 0xe4, 0x2d, 0x29, 0x52, 0x96, 0x61, 0xae, 0x91, 0x95, 0xd4, 0x98, 0xe4, + 0x97, 0x36, 0x1e, 0xf6, 0xaa, 0x9c, 0x98, 0x98, 0x60, 0x9b, 0x2a, 0xa9, 0xe5, 0x11, 0xf2, 0x75, + 0x06, 0xb9, 0x43, 0xb6, 0xd3, 0x41, 0xba, 0xbd, 0xd9, 0x4e, 0xe7, 0x4f, 0x02, 0x5c, 0xf6, 0x9b, + 0x75, 0x32, 0x2a, 0x27, 0x26, 0x29, 0x25, 0x72, 0xc4, 0x1e, 0x21, 0x6d, 0x33, 0x64, 0x99, 0xac, + 0xf7, 0x82, 0xbc, 0x77, 0xfb, 0xc9, 0x69, 0x46, 0x78, 0x7a, 0x9a, 0x11, 0xfe, 0x3e, 0xcd, 0x08, + 0x5f, 0x9d, 0x65, 0xfa, 0x9e, 0x9e, 0x65, 0xfa, 0xfe, 0x3a, 0xcb, 0xf4, 0xdd, 0xdb, 0xac, 0x6a, + 0xf6, 0xc7, 0xcd, 0x92, 0x5c, 0x36, 0x6a, 0x51, 0x16, 0x4f, 0x3c, 0x9b, 0xf6, 0xc3, 0x06, 0xb5, + 0x4a, 0x43, 0xec, 0x9f, 0x94, 0xad, 0xff, 0x02, 0x00, 0x00, 0xff, 0xff, 0x71, 0x89, 0x00, 0xc2, + 0x34, 0x13, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1143,6 +1334,8 @@ const _ = grpc.SupportPackageIsVersion4 // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. type QueryClient interface { + StakerList(ctx context.Context, in *QueryStakerListRequest, opts ...grpc.CallOption) (*QueryStakerListResponse, error) + StakerInfos(ctx context.Context, in *QueryStakerInfosRequest, opts ...grpc.CallOption) (*QueryStakerInfosResponse, error) // Parameters queries the parameters of the module. Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) // Queries a list of Prices items. @@ -1173,6 +1366,24 @@ func NewQueryClient(cc grpc1.ClientConn) QueryClient { return &queryClient{cc} } +func (c *queryClient) StakerList(ctx context.Context, in *QueryStakerListRequest, opts ...grpc.CallOption) (*QueryStakerListResponse, error) { + out := new(QueryStakerListResponse) + err := c.cc.Invoke(ctx, "/exocore.oracle.v1.Query/StakerList", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) StakerInfos(ctx context.Context, in *QueryStakerInfosRequest, opts ...grpc.CallOption) (*QueryStakerInfosResponse, error) { + out := new(QueryStakerInfosResponse) + err := c.cc.Invoke(ctx, "/exocore.oracle.v1.Query/StakerInfos", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) { out := new(QueryParamsResponse) err := c.cc.Invoke(ctx, "/exocore.oracle.v1.Query/Params", in, out, opts...) @@ -1265,6 +1476,8 @@ func (c *queryClient) RecentParamsAll(ctx context.Context, in *QueryAllRecentPar // QueryServer is the server API for Query service. type QueryServer interface { + StakerList(context.Context, *QueryStakerListRequest) (*QueryStakerListResponse, error) + StakerInfos(context.Context, *QueryStakerInfosRequest) (*QueryStakerInfosResponse, error) // Parameters queries the parameters of the module. Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) // Queries a list of Prices items. @@ -1291,6 +1504,12 @@ type QueryServer interface { type UnimplementedQueryServer struct { } +func (*UnimplementedQueryServer) StakerList(ctx context.Context, req *QueryStakerListRequest) (*QueryStakerListResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method StakerList not implemented") +} +func (*UnimplementedQueryServer) StakerInfos(ctx context.Context, req *QueryStakerInfosRequest) (*QueryStakerInfosResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method StakerInfos not implemented") +} func (*UnimplementedQueryServer) Params(ctx context.Context, req *QueryParamsRequest) (*QueryParamsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Params not implemented") } @@ -1326,6 +1545,42 @@ func RegisterQueryServer(s grpc1.Server, srv QueryServer) { s.RegisterService(&_Query_serviceDesc, srv) } +func _Query_StakerList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryStakerListRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).StakerList(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/exocore.oracle.v1.Query/StakerList", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).StakerList(ctx, req.(*QueryStakerListRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_StakerInfos_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryStakerInfosRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).StakerInfos(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/exocore.oracle.v1.Query/StakerInfos", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).StakerInfos(ctx, req.(*QueryStakerInfosRequest)) + } + return interceptor(ctx, in, info, handler) +} + func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(QueryParamsRequest) if err := dec(in); err != nil { @@ -1510,6 +1765,14 @@ var _Query_serviceDesc = grpc.ServiceDesc{ ServiceName: "exocore.oracle.v1.Query", HandlerType: (*QueryServer)(nil), Methods: []grpc.MethodDesc{ + { + MethodName: "StakerList", + Handler: _Query_StakerList_Handler, + }, + { + MethodName: "StakerInfos", + Handler: _Query_StakerInfos_Handler, + }, { MethodName: "Params", Handler: _Query_Params_Handler, @@ -1555,7 +1818,7 @@ var _Query_serviceDesc = grpc.ServiceDesc{ Metadata: "exocore/oracle/v1/query.proto", } -func (m *QueryParamsRequest) Marshal() (dAtA []byte, err error) { +func (m *QueryStakerListRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1565,20 +1828,27 @@ func (m *QueryParamsRequest) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *QueryParamsRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryStakerListRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryParamsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryStakerListRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l + if len(m.AssetID) > 0 { + i -= len(m.AssetID) + copy(dAtA[i:], m.AssetID) + i = encodeVarintQuery(dAtA, i, uint64(len(m.AssetID))) + i-- + dAtA[i] = 0xa + } return len(dAtA) - i, nil } -func (m *QueryParamsResponse) Marshal() (dAtA []byte, err error) { +func (m *QueryStakerListResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1588,30 +1858,32 @@ func (m *QueryParamsResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *QueryParamsResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryStakerListResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryStakerListResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - { - size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err + if m.StakerList != nil { + { + size, err := m.StakerList.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0xa } - i-- - dAtA[i] = 0xa return len(dAtA) - i, nil } -func (m *QueryGetPricesRequest) Marshal() (dAtA []byte, err error) { +func (m *QueryStakerInfosRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1621,25 +1893,27 @@ func (m *QueryGetPricesRequest) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *QueryGetPricesRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryStakerInfosRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryGetPricesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryStakerInfosRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if m.TokenId != 0 { - i = encodeVarintQuery(dAtA, i, uint64(m.TokenId)) + if len(m.AssetID) > 0 { + i -= len(m.AssetID) + copy(dAtA[i:], m.AssetID) + i = encodeVarintQuery(dAtA, i, uint64(len(m.AssetID))) i-- - dAtA[i] = 0x8 + dAtA[i] = 0xa } return len(dAtA) - i, nil } -func (m *QueryGetLatestPriceRequest) Marshal() (dAtA []byte, err error) { +func (m *QueryStakerInfosResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1649,25 +1923,34 @@ func (m *QueryGetLatestPriceRequest) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *QueryGetLatestPriceRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryStakerInfosResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryGetLatestPriceRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryStakerInfosResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if m.TokenId != 0 { - i = encodeVarintQuery(dAtA, i, uint64(m.TokenId)) - i-- - dAtA[i] = 0x8 + if len(m.StakerInfos) > 0 { + for iNdEx := len(m.StakerInfos) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.StakerInfos[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } } return len(dAtA) - i, nil } -func (m *QueryGetPricesResponse) Marshal() (dAtA []byte, err error) { +func (m *QueryParamsRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1677,30 +1960,142 @@ func (m *QueryGetPricesResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *QueryGetPricesResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryParamsRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryGetPricesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryParamsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - { - size, err := m.Prices.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa return len(dAtA) - i, nil } -func (m *QueryGetLatestPriceResponse) Marshal() (dAtA []byte, err error) { +func (m *QueryParamsResponse) 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 *QueryParamsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *QueryGetPricesRequest) 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 *QueryGetPricesRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryGetPricesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.TokenId != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.TokenId)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *QueryGetLatestPriceRequest) 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 *QueryGetLatestPriceRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryGetLatestPriceRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.TokenId != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.TokenId)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *QueryGetPricesResponse) 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 *QueryGetPricesResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryGetPricesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Prices.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *QueryGetLatestPriceResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -2286,6 +2681,60 @@ func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { dAtA[offset] = uint8(v) return base } +func (m *QueryStakerListRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.AssetID) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryStakerListResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.StakerList != nil { + l = m.StakerList.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryStakerInfosRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.AssetID) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryStakerInfosResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.StakerInfos) > 0 { + for _, e := range m.StakerInfos { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + return n +} + func (m *QueryParamsRequest) Size() (n int) { if m == nil { return 0 @@ -2560,6 +3009,340 @@ func sovQuery(x uint64) (n int) { func sozQuery(x uint64) (n int) { return sovQuery(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } +func (m *QueryStakerListRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryStakerListRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryStakerListRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AssetID", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AssetID = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryStakerListResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryStakerListResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryStakerListResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StakerList", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.StakerList == nil { + m.StakerList = &StakerList{} + } + if err := m.StakerList.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryStakerInfosRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryStakerInfosRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryStakerInfosRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AssetID", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AssetID = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryStakerInfosResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryStakerInfosResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryStakerInfosResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StakerInfos", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.StakerInfos = append(m.StakerInfos, &StakerInfo{}) + if err := m.StakerInfos[len(m.StakerInfos)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *QueryParamsRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 diff --git a/x/oracle/types/query.pb.gw.go b/x/oracle/types/query.pb.gw.go index 7cf7db656..00b3f45aa 100644 --- a/x/oracle/types/query.pb.gw.go +++ b/x/oracle/types/query.pb.gw.go @@ -33,6 +33,78 @@ var _ = utilities.NewDoubleArray var _ = descriptor.ForMessage var _ = metadata.Join +var ( + filter_Query_StakerList_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Query_StakerList_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryStakerListRequest + 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_Query_StakerList_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.StakerList(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_StakerList_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryStakerListRequest + 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_Query_StakerList_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.StakerList(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_Query_StakerInfos_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Query_StakerInfos_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryStakerInfosRequest + 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_Query_StakerInfos_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.StakerInfos(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_StakerInfos_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryStakerInfosRequest + 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_Query_StakerInfos_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.StakerInfos(ctx, &protoReq) + return msg, metadata, err + +} + func request_Query_Params_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq QueryParamsRequest var metadata runtime.ServerMetadata @@ -399,6 +471,52 @@ func local_request_Query_RecentParamsAll_0(ctx context.Context, marshaler runtim // Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterQueryHandlerFromEndpoint instead. func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error { + mux.Handle("GET", pattern_Query_StakerList_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_StakerList_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 { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_StakerList_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_StakerInfos_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_StakerInfos_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 { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_StakerInfos_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("GET", pattern_Query_Params_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -670,6 +788,46 @@ func RegisterQueryHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc // "QueryClient" to call the correct interceptors. func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryClient) error { + mux.Handle("GET", pattern_Query_StakerList_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_StakerList_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_StakerList_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_StakerInfos_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_StakerInfos_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_StakerInfos_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("GET", pattern_Query_Params_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -874,6 +1032,10 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie } var ( + pattern_Query_StakerList_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"ExocoreNetwork", "exocore", "oracle", "staker_list"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_StakerInfos_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"ExocoreNetwork", "exocore", "oracle", "staker_infos"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_Params_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"ExocoreNetwork", "exocore", "oracle", "params"}, "", runtime.AssumeColonVerbOpt(false))) pattern_Query_Prices_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"ExocoreNetwork", "exocore", "oracle", "prices", "token_id"}, "", runtime.AssumeColonVerbOpt(false))) @@ -896,6 +1058,10 @@ var ( ) var ( + forward_Query_StakerList_0 = runtime.ForwardResponseMessage + + forward_Query_StakerInfos_0 = runtime.ForwardResponseMessage + forward_Query_Params_0 = runtime.ForwardResponseMessage forward_Query_Prices_0 = runtime.ForwardResponseMessage