From 8f0eb00fe2a32b5a4b9c31f61a71480945dcaf5c Mon Sep 17 00:00:00 2001 From: Leon <156270887+leonz789@users.noreply.github.com> Date: Mon, 14 Oct 2024 17:12:48 +0800 Subject: [PATCH 1/2] =?UTF-8?q?add=20rest=20api=20to=20query=20token-index?= =?UTF-8?q?,=20update=20price-feeder=20to=20panic=20at=20er=E2=80=A6=20(#2?= =?UTF-8?q?08)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * add rest api to query token-index, update price-feeder to panic at error initialization * lint --- cmd/exocored/root.go | 4 + go.mod | 2 +- go.sum | 4 +- proto/exocore/oracle/v1/query.proto | 52 +- x/oracle/client/cli/query.go | 1 + x/oracle/client/cli/query_tokens.go | 29 ++ x/oracle/keeper/query_tokens.go | 24 + x/oracle/keeper/tokens.go | 19 + x/oracle/types/query.pb.go | 779 ++++++++++++++++++++++++---- x/oracle/types/query.pb.gw.go | 91 +++- 10 files changed, 862 insertions(+), 143 deletions(-) create mode 100644 x/oracle/client/cli/query_tokens.go create mode 100644 x/oracle/keeper/query_tokens.go create mode 100644 x/oracle/keeper/tokens.go diff --git a/cmd/exocored/root.go b/cmd/exocored/root.go index e1dd7d011..19e2044e1 100644 --- a/cmd/exocored/root.go +++ b/cmd/exocored/root.go @@ -53,6 +53,7 @@ import ( evmoskr "github.com/evmos/evmos/v16/crypto/keyring" pricefeeder "github.com/ExocoreNetwork/price-feeder/external" + feedertypes "github.com/ExocoreNetwork/price-feeder/types" ) const ( @@ -154,6 +155,9 @@ func NewRootCmd() (*cobra.Command, params.EncodingConfig) { defer func() { if err := recover(); err != nil { fmt.Println("price-feeder failed", err) + if e, ok := err.(error); ok && errors.Is(e, feedertypes.ErrInitFail) { + panic(e) + } } }() mnemonic, _ := cmd.Flags().GetString(flagMnemonic) diff --git a/go.mod b/go.mod index 0cd901025..6c0fa830a 100644 --- a/go.mod +++ b/go.mod @@ -7,7 +7,7 @@ require ( cosmossdk.io/math v1.2.0 cosmossdk.io/simapp v0.0.0-20230608160436-666c345ad23d cosmossdk.io/tools/rosetta v0.2.1 - github.com/ExocoreNetwork/price-feeder v0.1.9 + github.com/ExocoreNetwork/price-feeder v0.0.0-20241009094357-40e58e6f1694 github.com/agiledragon/gomonkey/v2 v2.11.0 github.com/armon/go-metrics v0.4.1 github.com/cometbft/cometbft v0.37.4 diff --git a/go.sum b/go.sum index e9c3ae76f..7e290a7ad 100644 --- a/go.sum +++ b/go.sum @@ -547,8 +547,8 @@ github.com/ChainSafe/go-schnorrkel v1.0.0/go.mod h1:dpzHYVxLZcp8pjlV+O+UR8K0Hp/z github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= github.com/ExocoreNetwork/evmos/v16 v16.0.3-0.20240828081344-d5cfcd34a812 h1:4P/4GZ89DOy9uNPDlEwebPytKltbimq8wn9XiuX96vw= github.com/ExocoreNetwork/evmos/v16 v16.0.3-0.20240828081344-d5cfcd34a812/go.mod h1:w0vtRYI4I0/O8eihq6ZuDvlca4ZiYCKN6vpakG9zHcc= -github.com/ExocoreNetwork/price-feeder v0.1.9 h1:1keqcZoYdW2XE+TQBYyStfUyLpNAbjgsw1grshdfPlQ= -github.com/ExocoreNetwork/price-feeder v0.1.9/go.mod h1:/6yLPrHdUdKyZaKeQ0MNpYq2cBlT58ZokPHlh8ARZ9g= +github.com/ExocoreNetwork/price-feeder v0.0.0-20241009094357-40e58e6f1694 h1:Qkm7hiwvp1WusBlOGZhPsRlzy1Yb6tXEeEZXo8W11JE= +github.com/ExocoreNetwork/price-feeder v0.0.0-20241009094357-40e58e6f1694/go.mod h1:CgVrnt5K1Yp8/y7Dz/UFU0g3B86Hx9DjJHHiQz2z0rY= github.com/JohnCGriffin/overflow v0.0.0-20211019200055-46fa312c352c/go.mod h1:X0CRv0ky0k6m906ixxpzmDRLvX58TFUKS2eePweuyxk= github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow= diff --git a/proto/exocore/oracle/v1/query.proto b/proto/exocore/oracle/v1/query.proto index 988bb1a92..79dce4c5f 100644 --- a/proto/exocore/oracle/v1/query.proto +++ b/proto/exocore/oracle/v1/query.proto @@ -19,35 +19,39 @@ option go_package = "github.com/ExocoreNetwork/exocore/x/oracle/types"; // Query defines the gRPC querier service. service Query { - // stakerList shows all stakers related to the specified asset under native-restaking context + // TokenIndexes shows the map tells token and its index for further usage + rpc TokenIndexes(QueryTokenIndexesRequest) returns (QueryTokenIndexesResponse) { + option (google.api.http).get = "/ExocoreNetwork/exocore/oracle/v1/token_indexes"; + } + + // StakerList shows all stakers related to the specified asset under native-restaking context rpc StakerList (QueryStakerListRequest) returns (QueryStakerListResponse) { - option (google.api.http).get = "/ExocoreNetwork/exocore/oracle/staker_list"; + option (google.api.http).get = "/ExocoreNetwork/exocore/oracle/v1/staker_list"; } // StakerInfos shows the details for all stakers of the specified assets under native-restaking context rpc StakerInfos (QueryStakerInfosRequest) returns (QueryStakerInfosResponse) { - option (google.api.http).get = "/ExocoreNetwork/exocore/oracle/staker_infos/{asset_id}"; + option (google.api.http).get = "/ExocoreNetwork/exocore/oracle/v1/staker_infos/{asset_id}"; } // StakerInfo shows the details for one staker required by input parsms of the specified asset rpc StakerInfo (QueryStakerInfoRequest) returns (QueryStakerInfoResponse) { - option (google.api.http).get = "/ExocoreNetwork/exocore/oracle/staker_info/{asset_id}/{staker_addr}"; + option (google.api.http).get = "/ExocoreNetwork/exocore/oracle/v1/staker_info/{asset_id}/{staker_addr}"; } - // Parameters queries the parameters of the module. rpc Params(QueryParamsRequest) returns (QueryParamsResponse) { - option (google.api.http).get = "/ExocoreNetwork/exocore/oracle/params"; + option (google.api.http).get = "/ExocoreNetwork/exocore/oracle/v1/params"; } // Queries a list of Prices items. rpc Prices(QueryGetPricesRequest) returns (QueryGetPricesResponse) { - option (google.api.http).get = "/ExocoreNetwork/exocore/oracle/prices/{token_id}"; + option (google.api.http).get = "/ExocoreNetwork/exocore/oracle/v1/prices/{token_id}"; } // Queries the latest price of a specific token rpc LatestPrice(QueryGetLatestPriceRequest) returns (QueryGetLatestPriceResponse) { - option (google.api.http).get = "/ExocoreNetwork/exocore/oracle/latest_price/{token_id}"; + option (google.api.http).get = "/ExocoreNetwork/exocore/oracle/v1/latest_price/{token_id}"; } // rpc PricesAll (QueryAllPricesRequest) returns (QueryAllPricesResponse) { @@ -57,40 +61,58 @@ service Query { // Queries a ValidatorUpdateBlock by index. rpc ValidatorUpdateBlock(QueryGetValidatorUpdateBlockRequest) returns (QueryGetValidatorUpdateBlockResponse) { - option (google.api.http).get = "/ExocoreNetwork/exocore/oracle/validator_update_block"; + option (google.api.http).get = "/ExocoreNetwork/exocore/oracle/v1/validator_update_block"; } // Queries a IndexRecentParams by index. rpc IndexRecentParams(QueryGetIndexRecentParamsRequest) returns (QueryGetIndexRecentParamsResponse) { - option (google.api.http).get = "/ExocoreNetwork/exocore/oracle/index_recent_params"; + option (google.api.http).get = "/ExocoreNetwork/exocore/oracle/v1/index_recent_params"; } // Queries a IndexRecentMsg by index. rpc IndexRecentMsg(QueryGetIndexRecentMsgRequest) returns (QueryGetIndexRecentMsgResponse) { - option (google.api.http).get = "/ExocoreNetwork/exocore/oracle/index_recent_msg"; + option (google.api.http).get = "/ExocoreNetwork/exocore/oracle/v1/index_recent_msg"; } // Queries a list of RecentMsg items. rpc RecentMsg(QueryGetRecentMsgRequest) returns (QueryGetRecentMsgResponse) { - option (google.api.http).get = "/ExocoreNetwork/exocore/oracle/recent_msg/{block}"; + option (google.api.http).get = "/ExocoreNetwork/exocore/oracle/v1/recent_msg/{block}"; } // RecentMsgAll all RecentMsg items. rpc RecentMsgAll(QueryAllRecentMsgRequest) returns (QueryAllRecentMsgResponse) { - option (google.api.http).get = "/ExocoreNetwork/exocore/oracle/recent_msg"; + option (google.api.http).get = "/ExocoreNetwork/exocore/oracle/v1/recent_msg"; } // Queries a list of RecentParams items. rpc RecentParams(QueryGetRecentParamsRequest) returns (QueryGetRecentParamsResponse) { - option (google.api.http).get = "/ExocoreNetwork/exocore/oracle/recent_params/{block}"; + option (google.api.http).get = "/ExocoreNetwork/exocore/oracle/v1/recent_params/{block}"; } // RecentParamsAll query all RecentParams. rpc RecentParamsAll(QueryAllRecentParamsRequest) returns (QueryAllRecentParamsResponse) { - option (google.api.http).get = "/ExocoreNetwork/exocore/oracle/recent_params"; + option (google.api.http).get = "/ExocoreNetwork/exocore/oracle/v1/recent_params"; } } +// TokenIndex is the pair of tokenName and its index defined in params +message TokenIndex { + // token name + string token = 1; + // the index registered in params.Token + uint64 index = 2; +} + +// QueryTokenIndexsRequest is request type for Query/TokenIndexes RPC method +message QueryTokenIndexesRequest {} + + +// QueryTokenIndexesResponse is response type for Query/TokenIndexes RPC method +message QueryTokenIndexesResponse { + //token_indexes includes all the token-index mapping + repeated TokenIndex token_indexes = 1; +} + // QueryStakerListRequest is request type for Query/StakerList RPC method message QueryStakerListRequest { // id of assets for the staker list request for diff --git a/x/oracle/client/cli/query.go b/x/oracle/client/cli/query.go index 7ff731887..995898d97 100644 --- a/x/oracle/client/cli/query.go +++ b/x/oracle/client/cli/query.go @@ -38,6 +38,7 @@ func GetQueryCmd(_ string) *cobra.Command { cmd.AddCommand(CmdQueryStakerInfo()) cmd.AddCommand(CmdQueryStakerInfos()) cmd.AddCommand(CmdQueryStakerList()) + cmd.AddCommand(CmdQueryTokenIndexes()) // this line is used by starport scaffolding # 1 return cmd diff --git a/x/oracle/client/cli/query_tokens.go b/x/oracle/client/cli/query_tokens.go new file mode 100644 index 000000000..007791bdd --- /dev/null +++ b/x/oracle/client/cli/query_tokens.go @@ -0,0 +1,29 @@ +package cli + +import ( + "github.com/ExocoreNetwork/exocore/x/oracle/types" + "github.com/cosmos/cosmos-sdk/client" + "github.com/spf13/cobra" +) + +func CmdQueryTokenIndexes() *cobra.Command { + cmd := &cobra.Command{ + Use: "show-tokens", + Short: "shows the list of token-index mapping", + 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.TokenIndexes(cmd.Context(), &types.QueryTokenIndexesRequest{}) + if err != nil { + return err + } + return clientCtx.PrintProto(res) + }, + } + return cmd +} diff --git a/x/oracle/keeper/query_tokens.go b/x/oracle/keeper/query_tokens.go new file mode 100644 index 000000000..0dddfb7d3 --- /dev/null +++ b/x/oracle/keeper/query_tokens.go @@ -0,0 +1,24 @@ +package keeper + +import ( + "context" + "fmt" + + "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) TokenIndexes(goCtx context.Context, req *types.QueryTokenIndexesRequest) (*types.QueryTokenIndexesResponse, error) { + if req == nil { + return nil, status.Error(codes.InvalidArgument, "invalid request") + } + fmt.Println("debug----keeper.TokenIndexes") + + ctx := sdk.UnwrapSDKContext(goCtx) + ret := k.GetTokens(ctx) + return &types.QueryTokenIndexesResponse{ + TokenIndexes: ret, + }, nil +} diff --git a/x/oracle/keeper/tokens.go b/x/oracle/keeper/tokens.go new file mode 100644 index 000000000..6b97e8733 --- /dev/null +++ b/x/oracle/keeper/tokens.go @@ -0,0 +1,19 @@ +package keeper + +import ( + "github.com/ExocoreNetwork/exocore/x/oracle/types" + sdk "github.com/cosmos/cosmos-sdk/types" +) + +// GetTokens returns a list of token-index mapping registered in params +func (k Keeper) GetTokens(ctx sdk.Context) []*types.TokenIndex { + params := k.GetParams(ctx) + ret := make([]*types.TokenIndex, 0, len(params.Tokens)) + for idx, token := range params.Tokens { + ret = append(ret, &types.TokenIndex{ + Token: token.Name, + Index: uint64(idx), + }) + } + return ret +} diff --git a/x/oracle/types/query.pb.go b/x/oracle/types/query.pb.go index d6e896ef5..a486abc4a 100644 --- a/x/oracle/types/query.pb.go +++ b/x/oracle/types/query.pb.go @@ -30,6 +30,144 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +// TokenIndex is the pair of tokenName and its index defined in params +type TokenIndex struct { + // token name + Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"` + // the index registered in params.Token + Index uint64 `protobuf:"varint,2,opt,name=index,proto3" json:"index,omitempty"` +} + +func (m *TokenIndex) Reset() { *m = TokenIndex{} } +func (m *TokenIndex) String() string { return proto.CompactTextString(m) } +func (*TokenIndex) ProtoMessage() {} +func (*TokenIndex) Descriptor() ([]byte, []int) { + return fileDescriptor_b8cba1249806967d, []int{0} +} +func (m *TokenIndex) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *TokenIndex) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_TokenIndex.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 *TokenIndex) XXX_Merge(src proto.Message) { + xxx_messageInfo_TokenIndex.Merge(m, src) +} +func (m *TokenIndex) XXX_Size() int { + return m.Size() +} +func (m *TokenIndex) XXX_DiscardUnknown() { + xxx_messageInfo_TokenIndex.DiscardUnknown(m) +} + +var xxx_messageInfo_TokenIndex proto.InternalMessageInfo + +func (m *TokenIndex) GetToken() string { + if m != nil { + return m.Token + } + return "" +} + +func (m *TokenIndex) GetIndex() uint64 { + if m != nil { + return m.Index + } + return 0 +} + +// QueryTokenIndexsRequest is request type for Query/TokenIndexes RPC method +type QueryTokenIndexesRequest struct { +} + +func (m *QueryTokenIndexesRequest) Reset() { *m = QueryTokenIndexesRequest{} } +func (m *QueryTokenIndexesRequest) String() string { return proto.CompactTextString(m) } +func (*QueryTokenIndexesRequest) ProtoMessage() {} +func (*QueryTokenIndexesRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_b8cba1249806967d, []int{1} +} +func (m *QueryTokenIndexesRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryTokenIndexesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryTokenIndexesRequest.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 *QueryTokenIndexesRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryTokenIndexesRequest.Merge(m, src) +} +func (m *QueryTokenIndexesRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryTokenIndexesRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryTokenIndexesRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryTokenIndexesRequest proto.InternalMessageInfo + +// QueryTokenIndexesResponse is response type for Query/TokenIndexes RPC method +type QueryTokenIndexesResponse struct { + //token_indexes includes all the token-index mapping + TokenIndexes []*TokenIndex `protobuf:"bytes,1,rep,name=token_indexes,json=tokenIndexes,proto3" json:"token_indexes,omitempty"` +} + +func (m *QueryTokenIndexesResponse) Reset() { *m = QueryTokenIndexesResponse{} } +func (m *QueryTokenIndexesResponse) String() string { return proto.CompactTextString(m) } +func (*QueryTokenIndexesResponse) ProtoMessage() {} +func (*QueryTokenIndexesResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_b8cba1249806967d, []int{2} +} +func (m *QueryTokenIndexesResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryTokenIndexesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryTokenIndexesResponse.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 *QueryTokenIndexesResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryTokenIndexesResponse.Merge(m, src) +} +func (m *QueryTokenIndexesResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryTokenIndexesResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryTokenIndexesResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryTokenIndexesResponse proto.InternalMessageInfo + +func (m *QueryTokenIndexesResponse) GetTokenIndexes() []*TokenIndex { + if m != nil { + return m.TokenIndexes + } + return nil +} + // QueryStakerListRequest is request type for Query/StakerList RPC method type QueryStakerListRequest struct { // id of assets for the staker list request for @@ -40,7 +178,7 @@ 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} + return fileDescriptor_b8cba1249806967d, []int{3} } func (m *QueryStakerListRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -86,7 +224,7 @@ 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} + return fileDescriptor_b8cba1249806967d, []int{4} } func (m *QueryStakerListResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -134,7 +272,7 @@ func (m *QueryStakerInfoRequest) Reset() { *m = QueryStakerInfoRequest{} func (m *QueryStakerInfoRequest) String() string { return proto.CompactTextString(m) } func (*QueryStakerInfoRequest) ProtoMessage() {} func (*QueryStakerInfoRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_b8cba1249806967d, []int{2} + return fileDescriptor_b8cba1249806967d, []int{5} } func (m *QueryStakerInfoRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -187,7 +325,7 @@ func (m *QueryStakerInfoResponse) Reset() { *m = QueryStakerInfoResponse func (m *QueryStakerInfoResponse) String() string { return proto.CompactTextString(m) } func (*QueryStakerInfoResponse) ProtoMessage() {} func (*QueryStakerInfoResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_b8cba1249806967d, []int{3} + return fileDescriptor_b8cba1249806967d, []int{6} } func (m *QueryStakerInfoResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -233,7 +371,7 @@ 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{4} + return fileDescriptor_b8cba1249806967d, []int{7} } func (m *QueryStakerInfosRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -279,7 +417,7 @@ func (m *QueryStakerInfosResponse) Reset() { *m = QueryStakerInfosRespon func (m *QueryStakerInfosResponse) String() string { return proto.CompactTextString(m) } func (*QueryStakerInfosResponse) ProtoMessage() {} func (*QueryStakerInfosResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_b8cba1249806967d, []int{5} + return fileDescriptor_b8cba1249806967d, []int{8} } func (m *QueryStakerInfosResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -323,7 +461,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{6} + return fileDescriptor_b8cba1249806967d, []int{9} } func (m *QueryParamsRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -362,7 +500,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{7} + return fileDescriptor_b8cba1249806967d, []int{10} } func (m *QueryParamsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -408,7 +546,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{8} + return fileDescriptor_b8cba1249806967d, []int{11} } func (m *QueryGetPricesRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -454,7 +592,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{9} + return fileDescriptor_b8cba1249806967d, []int{12} } func (m *QueryGetLatestPriceRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -500,7 +638,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{10} + return fileDescriptor_b8cba1249806967d, []int{13} } func (m *QueryGetPricesResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -546,7 +684,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{11} + return fileDescriptor_b8cba1249806967d, []int{14} } func (m *QueryGetLatestPriceResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -592,7 +730,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{12} + return fileDescriptor_b8cba1249806967d, []int{15} } func (m *QueryAllPricesRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -640,7 +778,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{13} + return fileDescriptor_b8cba1249806967d, []int{16} } func (m *QueryAllPricesResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -691,7 +829,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{14} + return fileDescriptor_b8cba1249806967d, []int{17} } func (m *QueryGetValidatorUpdateBlockRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -730,7 +868,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{15} + return fileDescriptor_b8cba1249806967d, []int{18} } func (m *QueryGetValidatorUpdateBlockResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -774,7 +912,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{16} + return fileDescriptor_b8cba1249806967d, []int{19} } func (m *QueryGetIndexRecentParamsRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -813,7 +951,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{17} + return fileDescriptor_b8cba1249806967d, []int{20} } func (m *QueryGetIndexRecentParamsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -857,7 +995,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{18} + return fileDescriptor_b8cba1249806967d, []int{21} } func (m *QueryGetIndexRecentMsgRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -896,7 +1034,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{19} + return fileDescriptor_b8cba1249806967d, []int{22} } func (m *QueryGetIndexRecentMsgResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -942,7 +1080,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{20} + return fileDescriptor_b8cba1249806967d, []int{23} } func (m *QueryGetRecentMsgRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -988,7 +1126,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{21} + return fileDescriptor_b8cba1249806967d, []int{24} } func (m *QueryGetRecentMsgResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1034,7 +1172,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{22} + return fileDescriptor_b8cba1249806967d, []int{25} } func (m *QueryAllRecentMsgRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1082,7 +1220,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{23} + return fileDescriptor_b8cba1249806967d, []int{26} } func (m *QueryAllRecentMsgResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1135,7 +1273,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{24} + return fileDescriptor_b8cba1249806967d, []int{27} } func (m *QueryGetRecentParamsRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1181,7 +1319,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{25} + return fileDescriptor_b8cba1249806967d, []int{28} } func (m *QueryGetRecentParamsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1227,7 +1365,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{26} + return fileDescriptor_b8cba1249806967d, []int{29} } func (m *QueryAllRecentParamsRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1275,7 +1413,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{27} + return fileDescriptor_b8cba1249806967d, []int{30} } func (m *QueryAllRecentParamsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1319,6 +1457,9 @@ func (m *QueryAllRecentParamsResponse) GetPagination() *query.PageResponse { } func init() { + proto.RegisterType((*TokenIndex)(nil), "exocore.oracle.v1.TokenIndex") + proto.RegisterType((*QueryTokenIndexesRequest)(nil), "exocore.oracle.v1.QueryTokenIndexesRequest") + proto.RegisterType((*QueryTokenIndexesResponse)(nil), "exocore.oracle.v1.QueryTokenIndexesResponse") proto.RegisterType((*QueryStakerListRequest)(nil), "exocore.oracle.v1.QueryStakerListRequest") proto.RegisterType((*QueryStakerListResponse)(nil), "exocore.oracle.v1.QueryStakerListResponse") proto.RegisterType((*QueryStakerInfoRequest)(nil), "exocore.oracle.v1.QueryStakerInfoRequest") @@ -1352,88 +1493,94 @@ func init() { func init() { proto.RegisterFile("exocore/oracle/v1/query.proto", fileDescriptor_b8cba1249806967d) } var fileDescriptor_b8cba1249806967d = []byte{ - // 1290 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x98, 0x4d, 0x6f, 0xdc, 0x54, - 0x17, 0xc7, 0xe3, 0xbc, 0xf5, 0xc9, 0x49, 0x9e, 0x42, 0x6e, 0x43, 0x49, 0x4c, 0x32, 0x49, 0x4d, - 0xd2, 0xbc, 0xd6, 0xce, 0x4c, 0x42, 0x52, 0x10, 0xad, 0x48, 0x50, 0x89, 0x52, 0x4a, 0x95, 0x0c, - 0x05, 0x89, 0xaa, 0x62, 0xe4, 0x99, 0xb9, 0x1d, 0x4c, 0x3c, 0xe3,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0x80, 0x5b, 0xa6, 0x19, 0x8f, 0x29, 0x90, 0x66, 0xf1, 0x98, 0x22, 0x89, 0xa5, 0x64, 0x39, - 0xe6, 0x32, 0x59, 0x4c, 0x8d, 0x49, 0x7e, 0x6a, 0xe2, 0xe1, 0xac, 0xaa, 0x89, 0x8d, 0x09, 0x8f, - 0xa9, 0x96, 0xda, 0x1e, 0x21, 0x5f, 0xe5, 0x90, 0x1b, 0x64, 0x3d, 0x1d, 0xa4, 0x37, 0x9b, 0xcd, - 0x76, 0xfe, 0x20, 0xc1, 0x33, 0xc1, 0xb0, 0x6e, 0x47, 0xd5, 0xc4, 0x26, 0xa5, 0x44, 0x8e, 0x51, - 0x41, 0xca, 0x3a, 0x47, 0x56, 0xc9, 0x4a, 0x37, 0xc8, 0xdb, 0xb7, 0x9f, 0x9c, 0x66, 0xa4, 0xa7, - 0xa7, 0x19, 0xe9, 0xef, 0xd3, 0x8c, 0xf4, 0xf9, 0x59, 0xa6, 0xe7, 0xe9, 0x59, 0xa6, 0xe7, 0xcf, - 0xb3, 0x4c, 0xcf, 0xfd, 0xd5, 0x8a, 0xe1, 0x7c, 0x70, 0x58, 0x54, 0x4b, 0x56, 0x35, 0x2e, 0xe2, - 0x91, 0x1f, 0xd3, 0x79, 0x5c, 0xa7, 0xac, 0x38, 0xc8, 0xff, 0x9e, 0x5a, 0xfb, 0x37, 0x00, 0x00, - 0xff, 0xff, 0x8b, 0x6f, 0xf0, 0x5d, 0x89, 0x14, 0x00, 0x00, + // 1379 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x98, 0xdf, 0x6f, 0xdb, 0x54, + 0x14, 0xc7, 0xeb, 0xfe, 0x1a, 0x3d, 0xed, 0x06, 0xbd, 0x2b, 0xa3, 0x35, 0x6d, 0xda, 0x99, 0x76, + 0xcb, 0xda, 0xce, 0x6e, 0xfa, 0x63, 0xd9, 0x0f, 0x06, 0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xed, 0x2a, 0xa1, 0xc3, 0x90, 0x07, 0x83, 0x20, 0xd8, 0x39, 0x2d, 0xf0, 0x56, 0x5a, + 0xc2, 0xfb, 0x6c, 0x83, 0xda, 0xed, 0x40, 0xce, 0x57, 0xaf, 0xb5, 0x55, 0xfd, 0x79, 0xf7, 0x41, + 0xfa, 0x18, 0xbf, 0x6c, 0x41, 0x0f, 0x24, 0xcc, 0x01, 0x84, 0xd8, 0x26, 0x39, 0x6c, 0xed, 0x58, + 0x43, 0x66, 0x93, 0xa8, 0x88, 0x44, 0x39, 0x5d, 0x0f, 0x11, 0x9d, 0xd6, 0x11, 0xfc, 0x41, 0xc0, + 0x22, 0x82, 0x49, 0x22, 0x8a, 0xe8, 0xeb, 0xba, 0x88, 0xd3, 0x3b, 0x8f, 0x2b, 0xad, 0xbb, 0x8e, + 0x33, 0xd5, 0x11, 0x5b, 0xf4, 0x29, 0x4c, 0xf2, 0x9d, 0xb0, 0xc0, 0x7b, 0x70, 0x96, 0x37, 0xe0, + 0xd3, 0x91, 0x35, 0x06, 0x66, 0x7b, 0xc4, 0xf4, 0x8f, 0x35, 0x45, 0xc0, 0x66, 0x27, 0x83, 0x80, + 0xa7, 0xb5, 0x63, 0xcf, 0x04, 0xac, 0x29, 0x94, 0x27, 0xba, 0xa6, 0xbe, 0xff, 0x59, 0xd3, 0xa9, + 0xed, 0xde, 0xf2, 0xbf, 0x04, 0x06, 0x18, 0x35, 0xf9, 0x4e, 0x80, 0x11, 0xbf, 0x16, 0x24, 0x0b, + 0x1c, 0xb0, 0x28, 0x35, 0x29, 0x2e, 0x26, 0x33, 0x76, 0x09, 0xa4, 0xec, 0x17, 0x7f, 0xfc, 0xf3, + 0x4d, 0x6f, 0x86, 0x28, 0xca, 0x3b, 0xae, 0xd7, 0x16, 0xb5, 0x3f, 0x33, 0xcc, 0x3d, 0x25, 0xac, + 0xa6, 0x03, 0x32, 0x94, 0x3c, 0x15, 0x00, 0x5a, 0xf2, 0x8e, 0x5c, 0x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, 0xef, 0xe3, 0x94, 0xf0, 0xf5, + 0x49, 0xaa, 0xe7, 0xc5, 0x49, 0xaa, 0xe7, 0xcf, 0x93, 0x54, 0xcf, 0x83, 0xa5, 0x8a, 0x66, 0x7f, + 0xb2, 0x5f, 0x94, 0x4b, 0x46, 0x35, 0x2a, 0xe8, 0x81, 0x17, 0xd6, 0x7e, 0x52, 0xa7, 0x56, 0x71, + 0x90, 0xfd, 0x43, 0xb8, 0xf2, 0x5f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x57, 0x6e, 0x11, 0x04, 0x0c, + 0x16, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1448,7 +1595,9 @@ 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 shows all stakers related to the specified asset under native-restaking context + // TokenIndexes shows the map tells token and its index for further usage + TokenIndexes(ctx context.Context, in *QueryTokenIndexesRequest, opts ...grpc.CallOption) (*QueryTokenIndexesResponse, error) + // StakerList shows all stakers related to the specified asset under native-restaking context StakerList(ctx context.Context, in *QueryStakerListRequest, opts ...grpc.CallOption) (*QueryStakerListResponse, error) // StakerInfos shows the details for all stakers of the specified assets under native-restaking context StakerInfos(ctx context.Context, in *QueryStakerInfosRequest, opts ...grpc.CallOption) (*QueryStakerInfosResponse, error) @@ -1484,6 +1633,15 @@ func NewQueryClient(cc grpc1.ClientConn) QueryClient { return &queryClient{cc} } +func (c *queryClient) TokenIndexes(ctx context.Context, in *QueryTokenIndexesRequest, opts ...grpc.CallOption) (*QueryTokenIndexesResponse, error) { + out := new(QueryTokenIndexesResponse) + err := c.cc.Invoke(ctx, "/exocore.oracle.v1.Query/TokenIndexes", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + 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...) @@ -1603,7 +1761,9 @@ func (c *queryClient) RecentParamsAll(ctx context.Context, in *QueryAllRecentPar // QueryServer is the server API for Query service. type QueryServer interface { - // stakerList shows all stakers related to the specified asset under native-restaking context + // TokenIndexes shows the map tells token and its index for further usage + TokenIndexes(context.Context, *QueryTokenIndexesRequest) (*QueryTokenIndexesResponse, error) + // StakerList shows all stakers related to the specified asset under native-restaking context StakerList(context.Context, *QueryStakerListRequest) (*QueryStakerListResponse, error) // StakerInfos shows the details for all stakers of the specified assets under native-restaking context StakerInfos(context.Context, *QueryStakerInfosRequest) (*QueryStakerInfosResponse, error) @@ -1635,6 +1795,9 @@ type QueryServer interface { type UnimplementedQueryServer struct { } +func (*UnimplementedQueryServer) TokenIndexes(ctx context.Context, req *QueryTokenIndexesRequest) (*QueryTokenIndexesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method TokenIndexes not implemented") +} func (*UnimplementedQueryServer) StakerList(ctx context.Context, req *QueryStakerListRequest) (*QueryStakerListResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method StakerList not implemented") } @@ -1679,6 +1842,24 @@ func RegisterQueryServer(s grpc1.Server, srv QueryServer) { s.RegisterService(&_Query_serviceDesc, srv) } +func _Query_TokenIndexes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryTokenIndexesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).TokenIndexes(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/exocore.oracle.v1.Query/TokenIndexes", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).TokenIndexes(ctx, req.(*QueryTokenIndexesRequest)) + } + return interceptor(ctx, in, info, handler) +} + 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 { @@ -1917,6 +2098,10 @@ var _Query_serviceDesc = grpc.ServiceDesc{ ServiceName: "exocore.oracle.v1.Query", HandlerType: (*QueryServer)(nil), Methods: []grpc.MethodDesc{ + { + MethodName: "TokenIndexes", + Handler: _Query_TokenIndexes_Handler, + }, { MethodName: "StakerList", Handler: _Query_StakerList_Handler, @@ -1974,6 +2159,101 @@ var _Query_serviceDesc = grpc.ServiceDesc{ Metadata: "exocore/oracle/v1/query.proto", } +func (m *TokenIndex) 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 *TokenIndex) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *TokenIndex) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Index != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.Index)) + i-- + dAtA[i] = 0x10 + } + if len(m.Token) > 0 { + i -= len(m.Token) + copy(dAtA[i:], m.Token) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Token))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryTokenIndexesRequest) 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 *QueryTokenIndexesRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryTokenIndexesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *QueryTokenIndexesResponse) 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 *QueryTokenIndexesResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryTokenIndexesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.TokenIndexes) > 0 { + for iNdEx := len(m.TokenIndexes) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.TokenIndexes[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 *QueryStakerListRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -2909,6 +3189,46 @@ func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { dAtA[offset] = uint8(v) return base } +func (m *TokenIndex) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Token) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + if m.Index != 0 { + n += 1 + sovQuery(uint64(m.Index)) + } + return n +} + +func (m *QueryTokenIndexesRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *QueryTokenIndexesResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.TokenIndexes) > 0 { + for _, e := range m.TokenIndexes { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + return n +} + func (m *QueryStakerListRequest) Size() (n int) { if m == nil { return 0 @@ -3267,6 +3587,241 @@ func sovQuery(x uint64) (n int) { func sozQuery(x uint64) (n int) { return sovQuery(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } +func (m *TokenIndex) 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: TokenIndex: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TokenIndex: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Token", 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.Token = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Index", wireType) + } + m.Index = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Index |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + 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 *QueryTokenIndexesRequest) 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: QueryTokenIndexesRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryTokenIndexesRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryTokenIndexesResponse) 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: QueryTokenIndexesResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryTokenIndexesResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TokenIndexes", 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.TokenIndexes = append(m.TokenIndexes, &TokenIndex{}) + if err := m.TokenIndexes[len(m.TokenIndexes)-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 *QueryStakerListRequest) 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 9e63c753c..cb43aecfa 100644 --- a/x/oracle/types/query.pb.gw.go +++ b/x/oracle/types/query.pb.gw.go @@ -33,6 +33,24 @@ var _ = utilities.NewDoubleArray var _ = descriptor.ForMessage var _ = metadata.Join +func request_Query_TokenIndexes_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryTokenIndexesRequest + var metadata runtime.ServerMetadata + + msg, err := client.TokenIndexes(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_TokenIndexes_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryTokenIndexesRequest + var metadata runtime.ServerMetadata + + msg, err := server.TokenIndexes(ctx, &protoReq) + return msg, metadata, err + +} + var ( filter_Query_StakerList_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} ) @@ -565,6 +583,29 @@ 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_TokenIndexes_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_TokenIndexes_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_TokenIndexes_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + 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() @@ -905,6 +946,26 @@ 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_TokenIndexes_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_TokenIndexes_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_TokenIndexes_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + 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() @@ -1169,34 +1230,38 @@ 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_TokenIndexes_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"ExocoreNetwork", "exocore", "oracle", "v1", "token_indexes"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_StakerList_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"ExocoreNetwork", "exocore", "oracle", "v1", "staker_list"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_StakerInfos_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", "staker_infos", "asset_id"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_StakerInfos_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5}, []string{"ExocoreNetwork", "exocore", "oracle", "v1", "staker_infos", "asset_id"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_StakerInfo_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4, 1, 0, 4, 1, 5, 5}, []string{"ExocoreNetwork", "exocore", "oracle", "staker_info", "asset_id", "staker_addr"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_StakerInfo_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 1, 0, 4, 1, 5, 6}, []string{"ExocoreNetwork", "exocore", "oracle", "v1", "staker_info", "asset_id", "staker_addr"}, "", 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_Params_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"ExocoreNetwork", "exocore", "oracle", "v1", "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))) + pattern_Query_Prices_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5}, []string{"ExocoreNetwork", "exocore", "oracle", "v1", "prices", "token_id"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_LatestPrice_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", "latest_price", "token_id"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_LatestPrice_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5}, []string{"ExocoreNetwork", "exocore", "oracle", "v1", "latest_price", "token_id"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_ValidatorUpdateBlock_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"ExocoreNetwork", "exocore", "oracle", "validator_update_block"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_ValidatorUpdateBlock_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"ExocoreNetwork", "exocore", "oracle", "v1", "validator_update_block"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_IndexRecentParams_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"ExocoreNetwork", "exocore", "oracle", "index_recent_params"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_IndexRecentParams_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"ExocoreNetwork", "exocore", "oracle", "v1", "index_recent_params"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_IndexRecentMsg_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"ExocoreNetwork", "exocore", "oracle", "index_recent_msg"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_IndexRecentMsg_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"ExocoreNetwork", "exocore", "oracle", "v1", "index_recent_msg"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_RecentMsg_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", "recent_msg", "block"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_RecentMsg_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5}, []string{"ExocoreNetwork", "exocore", "oracle", "v1", "recent_msg", "block"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_RecentMsgAll_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"ExocoreNetwork", "exocore", "oracle", "recent_msg"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_RecentMsgAll_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"ExocoreNetwork", "exocore", "oracle", "v1", "recent_msg"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_RecentParams_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", "recent_params", "block"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_RecentParams_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5}, []string{"ExocoreNetwork", "exocore", "oracle", "v1", "recent_params", "block"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_RecentParamsAll_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"ExocoreNetwork", "exocore", "oracle", "recent_params"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_RecentParamsAll_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"ExocoreNetwork", "exocore", "oracle", "v1", "recent_params"}, "", runtime.AssumeColonVerbOpt(false))) ) var ( + forward_Query_TokenIndexes_0 = runtime.ForwardResponseMessage + forward_Query_StakerList_0 = runtime.ForwardResponseMessage forward_Query_StakerInfos_0 = runtime.ForwardResponseMessage From 2b7a55cd731b68273c9bce24848d8cae6dff05bf Mon Sep 17 00:00:00 2001 From: Leon <156270887+leonz789@users.noreply.github.com> Date: Mon, 14 Oct 2024 18:01:52 +0800 Subject: [PATCH 2/2] fix: update cache when assetID updated in params (#214) * fix: update cache when assetID updated in params * fix:update params with latest params when do recache * remove debug log --- x/oracle/keeper/params.go | 4 ++++ x/oracle/keeper/query_tokens.go | 2 -- x/oracle/keeper/single.go | 6 ++++++ 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/x/oracle/keeper/params.go b/x/oracle/keeper/params.go index f9eeaa657..18db1ea69 100644 --- a/x/oracle/keeper/params.go +++ b/x/oracle/keeper/params.go @@ -73,6 +73,10 @@ func (k Keeper) RegisterNewTokenAndSetTokenFeeder(ctx sdk.Context, oInfo *types. if t.Name == oInfo.Token.Name && t.ChainID == chainID { t.AssetID = strings.Join([]string{t.AssetID, oInfo.AssetID}, ",") k.SetParams(ctx, p) + if !ctx.IsCheckTx() { + _ = GetAggregatorContext(ctx, k) + cs.AddCache(cache.ItemP(p)) + } // there should have been existing tokenFeeder running(currently we register tokens from assets-module and with infinite endBlock) return nil } diff --git a/x/oracle/keeper/query_tokens.go b/x/oracle/keeper/query_tokens.go index 0dddfb7d3..a4383fa69 100644 --- a/x/oracle/keeper/query_tokens.go +++ b/x/oracle/keeper/query_tokens.go @@ -2,7 +2,6 @@ package keeper import ( "context" - "fmt" "github.com/ExocoreNetwork/exocore/x/oracle/types" sdk "github.com/cosmos/cosmos-sdk/types" @@ -14,7 +13,6 @@ func (k Keeper) TokenIndexes(goCtx context.Context, req *types.QueryTokenIndexes if req == nil { return nil, status.Error(codes.InvalidArgument, "invalid request") } - fmt.Println("debug----keeper.TokenIndexes") ctx := sdk.UnwrapSDKContext(goCtx) ret := k.GetTokens(ctx) diff --git a/x/oracle/keeper/single.go b/x/oracle/keeper/single.go index 8b327b622..c1f60e652 100644 --- a/x/oracle/keeper/single.go +++ b/x/oracle/keeper/single.go @@ -153,6 +153,12 @@ func recacheAggregatorContext(ctx sdk.Context, agc *aggregator.AggregatorContext if updated := c.GetCache(&pRet); !updated { c.AddCache(cache.ItemP(*p)) } + // TODO: these 4 lines are mainly used for hot fix + // since the latest params stored in KV for recache should be the same with the latest params, so these lines are just duplicated actions if everything is fine. + *p = k.GetParams(ctx) + agc.SetParams(p) + setCommonParams(p) + c.AddCache(cache.ItemP(*p)) return true }