diff --git a/proto/ununifi/yieldaggregator/query.proto b/proto/ununifi/yieldaggregator/query.proto index 8592e6108..37ee1c6c2 100644 --- a/proto/ununifi/yieldaggregator/query.proto +++ b/proto/ununifi/yieldaggregator/query.proto @@ -23,6 +23,10 @@ service Query { option (google.api.http).get = "/ununifi/yieldaggregator/vaults"; } + rpc VaultAllByShareHolder(QueryAllVaultByShareHolderRequest) returns (QueryAllVaultByShareHolderResponse) { + option (google.api.http).get = "/ununifi/yieldaggregator/vaults/share-holders/{share_holder}"; + } + rpc Vault(QueryGetVaultRequest) returns (QueryGetVaultResponse) { option (google.api.http).get = "/ununifi/yieldaggregator/vaults/{id}"; } @@ -59,34 +63,60 @@ message QueryAllVaultRequest { cosmos.base.query.v1beta1.PageRequest pagination = 1; } +message VaultContainer { + Vault vault = 1 [(gogoproto.nullable) = false]; + string total_bonded_amount = 2 [ + (cosmos_proto.scalar) = "cosmos.Int", + (gogoproto.customtype) = "cosmossdk.io/math.Int", + (gogoproto.nullable) = false + ]; + string total_unbonding_amount = 3 [ + (cosmos_proto.scalar) = "cosmos.Int", + (gogoproto.customtype) = "cosmossdk.io/math.Int", + (gogoproto.nullable) = false + ]; + string withdraw_reserve = 4 [ + (cosmos_proto.scalar) = "cosmos.Int", + (gogoproto.customtype) = "cosmossdk.io/math.Int", + (gogoproto.nullable) = false + ]; +} + message QueryAllVaultResponse { - repeated Vault vaults = 1 [(gogoproto.nullable) = false]; + repeated VaultContainer vaults = 1 [(gogoproto.nullable) = false]; cosmos.base.query.v1beta1.PageResponse pagination = 2; } +message QueryAllVaultByShareHolderRequest { + string share_holder = 1; +} + +message QueryAllVaultByShareHolderResponse { + repeated VaultContainer vaults = 1 [(gogoproto.nullable) = false]; +} + message QueryGetVaultRequest { uint64 id = 1; } message QueryGetVaultResponse { - Vault vault = 1 [(gogoproto.nullable) = false]; - repeated Strategy strategies = 2 [(gogoproto.nullable) = false]; - string vault_address = 3; - string total_bonded_amount = 4 [ + Vault vault = 1 [(gogoproto.nullable) = false]; + string total_bonded_amount = 2 [ (cosmos_proto.scalar) = "cosmos.Int", - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", + (gogoproto.customtype) = "cosmossdk.io/math.Int", (gogoproto.nullable) = false ]; - string total_unbonding_amount = 5 [ + string total_unbonding_amount = 3 [ (cosmos_proto.scalar) = "cosmos.Int", - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", + (gogoproto.customtype) = "cosmossdk.io/math.Int", (gogoproto.nullable) = false ]; - string total_withdrawal_balance = 6 [ + string withdraw_reserve = 4 [ (cosmos_proto.scalar) = "cosmos.Int", - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", + (gogoproto.customtype) = "cosmossdk.io/math.Int", (gogoproto.nullable) = false ]; + repeated Strategy strategies = 5 [(gogoproto.nullable) = false]; } message QueryAllStrategyRequest { @@ -95,7 +125,7 @@ message QueryAllStrategyRequest { } message QueryAllStrategyResponse { - repeated Strategy strategies = 1 [(gogoproto.nullable) = false]; + repeated StrategyContainer strategies = 1 [(gogoproto.nullable) = false]; cosmos.base.query.v1beta1.PageResponse pagination = 2; } @@ -104,8 +134,27 @@ message QueryGetStrategyRequest { uint64 id = 2; } +message StrategyContainer { + Strategy strategy = 1 [(gogoproto.nullable) = false]; + string deposit_fee_rate = 2 [ + (cosmos_proto.scalar) = "cosmos.Dec", + (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", + (gogoproto.nullable) = false + ]; + string withdraw_fee_rate = 3 [ + (cosmos_proto.scalar) = "cosmos.Dec", + (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", + (gogoproto.nullable) = false + ]; + string performance_fee_rate = 4 [ + (cosmos_proto.scalar) = "cosmos.Dec", + (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", + (gogoproto.nullable) = false + ]; +} + message QueryGetStrategyResponse { - Strategy strategy = 1 [(gogoproto.nullable) = false]; + StrategyContainer strategy = 1 [(gogoproto.nullable) = false]; } message QueryEstimateMintAmountRequest { @@ -123,5 +172,7 @@ message QueryEstimateRedeemAmountRequest { } message QueryEstimateRedeemAmountResponse { - cosmos.base.v1beta1.Coin redeem_amount = 1 [(gogoproto.nullable) = false]; + cosmos.base.v1beta1.Coin share_amount = 1 [(gogoproto.nullable) = false]; + cosmos.base.v1beta1.Coin fee = 2 [(gogoproto.nullable) = false]; + cosmos.base.v1beta1.Coin redeem_amount = 3 [(gogoproto.nullable) = false]; } diff --git a/x/yieldaggregator/client/cli/query.go b/x/yieldaggregator/client/cli/query.go index 012616ca9..ee2a2aca2 100644 --- a/x/yieldaggregator/client/cli/query.go +++ b/x/yieldaggregator/client/cli/query.go @@ -30,6 +30,7 @@ func GetQueryCmd(queryRoute string) *cobra.Command { CmdListStrategy(), CmdShowStrategy(), CmdShowVault(), + CmdVaultAllByShareHolder(), ) return cmd diff --git a/x/yieldaggregator/client/cli/query_strategy.go b/x/yieldaggregator/client/cli/query_strategy.go index ca3aa695d..331e6b4c6 100644 --- a/x/yieldaggregator/client/cli/query_strategy.go +++ b/x/yieldaggregator/client/cli/query_strategy.go @@ -49,13 +49,13 @@ func CmdShowStrategy() *cobra.Command { cmd := &cobra.Command{ Use: "show-strategy [vault-denom] [id]", Short: "shows a strategy", - Args: cobra.ExactArgs(1), + Args: cobra.ExactArgs(2), RunE: func(cmd *cobra.Command, args []string) error { clientCtx := client.GetClientContextFromCmd(cmd) queryClient := types.NewQueryClient(clientCtx) - id, err := strconv.ParseUint(args[0], 10, 64) + id, err := strconv.ParseUint(args[1], 10, 64) if err != nil { return err } diff --git a/x/yieldaggregator/client/cli/query_vault.go b/x/yieldaggregator/client/cli/query_vault.go index bdad4cd57..942fe5fff 100644 --- a/x/yieldaggregator/client/cli/query_vault.go +++ b/x/yieldaggregator/client/cli/query_vault.go @@ -76,3 +76,31 @@ func CmdShowVault() *cobra.Command { return cmd } + +func CmdVaultAllByShareHolder() *cobra.Command { + cmd := &cobra.Command{ + Use: "list-vault-by-share-holder [holder]", + Short: "List vaults by share holder", + Args: cobra.ExactArgs(1), + RunE: func(cmd *cobra.Command, args []string) error { + clientCtx := client.GetClientContextFromCmd(cmd) + + queryClient := types.NewQueryClient(clientCtx) + + params := &types.QueryAllVaultByShareHolderRequest{ + ShareHolder: args[0], + } + + res, err := queryClient.VaultAllByShareHolder(context.Background(), params) + if err != nil { + return err + } + + return clientCtx.PrintProto(res) + }, + } + + flags.AddQueryFlagsToCmd(cmd) + + return cmd +} diff --git a/x/yieldaggregator/keeper/grpc_query_strategy.go b/x/yieldaggregator/keeper/grpc_query_strategy.go index b33ee09c1..498899680 100644 --- a/x/yieldaggregator/keeper/grpc_query_strategy.go +++ b/x/yieldaggregator/keeper/grpc_query_strategy.go @@ -2,7 +2,9 @@ package keeper import ( "context" + "encoding/json" + math "cosmossdk.io/math" "github.com/cosmos/cosmos-sdk/store/prefix" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" @@ -18,7 +20,7 @@ func (k Keeper) StrategyAll(c context.Context, req *types.QueryAllStrategyReques return nil, status.Error(codes.InvalidArgument, "invalid request") } - var strategies []types.Strategy + var strategies []types.StrategyContainer ctx := sdk.UnwrapSDKContext(c) store := ctx.KVStore(k.storeKey) @@ -30,7 +32,12 @@ func (k Keeper) StrategyAll(c context.Context, req *types.QueryAllStrategyReques return err } - strategies = append(strategies, strategy) + strategyContainer, err := k.GetStrategyContainer(ctx, strategy) + if err != nil { + return err + } + + strategies = append(strategies, strategyContainer) return nil }) @@ -41,6 +48,49 @@ func (k Keeper) StrategyAll(c context.Context, req *types.QueryAllStrategyReques return &types.QueryAllStrategyResponse{Strategies: strategies, Pagination: pageRes}, nil } +func (k Keeper) GetStrategyContainer(ctx sdk.Context, strategy types.Strategy) (types.StrategyContainer, error) { + strategyAddr, err := sdk.AccAddressFromBech32(strategy.ContractAddress) + if err != nil { + return types.StrategyContainer{ + Strategy: strategy, + DepositFeeRate: math.LegacyZeroDec(), + WithdrawFeeRate: math.LegacyZeroDec(), + PerformanceFeeRate: math.LegacyZeroDec(), + }, nil + } + + wasmQuery := `{"fee":{}}` + result, err := k.wasmReader.QuerySmart(ctx, strategyAddr, []byte(wasmQuery)) + if err != nil { + return types.StrategyContainer{}, err + } + + jsonMap := make(map[string]string) + err = json.Unmarshal(result, &jsonMap) + if err != nil { + return types.StrategyContainer{}, err + } + depositFeeRate, err := math.LegacyNewDecFromStr(jsonMap["deposit_fee_rate"]) + if err != nil { + return types.StrategyContainer{}, err + } + withdrawFeeRate, err := math.LegacyNewDecFromStr(jsonMap["withdraw_fee_rate"]) + if err != nil { + return types.StrategyContainer{}, err + } + performanceFeeRate, err := math.LegacyNewDecFromStr(jsonMap["interest_fee_rate"]) + if err != nil { + return types.StrategyContainer{}, err + } + + return types.StrategyContainer{ + Strategy: strategy, + DepositFeeRate: depositFeeRate, + WithdrawFeeRate: withdrawFeeRate, + PerformanceFeeRate: performanceFeeRate, + }, nil +} + func (k Keeper) Strategy(c context.Context, req *types.QueryGetStrategyRequest) (*types.QueryGetStrategyResponse, error) { if req == nil { return nil, status.Error(codes.InvalidArgument, "invalid request") @@ -52,5 +102,12 @@ func (k Keeper) Strategy(c context.Context, req *types.QueryGetStrategyRequest) return nil, sdkerrors.ErrKeyNotFound } - return &types.QueryGetStrategyResponse{Strategy: strategy}, nil + strategyContainer, err := k.GetStrategyContainer(ctx, strategy) + if err != nil { + return nil, err + } + + return &types.QueryGetStrategyResponse{ + Strategy: strategyContainer, + }, nil } diff --git a/x/yieldaggregator/keeper/grpc_query_strategy_test.go b/x/yieldaggregator/keeper/grpc_query_strategy_test.go index 05377850b..174664605 100644 --- a/x/yieldaggregator/keeper/grpc_query_strategy_test.go +++ b/x/yieldaggregator/keeper/grpc_query_strategy_test.go @@ -1,6 +1,7 @@ package keeper_test import ( + "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/cosmos/cosmos-sdk/types/query" @@ -23,14 +24,22 @@ func (suite *KeeperTestSuite) TestStrategyQuerySingle() { err error }{ { - desc: "First", - request: &types.QueryGetStrategyRequest{Denom: vaultDenom, Id: msgs[0].Id}, - response: &types.QueryGetStrategyResponse{Strategy: msgs[0]}, + desc: "First", + request: &types.QueryGetStrategyRequest{Denom: vaultDenom, Id: msgs[0].Id}, + response: &types.QueryGetStrategyResponse{ + Strategy: types.StrategyContainer{ + Strategy: msgs[0], DepositFeeRate: math.LegacyZeroDec(), WithdrawFeeRate: math.LegacyZeroDec(), PerformanceFeeRate: math.LegacyZeroDec(), + }, + }, }, { - desc: "Second", - request: &types.QueryGetStrategyRequest{Denom: vaultDenom, Id: msgs[1].Id}, - response: &types.QueryGetStrategyResponse{Strategy: msgs[1]}, + desc: "Second", + request: &types.QueryGetStrategyRequest{Denom: vaultDenom, Id: msgs[1].Id}, + response: &types.QueryGetStrategyResponse{ + Strategy: types.StrategyContainer{ + Strategy: msgs[1], DepositFeeRate: math.LegacyZeroDec(), WithdrawFeeRate: math.LegacyZeroDec(), PerformanceFeeRate: math.LegacyZeroDec(), + }, + }, }, { desc: "KeyNotFound", diff --git a/x/yieldaggregator/keeper/grpc_query_vault.go b/x/yieldaggregator/keeper/grpc_query_vault.go index 884609990..3ff72eaeb 100644 --- a/x/yieldaggregator/keeper/grpc_query_vault.go +++ b/x/yieldaggregator/keeper/grpc_query_vault.go @@ -2,12 +2,14 @@ package keeper import ( "context" + "strconv" + "strings" "github.com/cosmos/cosmos-sdk/store/prefix" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/cosmos/cosmos-sdk/types/query" - authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" + "google.golang.org/grpc/codes" "google.golang.org/grpc/status" @@ -39,7 +41,17 @@ func (k Keeper) VaultAll(c context.Context, req *types.QueryAllVaultRequest) (*t return nil, status.Error(codes.Internal, err.Error()) } - return &types.QueryAllVaultResponse{Vaults: vaults, Pagination: pageRes}, nil + var vaultContainers []types.VaultContainer + for _, vault := range vaults { + vaultContainers = append(vaultContainers, types.VaultContainer{ + Vault: vault, + TotalBondedAmount: k.VaultAmountInStrategies(ctx, vault), + TotalUnbondingAmount: k.VaultUnbondingAmountInStrategies(ctx, vault), + WithdrawReserve: k.VaultWithdrawalAmount(ctx, vault), + }) + } + + return &types.QueryAllVaultResponse{Vaults: vaultContainers, Pagination: pageRes}, nil } func (k Keeper) Vault(c context.Context, req *types.QueryGetVaultRequest) (*types.QueryGetVaultResponse, error) { @@ -62,14 +74,56 @@ func (k Keeper) Vault(c context.Context, req *types.QueryGetVaultRequest) (*type strategies = append(strategies, strategy) } - vaultModName := types.GetVaultModuleAccountName(req.Id) - vaultModAddr := authtypes.NewModuleAddress(vaultModName) return &types.QueryGetVaultResponse{ - Vault: vault, - Strategies: strategies, - VaultAddress: vaultModAddr.String(), - TotalBondedAmount: k.VaultAmountInStrategies(ctx, vault), - TotalUnbondingAmount: k.VaultUnbondingAmountInStrategies(ctx, vault), - TotalWithdrawalBalance: k.VaultWithdrawalAmount(ctx, vault), + Vault: vault, + Strategies: strategies, + TotalBondedAmount: k.VaultAmountInStrategies(ctx, vault), + TotalUnbondingAmount: k.VaultUnbondingAmountInStrategies(ctx, vault), + WithdrawReserve: k.VaultWithdrawalAmount(ctx, vault), }, nil } + +func (k Keeper) VaultAllByShareHolder(c context.Context, req *types.QueryAllVaultByShareHolderRequest) (*types.QueryAllVaultByShareHolderResponse, error) { + if req == nil { + return nil, status.Error(codes.InvalidArgument, "invalid request") + } + + ctx := sdk.UnwrapSDKContext(c) + + addr, err := sdk.AccAddressFromBech32(req.ShareHolder) + if err != nil { + return nil, status.Error(codes.InvalidArgument, err.Error()) + } + + balances := k.bankKeeper.GetAllBalances(ctx, addr) + + var vaultContainers []types.VaultContainer + for _, coin := range balances { + denomParts := strings.Split(coin.Denom, "/") + + if len(denomParts) != 3 { + continue + } + // TODO: want to types.Module name. state breaking + if denomParts[0] != "yield-aggregator" || denomParts[1] != "vaults" { + continue + } + vaultId, err := strconv.Atoi(denomParts[2]) + if err != nil { + continue + } + vault, found := k.GetVault(ctx, uint64(vaultId)) + if !found { + continue + } + + vaultContainers = append(vaultContainers, types.VaultContainer{ + Vault: vault, + TotalBondedAmount: k.VaultAmountInStrategies(ctx, vault), + TotalUnbondingAmount: k.VaultUnbondingAmountInStrategies(ctx, vault), + WithdrawReserve: k.VaultWithdrawalAmount(ctx, vault), + }) + } + + return &types.QueryAllVaultByShareHolderResponse{Vaults: vaultContainers}, nil +} diff --git a/x/yieldaggregator/keeper/grpc_query_vault_test.go b/x/yieldaggregator/keeper/grpc_query_vault_test.go index 1bd82f9a3..1f4989f4c 100644 --- a/x/yieldaggregator/keeper/grpc_query_vault_test.go +++ b/x/yieldaggregator/keeper/grpc_query_vault_test.go @@ -79,9 +79,13 @@ func (suite *KeeperTestSuite) TestVaultQueryPaginated() { resp, err := keeper.VaultAll(wctx, request(nil, uint64(i), uint64(step), false)) suite.Require().NoError(err) suite.Require().LessOrEqual(len(resp.Vaults), step) + vaults := []types.Vault{} + for _, vault := range resp.Vaults { + vaults = append(vaults, vault.Vault) + } suite.Require().Subset( nullify.Fill(msgs), - nullify.Fill(resp.Vaults), + nullify.Fill(vaults), ) } }) @@ -92,9 +96,13 @@ func (suite *KeeperTestSuite) TestVaultQueryPaginated() { resp, err := keeper.VaultAll(wctx, request(next, 0, uint64(step), false)) suite.Require().NoError(err) suite.Require().LessOrEqual(len(resp.Vaults), step) + vaults := []types.Vault{} + for _, vault := range resp.Vaults { + vaults = append(vaults, vault.Vault) + } suite.Require().Subset( nullify.Fill(msgs), - nullify.Fill(resp.Vaults), + nullify.Fill(vaults), ) next = resp.Pagination.NextKey } diff --git a/x/yieldaggregator/types/query.pb.go b/x/yieldaggregator/types/query.pb.go index 4da9b3716..8c8bbf719 100644 --- a/x/yieldaggregator/types/query.pb.go +++ b/x/yieldaggregator/types/query.pb.go @@ -5,9 +5,9 @@ package types import ( context "context" + cosmossdk_io_math "cosmossdk.io/math" fmt "fmt" _ "github.com/cosmos/cosmos-proto" - github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" types "github.com/cosmos/cosmos-sdk/types" query "github.com/cosmos/cosmos-sdk/types/query" _ "github.com/cosmos/gogoproto/gogoproto" @@ -160,8 +160,55 @@ func (m *QueryAllVaultRequest) GetPagination() *query.PageRequest { return nil } +type VaultContainer struct { + Vault Vault `protobuf:"bytes,1,opt,name=vault,proto3" json:"vault"` + TotalBondedAmount cosmossdk_io_math.Int `protobuf:"bytes,2,opt,name=total_bonded_amount,json=totalBondedAmount,proto3,customtype=cosmossdk.io/math.Int" json:"total_bonded_amount"` + TotalUnbondingAmount cosmossdk_io_math.Int `protobuf:"bytes,3,opt,name=total_unbonding_amount,json=totalUnbondingAmount,proto3,customtype=cosmossdk.io/math.Int" json:"total_unbonding_amount"` + WithdrawReserve cosmossdk_io_math.Int `protobuf:"bytes,4,opt,name=withdraw_reserve,json=withdrawReserve,proto3,customtype=cosmossdk.io/math.Int" json:"withdraw_reserve"` +} + +func (m *VaultContainer) Reset() { *m = VaultContainer{} } +func (m *VaultContainer) String() string { return proto.CompactTextString(m) } +func (*VaultContainer) ProtoMessage() {} +func (*VaultContainer) Descriptor() ([]byte, []int) { + return fileDescriptor_4dec8609c4c8573d, []int{3} +} +func (m *VaultContainer) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *VaultContainer) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_VaultContainer.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 *VaultContainer) XXX_Merge(src proto.Message) { + xxx_messageInfo_VaultContainer.Merge(m, src) +} +func (m *VaultContainer) XXX_Size() int { + return m.Size() +} +func (m *VaultContainer) XXX_DiscardUnknown() { + xxx_messageInfo_VaultContainer.DiscardUnknown(m) +} + +var xxx_messageInfo_VaultContainer proto.InternalMessageInfo + +func (m *VaultContainer) GetVault() Vault { + if m != nil { + return m.Vault + } + return Vault{} +} + type QueryAllVaultResponse struct { - Vaults []Vault `protobuf:"bytes,1,rep,name=vaults,proto3" json:"vaults"` + Vaults []VaultContainer `protobuf:"bytes,1,rep,name=vaults,proto3" json:"vaults"` Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` } @@ -169,7 +216,7 @@ func (m *QueryAllVaultResponse) Reset() { *m = QueryAllVaultResponse{} } func (m *QueryAllVaultResponse) String() string { return proto.CompactTextString(m) } func (*QueryAllVaultResponse) ProtoMessage() {} func (*QueryAllVaultResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_4dec8609c4c8573d, []int{3} + return fileDescriptor_4dec8609c4c8573d, []int{4} } func (m *QueryAllVaultResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -198,7 +245,7 @@ func (m *QueryAllVaultResponse) XXX_DiscardUnknown() { var xxx_messageInfo_QueryAllVaultResponse proto.InternalMessageInfo -func (m *QueryAllVaultResponse) GetVaults() []Vault { +func (m *QueryAllVaultResponse) GetVaults() []VaultContainer { if m != nil { return m.Vaults } @@ -212,6 +259,94 @@ func (m *QueryAllVaultResponse) GetPagination() *query.PageResponse { return nil } +type QueryAllVaultByShareHolderRequest struct { + ShareHolder string `protobuf:"bytes,1,opt,name=share_holder,json=shareHolder,proto3" json:"share_holder,omitempty"` +} + +func (m *QueryAllVaultByShareHolderRequest) Reset() { *m = QueryAllVaultByShareHolderRequest{} } +func (m *QueryAllVaultByShareHolderRequest) String() string { return proto.CompactTextString(m) } +func (*QueryAllVaultByShareHolderRequest) ProtoMessage() {} +func (*QueryAllVaultByShareHolderRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_4dec8609c4c8573d, []int{5} +} +func (m *QueryAllVaultByShareHolderRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryAllVaultByShareHolderRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryAllVaultByShareHolderRequest.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 *QueryAllVaultByShareHolderRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryAllVaultByShareHolderRequest.Merge(m, src) +} +func (m *QueryAllVaultByShareHolderRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryAllVaultByShareHolderRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryAllVaultByShareHolderRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryAllVaultByShareHolderRequest proto.InternalMessageInfo + +func (m *QueryAllVaultByShareHolderRequest) GetShareHolder() string { + if m != nil { + return m.ShareHolder + } + return "" +} + +type QueryAllVaultByShareHolderResponse struct { + Vaults []VaultContainer `protobuf:"bytes,1,rep,name=vaults,proto3" json:"vaults"` +} + +func (m *QueryAllVaultByShareHolderResponse) Reset() { *m = QueryAllVaultByShareHolderResponse{} } +func (m *QueryAllVaultByShareHolderResponse) String() string { return proto.CompactTextString(m) } +func (*QueryAllVaultByShareHolderResponse) ProtoMessage() {} +func (*QueryAllVaultByShareHolderResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_4dec8609c4c8573d, []int{6} +} +func (m *QueryAllVaultByShareHolderResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryAllVaultByShareHolderResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryAllVaultByShareHolderResponse.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 *QueryAllVaultByShareHolderResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryAllVaultByShareHolderResponse.Merge(m, src) +} +func (m *QueryAllVaultByShareHolderResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryAllVaultByShareHolderResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryAllVaultByShareHolderResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryAllVaultByShareHolderResponse proto.InternalMessageInfo + +func (m *QueryAllVaultByShareHolderResponse) GetVaults() []VaultContainer { + if m != nil { + return m.Vaults + } + return nil +} + type QueryGetVaultRequest struct { Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` } @@ -220,7 +355,7 @@ func (m *QueryGetVaultRequest) Reset() { *m = QueryGetVaultRequest{} } func (m *QueryGetVaultRequest) String() string { return proto.CompactTextString(m) } func (*QueryGetVaultRequest) ProtoMessage() {} func (*QueryGetVaultRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_4dec8609c4c8573d, []int{4} + return fileDescriptor_4dec8609c4c8573d, []int{7} } func (m *QueryGetVaultRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -257,19 +392,18 @@ func (m *QueryGetVaultRequest) GetId() uint64 { } type QueryGetVaultResponse struct { - Vault Vault `protobuf:"bytes,1,opt,name=vault,proto3" json:"vault"` - Strategies []Strategy `protobuf:"bytes,2,rep,name=strategies,proto3" json:"strategies"` - VaultAddress string `protobuf:"bytes,3,opt,name=vault_address,json=vaultAddress,proto3" json:"vault_address,omitempty"` - TotalBondedAmount github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,4,opt,name=total_bonded_amount,json=totalBondedAmount,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"total_bonded_amount"` - TotalUnbondingAmount github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,5,opt,name=total_unbonding_amount,json=totalUnbondingAmount,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"total_unbonding_amount"` - TotalWithdrawalBalance github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,6,opt,name=total_withdrawal_balance,json=totalWithdrawalBalance,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"total_withdrawal_balance"` + Vault Vault `protobuf:"bytes,1,opt,name=vault,proto3" json:"vault"` + TotalBondedAmount cosmossdk_io_math.Int `protobuf:"bytes,2,opt,name=total_bonded_amount,json=totalBondedAmount,proto3,customtype=cosmossdk.io/math.Int" json:"total_bonded_amount"` + TotalUnbondingAmount cosmossdk_io_math.Int `protobuf:"bytes,3,opt,name=total_unbonding_amount,json=totalUnbondingAmount,proto3,customtype=cosmossdk.io/math.Int" json:"total_unbonding_amount"` + WithdrawReserve cosmossdk_io_math.Int `protobuf:"bytes,4,opt,name=withdraw_reserve,json=withdrawReserve,proto3,customtype=cosmossdk.io/math.Int" json:"withdraw_reserve"` + Strategies []Strategy `protobuf:"bytes,5,rep,name=strategies,proto3" json:"strategies"` } func (m *QueryGetVaultResponse) Reset() { *m = QueryGetVaultResponse{} } func (m *QueryGetVaultResponse) String() string { return proto.CompactTextString(m) } func (*QueryGetVaultResponse) ProtoMessage() {} func (*QueryGetVaultResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_4dec8609c4c8573d, []int{5} + return fileDescriptor_4dec8609c4c8573d, []int{8} } func (m *QueryGetVaultResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -312,13 +446,6 @@ func (m *QueryGetVaultResponse) GetStrategies() []Strategy { return nil } -func (m *QueryGetVaultResponse) GetVaultAddress() string { - if m != nil { - return m.VaultAddress - } - return "" -} - type QueryAllStrategyRequest struct { Denom string `protobuf:"bytes,1,opt,name=denom,proto3" json:"denom,omitempty"` Pagination *query.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` @@ -328,7 +455,7 @@ func (m *QueryAllStrategyRequest) Reset() { *m = QueryAllStrategyRequest func (m *QueryAllStrategyRequest) String() string { return proto.CompactTextString(m) } func (*QueryAllStrategyRequest) ProtoMessage() {} func (*QueryAllStrategyRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_4dec8609c4c8573d, []int{6} + return fileDescriptor_4dec8609c4c8573d, []int{9} } func (m *QueryAllStrategyRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -372,7 +499,7 @@ func (m *QueryAllStrategyRequest) GetPagination() *query.PageRequest { } type QueryAllStrategyResponse struct { - Strategies []Strategy `protobuf:"bytes,1,rep,name=strategies,proto3" json:"strategies"` + Strategies []StrategyContainer `protobuf:"bytes,1,rep,name=strategies,proto3" json:"strategies"` Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` } @@ -380,7 +507,7 @@ func (m *QueryAllStrategyResponse) Reset() { *m = QueryAllStrategyRespon func (m *QueryAllStrategyResponse) String() string { return proto.CompactTextString(m) } func (*QueryAllStrategyResponse) ProtoMessage() {} func (*QueryAllStrategyResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_4dec8609c4c8573d, []int{7} + return fileDescriptor_4dec8609c4c8573d, []int{10} } func (m *QueryAllStrategyResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -409,7 +536,7 @@ func (m *QueryAllStrategyResponse) XXX_DiscardUnknown() { var xxx_messageInfo_QueryAllStrategyResponse proto.InternalMessageInfo -func (m *QueryAllStrategyResponse) GetStrategies() []Strategy { +func (m *QueryAllStrategyResponse) GetStrategies() []StrategyContainer { if m != nil { return m.Strategies } @@ -432,7 +559,7 @@ func (m *QueryGetStrategyRequest) Reset() { *m = QueryGetStrategyRequest func (m *QueryGetStrategyRequest) String() string { return proto.CompactTextString(m) } func (*QueryGetStrategyRequest) ProtoMessage() {} func (*QueryGetStrategyRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_4dec8609c4c8573d, []int{8} + return fileDescriptor_4dec8609c4c8573d, []int{11} } func (m *QueryGetStrategyRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -475,15 +602,62 @@ func (m *QueryGetStrategyRequest) GetId() uint64 { return 0 } +type StrategyContainer struct { + Strategy Strategy `protobuf:"bytes,1,opt,name=strategy,proto3" json:"strategy"` + DepositFeeRate cosmossdk_io_math.LegacyDec `protobuf:"bytes,2,opt,name=deposit_fee_rate,json=depositFeeRate,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"deposit_fee_rate"` + WithdrawFeeRate cosmossdk_io_math.LegacyDec `protobuf:"bytes,3,opt,name=withdraw_fee_rate,json=withdrawFeeRate,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"withdraw_fee_rate"` + PerformanceFeeRate cosmossdk_io_math.LegacyDec `protobuf:"bytes,4,opt,name=performance_fee_rate,json=performanceFeeRate,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"performance_fee_rate"` +} + +func (m *StrategyContainer) Reset() { *m = StrategyContainer{} } +func (m *StrategyContainer) String() string { return proto.CompactTextString(m) } +func (*StrategyContainer) ProtoMessage() {} +func (*StrategyContainer) Descriptor() ([]byte, []int) { + return fileDescriptor_4dec8609c4c8573d, []int{12} +} +func (m *StrategyContainer) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *StrategyContainer) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_StrategyContainer.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 *StrategyContainer) XXX_Merge(src proto.Message) { + xxx_messageInfo_StrategyContainer.Merge(m, src) +} +func (m *StrategyContainer) XXX_Size() int { + return m.Size() +} +func (m *StrategyContainer) XXX_DiscardUnknown() { + xxx_messageInfo_StrategyContainer.DiscardUnknown(m) +} + +var xxx_messageInfo_StrategyContainer proto.InternalMessageInfo + +func (m *StrategyContainer) GetStrategy() Strategy { + if m != nil { + return m.Strategy + } + return Strategy{} +} + type QueryGetStrategyResponse struct { - Strategy Strategy `protobuf:"bytes,1,opt,name=strategy,proto3" json:"strategy"` + Strategy StrategyContainer `protobuf:"bytes,1,opt,name=strategy,proto3" json:"strategy"` } func (m *QueryGetStrategyResponse) Reset() { *m = QueryGetStrategyResponse{} } func (m *QueryGetStrategyResponse) String() string { return proto.CompactTextString(m) } func (*QueryGetStrategyResponse) ProtoMessage() {} func (*QueryGetStrategyResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_4dec8609c4c8573d, []int{9} + return fileDescriptor_4dec8609c4c8573d, []int{13} } func (m *QueryGetStrategyResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -512,11 +686,11 @@ func (m *QueryGetStrategyResponse) XXX_DiscardUnknown() { var xxx_messageInfo_QueryGetStrategyResponse proto.InternalMessageInfo -func (m *QueryGetStrategyResponse) GetStrategy() Strategy { +func (m *QueryGetStrategyResponse) GetStrategy() StrategyContainer { if m != nil { return m.Strategy } - return Strategy{} + return StrategyContainer{} } type QueryEstimateMintAmountRequest struct { @@ -528,7 +702,7 @@ func (m *QueryEstimateMintAmountRequest) Reset() { *m = QueryEstimateMin func (m *QueryEstimateMintAmountRequest) String() string { return proto.CompactTextString(m) } func (*QueryEstimateMintAmountRequest) ProtoMessage() {} func (*QueryEstimateMintAmountRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_4dec8609c4c8573d, []int{10} + return fileDescriptor_4dec8609c4c8573d, []int{14} } func (m *QueryEstimateMintAmountRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -579,7 +753,7 @@ func (m *QueryEstimateMintAmountResponse) Reset() { *m = QueryEstimateMi func (m *QueryEstimateMintAmountResponse) String() string { return proto.CompactTextString(m) } func (*QueryEstimateMintAmountResponse) ProtoMessage() {} func (*QueryEstimateMintAmountResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_4dec8609c4c8573d, []int{11} + return fileDescriptor_4dec8609c4c8573d, []int{15} } func (m *QueryEstimateMintAmountResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -624,7 +798,7 @@ func (m *QueryEstimateRedeemAmountRequest) Reset() { *m = QueryEstimateR func (m *QueryEstimateRedeemAmountRequest) String() string { return proto.CompactTextString(m) } func (*QueryEstimateRedeemAmountRequest) ProtoMessage() {} func (*QueryEstimateRedeemAmountRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_4dec8609c4c8573d, []int{12} + return fileDescriptor_4dec8609c4c8573d, []int{16} } func (m *QueryEstimateRedeemAmountRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -668,14 +842,16 @@ func (m *QueryEstimateRedeemAmountRequest) GetBurnAmount() string { } type QueryEstimateRedeemAmountResponse struct { - RedeemAmount types.Coin `protobuf:"bytes,1,opt,name=redeem_amount,json=redeemAmount,proto3" json:"redeem_amount"` + ShareAmount types.Coin `protobuf:"bytes,1,opt,name=share_amount,json=shareAmount,proto3" json:"share_amount"` + Fee types.Coin `protobuf:"bytes,2,opt,name=fee,proto3" json:"fee"` + RedeemAmount types.Coin `protobuf:"bytes,3,opt,name=redeem_amount,json=redeemAmount,proto3" json:"redeem_amount"` } func (m *QueryEstimateRedeemAmountResponse) Reset() { *m = QueryEstimateRedeemAmountResponse{} } func (m *QueryEstimateRedeemAmountResponse) String() string { return proto.CompactTextString(m) } func (*QueryEstimateRedeemAmountResponse) ProtoMessage() {} func (*QueryEstimateRedeemAmountResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_4dec8609c4c8573d, []int{13} + return fileDescriptor_4dec8609c4c8573d, []int{17} } func (m *QueryEstimateRedeemAmountResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -704,6 +880,20 @@ func (m *QueryEstimateRedeemAmountResponse) XXX_DiscardUnknown() { var xxx_messageInfo_QueryEstimateRedeemAmountResponse proto.InternalMessageInfo +func (m *QueryEstimateRedeemAmountResponse) GetShareAmount() types.Coin { + if m != nil { + return m.ShareAmount + } + return types.Coin{} +} + +func (m *QueryEstimateRedeemAmountResponse) GetFee() types.Coin { + if m != nil { + return m.Fee + } + return types.Coin{} +} + func (m *QueryEstimateRedeemAmountResponse) GetRedeemAmount() types.Coin { if m != nil { return m.RedeemAmount @@ -715,12 +905,16 @@ func init() { proto.RegisterType((*QueryParamsRequest)(nil), "ununifi.yieldaggregator.QueryParamsRequest") proto.RegisterType((*QueryParamsResponse)(nil), "ununifi.yieldaggregator.QueryParamsResponse") proto.RegisterType((*QueryAllVaultRequest)(nil), "ununifi.yieldaggregator.QueryAllVaultRequest") + proto.RegisterType((*VaultContainer)(nil), "ununifi.yieldaggregator.VaultContainer") proto.RegisterType((*QueryAllVaultResponse)(nil), "ununifi.yieldaggregator.QueryAllVaultResponse") + proto.RegisterType((*QueryAllVaultByShareHolderRequest)(nil), "ununifi.yieldaggregator.QueryAllVaultByShareHolderRequest") + proto.RegisterType((*QueryAllVaultByShareHolderResponse)(nil), "ununifi.yieldaggregator.QueryAllVaultByShareHolderResponse") proto.RegisterType((*QueryGetVaultRequest)(nil), "ununifi.yieldaggregator.QueryGetVaultRequest") proto.RegisterType((*QueryGetVaultResponse)(nil), "ununifi.yieldaggregator.QueryGetVaultResponse") proto.RegisterType((*QueryAllStrategyRequest)(nil), "ununifi.yieldaggregator.QueryAllStrategyRequest") proto.RegisterType((*QueryAllStrategyResponse)(nil), "ununifi.yieldaggregator.QueryAllStrategyResponse") proto.RegisterType((*QueryGetStrategyRequest)(nil), "ununifi.yieldaggregator.QueryGetStrategyRequest") + proto.RegisterType((*StrategyContainer)(nil), "ununifi.yieldaggregator.StrategyContainer") proto.RegisterType((*QueryGetStrategyResponse)(nil), "ununifi.yieldaggregator.QueryGetStrategyResponse") proto.RegisterType((*QueryEstimateMintAmountRequest)(nil), "ununifi.yieldaggregator.QueryEstimateMintAmountRequest") proto.RegisterType((*QueryEstimateMintAmountResponse)(nil), "ununifi.yieldaggregator.QueryEstimateMintAmountResponse") @@ -733,71 +927,85 @@ func init() { } var fileDescriptor_4dec8609c4c8573d = []byte{ - // 1016 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 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0xf1, 0x81, 0x6e, 0x65, 0x53, 0x75, - 0xcc, 0x1c, 0xab, 0xdc, 0x3e, 0x4d, 0xaa, 0xb6, 0xb4, 0x2d, 0x2d, 0xdd, 0x43, 0x77, 0x4e, 0x66, - 0x49, 0xcd, 0x2a, 0x6d, 0xaa, 0xf9, 0xe1, 0xd3, 0xc3, 0xaa, 0xf1, 0xec, 0xb0, 0x6a, 0xfc, 0x77, - 0x58, 0x35, 0xbe, 0x3f, 0xaa, 0xce, 0x3d, 0x3b, 0xaa, 0xce, 0xfd, 0x73, 0x54, 0x9d, 0xfb, 0x6c, - 0x63, 0xe4, 0xe3, 0x62, 0x97, 0xed, 0x32, 0x7a, 0x9f, 0xda, 0xdd, 0x3d, 0x4c, 0x99, 0xfd, 0xd5, - 0x04, 0x91, 0xfc, 0xd4, 0xe8, 0x14, 0xe4, 0xa7, 0xff, 0x5b, 0x2f, 0x03, 0x00, 0x00, 0xff, 0xff, - 0xe5, 0x12, 0xc1, 0x67, 0x2a, 0x0d, 0x00, 0x00, + // 1233 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x58, 0x4f, 0x6f, 0x1b, 0x45, + 0x14, 0xcf, 0x3a, 0x7f, 0xd4, 0x3e, 0xb7, 0xa5, 0x9d, 0x3a, 0x34, 0x35, 0xc8, 0x4e, 0xb6, 0x6d, + 0x12, 0x25, 0xb5, 0x37, 0x09, 0x07, 0x68, 0x42, 0x81, 0x38, 0x69, 0x42, 0x51, 0x91, 0x82, 0x43, + 0x8a, 0x44, 0x05, 0xd6, 0xd8, 0x3b, 0x59, 0x8f, 0xea, 0x9d, 0x71, 0x77, 0xc7, 0x09, 0x56, 0xd5, + 0x0b, 0x5c, 0x39, 0x20, 0xe0, 0x8e, 0x38, 0xf1, 0x05, 0xca, 0x77, 0xa8, 0x38, 0x55, 0x45, 0x42, + 0x88, 0x43, 0x55, 0x25, 0xfd, 0x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 0x86, 0x9e, 0x1f, 0xa6, 0x86, 0xfe, 0x3e, 0x4c, 0x0d, + 0x7d, 0xb9, 0xe0, 0x50, 0x51, 0xae, 0x15, 0xb3, 0x25, 0xee, 0x5a, 0x3b, 0x6c, 0x87, 0xd1, 0x0d, + 0x6a, 0x95, 0xca, 0x98, 0x32, 0xeb, 0x9b, 0xb6, 0x40, 0xa2, 0x5e, 0x25, 0x7e, 0x71, 0x4c, 0xfe, + 0x5f, 0xe2, 0x9d, 0xff, 0x02, 0x00, 0x00, 0xff, 0xff, 0xe3, 0xe6, 0x29, 0x6f, 0xc7, 0x11, 0x00, + 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -816,6 +1024,7 @@ type QueryClient interface { Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) // this line is used by starport scaffolding # 2 VaultAll(ctx context.Context, in *QueryAllVaultRequest, opts ...grpc.CallOption) (*QueryAllVaultResponse, error) + VaultAllByShareHolder(ctx context.Context, in *QueryAllVaultByShareHolderRequest, opts ...grpc.CallOption) (*QueryAllVaultByShareHolderResponse, error) Vault(ctx context.Context, in *QueryGetVaultRequest, opts ...grpc.CallOption) (*QueryGetVaultResponse, error) StrategyAll(ctx context.Context, in *QueryAllStrategyRequest, opts ...grpc.CallOption) (*QueryAllStrategyResponse, error) Strategy(ctx context.Context, in *QueryGetStrategyRequest, opts ...grpc.CallOption) (*QueryGetStrategyResponse, error) @@ -849,6 +1058,15 @@ func (c *queryClient) VaultAll(ctx context.Context, in *QueryAllVaultRequest, op return out, nil } +func (c *queryClient) VaultAllByShareHolder(ctx context.Context, in *QueryAllVaultByShareHolderRequest, opts ...grpc.CallOption) (*QueryAllVaultByShareHolderResponse, error) { + out := new(QueryAllVaultByShareHolderResponse) + err := c.cc.Invoke(ctx, "/ununifi.yieldaggregator.Query/VaultAllByShareHolder", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *queryClient) Vault(ctx context.Context, in *QueryGetVaultRequest, opts ...grpc.CallOption) (*QueryGetVaultResponse, error) { out := new(QueryGetVaultResponse) err := c.cc.Invoke(ctx, "/ununifi.yieldaggregator.Query/Vault", in, out, opts...) @@ -900,6 +1118,7 @@ type QueryServer interface { Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) // this line is used by starport scaffolding # 2 VaultAll(context.Context, *QueryAllVaultRequest) (*QueryAllVaultResponse, error) + VaultAllByShareHolder(context.Context, *QueryAllVaultByShareHolderRequest) (*QueryAllVaultByShareHolderResponse, error) Vault(context.Context, *QueryGetVaultRequest) (*QueryGetVaultResponse, error) StrategyAll(context.Context, *QueryAllStrategyRequest) (*QueryAllStrategyResponse, error) Strategy(context.Context, *QueryGetStrategyRequest) (*QueryGetStrategyResponse, error) @@ -917,6 +1136,9 @@ func (*UnimplementedQueryServer) Params(ctx context.Context, req *QueryParamsReq func (*UnimplementedQueryServer) VaultAll(ctx context.Context, req *QueryAllVaultRequest) (*QueryAllVaultResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method VaultAll not implemented") } +func (*UnimplementedQueryServer) VaultAllByShareHolder(ctx context.Context, req *QueryAllVaultByShareHolderRequest) (*QueryAllVaultByShareHolderResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method VaultAllByShareHolder not implemented") +} func (*UnimplementedQueryServer) Vault(ctx context.Context, req *QueryGetVaultRequest) (*QueryGetVaultResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Vault not implemented") } @@ -973,6 +1195,24 @@ func _Query_VaultAll_Handler(srv interface{}, ctx context.Context, dec func(inte return interceptor(ctx, in, info, handler) } +func _Query_VaultAllByShareHolder_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryAllVaultByShareHolderRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).VaultAllByShareHolder(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/ununifi.yieldaggregator.Query/VaultAllByShareHolder", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).VaultAllByShareHolder(ctx, req.(*QueryAllVaultByShareHolderRequest)) + } + return interceptor(ctx, in, info, handler) +} + func _Query_Vault_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(QueryGetVaultRequest) if err := dec(in); err != nil { @@ -1075,6 +1315,10 @@ var _Query_serviceDesc = grpc.ServiceDesc{ MethodName: "VaultAll", Handler: _Query_VaultAll_Handler, }, + { + MethodName: "VaultAllByShareHolder", + Handler: _Query_VaultAllByShareHolder_Handler, + }, { MethodName: "Vault", Handler: _Query_Vault_Handler, @@ -1191,6 +1435,69 @@ func (m *QueryAllVaultRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *VaultContainer) 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 *VaultContainer) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *VaultContainer) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size := m.WithdrawReserve.Size() + i -= size + if _, err := m.WithdrawReserve.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + { + size := m.TotalUnbondingAmount.Size() + i -= size + if _, err := m.TotalUnbondingAmount.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + { + size := m.TotalBondedAmount.Size() + i -= size + if _, err := m.TotalBondedAmount.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + { + size, err := m.Vault.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 *QueryAllVaultResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -1240,7 +1547,7 @@ func (m *QueryAllVaultResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *QueryGetVaultRequest) Marshal() (dAtA []byte, err error) { +func (m *QueryAllVaultByShareHolderRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1250,25 +1557,27 @@ func (m *QueryGetVaultRequest) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *QueryGetVaultRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryAllVaultByShareHolderRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryGetVaultRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryAllVaultByShareHolderRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if m.Id != 0 { - i = encodeVarintQuery(dAtA, i, uint64(m.Id)) + if len(m.ShareHolder) > 0 { + i -= len(m.ShareHolder) + copy(dAtA[i:], m.ShareHolder) + i = encodeVarintQuery(dAtA, i, uint64(len(m.ShareHolder))) i-- - dAtA[i] = 0x8 + dAtA[i] = 0xa } return len(dAtA) - i, nil } -func (m *QueryGetVaultResponse) Marshal() (dAtA []byte, err error) { +func (m *QueryAllVaultByShareHolderResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1278,53 +1587,81 @@ func (m *QueryGetVaultResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *QueryGetVaultResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryAllVaultByShareHolderResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryGetVaultResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryAllVaultByShareHolderResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - { - size := m.TotalWithdrawalBalance.Size() - i -= size - if _, err := m.TotalWithdrawalBalance.MarshalTo(dAtA[i:]); err != nil { - return 0, err + if len(m.Vaults) > 0 { + for iNdEx := len(m.Vaults) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Vaults[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa } - i = encodeVarintQuery(dAtA, i, uint64(size)) } - i-- - dAtA[i] = 0x32 - { - size := m.TotalUnbondingAmount.Size() - i -= size - if _, err := m.TotalUnbondingAmount.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - { - size := m.TotalBondedAmount.Size() - i -= size - if _, err := m.TotalBondedAmount.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintQuery(dAtA, i, uint64(size)) + return len(dAtA) - i, nil +} + +func (m *QueryGetVaultRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } - i-- - dAtA[i] = 0x22 - if len(m.VaultAddress) > 0 { - i -= len(m.VaultAddress) - copy(dAtA[i:], m.VaultAddress) - i = encodeVarintQuery(dAtA, i, uint64(len(m.VaultAddress))) + return dAtA[:n], nil +} + +func (m *QueryGetVaultRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryGetVaultRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Id != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.Id)) i-- - dAtA[i] = 0x1a + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *QueryGetVaultResponse) 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 *QueryGetVaultResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryGetVaultResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l if len(m.Strategies) > 0 { for iNdEx := len(m.Strategies) - 1; iNdEx >= 0; iNdEx-- { { @@ -1336,9 +1673,39 @@ func (m *QueryGetVaultResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintQuery(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x12 + dAtA[i] = 0x2a + } + } + { + size := m.WithdrawReserve.Size() + i -= size + if _, err := m.WithdrawReserve.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + { + size := m.TotalUnbondingAmount.Size() + i -= size + if _, err := m.TotalUnbondingAmount.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + { + size := m.TotalBondedAmount.Size() + i -= size + if _, err := m.TotalBondedAmount.MarshalTo(dAtA[i:]); err != nil { + return 0, err } + i = encodeVarintQuery(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0x12 { size, err := m.Vault.MarshalToSizedBuffer(dAtA[:i]) if err != nil { @@ -1478,6 +1845,69 @@ func (m *QueryGetStrategyRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) return len(dAtA) - i, nil } +func (m *StrategyContainer) 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 *StrategyContainer) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *StrategyContainer) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size := m.PerformanceFeeRate.Size() + i -= size + if _, err := m.PerformanceFeeRate.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + { + size := m.WithdrawFeeRate.Size() + i -= size + if _, err := m.WithdrawFeeRate.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + { + size := m.DepositFeeRate.Size() + i -= size + if _, err := m.DepositFeeRate.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + { + size, err := m.Strategy.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 *QueryGetStrategyResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -1643,6 +2073,26 @@ func (m *QueryEstimateRedeemAmountResponse) MarshalToSizedBuffer(dAtA []byte) (i i = encodeVarintQuery(dAtA, i, uint64(size)) } i-- + dAtA[i] = 0x1a + { + size, err := m.Fee.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + { + size, err := m.ShareAmount.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 } @@ -1691,6 +2141,23 @@ func (m *QueryAllVaultRequest) Size() (n int) { return n } +func (m *VaultContainer) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Vault.Size() + n += 1 + l + sovQuery(uint64(l)) + l = m.TotalBondedAmount.Size() + n += 1 + l + sovQuery(uint64(l)) + l = m.TotalUnbondingAmount.Size() + n += 1 + l + sovQuery(uint64(l)) + l = m.WithdrawReserve.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + func (m *QueryAllVaultResponse) Size() (n int) { if m == nil { return 0 @@ -1710,6 +2177,34 @@ func (m *QueryAllVaultResponse) Size() (n int) { return n } +func (m *QueryAllVaultByShareHolderRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.ShareHolder) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryAllVaultByShareHolderResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Vaults) > 0 { + for _, e := range m.Vaults { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + return n +} + func (m *QueryGetVaultRequest) Size() (n int) { if m == nil { return 0 @@ -1730,22 +2225,18 @@ func (m *QueryGetVaultResponse) Size() (n int) { _ = l l = m.Vault.Size() n += 1 + l + sovQuery(uint64(l)) + l = m.TotalBondedAmount.Size() + n += 1 + l + sovQuery(uint64(l)) + l = m.TotalUnbondingAmount.Size() + n += 1 + l + sovQuery(uint64(l)) + l = m.WithdrawReserve.Size() + n += 1 + l + sovQuery(uint64(l)) if len(m.Strategies) > 0 { for _, e := range m.Strategies { l = e.Size() n += 1 + l + sovQuery(uint64(l)) } } - l = len(m.VaultAddress) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - l = m.TotalBondedAmount.Size() - n += 1 + l + sovQuery(uint64(l)) - l = m.TotalUnbondingAmount.Size() - n += 1 + l + sovQuery(uint64(l)) - l = m.TotalWithdrawalBalance.Size() - n += 1 + l + sovQuery(uint64(l)) return n } @@ -1801,6 +2292,23 @@ func (m *QueryGetStrategyRequest) Size() (n int) { return n } +func (m *StrategyContainer) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Strategy.Size() + n += 1 + l + sovQuery(uint64(l)) + l = m.DepositFeeRate.Size() + n += 1 + l + sovQuery(uint64(l)) + l = m.WithdrawFeeRate.Size() + n += 1 + l + sovQuery(uint64(l)) + l = m.PerformanceFeeRate.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + func (m *QueryGetStrategyResponse) Size() (n int) { if m == nil { return 0 @@ -1861,6 +2369,10 @@ func (m *QueryEstimateRedeemAmountResponse) Size() (n int) { } var l int _ = l + l = m.ShareAmount.Size() + n += 1 + l + sovQuery(uint64(l)) + l = m.Fee.Size() + n += 1 + l + sovQuery(uint64(l)) l = m.RedeemAmount.Size() n += 1 + l + sovQuery(uint64(l)) return n @@ -2091,7 +2603,7 @@ func (m *QueryAllVaultRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryAllVaultResponse) Unmarshal(dAtA []byte) error { +func (m *VaultContainer) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2114,15 +2626,15 @@ func (m *QueryAllVaultResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryAllVaultResponse: wiretype end group for non-group") + return fmt.Errorf("proto: VaultContainer: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryAllVaultResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: VaultContainer: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Vaults", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Vault", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -2149,16 +2661,15 @@ func (m *QueryAllVaultResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Vaults = append(m.Vaults, Vault{}) - if err := m.Vaults[len(m.Vaults)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.Vault.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field TotalBondedAmount", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -2168,36 +2679,102 @@ func (m *QueryAllVaultResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthQuery } - postIndex := iNdEx + msglen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthQuery } if postIndex > l { return io.ErrUnexpectedEOF } - if m.Pagination == nil { - m.Pagination = &query.PageResponse{} - } - if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.TotalBondedAmount.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 + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TotalUnbondingAmount", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.TotalUnbondingAmount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field WithdrawReserve", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.WithdrawReserve.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 @@ -2211,7 +2788,7 @@ func (m *QueryAllVaultResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryGetVaultRequest) Unmarshal(dAtA []byte) error { +func (m *QueryAllVaultResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2234,17 +2811,17 @@ func (m *QueryGetVaultRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryGetVaultRequest: wiretype end group for non-group") + return fmt.Errorf("proto: QueryAllVaultResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryGetVaultRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryAllVaultResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Vaults", wireType) } - m.Id = 0 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -2254,11 +2831,62 @@ func (m *QueryGetVaultRequest) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Id |= uint64(b&0x7F) << shift + 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.Vaults = append(m.Vaults, VaultContainer{}) + if err := m.Vaults[len(m.Vaults)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pagination", 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.Pagination == nil { + m.Pagination = &query.PageResponse{} + } + if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipQuery(dAtA[iNdEx:]) @@ -2280,7 +2908,7 @@ func (m *QueryGetVaultRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryGetVaultResponse) Unmarshal(dAtA []byte) error { +func (m *QueryAllVaultByShareHolderRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2303,15 +2931,97 @@ func (m *QueryGetVaultResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryGetVaultResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QueryAllVaultByShareHolderRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryGetVaultResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryAllVaultByShareHolderRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Vault", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ShareHolder", 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.ShareHolder = 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 *QueryAllVaultByShareHolderResponse) 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: QueryAllVaultByShareHolderResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryAllVaultByShareHolderResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Vaults", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -2338,13 +3048,133 @@ func (m *QueryGetVaultResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.Vault.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.Vaults = append(m.Vaults, VaultContainer{}) + if err := m.Vaults[len(m.Vaults)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - case 2: + 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 *QueryGetVaultRequest) 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: QueryGetVaultRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryGetVaultRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + m.Id = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Id |= 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 *QueryGetVaultResponse) 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: QueryGetVaultResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryGetVaultResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Strategies", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Vault", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -2371,14 +3201,13 @@ func (m *QueryGetVaultResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Strategies = append(m.Strategies, Strategy{}) - if err := m.Strategies[len(m.Strategies)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.Vault.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - case 3: + case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field VaultAddress", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field TotalBondedAmount", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -2406,11 +3235,13 @@ func (m *QueryGetVaultResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.VaultAddress = string(dAtA[iNdEx:postIndex]) + if err := m.TotalBondedAmount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex - case 4: + case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TotalBondedAmount", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field TotalUnbondingAmount", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -2438,13 +3269,13 @@ func (m *QueryGetVaultResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.TotalBondedAmount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.TotalUnbondingAmount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - case 5: + case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TotalUnbondingAmount", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field WithdrawReserve", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -2472,15 +3303,15 @@ func (m *QueryGetVaultResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.TotalUnbondingAmount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.WithdrawReserve.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - case 6: + case 5: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TotalWithdrawalBalance", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Strategies", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -2490,23 +3321,23 @@ func (m *QueryGetVaultResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthQuery } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthQuery } if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.TotalWithdrawalBalance.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.Strategies = append(m.Strategies, Strategy{}) + if err := m.Strategies[len(m.Strategies)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -2707,7 +3538,7 @@ func (m *QueryAllStrategyResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Strategies = append(m.Strategies, Strategy{}) + m.Strategies = append(m.Strategies, StrategyContainer{}) if err := m.Strategies[len(m.Strategies)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -2870,6 +3701,191 @@ func (m *QueryGetStrategyRequest) Unmarshal(dAtA []byte) error { } return nil } +func (m *StrategyContainer) 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: StrategyContainer: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: StrategyContainer: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Strategy", 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 err := m.Strategy.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DepositFeeRate", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.DepositFeeRate.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field WithdrawFeeRate", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.WithdrawFeeRate.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PerformanceFeeRate", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.PerformanceFeeRate.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 *QueryGetStrategyResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -3268,6 +4284,72 @@ func (m *QueryEstimateRedeemAmountResponse) Unmarshal(dAtA []byte) error { } switch fieldNum { case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ShareAmount", 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 err := m.ShareAmount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Fee", 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 err := m.Fee.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field RedeemAmount", wireType) } diff --git a/x/yieldaggregator/types/query.pb.gw.go b/x/yieldaggregator/types/query.pb.gw.go index 59b6f6adf..3f5d05880 100644 --- a/x/yieldaggregator/types/query.pb.gw.go +++ b/x/yieldaggregator/types/query.pb.gw.go @@ -87,6 +87,60 @@ func local_request_Query_VaultAll_0(ctx context.Context, marshaler runtime.Marsh } +func request_Query_VaultAllByShareHolder_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryAllVaultByShareHolderRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["share_holder"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "share_holder") + } + + protoReq.ShareHolder, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "share_holder", err) + } + + msg, err := client.VaultAllByShareHolder(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_VaultAllByShareHolder_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryAllVaultByShareHolderRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["share_holder"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "share_holder") + } + + protoReq.ShareHolder, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "share_holder", err) + } + + msg, err := server.VaultAllByShareHolder(ctx, &protoReq) + return msg, metadata, err + +} + func request_Query_Vault_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq QueryGetVaultRequest var metadata runtime.ServerMetadata @@ -445,6 +499,29 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv }) + mux.Handle("GET", pattern_Query_VaultAllByShareHolder_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_VaultAllByShareHolder_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_VaultAllByShareHolder_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("GET", pattern_Query_Vault_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -641,6 +718,26 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie }) + mux.Handle("GET", pattern_Query_VaultAllByShareHolder_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_VaultAllByShareHolder_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_VaultAllByShareHolder_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("GET", pattern_Query_Vault_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -749,6 +846,8 @@ var ( pattern_Query_VaultAll_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"ununifi", "yieldaggregator", "vaults"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_VaultAllByShareHolder_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"ununifi", "yieldaggregator", "vaults", "share-holders", "share_holder"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_Vault_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"ununifi", "yieldaggregator", "vaults", "id"}, "", runtime.AssumeColonVerbOpt(false))) pattern_Query_StrategyAll_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"ununifi", "yieldaggregator", "strategies"}, "", runtime.AssumeColonVerbOpt(false))) @@ -765,6 +864,8 @@ var ( forward_Query_VaultAll_0 = runtime.ForwardResponseMessage + forward_Query_VaultAllByShareHolder_0 = runtime.ForwardResponseMessage + forward_Query_Vault_0 = runtime.ForwardResponseMessage forward_Query_StrategyAll_0 = runtime.ForwardResponseMessage diff --git a/x/yieldaggregator/types/types.go b/x/yieldaggregator/types/types.go index 72b124461..ec4be9d90 100644 --- a/x/yieldaggregator/types/types.go +++ b/x/yieldaggregator/types/types.go @@ -2,6 +2,7 @@ package types import "fmt" +// TODO: want to %s with types.Module name. state breaking func GetLPTokenDenom(vaultId uint64) string { return fmt.Sprintf("yield-aggregator/vaults/%d", vaultId) }