From dd42b9e3015928257afc057d1fae7604d0c55f41 Mon Sep 17 00:00:00 2001 From: Ruslan Akhtariev Date: Wed, 28 Sep 2022 15:02:56 +0700 Subject: [PATCH 01/59] TotalDelegationByValidatorForAsset query + tests --- proto/osmosis/superfluid/query.proto | 18 +- x/superfluid/keeper/grpc_query.go | 35 + x/superfluid/keeper/grpc_query_test.go | 52 ++ x/superfluid/types/query.pb.go | 935 +++++++++++++++++++++---- 4 files changed, 908 insertions(+), 132 deletions(-) diff --git a/proto/osmosis/superfluid/query.proto b/proto/osmosis/superfluid/query.proto index 5470eba8850..49a5ab56597 100644 --- a/proto/osmosis/superfluid/query.proto +++ b/proto/osmosis/superfluid/query.proto @@ -53,8 +53,10 @@ service Query { "/osmosis/superfluid/v1beta1/connected_intermediary_account/{lock_id}"; } - // Returns the total amount of osmo superfluidly staked. - // Response is denominated in uosmo. + rpc TotalDelegationByValidatorForAsset( + QueryTotalDelegationByValidatorForAssetRequest) + returns (QueryTotalDelegationByValidatorForAssetResponse) {} + rpc TotalSuperfluidDelegations(TotalSuperfluidDelegationsRequest) returns (TotalSuperfluidDelegationsResponse) { option (google.api.http).get = @@ -153,6 +155,18 @@ message ConnectedIntermediaryAccountResponse { SuperfluidIntermediaryAccountInfo account = 1; } +message QueryTotalDelegationByValidatorForAssetRequest { string denom = 1; } +message QueryTotalDelegationByValidatorForAssetResponse { + repeated Delegations asset_response = 1; +} + +message Delegations { + string val_addr = 1; + string amount_sfsd = 2 + [ (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int" ]; + string osmo_equivalent = 3 + [ (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int" ]; +} message TotalSuperfluidDelegationsRequest {} message TotalSuperfluidDelegationsResponse { diff --git a/x/superfluid/keeper/grpc_query.go b/x/superfluid/keeper/grpc_query.go index 409c60a6122..98693d86e7b 100644 --- a/x/superfluid/keeper/grpc_query.go +++ b/x/superfluid/keeper/grpc_query.go @@ -392,6 +392,41 @@ func (q Querier) EstimateSuperfluidDelegatedAmountByValidatorDenom(goCtx context }, nil } +func (q Querier) TotalDelegationByValidatorForAsset(goCtx context.Context, req *types.QueryTotalDelegationByValidatorForAssetRequest) (*types.QueryTotalDelegationByValidatorForAssetResponse, error) { + ctx := sdk.UnwrapSDKContext(goCtx) + + var delegationsByValidator = []*types.Delegations{} + var intermediaryAccount types.SuperfluidIntermediaryAccount + + intermediaryAccounts := q.Keeper.GetAllIntermediaryAccounts(ctx) + for _, intermediaryAccount = range intermediaryAccounts { + if intermediaryAccount.Denom != req.Denom { + continue + } + valAddr, err := sdk.ValAddressFromBech32(intermediaryAccount.ValAddr) + if err != nil { + return nil, err + } + + val, found := q.Keeper.sk.GetValidator(ctx, valAddr) + if !found { + return nil, stakingtypes.ErrNoValidatorFound + } + equivalentAmountOSMO := q.Keeper.GetSuperfluidOSMOTokens(ctx, req.Denom, val.Tokens) + result := &types.Delegations{ + ValAddr: valAddr.String(), + AmountSfsd: &val.Tokens, + OsmoEquivalent: &equivalentAmountOSMO, + } + + delegationsByValidator = append(delegationsByValidator, result) + } + + return &types.QueryTotalDelegationByValidatorForAssetResponse{ + AssetResponse: delegationsByValidator, + }, nil +} + // TotalSuperfluidDelegations returns total amount of osmo delegated via superfluid staking. func (q Querier) TotalSuperfluidDelegations(goCtx context.Context, _ *types.TotalSuperfluidDelegationsRequest) (*types.TotalSuperfluidDelegationsResponse, error) { ctx := sdk.UnwrapSDKContext(goCtx) diff --git a/x/superfluid/keeper/grpc_query_test.go b/x/superfluid/keeper/grpc_query_test.go index d8de2ddae1d..4fd12d454d1 100644 --- a/x/superfluid/keeper/grpc_query_test.go +++ b/x/superfluid/keeper/grpc_query_test.go @@ -16,6 +16,58 @@ func (suite *KeeperTestSuite) TestGRPCParams() { suite.Require().True(res.Params.MinimumRiskFactor.Equal(types.DefaultParams().MinimumRiskFactor)) } +func (suite *KeeperTestSuite) TestTotalDelegationByValidatorForAsset() { + suite.SetupTest() + ctx := suite.Ctx + querier := suite.querier + delegation_amount := int64(1000000) + + var denom string + + valAddrs := suite.SetupValidators([]stakingtypes.BondStatus{stakingtypes.Bonded, stakingtypes.Bonded}) + test_multiplier := sdk.NewDec(20) + denoms, _ := suite.SetupGammPoolsAndSuperfluidAssets([]sdk.Dec{test_multiplier, test_multiplier}) + + superfluidDelegations := []superfluidDelegation{ + {0, 0, 0, delegation_amount}, + {0, 1, 1, delegation_amount}, + {1, 0, 1, delegation_amount}, + {1, 1, 0, delegation_amount}, + } + + suite.setupSuperfluidDelegations(valAddrs, superfluidDelegations, denoms) + + for _, denom = range denoms { + req, err := querier.TotalDelegationByValidatorForAsset(sdk.WrapSDKContext(ctx), &types.QueryTotalDelegationByValidatorForAssetRequest{Denom: denom}) + + suite.Require().NoError(err) + suite.Require().Equal(len(valAddrs), len(req.AssetResponse)) + + for res_ind, res := range req.AssetResponse { + // check osmo equivalent is correct + actual_response_osmo := *req.AssetResponse[res_ind].OsmoEquivalent + needed_response_osmo := suite.App.SuperfluidKeeper.GetSuperfluidOSMOTokens(ctx, denom, sdk.NewInt(test_multiplier.TruncateInt64()*delegation_amount+100)) // + 100 due to initial stake on validators account + + suite.Require().Equal(actual_response_osmo, needed_response_osmo) + + // check sfs'd asset amount correct + actual_response_asset := *req.AssetResponse[res_ind].AmountSfsd + needed_response_asset := sdk.NewInt(test_multiplier.TruncateInt64()*delegation_amount + 100) // + 100 due to initial stake on validators account + suite.Require().Equal(actual_response_asset, needed_response_asset) + + // check validator addresses correct + actual_val := res.ValAddr + checks := 0 + for _, val := range valAddrs { + if val.String() == actual_val { + checks++ + break + } + } + suite.Require().True(checks == 1) + } + } +} func (suite *KeeperTestSuite) TestGRPCSuperfluidAsset() { suite.SetupTest() diff --git a/x/superfluid/types/query.pb.go b/x/superfluid/types/query.pb.go index c35537233e8..277c1f6f29c 100644 --- a/x/superfluid/types/query.pb.go +++ b/x/superfluid/types/query.pb.go @@ -624,6 +624,148 @@ func (m *ConnectedIntermediaryAccountResponse) GetAccount() *SuperfluidIntermedi return nil } +type QueryTotalDelegationByValidatorForAssetRequest struct { + Denom string `protobuf:"bytes,1,opt,name=denom,proto3" json:"denom,omitempty"` +} + +func (m *QueryTotalDelegationByValidatorForAssetRequest) Reset() { + *m = QueryTotalDelegationByValidatorForAssetRequest{} +} +func (m *QueryTotalDelegationByValidatorForAssetRequest) String() string { + return proto.CompactTextString(m) +} +func (*QueryTotalDelegationByValidatorForAssetRequest) ProtoMessage() {} +func (*QueryTotalDelegationByValidatorForAssetRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_e3d9448e4ed3943f, []int{13} +} +func (m *QueryTotalDelegationByValidatorForAssetRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryTotalDelegationByValidatorForAssetRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryTotalDelegationByValidatorForAssetRequest.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 *QueryTotalDelegationByValidatorForAssetRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryTotalDelegationByValidatorForAssetRequest.Merge(m, src) +} +func (m *QueryTotalDelegationByValidatorForAssetRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryTotalDelegationByValidatorForAssetRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryTotalDelegationByValidatorForAssetRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryTotalDelegationByValidatorForAssetRequest proto.InternalMessageInfo + +func (m *QueryTotalDelegationByValidatorForAssetRequest) GetDenom() string { + if m != nil { + return m.Denom + } + return "" +} + +type QueryTotalDelegationByValidatorForAssetResponse struct { + AssetResponse []*Delegations `protobuf:"bytes,1,rep,name=asset_response,json=assetResponse,proto3" json:"asset_response,omitempty"` +} + +func (m *QueryTotalDelegationByValidatorForAssetResponse) Reset() { + *m = QueryTotalDelegationByValidatorForAssetResponse{} +} +func (m *QueryTotalDelegationByValidatorForAssetResponse) String() string { + return proto.CompactTextString(m) +} +func (*QueryTotalDelegationByValidatorForAssetResponse) ProtoMessage() {} +func (*QueryTotalDelegationByValidatorForAssetResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_e3d9448e4ed3943f, []int{14} +} +func (m *QueryTotalDelegationByValidatorForAssetResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryTotalDelegationByValidatorForAssetResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryTotalDelegationByValidatorForAssetResponse.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 *QueryTotalDelegationByValidatorForAssetResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryTotalDelegationByValidatorForAssetResponse.Merge(m, src) +} +func (m *QueryTotalDelegationByValidatorForAssetResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryTotalDelegationByValidatorForAssetResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryTotalDelegationByValidatorForAssetResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryTotalDelegationByValidatorForAssetResponse proto.InternalMessageInfo + +func (m *QueryTotalDelegationByValidatorForAssetResponse) GetAssetResponse() []*Delegations { + if m != nil { + return m.AssetResponse + } + return nil +} + +type Delegations struct { + ValAddr string `protobuf:"bytes,1,opt,name=val_addr,json=valAddr,proto3" json:"val_addr,omitempty"` + AmountSfsd *github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,2,opt,name=amount_sfsd,json=amountSfsd,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"amount_sfsd,omitempty"` + OsmoEquivalent *github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,3,opt,name=osmo_equivalent,json=osmoEquivalent,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"osmo_equivalent,omitempty"` +} + +func (m *Delegations) Reset() { *m = Delegations{} } +func (m *Delegations) String() string { return proto.CompactTextString(m) } +func (*Delegations) ProtoMessage() {} +func (*Delegations) Descriptor() ([]byte, []int) { + return fileDescriptor_e3d9448e4ed3943f, []int{15} +} +func (m *Delegations) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Delegations) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Delegations.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 *Delegations) XXX_Merge(src proto.Message) { + xxx_messageInfo_Delegations.Merge(m, src) +} +func (m *Delegations) XXX_Size() int { + return m.Size() +} +func (m *Delegations) XXX_DiscardUnknown() { + xxx_messageInfo_Delegations.DiscardUnknown(m) +} + +var xxx_messageInfo_Delegations proto.InternalMessageInfo + +func (m *Delegations) GetValAddr() string { + if m != nil { + return m.ValAddr + } + return "" +} + type TotalSuperfluidDelegationsRequest struct { } @@ -631,7 +773,7 @@ func (m *TotalSuperfluidDelegationsRequest) Reset() { *m = TotalSuperflu func (m *TotalSuperfluidDelegationsRequest) String() string { return proto.CompactTextString(m) } func (*TotalSuperfluidDelegationsRequest) ProtoMessage() {} func (*TotalSuperfluidDelegationsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_e3d9448e4ed3943f, []int{13} + return fileDescriptor_e3d9448e4ed3943f, []int{16} } func (m *TotalSuperfluidDelegationsRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -668,7 +810,7 @@ func (m *TotalSuperfluidDelegationsResponse) Reset() { *m = TotalSuperfl func (m *TotalSuperfluidDelegationsResponse) String() string { return proto.CompactTextString(m) } func (*TotalSuperfluidDelegationsResponse) ProtoMessage() {} func (*TotalSuperfluidDelegationsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_e3d9448e4ed3943f, []int{14} + return fileDescriptor_e3d9448e4ed3943f, []int{17} } func (m *TotalSuperfluidDelegationsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -707,7 +849,7 @@ func (m *SuperfluidDelegationAmountRequest) Reset() { *m = SuperfluidDel func (m *SuperfluidDelegationAmountRequest) String() string { return proto.CompactTextString(m) } func (*SuperfluidDelegationAmountRequest) ProtoMessage() {} func (*SuperfluidDelegationAmountRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_e3d9448e4ed3943f, []int{15} + return fileDescriptor_e3d9448e4ed3943f, []int{18} } func (m *SuperfluidDelegationAmountRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -765,7 +907,7 @@ func (m *SuperfluidDelegationAmountResponse) Reset() { *m = SuperfluidDe func (m *SuperfluidDelegationAmountResponse) String() string { return proto.CompactTextString(m) } func (*SuperfluidDelegationAmountResponse) ProtoMessage() {} func (*SuperfluidDelegationAmountResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_e3d9448e4ed3943f, []int{16} + return fileDescriptor_e3d9448e4ed3943f, []int{19} } func (m *SuperfluidDelegationAmountResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -811,7 +953,7 @@ func (m *SuperfluidDelegationsByDelegatorRequest) Reset() { func (m *SuperfluidDelegationsByDelegatorRequest) String() string { return proto.CompactTextString(m) } func (*SuperfluidDelegationsByDelegatorRequest) ProtoMessage() {} func (*SuperfluidDelegationsByDelegatorRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_e3d9448e4ed3943f, []int{17} + return fileDescriptor_e3d9448e4ed3943f, []int{20} } func (m *SuperfluidDelegationsByDelegatorRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -859,7 +1001,7 @@ func (m *SuperfluidDelegationsByDelegatorResponse) Reset() { func (m *SuperfluidDelegationsByDelegatorResponse) String() string { return proto.CompactTextString(m) } func (*SuperfluidDelegationsByDelegatorResponse) ProtoMessage() {} func (*SuperfluidDelegationsByDelegatorResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_e3d9448e4ed3943f, []int{18} + return fileDescriptor_e3d9448e4ed3943f, []int{21} } func (m *SuperfluidDelegationsByDelegatorResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -922,7 +1064,7 @@ func (m *SuperfluidUndelegationsByDelegatorRequest) String() string { } func (*SuperfluidUndelegationsByDelegatorRequest) ProtoMessage() {} func (*SuperfluidUndelegationsByDelegatorRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_e3d9448e4ed3943f, []int{19} + return fileDescriptor_e3d9448e4ed3943f, []int{22} } func (m *SuperfluidUndelegationsByDelegatorRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -979,7 +1121,7 @@ func (m *SuperfluidUndelegationsByDelegatorResponse) String() string { } func (*SuperfluidUndelegationsByDelegatorResponse) ProtoMessage() {} func (*SuperfluidUndelegationsByDelegatorResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_e3d9448e4ed3943f, []int{20} + return fileDescriptor_e3d9448e4ed3943f, []int{23} } func (m *SuperfluidUndelegationsByDelegatorResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1042,7 +1184,7 @@ func (m *SuperfluidDelegationsByValidatorDenomRequest) String() string { } func (*SuperfluidDelegationsByValidatorDenomRequest) ProtoMessage() {} func (*SuperfluidDelegationsByValidatorDenomRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_e3d9448e4ed3943f, []int{21} + return fileDescriptor_e3d9448e4ed3943f, []int{24} } func (m *SuperfluidDelegationsByValidatorDenomRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1097,7 +1239,7 @@ func (m *SuperfluidDelegationsByValidatorDenomResponse) String() string { } func (*SuperfluidDelegationsByValidatorDenomResponse) ProtoMessage() {} func (*SuperfluidDelegationsByValidatorDenomResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_e3d9448e4ed3943f, []int{22} + return fileDescriptor_e3d9448e4ed3943f, []int{25} } func (m *SuperfluidDelegationsByValidatorDenomResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1146,7 +1288,7 @@ func (m *EstimateSuperfluidDelegatedAmountByValidatorDenomRequest) String() stri } func (*EstimateSuperfluidDelegatedAmountByValidatorDenomRequest) ProtoMessage() {} func (*EstimateSuperfluidDelegatedAmountByValidatorDenomRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_e3d9448e4ed3943f, []int{23} + return fileDescriptor_e3d9448e4ed3943f, []int{26} } func (m *EstimateSuperfluidDelegatedAmountByValidatorDenomRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1201,7 +1343,7 @@ func (m *EstimateSuperfluidDelegatedAmountByValidatorDenomResponse) String() str } func (*EstimateSuperfluidDelegatedAmountByValidatorDenomResponse) ProtoMessage() {} func (*EstimateSuperfluidDelegatedAmountByValidatorDenomResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_e3d9448e4ed3943f, []int{24} + return fileDescriptor_e3d9448e4ed3943f, []int{27} } func (m *EstimateSuperfluidDelegatedAmountByValidatorDenomResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1247,7 +1389,7 @@ func (m *QueryTotalDelegationByDelegatorRequest) Reset() { func (m *QueryTotalDelegationByDelegatorRequest) String() string { return proto.CompactTextString(m) } func (*QueryTotalDelegationByDelegatorRequest) ProtoMessage() {} func (*QueryTotalDelegationByDelegatorRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_e3d9448e4ed3943f, []int{25} + return fileDescriptor_e3d9448e4ed3943f, []int{28} } func (m *QueryTotalDelegationByDelegatorRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1296,7 +1438,7 @@ func (m *QueryTotalDelegationByDelegatorResponse) Reset() { func (m *QueryTotalDelegationByDelegatorResponse) String() string { return proto.CompactTextString(m) } func (*QueryTotalDelegationByDelegatorResponse) ProtoMessage() {} func (*QueryTotalDelegationByDelegatorResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_e3d9448e4ed3943f, []int{26} + return fileDescriptor_e3d9448e4ed3943f, []int{29} } func (m *QueryTotalDelegationByDelegatorResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1367,6 +1509,9 @@ func init() { proto.RegisterType((*AllIntermediaryAccountsResponse)(nil), "osmosis.superfluid.AllIntermediaryAccountsResponse") proto.RegisterType((*ConnectedIntermediaryAccountRequest)(nil), "osmosis.superfluid.ConnectedIntermediaryAccountRequest") proto.RegisterType((*ConnectedIntermediaryAccountResponse)(nil), "osmosis.superfluid.ConnectedIntermediaryAccountResponse") + proto.RegisterType((*QueryTotalDelegationByValidatorForAssetRequest)(nil), "osmosis.superfluid.QueryTotalDelegationByValidatorForAssetRequest") + proto.RegisterType((*QueryTotalDelegationByValidatorForAssetResponse)(nil), "osmosis.superfluid.QueryTotalDelegationByValidatorForAssetResponse") + proto.RegisterType((*Delegations)(nil), "osmosis.superfluid.Delegations") proto.RegisterType((*TotalSuperfluidDelegationsRequest)(nil), "osmosis.superfluid.TotalSuperfluidDelegationsRequest") proto.RegisterType((*TotalSuperfluidDelegationsResponse)(nil), "osmosis.superfluid.TotalSuperfluidDelegationsResponse") proto.RegisterType((*SuperfluidDelegationAmountRequest)(nil), "osmosis.superfluid.SuperfluidDelegationAmountRequest") @@ -1386,111 +1531,119 @@ func init() { func init() { proto.RegisterFile("osmosis/superfluid/query.proto", fileDescriptor_e3d9448e4ed3943f) } var fileDescriptor_e3d9448e4ed3943f = []byte{ - // 1662 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x59, 0x4b, 0x6c, 0xd4, 0xc6, - 0x1b, 0xcf, 0x24, 0x21, 0x81, 0x0f, 0x09, 0x92, 0x01, 0xfe, 0x09, 0x06, 0x36, 0xe0, 0x84, 0x24, - 0xff, 0x00, 0x76, 0x13, 0x0a, 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fc, 0x06, 0x92, 0x17, 0x7b, 0xc9, 0x96, 0xf2, 0xcf, 0xa0, - 0x41, 0x44, 0x63, 0x8e, 0x45, 0xe3, 0x32, 0xbe, 0xb8, 0xf1, 0x1a, 0xf0, 0x62, 0x11, 0xde, 0xf1, - 0xf9, 0xc7, 0xd7, 0xaf, 0xdb, 0x61, 0x7c, 0xc3, 0x77, 0x76, 0x3c, 0x1b, 0x87, 0x63, 0xb3, 0xab, - 0x87, 0x34, 0xf7, 0x9c, 0xb4, 0x89, 0x08, 0xbd, 0xcb, 0x22, 0xb4, 0x84, 0x17, 0xd2, 0x22, 0x44, - 0x84, 0x7a, 0x2d, 0x6d, 0x20, 0xc4, 0x05, 0xec, 0x77, 0x7f, 0x82, 0xc7, 0xde, 0xe4, 0xf1, 0xe9, - 0xc4, 0x4b, 0x59, 0xe6, 0x5a, 0x21, 0x9d, 0xd9, 0x94, 0xac, 0x40, 0xbd, 0xc8, 0x50, 0xcf, 0xe3, - 0xb9, 0x34, 0xd4, 0xeb, 0xbf, 0x70, 0x66, 0x76, 0xc7, 0xd4, 0x95, 0x07, 0x4f, 0x72, 0xe8, 0xe1, - 0x93, 0x1c, 0xfa, 0xf5, 0x49, 0x0e, 0x7d, 0xf6, 0x34, 0xd7, 0xf6, 0xf0, 0x69, 0xae, 0xed, 0xe7, - 0xa7, 0xb9, 0xb6, 0xb7, 0x4f, 0x46, 0x6e, 0xc0, 0xc2, 0xe4, 0x31, 0x4b, 0x5f, 0xa6, 0x81, 0xfd, - 0xb5, 0xf1, 0x09, 0xf5, 0x66, 0xd4, 0x0b, 0x76, 0x2b, 0x5e, 0xee, 0x62, 0xff, 0x49, 0x3a, 0xfe, - 0x4f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x57, 0xa3, 0x99, 0xea, 0xc7, 0x1b, 0x00, 0x00, + // 1784 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc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, 0x21, 0x3b, 0x14, 0xef, 0xa7, 0x80, 0xa0, 0x2f, + 0x6b, 0x18, 0xe4, 0xc8, 0xc7, 0xba, 0x02, 0xfd, 0xa1, 0x77, 0x4c, 0x61, 0x16, 0xba, 0x08, 0x97, + 0x8b, 0xb4, 0x63, 0xbc, 0x67, 0x6a, 0x38, 0x85, 0x32, 0x0f, 0x32, 0x65, 0x14, 0x44, 0xd8, 0x43, + 0x5e, 0x2f, 0x54, 0x0c, 0x47, 0x2f, 0x1b, 0xba, 0x66, 0x27, 0x03, 0xff, 0x88, 0x83, 0x81, 0x3a, + 0x06, 0x66, 0x4e, 0x19, 0x78, 0x57, 0xbf, 0xac, 0x6d, 0x54, 0xf4, 0x4d, 0xc5, 0xd0, 0x4c, 0x47, + 0x2e, 0xf9, 0x54, 0x2c, 0x18, 0x53, 0x51, 0x26, 0x2e, 0xe2, 0x92, 0x75, 0xd1, 0x67, 0x0a, 0x4b, + 0x2e, 0x58, 0xb6, 0x9a, 0x1f, 0xb4, 0x62, 0xce, 0x85, 0xdb, 0x1c, 0x1c, 0x0a, 0xf0, 0xcd, 0x99, + 0x8e, 0x66, 0x97, 0x34, 0x55, 0x57, 0xec, 0x6a, 0xb6, 0x50, 0xb0, 0x2a, 0xa6, 0x33, 0x67, 0xae, + 0x59, 0xd1, 0x48, 0xd0, 0x5e, 0xd8, 0xbe, 0xa9, 0x18, 0xb2, 0xa2, 0xaa, 0xf6, 0x60, 0x3b, 0x39, + 0xe8, 0xde, 0x54, 0x8c, 0xac, 0xaa, 0xda, 0xee, 0x51, 0x51, 0xa9, 0x14, 0x35, 0x59, 0x57, 0x07, + 0x3b, 0x0e, 0x72, 0xe3, 0x9d, 0xf9, 0x6e, 0xf2, 0x3c, 0xa7, 0xa2, 0x41, 0xe8, 0x76, 0x39, 0x34, + 0x8c, 0x07, 0x3b, 0x29, 0x13, 0x7b, 0x14, 0xae, 0x41, 0x26, 0x6b, 0x18, 0x11, 0x36, 0x78, 0x31, + 0x74, 0xf3, 0x23, 0xc8, 0x7f, 0xe6, 0x8f, 0x51, 0x91, 0x16, 0x80, 0xe8, 0x16, 0x8b, 0x48, 0xfb, + 0x09, 0xab, 0x01, 0xf1, 0xb2, 0x52, 0xf4, 0xd2, 0x30, 0x1f, 0xe2, 0x14, 0xbe, 0xe5, 0x60, 0x28, + 0x56, 0x15, 0x8b, 0xc5, 0x55, 0xd8, 0xae, 0xb0, 0x77, 0x2c, 0x39, 0x4e, 0x24, 0x27, 0x47, 0x8c, + 0xf3, 0x58, 0xba, 0xf8, 0xc2, 0xd0, 0xa5, 0x1a, 0x10, 0xed, 0x04, 0xc4, 0x58, 0x43, 0x10, 0xd4, + 0xaa, 0x1a, 0x14, 0xe7, 0x60, 0xf8, 0x82, 0x65, 0x9a, 0x5a, 0xc1, 0xd1, 0xa2, 0x94, 0x7b, 0x4e, + 0x1b, 0x80, 0x6e, 0xb7, 0xb5, 0xb8, 0xa1, 0xe0, 0x48, 0x28, 0xba, 0xdc, 0xc7, 0x39, 0x55, 0x78, + 0x17, 0x46, 0x92, 0xf9, 0x99, 0x27, 0x16, 0xa1, 0x9b, 0x19, 0xcf, 0x5c, 0xde, 0x9a, 0x23, 0xf2, + 0x9e, 0x14, 0x61, 0x16, 0x44, 0xd2, 0x76, 0xae, 0x58, 0x8e, 0x62, 0xcc, 0x68, 0x86, 0x56, 0x24, + 0x80, 0x72, 0xd5, 0x15, 0xc5, 0xd0, 0x55, 0xc5, 0xb1, 0xec, 0x59, 0xcb, 0x26, 0x35, 0x92, 0x5c, + 0x4a, 0x55, 0x90, 0x52, 0xcb, 0xf1, 0x3b, 0x4c, 0x2f, 0xed, 0x30, 0x36, 0x7b, 0xc3, 0x62, 0x3b, + 0x14, 0x05, 0x29, 0x10, 0x89, 0xf3, 0xff, 0x53, 0xc2, 0x72, 0x84, 0xef, 0x38, 0xe8, 0x09, 0x1d, + 0xd7, 0xd4, 0x02, 0x57, 0x5b, 0x0b, 0xaf, 0x41, 0x8f, 0x52,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, 0x41, 0x82, 0x14, 0xb1, 0xdb, 0x09, 0x16, + 0x34, 0x44, 0xf9, 0x87, 0x1c, 0xec, 0xf0, 0x77, 0x13, 0x68, 0x24, 0x4a, 0xc5, 0xd6, 0x4d, 0x09, + 0x7f, 0xb8, 0x01, 0x15, 0x33, 0x43, 0x24, 0x66, 0x8c, 0xa3, 0xd1, 0x24, 0x33, 0x82, 0x3d, 0x0a, + 0x35, 0xc5, 0x5b, 0x7d, 0xc4, 0x98, 0xb2, 0x65, 0x5b, 0x12, 0x63, 0xca, 0xd6, 0xfd, 0x49, 0x4a, + 0x53, 0x0c, 0x43, 0xa6, 0xcb, 0x12, 0xf4, 0x19, 0x07, 0x3b, 0xb7, 0x2c, 0x3f, 0xd0, 0x44, 0x2c, + 0xea, 0xba, 0x95, 0x0a, 0x7f, 0x24, 0x15, 0x2d, 0x33, 0xee, 0x25, 0x62, 0x9c, 0x88, 0x8e, 0x36, + 0xf6, 0x53, 0xb0, 0x65, 0x41, 0xdf, 0x70, 0x30, 0x10, 0xb3, 0x1b, 0x40, 0x53, 0x31, 0x5e, 0x49, + 0xd8, 0x59, 0xf0, 0xc7, 0x9b, 0xe2, 0x61, 0xa6, 0x9f, 0x25, 0xa6, 0x9f, 0x42, 0x27, 0x1a, 0xf9, + 0x55, 0x0f, 0x49, 0x91, 0xfd, 0x15, 0xc3, 0x43, 0x0e, 0xf6, 0x27, 0x8d, 0xf6, 0xe8, 0x54, 0x94, + 0x51, 0x29, 0x96, 0x09, 0xfc, 0x74, 0xf3, 0x8c, 0x0c, 0xd2, 0x3c, 0x81, 0x34, 0x8b, 0x66, 0x92, + 0x20, 0x15, 0x3c, 0x49, 0x91, 0xc0, 0xa4, 0x1b, 0x6c, 0x91, 0x71, 0x13, 0x7d, 0xe9, 0x4d, 0xa3, + 0x89, 0x63, 0x3f, 0xca, 0xc5, 0x96, 0x76, 0xea, 0xdd, 0x03, 0x7f, 0xe1, 0x89, 0x64, 0x30, 0xf4, + 0x6d, 0x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0xd5, 0x61, 0x89, 0x5f, 0x78, 0x4a, 0xd2, + 0x98, 0x87, 0xde, 0x26, 0x1e, 0x5a, 0x41, 0x57, 0x92, 0x3c, 0xa4, 0x31, 0xf1, 0x72, 0x52, 0x43, + 0x88, 0x72, 0xd8, 0xef, 0x5e, 0x07, 0x8f, 0x9c, 0x3d, 0xd0, 0xe9, 0xf4, 0xf7, 0x44, 0x5d, 0xa1, + 0x9c, 0x69, 0x89, 0x97, 0xa1, 0x5e, 0x26, 0xa8, 0x17, 0xd1, 0x42, 0x12, 0xea, 0xad, 0x3b, 0xd9, + 0x86, 0xd5, 0x91, 0xbb, 0x7c, 0xef, 0x51, 0x86, 0xbb, 0xff, 0x28, 0xc3, 0xfd, 0xfa, 0x28, 0xc3, + 0x7d, 0xf2, 0x38, 0xd3, 0x76, 0xff, 0x71, 0xa6, 0xed, 0xe7, 0xc7, 0x99, 0xb6, 0x37, 0x4f, 0x86, + 0xbe, 0xd9, 0x99, 0xca, 0x63, 0x86, 0xb2, 0x8a, 0x7d, 0xfd, 0x9b, 0x93, 0x53, 0xd2, 0xf5, 0xb0, + 0x15, 0xe4, 0x3b, 0x7e, 0xb5, 0x8b, 0xfc, 0x2f, 0xf2, 0xf8, 0x3f, 0x01, 0x00, 0x00, 0xff, 0xff, + 0x3a, 0x12, 0x96, 0xd9, 0x09, 0x1e, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1518,8 +1671,7 @@ type QueryClient interface { AllIntermediaryAccounts(ctx context.Context, in *AllIntermediaryAccountsRequest, opts ...grpc.CallOption) (*AllIntermediaryAccountsResponse, error) // Returns intermediary account connected to a superfluid staked lock by id ConnectedIntermediaryAccount(ctx context.Context, in *ConnectedIntermediaryAccountRequest, opts ...grpc.CallOption) (*ConnectedIntermediaryAccountResponse, error) - // Returns the total amount of osmo superfluidly staked. - // Response is denominated in uosmo. + TotalDelegationByValidatorForAsset(ctx context.Context, in *QueryTotalDelegationByValidatorForAssetRequest, opts ...grpc.CallOption) (*QueryTotalDelegationByValidatorForAssetResponse, error) TotalSuperfluidDelegations(ctx context.Context, in *TotalSuperfluidDelegationsRequest, opts ...grpc.CallOption) (*TotalSuperfluidDelegationsResponse, error) // Returns the coins superfluid delegated for the delegator, validator, denom // triplet @@ -1601,6 +1753,15 @@ func (c *queryClient) ConnectedIntermediaryAccount(ctx context.Context, in *Conn return out, nil } +func (c *queryClient) TotalDelegationByValidatorForAsset(ctx context.Context, in *QueryTotalDelegationByValidatorForAssetRequest, opts ...grpc.CallOption) (*QueryTotalDelegationByValidatorForAssetResponse, error) { + out := new(QueryTotalDelegationByValidatorForAssetResponse) + err := c.cc.Invoke(ctx, "/osmosis.superfluid.Query/TotalDelegationByValidatorForAsset", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *queryClient) TotalSuperfluidDelegations(ctx context.Context, in *TotalSuperfluidDelegationsRequest, opts ...grpc.CallOption) (*TotalSuperfluidDelegationsResponse, error) { out := new(TotalSuperfluidDelegationsResponse) err := c.cc.Invoke(ctx, "/osmosis.superfluid.Query/TotalSuperfluidDelegations", in, out, opts...) @@ -1679,8 +1840,7 @@ type QueryServer interface { AllIntermediaryAccounts(context.Context, *AllIntermediaryAccountsRequest) (*AllIntermediaryAccountsResponse, error) // Returns intermediary account connected to a superfluid staked lock by id ConnectedIntermediaryAccount(context.Context, *ConnectedIntermediaryAccountRequest) (*ConnectedIntermediaryAccountResponse, error) - // Returns the total amount of osmo superfluidly staked. - // Response is denominated in uosmo. + TotalDelegationByValidatorForAsset(context.Context, *QueryTotalDelegationByValidatorForAssetRequest) (*QueryTotalDelegationByValidatorForAssetResponse, error) TotalSuperfluidDelegations(context.Context, *TotalSuperfluidDelegationsRequest) (*TotalSuperfluidDelegationsResponse, error) // Returns the coins superfluid delegated for the delegator, validator, denom // triplet @@ -1722,6 +1882,9 @@ func (*UnimplementedQueryServer) AllIntermediaryAccounts(ctx context.Context, re func (*UnimplementedQueryServer) ConnectedIntermediaryAccount(ctx context.Context, req *ConnectedIntermediaryAccountRequest) (*ConnectedIntermediaryAccountResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ConnectedIntermediaryAccount not implemented") } +func (*UnimplementedQueryServer) TotalDelegationByValidatorForAsset(ctx context.Context, req *QueryTotalDelegationByValidatorForAssetRequest) (*QueryTotalDelegationByValidatorForAssetResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method TotalDelegationByValidatorForAsset not implemented") +} func (*UnimplementedQueryServer) TotalSuperfluidDelegations(ctx context.Context, req *TotalSuperfluidDelegationsRequest) (*TotalSuperfluidDelegationsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method TotalSuperfluidDelegations not implemented") } @@ -1856,6 +2019,24 @@ func _Query_ConnectedIntermediaryAccount_Handler(srv interface{}, ctx context.Co return interceptor(ctx, in, info, handler) } +func _Query_TotalDelegationByValidatorForAsset_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryTotalDelegationByValidatorForAssetRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).TotalDelegationByValidatorForAsset(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/osmosis.superfluid.Query/TotalDelegationByValidatorForAsset", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).TotalDelegationByValidatorForAsset(ctx, req.(*QueryTotalDelegationByValidatorForAssetRequest)) + } + return interceptor(ctx, in, info, handler) +} + func _Query_TotalSuperfluidDelegations_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(TotalSuperfluidDelegationsRequest) if err := dec(in); err != nil { @@ -2010,6 +2191,10 @@ var _Query_serviceDesc = grpc.ServiceDesc{ MethodName: "ConnectedIntermediaryAccount", Handler: _Query_ConnectedIntermediaryAccount_Handler, }, + { + MethodName: "TotalDelegationByValidatorForAsset", + Handler: _Query_TotalDelegationByValidatorForAsset_Handler, + }, { MethodName: "TotalSuperfluidDelegations", Handler: _Query_TotalSuperfluidDelegations_Handler, @@ -2478,6 +2663,127 @@ func (m *ConnectedIntermediaryAccountResponse) MarshalToSizedBuffer(dAtA []byte) return len(dAtA) - i, nil } +func (m *QueryTotalDelegationByValidatorForAssetRequest) 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 *QueryTotalDelegationByValidatorForAssetRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryTotalDelegationByValidatorForAssetRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Denom) > 0 { + i -= len(m.Denom) + copy(dAtA[i:], m.Denom) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Denom))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryTotalDelegationByValidatorForAssetResponse) 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 *QueryTotalDelegationByValidatorForAssetResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryTotalDelegationByValidatorForAssetResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.AssetResponse) > 0 { + for iNdEx := len(m.AssetResponse) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.AssetResponse[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 *Delegations) 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 *Delegations) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Delegations) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.OsmoEquivalent != nil { + { + size := m.OsmoEquivalent.Size() + i -= size + if _, err := m.OsmoEquivalent.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + if m.AmountSfsd != nil { + { + size := m.AmountSfsd.Size() + i -= size + if _, err := m.AmountSfsd.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if len(m.ValAddr) > 0 { + i -= len(m.ValAddr) + copy(dAtA[i:], m.ValAddr) + i = encodeVarintQuery(dAtA, i, uint64(len(m.ValAddr))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + func (m *TotalSuperfluidDelegationsRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -3248,37 +3554,86 @@ func (m *ConnectedIntermediaryAccountResponse) Size() (n int) { return n } -func (m *TotalSuperfluidDelegationsRequest) Size() (n int) { +func (m *QueryTotalDelegationByValidatorForAssetRequest) Size() (n int) { if m == nil { return 0 } var l int _ = l + l = len(m.Denom) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } return n } -func (m *TotalSuperfluidDelegationsResponse) Size() (n int) { +func (m *QueryTotalDelegationByValidatorForAssetResponse) Size() (n int) { if m == nil { return 0 } var l int _ = l - l = m.TotalDelegations.Size() - n += 1 + l + sovQuery(uint64(l)) + if len(m.AssetResponse) > 0 { + for _, e := range m.AssetResponse { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } return n } -func (m *SuperfluidDelegationAmountRequest) Size() (n int) { +func (m *Delegations) Size() (n int) { if m == nil { return 0 } var l int _ = l - l = len(m.DelegatorAddress) + l = len(m.ValAddr) if l > 0 { n += 1 + l + sovQuery(uint64(l)) } - l = len(m.ValidatorAddress) + if m.AmountSfsd != nil { + l = m.AmountSfsd.Size() + n += 1 + l + sovQuery(uint64(l)) + } + if m.OsmoEquivalent != nil { + l = m.OsmoEquivalent.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *TotalSuperfluidDelegationsRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *TotalSuperfluidDelegationsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.TotalDelegations.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + +func (m *SuperfluidDelegationAmountRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.DelegatorAddress) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = len(m.ValidatorAddress) if l > 0 { n += 1 + l + sovQuery(uint64(l)) } @@ -4608,6 +4963,326 @@ func (m *ConnectedIntermediaryAccountResponse) Unmarshal(dAtA []byte) error { } return nil } +func (m *QueryTotalDelegationByValidatorForAssetRequest) 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: QueryTotalDelegationByValidatorForAssetRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryTotalDelegationByValidatorForAssetRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Denom", 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.Denom = 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 *QueryTotalDelegationByValidatorForAssetResponse) 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: QueryTotalDelegationByValidatorForAssetResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryTotalDelegationByValidatorForAssetResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AssetResponse", 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.AssetResponse = append(m.AssetResponse, &Delegations{}) + if err := m.AssetResponse[len(m.AssetResponse)-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 *Delegations) 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: Delegations: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Delegations: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ValAddr", 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.ValAddr = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AmountSfsd", 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 + } + var v github_com_cosmos_cosmos_sdk_types.Int + m.AmountSfsd = &v + if err := m.AmountSfsd.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OsmoEquivalent", 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 + } + var v github_com_cosmos_cosmos_sdk_types.Int + m.OsmoEquivalent = &v + if err := m.OsmoEquivalent.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 *TotalSuperfluidDelegationsRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 From 247b17d0a7f8a880bc146878167517b70873eb7b Mon Sep 17 00:00:00 2001 From: Ruslan Akhtariev Date: Wed, 28 Sep 2022 15:41:24 +0700 Subject: [PATCH 02/59] TotalDelegationByValidatorForAsset + tests --- proto/osmosis/superfluid/query.proto | 2 ++ 1 file changed, 2 insertions(+) diff --git a/proto/osmosis/superfluid/query.proto b/proto/osmosis/superfluid/query.proto index 49a5ab56597..0175082b4f7 100644 --- a/proto/osmosis/superfluid/query.proto +++ b/proto/osmosis/superfluid/query.proto @@ -57,6 +57,8 @@ service Query { QueryTotalDelegationByValidatorForAssetRequest) returns (QueryTotalDelegationByValidatorForAssetResponse) {} + // Returns the total amount of osmo superfluidly staked. + // Response is denominated in uosmo. rpc TotalSuperfluidDelegations(TotalSuperfluidDelegationsRequest) returns (TotalSuperfluidDelegationsResponse) { option (google.api.http).get = From f8eacb219f325d0f7f01c545f722cc6154c8ec0b Mon Sep 17 00:00:00 2001 From: Ruslan Akhtariev Date: Wed, 28 Sep 2022 15:56:52 +0700 Subject: [PATCH 03/59] TotalDelegationByValidatorForAsset + test --- x/superfluid/types/query.pb.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/x/superfluid/types/query.pb.go b/x/superfluid/types/query.pb.go index 277c1f6f29c..3e9cf7142c7 100644 --- a/x/superfluid/types/query.pb.go +++ b/x/superfluid/types/query.pb.go @@ -1672,6 +1672,8 @@ type QueryClient interface { // Returns intermediary account connected to a superfluid staked lock by id ConnectedIntermediaryAccount(ctx context.Context, in *ConnectedIntermediaryAccountRequest, opts ...grpc.CallOption) (*ConnectedIntermediaryAccountResponse, error) TotalDelegationByValidatorForAsset(ctx context.Context, in *QueryTotalDelegationByValidatorForAssetRequest, opts ...grpc.CallOption) (*QueryTotalDelegationByValidatorForAssetResponse, error) + // Returns the total amount of osmo superfluidly staked. + // Response is denominated in uosmo. TotalSuperfluidDelegations(ctx context.Context, in *TotalSuperfluidDelegationsRequest, opts ...grpc.CallOption) (*TotalSuperfluidDelegationsResponse, error) // Returns the coins superfluid delegated for the delegator, validator, denom // triplet @@ -1841,6 +1843,8 @@ type QueryServer interface { // Returns intermediary account connected to a superfluid staked lock by id ConnectedIntermediaryAccount(context.Context, *ConnectedIntermediaryAccountRequest) (*ConnectedIntermediaryAccountResponse, error) TotalDelegationByValidatorForAsset(context.Context, *QueryTotalDelegationByValidatorForAssetRequest) (*QueryTotalDelegationByValidatorForAssetResponse, error) + // Returns the total amount of osmo superfluidly staked. + // Response is denominated in uosmo. TotalSuperfluidDelegations(context.Context, *TotalSuperfluidDelegationsRequest) (*TotalSuperfluidDelegationsResponse, error) // Returns the coins superfluid delegated for the delegator, validator, denom // triplet From 08583e8868a5e4efb5ba2e0cf87792770bbd5a49 Mon Sep 17 00:00:00 2001 From: Ruslan Akhtariev Date: Mon, 3 Oct 2022 11:32:04 +0700 Subject: [PATCH 04/59] names changed --- proto/osmosis/superfluid/query.proto | 10 +- x/superfluid/keeper/grpc_query.go | 6 +- x/superfluid/keeper/grpc_query_test.go | 6 +- x/superfluid/types/query.pb.go | 264 ++++++++++++------------- 4 files changed, 142 insertions(+), 144 deletions(-) diff --git a/proto/osmosis/superfluid/query.proto b/proto/osmosis/superfluid/query.proto index 0175082b4f7..f57be312711 100644 --- a/proto/osmosis/superfluid/query.proto +++ b/proto/osmosis/superfluid/query.proto @@ -53,9 +53,9 @@ service Query { "/osmosis/superfluid/v1beta1/connected_intermediary_account/{lock_id}"; } - rpc TotalDelegationByValidatorForAsset( - QueryTotalDelegationByValidatorForAssetRequest) - returns (QueryTotalDelegationByValidatorForAssetResponse) {} + rpc TotalDelegationByValidatorForDenom( + QueryTotalDelegationByValidatorForDenomRequest) + returns (QueryTotalDelegationByValidatorForDenomResponse) {} // Returns the total amount of osmo superfluidly staked. // Response is denominated in uosmo. @@ -157,8 +157,8 @@ message ConnectedIntermediaryAccountResponse { SuperfluidIntermediaryAccountInfo account = 1; } -message QueryTotalDelegationByValidatorForAssetRequest { string denom = 1; } -message QueryTotalDelegationByValidatorForAssetResponse { +message QueryTotalDelegationByValidatorForDenomRequest { string denom = 1; } +message QueryTotalDelegationByValidatorForDenomResponse { repeated Delegations asset_response = 1; } diff --git a/x/superfluid/keeper/grpc_query.go b/x/superfluid/keeper/grpc_query.go index 98693d86e7b..d8c4672d96b 100644 --- a/x/superfluid/keeper/grpc_query.go +++ b/x/superfluid/keeper/grpc_query.go @@ -392,7 +392,7 @@ func (q Querier) EstimateSuperfluidDelegatedAmountByValidatorDenom(goCtx context }, nil } -func (q Querier) TotalDelegationByValidatorForAsset(goCtx context.Context, req *types.QueryTotalDelegationByValidatorForAssetRequest) (*types.QueryTotalDelegationByValidatorForAssetResponse, error) { +func (q Querier) TotalDelegationByValidatorForDenom(goCtx context.Context, req *types.QueryTotalDelegationByValidatorForDenomRequest) (*types.QueryTotalDelegationByValidatorForDenomResponse, error) { ctx := sdk.UnwrapSDKContext(goCtx) var delegationsByValidator = []*types.Delegations{} @@ -412,7 +412,7 @@ func (q Querier) TotalDelegationByValidatorForAsset(goCtx context.Context, req * if !found { return nil, stakingtypes.ErrNoValidatorFound } - equivalentAmountOSMO := q.Keeper.GetSuperfluidOSMOTokens(ctx, req.Denom, val.Tokens) + equivalentAmountOSMO := q.Keeper.GetSuperfluidOSMOTokens(ctx, req.Denom, val.DelegatorShares.RoundInt()) result := &types.Delegations{ ValAddr: valAddr.String(), AmountSfsd: &val.Tokens, @@ -422,7 +422,7 @@ func (q Querier) TotalDelegationByValidatorForAsset(goCtx context.Context, req * delegationsByValidator = append(delegationsByValidator, result) } - return &types.QueryTotalDelegationByValidatorForAssetResponse{ + return &types.QueryTotalDelegationByValidatorForDenomResponse{ AssetResponse: delegationsByValidator, }, nil } diff --git a/x/superfluid/keeper/grpc_query_test.go b/x/superfluid/keeper/grpc_query_test.go index 4fd12d454d1..9042dd01d5b 100644 --- a/x/superfluid/keeper/grpc_query_test.go +++ b/x/superfluid/keeper/grpc_query_test.go @@ -22,8 +22,6 @@ func (suite *KeeperTestSuite) TestTotalDelegationByValidatorForAsset() { querier := suite.querier delegation_amount := int64(1000000) - var denom string - valAddrs := suite.SetupValidators([]stakingtypes.BondStatus{stakingtypes.Bonded, stakingtypes.Bonded}) test_multiplier := sdk.NewDec(20) denoms, _ := suite.SetupGammPoolsAndSuperfluidAssets([]sdk.Dec{test_multiplier, test_multiplier}) @@ -37,8 +35,8 @@ func (suite *KeeperTestSuite) TestTotalDelegationByValidatorForAsset() { suite.setupSuperfluidDelegations(valAddrs, superfluidDelegations, denoms) - for _, denom = range denoms { - req, err := querier.TotalDelegationByValidatorForAsset(sdk.WrapSDKContext(ctx), &types.QueryTotalDelegationByValidatorForAssetRequest{Denom: denom}) + for _, denom := range denoms { + req, err := querier.TotalDelegationByValidatorForDenom(sdk.WrapSDKContext(ctx), &types.QueryTotalDelegationByValidatorForDenomRequest{Denom: denom}) suite.Require().NoError(err) suite.Require().Equal(len(valAddrs), len(req.AssetResponse)) diff --git a/x/superfluid/types/query.pb.go b/x/superfluid/types/query.pb.go index 3e9cf7142c7..872f9149065 100644 --- a/x/superfluid/types/query.pb.go +++ b/x/superfluid/types/query.pb.go @@ -624,26 +624,26 @@ func (m *ConnectedIntermediaryAccountResponse) GetAccount() *SuperfluidIntermedi return nil } -type QueryTotalDelegationByValidatorForAssetRequest struct { +type QueryTotalDelegationByValidatorForDenomRequest struct { Denom string `protobuf:"bytes,1,opt,name=denom,proto3" json:"denom,omitempty"` } -func (m *QueryTotalDelegationByValidatorForAssetRequest) Reset() { - *m = QueryTotalDelegationByValidatorForAssetRequest{} +func (m *QueryTotalDelegationByValidatorForDenomRequest) Reset() { + *m = QueryTotalDelegationByValidatorForDenomRequest{} } -func (m *QueryTotalDelegationByValidatorForAssetRequest) String() string { +func (m *QueryTotalDelegationByValidatorForDenomRequest) String() string { return proto.CompactTextString(m) } -func (*QueryTotalDelegationByValidatorForAssetRequest) ProtoMessage() {} -func (*QueryTotalDelegationByValidatorForAssetRequest) Descriptor() ([]byte, []int) { +func (*QueryTotalDelegationByValidatorForDenomRequest) ProtoMessage() {} +func (*QueryTotalDelegationByValidatorForDenomRequest) Descriptor() ([]byte, []int) { return fileDescriptor_e3d9448e4ed3943f, []int{13} } -func (m *QueryTotalDelegationByValidatorForAssetRequest) XXX_Unmarshal(b []byte) error { +func (m *QueryTotalDelegationByValidatorForDenomRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *QueryTotalDelegationByValidatorForAssetRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *QueryTotalDelegationByValidatorForDenomRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_QueryTotalDelegationByValidatorForAssetRequest.Marshal(b, m, deterministic) + return xxx_messageInfo_QueryTotalDelegationByValidatorForDenomRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -653,45 +653,45 @@ func (m *QueryTotalDelegationByValidatorForAssetRequest) XXX_Marshal(b []byte, d return b[:n], nil } } -func (m *QueryTotalDelegationByValidatorForAssetRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryTotalDelegationByValidatorForAssetRequest.Merge(m, src) +func (m *QueryTotalDelegationByValidatorForDenomRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryTotalDelegationByValidatorForDenomRequest.Merge(m, src) } -func (m *QueryTotalDelegationByValidatorForAssetRequest) XXX_Size() int { +func (m *QueryTotalDelegationByValidatorForDenomRequest) XXX_Size() int { return m.Size() } -func (m *QueryTotalDelegationByValidatorForAssetRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueryTotalDelegationByValidatorForAssetRequest.DiscardUnknown(m) +func (m *QueryTotalDelegationByValidatorForDenomRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryTotalDelegationByValidatorForDenomRequest.DiscardUnknown(m) } -var xxx_messageInfo_QueryTotalDelegationByValidatorForAssetRequest proto.InternalMessageInfo +var xxx_messageInfo_QueryTotalDelegationByValidatorForDenomRequest proto.InternalMessageInfo -func (m *QueryTotalDelegationByValidatorForAssetRequest) GetDenom() string { +func (m *QueryTotalDelegationByValidatorForDenomRequest) GetDenom() string { if m != nil { return m.Denom } return "" } -type QueryTotalDelegationByValidatorForAssetResponse struct { +type QueryTotalDelegationByValidatorForDenomResponse struct { AssetResponse []*Delegations `protobuf:"bytes,1,rep,name=asset_response,json=assetResponse,proto3" json:"asset_response,omitempty"` } -func (m *QueryTotalDelegationByValidatorForAssetResponse) Reset() { - *m = QueryTotalDelegationByValidatorForAssetResponse{} +func (m *QueryTotalDelegationByValidatorForDenomResponse) Reset() { + *m = QueryTotalDelegationByValidatorForDenomResponse{} } -func (m *QueryTotalDelegationByValidatorForAssetResponse) String() string { +func (m *QueryTotalDelegationByValidatorForDenomResponse) String() string { return proto.CompactTextString(m) } -func (*QueryTotalDelegationByValidatorForAssetResponse) ProtoMessage() {} -func (*QueryTotalDelegationByValidatorForAssetResponse) Descriptor() ([]byte, []int) { +func (*QueryTotalDelegationByValidatorForDenomResponse) ProtoMessage() {} +func (*QueryTotalDelegationByValidatorForDenomResponse) Descriptor() ([]byte, []int) { return fileDescriptor_e3d9448e4ed3943f, []int{14} } -func (m *QueryTotalDelegationByValidatorForAssetResponse) XXX_Unmarshal(b []byte) error { +func (m *QueryTotalDelegationByValidatorForDenomResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *QueryTotalDelegationByValidatorForAssetResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *QueryTotalDelegationByValidatorForDenomResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_QueryTotalDelegationByValidatorForAssetResponse.Marshal(b, m, deterministic) + return xxx_messageInfo_QueryTotalDelegationByValidatorForDenomResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -701,19 +701,19 @@ func (m *QueryTotalDelegationByValidatorForAssetResponse) XXX_Marshal(b []byte, return b[:n], nil } } -func (m *QueryTotalDelegationByValidatorForAssetResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryTotalDelegationByValidatorForAssetResponse.Merge(m, src) +func (m *QueryTotalDelegationByValidatorForDenomResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryTotalDelegationByValidatorForDenomResponse.Merge(m, src) } -func (m *QueryTotalDelegationByValidatorForAssetResponse) XXX_Size() int { +func (m *QueryTotalDelegationByValidatorForDenomResponse) XXX_Size() int { return m.Size() } -func (m *QueryTotalDelegationByValidatorForAssetResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryTotalDelegationByValidatorForAssetResponse.DiscardUnknown(m) +func (m *QueryTotalDelegationByValidatorForDenomResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryTotalDelegationByValidatorForDenomResponse.DiscardUnknown(m) } -var xxx_messageInfo_QueryTotalDelegationByValidatorForAssetResponse proto.InternalMessageInfo +var xxx_messageInfo_QueryTotalDelegationByValidatorForDenomResponse proto.InternalMessageInfo -func (m *QueryTotalDelegationByValidatorForAssetResponse) GetAssetResponse() []*Delegations { +func (m *QueryTotalDelegationByValidatorForDenomResponse) GetAssetResponse() []*Delegations { if m != nil { return m.AssetResponse } @@ -1509,8 +1509,8 @@ func init() { proto.RegisterType((*AllIntermediaryAccountsResponse)(nil), "osmosis.superfluid.AllIntermediaryAccountsResponse") proto.RegisterType((*ConnectedIntermediaryAccountRequest)(nil), "osmosis.superfluid.ConnectedIntermediaryAccountRequest") proto.RegisterType((*ConnectedIntermediaryAccountResponse)(nil), "osmosis.superfluid.ConnectedIntermediaryAccountResponse") - proto.RegisterType((*QueryTotalDelegationByValidatorForAssetRequest)(nil), "osmosis.superfluid.QueryTotalDelegationByValidatorForAssetRequest") - proto.RegisterType((*QueryTotalDelegationByValidatorForAssetResponse)(nil), "osmosis.superfluid.QueryTotalDelegationByValidatorForAssetResponse") + proto.RegisterType((*QueryTotalDelegationByValidatorForDenomRequest)(nil), "osmosis.superfluid.QueryTotalDelegationByValidatorForDenomRequest") + proto.RegisterType((*QueryTotalDelegationByValidatorForDenomResponse)(nil), "osmosis.superfluid.QueryTotalDelegationByValidatorForDenomResponse") proto.RegisterType((*Delegations)(nil), "osmosis.superfluid.Delegations") proto.RegisterType((*TotalSuperfluidDelegationsRequest)(nil), "osmosis.superfluid.TotalSuperfluidDelegationsRequest") proto.RegisterType((*TotalSuperfluidDelegationsResponse)(nil), "osmosis.superfluid.TotalSuperfluidDelegationsResponse") @@ -1531,7 +1531,7 @@ func init() { func init() { proto.RegisterFile("osmosis/superfluid/query.proto", fileDescriptor_e3d9448e4ed3943f) } var fileDescriptor_e3d9448e4ed3943f = []byte{ - // 1784 bytes of a gzipped FileDescriptorProto + // 1783 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x59, 0x4d, 0x6c, 0x14, 0xe5, 0x1b, 0xef, 0xb4, 0xa5, 0x85, 0xa7, 0xf9, 0x97, 0xf6, 0x85, 0x3f, 0x2d, 0x03, 0x6c, 0x61, 0x5a, 0xda, 0x5a, 0x60, 0xc6, 0x16, 0x81, 0x0a, 0x42, 0xd8, 0xa5, 0x14, 0x1b, 0x5b, 0x8b, 0x5b, 0x5a, @@ -1575,75 +1575,75 @@ var fileDescriptor_e3d9448e4ed3943f = []byte{ 0x1b, 0x80, 0x6e, 0xb7, 0xb5, 0xb8, 0xa1, 0xe0, 0x48, 0x28, 0xba, 0xdc, 0xc7, 0x39, 0x55, 0x78, 0x17, 0x46, 0x92, 0xf9, 0x99, 0x27, 0x16, 0xa1, 0x9b, 0x19, 0xcf, 0x5c, 0xde, 0x9a, 0x23, 0xf2, 0x9e, 0x14, 0x61, 0x16, 0x44, 0xd2, 0x76, 0xae, 0x58, 0x8e, 0x62, 0xcc, 0x68, 0x86, 0x56, 0x24, - 0x80, 0x72, 0xd5, 0x15, 0xc5, 0xd0, 0x55, 0xc5, 0xb1, 0xec, 0x59, 0xcb, 0x26, 0x35, 0x92, 0x5c, - 0x4a, 0x55, 0x90, 0x52, 0xcb, 0xf1, 0x3b, 0x4c, 0x2f, 0xed, 0x30, 0x36, 0x7b, 0xc3, 0x62, 0x3b, - 0x14, 0x05, 0x29, 0x10, 0x89, 0xf3, 0xff, 0x53, 0xc2, 0x72, 0x84, 0xef, 0x38, 0xe8, 0x09, 0x1d, - 0xd7, 0xd4, 0x02, 0x57, 0x5b, 0x0b, 0xaf, 0x41, 0x8f, 0x52, 0x72, 0x71, 0xcb, 0x78, 0x0d, 0xab, - 0xb4, 0x52, 0x72, 0x13, 0xbf, 0x3c, 0x18, 0x1a, 0x2d, 0xea, 0xce, 0xb5, 0xca, 0xaa, 0x58, 0xb0, - 0x4a, 0x12, 0x6b, 0xe2, 0xf4, 0xcf, 0x31, 0xac, 0xae, 0x4b, 0x6e, 0x0b, 0xc4, 0xe2, 0x9c, 0xe9, - 0xe4, 0x81, 0xb2, 0x2f, 0xad, 0x61, 0x15, 0x2d, 0xc1, 0xce, 0x2d, 0x1d, 0x82, 0xd4, 0x57, 0x73, - 0x02, 0x7b, 0x6b, 0xdb, 0x81, 0x30, 0x0c, 0x87, 0x88, 0x0b, 0x83, 0x10, 0x86, 0x91, 0xb3, 0xfe, - 0x79, 0x97, 0x03, 0x21, 0x89, 0x8a, 0x39, 0xf8, 0x16, 0x07, 0xfd, 0x8e, 0x4b, 0x26, 0xab, 0xc1, - 0x29, 0x75, 0x49, 0x6e, 0xd9,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, 0xc4, 0xd2, 0x8d, 0xba, - 0x6f, 0xac, 0x9b, 0xe8, 0x56, 0x7b, 0x78, 0x17, 0x11, 0x37, 0x7d, 0xa1, 0xb3, 0xc9, 0x46, 0x37, - 0x18, 0x13, 0xf9, 0x73, 0xad, 0xb2, 0x33, 0xd4, 0xef, 0x10, 0xd4, 0x57, 0xd1, 0x72, 0x4a, 0xd4, - 0x95, 0xb0, 0x40, 0x79, 0xb5, 0x2a, 0xfb, 0xc8, 0x23, 0x9d, 0xf0, 0x37, 0x07, 0x87, 0x53, 0x8d, - 0x24, 0xe8, 0x7c, 0x13, 0xc1, 0x8b, 0x1c, 0x0b, 0xf8, 0xec, 0x13, 0x48, 0x60, 0xde, 0x58, 0x20, - 0xde, 0xb8, 0x84, 0x2e, 0x36, 0x9f, 0x03, 0xae, 0x2f, 0x82, 0xa9, 0x84, 0xae, 0xef, 0xbf, 0x68, - 0x87, 0xc9, 0xa6, 0xa7, 0x0c, 0x34, 0x1f, 0x85, 0xa3, 0xd5, 0x61, 0x89, 0x5f, 0x78, 0x4a, 0xd2, - 0x98, 0x87, 0xde, 0x26, 0x1e, 0x5a, 0x41, 0x57, 0x92, 0x3c, 0xa4, 0x31, 0xf1, 0x72, 0x52, 0x43, - 0x88, 0x72, 0xd8, 0xef, 0x5e, 0x07, 0x8f, 0x9c, 0x3d, 0xd0, 0xe9, 0xf4, 0xf7, 0x44, 0x5d, 0xa1, - 0x9c, 0x69, 0x89, 0x97, 0xa1, 0x5e, 0x26, 0xa8, 0x17, 0xd1, 0x42, 0x12, 0xea, 0xad, 0x3b, 0xd9, - 0x86, 0xd5, 0x91, 0xbb, 0x7c, 0xef, 0x51, 0x86, 0xbb, 0xff, 0x28, 0xc3, 0xfd, 0xfa, 0x28, 0xc3, - 0x7d, 0xf2, 0x38, 0xd3, 0x76, 0xff, 0x71, 0xa6, 0xed, 0xe7, 0xc7, 0x99, 0xb6, 0x37, 0x4f, 0x86, - 0xbe, 0xd9, 0x99, 0xca, 0x63, 0x86, 0xb2, 0x8a, 0x7d, 0xfd, 0x9b, 0x93, 0x53, 0xd2, 0xf5, 0xb0, - 0x15, 0xe4, 0x3b, 0x7e, 0xb5, 0x8b, 0xfc, 0x2f, 0xf2, 0xf8, 0x3f, 0x01, 0x00, 0x00, 0xff, 0xff, - 0x3a, 0x12, 0x96, 0xd9, 0x09, 0x1e, 0x00, 0x00, + 0x80, 0x72, 0xd5, 0x15, 0xc5, 0xd0, 0x55, 0xc5, 0xb1, 0xec, 0x59, 0xcb, 0x9e, 0x71, 0x73, 0x2c, + 0xb9, 0x94, 0xaa, 0x20, 0xa5, 0x96, 0xe3, 0x77, 0x98, 0x5e, 0xda, 0x61, 0x6c, 0xf6, 0x86, 0xc5, + 0x76, 0x28, 0x0a, 0x52, 0x20, 0x12, 0xe7, 0xff, 0x47, 0xd8, 0x3c, 0x39, 0xc2, 0x77, 0x1c, 0xf4, + 0x84, 0x8e, 0x6b, 0x6a, 0x81, 0xab, 0xad, 0x85, 0xd7, 0xa0, 0x47, 0x29, 0xb9, 0xb8, 0x65, 0xbc, + 0x86, 0x55, 0x5a, 0x29, 0xb9, 0x89, 0x5f, 0x1e, 0x0c, 0x8d, 0x16, 0x75, 0xe7, 0x5a, 0x65, 0x55, + 0x2c, 0x58, 0x25, 0x89, 0x35, 0x71, 0xfa, 0xe7, 0x18, 0x56, 0xd7, 0x25, 0xb7, 0x05, 0x62, 0x71, + 0xce, 0x74, 0xf2, 0x40, 0xd9, 0x97, 0xd6, 0xb0, 0x8a, 0x96, 0x60, 0xe7, 0x96, 0x0e, 0x41, 0xea, + 0xab, 0x39, 0x81, 0xbd, 0xb5, 0xed, 0x40, 0x18, 0x86, 0x43, 0xc4, 0x85, 0x41, 0x08, 0xc3, 0xc8, + 0x59, 0xff, 0xbc, 0xcb, 0x81, 0x90, 0x44, 0xc5, 0x1c, 0x7c, 0x8b, 0x83, 0x7e, 0xc7, 0x25, 0x93, + 0xd5, 0xe0, 0x94, 0xba, 0x24, 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0x2a, 0xf6, 0xf5, 0x6f, 0x4e, 0x4e, 0x49, 0xd7, 0xc3, 0x56, + 0x90, 0xef, 0xf8, 0xd5, 0x2e, 0xf2, 0xbf, 0xc8, 0xe3, 0xff, 0x04, 0x00, 0x00, 0xff, 0xff, 0xbf, + 0xdf, 0xa4, 0x71, 0x09, 0x1e, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1671,7 +1671,7 @@ type QueryClient interface { AllIntermediaryAccounts(ctx context.Context, in *AllIntermediaryAccountsRequest, opts ...grpc.CallOption) (*AllIntermediaryAccountsResponse, error) // Returns intermediary account connected to a superfluid staked lock by id ConnectedIntermediaryAccount(ctx context.Context, in *ConnectedIntermediaryAccountRequest, opts ...grpc.CallOption) (*ConnectedIntermediaryAccountResponse, error) - TotalDelegationByValidatorForAsset(ctx context.Context, in *QueryTotalDelegationByValidatorForAssetRequest, opts ...grpc.CallOption) (*QueryTotalDelegationByValidatorForAssetResponse, error) + TotalDelegationByValidatorForDenom(ctx context.Context, in *QueryTotalDelegationByValidatorForDenomRequest, opts ...grpc.CallOption) (*QueryTotalDelegationByValidatorForDenomResponse, error) // Returns the total amount of osmo superfluidly staked. // Response is denominated in uosmo. TotalSuperfluidDelegations(ctx context.Context, in *TotalSuperfluidDelegationsRequest, opts ...grpc.CallOption) (*TotalSuperfluidDelegationsResponse, error) @@ -1755,9 +1755,9 @@ func (c *queryClient) ConnectedIntermediaryAccount(ctx context.Context, in *Conn return out, nil } -func (c *queryClient) TotalDelegationByValidatorForAsset(ctx context.Context, in *QueryTotalDelegationByValidatorForAssetRequest, opts ...grpc.CallOption) (*QueryTotalDelegationByValidatorForAssetResponse, error) { - out := new(QueryTotalDelegationByValidatorForAssetResponse) - err := c.cc.Invoke(ctx, "/osmosis.superfluid.Query/TotalDelegationByValidatorForAsset", in, out, opts...) +func (c *queryClient) TotalDelegationByValidatorForDenom(ctx context.Context, in *QueryTotalDelegationByValidatorForDenomRequest, opts ...grpc.CallOption) (*QueryTotalDelegationByValidatorForDenomResponse, error) { + out := new(QueryTotalDelegationByValidatorForDenomResponse) + err := c.cc.Invoke(ctx, "/osmosis.superfluid.Query/TotalDelegationByValidatorForDenom", in, out, opts...) if err != nil { return nil, err } @@ -1842,7 +1842,7 @@ type QueryServer interface { AllIntermediaryAccounts(context.Context, *AllIntermediaryAccountsRequest) (*AllIntermediaryAccountsResponse, error) // Returns intermediary account connected to a superfluid staked lock by id ConnectedIntermediaryAccount(context.Context, *ConnectedIntermediaryAccountRequest) (*ConnectedIntermediaryAccountResponse, error) - TotalDelegationByValidatorForAsset(context.Context, *QueryTotalDelegationByValidatorForAssetRequest) (*QueryTotalDelegationByValidatorForAssetResponse, error) + TotalDelegationByValidatorForDenom(context.Context, *QueryTotalDelegationByValidatorForDenomRequest) (*QueryTotalDelegationByValidatorForDenomResponse, error) // Returns the total amount of osmo superfluidly staked. // Response is denominated in uosmo. TotalSuperfluidDelegations(context.Context, *TotalSuperfluidDelegationsRequest) (*TotalSuperfluidDelegationsResponse, error) @@ -1886,8 +1886,8 @@ func (*UnimplementedQueryServer) AllIntermediaryAccounts(ctx context.Context, re func (*UnimplementedQueryServer) ConnectedIntermediaryAccount(ctx context.Context, req *ConnectedIntermediaryAccountRequest) (*ConnectedIntermediaryAccountResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ConnectedIntermediaryAccount not implemented") } -func (*UnimplementedQueryServer) TotalDelegationByValidatorForAsset(ctx context.Context, req *QueryTotalDelegationByValidatorForAssetRequest) (*QueryTotalDelegationByValidatorForAssetResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method TotalDelegationByValidatorForAsset not implemented") +func (*UnimplementedQueryServer) TotalDelegationByValidatorForDenom(ctx context.Context, req *QueryTotalDelegationByValidatorForDenomRequest) (*QueryTotalDelegationByValidatorForDenomResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method TotalDelegationByValidatorForDenom not implemented") } func (*UnimplementedQueryServer) TotalSuperfluidDelegations(ctx context.Context, req *TotalSuperfluidDelegationsRequest) (*TotalSuperfluidDelegationsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method TotalSuperfluidDelegations not implemented") @@ -2023,20 +2023,20 @@ func _Query_ConnectedIntermediaryAccount_Handler(srv interface{}, ctx context.Co return interceptor(ctx, in, info, handler) } -func _Query_TotalDelegationByValidatorForAsset_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryTotalDelegationByValidatorForAssetRequest) +func _Query_TotalDelegationByValidatorForDenom_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryTotalDelegationByValidatorForDenomRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(QueryServer).TotalDelegationByValidatorForAsset(ctx, in) + return srv.(QueryServer).TotalDelegationByValidatorForDenom(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/osmosis.superfluid.Query/TotalDelegationByValidatorForAsset", + FullMethod: "/osmosis.superfluid.Query/TotalDelegationByValidatorForDenom", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).TotalDelegationByValidatorForAsset(ctx, req.(*QueryTotalDelegationByValidatorForAssetRequest)) + return srv.(QueryServer).TotalDelegationByValidatorForDenom(ctx, req.(*QueryTotalDelegationByValidatorForDenomRequest)) } return interceptor(ctx, in, info, handler) } @@ -2196,8 +2196,8 @@ var _Query_serviceDesc = grpc.ServiceDesc{ Handler: _Query_ConnectedIntermediaryAccount_Handler, }, { - MethodName: "TotalDelegationByValidatorForAsset", - Handler: _Query_TotalDelegationByValidatorForAsset_Handler, + MethodName: "TotalDelegationByValidatorForDenom", + Handler: _Query_TotalDelegationByValidatorForDenom_Handler, }, { MethodName: "TotalSuperfluidDelegations", @@ -2667,7 +2667,7 @@ func (m *ConnectedIntermediaryAccountResponse) MarshalToSizedBuffer(dAtA []byte) return len(dAtA) - i, nil } -func (m *QueryTotalDelegationByValidatorForAssetRequest) Marshal() (dAtA []byte, err error) { +func (m *QueryTotalDelegationByValidatorForDenomRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -2677,12 +2677,12 @@ func (m *QueryTotalDelegationByValidatorForAssetRequest) Marshal() (dAtA []byte, return dAtA[:n], nil } -func (m *QueryTotalDelegationByValidatorForAssetRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryTotalDelegationByValidatorForDenomRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryTotalDelegationByValidatorForAssetRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryTotalDelegationByValidatorForDenomRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -2697,7 +2697,7 @@ func (m *QueryTotalDelegationByValidatorForAssetRequest) MarshalToSizedBuffer(dA return len(dAtA) - i, nil } -func (m *QueryTotalDelegationByValidatorForAssetResponse) Marshal() (dAtA []byte, err error) { +func (m *QueryTotalDelegationByValidatorForDenomResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -2707,12 +2707,12 @@ func (m *QueryTotalDelegationByValidatorForAssetResponse) Marshal() (dAtA []byte return dAtA[:n], nil } -func (m *QueryTotalDelegationByValidatorForAssetResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryTotalDelegationByValidatorForDenomResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryTotalDelegationByValidatorForAssetResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryTotalDelegationByValidatorForDenomResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -3558,7 +3558,7 @@ func (m *ConnectedIntermediaryAccountResponse) Size() (n int) { return n } -func (m *QueryTotalDelegationByValidatorForAssetRequest) Size() (n int) { +func (m *QueryTotalDelegationByValidatorForDenomRequest) Size() (n int) { if m == nil { return 0 } @@ -3571,7 +3571,7 @@ func (m *QueryTotalDelegationByValidatorForAssetRequest) Size() (n int) { return n } -func (m *QueryTotalDelegationByValidatorForAssetResponse) Size() (n int) { +func (m *QueryTotalDelegationByValidatorForDenomResponse) Size() (n int) { if m == nil { return 0 } @@ -4967,7 +4967,7 @@ func (m *ConnectedIntermediaryAccountResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryTotalDelegationByValidatorForAssetRequest) Unmarshal(dAtA []byte) error { +func (m *QueryTotalDelegationByValidatorForDenomRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4990,10 +4990,10 @@ func (m *QueryTotalDelegationByValidatorForAssetRequest) Unmarshal(dAtA []byte) fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryTotalDelegationByValidatorForAssetRequest: wiretype end group for non-group") + return fmt.Errorf("proto: QueryTotalDelegationByValidatorForDenomRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryTotalDelegationByValidatorForAssetRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryTotalDelegationByValidatorForDenomRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -5049,7 +5049,7 @@ func (m *QueryTotalDelegationByValidatorForAssetRequest) Unmarshal(dAtA []byte) } return nil } -func (m *QueryTotalDelegationByValidatorForAssetResponse) Unmarshal(dAtA []byte) error { +func (m *QueryTotalDelegationByValidatorForDenomResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -5072,10 +5072,10 @@ func (m *QueryTotalDelegationByValidatorForAssetResponse) Unmarshal(dAtA []byte) fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryTotalDelegationByValidatorForAssetResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QueryTotalDelegationByValidatorForDenomResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryTotalDelegationByValidatorForAssetResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryTotalDelegationByValidatorForDenomResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: From 4494cccf9eb52bb7090b40ba0460fb5402b34a8b Mon Sep 17 00:00:00 2001 From: Ruslan Akhtariev Date: Tue, 4 Oct 2022 16:36:11 +0700 Subject: [PATCH 05/59] save --- go.mod | 2 +- proto/osmosis/superfluid/query.proto | 2 +- x/superfluid/keeper/grpc_query.go | 15 +- x/superfluid/types/expected_keepers.go | 1 + x/superfluid/types/query.pb.go | 230 ++++++++++++------------- 5 files changed, 132 insertions(+), 118 deletions(-) diff --git a/go.mod b/go.mod index 88ee9178ce2..fab6a0575f3 100644 --- a/go.mod +++ b/go.mod @@ -5,7 +5,7 @@ go 1.18 require ( github.com/CosmWasm/wasmd v0.28.0-osmo-v12 github.com/cosmos/cosmos-proto v1.0.0-alpha7 - github.com/cosmos/cosmos-sdk v0.46.1 + github.com/cosmos/cosmos-sdk v0.46.2 github.com/cosmos/go-bip39 v1.0.0 github.com/cosmos/iavl v0.19.1 github.com/cosmos/ibc-go/v3 v3.3.0 diff --git a/proto/osmosis/superfluid/query.proto b/proto/osmosis/superfluid/query.proto index f57be312711..1cc99f58a3b 100644 --- a/proto/osmosis/superfluid/query.proto +++ b/proto/osmosis/superfluid/query.proto @@ -165,7 +165,7 @@ message QueryTotalDelegationByValidatorForDenomResponse { message Delegations { string val_addr = 1; string amount_sfsd = 2 - [ (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int" ]; + [ (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec" ]; string osmo_equivalent = 3 [ (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int" ]; } diff --git a/x/superfluid/keeper/grpc_query.go b/x/superfluid/keeper/grpc_query.go index d8c4672d96b..ec258f085c3 100644 --- a/x/superfluid/keeper/grpc_query.go +++ b/x/superfluid/keeper/grpc_query.go @@ -2,6 +2,7 @@ package keeper import ( "context" + "fmt" "strings" "time" @@ -399,6 +400,7 @@ func (q Querier) TotalDelegationByValidatorForDenom(goCtx context.Context, req * var intermediaryAccount types.SuperfluidIntermediaryAccount intermediaryAccounts := q.Keeper.GetAllIntermediaryAccounts(ctx) + fmt.Println("intermediaryAccounts", intermediaryAccounts) for _, intermediaryAccount = range intermediaryAccounts { if intermediaryAccount.Denom != req.Denom { continue @@ -412,10 +414,21 @@ func (q Querier) TotalDelegationByValidatorForDenom(goCtx context.Context, req * if !found { return nil, stakingtypes.ErrNoValidatorFound } + + delegations := q.Keeper.sk.GetValidatorDelegations(ctx, valAddr) + shares := sdk.ZeroDec() + for _, delegation := range delegations { + // addr := sdk.MustAccAddressFromBech32(delegation.DelegatorAddress) + // fmt.Println("addr", addr, delegation.DelegatorAddress) + // sfsDelegation, err := q.SuperfluidUndelegationsByDelegator(goCtx, &types.SuperfluidUndelegationsByDelegatorRequest{DelegatorAddress: addr.String()}) + // fmt.Println("sfsDelegation", sfsDelegation, err) + shares = shares.Add(delegation.Shares) + } + fmt.Println("val tokens", val.Tokens, shares) equivalentAmountOSMO := q.Keeper.GetSuperfluidOSMOTokens(ctx, req.Denom, val.DelegatorShares.RoundInt()) result := &types.Delegations{ ValAddr: valAddr.String(), - AmountSfsd: &val.Tokens, + AmountSfsd: &shares, OsmoEquivalent: &equivalentAmountOSMO, } diff --git a/x/superfluid/types/expected_keepers.go b/x/superfluid/types/expected_keepers.go index e7473328617..04f9a6e1a7b 100644 --- a/x/superfluid/types/expected_keepers.go +++ b/x/superfluid/types/expected_keepers.go @@ -69,6 +69,7 @@ type StakingKeeper interface { GetDelegation(ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) (delegation stakingtypes.Delegation, found bool) UnbondingTime(ctx sdk.Context) time.Duration GetParams(ctx sdk.Context) stakingtypes.Params + GetValidatorDelegations(ctx sdk.Context, valAddr sdk.ValAddress) (delegations []stakingtypes.Delegation) IterateBondedValidatorsByPower(ctx sdk.Context, fn func(int64, stakingtypes.ValidatorI) bool) TotalBondedTokens(ctx sdk.Context) sdk.Int diff --git a/x/superfluid/types/query.pb.go b/x/superfluid/types/query.pb.go index 872f9149065..d4a94c53761 100644 --- a/x/superfluid/types/query.pb.go +++ b/x/superfluid/types/query.pb.go @@ -722,7 +722,7 @@ func (m *QueryTotalDelegationByValidatorForDenomResponse) GetAssetResponse() []* type Delegations struct { ValAddr string `protobuf:"bytes,1,opt,name=val_addr,json=valAddr,proto3" json:"val_addr,omitempty"` - AmountSfsd *github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,2,opt,name=amount_sfsd,json=amountSfsd,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"amount_sfsd,omitempty"` + AmountSfsd *github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,2,opt,name=amount_sfsd,json=amountSfsd,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"amount_sfsd,omitempty"` OsmoEquivalent *github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,3,opt,name=osmo_equivalent,json=osmoEquivalent,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"osmo_equivalent,omitempty"` } @@ -1531,119 +1531,119 @@ func init() { func init() { proto.RegisterFile("osmosis/superfluid/query.proto", fileDescriptor_e3d9448e4ed3943f) } var fileDescriptor_e3d9448e4ed3943f = []byte{ - // 1783 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x59, 0x4d, 0x6c, 0x14, 0xe5, - 0x1b, 0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, 0x2f, - 0x6b, 0x18, 0xe4, 0xc8, 0xc7, 0xba, 0x02, 0xfd, 0xa1, 0x77, 0x4c, 0x61, 0x16, 0xba, 0x08, 0x97, - 0x8b, 0xb4, 0x63, 0xbc, 0x67, 0x6a, 0x38, 0x85, 0x32, 0x0f, 0x32, 0x65, 0x14, 0x44, 0xd8, 0x43, - 0x5e, 0x2f, 0x54, 0x0c, 0x47, 0x2f, 0x1b, 0xba, 0x66, 0x27, 0x03, 0xff, 0x88, 0x83, 0x81, 0x3a, - 0x06, 0x66, 0x4e, 0x19, 0x78, 0x57, 0xbf, 0xac, 0x6d, 0x54, 0xf4, 0x4d, 0xc5, 0xd0, 0x4c, 0x47, - 0x2e, 0xf9, 0x54, 0x2c, 0x18, 0x53, 0x51, 0x26, 0x2e, 0xe2, 0x92, 0x75, 0xd1, 0x67, 0x0a, 0x4b, - 0x2e, 0x58, 0xb6, 0x9a, 0x1f, 0xb4, 0x62, 0xce, 0x85, 0xdb, 0x1c, 0x1c, 0x0a, 0xf0, 0xcd, 0x99, - 0x8e, 0x66, 0x97, 0x34, 0x55, 0x57, 0xec, 0x6a, 0xb6, 0x50, 0xb0, 0x2a, 0xa6, 0x33, 0x67, 0xae, - 0x59, 0xd1, 0x48, 0xd0, 0x5e, 0xd8, 0xbe, 0xa9, 0x18, 0xb2, 0xa2, 0xaa, 0xf6, 0x60, 0x3b, 0x39, - 0xe8, 0xde, 0x54, 0x8c, 0xac, 0xaa, 0xda, 0xee, 0x51, 0x51, 0xa9, 0x14, 0x35, 0x59, 0x57, 0x07, - 0x3b, 0x0e, 0x72, 0xe3, 0x9d, 0xf9, 0x6e, 0xf2, 0x3c, 0xa7, 0xa2, 0x41, 0xe8, 0x76, 0x39, 0x34, - 0x8c, 0x07, 0x3b, 0x29, 0x13, 0x7b, 0x14, 0xae, 0x41, 0x26, 0x6b, 0x18, 0x11, 0x36, 0x78, 0x31, - 0x74, 0xf3, 0x23, 0xc8, 0x7f, 0xe6, 0x8f, 0x51, 0x91, 0x16, 0x80, 0xe8, 0x16, 0x8b, 0x48, 0xfb, - 0x09, 0xab, 0x01, 0xf1, 0xb2, 0x52, 0xf4, 0xd2, 0x30, 0x1f, 0xe2, 0x14, 0xbe, 0xe5, 0x60, 0x28, - 0x56, 0x15, 0x8b, 0xc5, 0x55, 0xd8, 0xae, 0xb0, 0x77, 0x2c, 0x39, 0x4e, 0x24, 0x27, 0x47, 0x8c, - 0xf3, 0x58, 0xba, 0xf8, 0xc2, 0xd0, 0xa5, 0x1a, 0x10, 0xed, 0x04, 0xc4, 0x58, 0x43, 0x10, 0xd4, - 0xaa, 0x1a, 0x14, 0xe7, 0x60, 0xf8, 0x82, 0x65, 0x9a, 0x5a, 0xc1, 0xd1, 0xa2, 0x94, 0x7b, 0x4e, - 0x1b, 0x80, 0x6e, 0xb7, 0xb5, 0xb8, 0xa1, 0xe0, 0x48, 0x28, 0xba, 0xdc, 0xc7, 0x39, 0x55, 0x78, - 0x17, 0x46, 0x92, 0xf9, 0x99, 0x27, 0x16, 0xa1, 0x9b, 0x19, 0xcf, 0x5c, 0xde, 0x9a, 0x23, 0xf2, - 0x9e, 0x14, 0x61, 0x16, 0x44, 0xd2, 0x76, 0xae, 0x58, 0x8e, 0x62, 0xcc, 0x68, 0x86, 0x56, 0x24, - 0x80, 0x72, 0xd5, 0x15, 0xc5, 0xd0, 0x55, 0xc5, 0xb1, 0xec, 0x59, 0xcb, 0x9e, 0x71, 0x73, 0x2c, - 0xb9, 0x94, 0xaa, 0x20, 0xa5, 0x96, 0xe3, 0x77, 0x98, 0x5e, 0xda, 0x61, 0x6c, 0xf6, 0x86, 0xc5, - 0x76, 0x28, 0x0a, 0x52, 0x20, 0x12, 0xe7, 0xff, 0x47, 0xd8, 0x3c, 0x39, 0xc2, 0x77, 0x1c, 0xf4, - 0x84, 0x8e, 0x6b, 0x6a, 0x81, 0xab, 0xad, 0x85, 0xd7, 0xa0, 0x47, 0x29, 0xb9, 0xb8, 0x65, 0xbc, - 0x86, 0x55, 0x5a, 0x29, 0xb9, 0x89, 0x5f, 0x1e, 0x0c, 0x8d, 0x16, 0x75, 0xe7, 0x5a, 0x65, 0x55, - 0x2c, 0x58, 0x25, 0x89, 0x35, 0x71, 0xfa, 0xe7, 0x18, 0x56, 0xd7, 0x25, 0xb7, 0x05, 0x62, 0x71, - 0xce, 0x74, 0xf2, 0x40, 0xd9, 0x97, 0xd6, 0xb0, 0x8a, 0x96, 0x60, 0xe7, 0x96, 0x0e, 0x41, 0xea, - 0xab, 0x39, 0x81, 0xbd, 0xb5, 0xed, 0x40, 0x18, 0x86, 0x43, 0xc4, 0x85, 0x41, 0x08, 0xc3, 0xc8, - 0x59, 0xff, 0xbc, 0xcb, 0x81, 0x90, 0x44, 0xc5, 0x1c, 0x7c, 0x8b, 0x83, 0x7e, 0xc7, 0x25, 0x93, - 0xd5, 0xe0, 0x94, 0xba, 0x24, 0xb7, 0xec, 0x56, 0x42, 0x7a, 0x3b, 0xff, 0x7c, 0x30, 0x34, 0x5c, - 0x55, 0x4a, 0xc6, 0x69, 0x81, 0x0a, 0x0c, 0x22, 0x13, 0x96, 0x2d, 0xe4, 0xfb, 0x9c, 0xda, 0xf8, - 0x63, 0xe1, 0x4e, 0x4d, 0x57, 0x0b, 0x4e, 0xb2, 0xa5, 0x70, 0x61, 0x1c, 0x81, 0x7e, 0x26, 0xc7, - 0xb2, 0x65, 0xaf, 0x27, 0xd1, 0xe0, 0xf5, 0xf9, 0x07, 0x59, 0xfa, 0xde, 0x25, 0xde, 0xf4, 0xb2, - 0xca, 0x27, 0xa6, 0x5d, 0xaf, 0xcf, 0x3f, 0xf0, 0x88, 0xfd, 0x74, 0xed, 0x08, 0xa7, 0xeb, 0x6d, - 0x0e, 0x84, 0x24, 0xab, 0x98, 0x07, 0x0b, 0xd0, 0x45, 0x03, 0xce, 0x52, 0x73, 0x6f, 0x4d, 0x6f, - 0xf0, 0xba, 0xc2, 0x05, 0x4b, 0x37, 0x73, 0x2f, 0xba, 0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78, 0x68, 0x05, 0x5d, 0x49, 0xf2, 0x90, 0xc6, 0xc4, 0xcb, 0x49, 0x0d, 0x21, - 0xca, 0x61, 0xbf, 0x7b, 0x1d, 0x3c, 0x72, 0xf6, 0x40, 0xa7, 0xd3, 0xdf, 0x13, 0x75, 0x85, 0x72, - 0xa6, 0x25, 0x5e, 0x86, 0x7a, 0x99, 0xa0, 0x5e, 0x44, 0x0b, 0x49, 0xa8, 0xb7, 0xee, 0x64, 0x1b, - 0x56, 0x47, 0xee, 0xf2, 0xbd, 0x47, 0x19, 0xee, 0xfe, 0xa3, 0x0c, 0xf7, 0xeb, 0xa3, 0x0c, 0xf7, - 0xc9, 0xe3, 0x4c, 0xdb, 0xfd, 0xc7, 0x99, 0xb6, 0x9f, 0x1f, 0x67, 0xda, 0xde, 0x3c, 0x19, 0xfa, - 0x66, 0x67, 0x2a, 0x8f, 0x19, 0xca, 0x2a, 0xf6, 0xf5, 0x6f, 0x4e, 0x4e, 0x49, 0xd7, 0xc3, 0x56, - 0x90, 0xef, 0xf8, 0xd5, 0x2e, 0xf2, 0xbf, 0xc8, 0xe3, 0xff, 0x04, 0x00, 0x00, 0xff, 0xff, 0xbf, - 0xdf, 0xa4, 0x71, 0x09, 0x1e, 0x00, 0x00, + // 1789 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x59, 0x4f, 0x6c, 0xd4, 0x56, + 0x1a, 0x8f, 0x93, 0x90, 0xc0, 0x17, 0x6d, 0x48, 0x1e, 0x2c, 0x09, 0x06, 0x26, 0xe0, 0x84, 0x24, + 0x1b, 0xc0, 0xde, 0x84, 0x05, 0xb2, 0xb0, 0x20, 0x66, 0x08, 0x61, 0xa3, 0x4d, 0x36, 0xec, 0x84, + 0x04, 0x69, 0xff, 0xc8, 0x72, 0xc6, 0x2f, 0x83, 0x15, 0x8f, 0x3d, 0xf1, 0xf3, 0x64, 0x19, 0x21, +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 0x85, 0x72, 0x61, 0x47, 0xbc, 0x1c, 0xf5, 0x32, 0x45, 0xbd, 0x88, 0x16, + 0xd2, 0x50, 0x6f, 0xdd, 0xc9, 0xb6, 0xac, 0x8e, 0xc2, 0xf5, 0x47, 0xcf, 0x72, 0xc2, 0xe3, 0x67, + 0x39, 0xe1, 0xdb, 0x67, 0x39, 0xe1, 0x9d, 0xe7, 0xb9, 0xb6, 0xc7, 0xcf, 0x73, 0x6d, 0x5f, 0x3f, + 0xcf, 0xb5, 0xfd, 0xf3, 0x6c, 0xe4, 0x9b, 0x9d, 0xab, 0x3c, 0x65, 0x6a, 0xab, 0x24, 0xd0, 0xbf, + 0x39, 0x39, 0xa5, 0xdc, 0x8e, 0x5a, 0x41, 0xbf, 0xe3, 0x57, 0xbb, 0xe8, 0xff, 0x22, 0x4f, 0xff, + 0x12, 0x00, 0x00, 0xff, 0xff, 0x01, 0xd2, 0xc2, 0xea, 0x09, 0x1e, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -5224,7 +5224,7 @@ func (m *Delegations) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - var v github_com_cosmos_cosmos_sdk_types.Int + var v github_com_cosmos_cosmos_sdk_types.Dec m.AmountSfsd = &v if err := m.AmountSfsd.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err From 35619b2c7560bdea189b6716c9c075452d98cce2 Mon Sep 17 00:00:00 2001 From: Ruslan Akhtariev Date: Tue, 4 Oct 2022 17:49:21 +0700 Subject: [PATCH 06/59] TotalDelegationByValidatorForDenom query --- proto/osmosis/superfluid/query.proto | 2 +- x/superfluid/keeper/grpc_query.go | 26 +-- x/superfluid/keeper/grpc_query_test.go | 7 +- x/superfluid/types/query.pb.go | 230 ++++++++++++------------- 4 files changed, 128 insertions(+), 137 deletions(-) diff --git a/proto/osmosis/superfluid/query.proto b/proto/osmosis/superfluid/query.proto index 1cc99f58a3b..f57be312711 100644 --- a/proto/osmosis/superfluid/query.proto +++ b/proto/osmosis/superfluid/query.proto @@ -165,7 +165,7 @@ message QueryTotalDelegationByValidatorForDenomResponse { message Delegations { string val_addr = 1; string amount_sfsd = 2 - [ (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec" ]; + [ (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int" ]; string osmo_equivalent = 3 [ (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int" ]; } diff --git a/x/superfluid/keeper/grpc_query.go b/x/superfluid/keeper/grpc_query.go index ec258f085c3..30de638714e 100644 --- a/x/superfluid/keeper/grpc_query.go +++ b/x/superfluid/keeper/grpc_query.go @@ -2,7 +2,6 @@ package keeper import ( "context" - "fmt" "strings" "time" @@ -400,35 +399,28 @@ func (q Querier) TotalDelegationByValidatorForDenom(goCtx context.Context, req * var intermediaryAccount types.SuperfluidIntermediaryAccount intermediaryAccounts := q.Keeper.GetAllIntermediaryAccounts(ctx) - fmt.Println("intermediaryAccounts", intermediaryAccounts) for _, intermediaryAccount = range intermediaryAccounts { if intermediaryAccount.Denom != req.Denom { continue } + valAddr, err := sdk.ValAddressFromBech32(intermediaryAccount.ValAddr) if err != nil { return nil, err } - val, found := q.Keeper.sk.GetValidator(ctx, valAddr) - if !found { - return nil, stakingtypes.ErrNoValidatorFound - } + delegation, _ := q.SuperfluidDelegationsByValidatorDenom(goCtx, &types.SuperfluidDelegationsByValidatorDenomRequest{ValidatorAddress: valAddr.String(), Denom: req.Denom}) - delegations := q.Keeper.sk.GetValidatorDelegations(ctx, valAddr) - shares := sdk.ZeroDec() - for _, delegation := range delegations { - // addr := sdk.MustAccAddressFromBech32(delegation.DelegatorAddress) - // fmt.Println("addr", addr, delegation.DelegatorAddress) - // sfsDelegation, err := q.SuperfluidUndelegationsByDelegator(goCtx, &types.SuperfluidUndelegationsByDelegatorRequest{DelegatorAddress: addr.String()}) - // fmt.Println("sfsDelegation", sfsDelegation, err) - shares = shares.Add(delegation.Shares) + amount := sdk.ZeroInt() + for _, record := range delegation.SuperfluidDelegationRecords { + amount = amount.Add(record.DelegationAmount.Amount) } - fmt.Println("val tokens", val.Tokens, shares) - equivalentAmountOSMO := q.Keeper.GetSuperfluidOSMOTokens(ctx, req.Denom, val.DelegatorShares.RoundInt()) + + equivalentAmountOSMO := q.Keeper.GetSuperfluidOSMOTokens(ctx, req.Denom, amount) + result := &types.Delegations{ ValAddr: valAddr.String(), - AmountSfsd: &shares, + AmountSfsd: &amount, OsmoEquivalent: &equivalentAmountOSMO, } diff --git a/x/superfluid/keeper/grpc_query_test.go b/x/superfluid/keeper/grpc_query_test.go index 9042dd01d5b..82684ad5933 100644 --- a/x/superfluid/keeper/grpc_query_test.go +++ b/x/superfluid/keeper/grpc_query_test.go @@ -23,8 +23,7 @@ func (suite *KeeperTestSuite) TestTotalDelegationByValidatorForAsset() { delegation_amount := int64(1000000) valAddrs := suite.SetupValidators([]stakingtypes.BondStatus{stakingtypes.Bonded, stakingtypes.Bonded}) - test_multiplier := sdk.NewDec(20) - denoms, _ := suite.SetupGammPoolsAndSuperfluidAssets([]sdk.Dec{test_multiplier, test_multiplier}) + denoms, _ := suite.SetupGammPoolsAndSuperfluidAssets([]sdk.Dec{sdk.NewDec(20), sdk.NewDec(20)}) superfluidDelegations := []superfluidDelegation{ {0, 0, 0, delegation_amount}, @@ -44,13 +43,13 @@ func (suite *KeeperTestSuite) TestTotalDelegationByValidatorForAsset() { for res_ind, res := range req.AssetResponse { // check osmo equivalent is correct actual_response_osmo := *req.AssetResponse[res_ind].OsmoEquivalent - needed_response_osmo := suite.App.SuperfluidKeeper.GetSuperfluidOSMOTokens(ctx, denom, sdk.NewInt(test_multiplier.TruncateInt64()*delegation_amount+100)) // + 100 due to initial stake on validators account + needed_response_osmo := suite.App.SuperfluidKeeper.GetSuperfluidOSMOTokens(ctx, denom, sdk.NewInt(delegation_amount)) suite.Require().Equal(actual_response_osmo, needed_response_osmo) // check sfs'd asset amount correct actual_response_asset := *req.AssetResponse[res_ind].AmountSfsd - needed_response_asset := sdk.NewInt(test_multiplier.TruncateInt64()*delegation_amount + 100) // + 100 due to initial stake on validators account + needed_response_asset := sdk.NewInt(delegation_amount) suite.Require().Equal(actual_response_asset, needed_response_asset) // check validator addresses correct diff --git a/x/superfluid/types/query.pb.go b/x/superfluid/types/query.pb.go index d4a94c53761..872f9149065 100644 --- a/x/superfluid/types/query.pb.go +++ b/x/superfluid/types/query.pb.go @@ -722,7 +722,7 @@ func (m *QueryTotalDelegationByValidatorForDenomResponse) GetAssetResponse() []* type Delegations struct { ValAddr string `protobuf:"bytes,1,opt,name=val_addr,json=valAddr,proto3" json:"val_addr,omitempty"` - AmountSfsd *github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,2,opt,name=amount_sfsd,json=amountSfsd,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"amount_sfsd,omitempty"` + AmountSfsd *github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,2,opt,name=amount_sfsd,json=amountSfsd,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"amount_sfsd,omitempty"` OsmoEquivalent *github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,3,opt,name=osmo_equivalent,json=osmoEquivalent,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"osmo_equivalent,omitempty"` } @@ -1531,119 +1531,119 @@ func init() { func init() { proto.RegisterFile("osmosis/superfluid/query.proto", fileDescriptor_e3d9448e4ed3943f) } var fileDescriptor_e3d9448e4ed3943f = []byte{ - // 1789 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x59, 0x4f, 0x6c, 0xd4, 0x56, - 0x1a, 0x8f, 0x93, 0x90, 0xc0, 0x17, 0x6d, 0x48, 0x1e, 0x2c, 0x09, 0x06, 0x26, 0xe0, 0x84, 0x24, - 0x1b, 0xc0, 0xde, 0x84, 0x05, 0xb2, 0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0x0a, 0xba, 0x91, 0xe6, 0x21, - 0xcc, 0xc5, 0xab, 0x69, 0x0d, 0x21, 0xce, 0x61, 0xdf, 0xfb, 0x1d, 0x3c, 0x76, 0xf6, 0x40, 0xe7, - 0xb3, 0xdf, 0x13, 0x4d, 0x85, 0x72, 0x61, 0x47, 0xbc, 0x1c, 0xf5, 0x32, 0x45, 0xbd, 0x88, 0x16, - 0xd2, 0x50, 0x6f, 0xdd, 0xc9, 0xb6, 0xac, 0x8e, 0xc2, 0xf5, 0x47, 0xcf, 0x72, 0xc2, 0xe3, 0x67, - 0x39, 0xe1, 0xdb, 0x67, 0x39, 0xe1, 0x9d, 0xe7, 0xb9, 0xb6, 0xc7, 0xcf, 0x73, 0x6d, 0x5f, 0x3f, - 0xcf, 0xb5, 0xfd, 0xf3, 0x6c, 0xe4, 0x9b, 0x9d, 0xab, 0x3c, 0x65, 0x6a, 0xab, 0x24, 0xd0, 0xbf, - 0x39, 0x39, 0xa5, 0xdc, 0x8e, 0x5a, 0x41, 0xbf, 0xe3, 0x57, 0xbb, 0xe8, 0xff, 0x22, 0x4f, 0xff, - 0x12, 0x00, 0x00, 0xff, 0xff, 0x01, 0xd2, 0xc2, 0xea, 0x09, 0x1e, 0x00, 0x00, + // 1783 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x59, 0x4d, 0x6c, 0x14, 0xe5, + 0x1b, 0xef, 0xb4, 0xa5, 0x85, 0xa7, 0xf9, 0x97, 0xf6, 0x85, 0x3f, 0x2d, 0x03, 0x6c, 0x61, 0x5a, + 0xda, 0x5a, 0x60, 0xc6, 0x16, 0x81, 0x0a, 0x42, 0xd8, 0xa5, 0x14, 0x1b, 0x5b, 0x8b, 0x5b, 0x5a, + 0x12, 0x3f, 0x32, 0x99, 0xee, 0x4c, 0x97, 0x49, 0x67, 0x67, 0xb6, 0xf3, 0xce, 0x56, 0x36, 0x84, + 0x98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 0x3a, + 0x06, 0x66, 0x4e, 0x19, 0x78, 0x57, 0xbf, 0xac, 0x6d, 0x54, 0xf4, 0x4d, 0xc5, 0xd0, 0x4c, 0x47, + 0x2e, 0xf9, 0x54, 0x2c, 0x18, 0x53, 0x51, 0x26, 0x2e, 0xe2, 0x92, 0x75, 0xd1, 0x67, 0x0a, 0x4b, + 0x2e, 0x58, 0xb6, 0x9a, 0x1f, 0xb4, 0x62, 0xce, 0x85, 0xdb, 0x1c, 0x1c, 0x0a, 0xf0, 0xcd, 0x99, + 0x8e, 0x66, 0x97, 0x34, 0x55, 0x57, 0xec, 0x6a, 0xb6, 0x50, 0xb0, 0x2a, 0xa6, 0x33, 0x67, 0xae, + 0x59, 0xd1, 0x48, 0xd0, 0x5e, 0xd8, 0xbe, 0xa9, 0x18, 0xb2, 0xa2, 0xaa, 0xf6, 0x60, 0x3b, 0x39, + 0xe8, 0xde, 0x54, 0x8c, 0xac, 0xaa, 0xda, 0xee, 0x51, 0x51, 0xa9, 0x14, 0x35, 0x59, 0x57, 0x07, + 0x3b, 0x0e, 0x72, 0xe3, 0x9d, 0xf9, 0x6e, 0xf2, 0x3c, 0xa7, 0xa2, 0x41, 0xe8, 0x76, 0x39, 0x34, + 0x8c, 0x07, 0x3b, 0x29, 0x13, 0x7b, 0x14, 0xae, 0x41, 0x26, 0x6b, 0x18, 0x11, 0x36, 0x78, 0x31, + 0x74, 0xf3, 0x23, 0xc8, 0x7f, 0xe6, 0x8f, 0x51, 0x91, 0x16, 0x80, 0xe8, 0x16, 0x8b, 0x48, 0xfb, + 0x09, 0xab, 0x01, 0xf1, 0xb2, 0x52, 0xf4, 0xd2, 0x30, 0x1f, 0xe2, 0x14, 0xbe, 0xe5, 0x60, 0x28, + 0x56, 0x15, 0x8b, 0xc5, 0x55, 0xd8, 0xae, 0xb0, 0x77, 0x2c, 0x39, 0x4e, 0x24, 0x27, 0x47, 0x8c, + 0xf3, 0x58, 0xba, 0xf8, 0xc2, 0xd0, 0xa5, 0x1a, 0x10, 0xed, 0x04, 0xc4, 0x58, 0x43, 0x10, 0xd4, + 0xaa, 0x1a, 0x14, 0xe7, 0x60, 0xf8, 0x82, 0x65, 0x9a, 0x5a, 0xc1, 0xd1, 0xa2, 0x94, 0x7b, 0x4e, + 0x1b, 0x80, 0x6e, 0xb7, 0xb5, 0xb8, 0xa1, 0xe0, 0x48, 0x28, 0xba, 0xdc, 0xc7, 0x39, 0x55, 0x78, + 0x17, 0x46, 0x92, 0xf9, 0x99, 0x27, 0x16, 0xa1, 0x9b, 0x19, 0xcf, 0x5c, 0xde, 0x9a, 0x23, 0xf2, + 0x9e, 0x14, 0x61, 0x16, 0x44, 0xd2, 0x76, 0xae, 0x58, 0x8e, 0x62, 0xcc, 0x68, 0x86, 0x56, 0x24, + 0x80, 0x72, 0xd5, 0x15, 0xc5, 0xd0, 0x55, 0xc5, 0xb1, 0xec, 0x59, 0xcb, 0x9e, 0x71, 0x73, 0x2c, + 0xb9, 0x94, 0xaa, 0x20, 0xa5, 0x96, 0xe3, 0x77, 0x98, 0x5e, 0xda, 0x61, 0x6c, 0xf6, 0x86, 0xc5, + 0x76, 0x28, 0x0a, 0x52, 0x20, 0x12, 0xe7, 0xff, 0x47, 0xd8, 0x3c, 0x39, 0xc2, 0x77, 0x1c, 0xf4, + 0x84, 0x8e, 0x6b, 0x6a, 0x81, 0xab, 0xad, 0x85, 0xd7, 0xa0, 0x47, 0x29, 0xb9, 0xb8, 0x65, 0xbc, + 0x86, 0x55, 0x5a, 0x29, 0xb9, 0x89, 0x5f, 0x1e, 0x0c, 0x8d, 0x16, 0x75, 0xe7, 0x5a, 0x65, 0x55, + 0x2c, 0x58, 0x25, 0x89, 0x35, 0x71, 0xfa, 0xe7, 0x18, 0x56, 0xd7, 0x25, 0xb7, 0x05, 0x62, 0x71, + 0xce, 0x74, 0xf2, 0x40, 0xd9, 0x97, 0xd6, 0xb0, 0x8a, 0x96, 0x60, 0xe7, 0x96, 0x0e, 0x41, 0xea, + 0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62, 0x72, 0xbb, 0x09, 0x94, 0xd0, 0xdb, 0x8e, 0x35, + 0xdc, 0x7d, 0x38, 0x96, 0x02, 0xa3, 0xf7, 0xe0, 0xff, 0x35, 0x49, 0xaa, 0xa9, 0xb2, 0xfb, 0xf9, + 0xe8, 0x46, 0xf4, 0xa9, 0xbb, 0x7c, 0x57, 0x38, 0x3d, 0x35, 0x95, 0xbc, 0x44, 0x1f, 0x73, 0x90, + 0xa1, 0x16, 0x84, 0xee, 0x7a, 0xf7, 0x93, 0x4d, 0x53, 0x65, 0x16, 0xfd, 0x0e, 0xd2, 0x6b, 0x13, + 0x4c, 0x91, 0x98, 0x29, 0x63, 0x29, 0x4d, 0xc9, 0xef, 0x23, 0x1a, 0x83, 0xc2, 0x5f, 0x22, 0xfa, + 0x68, 0xfa, 0x09, 0x26, 0xbc, 0x10, 0xf8, 0x74, 0xd9, 0x54, 0x9f, 0x5a, 0x4e, 0x04, 0xd5, 0xd0, + 0x1e, 0xae, 0x86, 0xbf, 0xda, 0x61, 0x22, 0x8d, 0xc2, 0xe7, 0x9e, 0x2b, 0xef, 0x73, 0x30, 0x40, + 0x43, 0x55, 0x31, 0x9f, 0x41, 0xba, 0xd0, 0xc4, 0x5c, 0x0e, 0x54, 0xd1, 0x84, 0x99, 0x87, 0x9d, + 0xb8, 0x6a, 0x3a, 0xd7, 0x34, 0x47, 0x2f, 0xc8, 0xee, 0x05, 0x8e, 0x07, 0x3b, 0x88, 0xf2, 0x03, + 0x3e, 0x62, 0x3a, 0x47, 0x88, 0x4b, 0x1e, 0xd9, 0xbc, 0x55, 0x58, 0x67, 0x00, 0x7b, 0x71, 0xf8, + 0x25, 0x16, 0x36, 0xe0, 0x68, 0x4c, 0x95, 0xfa, 0x57, 0x67, 0xcd, 0xfd, 0x1b, 0xd9, 0xfd, 0xb8, + 0x46, 0xdd, 0xaf, 0x26, 0xde, 0x77, 0x39, 0x38, 0x96, 0x52, 0xe7, 0xf3, 0x0e, 0xb9, 0x70, 0x13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 0xf2, 0xbd, 0x47, 0x19, 0xee, 0xfe, 0xa3, 0x0c, 0xf7, 0xeb, 0xa3, 0x0c, 0xf7, + 0xc9, 0xe3, 0x4c, 0xdb, 0xfd, 0xc7, 0x99, 0xb6, 0x9f, 0x1f, 0x67, 0xda, 0xde, 0x3c, 0x19, 0xfa, + 0x66, 0x67, 0x2a, 0x8f, 0x19, 0xca, 0x2a, 0xf6, 0xf5, 0x6f, 0x4e, 0x4e, 0x49, 0xd7, 0xc3, 0x56, + 0x90, 0xef, 0xf8, 0xd5, 0x2e, 0xf2, 0xbf, 0xc8, 0xe3, 0xff, 0x04, 0x00, 0x00, 0xff, 0xff, 0xbf, + 0xdf, 0xa4, 0x71, 0x09, 0x1e, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -5224,7 +5224,7 @@ func (m *Delegations) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - var v github_com_cosmos_cosmos_sdk_types.Dec + var v github_com_cosmos_cosmos_sdk_types.Int m.AmountSfsd = &v if err := m.AmountSfsd.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err From e878a7e43a43027579b4c86651dcf66f7e3b97a8 Mon Sep 17 00:00:00 2001 From: Ruslan Akhtariev Date: Tue, 4 Oct 2022 17:53:41 +0700 Subject: [PATCH 07/59] TotalDelegationByValidatorForDenom --- x/superfluid/types/expected_keepers.go | 1 - 1 file changed, 1 deletion(-) diff --git a/x/superfluid/types/expected_keepers.go b/x/superfluid/types/expected_keepers.go index 04f9a6e1a7b..e7473328617 100644 --- a/x/superfluid/types/expected_keepers.go +++ b/x/superfluid/types/expected_keepers.go @@ -69,7 +69,6 @@ type StakingKeeper interface { GetDelegation(ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) (delegation stakingtypes.Delegation, found bool) UnbondingTime(ctx sdk.Context) time.Duration GetParams(ctx sdk.Context) stakingtypes.Params - GetValidatorDelegations(ctx sdk.Context, valAddr sdk.ValAddress) (delegations []stakingtypes.Delegation) IterateBondedValidatorsByPower(ctx sdk.Context, fn func(int64, stakingtypes.ValidatorI) bool) TotalBondedTokens(ctx sdk.Context) sdk.Int From 5408389303598d3879fd93fb5cf5702f1f669072 Mon Sep 17 00:00:00 2001 From: Ruslan Akhtariev Date: Mon, 10 Oct 2022 13:40:37 +0700 Subject: [PATCH 08/59] JoinSwapExactAmountIn query --- go.mod | 2 +- proto/osmosis/gamm/v1beta1/query.proto | 19 + x/gamm/keeper/grpc_query.go | 27 ++ x/gamm/keeper/grpc_query_test.go | 11 + x/gamm/types/query.pb.go | 628 +++++++++++++++++++++---- 5 files changed, 584 insertions(+), 103 deletions(-) diff --git a/go.mod b/go.mod index 53e7fb4bfa1..bd423c270dc 100644 --- a/go.mod +++ b/go.mod @@ -5,7 +5,7 @@ go 1.18 require ( github.com/CosmWasm/wasmd v0.28.0-osmo-v12 github.com/cosmos/cosmos-proto v1.0.0-alpha7 - github.com/cosmos/cosmos-sdk v0.46.1 + github.com/cosmos/cosmos-sdk v0.46.2 github.com/cosmos/go-bip39 v1.0.0 github.com/cosmos/iavl v0.19.1 github.com/cosmos/ibc-go/v3 v3.3.0 diff --git a/proto/osmosis/gamm/v1beta1/query.proto b/proto/osmosis/gamm/v1beta1/query.proto index 33600aa5504..b012a1128ff 100644 --- a/proto/osmosis/gamm/v1beta1/query.proto +++ b/proto/osmosis/gamm/v1beta1/query.proto @@ -38,6 +38,9 @@ service Query { option (google.api.http).get = "/osmosis/gamm/v1beta1/pool_type/{pool_id}"; } + rpc JoinSwapExactAmountIn(QueryJoinSwapExactAmountInRequest) + returns (QueryJoinSwapExactAmountInResponse) {} + rpc PoolParams(QueryPoolParamsRequest) returns (QueryPoolParamsResponse) { option (google.api.http).get = "/osmosis/gamm/v1beta1/pools/{pool_id}/params"; @@ -110,6 +113,22 @@ message QueryPoolTypeResponse { string pool_type = 1 [ (gogoproto.moretags) = "yaml:\"pool_type\"" ]; } +//=============================== JoinSwapExactAmountIn +message QueryJoinSwapExactAmountInRequest { + uint64 pool_id = 1 [ (gogoproto.moretags) = "yaml:\"pool_id\"" ]; + repeated cosmos.base.v1beta1.Coin tokens_in = 3 [ + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", + (gogoproto.nullable) = false + ]; +} +message QueryJoinSwapExactAmountInResponse { + string share_out_amount = 1 [ + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", + (gogoproto.moretags) = "yaml:\"share_out_amount\"", + (gogoproto.nullable) = false + ]; +} + //=============================== PoolParams message QueryPoolParamsRequest { uint64 pool_id = 1 [ (gogoproto.moretags) = "yaml:\"pool_id\"" ]; diff --git a/x/gamm/keeper/grpc_query.go b/x/gamm/keeper/grpc_query.go index 3af3ae40609..c9bc4ea0b65 100644 --- a/x/gamm/keeper/grpc_query.go +++ b/x/gamm/keeper/grpc_query.go @@ -140,6 +140,33 @@ func (q Querier) PoolType(ctx context.Context, req *types.QueryPoolTypeRequest) }, err } +// JoinSwapExactAmountIn queries the amount of shares you get by providing specific amount of tokens +func (q Querier) JoinSwapExactAmountIn(ctx context.Context, req *types.QueryJoinSwapExactAmountInRequest) (*types.QueryJoinSwapExactAmountInResponse, error) { + if req == nil { + return nil, status.Error(codes.InvalidArgument, "empty request") + } + if req.PoolId <= 0 { + return nil, status.Error(codes.InvalidArgument, "negative pool id") + } + if req.TokensIn == nil { + return nil, status.Error(codes.InvalidArgument, "no tokens in") + } + + sdkCtx := sdk.UnwrapSDKContext(ctx) + pool, err := q.Keeper.getPoolForSwap(sdkCtx, req.PoolId) + if err != nil { + return &types.QueryJoinSwapExactAmountInResponse{ShareOutAmount: sdk.Int{}}, err + } + + numShares, _, err := pool.CalcJoinPoolShares(sdkCtx, req.TokensIn, pool.GetSwapFee(sdkCtx)) + if err != nil { + return nil, err + } + return &types.QueryJoinSwapExactAmountInResponse{ + ShareOutAmount: numShares, + }, nil +} + // PoolParams queries a specified pool for its params. func (q Querier) PoolParams(ctx context.Context, req *types.QueryPoolParamsRequest) (*types.QueryPoolParamsResponse, error) { if req == nil { diff --git a/x/gamm/keeper/grpc_query_test.go b/x/gamm/keeper/grpc_query_test.go index 6bbcb39bca3..946acda9c96 100644 --- a/x/gamm/keeper/grpc_query_test.go +++ b/x/gamm/keeper/grpc_query_test.go @@ -9,6 +9,17 @@ import ( "github.com/osmosis-labs/osmosis/v12/x/gamm/types" ) +func (suite *KeeperTestSuite) TestJoinSwapExactAmountIn() { + queryClient := suite.queryClient + + poolId := suite.PrepareBalancerPool() + + _, err := queryClient.JoinSwapExactAmountIn(gocontext.Background(), &types.QueryJoinSwapExactAmountInRequest{ + PoolId: poolId, + TokensIn: sdk.NewCoins(sdk.NewCoin("foo", sdk.NewInt(500))), + }) + suite.Require().NoError(err) +} func (suite *KeeperTestSuite) TestQueryPool() { queryClient := suite.queryClient diff --git a/x/gamm/types/query.pb.go b/x/gamm/types/query.pb.go index 12889076df2..399108aa41e 100644 --- a/x/gamm/types/query.pb.go +++ b/x/gamm/types/query.pb.go @@ -392,6 +392,96 @@ func (m *QueryPoolTypeResponse) GetPoolType() string { return "" } +// =============================== JoinSwapExactAmountIn +type QueryJoinSwapExactAmountInRequest struct { + PoolId uint64 `protobuf:"varint,1,opt,name=pool_id,json=poolId,proto3" json:"pool_id,omitempty" yaml:"pool_id"` + TokensIn github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,3,rep,name=tokens_in,json=tokensIn,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"tokens_in"` +} + +func (m *QueryJoinSwapExactAmountInRequest) Reset() { *m = QueryJoinSwapExactAmountInRequest{} } +func (m *QueryJoinSwapExactAmountInRequest) String() string { return proto.CompactTextString(m) } +func (*QueryJoinSwapExactAmountInRequest) ProtoMessage() {} +func (*QueryJoinSwapExactAmountInRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_d9a717df9ca609ef, []int{8} +} +func (m *QueryJoinSwapExactAmountInRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryJoinSwapExactAmountInRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryJoinSwapExactAmountInRequest.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 *QueryJoinSwapExactAmountInRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryJoinSwapExactAmountInRequest.Merge(m, src) +} +func (m *QueryJoinSwapExactAmountInRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryJoinSwapExactAmountInRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryJoinSwapExactAmountInRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryJoinSwapExactAmountInRequest proto.InternalMessageInfo + +func (m *QueryJoinSwapExactAmountInRequest) GetPoolId() uint64 { + if m != nil { + return m.PoolId + } + return 0 +} + +func (m *QueryJoinSwapExactAmountInRequest) GetTokensIn() github_com_cosmos_cosmos_sdk_types.Coins { + if m != nil { + return m.TokensIn + } + return nil +} + +type QueryJoinSwapExactAmountInResponse struct { + ShareOutAmount github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,1,opt,name=share_out_amount,json=shareOutAmount,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"share_out_amount" yaml:"share_out_amount"` +} + +func (m *QueryJoinSwapExactAmountInResponse) Reset() { *m = QueryJoinSwapExactAmountInResponse{} } +func (m *QueryJoinSwapExactAmountInResponse) String() string { return proto.CompactTextString(m) } +func (*QueryJoinSwapExactAmountInResponse) ProtoMessage() {} +func (*QueryJoinSwapExactAmountInResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_d9a717df9ca609ef, []int{9} +} +func (m *QueryJoinSwapExactAmountInResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryJoinSwapExactAmountInResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryJoinSwapExactAmountInResponse.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 *QueryJoinSwapExactAmountInResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryJoinSwapExactAmountInResponse.Merge(m, src) +} +func (m *QueryJoinSwapExactAmountInResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryJoinSwapExactAmountInResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryJoinSwapExactAmountInResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryJoinSwapExactAmountInResponse proto.InternalMessageInfo + // =============================== PoolParams type QueryPoolParamsRequest struct { PoolId uint64 `protobuf:"varint,1,opt,name=pool_id,json=poolId,proto3" json:"pool_id,omitempty" yaml:"pool_id"` @@ -401,7 +491,7 @@ func (m *QueryPoolParamsRequest) Reset() { *m = QueryPoolParamsRequest{} func (m *QueryPoolParamsRequest) String() string { return proto.CompactTextString(m) } func (*QueryPoolParamsRequest) ProtoMessage() {} func (*QueryPoolParamsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_d9a717df9ca609ef, []int{8} + return fileDescriptor_d9a717df9ca609ef, []int{10} } func (m *QueryPoolParamsRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -445,7 +535,7 @@ func (m *QueryPoolParamsResponse) Reset() { *m = QueryPoolParamsResponse func (m *QueryPoolParamsResponse) String() string { return proto.CompactTextString(m) } func (*QueryPoolParamsResponse) ProtoMessage() {} func (*QueryPoolParamsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_d9a717df9ca609ef, []int{9} + return fileDescriptor_d9a717df9ca609ef, []int{11} } func (m *QueryPoolParamsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -490,7 +580,7 @@ func (m *QueryTotalPoolLiquidityRequest) Reset() { *m = QueryTotalPoolLi func (m *QueryTotalPoolLiquidityRequest) String() string { return proto.CompactTextString(m) } func (*QueryTotalPoolLiquidityRequest) ProtoMessage() {} func (*QueryTotalPoolLiquidityRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_d9a717df9ca609ef, []int{10} + return fileDescriptor_d9a717df9ca609ef, []int{12} } func (m *QueryTotalPoolLiquidityRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -534,7 +624,7 @@ func (m *QueryTotalPoolLiquidityResponse) Reset() { *m = QueryTotalPoolL func (m *QueryTotalPoolLiquidityResponse) String() string { return proto.CompactTextString(m) } func (*QueryTotalPoolLiquidityResponse) ProtoMessage() {} func (*QueryTotalPoolLiquidityResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_d9a717df9ca609ef, []int{11} + return fileDescriptor_d9a717df9ca609ef, []int{13} } func (m *QueryTotalPoolLiquidityResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -579,7 +669,7 @@ func (m *QueryTotalSharesRequest) Reset() { *m = QueryTotalSharesRequest func (m *QueryTotalSharesRequest) String() string { return proto.CompactTextString(m) } func (*QueryTotalSharesRequest) ProtoMessage() {} func (*QueryTotalSharesRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_d9a717df9ca609ef, []int{12} + return fileDescriptor_d9a717df9ca609ef, []int{14} } func (m *QueryTotalSharesRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -623,7 +713,7 @@ func (m *QueryTotalSharesResponse) Reset() { *m = QueryTotalSharesRespon func (m *QueryTotalSharesResponse) String() string { return proto.CompactTextString(m) } func (*QueryTotalSharesResponse) ProtoMessage() {} func (*QueryTotalSharesResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_d9a717df9ca609ef, []int{13} + return fileDescriptor_d9a717df9ca609ef, []int{15} } func (m *QueryTotalSharesResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -671,7 +761,7 @@ func (m *QuerySpotPriceRequest) Reset() { *m = QuerySpotPriceRequest{} } func (m *QuerySpotPriceRequest) String() string { return proto.CompactTextString(m) } func (*QuerySpotPriceRequest) ProtoMessage() {} func (*QuerySpotPriceRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_d9a717df9ca609ef, []int{14} + return fileDescriptor_d9a717df9ca609ef, []int{16} } func (m *QuerySpotPriceRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -732,7 +822,7 @@ func (m *QuerySpotPriceResponse) Reset() { *m = QuerySpotPriceResponse{} func (m *QuerySpotPriceResponse) String() string { return proto.CompactTextString(m) } func (*QuerySpotPriceResponse) ProtoMessage() {} func (*QuerySpotPriceResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_d9a717df9ca609ef, []int{15} + return fileDescriptor_d9a717df9ca609ef, []int{17} } func (m *QuerySpotPriceResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -780,7 +870,7 @@ func (m *QuerySwapExactAmountInRequest) Reset() { *m = QuerySwapExactAmo func (m *QuerySwapExactAmountInRequest) String() string { return proto.CompactTextString(m) } func (*QuerySwapExactAmountInRequest) ProtoMessage() {} func (*QuerySwapExactAmountInRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_d9a717df9ca609ef, []int{16} + return fileDescriptor_d9a717df9ca609ef, []int{18} } func (m *QuerySwapExactAmountInRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -845,7 +935,7 @@ func (m *QuerySwapExactAmountInResponse) Reset() { *m = QuerySwapExactAm func (m *QuerySwapExactAmountInResponse) String() string { return proto.CompactTextString(m) } func (*QuerySwapExactAmountInResponse) ProtoMessage() {} func (*QuerySwapExactAmountInResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_d9a717df9ca609ef, []int{17} + return fileDescriptor_d9a717df9ca609ef, []int{19} } func (m *QuerySwapExactAmountInResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -886,7 +976,7 @@ func (m *QuerySwapExactAmountOutRequest) Reset() { *m = QuerySwapExactAm func (m *QuerySwapExactAmountOutRequest) String() string { return proto.CompactTextString(m) } func (*QuerySwapExactAmountOutRequest) ProtoMessage() {} func (*QuerySwapExactAmountOutRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_d9a717df9ca609ef, []int{18} + return fileDescriptor_d9a717df9ca609ef, []int{20} } func (m *QuerySwapExactAmountOutRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -951,7 +1041,7 @@ func (m *QuerySwapExactAmountOutResponse) Reset() { *m = QuerySwapExactA func (m *QuerySwapExactAmountOutResponse) String() string { return proto.CompactTextString(m) } func (*QuerySwapExactAmountOutResponse) ProtoMessage() {} func (*QuerySwapExactAmountOutResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_d9a717df9ca609ef, []int{19} + return fileDescriptor_d9a717df9ca609ef, []int{21} } func (m *QuerySwapExactAmountOutResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -987,7 +1077,7 @@ func (m *QueryTotalLiquidityRequest) Reset() { *m = QueryTotalLiquidityR func (m *QueryTotalLiquidityRequest) String() string { return proto.CompactTextString(m) } func (*QueryTotalLiquidityRequest) ProtoMessage() {} func (*QueryTotalLiquidityRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_d9a717df9ca609ef, []int{20} + return fileDescriptor_d9a717df9ca609ef, []int{22} } func (m *QueryTotalLiquidityRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1024,7 +1114,7 @@ func (m *QueryTotalLiquidityResponse) Reset() { *m = QueryTotalLiquidity func (m *QueryTotalLiquidityResponse) String() string { return proto.CompactTextString(m) } func (*QueryTotalLiquidityResponse) ProtoMessage() {} func (*QueryTotalLiquidityResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_d9a717df9ca609ef, []int{21} + return fileDescriptor_d9a717df9ca609ef, []int{23} } func (m *QueryTotalLiquidityResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1069,6 +1159,8 @@ func init() { proto.RegisterType((*QueryNumPoolsResponse)(nil), "osmosis.gamm.v1beta1.QueryNumPoolsResponse") proto.RegisterType((*QueryPoolTypeRequest)(nil), "osmosis.gamm.v1beta1.QueryPoolTypeRequest") proto.RegisterType((*QueryPoolTypeResponse)(nil), "osmosis.gamm.v1beta1.QueryPoolTypeResponse") + proto.RegisterType((*QueryJoinSwapExactAmountInRequest)(nil), "osmosis.gamm.v1beta1.QueryJoinSwapExactAmountInRequest") + proto.RegisterType((*QueryJoinSwapExactAmountInResponse)(nil), "osmosis.gamm.v1beta1.QueryJoinSwapExactAmountInResponse") proto.RegisterType((*QueryPoolParamsRequest)(nil), "osmosis.gamm.v1beta1.QueryPoolParamsRequest") proto.RegisterType((*QueryPoolParamsResponse)(nil), "osmosis.gamm.v1beta1.QueryPoolParamsResponse") proto.RegisterType((*QueryTotalPoolLiquidityRequest)(nil), "osmosis.gamm.v1beta1.QueryTotalPoolLiquidityRequest") @@ -1088,94 +1180,99 @@ func init() { func init() { proto.RegisterFile("osmosis/gamm/v1beta1/query.proto", fileDescriptor_d9a717df9ca609ef) } var fileDescriptor_d9a717df9ca609ef = []byte{ - // 1382 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x97, 0xcd, 0x6f, 0x1b, 0x45, - 0x14, 0xc0, 0xb3, 0xa9, 0x93, 0xda, 0x13, 0x9a, 0x26, 0xd3, 0xb4, 0x75, 0x9d, 0xd6, 0x5b, 0x06, - 0xd1, 0xa4, 0x6d, 0xb2, 0xdb, 0xa4, 0xe9, 0xa5, 0x02, 0x4a, 0xdd, 0x26, 0x6d, 0x2a, 0x68, 0xc3, - 0xb6, 0x02, 0x01, 0x07, 0x6b, 0x93, 0x2c, 0xee, 0xaa, 0xf6, 0xce, 0xc6, 0x33, 0xdb, 0xd4, 0x42, - 0x15, 0x12, 0x42, 0x9c, 0x38, 0x20, 0x15, 0x38, 0x55, 0x82, 0x03, 0x07, 0xc4, 0x99, 0x03, 0xff, - 0x00, 0x52, 0x85, 0x84, 0x54, 0xc4, 0x05, 0x71, 0x30, 0xa8, 0xe1, 0xc0, 0xd9, 0xff, 0x00, 0x68, - 0x66, 0xde, 0x7e, 0xd8, 0xd9, 0xd8, 0x4e, 0x10, 0x12, 0xa7, 0xd8, 0xf3, 0xbe, 0x7e, 0xef, 0x63, - 0x3c, 0x2f, 0xe8, 0x24, 0x65, 0x35, 0xca, 0x5c, 0x66, 0x56, 0xec, 0x5a, 0xcd, 0xbc, 0x3f, 0xb7, - 0xea, 0x70, 0x7b, 0xce, 0xdc, 0x08, 0x9c, 0x7a, 0xc3, 0xf0, 0xeb, 0x94, 0x53, 0x3c, 0x01, 0x1a, - 0x86, 0xd0, 0x30, 0x40, 0xa3, 0x30, 0x51, 0xa1, 0x15, 0x2a, 0x15, 0x4c, 0xf1, 0x49, 0xe9, 0x16, - 0x4e, 0xa4, 0x7a, 0xe3, 0x0f, 0x40, 0x5c, 0x5c, 0x93, 0x72, 0x73, 0xd5, 0x66, 0x4e, 0x24, 0x5d, - 0xa3, 0xae, 0x07, 0xf2, 0x33, 0x49, 0xb9, 0x64, 0x88, 0xb4, 0x7c, 0xbb, 0xe2, 0x7a, 0x36, 0x77, - 0x69, 0xa8, 0x7b, 0xbc, 0x42, 0x69, 0xa5, 0xea, 0x98, 0xb6, 0xef, 0x9a, 0xb6, 0xe7, 0x51, 0x2e, - 0x85, 0x0c, 0xa4, 0xc7, 0x40, 0x2a, 0xbf, 0xad, 0x06, 0xef, 0x99, 0xb6, 0xd7, 0x08, 0x45, 0x2a, - 0x48, 0x59, 0xc1, 0xab, 0x2f, 0x4a, 0x44, 0x2e, 0xa1, 0xb1, 0x37, 0x44, 0xd4, 0x15, 0x4a, 0xab, - 0x96, 0xb3, 0x11, 0x38, 0x8c, 0xe3, 0xb3, 0x68, 0xbf, 0x4f, 0x69, 0xb5, 0xec, 0xae, 0xe7, 0xb5, - 0x93, 0xda, 0x74,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6, 0x6c, 0xd5, 0x5e, 0x65, 0x51, 0xc0, 0xfb, 0x73, 0xf3, 0xe6, 0x03, 0x15, 0x56, - 0xbe, 0xcb, 0xab, 0xc3, 0xf2, 0x9f, 0xcf, 0xf3, 0xff, 0x04, 0x00, 0x00, 0xff, 0xff, 0x5f, 0xcb, - 0xa3, 0x26, 0x80, 0x12, 0x00, 0x00, + // 1467 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x57, 0xcf, 0x6f, 0x1b, 0xc5, + 0x17, 0xcf, 0xa6, 0x49, 0x1a, 0x4f, 0xbe, 0xcd, 0x8f, 0x69, 0xd2, 0xba, 0x4e, 0x6b, 0xb7, 0xf3, + 0x15, 0x4d, 0xda, 0x26, 0xbb, 0x4d, 0x9a, 0x0a, 0x54, 0x01, 0xa5, 0x69, 0x93, 0xd6, 0x11, 0x34, + 0x61, 0x5b, 0x81, 0x80, 0x83, 0xb5, 0x49, 0x16, 0x67, 0x55, 0x7b, 0x67, 0xe3, 0x99, 0x6d, 0x6b, + 0xa1, 0x0a, 0x09, 0x21, 0x4e, 0x3d, 0x20, 0x15, 0x90, 0x90, 0x2a, 0xc1, 0x81, 0x03, 0xe2, 0xcc, + 0x89, 0x3b, 0xa2, 0x42, 0x42, 0x2a, 0xe2, 0x82, 0x38, 0x18, 0xd4, 0x72, 0xe0, 0xec, 0x7f, 0x00, + 0x34, 0x33, 0x6f, 0x77, 0x6d, 0xc7, 0x5e, 0xff, 0x00, 0x24, 0x4e, 0xf1, 0xce, 0x7b, 0xf3, 0x79, + 0x9f, 0xf7, 0x3e, 0xf3, 0x66, 0x5e, 0xd0, 0x71, 0xca, 0x8a, 0x94, 0x39, 0xcc, 0xc8, 0x5b, 0xc5, + 0xa2, 0x71, 0x7b, 0x61, 0xd3, 0xe6, 0xd6, 0x82, 0xb1, 0xeb, 0xdb, 0xa5, 0xb2, 0xee, 0x95, 0x28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x32, 0x7d, 0x5f, + 0xfd, 0x9a, 0x99, 0xcd, 0x3b, 0x7c, 0xc7, 0xdf, 0xd4, 0xb7, 0x68, 0x11, 0xba, 0x02, 0xfe, 0xcc, + 0xb3, 0xed, 0x5b, 0x86, 0xa0, 0xcd, 0xe4, 0x06, 0x66, 0x0e, 0x2b, 0xf4, 0xac, 0x4b, 0x3e, 0xd5, + 0x10, 0x89, 0x23, 0x0f, 0x65, 0x61, 0x68, 0x9c, 0xed, 0x58, 0x25, 0x3b, 0x47, 0x7d, 0x9e, 0xb3, + 0xa4, 0x15, 0xaa, 0x93, 0x15, 0xc1, 0x7f, 0xa9, 0x64, 0x4e, 0x76, 0x10, 0x3c, 0xeb, 0xf2, 0x6a, + 0x25, 0x73, 0x58, 0x25, 0xdd, 0x88, 0x47, 0xcc, 0x51, 0xb9, 0xb4, 0xee, 0x43, 0x78, 0xb2, 0x82, + 0x0e, 0x85, 0x22, 0x6d, 0x58, 0x25, 0xab, 0xc8, 0x7a, 0xd2, 0xfa, 0x2a, 0x3a, 0xbc, 0x07, 0x06, + 0xd2, 0x9a, 0x43, 0x43, 0x9e, 0x5c, 0x89, 0x6b, 0x6d, 0x13, 0x7c, 0xc8, 0x2b, 0x28, 0x2d, 0x81, + 0x6e, 0x52, 0x6e, 0x15, 0x04, 0xda, 0xcb, 0xce, 0xae, 0xef, 0x6c, 0x3b, 0xbc, 0xdc, 0x13, 0xaf, + 0xcf, 0x35, 0x94, 0x69, 0x89, 0x07, 0x04, 0xef, 0xa1, 0x44, 0x21, 0x58, 0x84, 0xa6, 0x8e, 0x39, + 0x08, 0x57, 0x84, 0x16, 0xd1, 0x69, 0x0d, 0x77, 0x92, 0xae, 0x0e, 0x47, 0x14, 0x91, 0xac, 0x42, + 0xe9, 0x24, 0xc3, 0x1b, 0x42, 0x9d, 0xde, 0x24, 0xf0, 0x51, 0x72, 0x2f, 0x0e, 0xa4, 0xf8, 0x06, + 0xfa, 0x1f, 0x17, 0xcb, 0x39, 0x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 0x34, 0xdd, + 0xf7, 0xe6, 0xd9, 0x9a, 0xc1, 0x00, 0x62, 0xcc, 0x17, 0xac, 0x4d, 0x16, 0x06, 0xbc, 0xbd, 0xb0, + 0x68, 0xdc, 0x55, 0x61, 0xe5, 0x98, 0xb0, 0x39, 0x24, 0xff, 0x17, 0x3e, 0xf7, 0x57, 0x00, 0x00, + 0x00, 0xff, 0xff, 0x9b, 0x47, 0x8e, 0xc2, 0x68, 0x14, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1199,6 +1296,7 @@ type QueryClient interface { // Returns "Balancer" as a string literal when the pool is a balancer pool. // Errors if the pool is failed to be type caseted. PoolType(ctx context.Context, in *QueryPoolTypeRequest, opts ...grpc.CallOption) (*QueryPoolTypeResponse, error) + JoinSwapExactAmountIn(ctx context.Context, in *QueryJoinSwapExactAmountInRequest, opts ...grpc.CallOption) (*QueryJoinSwapExactAmountInResponse, error) PoolParams(ctx context.Context, in *QueryPoolParamsRequest, opts ...grpc.CallOption) (*QueryPoolParamsResponse, error) TotalPoolLiquidity(ctx context.Context, in *QueryTotalPoolLiquidityRequest, opts ...grpc.CallOption) (*QueryTotalPoolLiquidityResponse, error) TotalShares(ctx context.Context, in *QueryTotalSharesRequest, opts ...grpc.CallOption) (*QueryTotalSharesResponse, error) @@ -1263,6 +1361,15 @@ func (c *queryClient) PoolType(ctx context.Context, in *QueryPoolTypeRequest, op return out, nil } +func (c *queryClient) JoinSwapExactAmountIn(ctx context.Context, in *QueryJoinSwapExactAmountInRequest, opts ...grpc.CallOption) (*QueryJoinSwapExactAmountInResponse, error) { + out := new(QueryJoinSwapExactAmountInResponse) + err := c.cc.Invoke(ctx, "/osmosis.gamm.v1beta1.Query/JoinSwapExactAmountIn", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *queryClient) PoolParams(ctx context.Context, in *QueryPoolParamsRequest, opts ...grpc.CallOption) (*QueryPoolParamsResponse, error) { out := new(QueryPoolParamsResponse) err := c.cc.Invoke(ctx, "/osmosis.gamm.v1beta1.Query/PoolParams", in, out, opts...) @@ -1328,6 +1435,7 @@ type QueryServer interface { // Returns "Balancer" as a string literal when the pool is a balancer pool. // Errors if the pool is failed to be type caseted. PoolType(context.Context, *QueryPoolTypeRequest) (*QueryPoolTypeResponse, error) + JoinSwapExactAmountIn(context.Context, *QueryJoinSwapExactAmountInRequest) (*QueryJoinSwapExactAmountInResponse, error) PoolParams(context.Context, *QueryPoolParamsRequest) (*QueryPoolParamsResponse, error) TotalPoolLiquidity(context.Context, *QueryTotalPoolLiquidityRequest) (*QueryTotalPoolLiquidityResponse, error) TotalShares(context.Context, *QueryTotalSharesRequest) (*QueryTotalSharesResponse, error) @@ -1358,6 +1466,9 @@ func (*UnimplementedQueryServer) Pool(ctx context.Context, req *QueryPoolRequest func (*UnimplementedQueryServer) PoolType(ctx context.Context, req *QueryPoolTypeRequest) (*QueryPoolTypeResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method PoolType not implemented") } +func (*UnimplementedQueryServer) JoinSwapExactAmountIn(ctx context.Context, req *QueryJoinSwapExactAmountInRequest) (*QueryJoinSwapExactAmountInResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method JoinSwapExactAmountIn not implemented") +} func (*UnimplementedQueryServer) PoolParams(ctx context.Context, req *QueryPoolParamsRequest) (*QueryPoolParamsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method PoolParams not implemented") } @@ -1471,6 +1582,24 @@ func _Query_PoolType_Handler(srv interface{}, ctx context.Context, dec func(inte return interceptor(ctx, in, info, handler) } +func _Query_JoinSwapExactAmountIn_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryJoinSwapExactAmountInRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).JoinSwapExactAmountIn(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/osmosis.gamm.v1beta1.Query/JoinSwapExactAmountIn", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).JoinSwapExactAmountIn(ctx, req.(*QueryJoinSwapExactAmountInRequest)) + } + return interceptor(ctx, in, info, handler) +} + func _Query_PoolParams_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(QueryPoolParamsRequest) if err := dec(in); err != nil { @@ -1603,6 +1732,10 @@ var _Query_serviceDesc = grpc.ServiceDesc{ MethodName: "PoolType", Handler: _Query_PoolType_Handler, }, + { + MethodName: "JoinSwapExactAmountIn", + Handler: _Query_JoinSwapExactAmountIn_Handler, + }, { MethodName: "PoolParams", Handler: _Query_PoolParams_Handler, @@ -1888,6 +2021,81 @@ func (m *QueryPoolTypeResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *QueryJoinSwapExactAmountInRequest) 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 *QueryJoinSwapExactAmountInRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryJoinSwapExactAmountInRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.TokensIn) > 0 { + for iNdEx := len(m.TokensIn) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.TokensIn[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + } + if m.PoolId != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.PoolId)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *QueryJoinSwapExactAmountInResponse) 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 *QueryJoinSwapExactAmountInResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryJoinSwapExactAmountInResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size := m.ShareOutAmount.Size() + i -= size + if _, err := m.ShareOutAmount.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + func (m *QueryPoolParamsRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -2501,6 +2709,35 @@ func (m *QueryPoolTypeResponse) Size() (n int) { return n } +func (m *QueryJoinSwapExactAmountInRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.PoolId != 0 { + n += 1 + sovQuery(uint64(m.PoolId)) + } + if len(m.TokensIn) > 0 { + for _, e := range m.TokensIn { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + return n +} + +func (m *QueryJoinSwapExactAmountInResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.ShareOutAmount.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + func (m *QueryPoolParamsRequest) Size() (n int) { if m == nil { return 0 @@ -3344,6 +3581,193 @@ func (m *QueryPoolTypeResponse) Unmarshal(dAtA []byte) error { } return nil } +func (m *QueryJoinSwapExactAmountInRequest) 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: QueryJoinSwapExactAmountInRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryJoinSwapExactAmountInRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field PoolId", wireType) + } + m.PoolId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.PoolId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TokensIn", 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.TokensIn = append(m.TokensIn, types1.Coin{}) + if err := m.TokensIn[len(m.TokensIn)-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 *QueryJoinSwapExactAmountInResponse) 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: QueryJoinSwapExactAmountInResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryJoinSwapExactAmountInResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ShareOutAmount", 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.ShareOutAmount.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 *QueryPoolParamsRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 From 05c90857293118d09262d9d46a8733b5919f3316 Mon Sep 17 00:00:00 2001 From: Ruslan Akhtariev Date: Mon, 10 Oct 2022 16:09:54 +0700 Subject: [PATCH 09/59] ExitSwapShareAmountIn query --- proto/osmosis/gamm/v1beta1/query.proto | 19 +- x/gamm/keeper/grpc_query.go | 39 +- x/gamm/keeper/grpc_query_test.go | 14 + x/gamm/types/query.pb.go | 671 +++++++++++++++++++++---- x/gamm/types/query.pb.gw.go | 238 +++++++++ 5 files changed, 870 insertions(+), 111 deletions(-) diff --git a/proto/osmosis/gamm/v1beta1/query.proto b/proto/osmosis/gamm/v1beta1/query.proto index b012a1128ff..3e4d8b834b2 100644 --- a/proto/osmosis/gamm/v1beta1/query.proto +++ b/proto/osmosis/gamm/v1beta1/query.proto @@ -39,7 +39,15 @@ service Query { } rpc JoinSwapExactAmountIn(QueryJoinSwapExactAmountInRequest) - returns (QueryJoinSwapExactAmountInResponse) {} + returns (QueryJoinSwapExactAmountInResponse) { + option (google.api.http).get = + "/osmosis/gamm/v1beta1/pools/{pool_id}/join_swap_exact_in"; + } + rpc ExitSwapShareAmountIn(QueryExitSwapShareAmountInRequest) + returns (QueryExitSwapShareAmountInResponse) { + option (google.api.http).get = + "/osmosis/gamm/v1beta1/pools/{pool_id}/exit_swap_share_amount_in"; + } rpc PoolParams(QueryPoolParamsRequest) returns (QueryPoolParamsResponse) { option (google.api.http).get = @@ -129,6 +137,15 @@ message QueryJoinSwapExactAmountInResponse { ]; } +//=============================== ExitSwapShareAmountIn +message QueryExitSwapShareAmountInRequest { + uint64 pool_id = 1; + string token_out_denom = 2; + string share_in_amount = 3 + [ (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int" ]; +} +message QueryExitSwapShareAmountInResponse { uint64 token_out_amount = 1; } + //=============================== PoolParams message QueryPoolParamsRequest { uint64 pool_id = 1 [ (gogoproto.moretags) = "yaml:\"pool_id\"" ]; diff --git a/x/gamm/keeper/grpc_query.go b/x/gamm/keeper/grpc_query.go index c9bc4ea0b65..89d0dadf86c 100644 --- a/x/gamm/keeper/grpc_query.go +++ b/x/gamm/keeper/grpc_query.go @@ -15,6 +15,7 @@ import ( "github.com/cosmos/cosmos-sdk/types/query" "github.com/osmosis-labs/osmosis/v12/x/gamm/pool-models/balancer" + // "github.com/osmosis-labs/osmosis/v12/x/gamm/pool-models/internal/cfmm_common" "github.com/osmosis-labs/osmosis/v12/x/gamm/types" ) @@ -145,9 +146,6 @@ func (q Querier) JoinSwapExactAmountIn(ctx context.Context, req *types.QueryJoin if req == nil { return nil, status.Error(codes.InvalidArgument, "empty request") } - if req.PoolId <= 0 { - return nil, status.Error(codes.InvalidArgument, "negative pool id") - } if req.TokensIn == nil { return nil, status.Error(codes.InvalidArgument, "no tokens in") } @@ -167,6 +165,41 @@ func (q Querier) JoinSwapExactAmountIn(ctx context.Context, req *types.QueryJoin }, nil } +func (q Querier) ExitSwapShareAmountIn(ctx context.Context, req *types.QueryExitSwapShareAmountInRequest) (*types.QueryExitSwapShareAmountInResponse, error) { + if req == nil { + return nil, status.Error(codes.InvalidArgument, "empty request") + } + + sdkCtx := sdk.UnwrapSDKContext(ctx) + pool, err := q.Keeper.GetPoolAndPoke(sdkCtx, req.PoolId) + if err != nil { + return &types.QueryExitSwapShareAmountInResponse{TokenOutAmount: 0}, err + } + + denom_liquidity := q.Keeper.GetDenomLiquidity(sdkCtx, req.TokenOutDenom) + if denom_liquidity == sdk.NewInt(0) { + return nil, status.Error(codes.InvalidArgument, fmt.Sprintf("no denom (%s) in pool", req.TokenOutDenom)) + } + + totalSharesAmount := pool.GetTotalShares() + if req.ShareInAmount.GTE(totalSharesAmount) || req.ShareInAmount.LTE(sdk.ZeroInt()) { + return &types.QueryExitSwapShareAmountInResponse{TokenOutAmount: 0}, sdkerrors.Wrapf(types.ErrInvalidMathApprox, "share ratio is zero or negative") + } + exitFee := pool.GetExitFee(sdkCtx) + + exitCoins, err := pool.CalcExitPoolCoinsFromShares(sdkCtx, *req.ShareInAmount, exitFee) + if err != nil { + return &types.QueryExitSwapShareAmountInResponse{TokenOutAmount: 0}, err + } + + for _, coin := range exitCoins { + if coin.Denom == req.TokenOutDenom { + return &types.QueryExitSwapShareAmountInResponse{TokenOutAmount: coin.Amount.Uint64()}, nil + } + } + return nil, nil +} + // PoolParams queries a specified pool for its params. func (q Querier) PoolParams(ctx context.Context, req *types.QueryPoolParamsRequest) (*types.QueryPoolParamsResponse, error) { if req == nil { diff --git a/x/gamm/keeper/grpc_query_test.go b/x/gamm/keeper/grpc_query_test.go index 946acda9c96..8e7f1a3eede 100644 --- a/x/gamm/keeper/grpc_query_test.go +++ b/x/gamm/keeper/grpc_query_test.go @@ -9,6 +9,20 @@ import ( "github.com/osmosis-labs/osmosis/v12/x/gamm/types" ) +func (suite *KeeperTestSuite) TestExitSwapShareAmountIn() { + queryClient := suite.queryClient + + poolId := suite.PrepareBalancerPool() + defaultShares := sdk.NewInt(50000000000000) + + out, err := queryClient.ExitSwapShareAmountIn(gocontext.Background(), &types.QueryExitSwapShareAmountInRequest{ + PoolId: poolId, + TokenOutDenom: "foo", + ShareInAmount: &defaultShares, + }) + suite.Require().NotNil(out) + suite.Require().NoError(err) +} func (suite *KeeperTestSuite) TestJoinSwapExactAmountIn() { queryClient := suite.queryClient diff --git a/x/gamm/types/query.pb.go b/x/gamm/types/query.pb.go index 399108aa41e..3a6b9250804 100644 --- a/x/gamm/types/query.pb.go +++ b/x/gamm/types/query.pb.go @@ -482,6 +482,104 @@ func (m *QueryJoinSwapExactAmountInResponse) XXX_DiscardUnknown() { var xxx_messageInfo_QueryJoinSwapExactAmountInResponse proto.InternalMessageInfo +// =============================== ExitSwapShareAmountIn +type QueryExitSwapShareAmountInRequest struct { + PoolId uint64 `protobuf:"varint,1,opt,name=pool_id,json=poolId,proto3" json:"pool_id,omitempty"` + TokenOutDenom string `protobuf:"bytes,2,opt,name=token_out_denom,json=tokenOutDenom,proto3" json:"token_out_denom,omitempty"` + ShareInAmount *github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,3,opt,name=share_in_amount,json=shareInAmount,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"share_in_amount,omitempty"` +} + +func (m *QueryExitSwapShareAmountInRequest) Reset() { *m = QueryExitSwapShareAmountInRequest{} } +func (m *QueryExitSwapShareAmountInRequest) String() string { return proto.CompactTextString(m) } +func (*QueryExitSwapShareAmountInRequest) ProtoMessage() {} +func (*QueryExitSwapShareAmountInRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_d9a717df9ca609ef, []int{10} +} +func (m *QueryExitSwapShareAmountInRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryExitSwapShareAmountInRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryExitSwapShareAmountInRequest.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 *QueryExitSwapShareAmountInRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryExitSwapShareAmountInRequest.Merge(m, src) +} +func (m *QueryExitSwapShareAmountInRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryExitSwapShareAmountInRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryExitSwapShareAmountInRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryExitSwapShareAmountInRequest proto.InternalMessageInfo + +func (m *QueryExitSwapShareAmountInRequest) GetPoolId() uint64 { + if m != nil { + return m.PoolId + } + return 0 +} + +func (m *QueryExitSwapShareAmountInRequest) GetTokenOutDenom() string { + if m != nil { + return m.TokenOutDenom + } + return "" +} + +type QueryExitSwapShareAmountInResponse struct { + TokenOutAmount uint64 `protobuf:"varint,1,opt,name=token_out_amount,json=tokenOutAmount,proto3" json:"token_out_amount,omitempty"` +} + +func (m *QueryExitSwapShareAmountInResponse) Reset() { *m = QueryExitSwapShareAmountInResponse{} } +func (m *QueryExitSwapShareAmountInResponse) String() string { return proto.CompactTextString(m) } +func (*QueryExitSwapShareAmountInResponse) ProtoMessage() {} +func (*QueryExitSwapShareAmountInResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_d9a717df9ca609ef, []int{11} +} +func (m *QueryExitSwapShareAmountInResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryExitSwapShareAmountInResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryExitSwapShareAmountInResponse.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 *QueryExitSwapShareAmountInResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryExitSwapShareAmountInResponse.Merge(m, src) +} +func (m *QueryExitSwapShareAmountInResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryExitSwapShareAmountInResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryExitSwapShareAmountInResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryExitSwapShareAmountInResponse proto.InternalMessageInfo + +func (m *QueryExitSwapShareAmountInResponse) GetTokenOutAmount() uint64 { + if m != nil { + return m.TokenOutAmount + } + return 0 +} + // =============================== PoolParams type QueryPoolParamsRequest struct { PoolId uint64 `protobuf:"varint,1,opt,name=pool_id,json=poolId,proto3" json:"pool_id,omitempty" yaml:"pool_id"` @@ -491,7 +589,7 @@ func (m *QueryPoolParamsRequest) Reset() { *m = QueryPoolParamsRequest{} func (m *QueryPoolParamsRequest) String() string { return proto.CompactTextString(m) } func (*QueryPoolParamsRequest) ProtoMessage() {} func (*QueryPoolParamsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_d9a717df9ca609ef, []int{10} + return fileDescriptor_d9a717df9ca609ef, []int{12} } func (m *QueryPoolParamsRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -535,7 +633,7 @@ func (m *QueryPoolParamsResponse) Reset() { *m = QueryPoolParamsResponse func (m *QueryPoolParamsResponse) String() string { return proto.CompactTextString(m) } func (*QueryPoolParamsResponse) ProtoMessage() {} func (*QueryPoolParamsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_d9a717df9ca609ef, []int{11} + return fileDescriptor_d9a717df9ca609ef, []int{13} } func (m *QueryPoolParamsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -580,7 +678,7 @@ func (m *QueryTotalPoolLiquidityRequest) Reset() { *m = QueryTotalPoolLi func (m *QueryTotalPoolLiquidityRequest) String() string { return proto.CompactTextString(m) } func (*QueryTotalPoolLiquidityRequest) ProtoMessage() {} func (*QueryTotalPoolLiquidityRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_d9a717df9ca609ef, []int{12} + return fileDescriptor_d9a717df9ca609ef, []int{14} } func (m *QueryTotalPoolLiquidityRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -624,7 +722,7 @@ func (m *QueryTotalPoolLiquidityResponse) Reset() { *m = QueryTotalPoolL func (m *QueryTotalPoolLiquidityResponse) String() string { return proto.CompactTextString(m) } func (*QueryTotalPoolLiquidityResponse) ProtoMessage() {} func (*QueryTotalPoolLiquidityResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_d9a717df9ca609ef, []int{13} + return fileDescriptor_d9a717df9ca609ef, []int{15} } func (m *QueryTotalPoolLiquidityResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -669,7 +767,7 @@ func (m *QueryTotalSharesRequest) Reset() { *m = QueryTotalSharesRequest func (m *QueryTotalSharesRequest) String() string { return proto.CompactTextString(m) } func (*QueryTotalSharesRequest) ProtoMessage() {} func (*QueryTotalSharesRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_d9a717df9ca609ef, []int{14} + return fileDescriptor_d9a717df9ca609ef, []int{16} } func (m *QueryTotalSharesRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -713,7 +811,7 @@ func (m *QueryTotalSharesResponse) Reset() { *m = QueryTotalSharesRespon func (m *QueryTotalSharesResponse) String() string { return proto.CompactTextString(m) } func (*QueryTotalSharesResponse) ProtoMessage() {} func (*QueryTotalSharesResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_d9a717df9ca609ef, []int{15} + return fileDescriptor_d9a717df9ca609ef, []int{17} } func (m *QueryTotalSharesResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -761,7 +859,7 @@ func (m *QuerySpotPriceRequest) Reset() { *m = QuerySpotPriceRequest{} } func (m *QuerySpotPriceRequest) String() string { return proto.CompactTextString(m) } func (*QuerySpotPriceRequest) ProtoMessage() {} func (*QuerySpotPriceRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_d9a717df9ca609ef, []int{16} + return fileDescriptor_d9a717df9ca609ef, []int{18} } func (m *QuerySpotPriceRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -822,7 +920,7 @@ func (m *QuerySpotPriceResponse) Reset() { *m = QuerySpotPriceResponse{} func (m *QuerySpotPriceResponse) String() string { return proto.CompactTextString(m) } func (*QuerySpotPriceResponse) ProtoMessage() {} func (*QuerySpotPriceResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_d9a717df9ca609ef, []int{17} + return fileDescriptor_d9a717df9ca609ef, []int{19} } func (m *QuerySpotPriceResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -870,7 +968,7 @@ func (m *QuerySwapExactAmountInRequest) Reset() { *m = QuerySwapExactAmo func (m *QuerySwapExactAmountInRequest) String() string { return proto.CompactTextString(m) } func (*QuerySwapExactAmountInRequest) ProtoMessage() {} func (*QuerySwapExactAmountInRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_d9a717df9ca609ef, []int{18} + return fileDescriptor_d9a717df9ca609ef, []int{20} } func (m *QuerySwapExactAmountInRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -935,7 +1033,7 @@ func (m *QuerySwapExactAmountInResponse) Reset() { *m = QuerySwapExactAm func (m *QuerySwapExactAmountInResponse) String() string { return proto.CompactTextString(m) } func (*QuerySwapExactAmountInResponse) ProtoMessage() {} func (*QuerySwapExactAmountInResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_d9a717df9ca609ef, []int{19} + return fileDescriptor_d9a717df9ca609ef, []int{21} } func (m *QuerySwapExactAmountInResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -976,7 +1074,7 @@ func (m *QuerySwapExactAmountOutRequest) Reset() { *m = QuerySwapExactAm func (m *QuerySwapExactAmountOutRequest) String() string { return proto.CompactTextString(m) } func (*QuerySwapExactAmountOutRequest) ProtoMessage() {} func (*QuerySwapExactAmountOutRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_d9a717df9ca609ef, []int{20} + return fileDescriptor_d9a717df9ca609ef, []int{22} } func (m *QuerySwapExactAmountOutRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1041,7 +1139,7 @@ func (m *QuerySwapExactAmountOutResponse) Reset() { *m = QuerySwapExactA func (m *QuerySwapExactAmountOutResponse) String() string { return proto.CompactTextString(m) } func (*QuerySwapExactAmountOutResponse) ProtoMessage() {} func (*QuerySwapExactAmountOutResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_d9a717df9ca609ef, []int{21} + return fileDescriptor_d9a717df9ca609ef, []int{23} } func (m *QuerySwapExactAmountOutResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1077,7 +1175,7 @@ func (m *QueryTotalLiquidityRequest) Reset() { *m = QueryTotalLiquidityR func (m *QueryTotalLiquidityRequest) String() string { return proto.CompactTextString(m) } func (*QueryTotalLiquidityRequest) ProtoMessage() {} func (*QueryTotalLiquidityRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_d9a717df9ca609ef, []int{22} + return fileDescriptor_d9a717df9ca609ef, []int{24} } func (m *QueryTotalLiquidityRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1114,7 +1212,7 @@ func (m *QueryTotalLiquidityResponse) Reset() { *m = QueryTotalLiquidity func (m *QueryTotalLiquidityResponse) String() string { return proto.CompactTextString(m) } func (*QueryTotalLiquidityResponse) ProtoMessage() {} func (*QueryTotalLiquidityResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_d9a717df9ca609ef, []int{23} + return fileDescriptor_d9a717df9ca609ef, []int{25} } func (m *QueryTotalLiquidityResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1161,6 +1259,8 @@ func init() { proto.RegisterType((*QueryPoolTypeResponse)(nil), "osmosis.gamm.v1beta1.QueryPoolTypeResponse") proto.RegisterType((*QueryJoinSwapExactAmountInRequest)(nil), "osmosis.gamm.v1beta1.QueryJoinSwapExactAmountInRequest") proto.RegisterType((*QueryJoinSwapExactAmountInResponse)(nil), "osmosis.gamm.v1beta1.QueryJoinSwapExactAmountInResponse") + proto.RegisterType((*QueryExitSwapShareAmountInRequest)(nil), "osmosis.gamm.v1beta1.QueryExitSwapShareAmountInRequest") + proto.RegisterType((*QueryExitSwapShareAmountInResponse)(nil), "osmosis.gamm.v1beta1.QueryExitSwapShareAmountInResponse") proto.RegisterType((*QueryPoolParamsRequest)(nil), "osmosis.gamm.v1beta1.QueryPoolParamsRequest") proto.RegisterType((*QueryPoolParamsResponse)(nil), "osmosis.gamm.v1beta1.QueryPoolParamsResponse") proto.RegisterType((*QueryTotalPoolLiquidityRequest)(nil), "osmosis.gamm.v1beta1.QueryTotalPoolLiquidityRequest") @@ -1180,99 +1280,107 @@ func init() { func init() { proto.RegisterFile("osmosis/gamm/v1beta1/query.proto", fileDescriptor_d9a717df9ca609ef) } var fileDescriptor_d9a717df9ca609ef = []byte{ - // 1467 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x57, 0xcf, 0x6f, 0x1b, 0xc5, - 0x17, 0xcf, 0xa6, 0x49, 0x1a, 0x4f, 0xbe, 0xcd, 0x8f, 0x69, 0xd2, 0xba, 0x4e, 0x6b, 0xb7, 0xf3,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dd, 0x88, 0x47, 0xcc, 0x51, 0xb9, 0xb4, 0xee, 0x43, 0x78, 0xb2, 0x82, - 0x0e, 0x85, 0x22, 0x6d, 0x58, 0x25, 0xab, 0xc8, 0x7a, 0xd2, 0xfa, 0x2a, 0x3a, 0xbc, 0x07, 0x06, - 0xd2, 0x9a, 0x43, 0x43, 0x9e, 0x5c, 0x89, 0x6b, 0x6d, 0x13, 0x7c, 0xc8, 0x2b, 0x28, 0x2d, 0x81, - 0x6e, 0x52, 0x6e, 0x15, 0x04, 0xda, 0xcb, 0xce, 0xae, 0xef, 0x6c, 0x3b, 0xbc, 0xdc, 0x13, 0xaf, - 0xcf, 0x35, 0x94, 0x69, 0x89, 0x07, 0x04, 0xef, 0xa1, 0x44, 0x21, 0x58, 0x84, 0xa6, 0x8e, 0x39, - 0x08, 0x57, 0x84, 0x16, 0xd1, 0x69, 0x0d, 0x77, 0x92, 0xae, 0x0e, 0x47, 0x14, 0x91, 0xac, 0x42, - 0xe9, 0x24, 0xc3, 0x1b, 0x42, 0x9d, 0xde, 0x24, 0xf0, 0x51, 0x72, 0x2f, 0x0e, 0xa4, 0xf8, 0x06, - 0xfa, 0x1f, 0x17, 0xcb, 0x39, 0xa9, 0x7e, 0xa0, 0x44, 0x4c, 0x96, 0xd3, 0x90, 0xe5, 0x41, 0x15, - 0xac, 0x76, 0x33, 0x31, 0x47, 0x78, 0x14, 0x82, 0xfc, 0xa1, 0x41, 0x9b, 0xdf, 0xf0, 0x28, 0xdf, - 0x28, 0x39, 0x5b, 0x3d, 0x5d, 0x16, 0x78, 0x05, 0x8d, 0x0b, 0x16, 0x39, 0x8b, 0x31, 0x9b, 0xe7, - 0xb6, 0x6d, 0x97, 0x16, 0xe5, 0x25, 0x99, 0x58, 0x9e, 0x8e, 0x8e, 0x73, 0xa3, 0x07, 0x31, 0x47, - 0xc5, 0xd2, 0x25, 0xb1, 0x72, 0x45, 0x2c, 0xe0, 0x6b, 0x68, 0x62, 0xd7, 0xa7, 0xbc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 0xdc, 0xe3, 0x89, 0x10, 0x9b, 0x19, 0xfe, 0x41, 0x43, 0x47, 0x56, 0x18, 0x77, 0x8a, 0x16, - 0xb7, 0xf7, 0xb6, 0xd1, 0xb9, 0x38, 0x06, 0xad, 0x5a, 0x68, 0xa9, 0xbb, 0x4d, 0x40, 0x7f, 0x45, - 0xd2, 0xbf, 0x88, 0x5f, 0x68, 0x4e, 0x3f, 0x22, 0x6e, 0x03, 0x5b, 0x83, 0xdd, 0xb1, 0xbc, 0x9c, - 0x2d, 0xc0, 0xe0, 0xfd, 0xce, 0x39, 0x2e, 0xfe, 0x51, 0x43, 0xa9, 0x16, 0xf9, 0xac, 0xfb, 0x1c, - 0x77, 0xc1, 0x2d, 0x9a, 0xc0, 0x62, 0x4f, 0x7a, 0xeb, 0x81, 0x85, 0xac, 0xca, 0x94, 0x5e, 0xc2, - 0x2f, 0xfe, 0x8d, 0x94, 0xa8, 0xcf, 0x97, 0xd7, 0x1e, 0x3d, 0x49, 0x6b, 0x8f, 0x9f, 0xa4, 0xb5, - 0xdf, 0x9e, 0xa4, 0xb5, 0x0f, 0x9f, 0xa6, 0xfb, 0x1e, 0x3f, 0x4d, 0xf7, 0xfd, 0xfc, 0x34, 0xdd, - 0xf7, 0xe6, 0xd9, 0x9a, 0xc1, 0x00, 0x62, 0xcc, 0x17, 0xac, 0x4d, 0x16, 0x06, 0xbc, 0xbd, 0xb0, - 0x68, 0xdc, 0x55, 0x61, 0xe5, 0x98, 0xb0, 0x39, 0x24, 0xff, 0x17, 0x3e, 0xf7, 0x57, 0x00, 0x00, - 0x00, 0xff, 0xff, 0x9b, 0x47, 0x8e, 0xc2, 0x68, 0x14, 0x00, 0x00, + // 1594 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x98, 0xcd, 0x6f, 0x1b, 0x45, + 0x14, 0xc0, 0xb3, 0xa9, 0x93, 0xc6, 0x13, 0xf2, 0x35, 0x4d, 0x5a, 0xd7, 0x69, 0xed, 0x76, 0x10, + 0x49, 0xda, 0x26, 0xbb, 0x4d, 0x9a, 0x8a, 0x2a, 0x02, 0xda, 0xa4, 0x4d, 0x5a, 0x47, 0xd0, 0x84, + 0x6d, 0x05, 0x02, 0x0e, 0xd6, 0x26, 0x59, 0x9c, 0xa5, 0xf1, 0xce, 0x26, 0x3b, 0xdb, 0x26, 0x42, + 0x15, 0x12, 0x42, 0x9c, 0x38, 0x20, 0x15, 0x90, 0x90, 0x2a, 0xc1, 0x81, 0x03, 0xe2, 0xcc, 0x01, + 0x71, 0x47, 0xaa, 0x10, 0x48, 0x45, 0xbd, 0x20, 0x24, 0x0c, 0x6a, 0x39, 0x70, 0xce, 0x3f, 0x00, + 0x9a, 0x99, 0xb7, 0x1f, 0x76, 0xd6, 0x6b, 0x3b, 0x15, 0x12, 0xa7, 0x78, 0xe7, 0xbd, 0x79, 0xf3, + 0x7b, 0xef, 0xcd, 0xbc, 0x79, 0x13, 0x74, 0x82, 0xba, 0x65, 0xea, 0x5a, 0xae, 0x56, 0x32, 0xca, + 0x65, 0xed, 0xf6, 0xe4, 0x8a, 0xc9, 0x8c, 0x49, 0x6d, 0xd3, 0x33, 0xb7, 0x76, 0x54, 0x67, 0x8b, + 0x32, 0x8a, 0x07, 0x41, 0x43, 0xe5, 0x1a, 0x2a, 0x68, 0x64, 0x07, 0x4b, 0xb4, 0x44, 0x85, 0x82, + 0xc6, 0x7f, 0x49, 0xdd, 0xec, 0xf1, 0x58, 0x6b, 0x6c, 0x1b, 0xc4, 0xb9, 0x55, 0x21, 0xd7, 0x56, + 0x0c, 0xd7, 0x0c, 0xa4, 0xab, 0xd4, 0xb2, 0x41, 0x7e, 0x3a, 0x2a, 0x17, 0x0c, 0x81, 0x96, 0x63, + 0x94, 0x2c, 0xdb, 0x60, 0x16, 0xf5, 0x75, 0x8f, 0x95, 0x28, 0x2d, 0x6d, 0x98, 0x9a, 0xe1, 0x58, + 0x9a, 0x61, 0xdb, 0x94, 0x09, 0xa1, 0x0b, 0xd2, 0xa3, 0x20, 0x15, 0x5f, 0x2b, 0xde, 0xdb, 0x9a, + 0x61, 0xef, 0xf8, 0x22, 0xb9, 0x48, 0x51, 0xc2, 0xcb, 0x0f, 0x29, 0x22, 0x17, 0x51, 0xff, 0xab, + 0x7c, 0xd5, 0x65, 0x4a, 0x37, 0x74, 0x73, 0xd3, 0x33, 0x5d, 0x86, 0xcf, 0xa0, 0x83, 0x0e, 0xa5, + 0x1b, 0x45, 0x6b, 0x2d, 0xa3, 0x9c, 0x50, 0xc6, 0x52, 0x73, 0x78, 0xb7, 0x92, 0xef, 0xdd, 0x31, + 0xca, 0x1b, 0x33, 0x04, 0x04, 0x44, 0xef, 0xe4, 0xbf, 0x0a, 0x6b, 0xe4, 0x1a, 0x1a, 0x88, 0x18, + 0x70, 0x1d, 0x6a, 0xbb, 0x26, 0x3e, 0x87, 0x52, 0x5c, 0x2c, 0xa6, 0x77, 0x4f, 0x0d, 0xaa, 0x12, + 0x4d, 0xf5, 0xd1, 0xd4, 0x59, 0x7b, 0x67, 0x2e, 0xfd, 0xe3, 0xb7, 0x13, 0x1d, 0x7c, 0x56, 0x41, + 0x17, 0xca, 0xe4, 0xad, 0x88, 0x25, 0xd7, 0x67, 0x59, 0x40, 0x28, 0x8c, 0x43, 0xa6, 0x5d, 0xd8, + 0x1b, 0x51, 0xc1, 0x05, 0x1e, 0x34, 0x55, 0x26, 0x0e, 0x82, 0xa6, 0x2e, 0x1b, 0x25, 0x13, 0xe6, + 0xea, 0x91, 0x99, 0xe4, 0x13, 0x05, 0xe1, 0xa8, 0x75, 0x00, 0x3d, 0x8f, 0x3a, 0xf8, 0xda, 0x6e, + 0x46, 0x39, 0x71, 0xa0, 0x19, 0x52, 0xa9, 0x8d, 0xaf, 0xc6, 0x50, 0x8d, 0x36, 0xa4, 0x92, 0x6b, + 0x56, 0x61, 0x1d, 0x46, 0x83, 0x82, 0xea, 0xba, 0x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c5, 0x78, 0xfc, 0xc8, 0xf9, 0x03, + 0x5a, 0x2d, 0x52, 0x52, 0xc2, 0x33, 0xf8, 0x8b, 0x82, 0xb2, 0x75, 0xfc, 0x59, 0xf2, 0x18, 0x6e, + 0x81, 0x2d, 0xec, 0x4b, 0x13, 0x77, 0x7a, 0xfd, 0x36, 0x8e, 0x2c, 0x08, 0x97, 0x2e, 0xe1, 0x97, + 0x9e, 0xc2, 0x25, 0xea, 0xb1, 0xb9, 0xc5, 0x07, 0x8f, 0x73, 0xca, 0xc3, 0xc7, 0x39, 0xe5, 0xcf, + 0xc7, 0x39, 0xe5, 0xe3, 0x27, 0xb9, 0xb6, 0x87, 0x4f, 0x72, 0x6d, 0xbf, 0x3e, 0xc9, 0xb5, 0xbd, + 0x79, 0x36, 0xd2, 0x2e, 0xc1, 0x1a, 0x13, 0x1b, 0xc6, 0x8a, 0x1b, 0x2c, 0x78, 0x7b, 0x72, 0x4a, + 0xdb, 0x96, 0xcb, 0x8a, 0xe6, 0x69, 0xa5, 0x53, 0xfc, 0x87, 0xe0, 0xdc, 0xbf, 0x01, 0x00, 0x00, + 0xff, 0xff, 0xea, 0xac, 0xe0, 0x88, 0x89, 0x16, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1297,6 +1405,7 @@ type QueryClient interface { // Errors if the pool is failed to be type caseted. PoolType(ctx context.Context, in *QueryPoolTypeRequest, opts ...grpc.CallOption) (*QueryPoolTypeResponse, error) JoinSwapExactAmountIn(ctx context.Context, in *QueryJoinSwapExactAmountInRequest, opts ...grpc.CallOption) (*QueryJoinSwapExactAmountInResponse, error) + ExitSwapShareAmountIn(ctx context.Context, in *QueryExitSwapShareAmountInRequest, opts ...grpc.CallOption) (*QueryExitSwapShareAmountInResponse, error) PoolParams(ctx context.Context, in *QueryPoolParamsRequest, opts ...grpc.CallOption) (*QueryPoolParamsResponse, error) TotalPoolLiquidity(ctx context.Context, in *QueryTotalPoolLiquidityRequest, opts ...grpc.CallOption) (*QueryTotalPoolLiquidityResponse, error) TotalShares(ctx context.Context, in *QueryTotalSharesRequest, opts ...grpc.CallOption) (*QueryTotalSharesResponse, error) @@ -1370,6 +1479,15 @@ func (c *queryClient) JoinSwapExactAmountIn(ctx context.Context, in *QueryJoinSw return out, nil } +func (c *queryClient) ExitSwapShareAmountIn(ctx context.Context, in *QueryExitSwapShareAmountInRequest, opts ...grpc.CallOption) (*QueryExitSwapShareAmountInResponse, error) { + out := new(QueryExitSwapShareAmountInResponse) + err := c.cc.Invoke(ctx, "/osmosis.gamm.v1beta1.Query/ExitSwapShareAmountIn", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *queryClient) PoolParams(ctx context.Context, in *QueryPoolParamsRequest, opts ...grpc.CallOption) (*QueryPoolParamsResponse, error) { out := new(QueryPoolParamsResponse) err := c.cc.Invoke(ctx, "/osmosis.gamm.v1beta1.Query/PoolParams", in, out, opts...) @@ -1436,6 +1554,7 @@ type QueryServer interface { // Errors if the pool is failed to be type caseted. PoolType(context.Context, *QueryPoolTypeRequest) (*QueryPoolTypeResponse, error) JoinSwapExactAmountIn(context.Context, *QueryJoinSwapExactAmountInRequest) (*QueryJoinSwapExactAmountInResponse, error) + ExitSwapShareAmountIn(context.Context, *QueryExitSwapShareAmountInRequest) (*QueryExitSwapShareAmountInResponse, error) PoolParams(context.Context, *QueryPoolParamsRequest) (*QueryPoolParamsResponse, error) TotalPoolLiquidity(context.Context, *QueryTotalPoolLiquidityRequest) (*QueryTotalPoolLiquidityResponse, error) TotalShares(context.Context, *QueryTotalSharesRequest) (*QueryTotalSharesResponse, error) @@ -1469,6 +1588,9 @@ func (*UnimplementedQueryServer) PoolType(ctx context.Context, req *QueryPoolTyp func (*UnimplementedQueryServer) JoinSwapExactAmountIn(ctx context.Context, req *QueryJoinSwapExactAmountInRequest) (*QueryJoinSwapExactAmountInResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method JoinSwapExactAmountIn not implemented") } +func (*UnimplementedQueryServer) ExitSwapShareAmountIn(ctx context.Context, req *QueryExitSwapShareAmountInRequest) (*QueryExitSwapShareAmountInResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ExitSwapShareAmountIn not implemented") +} func (*UnimplementedQueryServer) PoolParams(ctx context.Context, req *QueryPoolParamsRequest) (*QueryPoolParamsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method PoolParams not implemented") } @@ -1600,6 +1722,24 @@ func _Query_JoinSwapExactAmountIn_Handler(srv interface{}, ctx context.Context, return interceptor(ctx, in, info, handler) } +func _Query_ExitSwapShareAmountIn_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryExitSwapShareAmountInRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).ExitSwapShareAmountIn(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/osmosis.gamm.v1beta1.Query/ExitSwapShareAmountIn", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).ExitSwapShareAmountIn(ctx, req.(*QueryExitSwapShareAmountInRequest)) + } + return interceptor(ctx, in, info, handler) +} + func _Query_PoolParams_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(QueryPoolParamsRequest) if err := dec(in); err != nil { @@ -1736,6 +1876,10 @@ var _Query_serviceDesc = grpc.ServiceDesc{ MethodName: "JoinSwapExactAmountIn", Handler: _Query_JoinSwapExactAmountIn_Handler, }, + { + MethodName: "ExitSwapShareAmountIn", + Handler: _Query_ExitSwapShareAmountIn_Handler, + }, { MethodName: "PoolParams", Handler: _Query_PoolParams_Handler, @@ -2096,6 +2240,81 @@ func (m *QueryJoinSwapExactAmountInResponse) MarshalToSizedBuffer(dAtA []byte) ( return len(dAtA) - i, nil } +func (m *QueryExitSwapShareAmountInRequest) 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 *QueryExitSwapShareAmountInRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryExitSwapShareAmountInRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.ShareInAmount != nil { + { + size := m.ShareInAmount.Size() + i -= size + if _, err := m.ShareInAmount.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + if len(m.TokenOutDenom) > 0 { + i -= len(m.TokenOutDenom) + copy(dAtA[i:], m.TokenOutDenom) + i = encodeVarintQuery(dAtA, i, uint64(len(m.TokenOutDenom))) + i-- + dAtA[i] = 0x12 + } + if m.PoolId != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.PoolId)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *QueryExitSwapShareAmountInResponse) 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 *QueryExitSwapShareAmountInResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryExitSwapShareAmountInResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.TokenOutAmount != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.TokenOutAmount)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + func (m *QueryPoolParamsRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -2738,6 +2957,38 @@ func (m *QueryJoinSwapExactAmountInResponse) Size() (n int) { return n } +func (m *QueryExitSwapShareAmountInRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.PoolId != 0 { + n += 1 + sovQuery(uint64(m.PoolId)) + } + l = len(m.TokenOutDenom) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + if m.ShareInAmount != nil { + l = m.ShareInAmount.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryExitSwapShareAmountInResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.TokenOutAmount != 0 { + n += 1 + sovQuery(uint64(m.TokenOutAmount)) + } + return n +} + func (m *QueryPoolParamsRequest) Size() (n int) { if m == nil { return 0 @@ -3768,6 +4019,212 @@ func (m *QueryJoinSwapExactAmountInResponse) Unmarshal(dAtA []byte) error { } return nil } +func (m *QueryExitSwapShareAmountInRequest) 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: QueryExitSwapShareAmountInRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryExitSwapShareAmountInRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field PoolId", wireType) + } + m.PoolId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.PoolId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TokenOutDenom", 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.TokenOutDenom = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ShareInAmount", 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 + } + var v github_com_cosmos_cosmos_sdk_types.Int + m.ShareInAmount = &v + if err := m.ShareInAmount.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 *QueryExitSwapShareAmountInResponse) 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: QueryExitSwapShareAmountInResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryExitSwapShareAmountInResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field TokenOutAmount", wireType) + } + m.TokenOutAmount = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.TokenOutAmount |= 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 *QueryPoolParamsRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 diff --git a/x/gamm/types/query.pb.gw.go b/x/gamm/types/query.pb.gw.go index dda499c40fc..2583b43a2ad 100644 --- a/x/gamm/types/query.pb.gw.go +++ b/x/gamm/types/query.pb.gw.go @@ -213,6 +213,150 @@ func local_request_Query_PoolType_0(ctx context.Context, marshaler runtime.Marsh } +var ( + filter_Query_JoinSwapExactAmountIn_0 = &utilities.DoubleArray{Encoding: map[string]int{"pool_id": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} +) + +func request_Query_JoinSwapExactAmountIn_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryJoinSwapExactAmountInRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["pool_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "pool_id") + } + + protoReq.PoolId, err = runtime.Uint64(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "pool_id", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_JoinSwapExactAmountIn_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.JoinSwapExactAmountIn(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_JoinSwapExactAmountIn_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryJoinSwapExactAmountInRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["pool_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "pool_id") + } + + protoReq.PoolId, err = runtime.Uint64(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "pool_id", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_JoinSwapExactAmountIn_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.JoinSwapExactAmountIn(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_Query_ExitSwapShareAmountIn_0 = &utilities.DoubleArray{Encoding: map[string]int{"pool_id": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} +) + +func request_Query_ExitSwapShareAmountIn_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryExitSwapShareAmountInRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["pool_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "pool_id") + } + + protoReq.PoolId, err = runtime.Uint64(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "pool_id", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_ExitSwapShareAmountIn_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.ExitSwapShareAmountIn(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_ExitSwapShareAmountIn_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryExitSwapShareAmountInRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["pool_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "pool_id") + } + + protoReq.PoolId, err = runtime.Uint64(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "pool_id", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_ExitSwapShareAmountIn_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.ExitSwapShareAmountIn(ctx, &protoReq) + return msg, metadata, err + +} + func request_Query_PoolParams_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq QueryPoolParamsRequest var metadata runtime.ServerMetadata @@ -712,6 +856,52 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv }) + mux.Handle("GET", pattern_Query_JoinSwapExactAmountIn_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_JoinSwapExactAmountIn_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_JoinSwapExactAmountIn_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_ExitSwapShareAmountIn_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_ExitSwapShareAmountIn_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_ExitSwapShareAmountIn_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("GET", pattern_Query_PoolParams_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -991,6 +1181,46 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie }) + mux.Handle("GET", pattern_Query_JoinSwapExactAmountIn_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_JoinSwapExactAmountIn_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_JoinSwapExactAmountIn_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_ExitSwapShareAmountIn_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_ExitSwapShareAmountIn_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_ExitSwapShareAmountIn_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("GET", pattern_Query_PoolParams_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -1125,6 +1355,10 @@ var ( pattern_Query_PoolType_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"osmosis", "gamm", "v1beta1", "pool_type", "pool_id"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_JoinSwapExactAmountIn_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5}, []string{"osmosis", "gamm", "v1beta1", "pools", "pool_id", "join_swap_exact_in"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_ExitSwapShareAmountIn_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5}, []string{"osmosis", "gamm", "v1beta1", "pools", "pool_id", "exit_swap_share_amount_in"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_PoolParams_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5}, []string{"osmosis", "gamm", "v1beta1", "pools", "pool_id", "params"}, "", runtime.AssumeColonVerbOpt(false))) pattern_Query_TotalPoolLiquidity_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5}, []string{"osmosis", "gamm", "v1beta1", "pools", "pool_id", "total_pool_liquidity"}, "", runtime.AssumeColonVerbOpt(false))) @@ -1149,6 +1383,10 @@ var ( forward_Query_PoolType_0 = runtime.ForwardResponseMessage + forward_Query_JoinSwapExactAmountIn_0 = runtime.ForwardResponseMessage + + forward_Query_ExitSwapShareAmountIn_0 = runtime.ForwardResponseMessage + forward_Query_PoolParams_0 = runtime.ForwardResponseMessage forward_Query_TotalPoolLiquidity_0 = runtime.ForwardResponseMessage From ccb22ed3f56d3e7c28f7f5d4a41ef206e44a4c28 Mon Sep 17 00:00:00 2001 From: Ruslan Akhtariev Date: Mon, 10 Oct 2022 16:11:26 +0700 Subject: [PATCH 10/59] JoinSwapExactAmountIn, ExitSwapShareAmountIn queries --- go.mod | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/go.mod b/go.mod index bd423c270dc..53e7fb4bfa1 100644 --- a/go.mod +++ b/go.mod @@ -5,7 +5,7 @@ go 1.18 require ( github.com/CosmWasm/wasmd v0.28.0-osmo-v12 github.com/cosmos/cosmos-proto v1.0.0-alpha7 - github.com/cosmos/cosmos-sdk v0.46.2 + github.com/cosmos/cosmos-sdk v0.46.1 github.com/cosmos/go-bip39 v1.0.0 github.com/cosmos/iavl v0.19.1 github.com/cosmos/ibc-go/v3 v3.3.0 From 1c1d9677e734c9752b8269dd6368fabbceb40267 Mon Sep 17 00:00:00 2001 From: Ruslan Akhtariev Date: Mon, 10 Oct 2022 16:12:29 +0700 Subject: [PATCH 11/59] JoinSwapExactAmountIn, ExitSwapShareAmountIn queries --- x/gamm/keeper/grpc_query.go | 1 - 1 file changed, 1 deletion(-) diff --git a/x/gamm/keeper/grpc_query.go b/x/gamm/keeper/grpc_query.go index 89d0dadf86c..faac0b9710a 100644 --- a/x/gamm/keeper/grpc_query.go +++ b/x/gamm/keeper/grpc_query.go @@ -15,7 +15,6 @@ import ( "github.com/cosmos/cosmos-sdk/types/query" "github.com/osmosis-labs/osmosis/v12/x/gamm/pool-models/balancer" - // "github.com/osmosis-labs/osmosis/v12/x/gamm/pool-models/internal/cfmm_common" "github.com/osmosis-labs/osmosis/v12/x/gamm/types" ) From 61cca1eba75b778404f956611d452bace86048e0 Mon Sep 17 00:00:00 2001 From: Ruslan Akhtariev Date: Mon, 10 Oct 2022 16:21:37 +0700 Subject: [PATCH 12/59] JoinSwapExactAmountIn, ExitSwapShareAmountIn queries --- x/gamm/keeper/grpc_query.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x/gamm/keeper/grpc_query.go b/x/gamm/keeper/grpc_query.go index faac0b9710a..90615c22ac7 100644 --- a/x/gamm/keeper/grpc_query.go +++ b/x/gamm/keeper/grpc_query.go @@ -196,7 +196,7 @@ func (q Querier) ExitSwapShareAmountIn(ctx context.Context, req *types.QueryExit return &types.QueryExitSwapShareAmountInResponse{TokenOutAmount: coin.Amount.Uint64()}, nil } } - return nil, nil + return &types.QueryExitSwapShareAmountInResponse{}, nil } // PoolParams queries a specified pool for its params. From 6b2f1b90b274d5ed1061d4f2c8f7165ea59b1978 Mon Sep 17 00:00:00 2001 From: Ruslan Akhtariev Date: Mon, 10 Oct 2022 16:26:21 +0700 Subject: [PATCH 13/59] JoinSwapExactAmountIn, ExitSwapShareAmountIn queries --- x/gamm/keeper/grpc_query_test.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/x/gamm/keeper/grpc_query_test.go b/x/gamm/keeper/grpc_query_test.go index 8e7f1a3eede..9301eabe291 100644 --- a/x/gamm/keeper/grpc_query_test.go +++ b/x/gamm/keeper/grpc_query_test.go @@ -28,10 +28,11 @@ func (suite *KeeperTestSuite) TestJoinSwapExactAmountIn() { poolId := suite.PrepareBalancerPool() - _, err := queryClient.JoinSwapExactAmountIn(gocontext.Background(), &types.QueryJoinSwapExactAmountInRequest{ + out, err := queryClient.JoinSwapExactAmountIn(gocontext.Background(), &types.QueryJoinSwapExactAmountInRequest{ PoolId: poolId, TokensIn: sdk.NewCoins(sdk.NewCoin("foo", sdk.NewInt(500))), }) + suite.Require().NotNil(out) suite.Require().NoError(err) } func (suite *KeeperTestSuite) TestQueryPool() { From de6441e70790739686c537a123c8c8e3ac971a3d Mon Sep 17 00:00:00 2001 From: Ruslan Akhtariev Date: Mon, 10 Oct 2022 16:34:19 +0700 Subject: [PATCH 14/59] JoinSwapExactAmountIn, ExitSwapShareAmountIn queries --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a7eed7859c5..a2442598497 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -45,6 +45,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Features * [#2739](https://github.com/osmosis-labs/osmosis/pull/2739) Add pool type query +* [#2956](https://github.com/osmosis-labs/osmosis/issues/2956) Add queries for calculating amount of tokens/shares by providing X shares/tokens when entering/exiting pool ### Bug fixes From 629733e1c0b8f722ab9a31aeb3c36f37f6fe01ec Mon Sep 17 00:00:00 2001 From: Ruslan Akhtariev Date: Mon, 10 Oct 2022 16:36:46 +0700 Subject: [PATCH 15/59] JoinSwapExactAmountIn, ExitSwapShareAmountIn queries --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a2442598497..d09c8799269 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -45,7 +45,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Features * [#2739](https://github.com/osmosis-labs/osmosis/pull/2739) Add pool type query -* [#2956](https://github.com/osmosis-labs/osmosis/issues/2956) Add queries for calculating amount of tokens/shares by providing X shares/tokens when entering/exiting pool +* [#2956](https://github.com/osmosis-labs/osmosis/issues/2956) Add queries for calculating amount of shares/tokens you get by providing X tokens/shares when entering/exiting a pool ### Bug fixes From a74afda9ccade783fcaa4c72f8b867d43e55c925 Mon Sep 17 00:00:00 2001 From: Ruslan Akhtariev Date: Fri, 14 Oct 2022 18:16:17 +0700 Subject: [PATCH 16/59] save --- proto/osmosis/gamm/v1beta1/query.proto | 32 +- x/gamm/keeper/grpc_query.go | 29 +- x/gamm/keeper/grpc_query_test.go | 83 +++- x/gamm/types/query.pb.go | 550 ++++++++++++++----------- x/gamm/types/query.pb.gw.go | 68 +-- 5 files changed, 447 insertions(+), 315 deletions(-) diff --git a/proto/osmosis/gamm/v1beta1/query.proto b/proto/osmosis/gamm/v1beta1/query.proto index 3e4d8b834b2..c29aeb4c8da 100644 --- a/proto/osmosis/gamm/v1beta1/query.proto +++ b/proto/osmosis/gamm/v1beta1/query.proto @@ -38,13 +38,13 @@ service Query { option (google.api.http).get = "/osmosis/gamm/v1beta1/pool_type/{pool_id}"; } - rpc JoinSwapExactAmountIn(QueryJoinSwapExactAmountInRequest) - returns (QueryJoinSwapExactAmountInResponse) { + rpc CalcJoinPoolShares(QueryCalcJoinPoolSharesRequest) + returns (QueryCalcJoinPoolSharesResponse) { option (google.api.http).get = "/osmosis/gamm/v1beta1/pools/{pool_id}/join_swap_exact_in"; } - rpc ExitSwapShareAmountIn(QueryExitSwapShareAmountInRequest) - returns (QueryExitSwapShareAmountInResponse) { + rpc CalcExitPoolCoinsFromShares(QueryCalcExitPoolCoinsFromSharesRequest) + returns (QueryCalcExitPoolCoinsFromSharesResponse) { option (google.api.http).get = "/osmosis/gamm/v1beta1/pools/{pool_id}/exit_swap_share_amount_in"; } @@ -121,30 +121,38 @@ message QueryPoolTypeResponse { string pool_type = 1 [ (gogoproto.moretags) = "yaml:\"pool_type\"" ]; } -//=============================== JoinSwapExactAmountIn -message QueryJoinSwapExactAmountInRequest { +//=============================== CalcJoinPoolShares +message QueryCalcJoinPoolSharesRequest { uint64 pool_id = 1 [ (gogoproto.moretags) = "yaml:\"pool_id\"" ]; repeated cosmos.base.v1beta1.Coin tokens_in = 3 [ (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", (gogoproto.nullable) = false ]; } -message QueryJoinSwapExactAmountInResponse { +message QueryCalcJoinPoolSharesResponse { string share_out_amount = 1 [ (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.moretags) = "yaml:\"share_out_amount\"", (gogoproto.nullable) = false ]; + repeated cosmos.base.v1beta1.Coin tokens_out = 3 [ + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", + (gogoproto.nullable) = false + ]; } -//=============================== ExitSwapShareAmountIn -message QueryExitSwapShareAmountInRequest { +//=============================== QueryCalcExitPoolCoinsFromSharesRequest +message QueryCalcExitPoolCoinsFromSharesRequest { uint64 pool_id = 1; string token_out_denom = 2; - string share_in_amount = 3 - [ (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int" ]; + string share_in_amount = 3 [ + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", + (gogoproto.nullable) = false + ]; +} +message QueryCalcExitPoolCoinsFromSharesResponse { + uint64 token_out_amount = 1; } -message QueryExitSwapShareAmountInResponse { uint64 token_out_amount = 1; } //=============================== PoolParams message QueryPoolParamsRequest { diff --git a/x/gamm/keeper/grpc_query.go b/x/gamm/keeper/grpc_query.go index 90615c22ac7..008e02463c5 100644 --- a/x/gamm/keeper/grpc_query.go +++ b/x/gamm/keeper/grpc_query.go @@ -140,8 +140,8 @@ func (q Querier) PoolType(ctx context.Context, req *types.QueryPoolTypeRequest) }, err } -// JoinSwapExactAmountIn queries the amount of shares you get by providing specific amount of tokens -func (q Querier) JoinSwapExactAmountIn(ctx context.Context, req *types.QueryJoinSwapExactAmountInRequest) (*types.QueryJoinSwapExactAmountInResponse, error) { +// CalcJoinPoolShares queries the amount of shares you get by providing specific amount of tokens +func (q Querier) CalcJoinPoolShares(ctx context.Context, req *types.QueryCalcJoinPoolSharesRequest) (*types.QueryCalcJoinPoolSharesResponse, error) { if req == nil { return nil, status.Error(codes.InvalidArgument, "empty request") } @@ -152,19 +152,22 @@ func (q Querier) JoinSwapExactAmountIn(ctx context.Context, req *types.QueryJoin sdkCtx := sdk.UnwrapSDKContext(ctx) pool, err := q.Keeper.getPoolForSwap(sdkCtx, req.PoolId) if err != nil { - return &types.QueryJoinSwapExactAmountInResponse{ShareOutAmount: sdk.Int{}}, err + return nil, err } - numShares, _, err := pool.CalcJoinPoolShares(sdkCtx, req.TokensIn, pool.GetSwapFee(sdkCtx)) + numShares, newLiquidity, err := pool.CalcJoinPoolShares(sdkCtx, req.TokensIn, pool.GetSwapFee(sdkCtx)) if err != nil { return nil, err } - return &types.QueryJoinSwapExactAmountInResponse{ + tokensAdded := newLiquidity.Sub(req.TokensIn) + return &types.QueryCalcJoinPoolSharesResponse{ ShareOutAmount: numShares, + TokensOut: tokensAdded, }, nil } -func (q Querier) ExitSwapShareAmountIn(ctx context.Context, req *types.QueryExitSwapShareAmountInRequest) (*types.QueryExitSwapShareAmountInResponse, error) { +// CalcExitPoolCoinsFromShares queries the amount of tokens you get by exiting specific amouint of shares +func (q Querier) CalcExitPoolCoinsFromShares(ctx context.Context, req *types.QueryCalcExitPoolCoinsFromSharesRequest) (*types.QueryCalcExitPoolCoinsFromSharesResponse, error) { if req == nil { return nil, status.Error(codes.InvalidArgument, "empty request") } @@ -172,31 +175,31 @@ func (q Querier) ExitSwapShareAmountIn(ctx context.Context, req *types.QueryExit sdkCtx := sdk.UnwrapSDKContext(ctx) pool, err := q.Keeper.GetPoolAndPoke(sdkCtx, req.PoolId) if err != nil { - return &types.QueryExitSwapShareAmountInResponse{TokenOutAmount: 0}, err + return nil, types.ErrPoolNotFound } denom_liquidity := q.Keeper.GetDenomLiquidity(sdkCtx, req.TokenOutDenom) if denom_liquidity == sdk.NewInt(0) { - return nil, status.Error(codes.InvalidArgument, fmt.Sprintf("no denom (%s) in pool", req.TokenOutDenom)) + return nil, types.ErrDenomNotFoundInPool } totalSharesAmount := pool.GetTotalShares() if req.ShareInAmount.GTE(totalSharesAmount) || req.ShareInAmount.LTE(sdk.ZeroInt()) { - return &types.QueryExitSwapShareAmountInResponse{TokenOutAmount: 0}, sdkerrors.Wrapf(types.ErrInvalidMathApprox, "share ratio is zero or negative") + return nil, sdkerrors.Wrapf(types.ErrInvalidMathApprox, "share ratio is zero or negative") } exitFee := pool.GetExitFee(sdkCtx) - exitCoins, err := pool.CalcExitPoolCoinsFromShares(sdkCtx, *req.ShareInAmount, exitFee) + exitCoins, err := pool.CalcExitPoolCoinsFromShares(sdkCtx, req.ShareInAmount, exitFee) if err != nil { - return &types.QueryExitSwapShareAmountInResponse{TokenOutAmount: 0}, err + return nil, err } for _, coin := range exitCoins { if coin.Denom == req.TokenOutDenom { - return &types.QueryExitSwapShareAmountInResponse{TokenOutAmount: coin.Amount.Uint64()}, nil + return &types.QueryCalcExitPoolCoinsFromSharesResponse{TokenOutAmount: coin.Amount.Uint64()}, nil } } - return &types.QueryExitSwapShareAmountInResponse{}, nil + return nil, types.ErrDenomNotFoundInPool } // PoolParams queries a specified pool for its params. diff --git a/x/gamm/keeper/grpc_query_test.go b/x/gamm/keeper/grpc_query_test.go index 9301eabe291..b5ff1486be3 100644 --- a/x/gamm/keeper/grpc_query_test.go +++ b/x/gamm/keeper/grpc_query_test.go @@ -2,6 +2,7 @@ package keeper_test import ( gocontext "context" + "fmt" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/query" @@ -9,26 +10,84 @@ import ( "github.com/osmosis-labs/osmosis/v12/x/gamm/types" ) -func (suite *KeeperTestSuite) TestExitSwapShareAmountIn() { +func (suite *KeeperTestSuite) TestCalcExitPoolCoinsFromShares() { queryClient := suite.queryClient - + ctx := suite.Ctx poolId := suite.PrepareBalancerPool() - defaultShares := sdk.NewInt(50000000000000) + exitFee := sdk.ZeroDec() - out, err := queryClient.ExitSwapShareAmountIn(gocontext.Background(), &types.QueryExitSwapShareAmountInRequest{ - PoolId: poolId, - TokenOutDenom: "foo", - ShareInAmount: &defaultShares, - }) - suite.Require().NotNil(out) - suite.Require().NoError(err) + testCases := []struct { + name string + poolId uint64 + tokenOut string + shareInAmount sdk.Int + expectedErr error + }{ + { + "valid test case", + poolId, + "foo", + sdk.NewInt(1000000), + nil, + }, + { + "pool id does not exist", + poolId + 1, + "foo", + sdk.NewInt(1000000), + types.ErrPoolNotFound, + }, + { + "token in denom does not exist", + poolId, + "hello", + sdk.NewInt(1000000), + types.ErrDenomNotFoundInPool, + }, + // { + // "check", + // poolId, + // "foo", + // sdk.NewInt(1), + // types.ErrDenomNotFoundInPool, + // }, + } + + for _, tc := range testCases { + suite.Run(tc.name, func() { + out, err := queryClient.CalcExitPoolCoinsFromShares(gocontext.Background(), &types.QueryCalcExitPoolCoinsFromSharesRequest{ + PoolId: tc.poolId, + TokenOutDenom: tc.tokenOut, + ShareInAmount: tc.shareInAmount, + }) + if tc.expectedErr == nil { + poolRes, err := queryClient.Pool(gocontext.Background(), &types.QueryPoolRequest{ + PoolId: tc.poolId, + }) + fmt.Println("DEBUG1: ", poolRes) // ERROR HERE somehow it does not return result + + suite.Require().NoError(err) + + var pool types.PoolI + err = suite.App.InterfaceRegistry().UnpackAny(poolRes.Pool, &pool) + suite.Require().NoError(err) + + exitCoins, err := pool.CalcExitPoolCoinsFromShares(ctx, tc.shareInAmount, exitFee) + suite.Require().NoError(err) + fmt.Println("DEBUG2: ", exitCoins, out.TokenOutAmount) + suite.Require().Equal(exitCoins.AmountOf(tc.tokenOut).Uint64(), out.TokenOutAmount) + } else { + suite.Require().ErrorIs(err, tc.expectedErr) + } + }) + } } -func (suite *KeeperTestSuite) TestJoinSwapExactAmountIn() { +func (suite *KeeperTestSuite) TestCalcJoinPoolShares() { queryClient := suite.queryClient poolId := suite.PrepareBalancerPool() - out, err := queryClient.JoinSwapExactAmountIn(gocontext.Background(), &types.QueryJoinSwapExactAmountInRequest{ + out, err := queryClient.CalcJoinPoolShares(gocontext.Background(), &types.QueryCalcJoinPoolSharesRequest{ PoolId: poolId, TokensIn: sdk.NewCoins(sdk.NewCoin("foo", sdk.NewInt(500))), }) diff --git a/x/gamm/types/query.pb.go b/x/gamm/types/query.pb.go index 3a6b9250804..186c6869e7c 100644 --- a/x/gamm/types/query.pb.go +++ b/x/gamm/types/query.pb.go @@ -392,24 +392,24 @@ func (m *QueryPoolTypeResponse) GetPoolType() string { return "" } -// =============================== JoinSwapExactAmountIn -type QueryJoinSwapExactAmountInRequest struct { +// =============================== CalcJoinPoolShares +type QueryCalcJoinPoolSharesRequest struct { PoolId uint64 `protobuf:"varint,1,opt,name=pool_id,json=poolId,proto3" json:"pool_id,omitempty" yaml:"pool_id"` TokensIn github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,3,rep,name=tokens_in,json=tokensIn,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"tokens_in"` } -func (m *QueryJoinSwapExactAmountInRequest) Reset() { *m = QueryJoinSwapExactAmountInRequest{} } -func (m *QueryJoinSwapExactAmountInRequest) String() string { return proto.CompactTextString(m) } -func (*QueryJoinSwapExactAmountInRequest) ProtoMessage() {} -func (*QueryJoinSwapExactAmountInRequest) Descriptor() ([]byte, []int) { +func (m *QueryCalcJoinPoolSharesRequest) Reset() { *m = QueryCalcJoinPoolSharesRequest{} } +func (m *QueryCalcJoinPoolSharesRequest) String() string { return proto.CompactTextString(m) } +func (*QueryCalcJoinPoolSharesRequest) ProtoMessage() {} +func (*QueryCalcJoinPoolSharesRequest) Descriptor() ([]byte, []int) { return fileDescriptor_d9a717df9ca609ef, []int{8} } -func (m *QueryJoinSwapExactAmountInRequest) XXX_Unmarshal(b []byte) error { +func (m *QueryCalcJoinPoolSharesRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *QueryJoinSwapExactAmountInRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *QueryCalcJoinPoolSharesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_QueryJoinSwapExactAmountInRequest.Marshal(b, m, deterministic) + return xxx_messageInfo_QueryCalcJoinPoolSharesRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -419,48 +419,49 @@ func (m *QueryJoinSwapExactAmountInRequest) XXX_Marshal(b []byte, deterministic return b[:n], nil } } -func (m *QueryJoinSwapExactAmountInRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryJoinSwapExactAmountInRequest.Merge(m, src) +func (m *QueryCalcJoinPoolSharesRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryCalcJoinPoolSharesRequest.Merge(m, src) } -func (m *QueryJoinSwapExactAmountInRequest) XXX_Size() int { +func (m *QueryCalcJoinPoolSharesRequest) XXX_Size() int { return m.Size() } -func (m *QueryJoinSwapExactAmountInRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueryJoinSwapExactAmountInRequest.DiscardUnknown(m) +func (m *QueryCalcJoinPoolSharesRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryCalcJoinPoolSharesRequest.DiscardUnknown(m) } -var xxx_messageInfo_QueryJoinSwapExactAmountInRequest proto.InternalMessageInfo +var xxx_messageInfo_QueryCalcJoinPoolSharesRequest proto.InternalMessageInfo -func (m *QueryJoinSwapExactAmountInRequest) GetPoolId() uint64 { +func (m *QueryCalcJoinPoolSharesRequest) GetPoolId() uint64 { if m != nil { return m.PoolId } return 0 } -func (m *QueryJoinSwapExactAmountInRequest) GetTokensIn() github_com_cosmos_cosmos_sdk_types.Coins { +func (m *QueryCalcJoinPoolSharesRequest) GetTokensIn() github_com_cosmos_cosmos_sdk_types.Coins { if m != nil { return m.TokensIn } return nil } -type QueryJoinSwapExactAmountInResponse struct { - ShareOutAmount github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,1,opt,name=share_out_amount,json=shareOutAmount,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"share_out_amount" yaml:"share_out_amount"` +type QueryCalcJoinPoolSharesResponse struct { + ShareOutAmount github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,1,opt,name=share_out_amount,json=shareOutAmount,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"share_out_amount" yaml:"share_out_amount"` + TokensOut github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,3,rep,name=tokens_out,json=tokensOut,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"tokens_out"` } -func (m *QueryJoinSwapExactAmountInResponse) Reset() { *m = QueryJoinSwapExactAmountInResponse{} } -func (m *QueryJoinSwapExactAmountInResponse) String() string { return proto.CompactTextString(m) } -func (*QueryJoinSwapExactAmountInResponse) ProtoMessage() {} -func (*QueryJoinSwapExactAmountInResponse) Descriptor() ([]byte, []int) { +func (m *QueryCalcJoinPoolSharesResponse) Reset() { *m = QueryCalcJoinPoolSharesResponse{} } +func (m *QueryCalcJoinPoolSharesResponse) String() string { return proto.CompactTextString(m) } +func (*QueryCalcJoinPoolSharesResponse) ProtoMessage() {} +func (*QueryCalcJoinPoolSharesResponse) Descriptor() ([]byte, []int) { return fileDescriptor_d9a717df9ca609ef, []int{9} } -func (m *QueryJoinSwapExactAmountInResponse) XXX_Unmarshal(b []byte) error { +func (m *QueryCalcJoinPoolSharesResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *QueryJoinSwapExactAmountInResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *QueryCalcJoinPoolSharesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_QueryJoinSwapExactAmountInResponse.Marshal(b, m, deterministic) + return xxx_messageInfo_QueryCalcJoinPoolSharesResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -470,37 +471,46 @@ func (m *QueryJoinSwapExactAmountInResponse) XXX_Marshal(b []byte, deterministic return b[:n], nil } } -func (m *QueryJoinSwapExactAmountInResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryJoinSwapExactAmountInResponse.Merge(m, src) +func (m *QueryCalcJoinPoolSharesResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryCalcJoinPoolSharesResponse.Merge(m, src) } -func (m *QueryJoinSwapExactAmountInResponse) XXX_Size() int { +func (m *QueryCalcJoinPoolSharesResponse) XXX_Size() int { return m.Size() } -func (m *QueryJoinSwapExactAmountInResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryJoinSwapExactAmountInResponse.DiscardUnknown(m) +func (m *QueryCalcJoinPoolSharesResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryCalcJoinPoolSharesResponse.DiscardUnknown(m) } -var xxx_messageInfo_QueryJoinSwapExactAmountInResponse proto.InternalMessageInfo +var xxx_messageInfo_QueryCalcJoinPoolSharesResponse proto.InternalMessageInfo -// =============================== ExitSwapShareAmountIn -type QueryExitSwapShareAmountInRequest struct { - PoolId uint64 `protobuf:"varint,1,opt,name=pool_id,json=poolId,proto3" json:"pool_id,omitempty"` - TokenOutDenom string `protobuf:"bytes,2,opt,name=token_out_denom,json=tokenOutDenom,proto3" json:"token_out_denom,omitempty"` - ShareInAmount *github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,3,opt,name=share_in_amount,json=shareInAmount,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"share_in_amount,omitempty"` +func (m *QueryCalcJoinPoolSharesResponse) GetTokensOut() github_com_cosmos_cosmos_sdk_types.Coins { + if m != nil { + return m.TokensOut + } + return nil +} + +// =============================== QueryCalcExitPoolCoinsFromSharesRequest +type QueryCalcExitPoolCoinsFromSharesRequest struct { + PoolId uint64 `protobuf:"varint,1,opt,name=pool_id,json=poolId,proto3" json:"pool_id,omitempty"` + TokenOutDenom string `protobuf:"bytes,2,opt,name=token_out_denom,json=tokenOutDenom,proto3" json:"token_out_denom,omitempty"` + ShareInAmount github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,3,opt,name=share_in_amount,json=shareInAmount,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"share_in_amount"` } -func (m *QueryExitSwapShareAmountInRequest) Reset() { *m = QueryExitSwapShareAmountInRequest{} } -func (m *QueryExitSwapShareAmountInRequest) String() string { return proto.CompactTextString(m) } -func (*QueryExitSwapShareAmountInRequest) ProtoMessage() {} -func (*QueryExitSwapShareAmountInRequest) Descriptor() ([]byte, []int) { +func (m *QueryCalcExitPoolCoinsFromSharesRequest) Reset() { + *m = QueryCalcExitPoolCoinsFromSharesRequest{} +} +func (m *QueryCalcExitPoolCoinsFromSharesRequest) String() string { return proto.CompactTextString(m) } +func (*QueryCalcExitPoolCoinsFromSharesRequest) ProtoMessage() {} +func (*QueryCalcExitPoolCoinsFromSharesRequest) Descriptor() ([]byte, []int) { return fileDescriptor_d9a717df9ca609ef, []int{10} } -func (m *QueryExitSwapShareAmountInRequest) XXX_Unmarshal(b []byte) error { +func (m *QueryCalcExitPoolCoinsFromSharesRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *QueryExitSwapShareAmountInRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *QueryCalcExitPoolCoinsFromSharesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_QueryExitSwapShareAmountInRequest.Marshal(b, m, deterministic) + return xxx_messageInfo_QueryCalcExitPoolCoinsFromSharesRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -510,48 +520,50 @@ func (m *QueryExitSwapShareAmountInRequest) XXX_Marshal(b []byte, deterministic return b[:n], nil } } -func (m *QueryExitSwapShareAmountInRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryExitSwapShareAmountInRequest.Merge(m, src) +func (m *QueryCalcExitPoolCoinsFromSharesRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryCalcExitPoolCoinsFromSharesRequest.Merge(m, src) } -func (m *QueryExitSwapShareAmountInRequest) XXX_Size() int { +func (m *QueryCalcExitPoolCoinsFromSharesRequest) XXX_Size() int { return m.Size() } -func (m *QueryExitSwapShareAmountInRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueryExitSwapShareAmountInRequest.DiscardUnknown(m) +func (m *QueryCalcExitPoolCoinsFromSharesRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryCalcExitPoolCoinsFromSharesRequest.DiscardUnknown(m) } -var xxx_messageInfo_QueryExitSwapShareAmountInRequest proto.InternalMessageInfo +var xxx_messageInfo_QueryCalcExitPoolCoinsFromSharesRequest proto.InternalMessageInfo -func (m *QueryExitSwapShareAmountInRequest) GetPoolId() uint64 { +func (m *QueryCalcExitPoolCoinsFromSharesRequest) GetPoolId() uint64 { if m != nil { return m.PoolId } return 0 } -func (m *QueryExitSwapShareAmountInRequest) GetTokenOutDenom() string { +func (m *QueryCalcExitPoolCoinsFromSharesRequest) GetTokenOutDenom() string { if m != nil { return m.TokenOutDenom } return "" } -type QueryExitSwapShareAmountInResponse struct { +type QueryCalcExitPoolCoinsFromSharesResponse struct { TokenOutAmount uint64 `protobuf:"varint,1,opt,name=token_out_amount,json=tokenOutAmount,proto3" json:"token_out_amount,omitempty"` } -func (m *QueryExitSwapShareAmountInResponse) Reset() { *m = QueryExitSwapShareAmountInResponse{} } -func (m *QueryExitSwapShareAmountInResponse) String() string { return proto.CompactTextString(m) } -func (*QueryExitSwapShareAmountInResponse) ProtoMessage() {} -func (*QueryExitSwapShareAmountInResponse) Descriptor() ([]byte, []int) { +func (m *QueryCalcExitPoolCoinsFromSharesResponse) Reset() { + *m = QueryCalcExitPoolCoinsFromSharesResponse{} +} +func (m *QueryCalcExitPoolCoinsFromSharesResponse) String() string { return proto.CompactTextString(m) } +func (*QueryCalcExitPoolCoinsFromSharesResponse) ProtoMessage() {} +func (*QueryCalcExitPoolCoinsFromSharesResponse) Descriptor() ([]byte, []int) { return fileDescriptor_d9a717df9ca609ef, []int{11} } -func (m *QueryExitSwapShareAmountInResponse) XXX_Unmarshal(b []byte) error { +func (m *QueryCalcExitPoolCoinsFromSharesResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *QueryExitSwapShareAmountInResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *QueryCalcExitPoolCoinsFromSharesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_QueryExitSwapShareAmountInResponse.Marshal(b, m, deterministic) + return xxx_messageInfo_QueryCalcExitPoolCoinsFromSharesResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -561,19 +573,19 @@ func (m *QueryExitSwapShareAmountInResponse) XXX_Marshal(b []byte, deterministic return b[:n], nil } } -func (m *QueryExitSwapShareAmountInResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryExitSwapShareAmountInResponse.Merge(m, src) +func (m *QueryCalcExitPoolCoinsFromSharesResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryCalcExitPoolCoinsFromSharesResponse.Merge(m, src) } -func (m *QueryExitSwapShareAmountInResponse) XXX_Size() int { +func (m *QueryCalcExitPoolCoinsFromSharesResponse) XXX_Size() int { return m.Size() } -func (m *QueryExitSwapShareAmountInResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryExitSwapShareAmountInResponse.DiscardUnknown(m) +func (m *QueryCalcExitPoolCoinsFromSharesResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryCalcExitPoolCoinsFromSharesResponse.DiscardUnknown(m) } -var xxx_messageInfo_QueryExitSwapShareAmountInResponse proto.InternalMessageInfo +var xxx_messageInfo_QueryCalcExitPoolCoinsFromSharesResponse proto.InternalMessageInfo -func (m *QueryExitSwapShareAmountInResponse) GetTokenOutAmount() uint64 { +func (m *QueryCalcExitPoolCoinsFromSharesResponse) GetTokenOutAmount() uint64 { if m != nil { return m.TokenOutAmount } @@ -1257,10 +1269,10 @@ func init() { proto.RegisterType((*QueryNumPoolsResponse)(nil), "osmosis.gamm.v1beta1.QueryNumPoolsResponse") proto.RegisterType((*QueryPoolTypeRequest)(nil), "osmosis.gamm.v1beta1.QueryPoolTypeRequest") proto.RegisterType((*QueryPoolTypeResponse)(nil), "osmosis.gamm.v1beta1.QueryPoolTypeResponse") - proto.RegisterType((*QueryJoinSwapExactAmountInRequest)(nil), "osmosis.gamm.v1beta1.QueryJoinSwapExactAmountInRequest") - proto.RegisterType((*QueryJoinSwapExactAmountInResponse)(nil), "osmosis.gamm.v1beta1.QueryJoinSwapExactAmountInResponse") - proto.RegisterType((*QueryExitSwapShareAmountInRequest)(nil), "osmosis.gamm.v1beta1.QueryExitSwapShareAmountInRequest") - proto.RegisterType((*QueryExitSwapShareAmountInResponse)(nil), "osmosis.gamm.v1beta1.QueryExitSwapShareAmountInResponse") + proto.RegisterType((*QueryCalcJoinPoolSharesRequest)(nil), "osmosis.gamm.v1beta1.QueryCalcJoinPoolSharesRequest") + proto.RegisterType((*QueryCalcJoinPoolSharesResponse)(nil), "osmosis.gamm.v1beta1.QueryCalcJoinPoolSharesResponse") + proto.RegisterType((*QueryCalcExitPoolCoinsFromSharesRequest)(nil), "osmosis.gamm.v1beta1.QueryCalcExitPoolCoinsFromSharesRequest") + proto.RegisterType((*QueryCalcExitPoolCoinsFromSharesResponse)(nil), "osmosis.gamm.v1beta1.QueryCalcExitPoolCoinsFromSharesResponse") proto.RegisterType((*QueryPoolParamsRequest)(nil), "osmosis.gamm.v1beta1.QueryPoolParamsRequest") proto.RegisterType((*QueryPoolParamsResponse)(nil), "osmosis.gamm.v1beta1.QueryPoolParamsResponse") proto.RegisterType((*QueryTotalPoolLiquidityRequest)(nil), "osmosis.gamm.v1beta1.QueryTotalPoolLiquidityRequest") @@ -1280,107 +1292,109 @@ func init() { func init() { proto.RegisterFile("osmosis/gamm/v1beta1/query.proto", fileDescriptor_d9a717df9ca609ef) } var fileDescriptor_d9a717df9ca609ef = []byte{ - // 1594 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x98, 0xcd, 0x6f, 0x1b, 0x45, - 0x14, 0xc0, 0xb3, 0xa9, 0x93, 0xc6, 0x13, 0xf2, 0x35, 0x4d, 0x5a, 0xd7, 0x69, 0xed, 0x76, 0x10, - 0x49, 0xda, 0x26, 0xbb, 0x4d, 0x9a, 0x8a, 0x2a, 0x02, 0xda, 0xa4, 0x4d, 0x5a, 0x47, 0xd0, 0x84, - 0x6d, 0x05, 0x02, 0x0e, 0xd6, 0x26, 0x59, 0x9c, 0xa5, 0xf1, 0xce, 0x26, 0x3b, 0xdb, 0x26, 0x42, - 0x15, 0x12, 0x42, 0x9c, 0x38, 0x20, 0x15, 0x90, 0x90, 0x2a, 0xc1, 0x81, 0x03, 0xe2, 0xcc, 0x01, - 0x71, 0x47, 0xaa, 0x10, 0x48, 0x45, 0xbd, 0x20, 0x24, 0x0c, 0x6a, 0x39, 0x70, 0xce, 0x3f, 0x00, - 0x9a, 0x99, 0xb7, 0x1f, 0x76, 0xd6, 0x6b, 0x3b, 0x15, 0x12, 0xa7, 0x78, 0xe7, 0xbd, 0x79, 0xf3, - 0x7b, 0xef, 0xcd, 0xbc, 0x79, 0x13, 0x74, 0x82, 0xba, 0x65, 0xea, 0x5a, 0xae, 0x56, 0x32, 0xca, - 0x65, 0xed, 0xf6, 0xe4, 0x8a, 0xc9, 0x8c, 0x49, 0x6d, 0xd3, 0x33, 0xb7, 0x76, 0x54, 0x67, 0x8b, - 0x32, 0x8a, 0x07, 0x41, 0x43, 0xe5, 0x1a, 0x2a, 0x68, 0x64, 0x07, 0x4b, 0xb4, 0x44, 0x85, 0x82, - 0xc6, 0x7f, 0x49, 0xdd, 0xec, 0xf1, 0x58, 0x6b, 0x6c, 0x1b, 0xc4, 0xb9, 0x55, 0x21, 0xd7, 0x56, - 0x0c, 0xd7, 0x0c, 0xa4, 0xab, 0xd4, 0xb2, 0x41, 0x7e, 0x3a, 0x2a, 0x17, 0x0c, 0x81, 0x96, 0x63, -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, 0x2e, 0x89, 0xa0, 0x5e, 0x61, - 0x99, 0x6e, 0x6d, 0x12, 0xe0, 0xcf, 0x0b, 0xfc, 0x8b, 0xf8, 0xc5, 0x78, 0xfc, 0xc8, 0xf9, 0x03, - 0x5a, 0x2d, 0x52, 0x52, 0xc2, 0x33, 0xf8, 0x8b, 0x82, 0xb2, 0x75, 0xfc, 0x59, 0xf2, 0x18, 0x6e, - 0x81, 0x2d, 0xec, 0x4b, 0x13, 0x77, 0x7a, 0xfd, 0x36, 0x8e, 0x2c, 0x08, 0x97, 0x2e, 0xe1, 0x97, - 0x9e, 0xc2, 0x25, 0xea, 0xb1, 0xb9, 0xc5, 0x07, 0x8f, 0x73, 0xca, 0xc3, 0xc7, 0x39, 0xe5, 0xcf, - 0xc7, 0x39, 0xe5, 0xe3, 0x27, 0xb9, 0xb6, 0x87, 0x4f, 0x72, 0x6d, 0xbf, 0x3e, 0xc9, 0xb5, 0xbd, - 0x79, 0x36, 0xd2, 0x2e, 0xc1, 0x1a, 0x13, 0x1b, 0xc6, 0x8a, 0x1b, 0x2c, 0x78, 0x7b, 0x72, 0x4a, - 0xdb, 0x96, 0xcb, 0x8a, 0xe6, 0x69, 0xa5, 0x53, 0xfc, 0x87, 0xe0, 0xdc, 0xbf, 0x01, 0x00, 0x00, - 0xff, 0xff, 0xea, 0xac, 0xe0, 0x88, 0x89, 0x16, 0x00, 0x00, + // 1625 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x58, 0xcb, 0x6f, 0x1c, 0x45, + 0x13, 0xf7, 0x38, 0x6b, 0xc7, 0xdb, 0xfe, 0xfc, 0xea, 0x38, 0xc9, 0x66, 0x9d, 0xec, 0xe6, 0xeb, + 0x4f, 0x9f, 0xed, 0x24, 0xf6, 0x6c, 0xec, 0x38, 0x12, 0xb2, 0xc8, 0xc3, 0x4e, 0xec, 0x64, 0x2d, + 0x88, 0xcd, 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, + 0xb5, 0x67, 0x04, 0xf4, 0x97, 0x04, 0xfd, 0x4b, 0xf8, 0x42, 0x7d, 0xfa, 0xa1, 0xfb, 0x07, 0x6c, + 0x33, 0xa1, 0x22, 0x13, 0xdc, 0xc1, 0x1f, 0x15, 0x94, 0x6c, 0xe0, 0xcf, 0xaa, 0xcb, 0x70, 0x1b, + 0xdc, 0x82, 0x06, 0x35, 0xf2, 0xa4, 0x37, 0xee, 0xe7, 0xc8, 0xb2, 0x70, 0xe9, 0x32, 0xbe, 0xf8, + 0x1c, 0x2e, 0x51, 0x97, 0x2d, 0xae, 0x3c, 0x7e, 0x9a, 0x52, 0x9e, 0x3c, 0x4d, 0x29, 0xbf, 0x3d, + 0x4d, 0x29, 0x1f, 0x3e, 0x4b, 0x75, 0x3d, 0x79, 0x96, 0xea, 0xfa, 0xf9, 0x59, 0xaa, 0xeb, 0xcd, + 0xb3, 0xa1, 0xbe, 0x09, 0xf6, 0x98, 0x2e, 0xe8, 0xeb, 0x8e, 0xbf, 0xe1, 0xbd, 0x99, 0xd9, 0xcc, + 0xae, 0xdc, 0x56, 0x74, 0x51, 0xeb, 0xbd, 0xe2, 0x5f, 0x05, 0xe7, 0xfe, 0x09, 0x00, 0x00, 0xff, + 0xff, 0x09, 0x97, 0x6c, 0x5c, 0x08, 0x17, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1404,8 +1418,8 @@ type QueryClient interface { // Returns "Balancer" as a string literal when the pool is a balancer pool. // Errors if the pool is failed to be type caseted. PoolType(ctx context.Context, in *QueryPoolTypeRequest, opts ...grpc.CallOption) (*QueryPoolTypeResponse, error) - JoinSwapExactAmountIn(ctx context.Context, in *QueryJoinSwapExactAmountInRequest, opts ...grpc.CallOption) (*QueryJoinSwapExactAmountInResponse, error) - ExitSwapShareAmountIn(ctx context.Context, in *QueryExitSwapShareAmountInRequest, opts ...grpc.CallOption) (*QueryExitSwapShareAmountInResponse, error) + CalcJoinPoolShares(ctx context.Context, in *QueryCalcJoinPoolSharesRequest, opts ...grpc.CallOption) (*QueryCalcJoinPoolSharesResponse, error) + CalcExitPoolCoinsFromShares(ctx context.Context, in *QueryCalcExitPoolCoinsFromSharesRequest, opts ...grpc.CallOption) (*QueryCalcExitPoolCoinsFromSharesResponse, error) PoolParams(ctx context.Context, in *QueryPoolParamsRequest, opts ...grpc.CallOption) (*QueryPoolParamsResponse, error) TotalPoolLiquidity(ctx context.Context, in *QueryTotalPoolLiquidityRequest, opts ...grpc.CallOption) (*QueryTotalPoolLiquidityResponse, error) TotalShares(ctx context.Context, in *QueryTotalSharesRequest, opts ...grpc.CallOption) (*QueryTotalSharesResponse, error) @@ -1470,18 +1484,18 @@ func (c *queryClient) PoolType(ctx context.Context, in *QueryPoolTypeRequest, op return out, nil } -func (c *queryClient) JoinSwapExactAmountIn(ctx context.Context, in *QueryJoinSwapExactAmountInRequest, opts ...grpc.CallOption) (*QueryJoinSwapExactAmountInResponse, error) { - out := new(QueryJoinSwapExactAmountInResponse) - err := c.cc.Invoke(ctx, "/osmosis.gamm.v1beta1.Query/JoinSwapExactAmountIn", in, out, opts...) +func (c *queryClient) CalcJoinPoolShares(ctx context.Context, in *QueryCalcJoinPoolSharesRequest, opts ...grpc.CallOption) (*QueryCalcJoinPoolSharesResponse, error) { + out := new(QueryCalcJoinPoolSharesResponse) + err := c.cc.Invoke(ctx, "/osmosis.gamm.v1beta1.Query/CalcJoinPoolShares", in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *queryClient) ExitSwapShareAmountIn(ctx context.Context, in *QueryExitSwapShareAmountInRequest, opts ...grpc.CallOption) (*QueryExitSwapShareAmountInResponse, error) { - out := new(QueryExitSwapShareAmountInResponse) - err := c.cc.Invoke(ctx, "/osmosis.gamm.v1beta1.Query/ExitSwapShareAmountIn", in, out, opts...) +func (c *queryClient) CalcExitPoolCoinsFromShares(ctx context.Context, in *QueryCalcExitPoolCoinsFromSharesRequest, opts ...grpc.CallOption) (*QueryCalcExitPoolCoinsFromSharesResponse, error) { + out := new(QueryCalcExitPoolCoinsFromSharesResponse) + err := c.cc.Invoke(ctx, "/osmosis.gamm.v1beta1.Query/CalcExitPoolCoinsFromShares", in, out, opts...) if err != nil { return nil, err } @@ -1553,8 +1567,8 @@ type QueryServer interface { // Returns "Balancer" as a string literal when the pool is a balancer pool. // Errors if the pool is failed to be type caseted. PoolType(context.Context, *QueryPoolTypeRequest) (*QueryPoolTypeResponse, error) - JoinSwapExactAmountIn(context.Context, *QueryJoinSwapExactAmountInRequest) (*QueryJoinSwapExactAmountInResponse, error) - ExitSwapShareAmountIn(context.Context, *QueryExitSwapShareAmountInRequest) (*QueryExitSwapShareAmountInResponse, error) + CalcJoinPoolShares(context.Context, *QueryCalcJoinPoolSharesRequest) (*QueryCalcJoinPoolSharesResponse, error) + CalcExitPoolCoinsFromShares(context.Context, *QueryCalcExitPoolCoinsFromSharesRequest) (*QueryCalcExitPoolCoinsFromSharesResponse, error) PoolParams(context.Context, *QueryPoolParamsRequest) (*QueryPoolParamsResponse, error) TotalPoolLiquidity(context.Context, *QueryTotalPoolLiquidityRequest) (*QueryTotalPoolLiquidityResponse, error) TotalShares(context.Context, *QueryTotalSharesRequest) (*QueryTotalSharesResponse, error) @@ -1585,11 +1599,11 @@ func (*UnimplementedQueryServer) Pool(ctx context.Context, req *QueryPoolRequest func (*UnimplementedQueryServer) PoolType(ctx context.Context, req *QueryPoolTypeRequest) (*QueryPoolTypeResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method PoolType not implemented") } -func (*UnimplementedQueryServer) JoinSwapExactAmountIn(ctx context.Context, req *QueryJoinSwapExactAmountInRequest) (*QueryJoinSwapExactAmountInResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method JoinSwapExactAmountIn not implemented") +func (*UnimplementedQueryServer) CalcJoinPoolShares(ctx context.Context, req *QueryCalcJoinPoolSharesRequest) (*QueryCalcJoinPoolSharesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CalcJoinPoolShares not implemented") } -func (*UnimplementedQueryServer) ExitSwapShareAmountIn(ctx context.Context, req *QueryExitSwapShareAmountInRequest) (*QueryExitSwapShareAmountInResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ExitSwapShareAmountIn not implemented") +func (*UnimplementedQueryServer) CalcExitPoolCoinsFromShares(ctx context.Context, req *QueryCalcExitPoolCoinsFromSharesRequest) (*QueryCalcExitPoolCoinsFromSharesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CalcExitPoolCoinsFromShares not implemented") } func (*UnimplementedQueryServer) PoolParams(ctx context.Context, req *QueryPoolParamsRequest) (*QueryPoolParamsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method PoolParams not implemented") @@ -1704,38 +1718,38 @@ func _Query_PoolType_Handler(srv interface{}, ctx context.Context, dec func(inte return interceptor(ctx, in, info, handler) } -func _Query_JoinSwapExactAmountIn_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryJoinSwapExactAmountInRequest) +func _Query_CalcJoinPoolShares_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryCalcJoinPoolSharesRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(QueryServer).JoinSwapExactAmountIn(ctx, in) + return srv.(QueryServer).CalcJoinPoolShares(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/osmosis.gamm.v1beta1.Query/JoinSwapExactAmountIn", + FullMethod: "/osmosis.gamm.v1beta1.Query/CalcJoinPoolShares", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).JoinSwapExactAmountIn(ctx, req.(*QueryJoinSwapExactAmountInRequest)) + return srv.(QueryServer).CalcJoinPoolShares(ctx, req.(*QueryCalcJoinPoolSharesRequest)) } return interceptor(ctx, in, info, handler) } -func _Query_ExitSwapShareAmountIn_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryExitSwapShareAmountInRequest) +func _Query_CalcExitPoolCoinsFromShares_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryCalcExitPoolCoinsFromSharesRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(QueryServer).ExitSwapShareAmountIn(ctx, in) + return srv.(QueryServer).CalcExitPoolCoinsFromShares(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/osmosis.gamm.v1beta1.Query/ExitSwapShareAmountIn", + FullMethod: "/osmosis.gamm.v1beta1.Query/CalcExitPoolCoinsFromShares", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).ExitSwapShareAmountIn(ctx, req.(*QueryExitSwapShareAmountInRequest)) + return srv.(QueryServer).CalcExitPoolCoinsFromShares(ctx, req.(*QueryCalcExitPoolCoinsFromSharesRequest)) } return interceptor(ctx, in, info, handler) } @@ -1873,12 +1887,12 @@ var _Query_serviceDesc = grpc.ServiceDesc{ Handler: _Query_PoolType_Handler, }, { - MethodName: "JoinSwapExactAmountIn", - Handler: _Query_JoinSwapExactAmountIn_Handler, + MethodName: "CalcJoinPoolShares", + Handler: _Query_CalcJoinPoolShares_Handler, }, { - MethodName: "ExitSwapShareAmountIn", - Handler: _Query_ExitSwapShareAmountIn_Handler, + MethodName: "CalcExitPoolCoinsFromShares", + Handler: _Query_CalcExitPoolCoinsFromShares_Handler, }, { MethodName: "PoolParams", @@ -2165,7 +2179,7 @@ func (m *QueryPoolTypeResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *QueryJoinSwapExactAmountInRequest) Marshal() (dAtA []byte, err error) { +func (m *QueryCalcJoinPoolSharesRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -2175,12 +2189,12 @@ func (m *QueryJoinSwapExactAmountInRequest) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *QueryJoinSwapExactAmountInRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryCalcJoinPoolSharesRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryJoinSwapExactAmountInRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryCalcJoinPoolSharesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -2207,7 +2221,7 @@ func (m *QueryJoinSwapExactAmountInRequest) MarshalToSizedBuffer(dAtA []byte) (i return len(dAtA) - i, nil } -func (m *QueryJoinSwapExactAmountInResponse) Marshal() (dAtA []byte, err error) { +func (m *QueryCalcJoinPoolSharesResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -2217,16 +2231,30 @@ func (m *QueryJoinSwapExactAmountInResponse) Marshal() (dAtA []byte, err error) return dAtA[:n], nil } -func (m *QueryJoinSwapExactAmountInResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryCalcJoinPoolSharesResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryJoinSwapExactAmountInResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryCalcJoinPoolSharesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l + if len(m.TokensOut) > 0 { + for iNdEx := len(m.TokensOut) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.TokensOut[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + } { size := m.ShareOutAmount.Size() i -= size @@ -2240,7 +2268,7 @@ func (m *QueryJoinSwapExactAmountInResponse) MarshalToSizedBuffer(dAtA []byte) ( return len(dAtA) - i, nil } -func (m *QueryExitSwapShareAmountInRequest) Marshal() (dAtA []byte, err error) { +func (m *QueryCalcExitPoolCoinsFromSharesRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -2250,28 +2278,26 @@ func (m *QueryExitSwapShareAmountInRequest) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *QueryExitSwapShareAmountInRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryCalcExitPoolCoinsFromSharesRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryExitSwapShareAmountInRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryCalcExitPoolCoinsFromSharesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if m.ShareInAmount != nil { - { - size := m.ShareInAmount.Size() - i -= size - if _, err := m.ShareInAmount.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintQuery(dAtA, i, uint64(size)) + { + size := m.ShareInAmount.Size() + i -= size + if _, err := m.ShareInAmount.MarshalTo(dAtA[i:]); err != nil { + return 0, err } - i-- - dAtA[i] = 0x1a + i = encodeVarintQuery(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0x1a if len(m.TokenOutDenom) > 0 { i -= len(m.TokenOutDenom) copy(dAtA[i:], m.TokenOutDenom) @@ -2287,7 +2313,7 @@ func (m *QueryExitSwapShareAmountInRequest) MarshalToSizedBuffer(dAtA []byte) (i return len(dAtA) - i, nil } -func (m *QueryExitSwapShareAmountInResponse) Marshal() (dAtA []byte, err error) { +func (m *QueryCalcExitPoolCoinsFromSharesResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -2297,12 +2323,12 @@ func (m *QueryExitSwapShareAmountInResponse) Marshal() (dAtA []byte, err error) return dAtA[:n], nil } -func (m *QueryExitSwapShareAmountInResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryCalcExitPoolCoinsFromSharesResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryExitSwapShareAmountInResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryCalcExitPoolCoinsFromSharesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -2928,7 +2954,7 @@ func (m *QueryPoolTypeResponse) Size() (n int) { return n } -func (m *QueryJoinSwapExactAmountInRequest) Size() (n int) { +func (m *QueryCalcJoinPoolSharesRequest) Size() (n int) { if m == nil { return 0 } @@ -2946,7 +2972,7 @@ func (m *QueryJoinSwapExactAmountInRequest) Size() (n int) { return n } -func (m *QueryJoinSwapExactAmountInResponse) Size() (n int) { +func (m *QueryCalcJoinPoolSharesResponse) Size() (n int) { if m == nil { return 0 } @@ -2954,10 +2980,16 @@ func (m *QueryJoinSwapExactAmountInResponse) Size() (n int) { _ = l l = m.ShareOutAmount.Size() n += 1 + l + sovQuery(uint64(l)) + if len(m.TokensOut) > 0 { + for _, e := range m.TokensOut { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } return n } -func (m *QueryExitSwapShareAmountInRequest) Size() (n int) { +func (m *QueryCalcExitPoolCoinsFromSharesRequest) Size() (n int) { if m == nil { return 0 } @@ -2970,14 +3002,12 @@ func (m *QueryExitSwapShareAmountInRequest) Size() (n int) { if l > 0 { n += 1 + l + sovQuery(uint64(l)) } - if m.ShareInAmount != nil { - l = m.ShareInAmount.Size() - n += 1 + l + sovQuery(uint64(l)) - } + l = m.ShareInAmount.Size() + n += 1 + l + sovQuery(uint64(l)) return n } -func (m *QueryExitSwapShareAmountInResponse) Size() (n int) { +func (m *QueryCalcExitPoolCoinsFromSharesResponse) Size() (n int) { if m == nil { return 0 } @@ -3832,7 +3862,7 @@ func (m *QueryPoolTypeResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryJoinSwapExactAmountInRequest) Unmarshal(dAtA []byte) error { +func (m *QueryCalcJoinPoolSharesRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3855,10 +3885,10 @@ func (m *QueryJoinSwapExactAmountInRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryJoinSwapExactAmountInRequest: wiretype end group for non-group") + return fmt.Errorf("proto: QueryCalcJoinPoolSharesRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryJoinSwapExactAmountInRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryCalcJoinPoolSharesRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -3935,7 +3965,7 @@ func (m *QueryJoinSwapExactAmountInRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryJoinSwapExactAmountInResponse) Unmarshal(dAtA []byte) error { +func (m *QueryCalcJoinPoolSharesResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3958,10 +3988,10 @@ func (m *QueryJoinSwapExactAmountInResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryJoinSwapExactAmountInResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QueryCalcJoinPoolSharesResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryJoinSwapExactAmountInResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryCalcJoinPoolSharesResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -3998,6 +4028,40 @@ func (m *QueryJoinSwapExactAmountInResponse) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TokensOut", 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.TokensOut = append(m.TokensOut, types1.Coin{}) + if err := m.TokensOut[len(m.TokensOut)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipQuery(dAtA[iNdEx:]) @@ -4019,7 +4083,7 @@ func (m *QueryJoinSwapExactAmountInResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryExitSwapShareAmountInRequest) Unmarshal(dAtA []byte) error { +func (m *QueryCalcExitPoolCoinsFromSharesRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4042,10 +4106,10 @@ func (m *QueryExitSwapShareAmountInRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryExitSwapShareAmountInRequest: wiretype end group for non-group") + return fmt.Errorf("proto: QueryCalcExitPoolCoinsFromSharesRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryExitSwapShareAmountInRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryCalcExitPoolCoinsFromSharesRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -4129,8 +4193,6 @@ func (m *QueryExitSwapShareAmountInRequest) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - var v github_com_cosmos_cosmos_sdk_types.Int - m.ShareInAmount = &v if err := m.ShareInAmount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -4156,7 +4218,7 @@ func (m *QueryExitSwapShareAmountInRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryExitSwapShareAmountInResponse) Unmarshal(dAtA []byte) error { +func (m *QueryCalcExitPoolCoinsFromSharesResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4179,10 +4241,10 @@ func (m *QueryExitSwapShareAmountInResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryExitSwapShareAmountInResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QueryCalcExitPoolCoinsFromSharesResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryExitSwapShareAmountInResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryCalcExitPoolCoinsFromSharesResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: diff --git a/x/gamm/types/query.pb.gw.go b/x/gamm/types/query.pb.gw.go index 2583b43a2ad..1f8585fef8a 100644 --- a/x/gamm/types/query.pb.gw.go +++ b/x/gamm/types/query.pb.gw.go @@ -214,11 +214,11 @@ func local_request_Query_PoolType_0(ctx context.Context, marshaler runtime.Marsh } var ( - filter_Query_JoinSwapExactAmountIn_0 = &utilities.DoubleArray{Encoding: map[string]int{"pool_id": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} + filter_Query_CalcJoinPoolShares_0 = &utilities.DoubleArray{Encoding: map[string]int{"pool_id": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} ) -func request_Query_JoinSwapExactAmountIn_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryJoinSwapExactAmountInRequest +func request_Query_CalcJoinPoolShares_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryCalcJoinPoolSharesRequest var metadata runtime.ServerMetadata var ( @@ -242,17 +242,17 @@ func request_Query_JoinSwapExactAmountIn_0(ctx context.Context, marshaler runtim if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_JoinSwapExactAmountIn_0); err != nil { + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_CalcJoinPoolShares_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.JoinSwapExactAmountIn(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + msg, err := client.CalcJoinPoolShares(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } -func local_request_Query_JoinSwapExactAmountIn_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryJoinSwapExactAmountInRequest +func local_request_Query_CalcJoinPoolShares_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryCalcJoinPoolSharesRequest var metadata runtime.ServerMetadata var ( @@ -276,21 +276,21 @@ func local_request_Query_JoinSwapExactAmountIn_0(ctx context.Context, marshaler if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_JoinSwapExactAmountIn_0); err != nil { + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_CalcJoinPoolShares_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.JoinSwapExactAmountIn(ctx, &protoReq) + msg, err := server.CalcJoinPoolShares(ctx, &protoReq) return msg, metadata, err } var ( - filter_Query_ExitSwapShareAmountIn_0 = &utilities.DoubleArray{Encoding: map[string]int{"pool_id": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} + filter_Query_CalcExitPoolCoinsFromShares_0 = &utilities.DoubleArray{Encoding: map[string]int{"pool_id": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} ) -func request_Query_ExitSwapShareAmountIn_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryExitSwapShareAmountInRequest +func request_Query_CalcExitPoolCoinsFromShares_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryCalcExitPoolCoinsFromSharesRequest var metadata runtime.ServerMetadata var ( @@ -314,17 +314,17 @@ func request_Query_ExitSwapShareAmountIn_0(ctx context.Context, marshaler runtim if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_ExitSwapShareAmountIn_0); err != nil { + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_CalcExitPoolCoinsFromShares_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.ExitSwapShareAmountIn(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + msg, err := client.CalcExitPoolCoinsFromShares(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } -func local_request_Query_ExitSwapShareAmountIn_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryExitSwapShareAmountInRequest +func local_request_Query_CalcExitPoolCoinsFromShares_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryCalcExitPoolCoinsFromSharesRequest var metadata runtime.ServerMetadata var ( @@ -348,11 +348,11 @@ func local_request_Query_ExitSwapShareAmountIn_0(ctx context.Context, marshaler if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_ExitSwapShareAmountIn_0); err != nil { + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_CalcExitPoolCoinsFromShares_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.ExitSwapShareAmountIn(ctx, &protoReq) + msg, err := server.CalcExitPoolCoinsFromShares(ctx, &protoReq) return msg, metadata, err } @@ -856,7 +856,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv }) - mux.Handle("GET", pattern_Query_JoinSwapExactAmountIn_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_Query_CalcJoinPoolShares_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream @@ -867,7 +867,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_Query_JoinSwapExactAmountIn_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_Query_CalcJoinPoolShares_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 { @@ -875,11 +875,11 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } - forward_Query_JoinSwapExactAmountIn_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_CalcJoinPoolShares_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("GET", pattern_Query_ExitSwapShareAmountIn_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_Query_CalcExitPoolCoinsFromShares_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream @@ -890,7 +890,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_Query_ExitSwapShareAmountIn_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_Query_CalcExitPoolCoinsFromShares_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 { @@ -898,7 +898,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } - forward_Query_ExitSwapShareAmountIn_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_CalcExitPoolCoinsFromShares_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -1181,7 +1181,7 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie }) - mux.Handle("GET", pattern_Query_JoinSwapExactAmountIn_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_Query_CalcJoinPoolShares_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) @@ -1190,18 +1190,18 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_Query_JoinSwapExactAmountIn_0(rctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_Query_CalcJoinPoolShares_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_JoinSwapExactAmountIn_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_CalcJoinPoolShares_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("GET", pattern_Query_ExitSwapShareAmountIn_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_Query_CalcExitPoolCoinsFromShares_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) @@ -1210,14 +1210,14 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_Query_ExitSwapShareAmountIn_0(rctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_Query_CalcExitPoolCoinsFromShares_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_ExitSwapShareAmountIn_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_CalcExitPoolCoinsFromShares_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -1355,9 +1355,9 @@ var ( pattern_Query_PoolType_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"osmosis", "gamm", "v1beta1", "pool_type", "pool_id"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_JoinSwapExactAmountIn_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5}, []string{"osmosis", "gamm", "v1beta1", "pools", "pool_id", "join_swap_exact_in"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_CalcJoinPoolShares_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5}, []string{"osmosis", "gamm", "v1beta1", "pools", "pool_id", "join_swap_exact_in"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_ExitSwapShareAmountIn_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5}, []string{"osmosis", "gamm", "v1beta1", "pools", "pool_id", "exit_swap_share_amount_in"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_CalcExitPoolCoinsFromShares_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5}, []string{"osmosis", "gamm", "v1beta1", "pools", "pool_id", "exit_swap_share_amount_in"}, "", runtime.AssumeColonVerbOpt(false))) pattern_Query_PoolParams_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5}, []string{"osmosis", "gamm", "v1beta1", "pools", "pool_id", "params"}, "", runtime.AssumeColonVerbOpt(false))) @@ -1383,9 +1383,9 @@ var ( forward_Query_PoolType_0 = runtime.ForwardResponseMessage - forward_Query_JoinSwapExactAmountIn_0 = runtime.ForwardResponseMessage + forward_Query_CalcJoinPoolShares_0 = runtime.ForwardResponseMessage - forward_Query_ExitSwapShareAmountIn_0 = runtime.ForwardResponseMessage + forward_Query_CalcExitPoolCoinsFromShares_0 = runtime.ForwardResponseMessage forward_Query_PoolParams_0 = runtime.ForwardResponseMessage From 5f1d503eb4f3e847f0a52145a4cfb9990eba26aa Mon Sep 17 00:00:00 2001 From: George McAskill <42020095+georgemc98@users.noreply.github.com> Date: Fri, 14 Oct 2022 10:50:23 -0500 Subject: [PATCH 17/59] test: finish CalcJoinPoolShares query test --- go.mod | 2 +- proto/osmosis/gamm/v1beta1/query.proto | 4 +- x/gamm/keeper/grpc_query.go | 4 +- x/gamm/keeper/grpc_query_test.go | 80 ++++++++- x/gamm/pool-models/balancer/pool.go | 2 +- x/gamm/types/errors.go | 25 +-- x/gamm/types/query.pb.go | 214 ++++++++++++------------- 7 files changed, 199 insertions(+), 132 deletions(-) diff --git a/go.mod b/go.mod index 53e7fb4bfa1..bd423c270dc 100644 --- a/go.mod +++ b/go.mod @@ -5,7 +5,7 @@ go 1.18 require ( github.com/CosmWasm/wasmd v0.28.0-osmo-v12 github.com/cosmos/cosmos-proto v1.0.0-alpha7 - github.com/cosmos/cosmos-sdk v0.46.1 + github.com/cosmos/cosmos-sdk v0.46.2 github.com/cosmos/go-bip39 v1.0.0 github.com/cosmos/iavl v0.19.1 github.com/cosmos/ibc-go/v3 v3.3.0 diff --git a/proto/osmosis/gamm/v1beta1/query.proto b/proto/osmosis/gamm/v1beta1/query.proto index c29aeb4c8da..30dfddbd256 100644 --- a/proto/osmosis/gamm/v1beta1/query.proto +++ b/proto/osmosis/gamm/v1beta1/query.proto @@ -124,7 +124,7 @@ message QueryPoolTypeResponse { //=============================== CalcJoinPoolShares message QueryCalcJoinPoolSharesRequest { uint64 pool_id = 1 [ (gogoproto.moretags) = "yaml:\"pool_id\"" ]; - repeated cosmos.base.v1beta1.Coin tokens_in = 3 [ + repeated cosmos.base.v1beta1.Coin tokens_in = 2 [ (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", (gogoproto.nullable) = false ]; @@ -135,7 +135,7 @@ message QueryCalcJoinPoolSharesResponse { (gogoproto.moretags) = "yaml:\"share_out_amount\"", (gogoproto.nullable) = false ]; - repeated cosmos.base.v1beta1.Coin tokens_out = 3 [ + repeated cosmos.base.v1beta1.Coin tokens_out = 2 [ (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", (gogoproto.nullable) = false ]; diff --git a/x/gamm/keeper/grpc_query.go b/x/gamm/keeper/grpc_query.go index 008e02463c5..7b1077037ee 100644 --- a/x/gamm/keeper/grpc_query.go +++ b/x/gamm/keeper/grpc_query.go @@ -159,10 +159,10 @@ func (q Querier) CalcJoinPoolShares(ctx context.Context, req *types.QueryCalcJoi if err != nil { return nil, err } - tokensAdded := newLiquidity.Sub(req.TokensIn) + return &types.QueryCalcJoinPoolSharesResponse{ ShareOutAmount: numShares, - TokensOut: tokensAdded, + TokensOut: newLiquidity, }, nil } diff --git a/x/gamm/keeper/grpc_query_test.go b/x/gamm/keeper/grpc_query_test.go index b5ff1486be3..842f963253b 100644 --- a/x/gamm/keeper/grpc_query_test.go +++ b/x/gamm/keeper/grpc_query_test.go @@ -5,6 +5,7 @@ import ( "fmt" sdk "github.com/cosmos/cosmos-sdk/types" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/cosmos/cosmos-sdk/types/query" "github.com/osmosis-labs/osmosis/v12/x/gamm/types" @@ -84,15 +85,80 @@ func (suite *KeeperTestSuite) TestCalcExitPoolCoinsFromShares() { } func (suite *KeeperTestSuite) TestCalcJoinPoolShares() { queryClient := suite.queryClient - + ctx := suite.Ctx poolId := suite.PrepareBalancerPool() + swapFee := sdk.ZeroDec() + + testCases := []struct { + name string + poolId uint64 + tokensIn sdk.Coins + expectedErr error + }{ + { + "valid uneven multi asset join test case", + poolId, + sdk.NewCoins(sdk.NewCoin("foo", sdk.NewInt(5000000)), sdk.NewCoin("bar", sdk.NewInt(5000000)), sdk.NewCoin("baz", sdk.NewInt(5000000)), sdk.NewCoin("uosmo", sdk.NewInt(5000000))), + nil, + }, + { + "valid even multi asset join test case", + poolId, + sdk.NewCoins(sdk.NewCoin("foo", sdk.NewInt(500000)), sdk.NewCoin("bar", sdk.NewInt(1000000)), sdk.NewCoin("baz", sdk.NewInt(1500000)), sdk.NewCoin("uosmo", sdk.NewInt(2000000))), + nil, + }, + { + "valid single asset join test case", + poolId, + sdk.NewCoins(sdk.NewCoin("uosmo", sdk.NewInt(1000000))), + nil, + }, + { + "pool id does not exist", + poolId + 1, + sdk.NewCoins(sdk.NewCoin("uosmo", sdk.NewInt(1000000))), + types.PoolDoesNotExistError{PoolId: poolId + 1}, + }, + { + "token in denom does not exist", + poolId, + sdk.NewCoins(sdk.NewCoin("random", sdk.NewInt(10000))), + sdkerrors.Wrapf(types.ErrDenomNotFoundInPool, "input denoms must already exist in the pool (%s)", "random"), + }, + { + "join pool with incorrect amount of assets", + poolId, + sdk.NewCoins(sdk.NewCoin("uosmo", sdk.NewInt(10000)), sdk.NewCoin("bar", sdk.NewInt(10000))), + types.ErrInvalidNumberOfCoins, + }, + } + + for _, tc := range testCases { + suite.Run(tc.name, func() { + out, err := queryClient.CalcJoinPoolShares(gocontext.Background(), &types.QueryCalcJoinPoolSharesRequest{ + PoolId: tc.poolId, + TokensIn: tc.tokensIn, + }) + if tc.expectedErr == nil { + poolRes, err := queryClient.Pool(gocontext.Background(), &types.QueryPoolRequest{ + PoolId: tc.poolId, + }) + suite.Require().NoError(err) + + var pool types.PoolI + err = suite.App.InterfaceRegistry().UnpackAny(poolRes.Pool, &pool) + suite.Require().NoError(err) + + numShares, numLiquidity, err := pool.CalcJoinPoolShares(ctx, tc.tokensIn, swapFee) + suite.Require().NoError(err) + suite.Require().Equal(numShares, out.ShareOutAmount) + suite.Require().Equal(numLiquidity, out.TokensOut) + } else { + suite.Require().ErrorIs(err, tc.expectedErr) + } + }) + } - out, err := queryClient.CalcJoinPoolShares(gocontext.Background(), &types.QueryCalcJoinPoolSharesRequest{ - PoolId: poolId, - TokensIn: sdk.NewCoins(sdk.NewCoin("foo", sdk.NewInt(500))), - }) - suite.Require().NotNil(out) - suite.Require().NoError(err) } func (suite *KeeperTestSuite) TestQueryPool() { queryClient := suite.queryClient diff --git a/x/gamm/pool-models/balancer/pool.go b/x/gamm/pool-models/balancer/pool.go index 22a07f7d1d7..7e3ef61cd63 100644 --- a/x/gamm/pool-models/balancer/pool.go +++ b/x/gamm/pool-models/balancer/pool.go @@ -724,7 +724,7 @@ func (p *Pool) CalcJoinPoolShares(ctx sdk.Context, tokensIn sdk.Coins, swapFee s tokensJoined = tokensIn return numShares, tokensJoined, nil } else if tokensIn.Len() != p.NumAssets() { - return sdk.ZeroInt(), sdk.NewCoins(), errors.New("balancer pool only supports LP'ing with one asset or all assets in pool") + return sdk.ZeroInt(), sdk.NewCoins(), types.ErrInvalidNumberOfCoins } // 3) JoinPoolNoSwap with as many tokens as we can. (What is in perfect ratio) diff --git a/x/gamm/types/errors.go b/x/gamm/types/errors.go index 44693c63d55..2a4b61bb40b 100644 --- a/x/gamm/types/errors.go +++ b/x/gamm/types/errors.go @@ -16,18 +16,19 @@ func (e PoolDoesNotExistError) Error() string { // x/gamm module sentinel errors. var ( - ErrPoolNotFound = sdkerrors.Register(ModuleName, 1, "pool not found") - ErrPoolAlreadyExist = sdkerrors.Register(ModuleName, 2, "pool already exist") - ErrPoolLocked = sdkerrors.Register(ModuleName, 3, "pool is locked") - ErrTooFewPoolAssets = sdkerrors.Register(ModuleName, 4, "pool should have at least 2 assets, as they must be swapping between at least two assets") - ErrTooManyPoolAssets = sdkerrors.Register(ModuleName, 5, "pool has too many assets (currently capped at 8 assets per balancer pool and 2 per stableswap)") - ErrLimitMaxAmount = sdkerrors.Register(ModuleName, 6, "calculated amount is larger than max amount") - ErrLimitMinAmount = sdkerrors.Register(ModuleName, 7, "calculated amount is lesser than min amount") - ErrInvalidMathApprox = sdkerrors.Register(ModuleName, 8, "invalid calculated result") - ErrAlreadyInvalidPool = sdkerrors.Register(ModuleName, 9, "destruction on already invalid pool") - ErrInvalidPool = sdkerrors.Register(ModuleName, 10, "attempting to create an invalid pool") - ErrDenomNotFoundInPool = sdkerrors.Register(ModuleName, 11, "denom does not exist in pool") - ErrDenomAlreadyInPool = sdkerrors.Register(ModuleName, 12, "denom already exists in the pool") + ErrPoolNotFound = sdkerrors.Register(ModuleName, 1, "pool not found") + ErrPoolAlreadyExist = sdkerrors.Register(ModuleName, 2, "pool already exist") + ErrPoolLocked = sdkerrors.Register(ModuleName, 3, "pool is locked") + ErrTooFewPoolAssets = sdkerrors.Register(ModuleName, 4, "pool should have at least 2 assets, as they must be swapping between at least two assets") + ErrTooManyPoolAssets = sdkerrors.Register(ModuleName, 5, "pool has too many assets (currently capped at 8 assets per balancer pool and 2 per stableswap)") + ErrLimitMaxAmount = sdkerrors.Register(ModuleName, 6, "calculated amount is larger than max amount") + ErrLimitMinAmount = sdkerrors.Register(ModuleName, 7, "calculated amount is lesser than min amount") + ErrInvalidMathApprox = sdkerrors.Register(ModuleName, 8, "invalid calculated result") + ErrAlreadyInvalidPool = sdkerrors.Register(ModuleName, 9, "destruction on already invalid pool") + ErrInvalidPool = sdkerrors.Register(ModuleName, 10, "attempting to create an invalid pool") + ErrDenomNotFoundInPool = sdkerrors.Register(ModuleName, 11, "denom does not exist in pool") + ErrDenomAlreadyInPool = sdkerrors.Register(ModuleName, 12, "denom already exists in the pool") + ErrInvalidNumberOfCoins = sdkerrors.Register(ModuleName, 13, "balancer pool only supports LP'ing with one asset or all assets in pool") ErrEmptyRoutes = sdkerrors.Register(ModuleName, 21, "routes not defined") ErrEmptyPoolAssets = sdkerrors.Register(ModuleName, 22, "PoolAssets not defined") diff --git a/x/gamm/types/query.pb.go b/x/gamm/types/query.pb.go index 186c6869e7c..bba2779068f 100644 --- a/x/gamm/types/query.pb.go +++ b/x/gamm/types/query.pb.go @@ -395,7 +395,7 @@ func (m *QueryPoolTypeResponse) GetPoolType() string { // =============================== CalcJoinPoolShares type QueryCalcJoinPoolSharesRequest struct { PoolId uint64 `protobuf:"varint,1,opt,name=pool_id,json=poolId,proto3" json:"pool_id,omitempty" yaml:"pool_id"` - TokensIn github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,3,rep,name=tokens_in,json=tokensIn,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"tokens_in"` + TokensIn github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,2,rep,name=tokens_in,json=tokensIn,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"tokens_in"` } func (m *QueryCalcJoinPoolSharesRequest) Reset() { *m = QueryCalcJoinPoolSharesRequest{} } @@ -447,7 +447,7 @@ func (m *QueryCalcJoinPoolSharesRequest) GetTokensIn() github_com_cosmos_cosmos_ type QueryCalcJoinPoolSharesResponse struct { ShareOutAmount github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,1,opt,name=share_out_amount,json=shareOutAmount,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"share_out_amount" yaml:"share_out_amount"` - TokensOut github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,3,rep,name=tokens_out,json=tokensOut,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"tokens_out"` + TokensOut github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,2,rep,name=tokens_out,json=tokensOut,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"tokens_out"` } func (m *QueryCalcJoinPoolSharesResponse) Reset() { *m = QueryCalcJoinPoolSharesResponse{} } @@ -1294,107 +1294,107 @@ func init() { proto.RegisterFile("osmosis/gamm/v1beta1/query.proto", fileDescrip var fileDescriptor_d9a717df9ca609ef = []byte{ // 1625 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x58, 0xcb, 0x6f, 0x1c, 0x45, - 0x13, 0xf7, 0x38, 0x6b, 0xc7, 0xdb, 0xfe, 0xfc, 0xea, 0x38, 0xc9, 0x66, 0x9d, 0xec, 0xe6, 0xeb, - 0x4f, 0x9f, 0xed, 0x24, 0xf6, 0x6c, 0xec, 0x38, 0x12, 0xb2, 0xc8, 0xc3, 0x4e, 0xec, 0x64, 0x2d, - 0x88, 0xcd, 0x24, 0x0a, 0x02, 0x0e, 0xab, 0xb1, 0x3d, 0xac, 0x27, 0xd9, 0x9d, 0x1e, 0xef, 0xf4, - 0xc4, 0xb6, 0x50, 0x84, 0x14, 0x21, 0x4e, 0x1c, 0x90, 0x02, 0x9c, 0x22, 0xc1, 0x81, 0x03, 0xe2, - 0x8c, 0xc4, 0x1d, 0x84, 0x14, 0x21, 0x21, 0x05, 0x71, 0x41, 0x1c, 0x16, 0x94, 0x00, 0xe2, 0xec, - 0x7f, 0x00, 0xd4, 0xdd, 0x35, 0x8f, 0x7d, 0xcd, 0x3e, 0xa2, 0x48, 0x9c, 0xbc, 0xd3, 0x55, 0xf5, - 0xeb, 0x5f, 0x55, 0x75, 0x57, 0x57, 0x19, 0x9d, 0xa4, 0x4e, 0x91, 0x3a, 0xa6, 0x93, 0xc9, 0xeb, - 0xc5, 0x62, 0xe6, 0xde, 0xcc, 0xba, 0xc1, 0xf4, 0x99, 0xcc, 0xb6, 0x6b, 0x94, 0xf6, 0x54, 0xbb, - 0x44, 0x19, 0xc5, 0xa3, 0xa0, 0xa1, 0x72, 0x0d, 0x15, 0x34, 0x92, 0xa3, 0x79, 0x9a, 0xa7, 0x42, - 0x21, 0xc3, 0x7f, 0x49, 0xdd, 0xe4, 0x89, 0xba, 0x68, 0x6c, 0x17, 0xc4, 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, 0x31, 0xdd, 0x9a, 0x72, 0x87, 0x27, 0x82, 0x1b, 0x3b, 0xf8, 0x07, 0x05, 0x1d, 0x5b, 0x76, + 0x98, 0x59, 0xd0, 0x99, 0x51, 0xd3, 0x39, 0xe2, 0x73, 0x51, 0x08, 0x1a, 0x74, 0xda, 0x89, 0xf9, + 0xf6, 0x8c, 0x00, 0xfe, 0xb2, 0x80, 0x7f, 0x09, 0x5f, 0xa8, 0x0f, 0x3f, 0x74, 0xff, 0x00, 0x6d, + 0x3a, 0x54, 0x64, 0x82, 0x3b, 0xf8, 0xa3, 0x82, 0x12, 0x0d, 0xe2, 0x59, 0x73, 0x19, 0x6e, 0x03, + 0x5b, 0xd0, 0xa0, 0x46, 0x9e, 0xf4, 0xc6, 0xfd, 0x1c, 0x59, 0x11, 0x21, 0x5d, 0xc6, 0x17, 0x9f, + 0x23, 0x24, 0xea, 0xb2, 0xa5, 0xd5, 0xc7, 0x4f, 0x93, 0xca, 0x93, 0xa7, 0x49, 0xe5, 0xb7, 0xa7, + 0x49, 0xe5, 0xc3, 0x67, 0xc9, 0xae, 0x27, 0xcf, 0x92, 0x5d, 0x3f, 0x3f, 0x4b, 0x76, 0xbd, 0x79, + 0x36, 0xd4, 0x37, 0xc1, 0x1e, 0x33, 0x79, 0x7d, 0xc3, 0xf1, 0x37, 0xbc, 0x37, 0x3b, 0x97, 0xde, + 0x93, 0xdb, 0x8a, 0x2e, 0x6a, 0xa3, 0x57, 0xfc, 0xab, 0xe0, 0xdc, 0x3f, 0x01, 0x00, 0x00, 0xff, + 0xff, 0x78, 0x00, 0x36, 0x15, 0x08, 0x17, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -2210,7 +2210,7 @@ func (m *QueryCalcJoinPoolSharesRequest) MarshalToSizedBuffer(dAtA []byte) (int, i = encodeVarintQuery(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x1a + dAtA[i] = 0x12 } } if m.PoolId != 0 { @@ -2252,7 +2252,7 @@ func (m *QueryCalcJoinPoolSharesResponse) MarshalToSizedBuffer(dAtA []byte) (int i = encodeVarintQuery(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x1a + dAtA[i] = 0x12 } } { @@ -3910,7 +3910,7 @@ func (m *QueryCalcJoinPoolSharesRequest) Unmarshal(dAtA []byte) error { break } } - case 3: + case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field TokensIn", wireType) } @@ -4028,7 +4028,7 @@ func (m *QueryCalcJoinPoolSharesResponse) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex - case 3: + case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field TokensOut", wireType) } From 1765435fb272a2c395428cc33e46cde49a01f688 Mon Sep 17 00:00:00 2001 From: Ruslan Akhtariev Date: Sat, 15 Oct 2022 13:37:27 +0700 Subject: [PATCH 18/59] tests for CalcExitPoolCoinsFromShares --- go.mod | 2 +- x/gamm/keeper/grpc_query.go | 1 - x/gamm/keeper/grpc_query_test.go | 17 ++++------------- 3 files changed, 5 insertions(+), 15 deletions(-) diff --git a/go.mod b/go.mod index bd423c270dc..53e7fb4bfa1 100644 --- a/go.mod +++ b/go.mod @@ -5,7 +5,7 @@ go 1.18 require ( github.com/CosmWasm/wasmd v0.28.0-osmo-v12 github.com/cosmos/cosmos-proto v1.0.0-alpha7 - github.com/cosmos/cosmos-sdk v0.46.2 + github.com/cosmos/cosmos-sdk v0.46.1 github.com/cosmos/go-bip39 v1.0.0 github.com/cosmos/iavl v0.19.1 github.com/cosmos/ibc-go/v3 v3.3.0 diff --git a/x/gamm/keeper/grpc_query.go b/x/gamm/keeper/grpc_query.go index 7b1077037ee..8cad2e82211 100644 --- a/x/gamm/keeper/grpc_query.go +++ b/x/gamm/keeper/grpc_query.go @@ -177,7 +177,6 @@ func (q Querier) CalcExitPoolCoinsFromShares(ctx context.Context, req *types.Que if err != nil { return nil, types.ErrPoolNotFound } - denom_liquidity := q.Keeper.GetDenomLiquidity(sdkCtx, req.TokenOutDenom) if denom_liquidity == sdk.NewInt(0) { return nil, types.ErrDenomNotFoundInPool diff --git a/x/gamm/keeper/grpc_query_test.go b/x/gamm/keeper/grpc_query_test.go index 842f963253b..07484d278f5 100644 --- a/x/gamm/keeper/grpc_query_test.go +++ b/x/gamm/keeper/grpc_query_test.go @@ -28,30 +28,23 @@ func (suite *KeeperTestSuite) TestCalcExitPoolCoinsFromShares() { "valid test case", poolId, "foo", - sdk.NewInt(1000000), + sdk.NewInt(1000000000000000000), nil, }, { "pool id does not exist", poolId + 1, "foo", - sdk.NewInt(1000000), + sdk.NewInt(1000000000000000000), types.ErrPoolNotFound, }, { "token in denom does not exist", poolId, "hello", - sdk.NewInt(1000000), + sdk.NewInt(1000000000000000000), types.ErrDenomNotFoundInPool, }, - // { - // "check", - // poolId, - // "foo", - // sdk.NewInt(1), - // types.ErrDenomNotFoundInPool, - // }, } for _, tc := range testCases { @@ -65,8 +58,6 @@ func (suite *KeeperTestSuite) TestCalcExitPoolCoinsFromShares() { poolRes, err := queryClient.Pool(gocontext.Background(), &types.QueryPoolRequest{ PoolId: tc.poolId, }) - fmt.Println("DEBUG1: ", poolRes) // ERROR HERE somehow it does not return result - suite.Require().NoError(err) var pool types.PoolI @@ -75,7 +66,6 @@ func (suite *KeeperTestSuite) TestCalcExitPoolCoinsFromShares() { exitCoins, err := pool.CalcExitPoolCoinsFromShares(ctx, tc.shareInAmount, exitFee) suite.Require().NoError(err) - fmt.Println("DEBUG2: ", exitCoins, out.TokenOutAmount) suite.Require().Equal(exitCoins.AmountOf(tc.tokenOut).Uint64(), out.TokenOutAmount) } else { suite.Require().ErrorIs(err, tc.expectedErr) @@ -150,6 +140,7 @@ func (suite *KeeperTestSuite) TestCalcJoinPoolShares() { suite.Require().NoError(err) numShares, numLiquidity, err := pool.CalcJoinPoolShares(ctx, tc.tokensIn, swapFee) + fmt.Println(numShares) suite.Require().NoError(err) suite.Require().Equal(numShares, out.ShareOutAmount) suite.Require().Equal(numLiquidity, out.TokensOut) From d8473b5379ae61bef010258011de80a8b3e5e636 Mon Sep 17 00:00:00 2001 From: Ruslan Akhtariev Date: Sat, 15 Oct 2022 13:39:07 +0700 Subject: [PATCH 19/59] tests for CalcExitPoolCoinsFromShares --- x/gamm/keeper/grpc_query_test.go | 2 -- 1 file changed, 2 deletions(-) diff --git a/x/gamm/keeper/grpc_query_test.go b/x/gamm/keeper/grpc_query_test.go index 07484d278f5..eb5b5475e16 100644 --- a/x/gamm/keeper/grpc_query_test.go +++ b/x/gamm/keeper/grpc_query_test.go @@ -2,7 +2,6 @@ package keeper_test import ( gocontext "context" - "fmt" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" @@ -140,7 +139,6 @@ func (suite *KeeperTestSuite) TestCalcJoinPoolShares() { suite.Require().NoError(err) numShares, numLiquidity, err := pool.CalcJoinPoolShares(ctx, tc.tokensIn, swapFee) - fmt.Println(numShares) suite.Require().NoError(err) suite.Require().Equal(numShares, out.ShareOutAmount) suite.Require().Equal(numLiquidity, out.TokensOut) From c65a19fc88a0dbc3898e4e3f74dbd52c09e1f3fc Mon Sep 17 00:00:00 2001 From: Ruslan Akhtariev Date: Mon, 17 Oct 2022 17:08:52 +0700 Subject: [PATCH 20/59] save --- app/apptesting/superfluid.go | 22 ++ app/upgrades/v13/constants.go | 16 ++ app/upgrades/v13/upgrades.go | 23 +++ go.mod | 2 +- proto/osmosis/lockup/params.proto | 11 + x/lockup/types/params.go | 63 ++++++ x/lockup/types/params.pb.go | 323 ++++++++++++++++++++++++++++++ 7 files changed, 459 insertions(+), 1 deletion(-) create mode 100644 app/apptesting/superfluid.go create mode 100644 app/upgrades/v13/constants.go create mode 100644 app/upgrades/v13/upgrades.go create mode 100644 proto/osmosis/lockup/params.proto create mode 100644 x/lockup/types/params.go create mode 100644 x/lockup/types/params.pb.go diff --git a/app/apptesting/superfluid.go b/app/apptesting/superfluid.go new file mode 100644 index 00000000000..d7193d4d509 --- /dev/null +++ b/app/apptesting/superfluid.go @@ -0,0 +1,22 @@ +package apptesting + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" + stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" + + gammtypes "github.com/osmosis-labs/osmosis/v12/x/gamm/types" + "github.com/osmosis-labs/osmosis/v12/x/superfluid/types" +) + +func (s *KeeperTestHelper) SuperfluidDelegateToDefaultVal(sender sdk.AccAddress, poolId uint64, lockId uint64) error { + valAddr := s.SetupValidator(stakingtypes.Bonded) + + poolDenom := gammtypes.GetPoolShareDenom(poolId) + err := s.App.SuperfluidKeeper.AddNewSuperfluidAsset(s.Ctx, types.SuperfluidAsset{ + Denom: poolDenom, + AssetType: types.SuperfluidAssetTypeLPShare, + }) + s.Require().NoError(err) + + return s.App.SuperfluidKeeper.SuperfluidDelegate(s.Ctx, sender.String(), lockId, valAddr.String()) +} diff --git a/app/upgrades/v13/constants.go b/app/upgrades/v13/constants.go new file mode 100644 index 00000000000..7779df096f6 --- /dev/null +++ b/app/upgrades/v13/constants.go @@ -0,0 +1,16 @@ +package v13 + +import ( + "github.com/osmosis-labs/osmosis/v12/app/upgrades" + + store "github.com/cosmos/cosmos-sdk/store/types" +) + +// UpgradeName defines the on-chain upgrade name for the Osmosis v9 upgrade. +const UpgradeName = "v13" + +var Upgrade = upgrades.Upgrade{ + UpgradeName: UpgradeName, + CreateUpgradeHandler: CreateUpgradeHandler, + StoreUpgrades: store.StoreUpgrades{}, +} diff --git a/app/upgrades/v13/upgrades.go b/app/upgrades/v13/upgrades.go new file mode 100644 index 00000000000..a58bf8aabb4 --- /dev/null +++ b/app/upgrades/v13/upgrades.go @@ -0,0 +1,23 @@ +package v13 + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/module" + upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" + + "github.com/osmosis-labs/osmosis/v12/app/keepers" + "github.com/osmosis-labs/osmosis/v12/app/upgrades" + lockuptypes "github.com/osmosis-labs/osmosis/v12/x/lockup/types" +) + +func CreateUpgradeHandler( + mm *module.Manager, + configurator module.Configurator, + bpm upgrades.BaseAppParamManager, + keepers *keepers.AppKeepers, +) upgradetypes.UpgradeHandler { + return func(ctx sdk.Context, plan upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) { + keepers.LockupKeeper.SetParams(ctx, lockuptypes.DefaultParams()) + return mm.RunMigrations(ctx, configurator, fromVM) + } +} diff --git a/go.mod b/go.mod index bd423c270dc..53e7fb4bfa1 100644 --- a/go.mod +++ b/go.mod @@ -5,7 +5,7 @@ go 1.18 require ( github.com/CosmWasm/wasmd v0.28.0-osmo-v12 github.com/cosmos/cosmos-proto v1.0.0-alpha7 - github.com/cosmos/cosmos-sdk v0.46.2 + github.com/cosmos/cosmos-sdk v0.46.1 github.com/cosmos/go-bip39 v1.0.0 github.com/cosmos/iavl v0.19.1 github.com/cosmos/ibc-go/v3 v3.3.0 diff --git a/proto/osmosis/lockup/params.proto b/proto/osmosis/lockup/params.proto new file mode 100644 index 00000000000..a46f45f0980 --- /dev/null +++ b/proto/osmosis/lockup/params.proto @@ -0,0 +1,11 @@ +syntax = "proto3"; +package osmosis.lockup; + +import "gogoproto/gogo.proto"; + +option go_package = "github.com/osmosis-labs/osmosis/v12/x/lockup/types"; + +message Params { + repeated string force_unlock_allowed_addresses = 1 + [ (gogoproto.moretags) = "yaml:\"force_unlock_allowed_address\"" ]; +} diff --git a/x/lockup/types/params.go b/x/lockup/types/params.go new file mode 100644 index 00000000000..18ac9b3290f --- /dev/null +++ b/x/lockup/types/params.go @@ -0,0 +1,63 @@ +package types + +import ( + fmt "fmt" + + sdk "github.com/cosmos/cosmos-sdk/types" + paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" +) + +// Parameter store keys. +var ( + KeyForceUnlockAllowedAddresses = []byte("ForceUnlockAllowedAddresses") + + _ paramtypes.ParamSet = &Params{} +) + +// ParamTable for lockup module. +func ParamKeyTable() paramtypes.KeyTable { + return paramtypes.NewKeyTable().RegisterParamSet(&Params{}) +} + +func NewParams(forceUnlockAllowedAddresses []string) Params { + return Params{ + ForceUnlockAllowedAddresses: forceUnlockAllowedAddresses, + } +} + +// DefaultParams returns default lockup module parameters. +func DefaultParams() Params { + return Params{ + ForceUnlockAllowedAddresses: []string{}, + } +} + +// validate params. +func (p Params) Validate() error { + if err := validateAddresses(p.ForceUnlockAllowedAddresses); err != nil { + return err + } + return nil +} + +// Implements params.ParamSet. +func (p *Params) ParamSetPairs() paramtypes.ParamSetPairs { + return paramtypes.ParamSetPairs{ + paramtypes.NewParamSetPair(KeyForceUnlockAllowedAddresses, &p.ForceUnlockAllowedAddresses, validateAddresses), + } +} + +func validateAddresses(i interface{}) error { + addresses, ok := i.([]string) + if !ok { + return fmt.Errorf("invalid parameter type: %T", i) + } + for _, address := range addresses { + _, err := sdk.AccAddressFromBech32(address) + if err != nil { + return err + } + } + + return nil +} diff --git a/x/lockup/types/params.pb.go b/x/lockup/types/params.pb.go new file mode 100644 index 00000000000..e07ef264fb0 --- /dev/null +++ b/x/lockup/types/params.pb.go @@ -0,0 +1,323 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: osmosis/lockup/params.proto + +package types + +import ( + fmt "fmt" + _ "github.com/gogo/protobuf/gogoproto" + proto "github.com/gogo/protobuf/proto" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +type Params struct { + ForceUnlockAllowedAddresses []string `protobuf:"bytes,1,rep,name=force_unlock_allowed_addresses,json=forceUnlockAllowedAddresses,proto3" json:"force_unlock_allowed_addresses,omitempty" yaml:"force_unlock_allowed_address"` +} + +func (m *Params) Reset() { *m = Params{} } +func (m *Params) String() string { return proto.CompactTextString(m) } +func (*Params) ProtoMessage() {} +func (*Params) Descriptor() ([]byte, []int) { + return fileDescriptor_4595e58f5e17053c, []int{0} +} +func (m *Params) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Params) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Params.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 *Params) XXX_Merge(src proto.Message) { + xxx_messageInfo_Params.Merge(m, src) +} +func (m *Params) XXX_Size() int { + return m.Size() +} +func (m *Params) XXX_DiscardUnknown() { + xxx_messageInfo_Params.DiscardUnknown(m) +} + +var xxx_messageInfo_Params proto.InternalMessageInfo + +func (m *Params) GetForceUnlockAllowedAddresses() []string { + if m != nil { + return m.ForceUnlockAllowedAddresses + } + return nil +} + +func init() { + proto.RegisterType((*Params)(nil), "osmosis.lockup.Params") +} + +func init() { proto.RegisterFile("osmosis/lockup/params.proto", fileDescriptor_4595e58f5e17053c) } + +var fileDescriptor_4595e58f5e17053c = []byte{ + // 214 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0xce, 0x2f, 0xce, 0xcd, + 0x2f, 0xce, 0x2c, 0xd6, 0xcf, 0xc9, 0x4f, 0xce, 0x2e, 0x2d, 0xd0, 0x2f, 0x48, 0x2c, 0x4a, 0xcc, + 0x2d, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x83, 0x4a, 0xea, 0x41, 0x24, 0xa5, 0x44, + 0xd2, 0xf3, 0xd3, 0xf3, 0xc1, 0x52, 0xfa, 0x20, 0x16, 0x44, 0x95, 0x52, 0x19, 0x17, 0x5b, 0x00, + 0x58, 0x97, 0x50, 0x0e, 0x97, 0x5c, 0x5a, 0x7e, 0x51, 0x72, 0x6a, 0x7c, 0x69, 0x1e, 0x48, 0x47, + 0x7c, 0x62, 0x4e, 0x4e, 0x7e, 0x79, 0x6a, 0x4a, 0x7c, 0x62, 0x4a, 0x4a, 0x51, 0x6a, 0x71, 0x71, + 0x6a, 0xb1, 0x04, 0xa3, 0x02, 0xb3, 0x06, 0xa7, 0x93, 0xfa, 0xa7, 0x7b, 0xf2, 0xca, 0x95, 0x89, + 0xb9, 0x39, 0x56, 0x4a, 0xf8, 0xd4, 0x2b, 0x05, 0x49, 0x83, 0xa5, 0x43, 0xc1, 0xb2, 0x8e, 0x10, + 0x49, 0x47, 0x98, 0x59, 0x4e, 0x3e, 0x27, 0x1e, 0xc9, 0x31, 0x5e, 0x78, 0x24, 0xc7, 0xf8, 0xe0, + 0x91, 0x1c, 0xe3, 0x84, 0xc7, 0x72, 0x0c, 0x17, 0x1e, 0xcb, 0x31, 0xdc, 0x78, 0x2c, 0xc7, 0x10, + 0x65, 0x94, 0x9e, 0x59, 0x92, 0x51, 0x9a, 0xa4, 0x97, 0x9c, 0x9f, 0xab, 0x0f, 0xf5, 0x82, 0x6e, + 0x4e, 0x62, 0x52, 0x31, 0x8c, 0xa3, 0x5f, 0x66, 0x68, 0xa4, 0x5f, 0x01, 0xf3, 0x72, 0x49, 0x65, + 0x41, 0x6a, 0x71, 0x12, 0x1b, 0xd8, 0x33, 0xc6, 0x80, 0x00, 0x00, 0x00, 0xff, 0xff, 0x7b, 0xec, + 0x2b, 0x68, 0x11, 0x01, 0x00, 0x00, +} + +func (m *Params) 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 *Params) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.ForceUnlockAllowedAddresses) > 0 { + for iNdEx := len(m.ForceUnlockAllowedAddresses) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.ForceUnlockAllowedAddresses[iNdEx]) + copy(dAtA[i:], m.ForceUnlockAllowedAddresses[iNdEx]) + i = encodeVarintParams(dAtA, i, uint64(len(m.ForceUnlockAllowedAddresses[iNdEx]))) + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func encodeVarintParams(dAtA []byte, offset int, v uint64) int { + offset -= sovParams(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *Params) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.ForceUnlockAllowedAddresses) > 0 { + for _, s := range m.ForceUnlockAllowedAddresses { + l = len(s) + n += 1 + l + sovParams(uint64(l)) + } + } + return n +} + +func sovParams(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozParams(x uint64) (n int) { + return sovParams(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *Params) 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 ErrIntOverflowParams + } + 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: Params: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Params: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ForceUnlockAllowedAddresses", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParams + } + 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 ErrInvalidLengthParams + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthParams + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ForceUnlockAllowedAddresses = append(m.ForceUnlockAllowedAddresses, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipParams(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthParams + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipParams(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowParams + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowParams + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowParams + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthParams + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupParams + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthParams + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthParams = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowParams = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupParams = fmt.Errorf("proto: unexpected end of group") +) From b6516be9bb9a357ad5d1e130b23323336b626672 Mon Sep 17 00:00:00 2001 From: George McAskill <42020095+georgemc98@users.noreply.github.com> Date: Mon, 17 Oct 2022 20:54:47 -0500 Subject: [PATCH 21/59] test: add additional exit coin tests --- x/gamm/keeper/grpc_query.go | 4 ++-- x/gamm/keeper/grpc_query_test.go | 14 ++++++++++++++ 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/x/gamm/keeper/grpc_query.go b/x/gamm/keeper/grpc_query.go index 8cad2e82211..96ad7c5e20c 100644 --- a/x/gamm/keeper/grpc_query.go +++ b/x/gamm/keeper/grpc_query.go @@ -177,8 +177,8 @@ func (q Querier) CalcExitPoolCoinsFromShares(ctx context.Context, req *types.Que if err != nil { return nil, types.ErrPoolNotFound } - denom_liquidity := q.Keeper.GetDenomLiquidity(sdkCtx, req.TokenOutDenom) - if denom_liquidity == sdk.NewInt(0) { + denomLiquidity := q.Keeper.GetDenomLiquidity(sdkCtx, req.TokenOutDenom) + if denomLiquidity == sdk.ZeroInt() { return nil, types.ErrDenomNotFoundInPool } diff --git a/x/gamm/keeper/grpc_query_test.go b/x/gamm/keeper/grpc_query_test.go index eb5b5475e16..c18226b655b 100644 --- a/x/gamm/keeper/grpc_query_test.go +++ b/x/gamm/keeper/grpc_query_test.go @@ -44,6 +44,20 @@ func (suite *KeeperTestSuite) TestCalcExitPoolCoinsFromShares() { sdk.NewInt(1000000000000000000), types.ErrDenomNotFoundInPool, }, + { + "zero share in amount", + poolId, + "foo", + sdk.ZeroInt(), + sdkerrors.Wrapf(types.ErrInvalidMathApprox, "share ratio is zero or negative"), + }, + { + "negative share in amount", + poolId, + "foo", + sdk.NewInt(-10000), + sdkerrors.Wrapf(types.ErrInvalidMathApprox, "share ratio is zero or negative"), + }, } for _, tc := range testCases { From 782625439162ac39a6186593e6f2596ea5633d2d Mon Sep 17 00:00:00 2001 From: Ruslan Akhtariev Date: Wed, 19 Oct 2022 11:20:21 +0700 Subject: [PATCH 22/59] docs rpc TotalDelegationByValidatorForDenom --- proto/osmosis/superfluid/query.proto | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/proto/osmosis/superfluid/query.proto b/proto/osmosis/superfluid/query.proto index f57be312711..c831d78e520 100644 --- a/proto/osmosis/superfluid/query.proto +++ b/proto/osmosis/superfluid/query.proto @@ -52,7 +52,8 @@ service Query { option (google.api.http).get = "/osmosis/superfluid/v1beta1/connected_intermediary_account/{lock_id}"; } - + + // Returns the amount of delegations of specific denom for all validators rpc TotalDelegationByValidatorForDenom( QueryTotalDelegationByValidatorForDenomRequest) returns (QueryTotalDelegationByValidatorForDenomResponse) {} From e15c399250b40fee548cf57d2cdb7d47aebbadce Mon Sep 17 00:00:00 2001 From: Ruslan Akhtariev Date: Thu, 20 Oct 2022 12:03:29 +0700 Subject: [PATCH 23/59] TotalDelegationByValidatorForDenom clean --- go.sum | 1 - proto/osmosis/superfluid/query.proto | 18 +- x/superfluid/keeper/grpc_query.go | 8 +- x/superfluid/keeper/grpc_query_test.go | 4 +- x/superfluid/types/query.pb.go | 291 ++++++++++++------------- 5 files changed, 159 insertions(+), 163 deletions(-) diff --git a/go.sum b/go.sum index 8c21314c7ed..c878f552caa 100644 --- a/go.sum +++ b/go.sum @@ -501,7 +501,6 @@ github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= diff --git a/proto/osmosis/superfluid/query.proto b/proto/osmosis/superfluid/query.proto index c831d78e520..20562ac64ce 100644 --- a/proto/osmosis/superfluid/query.proto +++ b/proto/osmosis/superfluid/query.proto @@ -52,7 +52,7 @@ service Query { option (google.api.http).get = "/osmosis/superfluid/v1beta1/connected_intermediary_account/{lock_id}"; } - + // Returns the amount of delegations of specific denom for all validators rpc TotalDelegationByValidatorForDenom( QueryTotalDelegationByValidatorForDenomRequest) @@ -160,15 +160,21 @@ message ConnectedIntermediaryAccountResponse { message QueryTotalDelegationByValidatorForDenomRequest { string denom = 1; } message QueryTotalDelegationByValidatorForDenomResponse { - repeated Delegations asset_response = 1; + repeated Delegations asset_response = 1 [ (gogoproto.nullable) = false ]; } message Delegations { string val_addr = 1; - string amount_sfsd = 2 - [ (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int" ]; - string osmo_equivalent = 3 - [ (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int" ]; + string amount_sfsd = 2 [ + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", + (gogoproto.moretags) = "yaml:\"amount_sfsd\"", + (gogoproto.nullable) = false + ]; + string osmo_equivalent = 3 [ + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", + (gogoproto.moretags) = "yaml:\"osmo_equivalent\"", + (gogoproto.nullable) = false + ]; } message TotalSuperfluidDelegationsRequest {} diff --git a/x/superfluid/keeper/grpc_query.go b/x/superfluid/keeper/grpc_query.go index 30de638714e..0a6681ead49 100644 --- a/x/superfluid/keeper/grpc_query.go +++ b/x/superfluid/keeper/grpc_query.go @@ -395,7 +395,7 @@ func (q Querier) EstimateSuperfluidDelegatedAmountByValidatorDenom(goCtx context func (q Querier) TotalDelegationByValidatorForDenom(goCtx context.Context, req *types.QueryTotalDelegationByValidatorForDenomRequest) (*types.QueryTotalDelegationByValidatorForDenomResponse, error) { ctx := sdk.UnwrapSDKContext(goCtx) - var delegationsByValidator = []*types.Delegations{} + var delegationsByValidator = []types.Delegations{} var intermediaryAccount types.SuperfluidIntermediaryAccount intermediaryAccounts := q.Keeper.GetAllIntermediaryAccounts(ctx) @@ -418,10 +418,10 @@ func (q Querier) TotalDelegationByValidatorForDenom(goCtx context.Context, req * equivalentAmountOSMO := q.Keeper.GetSuperfluidOSMOTokens(ctx, req.Denom, amount) - result := &types.Delegations{ + result := types.Delegations{ ValAddr: valAddr.String(), - AmountSfsd: &amount, - OsmoEquivalent: &equivalentAmountOSMO, + AmountSfsd: amount, + OsmoEquivalent: equivalentAmountOSMO, } delegationsByValidator = append(delegationsByValidator, result) diff --git a/x/superfluid/keeper/grpc_query_test.go b/x/superfluid/keeper/grpc_query_test.go index 82684ad5933..989e0853831 100644 --- a/x/superfluid/keeper/grpc_query_test.go +++ b/x/superfluid/keeper/grpc_query_test.go @@ -42,13 +42,13 @@ func (suite *KeeperTestSuite) TestTotalDelegationByValidatorForAsset() { for res_ind, res := range req.AssetResponse { // check osmo equivalent is correct - actual_response_osmo := *req.AssetResponse[res_ind].OsmoEquivalent + actual_response_osmo := req.AssetResponse[res_ind].OsmoEquivalent needed_response_osmo := suite.App.SuperfluidKeeper.GetSuperfluidOSMOTokens(ctx, denom, sdk.NewInt(delegation_amount)) suite.Require().Equal(actual_response_osmo, needed_response_osmo) // check sfs'd asset amount correct - actual_response_asset := *req.AssetResponse[res_ind].AmountSfsd + actual_response_asset := req.AssetResponse[res_ind].AmountSfsd needed_response_asset := sdk.NewInt(delegation_amount) suite.Require().Equal(actual_response_asset, needed_response_asset) diff --git a/x/superfluid/types/query.pb.go b/x/superfluid/types/query.pb.go index 872f9149065..f31a1a0d214 100644 --- a/x/superfluid/types/query.pb.go +++ b/x/superfluid/types/query.pb.go @@ -673,7 +673,7 @@ func (m *QueryTotalDelegationByValidatorForDenomRequest) GetDenom() string { } type QueryTotalDelegationByValidatorForDenomResponse struct { - AssetResponse []*Delegations `protobuf:"bytes,1,rep,name=asset_response,json=assetResponse,proto3" json:"asset_response,omitempty"` + AssetResponse []Delegations `protobuf:"bytes,1,rep,name=asset_response,json=assetResponse,proto3" json:"asset_response"` } func (m *QueryTotalDelegationByValidatorForDenomResponse) Reset() { @@ -713,7 +713,7 @@ func (m *QueryTotalDelegationByValidatorForDenomResponse) XXX_DiscardUnknown() { var xxx_messageInfo_QueryTotalDelegationByValidatorForDenomResponse proto.InternalMessageInfo -func (m *QueryTotalDelegationByValidatorForDenomResponse) GetAssetResponse() []*Delegations { +func (m *QueryTotalDelegationByValidatorForDenomResponse) GetAssetResponse() []Delegations { if m != nil { return m.AssetResponse } @@ -721,9 +721,9 @@ func (m *QueryTotalDelegationByValidatorForDenomResponse) GetAssetResponse() []* } type Delegations struct { - ValAddr string `protobuf:"bytes,1,opt,name=val_addr,json=valAddr,proto3" json:"val_addr,omitempty"` - AmountSfsd *github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,2,opt,name=amount_sfsd,json=amountSfsd,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"amount_sfsd,omitempty"` - OsmoEquivalent *github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,3,opt,name=osmo_equivalent,json=osmoEquivalent,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"osmo_equivalent,omitempty"` + ValAddr string `protobuf:"bytes,1,opt,name=val_addr,json=valAddr,proto3" json:"val_addr,omitempty"` + AmountSfsd github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,2,opt,name=amount_sfsd,json=amountSfsd,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"amount_sfsd" yaml:"amount_sfsd"` + OsmoEquivalent github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,3,opt,name=osmo_equivalent,json=osmoEquivalent,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"osmo_equivalent" yaml:"osmo_equivalent"` } func (m *Delegations) Reset() { *m = Delegations{} } @@ -1531,119 +1531,120 @@ func init() { func init() { proto.RegisterFile("osmosis/superfluid/query.proto", fileDescriptor_e3d9448e4ed3943f) } var fileDescriptor_e3d9448e4ed3943f = []byte{ - // 1783 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x59, 0x4d, 0x6c, 0x14, 0xe5, - 0x1b, 0xef, 0xb4, 0xa5, 0x85, 0xa7, 0xf9, 0x97, 0xf6, 0x85, 0x3f, 0x2d, 0x03, 0x6c, 0x61, 0x5a, - 0xda, 0x5a, 0x60, 0xc6, 0x16, 0x81, 0x0a, 0x42, 0xd8, 0xa5, 0x14, 0x1b, 0x5b, 0x8b, 0x5b, 0x5a, - 0x12, 0x3f, 0x32, 0x99, 0xee, 0x4c, 0x97, 0x49, 0x67, 0x67, 0xb6, 0xf3, 0xce, 0x56, 0x36, 0x84, - 0x98, 0x60, 0x4c, 0x24, 0x1e, 0x34, 0xe1, 0xe4, 0xcd, 0x2b, 0x1e, 0xf4, 0xe8, 0xc5, 0x8b, 0xf1, - 0x42, 0x34, 0x26, 0x18, 0x2f, 0xc6, 0x03, 0x18, 0xf0, 0xa8, 0x17, 0x8f, 0x7a, 0x31, 0xf3, 0xbe, - 0xef, 0x7c, 0x6c, 0x77, 0x66, 0x76, 0x76, 0x41, 0xf0, 0xd4, 0x9d, 0x79, 0x9f, 0xaf, 0xdf, 0xf3, - 0xf5, 0xce, 0xf3, 0x14, 0x32, 0x16, 0x2e, 0x59, 0x58, 0xc7, 0x12, 0xae, 0x94, 0x35, 0x7b, 0xcd, - 0xa8, 0xe8, 0xaa, 0xb4, 0x51, 0xd1, 0xec, 0xaa, 0x58, 0xb6, 0x2d, 0xc7, 0x42, 0x88, 0x9d, 0x8b, - 0xc1, 0x39, 0xbf, 0xbb, 0x68, 0x15, 0x2d, 0x72, 0x2c, 0xb9, 0xbf, 0x28, 0x25, 0x9f, 0x29, 0x10, - 0x52, 0x69, 0x55, 0xc1, 0x9a, 0xb4, 0x39, 0xb9, 0xaa, 0x39, 0xca, 0xa4, 0x54, 0xb0, 0x74, 0x93, - 0x9d, 0xef, 0x2f, 0x5a, 0x56, 0xd1, 0xd0, 0x24, 0xa5, 0xac, 0x4b, 0x8a, 0x69, 0x5a, 0x8e, 0xe2, - 0xe8, 0x96, 0x89, 0xd9, 0xe9, 0x10, 0x3b, 0x25, 0x4f, 0xab, 0x95, 0x35, 0xc9, 0xd1, 0x4b, 0x1a, - 0x76, 0x94, 0x52, 0xd9, 0x13, 0xbf, 0x95, 0x40, 0xad, 0xd8, 0x44, 0x02, 0x3b, 0x1f, 0x8e, 0x00, - 0x12, 0xfc, 0xf4, 0xb4, 0x44, 0x10, 0x95, 0x15, 0x5b, 0x29, 0x79, 0x66, 0xec, 0xf5, 0x08, 0x0c, - 0xab, 0xb0, 0x5e, 0x29, 0x93, 0x3f, 0xec, 0x68, 0x22, 0x8c, 0x8f, 0xb8, 0xc8, 0x47, 0x59, 0x56, - 0x8a, 0xba, 0x19, 0x36, 0x66, 0x84, 0xd1, 0x62, 0x47, 0x59, 0xd7, 0xcd, 0xa2, 0x4f, 0xc8, 0x9e, - 0x29, 0x95, 0xb0, 0x1b, 0xd0,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 0xd1, 0x67, 0x0a, 0x4b, - 0x2e, 0x58, 0xb6, 0x9a, 0x1f, 0xb4, 0x62, 0xce, 0x85, 0xdb, 0x1c, 0x1c, 0x0a, 0xf0, 0xcd, 0x99, - 0x8e, 0x66, 0x97, 0x34, 0x55, 0x57, 0xec, 0x6a, 0xb6, 0x50, 0xb0, 0x2a, 0xa6, 0x33, 0x67, 0xae, - 0x59, 0xd1, 0x48, 0xd0, 0x5e, 0xd8, 0xbe, 0xa9, 0x18, 0xb2, 0xa2, 0xaa, 0xf6, 0x60, 0x3b, 0x39, - 0xe8, 0xde, 0x54, 0x8c, 0xac, 0xaa, 0xda, 0xee, 0x51, 0x51, 0xa9, 0x14, 0x35, 0x59, 0x57, 0x07, - 0x3b, 0x0e, 0x72, 0xe3, 0x9d, 0xf9, 0x6e, 0xf2, 0x3c, 0xa7, 0xa2, 0x41, 0xe8, 0x76, 0x39, 0x34, - 0x8c, 0x07, 0x3b, 0x29, 0x13, 0x7b, 0x14, 0xae, 0x41, 0x26, 0x6b, 0x18, 0x11, 0x36, 0x78, 0x31, + // 1800 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x59, 0x4d, 0x6c, 0xd4, 0xc6, + 0x17, 0x8f, 0x37, 0x21, 0x21, 0x2f, 0xfa, 0x87, 0x64, 0xe0, 0x4f, 0x82, 0x81, 0x0d, 0x38, 0x21, + 0x49, 0x03, 0xd8, 0x4d, 0x28, 0x90, 0x42, 0x41, 0xec, 0x12, 0x02, 0x91, 0x92, 0x86, 0x6e, 0x48, + 0x90, 0xfa, 0x21, 0xcb, 0x59, 0x3b, 0x8b, 0x15, 0xaf, 0xbd, 0xf1, 0x78, 0x53, 0x56, 0x08, 0x21, + 0xa5, 0xaa, 0x54, 0xd4, 0x43, 0x2b, 0x71, 0xea, 0xad, 0x57, 0x7a, 0x68, 0x8f, 0xbd, 0xf4, 0x52, + 0xf5, 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8e, + 0x5c, 0xf4, 0xa9, 0x58, 0x30, 0xa6, 0xa2, 0x4c, 0x5c, 0xc4, 0x45, 0xeb, 0x92, 0xcf, 0x14, 0x96, + 0x9c, 0xb7, 0x6c, 0x35, 0x37, 0x68, 0xc5, 0x9c, 0x0b, 0x77, 0x39, 0x38, 0x1c, 0xe0, 0x9b, 0x33, + 0x1d, 0xcd, 0x2e, 0x6a, 0xaa, 0xae, 0xd8, 0x95, 0x4c, 0x3e, 0x6f, 0x95, 0x4d, 0x67, 0xce, 0x5c, + 0xb3, 0xa2, 0x91, 0xa0, 0x7d, 0xb0, 0x73, 0x53, 0x31, 0x64, 0x45, 0x55, 0xed, 0xc1, 0x14, 0x39, + 0xe8, 0xda, 0x54, 0x8c, 0x8c, 0xaa, 0xda, 0xee, 0x51, 0x41, 0x29, 0x17, 0x34, 0x59, 0x57, 0x07, + 0xdb, 0x0f, 0x71, 0xe3, 0x1d, 0xb9, 0x2e, 0xf2, 0x3c, 0xa7, 0xa2, 0x41, 0xe8, 0x72, 0x39, 0x34, + 0x8c, 0x07, 0x3b, 0x28, 0x13, 0x7b, 0x14, 0x6e, 0x40, 0x3a, 0x63, 0x18, 0x11, 0x36, 0x78, 0x31, 0x74, 0xf3, 0x23, 0xc8, 0x7f, 0xe6, 0x8f, 0x51, 0x91, 0x16, 0x80, 0xe8, 0x16, 0x8b, 0x48, 0xfb, - 0x09, 0xab, 0x01, 0xf1, 0xb2, 0x52, 0xf4, 0xd2, 0x30, 0x1f, 0xe2, 0x14, 0xbe, 0xe5, 0x60, 0x28, - 0x56, 0x15, 0x8b, 0xc5, 0x55, 0xd8, 0xae, 0xb0, 0x77, 0x2c, 0x39, 0x4e, 0x24, 0x27, 0x47, 0x8c, - 0xf3, 0x58, 0xba, 0xf8, 0xc2, 0xd0, 0xa5, 0x1a, 0x10, 0xed, 0x04, 0xc4, 0x58, 0x43, 0x10, 0xd4, - 0xaa, 0x1a, 0x14, 0xe7, 0x60, 0xf8, 0x82, 0x65, 0x9a, 0x5a, 0xc1, 0xd1, 0xa2, 0x94, 0x7b, 0x4e, - 0x1b, 0x80, 0x6e, 0xb7, 0xb5, 0xb8, 0xa1, 0xe0, 0x48, 0x28, 0xba, 0xdc, 0xc7, 0x39, 0x55, 0x78, - 0x17, 0x46, 0x92, 0xf9, 0x99, 0x27, 0x16, 0xa1, 0x9b, 0x19, 0xcf, 0x5c, 0xde, 0x9a, 0x23, 0xf2, - 0x9e, 0x14, 0x61, 0x16, 0x44, 0xd2, 0x76, 0xae, 0x58, 0x8e, 0x62, 0xcc, 0x68, 0x86, 0x56, 0x24, - 0x80, 0x72, 0xd5, 0x15, 0xc5, 0xd0, 0x55, 0xc5, 0xb1, 0xec, 0x59, 0xcb, 0x9e, 0x71, 0x73, 0x2c, - 0xb9, 0x94, 0xaa, 0x20, 0xa5, 0x96, 0xe3, 0x77, 0x98, 0x5e, 0xda, 0x61, 0x6c, 0xf6, 0x86, 0xc5, - 0x76, 0x28, 0x0a, 0x52, 0x20, 0x12, 0xe7, 0xff, 0x47, 0xd8, 0x3c, 0x39, 0xc2, 0x77, 0x1c, 0xf4, - 0x84, 0x8e, 0x6b, 0x6a, 0x81, 0xab, 0xad, 0x85, 0xd7, 0xa0, 0x47, 0x29, 0xb9, 0xb8, 0x65, 0xbc, - 0x86, 0x55, 0x5a, 0x29, 0xb9, 0x89, 0x5f, 0x1e, 0x0c, 0x8d, 0x16, 0x75, 0xe7, 0x5a, 0x65, 0x55, - 0x2c, 0x58, 0x25, 0x89, 0x35, 0x71, 0xfa, 0xe7, 0x18, 0x56, 0xd7, 0x25, 0xb7, 0x05, 0x62, 0x71, - 0xce, 0x74, 0xf2, 0x40, 0xd9, 0x97, 0xd6, 0xb0, 0x8a, 0x96, 0x60, 0xe7, 0x96, 0x0e, 0x41, 0xea, - 0xab, 0x39, 0x81, 0xbd, 0xb5, 0xed, 0x40, 0x18, 0x86, 0x43, 0xc4, 0x85, 0x41, 0x08, 0xc3, 0xc8, - 0x59, 0x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 0xff, 0x35, 0x49, 0xaa, 0xa9, 0xb2, 0xfb, 0xf9, - 0xe8, 0x46, 0xf4, 0xa9, 0xbb, 0x7c, 0x57, 0x38, 0x3d, 0x35, 0x95, 0xbc, 0x44, 0x1f, 0x73, 0x90, - 0xa1, 0x16, 0x84, 0xee, 0x7a, 0xf7, 0x93, 0x4d, 0x53, 0x65, 0x16, 0xfd, 0x0e, 0xd2, 0x6b, 0x13, - 0x4c, 0x91, 0x98, 0x29, 0x63, 0x29, 0x4d, 0xc9, 0xef, 0x23, 0x1a, 0x83, 0xc2, 0x5f, 0x22, 0xfa, - 0x68, 0xfa, 0x09, 0x26, 0xbc, 0x10, 0xf8, 0x74, 0xd9, 0x54, 0x9f, 0x5a, 0x4e, 0x04, 0xd5, 0xd0, - 0x1e, 0xae, 0x86, 0xbf, 0xda, 0x61, 0x22, 0x8d, 0xc2, 0xe7, 0x9e, 0x2b, 0xef, 0x73, 0x30, 0x40, - 0x43, 0x55, 0x31, 0x9f, 0x41, 0xba, 0xd0, 0xc4, 0x5c, 0x0e, 0x54, 0xd1, 0x84, 0x99, 0x87, 0x9d, - 0xb8, 0x6a, 0x3a, 0xd7, 0x34, 0x47, 0x2f, 0xc8, 0xee, 0x05, 0x8e, 0x07, 0x3b, 0x88, 0xf2, 0x03, - 0x3e, 0x62, 0x3a, 0x47, 0x88, 0x4b, 0x1e, 0xd9, 0xbc, 0x55, 0x58, 0x67, 0x00, 0x7b, 0x71, 0xf8, - 0x25, 0x16, 0x36, 0xe0, 0x68, 0x4c, 0x95, 0xfa, 0x57, 0x67, 0xcd, 0xfd, 0x1b, 0xd9, 0xfd, 0xb8, - 0x46, 0xdd, 0xaf, 0x26, 0xde, 0x77, 0x39, 0x38, 0x96, 0x52, 0xe7, 0xf3, 0x0e, 0xb9, 0x70, 0x13, - 0xa6, 0x2f, 0x62, 0x47, 0x2f, 0x29, 0x8e, 0x56, 0x27, 0xc8, 0x2b, 0x98, 0x7f, 0xd1, 0x55, 0x5f, -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c, 0xdb, 0xfd, 0xc7, 0x99, 0xb6, 0x9f, 0x1f, 0x67, 0xda, 0xde, 0x3c, 0x19, 0xfa, - 0x66, 0x67, 0x2a, 0x8f, 0x19, 0xca, 0x2a, 0xf6, 0xf5, 0x6f, 0x4e, 0x4e, 0x49, 0xd7, 0xc3, 0x56, - 0x90, 0xef, 0xf8, 0xd5, 0x2e, 0xf2, 0xbf, 0xc8, 0xe3, 0xff, 0x04, 0x00, 0x00, 0xff, 0xff, 0xbf, - 0xdf, 0xa4, 0x71, 0x09, 0x1e, 0x00, 0x00, + 0x09, 0xab, 0x01, 0xf1, 0xaa, 0x52, 0xf0, 0xd2, 0x30, 0x17, 0xe2, 0x14, 0xbe, 0xe3, 0x60, 0x28, + 0x56, 0x15, 0x8b, 0xc5, 0x75, 0xd8, 0xa9, 0xb0, 0x77, 0x2c, 0x39, 0x4e, 0x26, 0x27, 0x47, 0x8c, + 0xf3, 0x58, 0xba, 0xf8, 0xc2, 0xd0, 0xe5, 0x2a, 0x10, 0x29, 0x02, 0x62, 0xac, 0x21, 0x08, 0x6a, + 0x55, 0x15, 0x8a, 0xf3, 0x30, 0x7c, 0xd1, 0x32, 0x4d, 0x2d, 0xef, 0x68, 0x51, 0xca, 0x3d, 0xa7, + 0x0d, 0x40, 0x97, 0xdb, 0x5a, 0xdc, 0x50, 0x70, 0x24, 0x14, 0x9d, 0xee, 0xe3, 0x9c, 0x2a, 0xbc, + 0x0f, 0x23, 0xc9, 0xfc, 0xcc, 0x13, 0x8b, 0xd0, 0xc5, 0x8c, 0x67, 0x2e, 0xdf, 0x9e, 0x23, 0x72, + 0x9e, 0x14, 0x61, 0x16, 0x44, 0xd2, 0x76, 0xae, 0x59, 0x8e, 0x62, 0xcc, 0x68, 0x86, 0x56, 0x20, + 0x80, 0xb2, 0x95, 0x15, 0xc5, 0xd0, 0x55, 0xc5, 0xb1, 0xec, 0x59, 0xcb, 0x9e, 0x71, 0x73, 0x2c, + 0xb9, 0x94, 0xee, 0x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79, 0xb5, 0x22, 0xfb, 0xc8, 0x23, 0x9d, 0xf0, 0x37, 0x07, 0x47, 0x9a, 0x1a, + 0x49, 0xd0, 0x85, 0x16, 0x82, 0x17, 0x39, 0x16, 0xf0, 0x99, 0x67, 0x90, 0xc0, 0xbc, 0xb1, 0x40, + 0xbc, 0x71, 0x19, 0x5d, 0x6a, 0x3d, 0x07, 0x5c, 0x5f, 0x04, 0x53, 0x09, 0x5d, 0xfe, 0x7f, 0x99, + 0x82, 0xc9, 0x96, 0xa7, 0x0c, 0x34, 0x1f, 0x85, 0x63, 0xbb, 0xc3, 0x12, 0xbf, 0xf0, 0x9c, 0xa4, + 0x31, 0x0f, 0xbd, 0x4b, 0x3c, 0xb4, 0x82, 0xae, 0x25, 0x79, 0x48, 0x63, 0xe2, 0xe5, 0xa4, 0x86, + 0x10, 0xe5, 0xb0, 0xdf, 0xbd, 0x0e, 0x1e, 0x39, 0x7b, 0xa0, 0x33, 0xcd, 0xdf, 0x13, 0x75, 0x85, + 0x72, 0x76, 0x5b, 0xbc, 0x0c, 0xf5, 0x32, 0x41, 0xbd, 0x88, 0x16, 0x92, 0x50, 0xd7, 0xee, 0x64, + 0x1b, 0x56, 0x47, 0xf6, 0xea, 0x83, 0x27, 0x69, 0xee, 0xe1, 0x93, 0x34, 0xf7, 0xeb, 0x93, 0x34, + 0xf7, 0xe9, 0xd3, 0x74, 0xdb, 0xc3, 0xa7, 0xe9, 0xb6, 0x9f, 0x9f, 0xa6, 0xdb, 0xde, 0x3e, 0x15, + 0xfa, 0x66, 0x67, 0x2a, 0x8f, 0x1b, 0xca, 0x2a, 0xf6, 0xf5, 0x6f, 0x4e, 0x4e, 0x49, 0x37, 0xc3, + 0x56, 0x90, 0xef, 0xf8, 0xd5, 0x4e, 0xf2, 0x9f, 0xcc, 0x13, 0xff, 0x04, 0x00, 0x00, 0xff, 0xff, + 0xee, 0xbb, 0x89, 0xfd, 0x47, 0x1e, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1671,6 +1672,7 @@ type QueryClient interface { AllIntermediaryAccounts(ctx context.Context, in *AllIntermediaryAccountsRequest, opts ...grpc.CallOption) (*AllIntermediaryAccountsResponse, error) // Returns intermediary account connected to a superfluid staked lock by id ConnectedIntermediaryAccount(ctx context.Context, in *ConnectedIntermediaryAccountRequest, opts ...grpc.CallOption) (*ConnectedIntermediaryAccountResponse, error) + // Returns the amount of delegations of specific denom for all validators TotalDelegationByValidatorForDenom(ctx context.Context, in *QueryTotalDelegationByValidatorForDenomRequest, opts ...grpc.CallOption) (*QueryTotalDelegationByValidatorForDenomResponse, error) // Returns the total amount of osmo superfluidly staked. // Response is denominated in uosmo. @@ -1842,6 +1844,7 @@ type QueryServer interface { AllIntermediaryAccounts(context.Context, *AllIntermediaryAccountsRequest) (*AllIntermediaryAccountsResponse, error) // Returns intermediary account connected to a superfluid staked lock by id ConnectedIntermediaryAccount(context.Context, *ConnectedIntermediaryAccountRequest) (*ConnectedIntermediaryAccountResponse, error) + // Returns the amount of delegations of specific denom for all validators TotalDelegationByValidatorForDenom(context.Context, *QueryTotalDelegationByValidatorForDenomRequest) (*QueryTotalDelegationByValidatorForDenomResponse, error) // Returns the total amount of osmo superfluidly staked. // Response is denominated in uosmo. @@ -2754,30 +2757,26 @@ func (m *Delegations) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if m.OsmoEquivalent != nil { - { - size := m.OsmoEquivalent.Size() - i -= size - if _, err := m.OsmoEquivalent.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintQuery(dAtA, i, uint64(size)) + { + size := m.OsmoEquivalent.Size() + i -= size + if _, err := m.OsmoEquivalent.MarshalTo(dAtA[i:]); err != nil { + return 0, err } - i-- - dAtA[i] = 0x1a + i = encodeVarintQuery(dAtA, i, uint64(size)) } - if m.AmountSfsd != nil { - { - size := m.AmountSfsd.Size() - i -= size - if _, err := m.AmountSfsd.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintQuery(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x1a + { + size := m.AmountSfsd.Size() + i -= size + if _, err := m.AmountSfsd.MarshalTo(dAtA[i:]); err != nil { + return 0, err } - i-- - dAtA[i] = 0x12 + i = encodeVarintQuery(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0x12 if len(m.ValAddr) > 0 { i -= len(m.ValAddr) copy(dAtA[i:], m.ValAddr) @@ -3596,14 +3595,10 @@ func (m *Delegations) Size() (n int) { if l > 0 { n += 1 + l + sovQuery(uint64(l)) } - if m.AmountSfsd != nil { - l = m.AmountSfsd.Size() - n += 1 + l + sovQuery(uint64(l)) - } - if m.OsmoEquivalent != nil { - l = m.OsmoEquivalent.Size() - n += 1 + l + sovQuery(uint64(l)) - } + l = m.AmountSfsd.Size() + n += 1 + l + sovQuery(uint64(l)) + l = m.OsmoEquivalent.Size() + n += 1 + l + sovQuery(uint64(l)) return n } @@ -5107,7 +5102,7 @@ func (m *QueryTotalDelegationByValidatorForDenomResponse) Unmarshal(dAtA []byte) if postIndex > l { return io.ErrUnexpectedEOF } - m.AssetResponse = append(m.AssetResponse, &Delegations{}) + m.AssetResponse = append(m.AssetResponse, Delegations{}) if err := m.AssetResponse[len(m.AssetResponse)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -5224,8 +5219,6 @@ func (m *Delegations) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - var v github_com_cosmos_cosmos_sdk_types.Int - m.AmountSfsd = &v if err := m.AmountSfsd.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -5260,8 +5253,6 @@ func (m *Delegations) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - var v github_com_cosmos_cosmos_sdk_types.Int - m.OsmoEquivalent = &v if err := m.OsmoEquivalent.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } From d1bdefb42ad93118c3f6f264914f49d3284f4d04 Mon Sep 17 00:00:00 2001 From: Ruslan Akhtariev Date: Fri, 21 Oct 2022 17:29:53 +0700 Subject: [PATCH 24/59] TotalDelegationByValidatorForDenom query --- x/superfluid/keeper/grpc_query_test.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/x/superfluid/keeper/grpc_query_test.go b/x/superfluid/keeper/grpc_query_test.go index 989e0853831..ad6cc32fd29 100644 --- a/x/superfluid/keeper/grpc_query_test.go +++ b/x/superfluid/keeper/grpc_query_test.go @@ -35,25 +35,25 @@ func (suite *KeeperTestSuite) TestTotalDelegationByValidatorForAsset() { suite.setupSuperfluidDelegations(valAddrs, superfluidDelegations, denoms) for _, denom := range denoms { - req, err := querier.TotalDelegationByValidatorForDenom(sdk.WrapSDKContext(ctx), &types.QueryTotalDelegationByValidatorForDenomRequest{Denom: denom}) + res, err := querier.TotalDelegationByValidatorForDenom(sdk.WrapSDKContext(ctx), &types.QueryTotalDelegationByValidatorForDenomRequest{Denom: denom}) suite.Require().NoError(err) - suite.Require().Equal(len(valAddrs), len(req.AssetResponse)) + suite.Require().Equal(len(valAddrs), len(res.AssetResponse)) - for res_ind, res := range req.AssetResponse { + for _, result := range res.AssetResponse { // check osmo equivalent is correct - actual_response_osmo := req.AssetResponse[res_ind].OsmoEquivalent + actual_response_osmo := result.OsmoEquivalent needed_response_osmo := suite.App.SuperfluidKeeper.GetSuperfluidOSMOTokens(ctx, denom, sdk.NewInt(delegation_amount)) suite.Require().Equal(actual_response_osmo, needed_response_osmo) // check sfs'd asset amount correct - actual_response_asset := req.AssetResponse[res_ind].AmountSfsd + actual_response_asset := result.AmountSfsd needed_response_asset := sdk.NewInt(delegation_amount) suite.Require().Equal(actual_response_asset, needed_response_asset) // check validator addresses correct - actual_val := res.ValAddr + actual_val := result.ValAddr checks := 0 for _, val := range valAddrs { if val.String() == actual_val { From e452e6cb62f2608dc79b80a786a4e3a649329543 Mon Sep 17 00:00:00 2001 From: Ruslan Akhtariev Date: Sat, 22 Oct 2022 15:02:22 +0700 Subject: [PATCH 25/59] TotalDelegationByValidatorForDenom query --- x/superfluid/keeper/grpc_query.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/x/superfluid/keeper/grpc_query.go b/x/superfluid/keeper/grpc_query.go index 0a6681ead49..8cb18b81e0c 100644 --- a/x/superfluid/keeper/grpc_query.go +++ b/x/superfluid/keeper/grpc_query.go @@ -395,8 +395,10 @@ func (q Querier) EstimateSuperfluidDelegatedAmountByValidatorDenom(goCtx context func (q Querier) TotalDelegationByValidatorForDenom(goCtx context.Context, req *types.QueryTotalDelegationByValidatorForDenomRequest) (*types.QueryTotalDelegationByValidatorForDenomResponse, error) { ctx := sdk.UnwrapSDKContext(goCtx) - var delegationsByValidator = []types.Delegations{} - var intermediaryAccount types.SuperfluidIntermediaryAccount + var ( + delegationsByValidator = []types.Delegations{} + intermediaryAccount types.SuperfluidIntermediaryAccount + ) intermediaryAccounts := q.Keeper.GetAllIntermediaryAccounts(ctx) for _, intermediaryAccount = range intermediaryAccounts { From 91aa2765290d75f355a1906e1c1b622ecc9ec14a Mon Sep 17 00:00:00 2001 From: Ruslan Akhtariev Date: Sat, 22 Oct 2022 15:03:42 +0700 Subject: [PATCH 26/59] TotalDelegationByValidatorForDenom query --- x/superfluid/keeper/grpc_query.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/x/superfluid/keeper/grpc_query.go b/x/superfluid/keeper/grpc_query.go index 8cb18b81e0c..2f5573e7865 100644 --- a/x/superfluid/keeper/grpc_query.go +++ b/x/superfluid/keeper/grpc_query.go @@ -395,11 +395,9 @@ func (q Querier) EstimateSuperfluidDelegatedAmountByValidatorDenom(goCtx context func (q Querier) TotalDelegationByValidatorForDenom(goCtx context.Context, req *types.QueryTotalDelegationByValidatorForDenomRequest) (*types.QueryTotalDelegationByValidatorForDenomResponse, error) { ctx := sdk.UnwrapSDKContext(goCtx) - var ( - delegationsByValidator = []types.Delegations{} - intermediaryAccount types.SuperfluidIntermediaryAccount - ) + var intermediaryAccount types.SuperfluidIntermediaryAccount + delegationsByValidator := []types.Delegations{} intermediaryAccounts := q.Keeper.GetAllIntermediaryAccounts(ctx) for _, intermediaryAccount = range intermediaryAccounts { if intermediaryAccount.Denom != req.Denom { From 736d9d0d07da02700a995234f5ad28a057e199ab Mon Sep 17 00:00:00 2001 From: Ruslan Akhtariev Date: Tue, 1 Nov 2022 15:03:23 +0700 Subject: [PATCH 27/59] query --- go.mod | 2 +- proto/osmosis/superfluid/query.proto | 2 +- x/superfluid/keeper/grpc_query.go | 2 +- x/superfluid/keeper/grpc_query_test.go | 4 +- x/superfluid/types/query.pb.go | 249 ++++++++++++------------- 5 files changed, 129 insertions(+), 130 deletions(-) diff --git a/go.mod b/go.mod index 4ba4834b8a6..b130f45de8c 100644 --- a/go.mod +++ b/go.mod @@ -5,7 +5,7 @@ go 1.18 require ( github.com/CosmWasm/wasmd v0.28.0-osmo-v12 github.com/cosmos/cosmos-proto v1.0.0-alpha8 - github.com/cosmos/cosmos-sdk v0.46.1 + github.com/cosmos/cosmos-sdk v0.46.3 github.com/cosmos/go-bip39 v1.0.0 github.com/cosmos/iavl v0.19.1 github.com/cosmos/ibc-go/v3 v3.3.0 diff --git a/proto/osmosis/superfluid/query.proto b/proto/osmosis/superfluid/query.proto index 20562ac64ce..2394a1134fe 100644 --- a/proto/osmosis/superfluid/query.proto +++ b/proto/osmosis/superfluid/query.proto @@ -160,7 +160,7 @@ message ConnectedIntermediaryAccountResponse { message QueryTotalDelegationByValidatorForDenomRequest { string denom = 1; } message QueryTotalDelegationByValidatorForDenomResponse { - repeated Delegations asset_response = 1 [ (gogoproto.nullable) = false ]; + repeated Delegations assets = 1 [ (gogoproto.nullable) = false ]; } message Delegations { diff --git a/x/superfluid/keeper/grpc_query.go b/x/superfluid/keeper/grpc_query.go index 2f5573e7865..e3d39857267 100644 --- a/x/superfluid/keeper/grpc_query.go +++ b/x/superfluid/keeper/grpc_query.go @@ -428,7 +428,7 @@ func (q Querier) TotalDelegationByValidatorForDenom(goCtx context.Context, req * } return &types.QueryTotalDelegationByValidatorForDenomResponse{ - AssetResponse: delegationsByValidator, + Assets: delegationsByValidator, }, nil } diff --git a/x/superfluid/keeper/grpc_query_test.go b/x/superfluid/keeper/grpc_query_test.go index ad6cc32fd29..18d48f54cf8 100644 --- a/x/superfluid/keeper/grpc_query_test.go +++ b/x/superfluid/keeper/grpc_query_test.go @@ -38,9 +38,9 @@ func (suite *KeeperTestSuite) TestTotalDelegationByValidatorForAsset() { res, err := querier.TotalDelegationByValidatorForDenom(sdk.WrapSDKContext(ctx), &types.QueryTotalDelegationByValidatorForDenomRequest{Denom: denom}) suite.Require().NoError(err) - suite.Require().Equal(len(valAddrs), len(res.AssetResponse)) + suite.Require().Equal(len(valAddrs), len(res.Assets)) - for _, result := range res.AssetResponse { + for _, result := range res.Assets { // check osmo equivalent is correct actual_response_osmo := result.OsmoEquivalent needed_response_osmo := suite.App.SuperfluidKeeper.GetSuperfluidOSMOTokens(ctx, denom, sdk.NewInt(delegation_amount)) diff --git a/x/superfluid/types/query.pb.go b/x/superfluid/types/query.pb.go index f31a1a0d214..271f556da56 100644 --- a/x/superfluid/types/query.pb.go +++ b/x/superfluid/types/query.pb.go @@ -673,7 +673,7 @@ func (m *QueryTotalDelegationByValidatorForDenomRequest) GetDenom() string { } type QueryTotalDelegationByValidatorForDenomResponse struct { - AssetResponse []Delegations `protobuf:"bytes,1,rep,name=asset_response,json=assetResponse,proto3" json:"asset_response"` + Assets []Delegations `protobuf:"bytes,1,rep,name=assets,proto3" json:"assets"` } func (m *QueryTotalDelegationByValidatorForDenomResponse) Reset() { @@ -713,9 +713,9 @@ func (m *QueryTotalDelegationByValidatorForDenomResponse) XXX_DiscardUnknown() { var xxx_messageInfo_QueryTotalDelegationByValidatorForDenomResponse proto.InternalMessageInfo -func (m *QueryTotalDelegationByValidatorForDenomResponse) GetAssetResponse() []Delegations { +func (m *QueryTotalDelegationByValidatorForDenomResponse) GetAssets() []Delegations { if m != nil { - return m.AssetResponse + return m.Assets } return nil } @@ -1531,120 +1531,119 @@ func init() { func init() { proto.RegisterFile("osmosis/superfluid/query.proto", fileDescriptor_e3d9448e4ed3943f) } var fileDescriptor_e3d9448e4ed3943f = []byte{ - // 1800 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x59, 0x4d, 0x6c, 0xd4, 0xc6, - 0x17, 0x8f, 0x37, 0x21, 0x21, 0x2f, 0xfa, 0x87, 0x64, 0xe0, 0x4f, 0x82, 0x81, 0x0d, 0x38, 0x21, - 0x49, 0x03, 0xd8, 0x4d, 0x28, 0x90, 0x42, 0x41, 0xec, 0x12, 0x02, 0x91, 0x92, 0x86, 0x6e, 0x48, - 0x90, 0xfa, 0x21, 0xcb, 0x59, 0x3b, 0x8b, 0x15, 0xaf, 0xbd, 0xf1, 0x78, 0x53, 0x56, 0x08, 0x21, - 0xa5, 0xaa, 0x54, 0xd4, 0x43, 0x2b, 0x71, 0xea, 0xad, 0x57, 0x7a, 0x68, 0x8f, 0xbd, 0xf4, 0x52, - 0xf5, 0x82, 0x54, 0x55, 0xa2, 0xea, 0xa5, 0xea, 0x01, 0x2a, 0xe8, 0xb1, 0xbd, 0xf4, 0xd8, 0x5e, - 0x2a, 0xcf, 0x8c, 0x3f, 0x76, 0xd7, 0xf6, 0xee, 0x06, 0x0a, 0x3d, 0x65, 0xed, 0x79, 0x5f, 0xbf, - 0xf7, 0x35, 0x7e, 0x2f, 0x90, 0xb6, 0x70, 0xd1, 0xc2, 0x3a, 0x96, 0x70, 0xb9, 0xa4, 0xd9, 0x6b, - 0x46, 0x59, 0x57, 0xa5, 0x8d, 0xb2, 0x66, 0x57, 0xc4, 0x92, 0x6d, 0x39, 0x16, 0x42, 0xec, 0x5c, - 0x0c, 0xce, 0xf9, 0x3d, 0x05, 0xab, 0x60, 0x91, 0x63, 0xc9, 0xfd, 0x45,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0x29, 0x17, 0x34, 0x59, 0x57, 0x07, - 0xdb, 0x0f, 0x71, 0xe3, 0x1d, 0xb9, 0x2e, 0xf2, 0x3c, 0xa7, 0xa2, 0x41, 0xe8, 0x72, 0x39, 0x34, - 0x8c, 0x07, 0x3b, 0x28, 0x13, 0x7b, 0x14, 0x6e, 0x40, 0x3a, 0x63, 0x18, 0x11, 0x36, 0x78, 0x31, - 0x74, 0xf3, 0x23, 0xc8, 0x7f, 0xe6, 0x8f, 0x51, 0x91, 0x16, 0x80, 0xe8, 0x16, 0x8b, 0x48, 0xfb, - 0x09, 0xab, 0x01, 0xf1, 0xaa, 0x52, 0xf0, 0xd2, 0x30, 0x17, 0xe2, 0x14, 0xbe, 0xe3, 0x60, 0x28, - 0x56, 0x15, 0x8b, 0xc5, 0x75, 0xd8, 0xa9, 0xb0, 0x77, 0x2c, 0x39, 0x4e, 0x26, 0x27, 0x47, 0x8c, - 0xf3, 0x58, 0xba, 0xf8, 0xc2, 0xd0, 0xe5, 0x2a, 0x10, 0x29, 0x02, 0x62, 0xac, 0x21, 0x08, 0x6a, - 0x55, 0x15, 0x8a, 0xf3, 0x30, 0x7c, 0xd1, 0x32, 0x4d, 0x2d, 0xef, 0x68, 0x51, 0xca, 0x3d, 0xa7, - 0x0d, 0x40, 0x97, 0xdb, 0x5a, 0xdc, 0x50, 0x70, 0x24, 0x14, 0x9d, 0xee, 0xe3, 0x9c, 0x2a, 0xbc, - 0x0f, 0x23, 0xc9, 0xfc, 0xcc, 0x13, 0x8b, 0xd0, 0xc5, 0x8c, 0x67, 0x2e, 0xdf, 0x9e, 0x23, 0x72, - 0x9e, 0x14, 0x61, 0x16, 0x44, 0xd2, 0x76, 0xae, 0x59, 0x8e, 0x62, 0xcc, 0x68, 0x86, 0x56, 0x20, - 0x80, 0xb2, 0x95, 0x15, 0xc5, 0xd0, 0x55, 0xc5, 0xb1, 0xec, 0x59, 0xcb, 0x9e, 0x71, 0x73, 0x2c, - 0xb9, 0x94, 0xee, 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0x79, 0xb5, 0x22, 0xfb, 0xc8, 0x23, 0x9d, 0xf0, 0x37, 0x07, 0x47, 0x9a, 0x1a, - 0x49, 0xd0, 0x85, 0x16, 0x82, 0x17, 0x39, 0x16, 0xf0, 0x99, 0x67, 0x90, 0xc0, 0xbc, 0xb1, 0x40, - 0xbc, 0x71, 0x19, 0x5d, 0x6a, 0x3d, 0x07, 0x5c, 0x5f, 0x04, 0x53, 0x09, 0x5d, 0xfe, 0x7f, 0x99, - 0x82, 0xc9, 0x96, 0xa7, 0x0c, 0x34, 0x1f, 0x85, 0x63, 0xbb, 0xc3, 0x12, 0xbf, 0xf0, 0x9c, 0xa4, - 0x31, 0x0f, 0xbd, 0x4b, 0x3c, 0xb4, 0x82, 0xae, 0x25, 0x79, 0x48, 0x63, 0xe2, 0xe5, 0xa4, 0x86, - 0x10, 0xe5, 0xb0, 0xdf, 0xbd, 0x0e, 0x1e, 0x39, 0x7b, 0xa0, 0x33, 0xcd, 0xdf, 0x13, 0x75, 0x85, - 0x72, 0x76, 0x5b, 0xbc, 0x0c, 0xf5, 0x32, 0x41, 0xbd, 0x88, 0x16, 0x92, 0x50, 0xd7, 0xee, 0x64, - 0x1b, 0x56, 0x47, 0xf6, 0xea, 0x83, 0x27, 0x69, 0xee, 0xe1, 0x93, 0x34, 0xf7, 0xeb, 0x93, 0x34, - 0xf7, 0xe9, 0xd3, 0x74, 0xdb, 0xc3, 0xa7, 0xe9, 0xb6, 0x9f, 0x9f, 0xa6, 0xdb, 0xde, 0x3e, 0x15, - 0xfa, 0x66, 0x67, 0x2a, 0x8f, 0x1b, 0xca, 0x2a, 0xf6, 0xf5, 0x6f, 0x4e, 0x4e, 0x49, 0x37, 0xc3, - 0x56, 0x90, 0xef, 0xf8, 0xd5, 0x4e, 0xf2, 0x9f, 0xcc, 0x13, 0xff, 0x04, 0x00, 0x00, 0xff, 0xff, - 0xee, 0xbb, 0x89, 0xfd, 0x47, 0x1e, 0x00, 0x00, + // 1792 bytes of a gzipped F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c, 0x13, 0x98, 0x90, 0xa1, 0x2e, 0x76, 0x88, 0x3f, 0x4a, 0xb7, 0x21, 0x9d, 0x31, 0xcd, 0x08, + 0x1b, 0xbc, 0x18, 0xba, 0xf9, 0x11, 0xe4, 0x3f, 0xf7, 0xc7, 0x98, 0xcc, 0x0a, 0x40, 0x76, 0x8b, + 0x45, 0x66, 0xfd, 0x84, 0xd7, 0x80, 0x7c, 0x43, 0x2b, 0x78, 0x69, 0x98, 0x0b, 0x9d, 0x94, 0xbe, + 0x12, 0x60, 0x38, 0x56, 0x15, 0x8f, 0xc5, 0x2d, 0xd8, 0xad, 0xf1, 0x77, 0x3c, 0x39, 0xce, 0x24, + 0x27, 0x47, 0x8c, 0xf3, 0x78, 0xba, 0xf8, 0xc2, 0xd0, 0xb5, 0x1a, 0x10, 0x29, 0x0a, 0x62, 0xbc, + 0x29, 0x08, 0x66, 0x55, 0x0d, 0x8a, 0x4b, 0x30, 0x72, 0xc5, 0xb6, 0x2c, 0x9c, 0x77, 0x70, 0x94, + 0x72, 0xcf, 0x69, 0x83, 0xd0, 0xe3, 0xb6, 0x16, 0x37, 0x14, 0x02, 0x0d, 0x45, 0xb7, 0xfb, 0x38, + 0xaf, 0x4b, 0x6f, 0xc1, 0x68, 0xf2, 0x79, 0xee, 0x89, 0x25, 0xe8, 0xe1, 0xc6, 0x73, 0x97, 0xef, + 0xcc, 0x11, 0x39, 0x4f, 0x8a, 0x34, 0x07, 0x32, 0x6d, 0x3b, 0x37, 0x6d, 0x47, 0x33, 0x67, 0xb1, + 0x89, 0x0b, 0x14, 0x50, 0xb6, 0xba, 0xaa, 0x99, 0x86, 0xae, 0x39, 0x76, 0x79, 0xce, 0x2e, 0xcf, + 0xba, 0x39, 0x96, 0x5c, 0x4a, 0x25, 0x50, 0x5a, 0x96, 0xc3, 0xb1, 0x5c, 0xac, 0x2b, 0xf8, 0xe1, + 0x28, 0x28, 0x81, 0x28, 0x52, 0x57, 0xec, 0xdb, 0x29, 0xe8, 0x0b, 0x51, 0x6b, 0x4a, 0x40, 0xa8, + 0x2d, 0x01, 0x0c, 0x7d, 0x5a, 0xd1, 0x85, 0xab, 0x92, 0x75, 0xa2, 0xb3, 0x02, 0xc9, 0xce, 0xba, + 0xd2, 0x7e, 0x78, 0x32, 0x3c, 0x56, 0x30, 0x9c, 0xdb, 0x95, 0x35, 0x39, 0x6f, 0x17, 0x15, 0xde, + 0xbf, 0xd9, 0x9f, 0x53, 0x44, 0xdf, 0x50, 0xdc, 0xee, 0x47, 0xe4, 0x79, 0xcb, 0xf9, 0xf5, 0xc9, + 0x30, 0xaa, 0x6a, 0x45, 0xf3, 0xbc, 0x14, 0x12, 0x25, 0xe5, 0x80, 0x3d, 0x2d, 0xaf, 0x13, 0x1d, + 0x6d, 0xc2, 0xde, 0xba, 0x96, 0x41, 0x0b, 0xae, 0x37, 0x7b, 0xbd, 0x6d, 0x55, 0x07, 0x98, 0xaa, + 0x3a, 0x71, 0x52, 0x6e, 0x4f, 0x6d, 0xf7, 0x90, 0x46, 0xe0, 0x18, 0xf5, 0x78, 0x10, 0xf1, 0x90, + 0x4b, 0xbc, 0x76, 0xfb, 0x50, 0x00, 0x29, 0x89, 0x8b, 0xc7, 0x63, 0x5b, 0x80, 0x01, 0xc7, 0x65, + 0x53, 0xf5, 0x80, 0xca, 0x5c, 0x99, 0x5d, 0x69, 0x1b, 0xc1, 0x08, 0x43, 0xc0, 0x04, 0x06, 0x01, + 0x0d, 0xcb, 0x96, 0x72, 0xfd, 0x4e, 0x6d, 0xba, 0x10, 0xe9, 0x41, 0x4d, 0x13, 0x0c, 0x28, 0x99, + 0x62, 0xb8, 0x8e, 0x4e, 0xc0, 0x00, 0x97, 0x63, 0x97, 0x55, 0xaf, 0x85, 0xb1, 0xa0, 0xf7, 0xfb, + 0x84, 0x0c, 0x7b, 0xef, 0x32, 0x6f, 0x79, 0x49, 0xe8, 0x33, 0xb3, 0x26, 0xd9, 0xef, 0x13, 0x3c, + 0x66, 0x3f, 0xb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 0xb8, + 0xbe, 0x08, 0xa6, 0x12, 0xb6, 0xed, 0xff, 0x34, 0x05, 0x53, 0x6d, 0x4f, 0x19, 0x68, 0x21, 0x0a, + 0xc7, 0x4e, 0x87, 0x25, 0x71, 0xf1, 0x25, 0x49, 0xe3, 0x1e, 0x7a, 0x83, 0x7a, 0x68, 0x15, 0xdd, + 0x4c, 0xf2, 0x10, 0xe6, 0xe2, 0xd5, 0xa4, 0x86, 0x10, 0xe5, 0xb0, 0x9f, 0xbd, 0x0e, 0x1e, 0x39, + 0x7b, 0xa0, 0xf3, 0xad, 0xdf, 0x13, 0x0d, 0x85, 0x72, 0x61, 0x47, 0x67, 0x39, 0xea, 0x15, 0x8a, + 0x7a, 0x09, 0x2d, 0x26, 0xa1, 0xae, 0xdf, 0xc9, 0x36, 0xad, 0x8e, 0xec, 0x8d, 0x47, 0xcf, 0xd2, + 0xc2, 0xe3, 0x67, 0x69, 0xe1, 0xc7, 0x67, 0x69, 0xe1, 0xc3, 0xe7, 0xe9, 0x8e, 0xc7, 0xcf, 0xd3, + 0x1d, 0xdf, 0x3f, 0x4f, 0x77, 0xfc, 0xef, 0x6c, 0xe8, 0x9b, 0x9d, 0xab, 0x3c, 0x65, 0x6a, 0x6b, + 0xc4, 0xd7, 0xbf, 0x35, 0x35, 0xad, 0xdc, 0x09, 0x5b, 0x41, 0xbf, 0xe3, 0xd7, 0xba, 0xe9, 0xbf, + 0x2e, 0x4f, 0xff, 0x11, 0x00, 0x00, 0xff, 0xff, 0xe6, 0x22, 0x2e, 0x30, 0x38, 0x1e, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -2720,10 +2719,10 @@ func (m *QueryTotalDelegationByValidatorForDenomResponse) MarshalToSizedBuffer(d _ = i var l int _ = l - if len(m.AssetResponse) > 0 { - for iNdEx := len(m.AssetResponse) - 1; iNdEx >= 0; iNdEx-- { + if len(m.Assets) > 0 { + for iNdEx := len(m.Assets) - 1; iNdEx >= 0; iNdEx-- { { - size, err := m.AssetResponse[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + size, err := m.Assets[iNdEx].MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -3576,8 +3575,8 @@ func (m *QueryTotalDelegationByValidatorForDenomResponse) Size() (n int) { } var l int _ = l - if len(m.AssetResponse) > 0 { - for _, e := range m.AssetResponse { + if len(m.Assets) > 0 { + for _, e := range m.Assets { l = e.Size() n += 1 + l + sovQuery(uint64(l)) } @@ -5075,7 +5074,7 @@ func (m *QueryTotalDelegationByValidatorForDenomResponse) Unmarshal(dAtA []byte) switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AssetResponse", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Assets", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -5102,8 +5101,8 @@ func (m *QueryTotalDelegationByValidatorForDenomResponse) Unmarshal(dAtA []byte) if postIndex > l { return io.ErrUnexpectedEOF } - m.AssetResponse = append(m.AssetResponse, Delegations{}) - if err := m.AssetResponse[len(m.AssetResponse)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.Assets = append(m.Assets, Delegations{}) + if err := m.Assets[len(m.Assets)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex From a152e66a26572636d091ca0bb80eedf4919e7ffe Mon Sep 17 00:00:00 2001 From: Ruslan Akhtariev Date: Tue, 1 Nov 2022 15:04:18 +0700 Subject: [PATCH 28/59] save --- go.mod | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/go.mod b/go.mod index b130f45de8c..4ba4834b8a6 100644 --- a/go.mod +++ b/go.mod @@ -5,7 +5,7 @@ go 1.18 require ( github.com/CosmWasm/wasmd v0.28.0-osmo-v12 github.com/cosmos/cosmos-proto v1.0.0-alpha8 - github.com/cosmos/cosmos-sdk v0.46.3 + github.com/cosmos/cosmos-sdk v0.46.1 github.com/cosmos/go-bip39 v1.0.0 github.com/cosmos/iavl v0.19.1 github.com/cosmos/ibc-go/v3 v3.3.0 From 59c1cd73cd6fbaa61a2734c8e2eb340d5dd11afd Mon Sep 17 00:00:00 2001 From: Roman Date: Tue, 1 Nov 2022 20:54:08 -0400 Subject: [PATCH 29/59] Update x/gamm/keeper/grpc_query.go Co-authored-by: Aleksandr Bezobchuk --- x/gamm/keeper/grpc_query.go | 1 + 1 file changed, 1 insertion(+) diff --git a/x/gamm/keeper/grpc_query.go b/x/gamm/keeper/grpc_query.go index 96ad7c5e20c..e0a42b3dd99 100644 --- a/x/gamm/keeper/grpc_query.go +++ b/x/gamm/keeper/grpc_query.go @@ -177,6 +177,7 @@ func (q Querier) CalcExitPoolCoinsFromShares(ctx context.Context, req *types.Que if err != nil { return nil, types.ErrPoolNotFound } + denomLiquidity := q.Keeper.GetDenomLiquidity(sdkCtx, req.TokenOutDenom) if denomLiquidity == sdk.ZeroInt() { return nil, types.ErrDenomNotFoundInPool From 9725f41eadf902d6e6383c47f5dbf616952315c1 Mon Sep 17 00:00:00 2001 From: Roman Date: Tue, 1 Nov 2022 20:54:23 -0400 Subject: [PATCH 30/59] Update x/gamm/keeper/grpc_query.go Co-authored-by: Aleksandr Bezobchuk --- x/gamm/keeper/grpc_query.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x/gamm/keeper/grpc_query.go b/x/gamm/keeper/grpc_query.go index e0a42b3dd99..a35d6824483 100644 --- a/x/gamm/keeper/grpc_query.go +++ b/x/gamm/keeper/grpc_query.go @@ -187,8 +187,8 @@ func (q Querier) CalcExitPoolCoinsFromShares(ctx context.Context, req *types.Que if req.ShareInAmount.GTE(totalSharesAmount) || req.ShareInAmount.LTE(sdk.ZeroInt()) { return nil, sdkerrors.Wrapf(types.ErrInvalidMathApprox, "share ratio is zero or negative") } - exitFee := pool.GetExitFee(sdkCtx) + exitFee := pool.GetExitFee(sdkCtx) exitCoins, err := pool.CalcExitPoolCoinsFromShares(sdkCtx, req.ShareInAmount, exitFee) if err != nil { return nil, err From f4c65c8c0ad5ef52c2640c0bd42ce2e35cb353cd Mon Sep 17 00:00:00 2001 From: Roman Date: Tue, 1 Nov 2022 20:54:35 -0400 Subject: [PATCH 31/59] Update x/gamm/keeper/grpc_query.go Co-authored-by: Aleksandr Bezobchuk --- x/gamm/keeper/grpc_query.go | 1 + 1 file changed, 1 insertion(+) diff --git a/x/gamm/keeper/grpc_query.go b/x/gamm/keeper/grpc_query.go index a35d6824483..6b06811f5f5 100644 --- a/x/gamm/keeper/grpc_query.go +++ b/x/gamm/keeper/grpc_query.go @@ -199,6 +199,7 @@ func (q Querier) CalcExitPoolCoinsFromShares(ctx context.Context, req *types.Que return &types.QueryCalcExitPoolCoinsFromSharesResponse{TokenOutAmount: coin.Amount.Uint64()}, nil } } + return nil, types.ErrDenomNotFoundInPool } From aae9f0be650a41cf9b9cc00a798dfbb5f23b622e Mon Sep 17 00:00:00 2001 From: Ruslan Akhtariev Date: Wed, 2 Nov 2022 12:17:35 +0700 Subject: [PATCH 32/59] queries --- proto/osmosis/gamm/v1beta1/query.proto | 7 +- x/gamm/keeper/grpc_query.go | 21 +- x/gamm/keeper/grpc_query_test.go | 60 +++-- x/gamm/pool-models/balancer/pool.go | 2 +- x/gamm/types/errors.go | 25 +-- x/gamm/types/query.pb.go | 299 ++++++++++++++----------- 6 files changed, 242 insertions(+), 172 deletions(-) diff --git a/proto/osmosis/gamm/v1beta1/query.proto b/proto/osmosis/gamm/v1beta1/query.proto index 30dfddbd256..0597705207d 100644 --- a/proto/osmosis/gamm/v1beta1/query.proto +++ b/proto/osmosis/gamm/v1beta1/query.proto @@ -144,14 +144,17 @@ message QueryCalcJoinPoolSharesResponse { //=============================== QueryCalcExitPoolCoinsFromSharesRequest message QueryCalcExitPoolCoinsFromSharesRequest { uint64 pool_id = 1; - string token_out_denom = 2; + repeated string tokens_out_denoms = 2; string share_in_amount = 3 [ (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.nullable) = false ]; } message QueryCalcExitPoolCoinsFromSharesResponse { - uint64 token_out_amount = 1; + repeated cosmos.base.v1beta1.Coin tokens_out = 1 [ + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", + (gogoproto.nullable) = false + ]; } //=============================== PoolParams diff --git a/x/gamm/keeper/grpc_query.go b/x/gamm/keeper/grpc_query.go index 6b06811f5f5..d0617157792 100644 --- a/x/gamm/keeper/grpc_query.go +++ b/x/gamm/keeper/grpc_query.go @@ -178,29 +178,32 @@ func (q Querier) CalcExitPoolCoinsFromShares(ctx context.Context, req *types.Que return nil, types.ErrPoolNotFound } - denomLiquidity := q.Keeper.GetDenomLiquidity(sdkCtx, req.TokenOutDenom) - if denomLiquidity == sdk.ZeroInt() { - return nil, types.ErrDenomNotFoundInPool - } + exitFee := pool.GetExitFee(sdkCtx) totalSharesAmount := pool.GetTotalShares() if req.ShareInAmount.GTE(totalSharesAmount) || req.ShareInAmount.LTE(sdk.ZeroInt()) { return nil, sdkerrors.Wrapf(types.ErrInvalidMathApprox, "share ratio is zero or negative") } - exitFee := pool.GetExitFee(sdkCtx) exitCoins, err := pool.CalcExitPoolCoinsFromShares(sdkCtx, req.ShareInAmount, exitFee) if err != nil { return nil, err } - for _, coin := range exitCoins { - if coin.Denom == req.TokenOutDenom { - return &types.QueryCalcExitPoolCoinsFromSharesResponse{TokenOutAmount: coin.Amount.Uint64()}, nil + coinsOut := sdk.NewCoins() + for _, req_denom := range req.TokensOutDenoms { + for _, coin := range exitCoins { + if coin.Denom == req_denom { + coinsOut = append(coinsOut, coin) + } } } - return nil, types.ErrDenomNotFoundInPool + if len(coinsOut) == 0 { + return nil, types.ErrDenomNotFoundInPool + } + + return &types.QueryCalcExitPoolCoinsFromSharesResponse{TokensOut: coinsOut}, nil } // PoolParams queries a specified pool for its params. diff --git a/x/gamm/keeper/grpc_query_test.go b/x/gamm/keeper/grpc_query_test.go index c18226b655b..f6ecaf9670b 100644 --- a/x/gamm/keeper/grpc_query_test.go +++ b/x/gamm/keeper/grpc_query_test.go @@ -2,6 +2,7 @@ package keeper_test import ( gocontext "context" + "errors" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" @@ -19,42 +20,63 @@ func (suite *KeeperTestSuite) TestCalcExitPoolCoinsFromShares() { testCases := []struct { name string poolId uint64 - tokenOut string + tokensOut []string shareInAmount sdk.Int expectedErr error }{ { - "valid test case", + "valid test case / 1 denom", poolId, - "foo", + []string{"foo"}, + sdk.NewInt(1000000000000000000), + nil, + }, + { + "valid test case / 2 denoms", + poolId, + []string{"foo", "bar"}, + sdk.NewInt(1000000000000000000), + nil, + }, + { + "valid test case / 3 denoms", + poolId, + []string{"foo", "bar", "baz"}, + sdk.NewInt(1000000000000000000), + nil, + }, + { + "valid test case / 4 denoms", + poolId, + []string{"foo", "bar", "baz", "uosmo"}, sdk.NewInt(1000000000000000000), nil, }, { "pool id does not exist", poolId + 1, - "foo", + []string{"foo"}, sdk.NewInt(1000000000000000000), types.ErrPoolNotFound, }, { "token in denom does not exist", poolId, - "hello", + []string{"hello"}, sdk.NewInt(1000000000000000000), types.ErrDenomNotFoundInPool, }, { "zero share in amount", poolId, - "foo", + []string{"foo"}, sdk.ZeroInt(), sdkerrors.Wrapf(types.ErrInvalidMathApprox, "share ratio is zero or negative"), }, { "negative share in amount", poolId, - "foo", + []string{"foo"}, sdk.NewInt(-10000), sdkerrors.Wrapf(types.ErrInvalidMathApprox, "share ratio is zero or negative"), }, @@ -63,9 +85,9 @@ func (suite *KeeperTestSuite) TestCalcExitPoolCoinsFromShares() { for _, tc := range testCases { suite.Run(tc.name, func() { out, err := queryClient.CalcExitPoolCoinsFromShares(gocontext.Background(), &types.QueryCalcExitPoolCoinsFromSharesRequest{ - PoolId: tc.poolId, - TokenOutDenom: tc.tokenOut, - ShareInAmount: tc.shareInAmount, + PoolId: tc.poolId, + TokensOutDenoms: tc.tokensOut, + ShareInAmount: tc.shareInAmount, }) if tc.expectedErr == nil { poolRes, err := queryClient.Pool(gocontext.Background(), &types.QueryPoolRequest{ @@ -79,7 +101,19 @@ func (suite *KeeperTestSuite) TestCalcExitPoolCoinsFromShares() { exitCoins, err := pool.CalcExitPoolCoinsFromShares(ctx, tc.shareInAmount, exitFee) suite.Require().NoError(err) - suite.Require().Equal(exitCoins.AmountOf(tc.tokenOut).Uint64(), out.TokenOutAmount) + + // For each coin in exitCoins we are looking for a match in out response + // We need to find exactly len(out) such matches + coins_checked := 0 + for _, coin := range exitCoins { + for _, actual_coin := range out.TokensOut { + if coin.Denom == actual_coin.Denom { + suite.Require().Equal(coin.Amount, actual_coin.Amount) + coins_checked++ + } + } + } + suite.Require().Equal(len(tc.tokensOut), coins_checked) } else { suite.Require().ErrorIs(err, tc.expectedErr) } @@ -132,7 +166,7 @@ func (suite *KeeperTestSuite) TestCalcJoinPoolShares() { "join pool with incorrect amount of assets", poolId, sdk.NewCoins(sdk.NewCoin("uosmo", sdk.NewInt(10000)), sdk.NewCoin("bar", sdk.NewInt(10000))), - types.ErrInvalidNumberOfCoins, + errors.New("balancer pool only supports LP'ing with one asset or all assets in pool"), }, } @@ -157,7 +191,7 @@ func (suite *KeeperTestSuite) TestCalcJoinPoolShares() { suite.Require().Equal(numShares, out.ShareOutAmount) suite.Require().Equal(numLiquidity, out.TokensOut) } else { - suite.Require().ErrorIs(err, tc.expectedErr) + suite.Require().EqualError(err, tc.expectedErr.Error()) } }) } diff --git a/x/gamm/pool-models/balancer/pool.go b/x/gamm/pool-models/balancer/pool.go index ffc0c3b7e3a..ddbbecf00c1 100644 --- a/x/gamm/pool-models/balancer/pool.go +++ b/x/gamm/pool-models/balancer/pool.go @@ -725,7 +725,7 @@ func (p *Pool) CalcJoinPoolShares(ctx sdk.Context, tokensIn sdk.Coins, swapFee s tokensJoined = tokensIn return numShares, tokensJoined, nil } else if tokensIn.Len() != p.NumAssets() { - return sdk.ZeroInt(), sdk.NewCoins(), types.ErrInvalidNumberOfCoins + return sdk.ZeroInt(), sdk.NewCoins(), errors.New("balancer pool only supports LP'ing with one asset or all assets in pool") } // 3) JoinPoolNoSwap with as many tokens as we can. (What is in perfect ratio) diff --git a/x/gamm/types/errors.go b/x/gamm/types/errors.go index 948cbef7f22..a42fa258367 100644 --- a/x/gamm/types/errors.go +++ b/x/gamm/types/errors.go @@ -16,19 +16,18 @@ func (e PoolDoesNotExistError) Error() string { // x/gamm module sentinel errors. var ( - ErrPoolNotFound = sdkerrors.Register(ModuleName, 1, "pool not found") - ErrPoolAlreadyExist = sdkerrors.Register(ModuleName, 2, "pool already exist") - ErrPoolLocked = sdkerrors.Register(ModuleName, 3, "pool is locked") - ErrTooFewPoolAssets = sdkerrors.Register(ModuleName, 4, "pool should have at least 2 assets, as they must be swapping between at least two assets") - ErrTooManyPoolAssets = sdkerrors.Register(ModuleName, 5, "pool has too many assets (currently capped at 8 assets per balancer pool and 2 per stableswap)") - ErrLimitMaxAmount = sdkerrors.Register(ModuleName, 6, "calculated amount is larger than max amount") - ErrLimitMinAmount = sdkerrors.Register(ModuleName, 7, "calculated amount is lesser than min amount") - ErrInvalidMathApprox = sdkerrors.Register(ModuleName, 8, "invalid calculated result") - ErrAlreadyInvalidPool = sdkerrors.Register(ModuleName, 9, "destruction on already invalid pool") - ErrInvalidPool = sdkerrors.Register(ModuleName, 10, "attempting to create an invalid pool") - ErrDenomNotFoundInPool = sdkerrors.Register(ModuleName, 11, "denom does not exist in pool") - ErrDenomAlreadyInPool = sdkerrors.Register(ModuleName, 12, "denom already exists in the pool") - ErrInvalidNumberOfCoins = sdkerrors.Register(ModuleName, 13, "balancer pool only supports LP'ing with one asset or all assets in pool") + ErrPoolNotFound = sdkerrors.Register(ModuleName, 1, "pool not found") + ErrPoolAlreadyExist = sdkerrors.Register(ModuleName, 2, "pool already exist") + ErrPoolLocked = sdkerrors.Register(ModuleName, 3, "pool is locked") + ErrTooFewPoolAssets = sdkerrors.Register(ModuleName, 4, "pool should have at least 2 assets, as they must be swapping between at least two assets") + ErrTooManyPoolAssets = sdkerrors.Register(ModuleName, 5, "pool has too many assets (currently capped at 8 assets per balancer pool and 2 per stableswap)") + ErrLimitMaxAmount = sdkerrors.Register(ModuleName, 6, "calculated amount is larger than max amount") + ErrLimitMinAmount = sdkerrors.Register(ModuleName, 7, "calculated amount is lesser than min amount") + ErrInvalidMathApprox = sdkerrors.Register(ModuleName, 8, "invalid calculated result") + ErrAlreadyInvalidPool = sdkerrors.Register(ModuleName, 9, "destruction on already invalid pool") + ErrInvalidPool = sdkerrors.Register(ModuleName, 10, "attempting to create an invalid pool") + ErrDenomNotFoundInPool = sdkerrors.Register(ModuleName, 11, "denom does not exist in pool") + ErrDenomAlreadyInPool = sdkerrors.Register(ModuleName, 12, "denom already exists in the pool") ErrEmptyRoutes = sdkerrors.Register(ModuleName, 21, "routes not defined") ErrEmptyPoolAssets = sdkerrors.Register(ModuleName, 22, "PoolAssets not defined") diff --git a/x/gamm/types/query.pb.go b/x/gamm/types/query.pb.go index bba2779068f..609535ad6a4 100644 --- a/x/gamm/types/query.pb.go +++ b/x/gamm/types/query.pb.go @@ -492,9 +492,9 @@ func (m *QueryCalcJoinPoolSharesResponse) GetTokensOut() github_com_cosmos_cosmo // =============================== QueryCalcExitPoolCoinsFromSharesRequest type QueryCalcExitPoolCoinsFromSharesRequest struct { - PoolId uint64 `protobuf:"varint,1,opt,name=pool_id,json=poolId,proto3" json:"pool_id,omitempty"` - TokenOutDenom string `protobuf:"bytes,2,opt,name=token_out_denom,json=tokenOutDenom,proto3" json:"token_out_denom,omitempty"` - ShareInAmount github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,3,opt,name=share_in_amount,json=shareInAmount,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"share_in_amount"` + PoolId uint64 `protobuf:"varint,1,opt,name=pool_id,json=poolId,proto3" json:"pool_id,omitempty"` + TokensOutDenoms []string `protobuf:"bytes,2,rep,name=tokens_out_denoms,json=tokensOutDenoms,proto3" json:"tokens_out_denoms,omitempty"` + ShareInAmount github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,3,opt,name=share_in_amount,json=shareInAmount,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"share_in_amount"` } func (m *QueryCalcExitPoolCoinsFromSharesRequest) Reset() { @@ -539,15 +539,15 @@ func (m *QueryCalcExitPoolCoinsFromSharesRequest) GetPoolId() uint64 { return 0 } -func (m *QueryCalcExitPoolCoinsFromSharesRequest) GetTokenOutDenom() string { +func (m *QueryCalcExitPoolCoinsFromSharesRequest) GetTokensOutDenoms() []string { if m != nil { - return m.TokenOutDenom + return m.TokensOutDenoms } - return "" + return nil } type QueryCalcExitPoolCoinsFromSharesResponse struct { - TokenOutAmount uint64 `protobuf:"varint,1,opt,name=token_out_amount,json=tokenOutAmount,proto3" json:"token_out_amount,omitempty"` + TokensOut github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,1,rep,name=tokens_out,json=tokensOut,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"tokens_out"` } func (m *QueryCalcExitPoolCoinsFromSharesResponse) Reset() { @@ -585,11 +585,11 @@ func (m *QueryCalcExitPoolCoinsFromSharesResponse) XXX_DiscardUnknown() { var xxx_messageInfo_QueryCalcExitPoolCoinsFromSharesResponse proto.InternalMessageInfo -func (m *QueryCalcExitPoolCoinsFromSharesResponse) GetTokenOutAmount() uint64 { +func (m *QueryCalcExitPoolCoinsFromSharesResponse) GetTokensOut() github_com_cosmos_cosmos_sdk_types.Coins { if m != nil { - return m.TokenOutAmount + return m.TokensOut } - return 0 + return nil } // =============================== PoolParams @@ -1292,109 +1292,109 @@ func init() { func init() { proto.RegisterFile("osmosis/gamm/v1beta1/query.proto", fileDescriptor_d9a717df9ca609ef) } var fileDescriptor_d9a717df9ca609ef = []byte{ - // 1625 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x58, 0xcb, 0x6f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ae, - 0x3f, 0x31, 0xdd, 0x9a, 0x72, 0x87, 0x27, 0x82, 0x1b, 0x3b, 0xf8, 0x07, 0x05, 0x1d, 0x5b, 0x76, - 0x98, 0x59, 0xd0, 0x99, 0x51, 0xd3, 0x39, 0xe2, 0x73, 0x51, 0x08, 0x1a, 0x74, 0xda, 0x89, 0xf9, - 0xf6, 0x8c, 0x00, 0xfe, 0xb2, 0x80, 0x7f, 0x09, 0x5f, 0xa8, 0x0f, 0x3f, 0x74, 0xff, 0x00, 0x6d, - 0x3a, 0x54, 0x64, 0x82, 0x3b, 0xf8, 0xa3, 0x82, 0x12, 0x0d, 0xe2, 0x59, 0x73, 0x19, 0x6e, 0x03, - 0x5b, 0xd0, 0xa0, 0x46, 0x9e, 0xf4, 0xc6, 0xfd, 0x1c, 0x59, 0x11, 0x21, 0x5d, 0xc6, 0x17, 0x9f, - 0x23, 0x24, 0xea, 0xb2, 0xa5, 0xd5, 0xc7, 0x4f, 0x93, 0xca, 0x93, 0xa7, 0x49, 0xe5, 0xb7, 0xa7, - 0x49, 0xe5, 0xc3, 0x67, 0xc9, 0xae, 0x27, 0xcf, 0x92, 0x5d, 0x3f, 0x3f, 0x4b, 0x76, 0xbd, 0x79, - 0x36, 0xd4, 0x37, 0xc1, 0x1e, 0x33, 0x79, 0x7d, 0xc3, 0xf1, 0x37, 0xbc, 0x37, 0x3b, 0x97, 0xde, - 0x93, 0xdb, 0x8a, 0x2e, 0x6a, 0xa3, 0x57, 0xfc, 0xab, 0xe0, 0xdc, 0x3f, 0x01, 0x00, 0x00, 0xff, - 0xff, 0x78, 0x00, 0x36, 0x15, 0x08, 0x17, 0x00, 0x00, + // 1622 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x58, 0x4b, 0x6f, 0x1c, 0xc5, + 0x16, 0x76, 0x3b, 0xb6, 0xe3, 0x29, 0xdf, 0xf8, 0x51, 0x71, 0x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c, 0xd7, 0xce, 0x98, 0x8e, 0x43, 0xb9, 0x14, 0x32, 0x90, 0x1e, 0x05, 0xa9, 0xfc, 0x5a, 0xf5, + 0xde, 0xcc, 0x98, 0xce, 0x8e, 0x2f, 0x52, 0x9b, 0xe4, 0x14, 0x78, 0xf5, 0xa1, 0x44, 0xe4, 0x12, + 0x1a, 0x7c, 0x45, 0xec, 0xba, 0x42, 0x69, 0xc1, 0xb0, 0x36, 0x3d, 0x8b, 0x71, 0x7c, 0x06, 0xed, + 0x77, 0x29, 0x2d, 0xe4, 0xec, 0xf5, 0x11, 0xed, 0x84, 0x36, 0xde, 0x35, 0x8f, 0x77, 0xcb, 0xe9, + 0xfe, 0x1d, 0xb3, 0x58, 0x98, 0x25, 0x20, 0x20, 0x46, 0x8f, 0xf8, 0x95, 0x5d, 0x27, 0xd7, 0xd1, + 0x50, 0xc4, 0x01, 0x73, 0xa9, 0xc3, 0x2c, 0x7c, 0x0e, 0x75, 0x09, 0xb1, 0x34, 0xef, 0x9b, 0x1e, + 0xd6, 0x15, 0x34, 0xdd, 0x87, 0xa6, 0xcf, 0x39, 0x3b, 0xf3, 0x89, 0x6f, 0x3e, 0x9f, 0xec, 0x16, + 0x56, 0x59, 0x43, 0x2a, 0x93, 0x37, 0x22, 0x9e, 0x98, 0x8f, 0x65, 0x11, 0xa1, 0x90, 0x87, 0x91, + 0x4e, 0xe9, 0xef, 0xa4, 0x0e, 0x21, 0x08, 0xd2, 0x74, 0x95, 0x38, 0x20, 0x4d, 0x5f, 0x31, 0xf3, + 0x16, 0xd8, 0x1a, 0x11, 0x4b, 0xf2, 0x81, 0x86, 0x70, 0xd4, 0x3b, 0x00, 0x3d, 0x8f, 0xba, 0xc5, + 0xde, 0x6c, 0x44, 0x3b, 0xb1, 0xaf, 0x19, 0xa4, 0x4a, 0x1b, 0x5f, 0xab, 0x81, 0x6a, 0xac, 0x21, + 0x2a, 0xb5, 0x67, 0x05, 0xac, 0xc3, 0x68, 0x58, 0xa2, 0xba, 0xe1, 0x15, 0xa3, 0x61, 0x93, 0x25, + 0x74, 0xa8, 0x6a, 0x1d, 0x00, 0x4f, 0xa1, 0x84, 0xe3, 0x15, 0x73, 0x3e, 0x68, 0x91, 0x9d, 0xe1, + 0xdd, 0x72, 0x7a, 0x50, 0x65, 0x27, 0x10, 0x11, 0xa3, 0xd7, 0x01, 0x53, 0x72, 0x05, 0xf6, 0x10, + 0x5f, 0xb7, 0x76, 0x5c, 0xab, 0xad, 0x34, 0xfb, 0x80, 0x42, 0x27, 0x21, 0x20, 0xa9, 0xcc, 0x77, + 0x5c, 0x4b, 0xfa, 0x49, 0x44, 0x01, 0x05, 0x22, 0x62, 0xf4, 0xba, 0x60, 0x4a, 0xbe, 0xd0, 0x50, + 0x4a, 0x3a, 0xbb, 0x62, 0x16, 0xd6, 0x96, 0xa8, 0xed, 0x08, 0xa7, 0x37, 0x37, 0xcc, 0x92, 0xc5, + 0xda, 0xc1, 0x86, 0x37, 0x50, 0x82, 0xd3, 0xbb, 0x96, 0xc3, 0x72, 0xb6, 0x48, 0x86, 0x48, 0xe4, + 0xd1, 0x8a, 0x64, 0xf8, 0x69, 0xb8, 0x42, 0x6d, 0x67, 0xfe, 0xec, 0x93, 0x72, 0xba, 0xe3, 0xb3, + 0x9f, 0xd2, 0xe3, 0x79, 0x9b, 0x6f, 0x78, 0xab, 0xfa, 0x1a, 0x2d, 0xc2, 0x95, 0x80, 0x3f, 0x93, + 0x6c, 0xfd, 0x6e, 0x46, 0x60, 0x66, 0xd2, 0x80, 0x19, 0xbd, 0xca, 0x7b, 0xd6, 0x21, 0x0f, 0x3a, + 0x51, 0xba, 0x2e, 0x72, 0x20, 0x84, 0xa1, 0x41, 0x26, 0x56, 0x72, 0xd4, 0xe3, 0x39, 0xb3, 0x48, + 0x3d, 0x87, 0x03, 0x2f, 0x59, 0xb1, 0xf3, 0x8f, 0xe5, 0xf4, 0xc9, 0x26, 0x76, 0xce, 0x3a, 0x7c, + 0xb7, 0x9c, 0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0x74, 0x8e, 0xf8, 0x5c, 0x1c, 0x82, 0x3a, 0x9d, 0x76, 0x72, 0xa6, 0x35, 0x23, 0x80, + 0xbf, 0x20, 0xe1, 0x5f, 0xc2, 0x17, 0x6a, 0xc3, 0x8f, 0xdc, 0x3f, 0x40, 0x9b, 0x89, 0x14, 0x99, + 0xf0, 0x0e, 0x7e, 0xa7, 0xa1, 0x64, 0x9d, 0x78, 0x96, 0x3d, 0x8e, 0x5b, 0xc0, 0x16, 0x36, 0xa8, + 0xb1, 0x27, 0xbd, 0x7e, 0x3f, 0x47, 0x16, 0x65, 0x48, 0x97, 0xf1, 0xc5, 0xbf, 0x10, 0x12, 0xf5, + 0xf8, 0xfc, 0xd2, 0x93, 0x67, 0x29, 0xed, 0xe9, 0xb3, 0x94, 0xf6, 0xf3, 0xb3, 0x94, 0xf6, 0xfe, + 0xf3, 0x54, 0xc7, 0xd3, 0xe7, 0xa9, 0x8e, 0x1f, 0x9e, 0xa7, 0x3a, 0x5e, 0x3f, 0x1b, 0xe9, 0x9b, + 0x60, 0x8f, 0xc9, 0x82, 0xb9, 0xca, 0x82, 0x0d, 0xef, 0x4d, 0x4d, 0x67, 0xb6, 0xd5, 0xb6, 0xb2, + 0x8b, 0x5a, 0xed, 0x91, 0xff, 0x2a, 0x38, 0xf7, 0x67, 0x00, 0x00, 0x00, 0xff, 0xff, 0x67, 0x05, + 0xea, 0xf1, 0x4f, 0x17, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -2298,12 +2298,14 @@ func (m *QueryCalcExitPoolCoinsFromSharesRequest) MarshalToSizedBuffer(dAtA []by } i-- dAtA[i] = 0x1a - if len(m.TokenOutDenom) > 0 { - i -= len(m.TokenOutDenom) - copy(dAtA[i:], m.TokenOutDenom) - i = encodeVarintQuery(dAtA, i, uint64(len(m.TokenOutDenom))) - i-- - dAtA[i] = 0x12 + if len(m.TokensOutDenoms) > 0 { + for iNdEx := len(m.TokensOutDenoms) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.TokensOutDenoms[iNdEx]) + copy(dAtA[i:], m.TokensOutDenoms[iNdEx]) + i = encodeVarintQuery(dAtA, i, uint64(len(m.TokensOutDenoms[iNdEx]))) + i-- + dAtA[i] = 0x12 + } } if m.PoolId != 0 { i = encodeVarintQuery(dAtA, i, uint64(m.PoolId)) @@ -2333,10 +2335,19 @@ func (m *QueryCalcExitPoolCoinsFromSharesResponse) MarshalToSizedBuffer(dAtA []b _ = i var l int _ = l - if m.TokenOutAmount != 0 { - i = encodeVarintQuery(dAtA, i, uint64(m.TokenOutAmount)) - i-- - dAtA[i] = 0x8 + if len(m.TokensOut) > 0 { + for iNdEx := len(m.TokensOut) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.TokensOut[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 } @@ -2998,9 +3009,11 @@ func (m *QueryCalcExitPoolCoinsFromSharesRequest) Size() (n int) { if m.PoolId != 0 { n += 1 + sovQuery(uint64(m.PoolId)) } - l = len(m.TokenOutDenom) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) + if len(m.TokensOutDenoms) > 0 { + for _, s := range m.TokensOutDenoms { + l = len(s) + n += 1 + l + sovQuery(uint64(l)) + } } l = m.ShareInAmount.Size() n += 1 + l + sovQuery(uint64(l)) @@ -3013,8 +3026,11 @@ func (m *QueryCalcExitPoolCoinsFromSharesResponse) Size() (n int) { } var l int _ = l - if m.TokenOutAmount != 0 { - n += 1 + sovQuery(uint64(m.TokenOutAmount)) + if len(m.TokensOut) > 0 { + for _, e := range m.TokensOut { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } } return n } @@ -4133,7 +4149,7 @@ func (m *QueryCalcExitPoolCoinsFromSharesRequest) Unmarshal(dAtA []byte) error { } case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TokenOutDenom", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field TokensOutDenoms", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -4161,7 +4177,7 @@ func (m *QueryCalcExitPoolCoinsFromSharesRequest) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.TokenOutDenom = string(dAtA[iNdEx:postIndex]) + m.TokensOutDenoms = append(m.TokensOutDenoms, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex case 3: if wireType != 2 { @@ -4248,10 +4264,10 @@ func (m *QueryCalcExitPoolCoinsFromSharesResponse) Unmarshal(dAtA []byte) error } switch fieldNum { case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field TokenOutAmount", wireType) + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TokensOut", wireType) } - m.TokenOutAmount = 0 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -4261,11 +4277,26 @@ func (m *QueryCalcExitPoolCoinsFromSharesResponse) Unmarshal(dAtA []byte) error } b := dAtA[iNdEx] iNdEx++ - m.TokenOutAmount |= 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.TokensOut = append(m.TokensOut, types1.Coin{}) + if err := m.TokensOut[len(m.TokensOut)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipQuery(dAtA[iNdEx:]) From 34d4d4ecd579b1470accfd55b9ece61efbef569a Mon Sep 17 00:00:00 2001 From: Ruslan Akhtariev Date: Wed, 2 Nov 2022 12:21:02 +0700 Subject: [PATCH 33/59] docs fix --- proto/osmosis/gamm/v1beta1/query.proto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/proto/osmosis/gamm/v1beta1/query.proto b/proto/osmosis/gamm/v1beta1/query.proto index 0597705207d..3c6b170d052 100644 --- a/proto/osmosis/gamm/v1beta1/query.proto +++ b/proto/osmosis/gamm/v1beta1/query.proto @@ -141,7 +141,7 @@ message QueryCalcJoinPoolSharesResponse { ]; } -//=============================== QueryCalcExitPoolCoinsFromSharesRequest +//=============================== CalcExitPoolCoinsFromShares message QueryCalcExitPoolCoinsFromSharesRequest { uint64 pool_id = 1; repeated string tokens_out_denoms = 2; From 66b78a6212fefe1084653318bb742787e105276c Mon Sep 17 00:00:00 2001 From: George McAskill <42020095+georgemc98@users.noreply.github.com> Date: Wed, 2 Nov 2022 10:04:07 -0500 Subject: [PATCH 34/59] feat: add two pool shares queries to stargate whitelist --- wasmbinding/stargate_whitelist.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/wasmbinding/stargate_whitelist.go b/wasmbinding/stargate_whitelist.go index 68d7e987366..13e3916f339 100644 --- a/wasmbinding/stargate_whitelist.go +++ b/wasmbinding/stargate_whitelist.go @@ -78,6 +78,8 @@ func init() { setWhitelistedQuery("/osmosis.gamm.v1beta1.Query/TotalPoolLiquidity", &gammtypes.QueryTotalPoolLiquidityResponse{}) setWhitelistedQuery("/osmosis.gamm.v1beta1.Query/TotalShares", &gammtypes.QueryTotalSharesResponse{}) setWhitelistedQuery("/osmosis.gamm.v1beta1.Query/SpotPrice", &gammtypes.QuerySpotPriceResponse{}) + setWhitelistedQuery("/osmosis.gamm.v1beta1.Query/CalcJoinPoolShares", &gammtypes.QueryCalcJoinPoolSharesResponse{}) + setWhitelistedQuery("/osmosis.gamm.v1beta1.Query/CalcExitPoolCoinsFromShares", &gammtypes.QueryCalcExitPoolCoinsFromSharesResponse{}) // incentives setWhitelistedQuery("/osmosis.incentives.Query/ModuleToDistributeCoins", &incentivestypes.ModuleToDistributeCoinsResponse{}) From 56e29e66f0f57d8cf17cd10f3eaa341a627e9729 Mon Sep 17 00:00:00 2001 From: George McAskill <42020095+georgemc98@users.noreply.github.com> Date: Wed, 2 Nov 2022 10:14:45 -0500 Subject: [PATCH 35/59] chore: update changelog --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 271759b6164..44a1c12fad6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -47,6 +47,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 * [#2788](https://github.com/osmosis-labs/osmosis/pull/2788) Add logarithm base 2 implementation. * [#2739](https://github.com/osmosis-labs/osmosis/pull/2739) Add pool type query * [#2956](https://github.com/osmosis-labs/osmosis/issues/2956) Add queries for calculating amount of shares/tokens you get by providing X tokens/shares when entering/exiting a pool +* [#3217](https://github.com/osmosis-labs/osmosis/pull/3217) Add two pool queries implemented in +PR 2956 to the registered Stargate queries ### Bug fixes From a36da250230d1a9ee066120be5d604bd63f7f922 Mon Sep 17 00:00:00 2001 From: George McAskill <42020095+georgemc98@users.noreply.github.com> Date: Wed, 2 Nov 2022 10:24:24 -0500 Subject: [PATCH 36/59] feat: generate proto files --- go.mod | 2 +- x/gamm/types/query.pb.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/go.mod b/go.mod index 4ba4834b8a6..99db48c3a8a 100644 --- a/go.mod +++ b/go.mod @@ -5,7 +5,7 @@ go 1.18 require ( github.com/CosmWasm/wasmd v0.28.0-osmo-v12 github.com/cosmos/cosmos-proto v1.0.0-alpha8 - github.com/cosmos/cosmos-sdk v0.46.1 + github.com/cosmos/cosmos-sdk v0.46.4 github.com/cosmos/go-bip39 v1.0.0 github.com/cosmos/iavl v0.19.1 github.com/cosmos/ibc-go/v3 v3.3.0 diff --git a/x/gamm/types/query.pb.go b/x/gamm/types/query.pb.go index 609535ad6a4..93e8195da5e 100644 --- a/x/gamm/types/query.pb.go +++ b/x/gamm/types/query.pb.go @@ -490,7 +490,7 @@ func (m *QueryCalcJoinPoolSharesResponse) GetTokensOut() github_com_cosmos_cosmo return nil } -// =============================== QueryCalcExitPoolCoinsFromSharesRequest +// =============================== CalcExitPoolCoinsFromShares type QueryCalcExitPoolCoinsFromSharesRequest struct { PoolId uint64 `protobuf:"varint,1,opt,name=pool_id,json=poolId,proto3" json:"pool_id,omitempty"` TokensOutDenoms []string `protobuf:"bytes,2,rep,name=tokens_out_denoms,json=tokensOutDenoms,proto3" json:"tokens_out_denoms,omitempty"` From fcd67c2be24f1bb9c64eaeedbdf6d55cd9f7c180 Mon Sep 17 00:00:00 2001 From: George McAskill <42020095+georgemc98@users.noreply.github.com> Date: Thu, 3 Nov 2022 07:30:17 -0500 Subject: [PATCH 37/59] chore: generate proto files --- x/gamm/types/query.pb.go | 310 --------------------------------------- 1 file changed, 310 deletions(-) diff --git a/x/gamm/types/query.pb.go b/x/gamm/types/query.pb.go index 4fa89cb3bcb..5c0e3878a41 100644 --- a/x/gamm/types/query.pb.go +++ b/x/gamm/types/query.pb.go @@ -492,14 +492,8 @@ func (m *QueryCalcJoinPoolSharesResponse) GetTokensOut() github_com_cosmos_cosmo // =============================== CalcExitPoolCoinsFromShares type QueryCalcExitPoolCoinsFromSharesRequest struct { -<<<<<<< HEAD - PoolId uint64 `protobuf:"varint,1,opt,name=pool_id,json=poolId,proto3" json:"pool_id,omitempty"` - TokensOutDenoms []string `protobuf:"bytes,2,rep,name=tokens_out_denoms,json=tokensOutDenoms,proto3" json:"tokens_out_denoms,omitempty"` - ShareInAmount github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,3,opt,name=share_in_amount,json=shareInAmount,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"share_in_amount"` -======= PoolId uint64 `protobuf:"varint,1,opt,name=pool_id,json=poolId,proto3" json:"pool_id,omitempty"` ShareInAmount github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,2,opt,name=share_in_amount,json=shareInAmount,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"share_in_amount"` ->>>>>>> main } func (m *QueryCalcExitPoolCoinsFromSharesRequest) Reset() { @@ -544,16 +538,6 @@ func (m *QueryCalcExitPoolCoinsFromSharesRequest) GetPoolId() uint64 { return 0 } -<<<<<<< HEAD -func (m *QueryCalcExitPoolCoinsFromSharesRequest) GetTokensOutDenoms() []string { - if m != nil { - return m.TokensOutDenoms - } - return nil -} - -======= ->>>>>>> main type QueryCalcExitPoolCoinsFromSharesResponse struct { TokensOut github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,1,rep,name=tokens_out,json=tokensOut,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"tokens_out"` } @@ -1300,111 +1284,6 @@ func init() { func init() { proto.RegisterFile("osmosis/gamm/v1beta1/query.proto", fileDescriptor_d9a717df9ca609ef) } var fileDescriptor_d9a717df9ca609ef = []byte{ -<<<<<<< HEAD - // 1622 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x58, 0x4b, 0x6f, 0x1c, 0xc5, - 0x16, 0x76, 0x3b, 0xb6, 0xe3, 0x29, 0xdf, 0xf8, 0x51, 0x71, 0x12, 0x67, 0x9c, 0xcc, 0xe4, 0xd6, - 0xd5, 0x8d, 0x9d, 0xc4, 0xee, 0x89, 0x1d, 0x47, 0xba, 0xb2, 0x6e, 0x1e, 0x76, 0x62, 0x27, 0x63, - 0x41, 0x6c, 0x3a, 0x51, 0x10, 0xb0, 0x18, 0xb5, 0xed, 0x66, 0xdc, 0xc9, 0x4c, 0x57, 0x7b, 0xaa, - 0x3a, 0xb6, 0x85, 0x22, 0xa4, 0x08, 0xb1, 0x62, 0x81, 0x14, 0xc8, 0x2a, 0x12, 0x2c, 0x58, 0x20, - 0xd6, 0x48, 0xfc, 0x00, 0x04, 0x8a, 0x90, 0x90, 0x82, 0xd8, 0x20, 0x16, 0x03, 0x4a, 0x00, 0xb1, - 0xf6, 0x1f, 0x00, 0x55, 0xd5,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, 0x5d, 0x27, 0xd7, 0xd1, - 0x50, 0xc4, 0x01, 0x73, 0xa9, 0xc3, 0x2c, 0x7c, 0x0e, 0x75, 0x09, 0xb1, 0x34, 0xef, 0x9b, 0x1e, - 0xd6, 0x15, 0x34, 0xdd, 0x87, 0xa6, 0xcf, 0x39, 0x3b, 0xf3, 0x89, 0x6f, 0x3e, 0x9f, 0xec, 0x16, - 0x56, 0x59, 0x43, 0x2a, 0x93, 0x37, 0x22, 0x9e, 0x98, 0x8f, 0x65, 0x11, 0xa1, 0x90, 0x87, 0x91, - 0x4e, 0xe9, 0xef, 0xa4, 0x0e, 0x21, 0x08, 0xd2, 0x74, 0x95, 0x38, 0x20, 0x4d, 0x5f, 0x31, 0xf3, - 0x16, 0xd8, 0x1a, 0x11, 0x4b, 0xf2, 0x81, 0x86, 0x70, 0xd4, 0x3b, 0x00, 0x3d, 0x8f, 0xba, 0xc5, - 0xde, 0x6c, 0x44, 0x3b, 0xb1, 0xaf, 0x19, 0xa4, 0x4a, 0x1b, 0x5f, 0xab, 0x81, 0x6a, 0xac, 0x21, - 0x2a, 0xb5, 0x67, 0x05, 0xac, 0xc3, 0x68, 0x58, 0xa2, 0xba, 0xe1, 0x15, 0xa3, 0x61, 0x93, 0x25, - 0x74, 0xa8, 0x6a, 0x1d, 0x00, 0x4f, 0xa1, 0x84, 0xe3, 0x15, 0x73, 0x3e, 0x68, 0x91, 0x9d, 0xe1, - 0xdd, 0x72, 0x7a, 0x50, 0x65, 0x27, 0x10, 0x11, 0xa3, 0xd7, 0x01, 0x53, 0x72, 0x05, 0xf6, 0x10, - 0x5f, 0xb7, 0x76, 0x5c, 0xab, 0xad, 0x34, 0xfb, 0x80, 0x42, 0x27, 0x21, 0x20, 0xa9, 0xcc, 0x77, - 0x5c, 0x4b, 0xfa, 0x49, 0x44, 0x01, 0x05, 0x22, 0x62, 0xf4, 0xba, 0x60, 0x4a, 0xbe, 0xd0, 0x50, - 0x4a, 0x3a, 0xbb, 0x62, 0x16, 0xd6, 0x96, 0xa8, 0xed, 0x08, 0xa7, 0x37, 0x37, 0xcc, 0x92, 0xc5, - 0xda, 0xc1, 0x86, 0x37, 0x50, 0x82, 0xd3, 0xbb, 0x96, 0xc3, 0x72, 0xb6, 0x48, 0x86, 0x48, 0xe4, - 0xd1, 0x8a, 0x64, 0xf8, 0x69, 0xb8, 0x42, 0x6d, 0x67, 0xfe, 0xec, 0x93, 0x72, 0xba, 0xe3, 0xb3, - 0x9f, 0xd2, 0xe3, 0x79, 0x9b, 0x6f, 0x78, 0xab, 0xfa, 0x1a, 0x2d, 0xc2, 0x95, 0x80, 0x3f, 0x93, - 0x6c, 0xfd, 0x6e, 0x46, 0x60, 0x66, 0xd2, 0x80, 0x19, 0xbd, 0xca, 0x7b, 0xd6, 0x21, 0x0f, 0x3a, - 0x51, 0xba, 0x2e, 0x72, 0x20, 0x84, 0xa1, 0x41, 0x26, 0x56, 0x72, 0xd4, 0xe3, 0x39, 0xb3, 0x48, - 0x3d, 0x87, 0x03, 0x2f, 0x59, 0xb1, 0xf3, 0x8f, 0xe5, 0xf4, 0xc9, 0x26, 0x76, 0xce, 0x3a, 0x7c, - 0xb7, 0x9c, 0x3e, 0xa2, 0x22, 0xae, 0xf6, 0x47, 0x8c, 0x7e, 0xb9, 0xb4, 0xec, 0xf1, 0x39, 0xb9, - 0x80, 0xef, 0x20, 0x04, 0x14, 0x50, 0x8f, 0xbf, 0x08, 0x0e, 0x80, 0xe1, 0x65, 0x8f, 0x93, 0xaf, - 0x35, 0x34, 0x16, 0x90, 0xb0, 0xb0, 0x6d, 0x73, 0x41, 0x82, 0xd4, 0x5a, 0x2c, 0xd1, 0x62, 0x65, - 0x1e, 0x8f, 0x54, 0xe5, 0x31, 0xc8, 0xd9, 0x69, 0x34, 0x14, 0x02, 0xce, 0xad, 0x5b, 0x0e, 0x2d, - 0x32, 0x89, 0x3b, 0x61, 0x0c, 0x04, 0x5b, 0x5d, 0x95, 0xcb, 0xf8, 0x36, 0x1a,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3, 0xb3, 0x94, 0xf6, 0xfe, - 0xf3, 0x54, 0xc7, 0xd3, 0xe7, 0xa9, 0x8e, 0x1f, 0x9e, 0xa7, 0x3a, 0x5e, 0x3f, 0x1b, 0xe9, 0x9b, - 0x60, 0x8f, 0xc9, 0x82, 0xb9, 0xca, 0x82, 0x0d, 0xef, 0x4d, 0x4d, 0x67, 0xb6, 0xd5, 0xb6, 0xb2, - 0x8b, 0x5a, 0xed, 0x91, 0xff, 0x2a, 0x38, 0xf7, 0x67, 0x00, 0x00, 0x00, 0xff, 0xff, 0x67, 0x05, - 0xea, 0xf1, 0x4f, 0x17, 0x00, 0x00, -======= // 1603 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x58, 0x4b, 0x6f, 0x1c, 0xc5, 0x16, 0x76, 0x3b, 0xb6, 0x63, 0x97, 0x6f, 0xfc, 0xa8, 0x38, 0x89, 0x33, 0x4e, 0x66, 0x72, 0xeb, @@ -1507,7 +1386,6 @@ var fileDescriptor_d9a717df9ca609ef = []byte{ 0x54, 0xde, 0x5c, 0x63, 0xc1, 0x86, 0xf7, 0xa6, 0x67, 0xd2, 0x3b, 0x6a, 0x5b, 0xd9, 0x45, 0xad, 0xf5, 0xc8, 0x7f, 0x15, 0x9c, 0xfb, 0x33, 0x00, 0x00, 0xff, 0xff, 0x69, 0xd3, 0xbc, 0xcf, 0x23, 0x17, 0x00, 0x00, ->>>>>>> main } // Reference imports to suppress errors if they are not otherwise used. @@ -2410,20 +2288,7 @@ func (m *QueryCalcExitPoolCoinsFromSharesRequest) MarshalToSizedBuffer(dAtA []by i = encodeVarintQuery(dAtA, i, uint64(size)) } i-- -<<<<<<< HEAD - dAtA[i] = 0x1a - if len(m.TokensOutDenoms) > 0 { - for iNdEx := len(m.TokensOutDenoms) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.TokensOutDenoms[iNdEx]) - copy(dAtA[i:], m.TokensOutDenoms[iNdEx]) - i = encodeVarintQuery(dAtA, i, uint64(len(m.TokensOutDenoms[iNdEx]))) - i-- - dAtA[i] = 0x12 - } - } -======= dAtA[i] = 0x12 ->>>>>>> main if m.PoolId != 0 { i = encodeVarintQuery(dAtA, i, uint64(m.PoolId)) i-- @@ -2498,137 +2363,6 @@ func (m *QueryPoolParamsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) } func (m *QueryPoolParamsResponse) Marshal() (dAtA []byte, err error) { -<<<<<<< HEAD - 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 *QueryPoolParamsResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryPoolParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Params != nil { - { - size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *QueryTotalPoolLiquidityRequest) 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 *QueryTotalPoolLiquidityRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryTotalPoolLiquidityRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.PoolId != 0 { - i = encodeVarintQuery(dAtA, i, uint64(m.PoolId)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *QueryTotalPoolLiquidityResponse) 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 *QueryTotalPoolLiquidityResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryTotalPoolLiquidityResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Liquidity) > 0 { - for iNdEx := len(m.Liquidity) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Liquidity[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 *QueryTotalSharesRequest) 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 *QueryTotalSharesRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryTotalSharesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.PoolId != 0 { - i = encodeVarintQuery(dAtA, i, uint64(m.PoolId)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *QueryTotalSharesResponse) Marshal() (dAtA []byte, err error) { -======= ->>>>>>> main size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -3257,15 +2991,6 @@ func (m *QueryCalcExitPoolCoinsFromSharesRequest) Size() (n int) { if m.PoolId != 0 { n += 1 + sovQuery(uint64(m.PoolId)) } -<<<<<<< HEAD - if len(m.TokensOutDenoms) > 0 { - for _, s := range m.TokensOutDenoms { - l = len(s) - n += 1 + l + sovQuery(uint64(l)) - } - } -======= ->>>>>>> main l = m.ShareInAmount.Size() n += 1 + l + sovQuery(uint64(l)) return n @@ -4400,41 +4125,6 @@ func (m *QueryCalcExitPoolCoinsFromSharesRequest) Unmarshal(dAtA []byte) error { } case 2: if wireType != 2 { -<<<<<<< HEAD - return fmt.Errorf("proto: wrong wireType = %d for field TokensOutDenoms", 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.TokensOutDenoms = append(m.TokensOutDenoms, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 3: - if wireType != 2 { -======= ->>>>>>> main return fmt.Errorf("proto: wrong wireType = %d for field ShareInAmount", wireType) } var stringLen uint64 From 4bccd6499bae90e5c5479d2068c589557d28b793 Mon Sep 17 00:00:00 2001 From: Ruslan Akhtariev Date: Sun, 6 Nov 2022 12:59:07 +0700 Subject: [PATCH 38/59] autocli copy from cosmos --- client/v2/Makefile | 2 + client/v2/autocli/builder.go | 19 + client/v2/autocli/cmd.go | 60 + client/v2/autocli/flag/address.go | 39 + client/v2/autocli/flag/builder.go | 47 + client/v2/autocli/flag/doc.go | 4 + client/v2/autocli/flag/duration.go | 51 + client/v2/autocli/flag/enum.go | 73 + client/v2/autocli/flag/field.go | 115 + client/v2/autocli/flag/list.go | 107 + client/v2/autocli/flag/message.go | 99 + client/v2/autocli/flag/message_json.go | 63 + client/v2/autocli/flag/pagination.go | 21 + client/v2/autocli/flag/register.go | 112 + client/v2/autocli/flag/simple.go | 47 + client/v2/autocli/flag/timestamp.go | 50 + client/v2/autocli/flag/type.go | 15 + client/v2/autocli/flag/value.go | 21 + client/v2/autocli/interface.go | 32 + client/v2/autocli/query.go | 203 + client/v2/autocli/query_test.go | 304 ++ client/v2/autocli/testdata/bank_example.yaml | 28 + .../autocli/testdata/help-deprecated.golden | 36 + client/v2/autocli/testdata/help-echo.golden | 40 + client/v2/autocli/testdata/help-skip.golden | 7 + .../v2/autocli/testdata/help-toplevel.golden | 17 + client/v2/autocli/testdata/help.golden | 40 + client/v2/go.mod | 29 + client/v2/go.sum | 82 + client/v2/internal/buf.gen.yaml | 16 + client/v2/internal/buf.lock | 19 + client/v2/internal/buf.yaml | 12 + client/v2/internal/testpb/query.proto | 61 + client/v2/internal/testpb/query.pulsar.go | 4141 +++++++++++++++++ client/v2/internal/testpb/query_grpc.pb.go | 107 + client/v2/internal/util/util.go | 29 + .../api/cosmos/base/cli/v1/options.pb.go | 2482 ++++++++++ .../api/cosmos/base/cli/v1/query.pb.go | 660 +++ proto/osmosis/autocli/v1/options.proto | 133 + proto/osmosis/autocli/v1/query.proto | 28 + proto/osmosis/query/v1/query.proto | 36 + x/lockup/module.go | 6 + x/lockup/types/autocli.go | 19 + 43 files changed, 9512 insertions(+) create mode 100644 client/v2/Makefile create mode 100644 client/v2/autocli/builder.go create mode 100644 client/v2/autocli/cmd.go create mode 100644 client/v2/autocli/flag/address.go create mode 100644 client/v2/autocli/flag/builder.go create mode 100644 client/v2/autocli/flag/doc.go create mode 100644 client/v2/autocli/flag/duration.go create mode 100644 client/v2/autocli/flag/enum.go create mode 100644 client/v2/autocli/flag/field.go create mode 100644 client/v2/autocli/flag/list.go create mode 100644 client/v2/autocli/flag/message.go create mode 100644 client/v2/autocli/flag/message_json.go create mode 100644 client/v2/autocli/flag/pagination.go create mode 100644 client/v2/autocli/flag/register.go create mode 100644 client/v2/autocli/flag/simple.go create mode 100644 client/v2/autocli/flag/timestamp.go create mode 100644 client/v2/autocli/flag/type.go create mode 100644 client/v2/autocli/flag/value.go create mode 100644 client/v2/autocli/interface.go create mode 100644 client/v2/autocli/query.go create mode 100644 client/v2/autocli/query_test.go create mode 100644 client/v2/autocli/testdata/bank_example.yaml create mode 100644 client/v2/autocli/testdata/help-deprecated.golden create mode 100644 client/v2/autocli/testdata/help-echo.golden create mode 100644 client/v2/autocli/testdata/help-skip.golden create mode 100644 client/v2/autocli/testdata/help-toplevel.golden create mode 100644 client/v2/autocli/testdata/help.golden create mode 100644 client/v2/go.mod create mode 100644 client/v2/go.sum create mode 100644 client/v2/internal/buf.gen.yaml create mode 100644 client/v2/internal/buf.lock create mode 100644 client/v2/internal/buf.yaml create mode 100644 client/v2/internal/testpb/query.proto create mode 100644 client/v2/internal/testpb/query.pulsar.go create mode 100644 client/v2/internal/testpb/query_grpc.pb.go create mode 100644 client/v2/internal/util/util.go create mode 100644 cosmossdk.io/api/cosmos/base/cli/v1/options.pb.go create mode 100644 cosmossdk.io/api/cosmos/base/cli/v1/query.pb.go create mode 100644 proto/osmosis/autocli/v1/options.proto create mode 100644 proto/osmosis/autocli/v1/query.proto create mode 100644 proto/osmosis/query/v1/query.proto create mode 100644 x/lockup/types/autocli.go diff --git a/client/v2/Makefile b/client/v2/Makefile new file mode 100644 index 00000000000..6868d1941a3 --- /dev/null +++ b/client/v2/Makefile @@ -0,0 +1,2 @@ +codegen: + @(cd internal; buf generate) diff --git a/client/v2/autocli/builder.go b/client/v2/autocli/builder.go new file mode 100644 index 00000000000..daa63ff1a08 --- /dev/null +++ b/client/v2/autocli/builder.go @@ -0,0 +1,19 @@ +package autocli + +import ( + "context" + + "google.golang.org/grpc" + + "cosmossdk.io/client/v2/autocli/flag" +) + +// Builder manages options for building CLI commands. +type Builder struct { + // flag.Builder embeds the flag builder and its options. + flag.Builder + + // GetClientConn specifies how CLI commands will resolve a grpc.ClientConnInterface + // from a given context. + GetClientConn func(context.Context) grpc.ClientConnInterface +} diff --git a/client/v2/autocli/cmd.go b/client/v2/autocli/cmd.go new file mode 100644 index 00000000000..3256aeb8971 --- /dev/null +++ b/client/v2/autocli/cmd.go @@ -0,0 +1,60 @@ +package autocli + +import ( + "errors" + "fmt" + "strings" + + "github.com/spf13/cobra" +) + +// NOTE: this was copied from client/cmd.go to avoid introducing a dependency +// on the v1 client package. + +// validateCmd returns unknown command error or Help display if help flag set +func validateCmd(cmd *cobra.Command, args []string) error { + var unknownCmd string + var skipNext bool + + for _, arg := range args { + // search for help flag + if arg == "--help" || arg == "-h" { + return cmd.Help() + } + + // check if the current arg is a flag + switch { + case len(arg) > 0 && (arg[0] == '-'): + // the next arg should be skipped if the current arg is a + // flag and does not use "=" to assign the flag's value + if !strings.Contains(arg, "=") { + skipNext = true + } else { + skipNext = false + } + case skipNext: + // skip current arg + skipNext = false + case unknownCmd == "": + // unknown command found + // continue searching for help flag + unknownCmd = arg + } + } + + // return the help screen if no unknown command is found + if unknownCmd != "" { + err := fmt.Sprintf("unknown command \"%s\" for \"%s\"", unknownCmd, cmd.CalledAs()) + + // build suggestions for unknown argument + if suggestions := cmd.SuggestionsFor(unknownCmd); len(suggestions) > 0 { + err += "\n\nDid you mean this?\n" + for _, s := range suggestions { + err += fmt.Sprintf("\t%v\n", s) + } + } + return errors.New(err) + } + + return cmd.Help() +} diff --git a/client/v2/autocli/flag/address.go b/client/v2/autocli/flag/address.go new file mode 100644 index 00000000000..163fbfc9ae3 --- /dev/null +++ b/client/v2/autocli/flag/address.go @@ -0,0 +1,39 @@ +package flag + +import ( + "context" + + "google.golang.org/protobuf/reflect/protoreflect" +) + +type addressStringType struct{} + +func (a addressStringType) NewValue(_ context.Context, _ *Builder) Value { + return &addressValue{} +} + +func (a addressStringType) DefaultValue() string { + return "" +} + +type addressValue struct { + value string +} + +func (a addressValue) Get(protoreflect.Value) (protoreflect.Value, error) { + return protoreflect.ValueOfString(a.value), nil +} + +func (a addressValue) String() string { + return a.value +} + +func (a *addressValue) Set(s string) error { + a.value = s + // TODO handle bech32 validation + return nil +} + +func (a addressValue) Type() string { + return "bech32 account address key name" +} diff --git a/client/v2/autocli/flag/builder.go b/client/v2/autocli/flag/builder.go new file mode 100644 index 00000000000..2969314e84d --- /dev/null +++ b/client/v2/autocli/flag/builder.go @@ -0,0 +1,47 @@ +package flag + +import ( + "google.golang.org/protobuf/reflect/protodesc" + "google.golang.org/protobuf/reflect/protoreflect" + "google.golang.org/protobuf/reflect/protoregistry" +) + +// Builder manages options for building pflag flags for protobuf messages. +type Builder struct { + // TypeResolver specifies how protobuf types will be resolved. If it is + // nil protoregistry.GlobalTypes will be used. + TypeResolver interface { + protoregistry.MessageTypeResolver + protoregistry.ExtensionTypeResolver + } + + // FileResolver specifies how protobuf file descriptors will be resolved. If it is + // nil protoregistry.GlobalFiles will be used. + FileResolver protodesc.Resolver + + messageFlagTypes map[protoreflect.FullName]Type + scalarFlagTypes map[string]Type +} + +func (b *Builder) init() { + if b.messageFlagTypes == nil { + b.messageFlagTypes = map[protoreflect.FullName]Type{} + b.messageFlagTypes["google.protobuf.Timestamp"] = timestampType{} + b.messageFlagTypes["google.protobuf.Duration"] = durationType{} + } + + if b.scalarFlagTypes == nil { + b.scalarFlagTypes = map[string]Type{} + b.scalarFlagTypes["cosmos.AddressString"] = addressStringType{} + } +} + +func (b *Builder) DefineMessageFlagType(messageName protoreflect.FullName, flagType Type) { + b.init() + b.messageFlagTypes[messageName] = flagType +} + +func (b *Builder) DefineScalarFlagType(scalarName string, flagType Type) { + b.init() + b.scalarFlagTypes[scalarName] = flagType +} diff --git a/client/v2/autocli/flag/doc.go b/client/v2/autocli/flag/doc.go new file mode 100644 index 00000000000..5e8a1f365d3 --- /dev/null +++ b/client/v2/autocli/flag/doc.go @@ -0,0 +1,4 @@ +// Package flag defines functionality for automatically managing command +// line flags as well positional arguments that are based on protobuf message +// fields. +package flag diff --git a/client/v2/autocli/flag/duration.go b/client/v2/autocli/flag/duration.go new file mode 100644 index 00000000000..5e02c00d29e --- /dev/null +++ b/client/v2/autocli/flag/duration.go @@ -0,0 +1,51 @@ +package flag + +import ( + "context" + "time" + + "google.golang.org/protobuf/reflect/protoreflect" + "google.golang.org/protobuf/types/known/durationpb" +) + +type durationType struct{} + +func (t durationType) NewValue(context.Context, *Builder) Value { + return &durationValue{} +} + +func (t durationType) DefaultValue() string { + return "" +} + +type durationValue struct { + value *durationpb.Duration +} + +func (a durationValue) Get(protoreflect.Value) (protoreflect.Value, error) { + if a.value == nil { + return protoreflect.Value{}, nil + } + return protoreflect.ValueOfMessage(a.value.ProtoReflect()), nil +} + +func (v durationValue) String() string { + if v.value == nil { + return "" + } + return v.value.AsDuration().String() +} + +func (v *durationValue) Set(s string) error { + dur, err := time.ParseDuration(s) + if err != nil { + return err + } + + v.value = durationpb.New(dur) + return nil +} + +func (v durationValue) Type() string { + return "duration" +} diff --git a/client/v2/autocli/flag/enum.go b/client/v2/autocli/flag/enum.go new file mode 100644 index 00000000000..79e1cba53a4 --- /dev/null +++ b/client/v2/autocli/flag/enum.go @@ -0,0 +1,73 @@ +package flag + +import ( + "context" + "fmt" + "strings" + + "github.com/iancoleman/strcase" + "google.golang.org/protobuf/reflect/protoreflect" +) + +type enumType struct { + enum protoreflect.EnumDescriptor +} + +func (b enumType) NewValue(context.Context, *Builder) Value { + val := &enumValue{ + enum: b.enum, + valMap: map[string]protoreflect.EnumValueDescriptor{}, + } + n := b.enum.Values().Len() + for i := 0; i < n; i++ { + valDesc := b.enum.Values().Get(i) + val.valMap[enumValueName(b.enum, valDesc)] = valDesc + } + return val +} + +func (b enumType) DefaultValue() string { + defValue := "" + if def := b.enum.Values().ByNumber(0); def != nil { + defValue = enumValueName(b.enum, def) + } + return defValue +} + +type enumValue struct { + enum protoreflect.EnumDescriptor + value protoreflect.EnumNumber + valMap map[string]protoreflect.EnumValueDescriptor +} + +func (e enumValue) Get(protoreflect.Value) (protoreflect.Value, error) { + return protoreflect.ValueOfEnum(e.value), nil +} + +func enumValueName(enum protoreflect.EnumDescriptor, enumValue protoreflect.EnumValueDescriptor) string { + name := string(enumValue.Name()) + name = strings.TrimPrefix(name, strcase.ToScreamingSnake(string(enum.Name()))+"_") + return strcase.ToKebab(name) +} + +func (e enumValue) String() string { + return enumValueName(e.enum, e.enum.Values().ByNumber(e.value)) +} + +func (e *enumValue) Set(s string) error { + valDesc, ok := e.valMap[s] + if !ok { + return fmt.Errorf("%s is not a valid value for enum %s", s, e.enum.FullName()) + } + e.value = valDesc.Number() + return nil +} + +func (e enumValue) Type() string { + var vals []string + n := e.enum.Values().Len() + for i := 0; i < n; i++ { + vals = append(vals, enumValueName(e.enum, e.enum.Values().Get(i))) + } + return fmt.Sprintf("%s (%s)", e.enum.Name(), strings.Join(vals, " | ")) +} diff --git a/client/v2/autocli/flag/field.go b/client/v2/autocli/flag/field.go new file mode 100644 index 00000000000..b2c385ac95d --- /dev/null +++ b/client/v2/autocli/flag/field.go @@ -0,0 +1,115 @@ +package flag + +import ( + "context" + + autocliv1 "cosmossdk.io/api/cosmos/autocli/v1" + cosmos_proto "github.com/cosmos/cosmos-proto" + "github.com/spf13/pflag" + "google.golang.org/protobuf/proto" + "google.golang.org/protobuf/reflect/protoreflect" + + "cosmossdk.io/client/v2/internal/util" +) + +// namingOptions specifies internal naming options for flags. +type namingOptions struct { + // Prefix is a prefix to prepend to all flags. + Prefix string +} + +// addFieldFlag adds a flag for the provided field to the flag set. +func (b *Builder) addFieldFlag(ctx context.Context, flagSet *pflag.FlagSet, field protoreflect.FieldDescriptor, opts *autocliv1.FlagOptions, options namingOptions) (name string, hasValue HasValue, err error) { + if opts == nil { + opts = &autocliv1.FlagOptions{} + } + + if field.Kind() == protoreflect.MessageKind && field.Message().FullName() == "cosmos.base.query.v1beta1.PageRequest" { + hasValue, err := b.bindPageRequest(ctx, flagSet, field) + return "", hasValue, err + } + + name = opts.Name + if name == "" { + name = options.Prefix + util.DescriptorKebabName(field) + } + + usage := opts.Usage + if usage == "" { + usage = util.DescriptorDocs(field) + } + + shorthand := opts.Shorthand + defaultValue := opts.DefaultValue + + if typ := b.resolveFlagType(field); typ != nil { + if defaultValue == "" { + defaultValue = typ.DefaultValue() + } + + val := typ.NewValue(ctx, b) + flagSet.AddFlag(&pflag.Flag{ + Name: name, + Shorthand: shorthand, + Usage: usage, + DefValue: defaultValue, + Value: val, + }) + return name, val, nil + } + + // use the built-in pflag StringP, Int32P, etc. functions + var val HasValue + if field.IsList() { + val = bindSimpleListFlag(flagSet, field.Kind(), name, shorthand, usage) + } else { + val = bindSimpleFlag(flagSet, field.Kind(), name, shorthand, usage) + } + + // This is a bit of hacking around the pflag API, but the + // defaultValue is set in this way because this is much easier than trying + // to parse the string into the types that StringSliceP, Int32P, etc. expect + if defaultValue != "" { + err = flagSet.Set(name, defaultValue) + } + return name, val, err +} + +func (b *Builder) resolveFlagType(field protoreflect.FieldDescriptor) Type { + typ := b.resolveFlagTypeBasic(field) + if field.IsList() { + if typ != nil { + return compositeListType{simpleType: typ} + } + + return nil + } + + return typ +} + +func (b *Builder) resolveFlagTypeBasic(field protoreflect.FieldDescriptor) Type { + scalar := proto.GetExtension(field.Options(), cosmos_proto.E_Scalar) + if scalar != nil { + b.init() + if typ, ok := b.scalarFlagTypes[scalar.(string)]; ok { + return typ + } + } + + switch field.Kind() { + case protoreflect.EnumKind: + return enumType{enum: field.Enum()} + case protoreflect.MessageKind: + b.init() + if flagType, ok := b.messageFlagTypes[field.Message().FullName()]; ok { + return flagType + } + + return jsonMessageFlagType{ + messageDesc: field.Message(), + } + default: + return nil + } +} diff --git a/client/v2/autocli/flag/list.go b/client/v2/autocli/flag/list.go new file mode 100644 index 00000000000..72f84c8be3e --- /dev/null +++ b/client/v2/autocli/flag/list.go @@ -0,0 +1,107 @@ +package flag + +import ( + "context" + "fmt" + + "github.com/spf13/pflag" + "google.golang.org/protobuf/reflect/protoreflect" +) + +func bindSimpleListFlag(flagSet *pflag.FlagSet, kind protoreflect.Kind, name, shorthand, usage string) HasValue { + switch kind { + case protoreflect.StringKind: + val := flagSet.StringSliceP(name, shorthand, nil, usage) + return newListValue(val, protoreflect.ValueOfString) + case protoreflect.Uint32Kind, protoreflect.Fixed32Kind, + protoreflect.Uint64Kind, protoreflect.Fixed64Kind: + val := flagSet.UintSliceP(name, shorthand, nil, usage) + return newListValue(val, func(x uint) protoreflect.Value { return protoreflect.ValueOfUint64(uint64(x)) }) + case protoreflect.Int32Kind, protoreflect.Sint32Kind, protoreflect.Sfixed32Kind: + val := flagSet.Int32SliceP(name, shorthand, nil, usage) + return newListValue(val, protoreflect.ValueOfInt32) + case protoreflect.Int64Kind, protoreflect.Sint64Kind, protoreflect.Sfixed64Kind: + val := flagSet.Int64SliceP(name, shorthand, nil, usage) + return newListValue(val, protoreflect.ValueOfInt64) + case protoreflect.BoolKind: + val := flagSet.BoolSliceP(name, shorthand, nil, usage) + return newListValue(val, protoreflect.ValueOfBool) + default: + return nil + } +} + +type listValue[T any] struct { + array *[]T + toProtoreflectValue func(T) protoreflect.Value +} + +func newListValue[T any](array *[]T, toProtoreflectValue func(T) protoreflect.Value) listValue[T] { + return listValue[T]{array: array, toProtoreflectValue: toProtoreflectValue} +} + +func (v listValue[T]) Get(mutable protoreflect.Value) (protoreflect.Value, error) { + list := mutable.List() + for _, x := range *v.array { + list.Append(v.toProtoreflectValue(x)) + } + return mutable, nil +} + +type compositeListType struct { + simpleType Type +} + +func (t compositeListType) NewValue(ctx context.Context, opts *Builder) Value { + return &compositeListValue{ + simpleType: t.simpleType, + values: nil, + ctx: ctx, + opts: opts, + } +} + +func (t compositeListType) DefaultValue() string { + return "" +} + +type compositeListValue struct { + simpleType Type + values []protoreflect.Value + ctx context.Context + opts *Builder +} + +func (c *compositeListValue) Get(mutable protoreflect.Value) (protoreflect.Value, error) { + list := mutable.List() + for _, value := range c.values { + list.Append(value) + } + return mutable, nil +} + +func (c *compositeListValue) String() string { + if len(c.values) == 0 { + return "" + } + + return fmt.Sprintf("%+v", c.values) +} + +func (c *compositeListValue) Set(val string) error { + simpleVal := c.simpleType.NewValue(c.ctx, c.opts) + err := simpleVal.Set(val) + if err != nil { + return err + } + v, err := simpleVal.Get(protoreflect.Value{}) + if err != nil { + return err + } + c.values = append(c.values, v) + return nil +} + +func (c *compositeListValue) Type() string { + return fmt.Sprintf("%s (repeated)", c.simpleType.NewValue(c.ctx, c.opts).Type()) +} diff --git a/client/v2/autocli/flag/message.go b/client/v2/autocli/flag/message.go new file mode 100644 index 00000000000..6d07e3564a0 --- /dev/null +++ b/client/v2/autocli/flag/message.go @@ -0,0 +1,99 @@ +package flag + +import ( + "fmt" + + "github.com/spf13/cobra" + "github.com/spf13/pflag" + "google.golang.org/protobuf/reflect/protoreflect" +) + +// MessageBinder binds multiple flags in a flag set to a protobuf message. +type MessageBinder struct { + CobraArgs cobra.PositionalArgs + + positionalFlagSet *pflag.FlagSet + positionalArgs []fieldBinding + hasVarargs bool + + flagBindings []fieldBinding + messageType protoreflect.MessageType +} + +// BuildMessage builds and returns a new message for the bound flags. +func (m MessageBinder) BuildMessage(positionalArgs []string) (protoreflect.Message, error) { + msg := m.messageType.New() + err := m.Bind(msg, positionalArgs) + return msg, err +} + +// Bind binds the flag values to an existing protobuf message. +func (m MessageBinder) Bind(msg protoreflect.Message, positionalArgs []string) error { + // first set positional args in the positional arg flag set + n := len(positionalArgs) + for i := range m.positionalArgs { + if i >= n { + panic("unexpected: validate args should have caught this") + } + + name := fmt.Sprintf("%d", i) + if i == n-1 && m.hasVarargs { + for _, v := range positionalArgs[i:] { + err := m.positionalFlagSet.Set(name, v) + if err != nil { + return err + } + } + } else { + err := m.positionalFlagSet.Set(name, positionalArgs[i]) + if err != nil { + return err + } + } + } + + // bind positional arg values to the message + for _, arg := range m.positionalArgs { + err := arg.bind(msg) + if err != nil { + return err + } + } + + // bind flag values to the message + for _, binding := range m.flagBindings { + err := binding.bind(msg) + if err != nil { + return err + } + } + + return nil +} + +// Get calls BuildMessage and wraps the result in a protoreflect.Value. +func (m MessageBinder) Get(protoreflect.Value) (protoreflect.Value, error) { + msg, err := m.BuildMessage(nil) + return protoreflect.ValueOfMessage(msg), err +} + +type fieldBinding struct { + hasValue HasValue + field protoreflect.FieldDescriptor +} + +func (f fieldBinding) bind(msg protoreflect.Message) error { + field := f.field + val, err := f.hasValue.Get(msg.NewField(field)) + if err != nil { + return err + } + kind := f.field.Kind() + if !(field.IsList() || + field.IsMap() || + kind == protoreflect.MessageKind || + kind == protoreflect.GroupKind) { + msg.Set(f.field, val) + } + return nil +} diff --git a/client/v2/autocli/flag/message_json.go b/client/v2/autocli/flag/message_json.go new file mode 100644 index 00000000000..69b0d69fea4 --- /dev/null +++ b/client/v2/autocli/flag/message_json.go @@ -0,0 +1,63 @@ +package flag + +import ( + "context" + "fmt" + + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/proto" + "google.golang.org/protobuf/reflect/protoreflect" + + "cosmossdk.io/client/v2/internal/util" +) + +type jsonMessageFlagType struct { + messageDesc protoreflect.MessageDescriptor +} + +func (j jsonMessageFlagType) NewValue(_ context.Context, builder *Builder) Value { + return &jsonMessageFlagValue{ + messageType: util.ResolveMessageType(builder.TypeResolver, j.messageDesc), + jsonMarshalOptions: protojson.MarshalOptions{Resolver: builder.TypeResolver}, + jsonUnmarshalOptions: protojson.UnmarshalOptions{Resolver: builder.TypeResolver}, + } +} + +func (j jsonMessageFlagType) DefaultValue() string { + return "" +} + +type jsonMessageFlagValue struct { + jsonMarshalOptions protojson.MarshalOptions + jsonUnmarshalOptions protojson.UnmarshalOptions + messageType protoreflect.MessageType + message proto.Message +} + +func (j *jsonMessageFlagValue) Get(protoreflect.Value) (protoreflect.Value, error) { + if j.message == nil { + return protoreflect.Value{}, nil + } + return protoreflect.ValueOfMessage(j.message.ProtoReflect()), nil +} + +func (j *jsonMessageFlagValue) String() string { + if j.message == nil { + return "" + } + + bz, err := j.jsonMarshalOptions.Marshal(j.message) + if err != nil { + return err.Error() + } + return string(bz) +} + +func (j *jsonMessageFlagValue) Set(s string) error { + j.message = j.messageType.New().Interface() + return j.jsonUnmarshalOptions.Unmarshal([]byte(s), j.message) +} + +func (j *jsonMessageFlagValue) Type() string { + return fmt.Sprintf("%s (json)", j.messageType.Descriptor().FullName()) +} diff --git a/client/v2/autocli/flag/pagination.go b/client/v2/autocli/flag/pagination.go new file mode 100644 index 00000000000..31d5316251c --- /dev/null +++ b/client/v2/autocli/flag/pagination.go @@ -0,0 +1,21 @@ +package flag + +import ( + "context" + + autocliv1 "cosmossdk.io/api/cosmos/autocli/v1" + "github.com/spf13/pflag" + "google.golang.org/protobuf/reflect/protoreflect" + + "cosmossdk.io/client/v2/internal/util" +) + +func (b *Builder) bindPageRequest(ctx context.Context, flagSet *pflag.FlagSet, field protoreflect.FieldDescriptor) (HasValue, error) { + return b.addMessageFlags( + ctx, + flagSet, + util.ResolveMessageType(b.TypeResolver, field.Message()), + &autocliv1.RpcCommandOptions{}, + namingOptions{Prefix: "page-"}, + ) +} diff --git a/client/v2/autocli/flag/register.go b/client/v2/autocli/flag/register.go new file mode 100644 index 00000000000..cc18df69b6e --- /dev/null +++ b/client/v2/autocli/flag/register.go @@ -0,0 +1,112 @@ +package flag + +import ( + "context" + "fmt" + + autocliv1 "cosmossdk.io/api/cosmos/autocli/v1" + "github.com/spf13/cobra" + "github.com/spf13/pflag" + "google.golang.org/protobuf/reflect/protoreflect" +) + +func (b *Builder) AddMessageFlags(ctx context.Context, flagSet *pflag.FlagSet, messageType protoreflect.MessageType, commandOptions *autocliv1.RpcCommandOptions) (*MessageBinder, error) { + return b.addMessageFlags(ctx, flagSet, messageType, commandOptions, namingOptions{}) +} + +// AddMessageFlags adds flags for each field in the message to the flag set. +func (b *Builder) addMessageFlags(ctx context.Context, flagSet *pflag.FlagSet, messageType protoreflect.MessageType, commandOptions *autocliv1.RpcCommandOptions, options namingOptions) (*MessageBinder, error) { + fields := messageType.Descriptor().Fields() + numFields := fields.Len() + handler := &MessageBinder{ + messageType: messageType, + } + + isPositional := map[string]bool{} + hasVarargs := false + n := len(commandOptions.PositionalArgs) + // positional args are also parsed using a FlagSet so that we can reuse all the same parsers + handler.positionalFlagSet = pflag.NewFlagSet("positional", pflag.ContinueOnError) + for i, arg := range commandOptions.PositionalArgs { + isPositional[arg.ProtoField] = true + + field := fields.ByName(protoreflect.Name(arg.ProtoField)) + if field == nil { + return nil, fmt.Errorf("can't find field %s on %s", arg.ProtoField, messageType.Descriptor().FullName()) + } + + if arg.Varargs { + if i != n-1 { + return nil, fmt.Errorf("varargs positional argument %s must be the last argument", arg.ProtoField) + } + + hasVarargs = true + } + + _, hasValue, err := b.addFieldFlag( + ctx, + handler.positionalFlagSet, + field, + &autocliv1.FlagOptions{Name: fmt.Sprintf("%d", i)}, + namingOptions{}, + ) + if err != nil { + return nil, err + } + + handler.positionalArgs = append(handler.positionalArgs, fieldBinding{ + field: field, + hasValue: hasValue, + }) + } + + if hasVarargs { + handler.CobraArgs = cobra.MinimumNArgs(n) + handler.hasVarargs = true + } else { + handler.CobraArgs = cobra.ExactArgs(n) + } + + // validate flag options + for name := range commandOptions.FlagOptions { + if fields.ByName(protoreflect.Name(name)) == nil { + return nil, fmt.Errorf("can't find field %s on %s specified as a flag", name, messageType.Descriptor().FullName()) + } + } + + flagOptsByFlagName := map[string]*autocliv1.FlagOptions{} + for i := 0; i < numFields; i++ { + field := fields.Get(i) + if isPositional[string(field.Name())] { + continue + } + + flagOpts := commandOptions.FlagOptions[string(field.Name())] + name, hasValue, err := b.addFieldFlag(ctx, flagSet, field, flagOpts, options) + flagOptsByFlagName[name] = flagOpts + if err != nil { + return nil, err + } + + handler.flagBindings = append(handler.flagBindings, fieldBinding{ + hasValue: hasValue, + field: field, + }) + } + + flagSet.VisitAll(func(flag *pflag.Flag) { + opts := flagOptsByFlagName[flag.Name] + if opts != nil { + // This is a bit of hacking around the pflag API, but + // we need to set these options here using Flag.VisitAll because the flag + // constructors that pflag gives us (StringP, Int32P, etc.) do not + // actually return the *Flag instance + flag.Deprecated = opts.Deprecated + flag.ShorthandDeprecated = opts.ShorthandDeprecated + flag.Hidden = opts.Hidden + flag.NoOptDefVal = opts.NoOptDefaultValue + } + }) + + return handler, nil +} diff --git a/client/v2/autocli/flag/simple.go b/client/v2/autocli/flag/simple.go new file mode 100644 index 00000000000..d4ed6d4464e --- /dev/null +++ b/client/v2/autocli/flag/simple.go @@ -0,0 +1,47 @@ +package flag + +import ( + "github.com/spf13/pflag" + "google.golang.org/protobuf/reflect/protoreflect" +) + +func bindSimpleFlag(flagSet *pflag.FlagSet, kind protoreflect.Kind, name, shorthand, usage string) HasValue { + switch kind { + case protoreflect.BytesKind: + val := flagSet.BytesBase64P(name, shorthand, nil, usage) + return newSimpleValue(val, protoreflect.ValueOfBytes) + case protoreflect.StringKind: + val := flagSet.StringP(name, shorthand, "", usage) + return newSimpleValue(val, protoreflect.ValueOfString) + case protoreflect.Uint32Kind, protoreflect.Fixed32Kind: + val := flagSet.Uint32P(name, shorthand, 0, usage) + return newSimpleValue(val, protoreflect.ValueOfUint32) + case protoreflect.Uint64Kind, protoreflect.Fixed64Kind: + val := flagSet.Uint64P(name, shorthand, 0, usage) + return newSimpleValue(val, protoreflect.ValueOfUint64) + case protoreflect.Int32Kind, protoreflect.Sint32Kind, protoreflect.Sfixed32Kind: + val := flagSet.Int32P(name, shorthand, 0, usage) + return newSimpleValue(val, protoreflect.ValueOfInt32) + case protoreflect.Int64Kind, protoreflect.Sint64Kind, protoreflect.Sfixed64Kind: + val := flagSet.Int64P(name, shorthand, 0, usage) + return newSimpleValue(val, protoreflect.ValueOfInt64) + case protoreflect.BoolKind: + val := flagSet.BoolP(name, shorthand, false, usage) + return newSimpleValue(val, protoreflect.ValueOfBool) + default: + return nil + } +} + +type simpleValue[T any] struct { + val *T + toProtoreflectValue func(T) protoreflect.Value +} + +func newSimpleValue[T any](val *T, toProtoreflectValue func(T) protoreflect.Value) HasValue { + return simpleValue[T]{val: val, toProtoreflectValue: toProtoreflectValue} +} + +func (v simpleValue[T]) Get(protoreflect.Value) (protoreflect.Value, error) { + return v.toProtoreflectValue(*v.val), nil +} diff --git a/client/v2/autocli/flag/timestamp.go b/client/v2/autocli/flag/timestamp.go new file mode 100644 index 00000000000..799dab4f32b --- /dev/null +++ b/client/v2/autocli/flag/timestamp.go @@ -0,0 +1,50 @@ +package flag + +import ( + "context" + "time" + + "google.golang.org/protobuf/reflect/protoreflect" + "google.golang.org/protobuf/types/known/timestamppb" +) + +type timestampType struct{} + +func (t timestampType) NewValue(context.Context, *Builder) Value { + return ×tampValue{} +} + +func (t timestampType) DefaultValue() string { + return "" +} + +type timestampValue struct { + value *timestamppb.Timestamp +} + +func (t timestampValue) Get(protoreflect.Value) (protoreflect.Value, error) { + if t.value == nil { + return protoreflect.Value{}, nil + } + return protoreflect.ValueOfMessage(t.value.ProtoReflect()), nil +} + +func (v timestampValue) String() string { + if v.value == nil { + return "" + } + return v.value.AsTime().Format(time.RFC3339) +} + +func (v *timestampValue) Set(s string) error { + t, err := time.Parse(time.RFC3339, s) + if err != nil { + return err + } + v.value = timestamppb.New(t) + return nil +} + +func (v timestampValue) Type() string { + return "timestamp (RFC 3339)" +} diff --git a/client/v2/autocli/flag/type.go b/client/v2/autocli/flag/type.go new file mode 100644 index 00000000000..a0e79b553d9 --- /dev/null +++ b/client/v2/autocli/flag/type.go @@ -0,0 +1,15 @@ +package flag + +import ( + "context" +) + +// Type specifies a custom flag type. +type Type interface { + // NewValue returns a new pflag.Value which must also implement either + // SimpleValue or ListValue. + NewValue(context.Context, *Builder) Value + + // DefaultValue is the default value for this type. + DefaultValue() string +} diff --git a/client/v2/autocli/flag/value.go b/client/v2/autocli/flag/value.go new file mode 100644 index 00000000000..e42c524d785 --- /dev/null +++ b/client/v2/autocli/flag/value.go @@ -0,0 +1,21 @@ +package flag + +import ( + "github.com/spf13/pflag" + "google.golang.org/protobuf/reflect/protoreflect" +) + +// Value represents a single pflag.Value value. +type Value interface { + pflag.Value + HasValue +} + +// HasValue wraps a reference to a protobuf value. +type HasValue interface { + // Get gets the value of the protobuf value reference and returns that value + // or an error. For composite protoreflect.Value types such as messages, + // lists and maps, a mutable reference to the value of field obtained with + // protoreflect.Message.NewField should be passed as the newFieldValue parameter. + Get(newFieldValue protoreflect.Value) (protoreflect.Value, error) +} diff --git a/client/v2/autocli/interface.go b/client/v2/autocli/interface.go new file mode 100644 index 00000000000..edcb5226094 --- /dev/null +++ b/client/v2/autocli/interface.go @@ -0,0 +1,32 @@ +package autocli + +import ( + autocliv1 "cosmossdk.io/api/cosmos/autocli/v1" + "github.com/spf13/cobra" + + "cosmossdk.io/core/appmodule" +) + +// HasAutoCLIConfig is an AppModule extension interface for declaring autocli module options. +type HasAutoCLIConfig interface { + appmodule.AppModule + + // AutoCLIOptions are the autocli module options for this module. + AutoCLIOptions() *autocliv1.ModuleOptions +} + +// HasCustomQueryCommand is an AppModule extension interface for declaring a custom query command. +type HasCustomQueryCommand interface { + appmodule.AppModule + + // GetQueryCmd returns a custom cobra query command for this module. + GetQueryCmd() *cobra.Command +} + +// HasCustomTxCommand is an AppModule extension interface for declaring a custom tx command. +type HasCustomTxCommand interface { + appmodule.AppModule + + // GetTxCmd returns a custom cobra tx command for this module. + GetTxCmd() *cobra.Command +} diff --git a/client/v2/autocli/query.go b/client/v2/autocli/query.go new file mode 100644 index 00000000000..9f748e4df9f --- /dev/null +++ b/client/v2/autocli/query.go @@ -0,0 +1,203 @@ +package autocli + +import ( + "fmt" + + autocliv1 "cosmossdk.io/api/cosmos/autocli/v1" + "github.com/iancoleman/strcase" + "github.com/spf13/cobra" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/reflect/protoreflect" + "google.golang.org/protobuf/reflect/protoregistry" + + "cosmossdk.io/client/v2/internal/util" +) + +// BuildQueryCommand builds the query commands for all the provided modules. If a custom command is provided for a +// module, this is used instead of any automatically generated CLI commands. This allows apps to a fully dynamic client +// with a more customized experience if a binary with custom commands is downloaded. +func (b *Builder) BuildQueryCommand(moduleOptions map[string]*autocliv1.ModuleOptions, customCmds map[string]*cobra.Command) (*cobra.Command, error) { + queryCmd := topLevelCmd("query", "Querying subcommands") + queryCmd.Aliases = []string{"q"} + for moduleName, modOpts := range moduleOptions { + if customCmds[moduleName] != nil { + // custom commands get added lower down + continue + } + + queryCmdDesc := modOpts.Query + if queryCmdDesc != nil { + cmd, err := b.BuildModuleQueryCommand(moduleName, queryCmdDesc) + if err != nil { + return nil, err + } + + queryCmd.AddCommand(cmd) + } + } + + for _, cmd := range customCmds { + queryCmd.AddCommand(cmd) + } + + return queryCmd, nil +} + +// BuildModuleQueryCommand builds the query command for a single module. +func (b *Builder) BuildModuleQueryCommand(moduleName string, cmdDescriptor *autocliv1.ServiceCommandDescriptor) (*cobra.Command, error) { + cmd := topLevelCmd(moduleName, fmt.Sprintf("Querying commands for the %s module", moduleName)) + + err := b.AddQueryServiceCommands(cmd, cmdDescriptor) + + return cmd, err +} + +// AddQueryServiceCommands adds a sub-command to the provided command for each +// method in the specified service and returns the command. This can be used in +// order to add auto-generated commands to an existing command. +func (b *Builder) AddQueryServiceCommands(cmd *cobra.Command, cmdDescriptor *autocliv1.ServiceCommandDescriptor) error { + resolver := b.FileResolver + if resolver == nil { + resolver = protoregistry.GlobalFiles + } + descriptor, err := resolver.FindDescriptorByName(protoreflect.FullName(cmdDescriptor.Service)) + if err != nil { + return fmt.Errorf("can't find service %s: %v", cmdDescriptor.Service, err) + } + + service := descriptor.(protoreflect.ServiceDescriptor) + methods := service.Methods() + + rpcOptMap := map[protoreflect.Name]*autocliv1.RpcCommandOptions{} + for _, option := range cmdDescriptor.RpcCommandOptions { + name := protoreflect.Name(option.RpcMethod) + rpcOptMap[name] = option + // make sure method exists + if m := methods.ByName(name); m == nil { + return fmt.Errorf("rpc method %s not found for service %s", name, service.FullName()) + } + } + + n := methods.Len() + for i := 0; i < n; i++ { + methodDescriptor := methods.Get(i) + methodOpts := rpcOptMap[methodDescriptor.Name()] + methodCmd, err := b.BuildQueryMethodCommand(methodDescriptor, methodOpts) + if err != nil { + return err + } + + if methodCmd != nil { + cmd.AddCommand(methodCmd) + } + } + + for cmdName, subCmdDesc := range cmdDescriptor.SubCommands { + subCmd := topLevelCmd(cmdName, fmt.Sprintf("Querying commands for the %s service", subCmdDesc.Service)) + err = b.AddQueryServiceCommands(subCmd, subCmdDesc) + if err != nil { + return err + } + + cmd.AddCommand(subCmd) + } + + return nil +} + +// BuildQueryMethodCommand creates a gRPC query command for the given service method. This can be used to auto-generate +// just a single command for a single service rpc method. +func (b *Builder) BuildQueryMethodCommand(descriptor protoreflect.MethodDescriptor, options *autocliv1.RpcCommandOptions) (*cobra.Command, error) { + if options == nil { + // use the defaults + options = &autocliv1.RpcCommandOptions{} + } + + if options.Skip { + return nil, nil + } + + serviceDescriptor := descriptor.Parent().(protoreflect.ServiceDescriptor) + + long := options.Long + if long == "" { + long = util.DescriptorDocs(descriptor) + } + + getClientConn := b.GetClientConn + methodName := fmt.Sprintf("/%s/%s", serviceDescriptor.FullName(), descriptor.Name()) + + inputDesc := descriptor.Input() + inputType := util.ResolveMessageType(b.TypeResolver, inputDesc) + outputType := util.ResolveMessageType(b.TypeResolver, descriptor.Output()) + + use := options.Use + if use == "" { + use = protoNameToCliName(descriptor.Name()) + } + + cmd := &cobra.Command{ + Use: use, + Long: long, + Short: options.Short, + Example: options.Example, + Aliases: options.Alias, + SuggestFor: options.SuggestFor, + Deprecated: options.Deprecated, + Version: options.Version, + } + + binder, err := b.AddMessageFlags(cmd.Context(), cmd.Flags(), inputType, options) + if err != nil { + return nil, err + } + + cmd.Args = binder.CobraArgs + + jsonMarshalOptions := protojson.MarshalOptions{ + Indent: " ", + UseProtoNames: true, + UseEnumNumbers: false, + EmitUnpopulated: true, + Resolver: b.TypeResolver, + } + + cmd.RunE = func(cmd *cobra.Command, args []string) error { + ctx := cmd.Context() + clientConn := getClientConn(ctx) + input, err := binder.BuildMessage(args) + if err != nil { + return err + } + + output := outputType.New() + err = clientConn.Invoke(ctx, methodName, input.Interface(), output.Interface()) + if err != nil { + return err + } + + bz, err := jsonMarshalOptions.Marshal(output.Interface()) + if err != nil { + return err + } + + _, err = fmt.Fprintln(cmd.OutOrStdout(), string(bz)) + return err + } + + return cmd, nil +} + +func protoNameToCliName(name protoreflect.Name) string { + return strcase.ToKebab(string(name)) +} + +func topLevelCmd(use, short string) *cobra.Command { + return &cobra.Command{ + Use: use, + Short: short, + DisableFlagParsing: false, + SuggestionsMinimumDistance: 2, + RunE: validateCmd, + } +} diff --git a/client/v2/autocli/query_test.go b/client/v2/autocli/query_test.go new file mode 100644 index 00000000000..6eec93707b9 --- /dev/null +++ b/client/v2/autocli/query_test.go @@ -0,0 +1,304 @@ +package autocli + +import ( + "bytes" + "context" + "net" + "strings" + "testing" + + autocliv1 "cosmossdk.io/api/cosmos/autocli/v1" + "github.com/spf13/cobra" + "google.golang.org/grpc" + "google.golang.org/grpc/credentials/insecure" + "google.golang.org/protobuf/testing/protocmp" + "gotest.tools/v3/assert" + "gotest.tools/v3/golden" + + "cosmossdk.io/client/v2/internal/testpb" +) + +var testCmdDesc = &autocliv1.ServiceCommandDescriptor{ + Service: testpb.Query_ServiceDesc.ServiceName, + RpcCommandOptions: []*autocliv1.RpcCommandOptions{ + { + RpcMethod: "Echo", + Use: "echo [pos1] [pos2] [pos3...]", + Version: "1.0", + Alias: []string{"e"}, + SuggestFor: []string{"eco"}, + Example: "echo 1 abc {}", + Short: "echo echos the value provided by the user", + Long: "echo echos the value provided by the user as a proto JSON object with populated with the provided fields and positional arguments", + PositionalArgs: []*autocliv1.PositionalArgDescriptor{ + { + ProtoField: "positional1", + }, + { + ProtoField: "positional2", + }, + { + ProtoField: "positional3_varargs", + Varargs: true, + }, + }, + FlagOptions: map[string]*autocliv1.FlagOptions{ + "u32": { + Name: "uint32", + Shorthand: "u", + Usage: "some random uint32", + }, + "i32": { + Usage: "some random int32", + DefaultValue: "3", + }, + "u64": { + Usage: "some random uint64", + NoOptDefaultValue: "5", + }, + "deprecated_field": { + Deprecated: "don't use this", + }, + "shorthand_deprecated_field": { + Shorthand: "s", + Deprecated: "bad idea", + }, + "hidden_bool": { + Hidden: true, + }, + }, + }, + }, + SubCommands: map[string]*autocliv1.ServiceCommandDescriptor{ + // we test the sub-command functionality using the same service with different options + "deprecatedecho": { + Service: testpb.Query_ServiceDesc.ServiceName, + RpcCommandOptions: []*autocliv1.RpcCommandOptions{ + { + RpcMethod: "Echo", + Deprecated: "don't use this", + }, + }, + }, + "skipecho": { + Service: testpb.Query_ServiceDesc.ServiceName, + RpcCommandOptions: []*autocliv1.RpcCommandOptions{ + { + RpcMethod: "Echo", + Skip: true, + }, + }, + }, + }, +} + +func testExec(t *testing.T, args ...string) *testClientConn { + server := grpc.NewServer() + testpb.RegisterQueryServer(server, &testEchoServer{}) + listener, err := net.Listen("tcp", "127.0.0.1:0") + assert.NilError(t, err) + go func() { + err := server.Serve(listener) + if err != nil { + panic(err) + } + }() + defer server.GracefulStop() + clientConn, err := grpc.Dial(listener.Addr().String(), grpc.WithTransportCredentials(insecure.NewCredentials())) + assert.NilError(t, err) + defer func() { + err := clientConn.Close() + if err != nil { + panic(err) + } + }() + + conn := &testClientConn{ + ClientConn: clientConn, + t: t, + out: &bytes.Buffer{}, + } + b := &Builder{ + GetClientConn: func(ctx context.Context) grpc.ClientConnInterface { + return conn + }, + } + cmd, err := b.BuildModuleQueryCommand("test", testCmdDesc) + assert.NilError(t, err) + cmd.SetArgs(args) + cmd.SetOut(conn.out) + assert.NilError(t, cmd.Execute()) + return conn +} + +func TestEverything(t *testing.T) { + conn := testExec(t, + "echo", + "1", + "abc", + `{"denom":"foo","amount":"1234"}`, + `{"denom":"bar","amount":"4321"}`, + "--a-bool", + "--an-enum", "one", + "--a-message", `{"bar":"abc", "baz":-3}`, + "--duration", "4h3s", + "--uint32", "27", + "--u-64", "3267246890", + "--i-32", "-253", + "--i-64", "-234602347", + "--str", "def", + "--timestamp", "2019-01-02T00:01:02Z", + "--a-coin", `{"denom":"foo","amount":"100000"}`, + "--an-address", "cosmossdghdsfoi2134sdgh", + "--bz", "c2RncXdlZndkZ3NkZw==", + "--page-count-total", + "--page-key", "MTIzNTQ4N3NnaGRhcw==", + "--page-limit", "1000", + "--page-offset", "10", + "--page-reverse", + "--bools", "true", + "--bools", "false,false,true", + "--enums", "one", + "--enums", "five", + "--enums", "two", + "--strings", "abc", + "--strings", "xyz", + "--strings", "xyz,qrs", + "--durations", "3s", + "--durations", "5s", + "--durations", "10h", + "--some-messages", "{}", + "--some-messages", `{"bar":"baz"}`, + "--some-messages", `{"baz":-1}`, + "--uints", "1,2,3", + "--uints", "4", + ) + assert.DeepEqual(t, conn.lastRequest, conn.lastResponse.(*testpb.EchoResponse).Request, protocmp.Transform()) +} + +func TestOptions(t *testing.T) { + conn := testExec(t, + "echo", + "1", "abc", `{"denom":"foo","amount":"1"}`, + "-u", "27", // shorthand + "--u-64", // no opt default value + ) + lastReq := conn.lastRequest.(*testpb.EchoRequest) + assert.Equal(t, uint32(27), lastReq.U32) // shorthand got set + assert.Equal(t, int32(3), lastReq.I32) // default value got set + assert.Equal(t, uint64(5), lastReq.U64) // no opt default value got set +} + +func TestHelp(t *testing.T) { + conn := testExec(t, "-h") + golden.Assert(t, conn.out.String(), "help-toplevel.golden") + + conn = testExec(t, "echo", "-h") + golden.Assert(t, conn.out.String(), "help-echo.golden") + + conn = testExec(t, "deprecatedecho", "echo", "-h") + golden.Assert(t, conn.out.String(), "help-deprecated.golden") + + conn = testExec(t, "skipecho", "-h") + golden.Assert(t, conn.out.String(), "help-skip.golden") +} + +func TestDeprecated(t *testing.T) { + conn := testExec(t, "echo", + "1", "abc", `{}`, + "--deprecated-field", "foo") + assert.Assert(t, strings.Contains(conn.out.String(), "--deprecated-field has been deprecated")) + + conn = testExec(t, "echo", + "1", "abc", `{}`, + "-s", "foo") + assert.Assert(t, strings.Contains(conn.out.String(), "--shorthand-deprecated-field has been deprecated")) +} + +func TestBuildCustomQueryCommand(t *testing.T) { + b := &Builder{} + customCommandCalled := false + cmd, err := b.BuildQueryCommand(map[string]*autocliv1.ModuleOptions{ + "test": { + Query: testCmdDesc, + }, + }, map[string]*cobra.Command{ + "test": {Use: "test", Run: func(cmd *cobra.Command, args []string) { + customCommandCalled = true + }}, + }) + assert.NilError(t, err) + cmd.SetArgs([]string{"test", "query"}) + assert.NilError(t, cmd.Execute()) + assert.Assert(t, customCommandCalled) +} + +func TestNotFoundErrors(t *testing.T) { + b := &Builder{} + + // bad service + _, err := b.BuildModuleQueryCommand("test", &autocliv1.ServiceCommandDescriptor{Service: "foo"}) + assert.ErrorContains(t, err, "can't find service foo") + + // bad method + _, err = b.BuildModuleQueryCommand("test", &autocliv1.ServiceCommandDescriptor{ + Service: testpb.Query_ServiceDesc.ServiceName, + RpcCommandOptions: []*autocliv1.RpcCommandOptions{{RpcMethod: "bar"}}, + }) + assert.ErrorContains(t, err, "rpc method bar not found") + + // bad positional field + _, err = b.BuildModuleQueryCommand("test", &autocliv1.ServiceCommandDescriptor{ + Service: testpb.Query_ServiceDesc.ServiceName, + RpcCommandOptions: []*autocliv1.RpcCommandOptions{ + { + RpcMethod: "Echo", + PositionalArgs: []*autocliv1.PositionalArgDescriptor{ + { + ProtoField: "foo", + }, + }, + }, + }, + }) + assert.ErrorContains(t, err, "can't find field foo") + + // bad flag field + _, err = b.BuildModuleQueryCommand("test", &autocliv1.ServiceCommandDescriptor{ + Service: testpb.Query_ServiceDesc.ServiceName, + RpcCommandOptions: []*autocliv1.RpcCommandOptions{ + { + RpcMethod: "Echo", + FlagOptions: map[string]*autocliv1.FlagOptions{ + "baz": {}, + }, + }, + }, + }) + assert.ErrorContains(t, err, "can't find field baz") +} + +type testClientConn struct { + *grpc.ClientConn + t *testing.T + lastRequest interface{} + lastResponse interface{} + out *bytes.Buffer +} + +func (t *testClientConn) Invoke(ctx context.Context, method string, args interface{}, reply interface{}, opts ...grpc.CallOption) error { + err := t.ClientConn.Invoke(ctx, method, args, reply, opts...) + t.lastRequest = args + t.lastResponse = reply + return err +} + +type testEchoServer struct { + testpb.UnimplementedQueryServer +} + +func (t testEchoServer) Echo(_ context.Context, request *testpb.EchoRequest) (*testpb.EchoResponse, error) { + return &testpb.EchoResponse{Request: request}, nil +} + +var _ testpb.QueryServer = testEchoServer{} diff --git a/client/v2/autocli/testdata/bank_example.yaml b/client/v2/autocli/testdata/bank_example.yaml new file mode 100644 index 00000000000..6fb937482d2 --- /dev/null +++ b/client/v2/autocli/testdata/bank_example.yaml @@ -0,0 +1,28 @@ +tx: + service: cosmos.bank.v1beta1.Msg + rpc_command_options: + - rpc_method: Send + use: send [from_key_or_address] [to_address] [amount...] + positional_args: + - proto_field: from_address + - proto_field: to_address + - proto_field: amount + varargs: true +query: + service: cosmos.bank.v1beta1.Query + rpc_command_options: + - rpc_method: Balance + use: balance [address] [denom] + positional_args: + - proto_field: address + - proto_field: denom + - rpc_method: SupplyOf + # this is a contrived example of how to customize flag options + # we would likely prefer positional args here, but this demonstrates usage + use: supply-of --denom [denom] + flag_options: + # flag_options is a map of proto field names to customization options + denom: + shorthand: d + usage: the denom to query + diff --git a/client/v2/autocli/testdata/help-deprecated.golden b/client/v2/autocli/testdata/help-deprecated.golden new file mode 100644 index 00000000000..110b8812935 --- /dev/null +++ b/client/v2/autocli/testdata/help-deprecated.golden @@ -0,0 +1,36 @@ +Command "echo" is deprecated, don't use this +Usage: + test deprecatedecho echo [flags] + +Flags: + --a-bool + --a-coin cosmos.base.v1beta1.Coin (json) + --a-message testpb.AMessage (json) + --an-address bech32 account address key name + --an-enum Enum (unspecified | one | two | five | neg-three) (default unspecified) + --bools bools (default []) + --bz bytesBase64 + --deprecated-field string + --duration duration + --durations duration (repeated) + --enums Enum (unspecified | one | two | five | neg-three) (repeated) + -h, --help help for echo + --hidden-bool + --i-32 int32 + --i-64 int + --page-count-total + --page-key bytesBase64 + --page-limit uint + --page-offset uint + --page-reverse + --positional-1 int32 + --positional-2 string + --positional-3-varargs cosmos.base.v1beta1.Coin (json) (repeated) + --shorthand-deprecated-field string + --some-messages testpb.AMessage (json) (repeated) + --str string + --strings strings + --timestamp timestamp (RFC 3339) + --u-32 uint32 + --u-64 uint + --uints uints (default []) diff --git a/client/v2/autocli/testdata/help-echo.golden b/client/v2/autocli/testdata/help-echo.golden new file mode 100644 index 00000000000..a1295533469 --- /dev/null +++ b/client/v2/autocli/testdata/help-echo.golden @@ -0,0 +1,40 @@ +echo echos the value provided by the user as a proto JSON object with populated with the provided fields and positional arguments + +Usage: + test echo [pos1] [pos2] [pos3...] [flags] + +Aliases: + echo, e + +Examples: +echo 1 abc {} + +Flags: + --a-bool + --a-coin cosmos.base.v1beta1.Coin (json) + --a-message testpb.AMessage (json) + --an-address bech32 account address key name + --an-enum Enum (unspecified | one | two | five | neg-three) (default unspecified) + --bools bools (default []) + --bz bytesBase64 + --deprecated-field string (DEPRECATED: don't use this) + --duration duration + --durations duration (repeated) + --enums Enum (unspecified | one | two | five | neg-three) (repeated) + -h, --help help for echo + --i-32 int32 some random int32 + --i-64 int + --page-count-total + --page-key bytesBase64 + --page-limit uint + --page-offset uint + --page-reverse + -s, --shorthand-deprecated-field string (DEPRECATED: bad idea) + --some-messages testpb.AMessage (json) (repeated) + --str string + --strings strings + --timestamp timestamp (RFC 3339) + --u-64 uint[=5] some random uint64 + -u, --uint32 uint32 some random uint32 + --uints uints (default []) + -v, --version version for echo diff --git a/client/v2/autocli/testdata/help-skip.golden b/client/v2/autocli/testdata/help-skip.golden new file mode 100644 index 00000000000..a85dbef695c --- /dev/null +++ b/client/v2/autocli/testdata/help-skip.golden @@ -0,0 +1,7 @@ +Querying commands for the testpb.Query service + +Usage: + test skipecho [flags] + +Flags: + -h, --help help for skipecho diff --git a/client/v2/autocli/testdata/help-toplevel.golden b/client/v2/autocli/testdata/help-toplevel.golden new file mode 100644 index 00000000000..7bab88a556b --- /dev/null +++ b/client/v2/autocli/testdata/help-toplevel.golden @@ -0,0 +1,17 @@ +Querying commands for the test module + +Usage: + test [flags] + test [command] + +Available Commands: + completion Generate the autocompletion script for the specified shell + deprecatedecho Querying commands for the testpb.Query service + echo echo echos the value provided by the user + help Help about any command + skipecho Querying commands for the testpb.Query service + +Flags: + -h, --help help for test + +Use "test [command] --help" for more information about a command. diff --git a/client/v2/autocli/testdata/help.golden b/client/v2/autocli/testdata/help.golden new file mode 100644 index 00000000000..a1295533469 --- /dev/null +++ b/client/v2/autocli/testdata/help.golden @@ -0,0 +1,40 @@ +echo echos the value provided by the user as a proto JSON object with populated with the provided fields and positional arguments + +Usage: + test echo [pos1] [pos2] [pos3...] [flags] + +Aliases: + echo, e + +Examples: +echo 1 abc {} + +Flags: + --a-bool + --a-coin cosmos.base.v1beta1.Coin (json) + --a-message testpb.AMessage (json) + --an-address bech32 account address key name + --an-enum Enum (unspecified | one | two | five | neg-three) (default unspecified) + --bools bools (default []) + --bz bytesBase64 + --deprecated-field string (DEPRECATED: don't use this) + --duration duration + --durations duration (repeated) + --enums Enum (unspecified | one | two | five | neg-three) (repeated) + -h, --help help for echo + --i-32 int32 some random int32 + --i-64 int + --page-count-total + --page-key bytesBase64 + --page-limit uint + --page-offset uint + --page-reverse + -s, --shorthand-deprecated-field string (DEPRECATED: bad idea) + --some-messages testpb.AMessage (json) (repeated) + --str string + --strings strings + --timestamp timestamp (RFC 3339) + --u-64 uint[=5] some random uint64 + -u, --uint32 uint32 some random uint32 + --uints uints (default []) + -v, --version version for echo diff --git a/client/v2/go.mod b/client/v2/go.mod new file mode 100644 index 00000000000..d984af3986d --- /dev/null +++ b/client/v2/go.mod @@ -0,0 +1,29 @@ +module cosmossdk.io/client/v2 + +go 1.19 + +require ( + cosmossdk.io/api v0.2.4 + cosmossdk.io/core v0.3.2 + github.com/cosmos/cosmos-proto v1.0.0-alpha8 + github.com/iancoleman/strcase v0.2.0 + github.com/spf13/cobra v1.6.1 + github.com/spf13/pflag v1.0.5 + google.golang.org/grpc v1.50.1 + google.golang.org/protobuf v1.28.1 + gotest.tools/v3 v3.4.0 +) + +require ( + cosmossdk.io/depinject v1.0.0-alpha.3 // indirect + github.com/cosmos/gogoproto v1.4.2 // indirect + github.com/golang/protobuf v1.5.2 // indirect + github.com/google/go-cmp v0.5.9 // indirect + github.com/inconshreveable/mousetrap v1.0.1 // indirect + github.com/pkg/errors v0.9.1 // indirect + golang.org/x/exp v0.0.0-20221019170559-20944726eadf // indirect + golang.org/x/net v0.0.0-20221017152216-f25eb7ecb193 // indirect + golang.org/x/sys v0.0.0-20221013171732-95e765b1cc43 // indirect + golang.org/x/text v0.3.8 // indirect + google.golang.org/genproto v0.0.0-20221014213838-99cd37c6964a // indirect +) diff --git a/client/v2/go.sum b/client/v2/go.sum new file mode 100644 index 00000000000..35c15f58501 --- /dev/null +++ b/client/v2/go.sum @@ -0,0 +1,82 @@ +cosmossdk.io/api v0.2.4 h1:o2t77GXWWEN5egCzD2ZyyFgbsoAif/XdF3T+/sAYiHQ= +cosmossdk.io/api v0.2.4/go.mod h1:7xfxe8ghXHoKj3W2oG/HcuxGVwUHN3q8piiIEiJ3CEU= +cosmossdk.io/core v0.3.2 h1:KlQIufpJHJvOs7YLGTZsZcCo1WlkencDXepsr8STKZQ= +cosmossdk.io/core v0.3.2/go.mod h1:CO7vbe+evrBvHc0setFHL/u7nlY7HJGzdRSBkT/sirc= +cosmossdk.io/depinject v1.0.0-alpha.3 h1:6evFIgj//Y3w09bqOUOzEpFj5tsxBqdc5CfkO7z+zfw= +cosmossdk.io/depinject v1.0.0-alpha.3/go.mod h1:eRbcdQ7MRpIPEM5YUJh8k97nxHpYbc3sMUnEtt8HPWU= +github.com/alecthomas/participle/v2 v2.0.0-alpha7 h1:cK4vjj0VSgb3lN1nuKA5F7dw+1s1pWBe5bx7nNCnN+c= +github.com/cockroachdb/apd/v3 v3.1.0 h1:MK3Ow7LH0W8zkd5GMKA1PvS9qG3bWFI95WaVNfyZJ/w= +github.com/cosmos/cosmos-proto v1.0.0-alpha8 h1:d3pCRuMYYvGA5bM0ZbbjKn+AoQD4A7dyNG2wzwWalUw= +github.com/cosmos/cosmos-proto v1.0.0-alpha8/go.mod h1:6/p+Bc4O8JKeZqe0VqUGTX31eoYqemTT4C1hLCWsO7I= +github.com/cosmos/gogoproto v1.4.2 h1:UeGRcmFW41l0G0MiefWhkPEVEwvu78SZsHBvI78dAYw= +github.com/cosmos/gogoproto v1.4.2/go.mod h1:cLxOsn1ljAHSV527CHOtaIP91kK6cCrZETRBrkzItWU= +github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= +github.com/cucumber/common/gherkin/go/v22 v22.0.0 h1:4K8NqptbvdOrjL9DEea6HFjSpbdT9+Q5kgLpmmsHYl0= +github.com/cucumber/common/messages/go/v17 v17.1.1 h1:RNqopvIFyLWnKv0LfATh34SWBhXeoFTJnSrgm9cT/Ts= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/gofrs/uuid v4.2.0+incompatible h1:yyYWMnhkhrKwwr8gAOcOCYxOOscHgDS9yZgBrnJfGa0= +github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= +github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= +github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= +github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/iancoleman/strcase v0.2.0 h1:05I4QRnGpI0m37iZQRuskXh+w77mr6Z41lwQzuHLwW0= +github.com/iancoleman/strcase v0.2.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= +github.com/inconshreveable/mousetrap v1.0.1 h1:U3uMjPSQEBMNp1lFxmllqCPM6P5u/Xq7Pgzkat/bFNc= +github.com/inconshreveable/mousetrap v1.0.1/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= +github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= +github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/regen-network/gocuke v0.6.2 h1:pHviZ0kKAq2U2hN2q3smKNxct6hS0mGByFMHGnWA97M= +github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/spf13/cobra v1.6.1 h1:o94oiPyS4KD1mPy2fmcYYHHfCxLqYjJOhGsCHFZtEzA= +github.com/spf13/cobra v1.6.1/go.mod h1:IOw/AERYS7UzyrGinqmz6HLUo219MORXGxhbaJUqzrY= +github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= +github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk= +github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/exp v0.0.0-20221019170559-20944726eadf h1:nFVjjKDgNY37+ZSYCJmtYf7tOlfQswHqplG2eosjOMg= +golang.org/x/exp v0.0.0-20221019170559-20944726eadf/go.mod h1:cyybsKvd6eL0RnXn6p/Grxp8F5bW7iYuBgsNCOHpMYE= +golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20221017152216-f25eb7ecb193 h1:3Moaxt4TfzNcQH6DWvlYKraN1ozhBXQHcgvXjRGeim0= +golang.org/x/net v0.0.0-20221017152216-f25eb7ecb193/go.mod h1:RpDiru2p0u2F0lLpEoqnP2+7xs0ifAuOcJ442g6GU2s= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20221013171732-95e765b1cc43 h1:OK7RB6t2WQX54srQQYSXMW8dF5C6/8+oA/s5QBmmto4= +golang.org/x/sys v0.0.0-20221013171732-95e765b1cc43/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.8 h1:nAL+RVCQ9uMn3vJZbV+MRnydTJFPf8qqY42YiA6MrqY= +golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +google.golang.org/genproto v0.0.0-20221014213838-99cd37c6964a h1:GH6UPn3ixhWcKDhpnEC55S75cerLPdpp3hrhfKYjZgw= +google.golang.org/genproto v0.0.0-20221014213838-99cd37c6964a/go.mod h1:1vXfmgAz9N9Jx0QA82PqRVauvCz1SGSz739p0f183jM= +google.golang.org/grpc v1.50.1 h1:DS/BukOZWp8s6p4Dt/tOaJaTQyPyOoCcrjroHuCeLzY= +google.golang.org/grpc v1.50.1/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= +google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= +google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= +google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gotest.tools/v3 v3.4.0 h1:ZazjZUfuVeZGLAmlKKuyv3IKP5orXcwtOwDQH6YVr6o= +gotest.tools/v3 v3.4.0/go.mod h1:CtbdzLSsqVhDgMtKsx03ird5YTGB3ar27v0u/yKBW5g= +pgregory.net/rapid v0.5.3 h1:163N50IHFqr1phZens4FQOdPgfJscR7a562mjQqeo4M= diff --git a/client/v2/internal/buf.gen.yaml b/client/v2/internal/buf.gen.yaml new file mode 100644 index 00000000000..48859547099 --- /dev/null +++ b/client/v2/internal/buf.gen.yaml @@ -0,0 +1,16 @@ +version: v1 +managed: + enabled: true + go_package_prefix: + default: github.com/cosmos/cosmos-sdk/client/v2/internal + except: + - buf.build/cosmos/cosmos-proto + override: + buf.build/cosmos/cosmos-sdk: cosmossdk.io/api +plugins: + - name: go-pulsar + out: . + opt: paths=source_relative + - name: go-grpc + out: . + opt: paths=source_relative diff --git a/client/v2/internal/buf.lock b/client/v2/internal/buf.lock new file mode 100644 index 00000000000..696956596bf --- /dev/null +++ b/client/v2/internal/buf.lock @@ -0,0 +1,19 @@ +# Generated by buf. DO NOT EDIT. +version: v1 +deps: + - remote: buf.build + owner: cosmos + repository: cosmos-proto + commit: 1935555c206d4afb9e94615dfd0fad31 + - remote: buf.build + owner: cosmos + repository: cosmos-sdk + commit: b7797ff7f3814399b0c5d52e1b8227ed + - remote: buf.build + owner: cosmos + repository: gogo-proto + commit: 6652e3443c3b4504bb3bf82e73a7e409 + - remote: buf.build + owner: googleapis + repository: googleapis + commit: 62f35d8aed1149c291d606d958a7ce32 diff --git a/client/v2/internal/buf.yaml b/client/v2/internal/buf.yaml new file mode 100644 index 00000000000..96af160bf13 --- /dev/null +++ b/client/v2/internal/buf.yaml @@ -0,0 +1,12 @@ +version: v1 +deps: + - buf.build/cosmos/cosmos-sdk + - buf.build/cosmos/cosmos-proto +lint: + use: + - DEFAULT + except: + - PACKAGE_VERSION_SUFFIX +breaking: + ignore: + - testpb diff --git a/client/v2/internal/testpb/query.proto b/client/v2/internal/testpb/query.proto new file mode 100644 index 00000000000..6b79351af45 --- /dev/null +++ b/client/v2/internal/testpb/query.proto @@ -0,0 +1,61 @@ +syntax = "proto3"; + +package testpb; + +import "google/protobuf/timestamp.proto"; +import "google/protobuf/duration.proto"; +import "cosmos_proto/cosmos.proto"; +import "cosmos/base/query/v1beta1/pagination.proto"; +import "cosmos/base/v1beta1/coin.proto"; + +service Query { + // Echo returns the request in the response + rpc Echo(EchoRequest) returns (EchoResponse); +} + +message EchoRequest { + // u32 is an uint32 + uint32 u32 = 1; + uint64 u64 = 2; + string str = 3; + bytes bz = 4; + google.protobuf.Timestamp timestamp = 5; + google.protobuf.Duration duration = 6; + int32 i32 = 7; + int64 i64 = 10; + bool a_bool = 15; + Enum an_enum = 16; + AMessage a_message = 17; + cosmos.base.v1beta1.Coin a_coin = 18; + string an_address = 19 [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; + cosmos.base.query.v1beta1.PageRequest page = 20; + repeated bool bools = 21; + repeated uint32 uints = 22; + repeated string strings = 23; + repeated Enum enums = 24; + repeated google.protobuf.Duration durations = 25; + repeated AMessage some_messages = 26; + + int32 positional1 = 27; + string positional2 = 28; + repeated cosmos.base.v1beta1.Coin positional3_varargs = 29; + + string deprecated_field = 30; + string shorthand_deprecated_field = 31; + bool hidden_bool = 32; +} + +enum Enum { + ENUM_UNSPECIFIED = 0; + ENUM_ONE = 1; + ENUM_TWO = 2; + ENUM_FIVE = 5; + ENUM_NEG_THREE = -3; +} + +message AMessage { + string bar = 1; + int32 baz = 2; +} + +message EchoResponse { EchoRequest request = 1; } \ No newline at end of file diff --git a/client/v2/internal/testpb/query.pulsar.go b/client/v2/internal/testpb/query.pulsar.go new file mode 100644 index 00000000000..e8743333c3d --- /dev/null +++ b/client/v2/internal/testpb/query.pulsar.go @@ -0,0 +1,4141 @@ +// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. +package testpb + +import ( + v1beta11 "cosmossdk.io/api/cosmos/base/query/v1beta1" + v1beta1 "cosmossdk.io/api/cosmos/base/v1beta1" + fmt "fmt" + _ "github.com/cosmos/cosmos-proto" + runtime "github.com/cosmos/cosmos-proto/runtime" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoiface "google.golang.org/protobuf/runtime/protoiface" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + durationpb "google.golang.org/protobuf/types/known/durationpb" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" + io "io" + reflect "reflect" + sync "sync" +) + +var _ protoreflect.List = (*_EchoRequest_21_list)(nil) + +type _EchoRequest_21_list struct { + list *[]bool +} + +func (x *_EchoRequest_21_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_EchoRequest_21_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfBool((*x.list)[i]) +} + +func (x *_EchoRequest_21_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Bool() + concreteValue := valueUnwrapped + (*x.list)[i] = concreteValue +} + +func (x *_EchoRequest_21_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Bool() + concreteValue := valueUnwrapped + *x.list = append(*x.list, concreteValue) +} + +func (x *_EchoRequest_21_list) AppendMutable() protoreflect.Value { + panic(fmt.Errorf("AppendMutable can not be called on message EchoRequest at list field Bools as it is not of Message kind")) +} + +func (x *_EchoRequest_21_list) Truncate(n int) { + *x.list = (*x.list)[:n] +} + +func (x *_EchoRequest_21_list) NewElement() protoreflect.Value { + v := false + return protoreflect.ValueOfBool(v) +} + +func (x *_EchoRequest_21_list) IsValid() bool { + return x.list != nil +} + +var _ protoreflect.List = (*_EchoRequest_22_list)(nil) + +type _EchoRequest_22_list struct { + list *[]uint32 +} + +func (x *_EchoRequest_22_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_EchoRequest_22_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfUint32((*x.list)[i]) +} + +func (x *_EchoRequest_22_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Uint() + concreteValue := (uint32)(valueUnwrapped) + (*x.list)[i] = concreteValue +} + +func (x *_EchoRequest_22_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Uint() + concreteValue := (uint32)(valueUnwrapped) + *x.list = append(*x.list, concreteValue) +} + +func (x *_EchoRequest_22_list) AppendMutable() protoreflect.Value { + panic(fmt.Errorf("AppendMutable can not be called on message EchoRequest at list field Uints as it is not of Message kind")) +} + +func (x *_EchoRequest_22_list) Truncate(n int) { + *x.list = (*x.list)[:n] +} + +func (x *_EchoRequest_22_list) NewElement() protoreflect.Value { + v := uint32(0) + return protoreflect.ValueOfUint32(v) +} + +func (x *_EchoRequest_22_list) IsValid() bool { + return x.list != nil +} + +var _ protoreflect.List = (*_EchoRequest_23_list)(nil) + +type _EchoRequest_23_list struct { + list *[]string +} + +func (x *_EchoRequest_23_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_EchoRequest_23_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfString((*x.list)[i]) +} + +func (x *_EchoRequest_23_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.String() + concreteValue := valueUnwrapped + (*x.list)[i] = concreteValue +} + +func (x *_EchoRequest_23_list) Append(value protoreflect.Value) { + valueUnwrapped := value.String() + concreteValue := valueUnwrapped + *x.list = append(*x.list, concreteValue) +} + +func (x *_EchoRequest_23_list) AppendMutable() protoreflect.Value { + panic(fmt.Errorf("AppendMutable can not be called on message EchoRequest at list field Strings as it is not of Message kind")) +} + +func (x *_EchoRequest_23_list) Truncate(n int) { + *x.list = (*x.list)[:n] +} + +func (x *_EchoRequest_23_list) NewElement() protoreflect.Value { + v := "" + return protoreflect.ValueOfString(v) +} + +func (x *_EchoRequest_23_list) IsValid() bool { + return x.list != nil +} + +var _ protoreflect.List = (*_EchoRequest_24_list)(nil) + +type _EchoRequest_24_list struct { + list *[]Enum +} + +func (x *_EchoRequest_24_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_EchoRequest_24_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfEnum((protoreflect.EnumNumber)((*x.list)[i])) +} + +func (x *_EchoRequest_24_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Enum() + concreteValue := (Enum)(valueUnwrapped) + (*x.list)[i] = concreteValue +} + +func (x *_EchoRequest_24_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Enum() + concreteValue := (Enum)(valueUnwrapped) + *x.list = append(*x.list, concreteValue) +} + +func (x *_EchoRequest_24_list) AppendMutable() protoreflect.Value { + panic(fmt.Errorf("AppendMutable can not be called on message EchoRequest at list field Enums as it is not of Message kind")) +} + +func (x *_EchoRequest_24_list) Truncate(n int) { + *x.list = (*x.list)[:n] +} + +func (x *_EchoRequest_24_list) NewElement() protoreflect.Value { + v := 0 + return protoreflect.ValueOfEnum((protoreflect.EnumNumber)(v)) +} + +func (x *_EchoRequest_24_list) IsValid() bool { + return x.list != nil +} + +var _ protoreflect.List = (*_EchoRequest_25_list)(nil) + +type _EchoRequest_25_list struct { + list *[]*durationpb.Duration +} + +func (x *_EchoRequest_25_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_EchoRequest_25_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_EchoRequest_25_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*durationpb.Duration) + (*x.list)[i] = concreteValue +} + +func (x *_EchoRequest_25_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*durationpb.Duration) + *x.list = append(*x.list, concreteValue) +} + +func (x *_EchoRequest_25_list) AppendMutable() protoreflect.Value { + v := new(durationpb.Duration) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_EchoRequest_25_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_EchoRequest_25_list) NewElement() protoreflect.Value { + v := new(durationpb.Duration) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_EchoRequest_25_list) IsValid() bool { + return x.list != nil +} + +var _ protoreflect.List = (*_EchoRequest_26_list)(nil) + +type _EchoRequest_26_list struct { + list *[]*AMessage +} + +func (x *_EchoRequest_26_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_EchoRequest_26_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_EchoRequest_26_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*AMessage) + (*x.list)[i] = concreteValue +} + +func (x *_EchoRequest_26_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*AMessage) + *x.list = append(*x.list, concreteValue) +} + +func (x *_EchoRequest_26_list) AppendMutable() protoreflect.Value { + v := new(AMessage) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_EchoRequest_26_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_EchoRequest_26_list) NewElement() protoreflect.Value { + v := new(AMessage) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_EchoRequest_26_list) IsValid() bool { + return x.list != nil +} + +var _ protoreflect.List = (*_EchoRequest_29_list)(nil) + +type _EchoRequest_29_list struct { + list *[]*v1beta1.Coin +} + +func (x *_EchoRequest_29_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_EchoRequest_29_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_EchoRequest_29_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) + (*x.list)[i] = concreteValue +} + +func (x *_EchoRequest_29_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) + *x.list = append(*x.list, concreteValue) +} + +func (x *_EchoRequest_29_list) AppendMutable() protoreflect.Value { + v := new(v1beta1.Coin) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_EchoRequest_29_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_EchoRequest_29_list) NewElement() protoreflect.Value { + v := new(v1beta1.Coin) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_EchoRequest_29_list) IsValid() bool { + return x.list != nil +} + +var ( + md_EchoRequest protoreflect.MessageDescriptor + fd_EchoRequest_u32 protoreflect.FieldDescriptor + fd_EchoRequest_u64 protoreflect.FieldDescriptor + fd_EchoRequest_str protoreflect.FieldDescriptor + fd_EchoRequest_bz protoreflect.FieldDescriptor + fd_EchoRequest_timestamp protoreflect.FieldDescriptor + fd_EchoRequest_duration protoreflect.FieldDescriptor + fd_EchoRequest_i32 protoreflect.FieldDescriptor + fd_EchoRequest_i64 protoreflect.FieldDescriptor + fd_EchoRequest_a_bool protoreflect.FieldDescriptor + fd_EchoRequest_an_enum protoreflect.FieldDescriptor + fd_EchoRequest_a_message protoreflect.FieldDescriptor + fd_EchoRequest_a_coin protoreflect.FieldDescriptor + fd_EchoRequest_an_address protoreflect.FieldDescriptor + fd_EchoRequest_page protoreflect.FieldDescriptor + fd_EchoRequest_bools protoreflect.FieldDescriptor + fd_EchoRequest_uints protoreflect.FieldDescriptor + fd_EchoRequest_strings protoreflect.FieldDescriptor + fd_EchoRequest_enums protoreflect.FieldDescriptor + fd_EchoRequest_durations protoreflect.FieldDescriptor + fd_EchoRequest_some_messages protoreflect.FieldDescriptor + fd_EchoRequest_positional1 protoreflect.FieldDescriptor + fd_EchoRequest_positional2 protoreflect.FieldDescriptor + fd_EchoRequest_positional3_varargs protoreflect.FieldDescriptor + fd_EchoRequest_deprecated_field protoreflect.FieldDescriptor + fd_EchoRequest_shorthand_deprecated_field protoreflect.FieldDescriptor + fd_EchoRequest_hidden_bool protoreflect.FieldDescriptor +) + +func init() { + file_testpb_query_proto_init() + md_EchoRequest = File_testpb_query_proto.Messages().ByName("EchoRequest") + fd_EchoRequest_u32 = md_EchoRequest.Fields().ByName("u32") + fd_EchoRequest_u64 = md_EchoRequest.Fields().ByName("u64") + fd_EchoRequest_str = md_EchoRequest.Fields().ByName("str") + fd_EchoRequest_bz = md_EchoRequest.Fields().ByName("bz") + fd_EchoRequest_timestamp = md_EchoRequest.Fields().ByName("timestamp") + fd_EchoRequest_duration = md_EchoRequest.Fields().ByName("duration") + fd_EchoRequest_i32 = md_EchoRequest.Fields().ByName("i32") + fd_EchoRequest_i64 = md_EchoRequest.Fields().ByName("i64") + fd_EchoRequest_a_bool = md_EchoRequest.Fields().ByName("a_bool") + fd_EchoRequest_an_enum = md_EchoRequest.Fields().ByName("an_enum") + fd_EchoRequest_a_message = md_EchoRequest.Fields().ByName("a_message") + fd_EchoRequest_a_coin = md_EchoRequest.Fields().ByName("a_coin") + fd_EchoRequest_an_address = md_EchoRequest.Fields().ByName("an_address") + fd_EchoRequest_page = md_EchoRequest.Fields().ByName("page") + fd_EchoRequest_bools = md_EchoRequest.Fields().ByName("bools") + fd_EchoRequest_uints = md_EchoRequest.Fields().ByName("uints") + fd_EchoRequest_strings = md_EchoRequest.Fields().ByName("strings") + fd_EchoRequest_enums = md_EchoRequest.Fields().ByName("enums") + fd_EchoRequest_durations = md_EchoRequest.Fields().ByName("durations") + fd_EchoRequest_some_messages = md_EchoRequest.Fields().ByName("some_messages") + fd_EchoRequest_positional1 = md_EchoRequest.Fields().ByName("positional1") + fd_EchoRequest_positional2 = md_EchoRequest.Fields().ByName("positional2") + fd_EchoRequest_positional3_varargs = md_EchoRequest.Fields().ByName("positional3_varargs") + fd_EchoRequest_deprecated_field = md_EchoRequest.Fields().ByName("deprecated_field") + fd_EchoRequest_shorthand_deprecated_field = md_EchoRequest.Fields().ByName("shorthand_deprecated_field") + fd_EchoRequest_hidden_bool = md_EchoRequest.Fields().ByName("hidden_bool") +} + +var _ protoreflect.Message = (*fastReflection_EchoRequest)(nil) + +type fastReflection_EchoRequest EchoRequest + +func (x *EchoRequest) ProtoReflect() protoreflect.Message { + return (*fastReflection_EchoRequest)(x) +} + +func (x *EchoRequest) slowProtoReflect() protoreflect.Message { + mi := &file_testpb_query_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_EchoRequest_messageType fastReflection_EchoRequest_messageType +var _ protoreflect.MessageType = fastReflection_EchoRequest_messageType{} + +type fastReflection_EchoRequest_messageType struct{} + +func (x fastReflection_EchoRequest_messageType) Zero() protoreflect.Message { + return (*fastReflection_EchoRequest)(nil) +} +func (x fastReflection_EchoRequest_messageType) New() protoreflect.Message { + return new(fastReflection_EchoRequest) +} +func (x fastReflection_EchoRequest_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_EchoRequest +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_EchoRequest) Descriptor() protoreflect.MessageDescriptor { + return md_EchoRequest +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_EchoRequest) Type() protoreflect.MessageType { + return _fastReflection_EchoRequest_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_EchoRequest) New() protoreflect.Message { + return new(fastReflection_EchoRequest) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_EchoRequest) Interface() protoreflect.ProtoMessage { + return (*EchoRequest)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_EchoRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.U32 != uint32(0) { + value := protoreflect.ValueOfUint32(x.U32) + if !f(fd_EchoRequest_u32, value) { + return + } + } + if x.U64 != uint64(0) { + value := protoreflect.ValueOfUint64(x.U64) + if !f(fd_EchoRequest_u64, value) { + return + } + } + if x.Str != "" { + value := protoreflect.ValueOfString(x.Str) + if !f(fd_EchoRequest_str, value) { + return + } + } + if len(x.Bz) != 0 { + value := protoreflect.ValueOfBytes(x.Bz) + if !f(fd_EchoRequest_bz, value) { + return + } + } + if x.Timestamp != nil { + value := protoreflect.ValueOfMessage(x.Timestamp.ProtoReflect()) + if !f(fd_EchoRequest_timestamp, value) { + return + } + } + if x.Duration != nil { + value := protoreflect.ValueOfMessage(x.Duration.ProtoReflect()) + if !f(fd_EchoRequest_duration, value) { + return + } + } + if x.I32 != int32(0) { + value := protoreflect.ValueOfInt32(x.I32) + if !f(fd_EchoRequest_i32, value) { + return + } + } + if x.I64 != int64(0) { + value := protoreflect.ValueOfInt64(x.I64) + if !f(fd_EchoRequest_i64, value) { + return + } + } + if x.ABool != false { + value := protoreflect.ValueOfBool(x.ABool) + if !f(fd_EchoRequest_a_bool, value) { + return + } + } + if x.AnEnum != 0 { + value := protoreflect.ValueOfEnum((protoreflect.EnumNumber)(x.AnEnum)) + if !f(fd_EchoRequest_an_enum, value) { + return + } + } + if x.AMessage != nil { + value := protoreflect.ValueOfMessage(x.AMessage.ProtoReflect()) + if !f(fd_EchoRequest_a_message, value) { + return + } + } + if x.ACoin != nil { + value := protoreflect.ValueOfMessage(x.ACoin.ProtoReflect()) + if !f(fd_EchoRequest_a_coin, value) { + return + } + } + if x.AnAddress != "" { + value := protoreflect.ValueOfString(x.AnAddress) + if !f(fd_EchoRequest_an_address, value) { + return + } + } + if x.Page != nil { + value := protoreflect.ValueOfMessage(x.Page.ProtoReflect()) + if !f(fd_EchoRequest_page, value) { + return + } + } + if len(x.Bools) != 0 { + value := protoreflect.ValueOfList(&_EchoRequest_21_list{list: &x.Bools}) + if !f(fd_EchoRequest_bools, value) { + return + } + } + if len(x.Uints) != 0 { + value := protoreflect.ValueOfList(&_EchoRequest_22_list{list: &x.Uints}) + if !f(fd_EchoRequest_uints, value) { + return + } + } + if len(x.Strings) != 0 { + value := protoreflect.ValueOfList(&_EchoRequest_23_list{list: &x.Strings}) + if !f(fd_EchoRequest_strings, value) { + return + } + } + if len(x.Enums) != 0 { + value := protoreflect.ValueOfList(&_EchoRequest_24_list{list: &x.Enums}) + if !f(fd_EchoRequest_enums, value) { + return + } + } + if len(x.Durations) != 0 { + value := protoreflect.ValueOfList(&_EchoRequest_25_list{list: &x.Durations}) + if !f(fd_EchoRequest_durations, value) { + return + } + } + if len(x.SomeMessages) != 0 { + value := protoreflect.ValueOfList(&_EchoRequest_26_list{list: &x.SomeMessages}) + if !f(fd_EchoRequest_some_messages, value) { + return + } + } + if x.Positional1 != int32(0) { + value := protoreflect.ValueOfInt32(x.Positional1) + if !f(fd_EchoRequest_positional1, value) { + return + } + } + if x.Positional2 != "" { + value := protoreflect.ValueOfString(x.Positional2) + if !f(fd_EchoRequest_positional2, value) { + return + } + } + if len(x.Positional3Varargs) != 0 { + value := protoreflect.ValueOfList(&_EchoRequest_29_list{list: &x.Positional3Varargs}) + if !f(fd_EchoRequest_positional3_varargs, value) { + return + } + } + if x.DeprecatedField != "" { + value := protoreflect.ValueOfString(x.DeprecatedField) + if !f(fd_EchoRequest_deprecated_field, value) { + return + } + } + if x.ShorthandDeprecatedField != "" { + value := protoreflect.ValueOfString(x.ShorthandDeprecatedField) + if !f(fd_EchoRequest_shorthand_deprecated_field, value) { + return + } + } + if x.HiddenBool != false { + value := protoreflect.ValueOfBool(x.HiddenBool) + if !f(fd_EchoRequest_hidden_bool, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_EchoRequest) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "testpb.EchoRequest.u32": + return x.U32 != uint32(0) + case "testpb.EchoRequest.u64": + return x.U64 != uint64(0) + case "testpb.EchoRequest.str": + return x.Str != "" + case "testpb.EchoRequest.bz": + return len(x.Bz) != 0 + case "testpb.EchoRequest.timestamp": + return x.Timestamp != nil + case "testpb.EchoRequest.duration": + return x.Duration != nil + case "testpb.EchoRequest.i32": + return x.I32 != int32(0) + case "testpb.EchoRequest.i64": + return x.I64 != int64(0) + case "testpb.EchoRequest.a_bool": + return x.ABool != false + case "testpb.EchoRequest.an_enum": + return x.AnEnum != 0 + case "testpb.EchoRequest.a_message": + return x.AMessage != nil + case "testpb.EchoRequest.a_coin": + return x.ACoin != nil + case "testpb.EchoRequest.an_address": + return x.AnAddress != "" + case "testpb.EchoRequest.page": + return x.Page != nil + case "testpb.EchoRequest.bools": + return len(x.Bools) != 0 + case "testpb.EchoRequest.uints": + return len(x.Uints) != 0 + case "testpb.EchoRequest.strings": + return len(x.Strings) != 0 + case "testpb.EchoRequest.enums": + return len(x.Enums) != 0 + case "testpb.EchoRequest.durations": + return len(x.Durations) != 0 + case "testpb.EchoRequest.some_messages": + return len(x.SomeMessages) != 0 + case "testpb.EchoRequest.positional1": + return x.Positional1 != int32(0) + case "testpb.EchoRequest.positional2": + return x.Positional2 != "" + case "testpb.EchoRequest.positional3_varargs": + return len(x.Positional3Varargs) != 0 + case "testpb.EchoRequest.deprecated_field": + return x.DeprecatedField != "" + case "testpb.EchoRequest.shorthand_deprecated_field": + return x.ShorthandDeprecatedField != "" + case "testpb.EchoRequest.hidden_bool": + return x.HiddenBool != false + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.EchoRequest")) + } + panic(fmt.Errorf("message testpb.EchoRequest does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_EchoRequest) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "testpb.EchoRequest.u32": + x.U32 = uint32(0) + case "testpb.EchoRequest.u64": + x.U64 = uint64(0) + case "testpb.EchoRequest.str": + x.Str = "" + case "testpb.EchoRequest.bz": + x.Bz = nil + case "testpb.EchoRequest.timestamp": + x.Timestamp = nil + case "testpb.EchoRequest.duration": + x.Duration = nil + case "testpb.EchoRequest.i32": + x.I32 = int32(0) + case "testpb.EchoRequest.i64": + x.I64 = int64(0) + case "testpb.EchoRequest.a_bool": + x.ABool = false + case "testpb.EchoRequest.an_enum": + x.AnEnum = 0 + case "testpb.EchoRequest.a_message": + x.AMessage = nil + case "testpb.EchoRequest.a_coin": + x.ACoin = nil + case "testpb.EchoRequest.an_address": + x.AnAddress = "" + case "testpb.EchoRequest.page": + x.Page = nil + case "testpb.EchoRequest.bools": + x.Bools = nil + case "testpb.EchoRequest.uints": + x.Uints = nil + case "testpb.EchoRequest.strings": + x.Strings = nil + case "testpb.EchoRequest.enums": + x.Enums = nil + case "testpb.EchoRequest.durations": + x.Durations = nil + case "testpb.EchoRequest.some_messages": + x.SomeMessages = nil + case "testpb.EchoRequest.positional1": + x.Positional1 = int32(0) + case "testpb.EchoRequest.positional2": + x.Positional2 = "" + case "testpb.EchoRequest.positional3_varargs": + x.Positional3Varargs = nil + case "testpb.EchoRequest.deprecated_field": + x.DeprecatedField = "" + case "testpb.EchoRequest.shorthand_deprecated_field": + x.ShorthandDeprecatedField = "" + case "testpb.EchoRequest.hidden_bool": + x.HiddenBool = false + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.EchoRequest")) + } + panic(fmt.Errorf("message testpb.EchoRequest does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_EchoRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "testpb.EchoRequest.u32": + value := x.U32 + return protoreflect.ValueOfUint32(value) + case "testpb.EchoRequest.u64": + value := x.U64 + return protoreflect.ValueOfUint64(value) + case "testpb.EchoRequest.str": + value := x.Str + return protoreflect.ValueOfString(value) + case "testpb.EchoRequest.bz": + value := x.Bz + return protoreflect.ValueOfBytes(value) + case "testpb.EchoRequest.timestamp": + value := x.Timestamp + return protoreflect.ValueOfMessage(value.ProtoReflect()) + case "testpb.EchoRequest.duration": + value := x.Duration + return protoreflect.ValueOfMessage(value.ProtoReflect()) + case "testpb.EchoRequest.i32": + value := x.I32 + return protoreflect.ValueOfInt32(value) + case "testpb.EchoRequest.i64": + value := x.I64 + return protoreflect.ValueOfInt64(value) + case "testpb.EchoRequest.a_bool": + value := x.ABool + return protoreflect.ValueOfBool(value) + case "testpb.EchoRequest.an_enum": + value := x.AnEnum + return protoreflect.ValueOfEnum((protoreflect.EnumNumber)(value)) + case "testpb.EchoRequest.a_message": + value := x.AMessage + return protoreflect.ValueOfMessage(value.ProtoReflect()) + case "testpb.EchoRequest.a_coin": + value := x.ACoin + return protoreflect.ValueOfMessage(value.ProtoReflect()) + case "testpb.EchoRequest.an_address": + value := x.AnAddress + return protoreflect.ValueOfString(value) + case "testpb.EchoRequest.page": + value := x.Page + return protoreflect.ValueOfMessage(value.ProtoReflect()) + case "testpb.EchoRequest.bools": + if len(x.Bools) == 0 { + return protoreflect.ValueOfList(&_EchoRequest_21_list{}) + } + listValue := &_EchoRequest_21_list{list: &x.Bools} + return protoreflect.ValueOfList(listValue) + case "testpb.EchoRequest.uints": + if len(x.Uints) == 0 { + return protoreflect.ValueOfList(&_EchoRequest_22_list{}) + } + listValue := &_EchoRequest_22_list{list: &x.Uints} + return protoreflect.ValueOfList(listValue) + case "testpb.EchoRequest.strings": + if len(x.Strings) == 0 { + return protoreflect.ValueOfList(&_EchoRequest_23_list{}) + } + listValue := &_EchoRequest_23_list{list: &x.Strings} + return protoreflect.ValueOfList(listValue) + case "testpb.EchoRequest.enums": + if len(x.Enums) == 0 { + return protoreflect.ValueOfList(&_EchoRequest_24_list{}) + } + listValue := &_EchoRequest_24_list{list: &x.Enums} + return protoreflect.ValueOfList(listValue) + case "testpb.EchoRequest.durations": + if len(x.Durations) == 0 { + return protoreflect.ValueOfList(&_EchoRequest_25_list{}) + } + listValue := &_EchoRequest_25_list{list: &x.Durations} + return protoreflect.ValueOfList(listValue) + case "testpb.EchoRequest.some_messages": + if len(x.SomeMessages) == 0 { + return protoreflect.ValueOfList(&_EchoRequest_26_list{}) + } + listValue := &_EchoRequest_26_list{list: &x.SomeMessages} + return protoreflect.ValueOfList(listValue) + case "testpb.EchoRequest.positional1": + value := x.Positional1 + return protoreflect.ValueOfInt32(value) + case "testpb.EchoRequest.positional2": + value := x.Positional2 + return protoreflect.ValueOfString(value) + case "testpb.EchoRequest.positional3_varargs": + if len(x.Positional3Varargs) == 0 { + return protoreflect.ValueOfList(&_EchoRequest_29_list{}) + } + listValue := &_EchoRequest_29_list{list: &x.Positional3Varargs} + return protoreflect.ValueOfList(listValue) + case "testpb.EchoRequest.deprecated_field": + value := x.DeprecatedField + return protoreflect.ValueOfString(value) + case "testpb.EchoRequest.shorthand_deprecated_field": + value := x.ShorthandDeprecatedField + return protoreflect.ValueOfString(value) + case "testpb.EchoRequest.hidden_bool": + value := x.HiddenBool + return protoreflect.ValueOfBool(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.EchoRequest")) + } + panic(fmt.Errorf("message testpb.EchoRequest does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_EchoRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "testpb.EchoRequest.u32": + x.U32 = uint32(value.Uint()) + case "testpb.EchoRequest.u64": + x.U64 = value.Uint() + case "testpb.EchoRequest.str": + x.Str = value.Interface().(string) + case "testpb.EchoRequest.bz": + x.Bz = value.Bytes() + case "testpb.EchoRequest.timestamp": + x.Timestamp = value.Message().Interface().(*timestamppb.Timestamp) + case "testpb.EchoRequest.duration": + x.Duration = value.Message().Interface().(*durationpb.Duration) + case "testpb.EchoRequest.i32": + x.I32 = int32(value.Int()) + case "testpb.EchoRequest.i64": + x.I64 = value.Int() + case "testpb.EchoRequest.a_bool": + x.ABool = value.Bool() + case "testpb.EchoRequest.an_enum": + x.AnEnum = (Enum)(value.Enum()) + case "testpb.EchoRequest.a_message": + x.AMessage = value.Message().Interface().(*AMessage) + case "testpb.EchoRequest.a_coin": + x.ACoin = value.Message().Interface().(*v1beta1.Coin) + case "testpb.EchoRequest.an_address": + x.AnAddress = value.Interface().(string) + case "testpb.EchoRequest.page": + x.Page = value.Message().Interface().(*v1beta11.PageRequest) + case "testpb.EchoRequest.bools": + lv := value.List() + clv := lv.(*_EchoRequest_21_list) + x.Bools = *clv.list + case "testpb.EchoRequest.uints": + lv := value.List() + clv := lv.(*_EchoRequest_22_list) + x.Uints = *clv.list + case "testpb.EchoRequest.strings": + lv := value.List() + clv := lv.(*_EchoRequest_23_list) + x.Strings = *clv.list + case "testpb.EchoRequest.enums": + lv := value.List() + clv := lv.(*_EchoRequest_24_list) + x.Enums = *clv.list + case "testpb.EchoRequest.durations": + lv := value.List() + clv := lv.(*_EchoRequest_25_list) + x.Durations = *clv.list + case "testpb.EchoRequest.some_messages": + lv := value.List() + clv := lv.(*_EchoRequest_26_list) + x.SomeMessages = *clv.list + case "testpb.EchoRequest.positional1": + x.Positional1 = int32(value.Int()) + case "testpb.EchoRequest.positional2": + x.Positional2 = value.Interface().(string) + case "testpb.EchoRequest.positional3_varargs": + lv := value.List() + clv := lv.(*_EchoRequest_29_list) + x.Positional3Varargs = *clv.list + case "testpb.EchoRequest.deprecated_field": + x.DeprecatedField = value.Interface().(string) + case "testpb.EchoRequest.shorthand_deprecated_field": + x.ShorthandDeprecatedField = value.Interface().(string) + case "testpb.EchoRequest.hidden_bool": + x.HiddenBool = value.Bool() + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.EchoRequest")) + } + panic(fmt.Errorf("message testpb.EchoRequest does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_EchoRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "testpb.EchoRequest.timestamp": + if x.Timestamp == nil { + x.Timestamp = new(timestamppb.Timestamp) + } + return protoreflect.ValueOfMessage(x.Timestamp.ProtoReflect()) + case "testpb.EchoRequest.duration": + if x.Duration == nil { + x.Duration = new(durationpb.Duration) + } + return protoreflect.ValueOfMessage(x.Duration.ProtoReflect()) + case "testpb.EchoRequest.a_message": + if x.AMessage == nil { + x.AMessage = new(AMessage) + } + return protoreflect.ValueOfMessage(x.AMessage.ProtoReflect()) + case "testpb.EchoRequest.a_coin": + if x.ACoin == nil { + x.ACoin = new(v1beta1.Coin) + } + return protoreflect.ValueOfMessage(x.ACoin.ProtoReflect()) + case "testpb.EchoRequest.page": + if x.Page == nil { + x.Page = new(v1beta11.PageRequest) + } + return protoreflect.ValueOfMessage(x.Page.ProtoReflect()) + case "testpb.EchoRequest.bools": + if x.Bools == nil { + x.Bools = []bool{} + } + value := &_EchoRequest_21_list{list: &x.Bools} + return protoreflect.ValueOfList(value) + case "testpb.EchoRequest.uints": + if x.Uints == nil { + x.Uints = []uint32{} + } + value := &_EchoRequest_22_list{list: &x.Uints} + return protoreflect.ValueOfList(value) + case "testpb.EchoRequest.strings": + if x.Strings == nil { + x.Strings = []string{} + } + value := &_EchoRequest_23_list{list: &x.Strings} + return protoreflect.ValueOfList(value) + case "testpb.EchoRequest.enums": + if x.Enums == nil { + x.Enums = []Enum{} + } + value := &_EchoRequest_24_list{list: &x.Enums} + return protoreflect.ValueOfList(value) + case "testpb.EchoRequest.durations": + if x.Durations == nil { + x.Durations = []*durationpb.Duration{} + } + value := &_EchoRequest_25_list{list: &x.Durations} + return protoreflect.ValueOfList(value) + case "testpb.EchoRequest.some_messages": + if x.SomeMessages == nil { + x.SomeMessages = []*AMessage{} + } + value := &_EchoRequest_26_list{list: &x.SomeMessages} + return protoreflect.ValueOfList(value) + case "testpb.EchoRequest.positional3_varargs": + if x.Positional3Varargs == nil { + x.Positional3Varargs = []*v1beta1.Coin{} + } + value := &_EchoRequest_29_list{list: &x.Positional3Varargs} + return protoreflect.ValueOfList(value) + case "testpb.EchoRequest.u32": + panic(fmt.Errorf("field u32 of message testpb.EchoRequest is not mutable")) + case "testpb.EchoRequest.u64": + panic(fmt.Errorf("field u64 of message testpb.EchoRequest is not mutable")) + case "testpb.EchoRequest.str": + panic(fmt.Errorf("field str of message testpb.EchoRequest is not mutable")) + case "testpb.EchoRequest.bz": + panic(fmt.Errorf("field bz of message testpb.EchoRequest is not mutable")) + case "testpb.EchoRequest.i32": + panic(fmt.Errorf("field i32 of message testpb.EchoRequest is not mutable")) + case "testpb.EchoRequest.i64": + panic(fmt.Errorf("field i64 of message testpb.EchoRequest is not mutable")) + case "testpb.EchoRequest.a_bool": + panic(fmt.Errorf("field a_bool of message testpb.EchoRequest is not mutable")) + case "testpb.EchoRequest.an_enum": + panic(fmt.Errorf("field an_enum of message testpb.EchoRequest is not mutable")) + case "testpb.EchoRequest.an_address": + panic(fmt.Errorf("field an_address of message testpb.EchoRequest is not mutable")) + case "testpb.EchoRequest.positional1": + panic(fmt.Errorf("field positional1 of message testpb.EchoRequest is not mutable")) + case "testpb.EchoRequest.positional2": + panic(fmt.Errorf("field positional2 of message testpb.EchoRequest is not mutable")) + case "testpb.EchoRequest.deprecated_field": + panic(fmt.Errorf("field deprecated_field of message testpb.EchoRequest is not mutable")) + case "testpb.EchoRequest.shorthand_deprecated_field": + panic(fmt.Errorf("field shorthand_deprecated_field of message testpb.EchoRequest is not mutable")) + case "testpb.EchoRequest.hidden_bool": + panic(fmt.Errorf("field hidden_bool of message testpb.EchoRequest is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.EchoRequest")) + } + panic(fmt.Errorf("message testpb.EchoRequest does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_EchoRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "testpb.EchoRequest.u32": + return protoreflect.ValueOfUint32(uint32(0)) + case "testpb.EchoRequest.u64": + return protoreflect.ValueOfUint64(uint64(0)) + case "testpb.EchoRequest.str": + return protoreflect.ValueOfString("") + case "testpb.EchoRequest.bz": + return protoreflect.ValueOfBytes(nil) + case "testpb.EchoRequest.timestamp": + m := new(timestamppb.Timestamp) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + case "testpb.EchoRequest.duration": + m := new(durationpb.Duration) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + case "testpb.EchoRequest.i32": + return protoreflect.ValueOfInt32(int32(0)) + case "testpb.EchoRequest.i64": + return protoreflect.ValueOfInt64(int64(0)) + case "testpb.EchoRequest.a_bool": + return protoreflect.ValueOfBool(false) + case "testpb.EchoRequest.an_enum": + return protoreflect.ValueOfEnum(0) + case "testpb.EchoRequest.a_message": + m := new(AMessage) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + case "testpb.EchoRequest.a_coin": + m := new(v1beta1.Coin) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + case "testpb.EchoRequest.an_address": + return protoreflect.ValueOfString("") + case "testpb.EchoRequest.page": + m := new(v1beta11.PageRequest) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + case "testpb.EchoRequest.bools": + list := []bool{} + return protoreflect.ValueOfList(&_EchoRequest_21_list{list: &list}) + case "testpb.EchoRequest.uints": + list := []uint32{} + return protoreflect.ValueOfList(&_EchoRequest_22_list{list: &list}) + case "testpb.EchoRequest.strings": + list := []string{} + return protoreflect.ValueOfList(&_EchoRequest_23_list{list: &list}) + case "testpb.EchoRequest.enums": + list := []Enum{} + return protoreflect.ValueOfList(&_EchoRequest_24_list{list: &list}) + case "testpb.EchoRequest.durations": + list := []*durationpb.Duration{} + return protoreflect.ValueOfList(&_EchoRequest_25_list{list: &list}) + case "testpb.EchoRequest.some_messages": + list := []*AMessage{} + return protoreflect.ValueOfList(&_EchoRequest_26_list{list: &list}) + case "testpb.EchoRequest.positional1": + return protoreflect.ValueOfInt32(int32(0)) + case "testpb.EchoRequest.positional2": + return protoreflect.ValueOfString("") + case "testpb.EchoRequest.positional3_varargs": + list := []*v1beta1.Coin{} + return protoreflect.ValueOfList(&_EchoRequest_29_list{list: &list}) + case "testpb.EchoRequest.deprecated_field": + return protoreflect.ValueOfString("") + case "testpb.EchoRequest.shorthand_deprecated_field": + return protoreflect.ValueOfString("") + case "testpb.EchoRequest.hidden_bool": + return protoreflect.ValueOfBool(false) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.EchoRequest")) + } + panic(fmt.Errorf("message testpb.EchoRequest does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_EchoRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in testpb.EchoRequest", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_EchoRequest) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_EchoRequest) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_EchoRequest) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_EchoRequest) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*EchoRequest) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.U32 != 0 { + n += 1 + runtime.Sov(uint64(x.U32)) + } + if x.U64 != 0 { + n += 1 + runtime.Sov(uint64(x.U64)) + } + l = len(x.Str) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Bz) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.Timestamp != nil { + l = options.Size(x.Timestamp) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.Duration != nil { + l = options.Size(x.Duration) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.I32 != 0 { + n += 1 + runtime.Sov(uint64(x.I32)) + } + if x.I64 != 0 { + n += 1 + runtime.Sov(uint64(x.I64)) + } + if x.ABool { + n += 2 + } + if x.AnEnum != 0 { + n += 2 + runtime.Sov(uint64(x.AnEnum)) + } + if x.AMessage != nil { + l = options.Size(x.AMessage) + n += 2 + l + runtime.Sov(uint64(l)) + } + if x.ACoin != nil { + l = options.Size(x.ACoin) + n += 2 + l + runtime.Sov(uint64(l)) + } + l = len(x.AnAddress) + if l > 0 { + n += 2 + l + runtime.Sov(uint64(l)) + } + if x.Page != nil { + l = options.Size(x.Page) + n += 2 + l + runtime.Sov(uint64(l)) + } + if len(x.Bools) > 0 { + n += 2 + runtime.Sov(uint64(len(x.Bools))) + len(x.Bools)*1 + } + if len(x.Uints) > 0 { + l = 0 + for _, e := range x.Uints { + l += runtime.Sov(uint64(e)) + } + n += 2 + runtime.Sov(uint64(l)) + l + } + if len(x.Strings) > 0 { + for _, s := range x.Strings { + l = len(s) + n += 2 + l + runtime.Sov(uint64(l)) + } + } + if len(x.Enums) > 0 { + l = 0 + for _, e := range x.Enums { + l += runtime.Sov(uint64(e)) + } + n += 2 + runtime.Sov(uint64(l)) + l + } + if len(x.Durations) > 0 { + for _, e := range x.Durations { + l = options.Size(e) + n += 2 + l + runtime.Sov(uint64(l)) + } + } + if len(x.SomeMessages) > 0 { + for _, e := range x.SomeMessages { + l = options.Size(e) + n += 2 + l + runtime.Sov(uint64(l)) + } + } + if x.Positional1 != 0 { + n += 2 + runtime.Sov(uint64(x.Positional1)) + } + l = len(x.Positional2) + if l > 0 { + n += 2 + l + runtime.Sov(uint64(l)) + } + if len(x.Positional3Varargs) > 0 { + for _, e := range x.Positional3Varargs { + l = options.Size(e) + n += 2 + l + runtime.Sov(uint64(l)) + } + } + l = len(x.DeprecatedField) + if l > 0 { + n += 2 + l + runtime.Sov(uint64(l)) + } + l = len(x.ShorthandDeprecatedField) + if l > 0 { + n += 2 + l + runtime.Sov(uint64(l)) + } + if x.HiddenBool { + n += 3 + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*EchoRequest) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.HiddenBool { + i-- + if x.HiddenBool { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x2 + i-- + dAtA[i] = 0x80 + } + if len(x.ShorthandDeprecatedField) > 0 { + i -= len(x.ShorthandDeprecatedField) + copy(dAtA[i:], x.ShorthandDeprecatedField) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ShorthandDeprecatedField))) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xfa + } + if len(x.DeprecatedField) > 0 { + i -= len(x.DeprecatedField) + copy(dAtA[i:], x.DeprecatedField) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.DeprecatedField))) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xf2 + } + if len(x.Positional3Varargs) > 0 { + for iNdEx := len(x.Positional3Varargs) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.Positional3Varargs[iNdEx]) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xea + } + } + if len(x.Positional2) > 0 { + i -= len(x.Positional2) + copy(dAtA[i:], x.Positional2) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Positional2))) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xe2 + } + if x.Positional1 != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.Positional1)) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xd8 + } + if len(x.SomeMessages) > 0 { + for iNdEx := len(x.SomeMessages) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.SomeMessages[iNdEx]) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xd2 + } + } + if len(x.Durations) > 0 { + for iNdEx := len(x.Durations) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.Durations[iNdEx]) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xca + } + } + if len(x.Enums) > 0 { + var pksize2 int + for _, num := range x.Enums { + pksize2 += runtime.Sov(uint64(num)) + } + i -= pksize2 + j1 := i + for _, num1 := range x.Enums { + num := uint64(num1) + for num >= 1<<7 { + dAtA[j1] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j1++ + } + dAtA[j1] = uint8(num) + j1++ + } + i = runtime.EncodeVarint(dAtA, i, uint64(pksize2)) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xc2 + } + if len(x.Strings) > 0 { + for iNdEx := len(x.Strings) - 1; iNdEx >= 0; iNdEx-- { + i -= len(x.Strings[iNdEx]) + copy(dAtA[i:], x.Strings[iNdEx]) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Strings[iNdEx]))) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xba + } + } + if len(x.Uints) > 0 { + var pksize4 int + for _, num := range x.Uints { + pksize4 += runtime.Sov(uint64(num)) + } + i -= pksize4 + j3 := i + for _, num := range x.Uints { + for num >= 1<<7 { + dAtA[j3] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j3++ + } + dAtA[j3] = uint8(num) + j3++ + } + i = runtime.EncodeVarint(dAtA, i, uint64(pksize4)) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xb2 + } + if len(x.Bools) > 0 { + for iNdEx := len(x.Bools) - 1; iNdEx >= 0; iNdEx-- { + i-- + if x.Bools[iNdEx] { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + } + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Bools))) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xaa + } + if x.Page != nil { + encoded, err := options.Marshal(x.Page) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xa2 + } + if len(x.AnAddress) > 0 { + i -= len(x.AnAddress) + copy(dAtA[i:], x.AnAddress) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.AnAddress))) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0x9a + } + if x.ACoin != nil { + encoded, err := options.Marshal(x.ACoin) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0x92 + } + if x.AMessage != nil { + encoded, err := options.Marshal(x.AMessage) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0x8a + } + if x.AnEnum != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.AnEnum)) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0x80 + } + if x.ABool { + i-- + if x.ABool { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x78 + } + if x.I64 != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.I64)) + i-- + dAtA[i] = 0x50 + } + if x.I32 != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.I32)) + i-- + dAtA[i] = 0x38 + } + if x.Duration != nil { + encoded, err := options.Marshal(x.Duration) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x32 + } + if x.Timestamp != nil { + encoded, err := options.Marshal(x.Timestamp) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x2a + } + if len(x.Bz) > 0 { + i -= len(x.Bz) + copy(dAtA[i:], x.Bz) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Bz))) + i-- + dAtA[i] = 0x22 + } + if len(x.Str) > 0 { + i -= len(x.Str) + copy(dAtA[i:], x.Str) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Str))) + i-- + dAtA[i] = 0x1a + } + if x.U64 != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.U64)) + i-- + dAtA[i] = 0x10 + } + if x.U32 != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.U32)) + i-- + dAtA[i] = 0x8 + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*EchoRequest) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: EchoRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: EchoRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field U32", wireType) + } + x.U32 = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + x.U32 |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field U64", wireType) + } + x.U64 = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + x.U64 |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Str", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Str = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Bz", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Bz = append(x.Bz[:0], dAtA[iNdEx:postIndex]...) + if x.Bz == nil { + x.Bz = []byte{} + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.Timestamp == nil { + x.Timestamp = ×tamppb.Timestamp{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Timestamp); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Duration", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.Duration == nil { + x.Duration = &durationpb.Duration{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Duration); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 7: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field I32", wireType) + } + x.I32 = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + x.I32 |= int32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 10: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field I64", wireType) + } + x.I64 = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + x.I64 |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 15: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ABool", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + x.ABool = bool(v != 0) + case 16: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field AnEnum", wireType) + } + x.AnEnum = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + x.AnEnum |= Enum(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 17: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field AMessage", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.AMessage == nil { + x.AMessage = &AMessage{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.AMessage); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 18: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ACoin", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.ACoin == nil { + x.ACoin = &v1beta1.Coin{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.ACoin); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 19: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field AnAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.AnAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 20: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Page", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.Page == nil { + x.Page = &v1beta11.PageRequest{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Page); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 21: + if wireType == 0 { + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + x.Bools = append(x.Bools, bool(v != 0)) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + packedLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + var elementCount int + elementCount = packedLen + if elementCount != 0 && len(x.Bools) == 0 { + x.Bools = make([]bool, 0, elementCount) + } + for iNdEx < postIndex { + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + x.Bools = append(x.Bools, bool(v != 0)) + } + } else { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Bools", wireType) + } + case 22: + if wireType == 0 { + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + x.Uints = append(x.Uints, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + packedLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + var elementCount int + var count int + for _, integer := range dAtA[iNdEx:postIndex] { + if integer < 128 { + count++ + } + } + elementCount = count + if elementCount != 0 && len(x.Uints) == 0 { + x.Uints = make([]uint32, 0, elementCount) + } + for iNdEx < postIndex { + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + x.Uints = append(x.Uints, v) + } + } else { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Uints", wireType) + } + case 23: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Strings", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Strings = append(x.Strings, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 24: + if wireType == 0 { + var v Enum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= Enum(b&0x7F) << shift + if b < 0x80 { + break + } + } + x.Enums = append(x.Enums, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + packedLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + var elementCount int + if elementCount != 0 && len(x.Enums) == 0 { + x.Enums = make([]Enum, 0, elementCount) + } + for iNdEx < postIndex { + var v Enum + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= Enum(b&0x7F) << shift + if b < 0x80 { + break + } + } + x.Enums = append(x.Enums, v) + } + } else { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Enums", wireType) + } + case 25: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Durations", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Durations = append(x.Durations, &durationpb.Duration{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Durations[len(x.Durations)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 26: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field SomeMessages", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.SomeMessages = append(x.SomeMessages, &AMessage{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.SomeMessages[len(x.SomeMessages)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 27: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Positional1", wireType) + } + x.Positional1 = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + x.Positional1 |= int32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 28: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Positional2", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Positional2 = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 29: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Positional3Varargs", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Positional3Varargs = append(x.Positional3Varargs, &v1beta1.Coin{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Positional3Varargs[len(x.Positional3Varargs)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 30: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field DeprecatedField", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.DeprecatedField = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 31: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ShorthandDeprecatedField", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.ShorthandDeprecatedField = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 32: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field HiddenBool", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + x.HiddenBool = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_AMessage protoreflect.MessageDescriptor + fd_AMessage_bar protoreflect.FieldDescriptor + fd_AMessage_baz protoreflect.FieldDescriptor +) + +func init() { + file_testpb_query_proto_init() + md_AMessage = File_testpb_query_proto.Messages().ByName("AMessage") + fd_AMessage_bar = md_AMessage.Fields().ByName("bar") + fd_AMessage_baz = md_AMessage.Fields().ByName("baz") +} + +var _ protoreflect.Message = (*fastReflection_AMessage)(nil) + +type fastReflection_AMessage AMessage + +func (x *AMessage) ProtoReflect() protoreflect.Message { + return (*fastReflection_AMessage)(x) +} + +func (x *AMessage) slowProtoReflect() protoreflect.Message { + mi := &file_testpb_query_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_AMessage_messageType fastReflection_AMessage_messageType +var _ protoreflect.MessageType = fastReflection_AMessage_messageType{} + +type fastReflection_AMessage_messageType struct{} + +func (x fastReflection_AMessage_messageType) Zero() protoreflect.Message { + return (*fastReflection_AMessage)(nil) +} +func (x fastReflection_AMessage_messageType) New() protoreflect.Message { + return new(fastReflection_AMessage) +} +func (x fastReflection_AMessage_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_AMessage +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_AMessage) Descriptor() protoreflect.MessageDescriptor { + return md_AMessage +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_AMessage) Type() protoreflect.MessageType { + return _fastReflection_AMessage_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_AMessage) New() protoreflect.Message { + return new(fastReflection_AMessage) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_AMessage) Interface() protoreflect.ProtoMessage { + return (*AMessage)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_AMessage) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Bar != "" { + value := protoreflect.ValueOfString(x.Bar) + if !f(fd_AMessage_bar, value) { + return + } + } + if x.Baz != int32(0) { + value := protoreflect.ValueOfInt32(x.Baz) + if !f(fd_AMessage_baz, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_AMessage) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "testpb.AMessage.bar": + return x.Bar != "" + case "testpb.AMessage.baz": + return x.Baz != int32(0) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.AMessage")) + } + panic(fmt.Errorf("message testpb.AMessage does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_AMessage) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "testpb.AMessage.bar": + x.Bar = "" + case "testpb.AMessage.baz": + x.Baz = int32(0) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.AMessage")) + } + panic(fmt.Errorf("message testpb.AMessage does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_AMessage) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "testpb.AMessage.bar": + value := x.Bar + return protoreflect.ValueOfString(value) + case "testpb.AMessage.baz": + value := x.Baz + return protoreflect.ValueOfInt32(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.AMessage")) + } + panic(fmt.Errorf("message testpb.AMessage does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_AMessage) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "testpb.AMessage.bar": + x.Bar = value.Interface().(string) + case "testpb.AMessage.baz": + x.Baz = int32(value.Int()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.AMessage")) + } + panic(fmt.Errorf("message testpb.AMessage does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_AMessage) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "testpb.AMessage.bar": + panic(fmt.Errorf("field bar of message testpb.AMessage is not mutable")) + case "testpb.AMessage.baz": + panic(fmt.Errorf("field baz of message testpb.AMessage is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.AMessage")) + } + panic(fmt.Errorf("message testpb.AMessage does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_AMessage) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "testpb.AMessage.bar": + return protoreflect.ValueOfString("") + case "testpb.AMessage.baz": + return protoreflect.ValueOfInt32(int32(0)) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.AMessage")) + } + panic(fmt.Errorf("message testpb.AMessage does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_AMessage) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in testpb.AMessage", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_AMessage) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_AMessage) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_AMessage) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_AMessage) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*AMessage) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.Bar) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.Baz != 0 { + n += 1 + runtime.Sov(uint64(x.Baz)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*AMessage) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.Baz != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.Baz)) + i-- + dAtA[i] = 0x10 + } + if len(x.Bar) > 0 { + i -= len(x.Bar) + copy(dAtA[i:], x.Bar) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Bar))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*AMessage) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: AMessage: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: AMessage: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Bar", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Bar = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Baz", wireType) + } + x.Baz = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + x.Baz |= int32(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_EchoResponse protoreflect.MessageDescriptor + fd_EchoResponse_request protoreflect.FieldDescriptor +) + +func init() { + file_testpb_query_proto_init() + md_EchoResponse = File_testpb_query_proto.Messages().ByName("EchoResponse") + fd_EchoResponse_request = md_EchoResponse.Fields().ByName("request") +} + +var _ protoreflect.Message = (*fastReflection_EchoResponse)(nil) + +type fastReflection_EchoResponse EchoResponse + +func (x *EchoResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_EchoResponse)(x) +} + +func (x *EchoResponse) slowProtoReflect() protoreflect.Message { + mi := &file_testpb_query_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_EchoResponse_messageType fastReflection_EchoResponse_messageType +var _ protoreflect.MessageType = fastReflection_EchoResponse_messageType{} + +type fastReflection_EchoResponse_messageType struct{} + +func (x fastReflection_EchoResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_EchoResponse)(nil) +} +func (x fastReflection_EchoResponse_messageType) New() protoreflect.Message { + return new(fastReflection_EchoResponse) +} +func (x fastReflection_EchoResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_EchoResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_EchoResponse) Descriptor() protoreflect.MessageDescriptor { + return md_EchoResponse +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_EchoResponse) Type() protoreflect.MessageType { + return _fastReflection_EchoResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_EchoResponse) New() protoreflect.Message { + return new(fastReflection_EchoResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_EchoResponse) Interface() protoreflect.ProtoMessage { + return (*EchoResponse)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_EchoResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Request != nil { + value := protoreflect.ValueOfMessage(x.Request.ProtoReflect()) + if !f(fd_EchoResponse_request, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_EchoResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "testpb.EchoResponse.request": + return x.Request != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.EchoResponse")) + } + panic(fmt.Errorf("message testpb.EchoResponse does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_EchoResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "testpb.EchoResponse.request": + x.Request = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.EchoResponse")) + } + panic(fmt.Errorf("message testpb.EchoResponse does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_EchoResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "testpb.EchoResponse.request": + value := x.Request + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.EchoResponse")) + } + panic(fmt.Errorf("message testpb.EchoResponse does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_EchoResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "testpb.EchoResponse.request": + x.Request = value.Message().Interface().(*EchoRequest) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.EchoResponse")) + } + panic(fmt.Errorf("message testpb.EchoResponse does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_EchoResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "testpb.EchoResponse.request": + if x.Request == nil { + x.Request = new(EchoRequest) + } + return protoreflect.ValueOfMessage(x.Request.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.EchoResponse")) + } + panic(fmt.Errorf("message testpb.EchoResponse does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_EchoResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "testpb.EchoResponse.request": + m := new(EchoRequest) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.EchoResponse")) + } + panic(fmt.Errorf("message testpb.EchoResponse does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_EchoResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in testpb.EchoResponse", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_EchoResponse) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_EchoResponse) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_EchoResponse) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_EchoResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*EchoResponse) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.Request != nil { + l = options.Size(x.Request) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*EchoResponse) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.Request != nil { + encoded, err := options.Marshal(x.Request) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*EchoResponse) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: EchoResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: EchoResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Request", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.Request == nil { + x.Request = &EchoRequest{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Request); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.0 +// protoc (unknown) +// source: testpb/query.proto + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type Enum int32 + +const ( + Enum_ENUM_UNSPECIFIED Enum = 0 + Enum_ENUM_ONE Enum = 1 + Enum_ENUM_TWO Enum = 2 + Enum_ENUM_FIVE Enum = 5 + Enum_ENUM_NEG_THREE Enum = -3 +) + +// Enum value maps for Enum. +var ( + Enum_name = map[int32]string{ + 0: "ENUM_UNSPECIFIED", + 1: "ENUM_ONE", + 2: "ENUM_TWO", + 5: "ENUM_FIVE", + -3: "ENUM_NEG_THREE", + } + Enum_value = map[string]int32{ + "ENUM_UNSPECIFIED": 0, + "ENUM_ONE": 1, + "ENUM_TWO": 2, + "ENUM_FIVE": 5, + "ENUM_NEG_THREE": -3, + } +) + +func (x Enum) Enum() *Enum { + p := new(Enum) + *p = x + return p +} + +func (x Enum) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Enum) Descriptor() protoreflect.EnumDescriptor { + return file_testpb_query_proto_enumTypes[0].Descriptor() +} + +func (Enum) Type() protoreflect.EnumType { + return &file_testpb_query_proto_enumTypes[0] +} + +func (x Enum) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Enum.Descriptor instead. +func (Enum) EnumDescriptor() ([]byte, []int) { + return file_testpb_query_proto_rawDescGZIP(), []int{0} +} + +type EchoRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // u32 is an uint32 + U32 uint32 `protobuf:"varint,1,opt,name=u32,proto3" json:"u32,omitempty"` + U64 uint64 `protobuf:"varint,2,opt,name=u64,proto3" json:"u64,omitempty"` + Str string `protobuf:"bytes,3,opt,name=str,proto3" json:"str,omitempty"` + Bz []byte `protobuf:"bytes,4,opt,name=bz,proto3" json:"bz,omitempty"` + Timestamp *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + Duration *durationpb.Duration `protobuf:"bytes,6,opt,name=duration,proto3" json:"duration,omitempty"` + I32 int32 `protobuf:"varint,7,opt,name=i32,proto3" json:"i32,omitempty"` + I64 int64 `protobuf:"varint,10,opt,name=i64,proto3" json:"i64,omitempty"` + ABool bool `protobuf:"varint,15,opt,name=a_bool,json=aBool,proto3" json:"a_bool,omitempty"` + AnEnum Enum `protobuf:"varint,16,opt,name=an_enum,json=anEnum,proto3,enum=testpb.Enum" json:"an_enum,omitempty"` + AMessage *AMessage `protobuf:"bytes,17,opt,name=a_message,json=aMessage,proto3" json:"a_message,omitempty"` + ACoin *v1beta1.Coin `protobuf:"bytes,18,opt,name=a_coin,json=aCoin,proto3" json:"a_coin,omitempty"` + AnAddress string `protobuf:"bytes,19,opt,name=an_address,json=anAddress,proto3" json:"an_address,omitempty"` + Page *v1beta11.PageRequest `protobuf:"bytes,20,opt,name=page,proto3" json:"page,omitempty"` + Bools []bool `protobuf:"varint,21,rep,packed,name=bools,proto3" json:"bools,omitempty"` + Uints []uint32 `protobuf:"varint,22,rep,packed,name=uints,proto3" json:"uints,omitempty"` + Strings []string `protobuf:"bytes,23,rep,name=strings,proto3" json:"strings,omitempty"` + Enums []Enum `protobuf:"varint,24,rep,packed,name=enums,proto3,enum=testpb.Enum" json:"enums,omitempty"` + Durations []*durationpb.Duration `protobuf:"bytes,25,rep,name=durations,proto3" json:"durations,omitempty"` + SomeMessages []*AMessage `protobuf:"bytes,26,rep,name=some_messages,json=someMessages,proto3" json:"some_messages,omitempty"` + Positional1 int32 `protobuf:"varint,27,opt,name=positional1,proto3" json:"positional1,omitempty"` + Positional2 string `protobuf:"bytes,28,opt,name=positional2,proto3" json:"positional2,omitempty"` + Positional3Varargs []*v1beta1.Coin `protobuf:"bytes,29,rep,name=positional3_varargs,json=positional3Varargs,proto3" json:"positional3_varargs,omitempty"` + DeprecatedField string `protobuf:"bytes,30,opt,name=deprecated_field,json=deprecatedField,proto3" json:"deprecated_field,omitempty"` + ShorthandDeprecatedField string `protobuf:"bytes,31,opt,name=shorthand_deprecated_field,json=shorthandDeprecatedField,proto3" json:"shorthand_deprecated_field,omitempty"` + HiddenBool bool `protobuf:"varint,32,opt,name=hidden_bool,json=hiddenBool,proto3" json:"hidden_bool,omitempty"` +} + +func (x *EchoRequest) Reset() { + *x = EchoRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_testpb_query_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *EchoRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EchoRequest) ProtoMessage() {} + +// Deprecated: Use EchoRequest.ProtoReflect.Descriptor instead. +func (*EchoRequest) Descriptor() ([]byte, []int) { + return file_testpb_query_proto_rawDescGZIP(), []int{0} +} + +func (x *EchoRequest) GetU32() uint32 { + if x != nil { + return x.U32 + } + return 0 +} + +func (x *EchoRequest) GetU64() uint64 { + if x != nil { + return x.U64 + } + return 0 +} + +func (x *EchoRequest) GetStr() string { + if x != nil { + return x.Str + } + return "" +} + +func (x *EchoRequest) GetBz() []byte { + if x != nil { + return x.Bz + } + return nil +} + +func (x *EchoRequest) GetTimestamp() *timestamppb.Timestamp { + if x != nil { + return x.Timestamp + } + return nil +} + +func (x *EchoRequest) GetDuration() *durationpb.Duration { + if x != nil { + return x.Duration + } + return nil +} + +func (x *EchoRequest) GetI32() int32 { + if x != nil { + return x.I32 + } + return 0 +} + +func (x *EchoRequest) GetI64() int64 { + if x != nil { + return x.I64 + } + return 0 +} + +func (x *EchoRequest) GetABool() bool { + if x != nil { + return x.ABool + } + return false +} + +func (x *EchoRequest) GetAnEnum() Enum { + if x != nil { + return x.AnEnum + } + return Enum_ENUM_UNSPECIFIED +} + +func (x *EchoRequest) GetAMessage() *AMessage { + if x != nil { + return x.AMessage + } + return nil +} + +func (x *EchoRequest) GetACoin() *v1beta1.Coin { + if x != nil { + return x.ACoin + } + return nil +} + +func (x *EchoRequest) GetAnAddress() string { + if x != nil { + return x.AnAddress + } + return "" +} + +func (x *EchoRequest) GetPage() *v1beta11.PageRequest { + if x != nil { + return x.Page + } + return nil +} + +func (x *EchoRequest) GetBools() []bool { + if x != nil { + return x.Bools + } + return nil +} + +func (x *EchoRequest) GetUints() []uint32 { + if x != nil { + return x.Uints + } + return nil +} + +func (x *EchoRequest) GetStrings() []string { + if x != nil { + return x.Strings + } + return nil +} + +func (x *EchoRequest) GetEnums() []Enum { + if x != nil { + return x.Enums + } + return nil +} + +func (x *EchoRequest) GetDurations() []*durationpb.Duration { + if x != nil { + return x.Durations + } + return nil +} + +func (x *EchoRequest) GetSomeMessages() []*AMessage { + if x != nil { + return x.SomeMessages + } + return nil +} + +func (x *EchoRequest) GetPositional1() int32 { + if x != nil { + return x.Positional1 + } + return 0 +} + +func (x *EchoRequest) GetPositional2() string { + if x != nil { + return x.Positional2 + } + return "" +} + +func (x *EchoRequest) GetPositional3Varargs() []*v1beta1.Coin { + if x != nil { + return x.Positional3Varargs + } + return nil +} + +func (x *EchoRequest) GetDeprecatedField() string { + if x != nil { + return x.DeprecatedField + } + return "" +} + +func (x *EchoRequest) GetShorthandDeprecatedField() string { + if x != nil { + return x.ShorthandDeprecatedField + } + return "" +} + +func (x *EchoRequest) GetHiddenBool() bool { + if x != nil { + return x.HiddenBool + } + return false +} + +type AMessage struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Bar string `protobuf:"bytes,1,opt,name=bar,proto3" json:"bar,omitempty"` + Baz int32 `protobuf:"varint,2,opt,name=baz,proto3" json:"baz,omitempty"` +} + +func (x *AMessage) Reset() { + *x = AMessage{} + if protoimpl.UnsafeEnabled { + mi := &file_testpb_query_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AMessage) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AMessage) ProtoMessage() {} + +// Deprecated: Use AMessage.ProtoReflect.Descriptor instead. +func (*AMessage) Descriptor() ([]byte, []int) { + return file_testpb_query_proto_rawDescGZIP(), []int{1} +} + +func (x *AMessage) GetBar() string { + if x != nil { + return x.Bar + } + return "" +} + +func (x *AMessage) GetBaz() int32 { + if x != nil { + return x.Baz + } + return 0 +} + +type EchoResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Request *EchoRequest `protobuf:"bytes,1,opt,name=request,proto3" json:"request,omitempty"` +} + +func (x *EchoResponse) Reset() { + *x = EchoResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_testpb_query_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *EchoResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EchoResponse) ProtoMessage() {} + +// Deprecated: Use EchoResponse.ProtoReflect.Descriptor instead. +func (*EchoResponse) Descriptor() ([]byte, []int) { + return file_testpb_query_proto_rawDescGZIP(), []int{2} +} + +func (x *EchoResponse) GetRequest() *EchoRequest { + if x != nil { + return x.Request + } + return nil +} + +var File_testpb_query_proto protoreflect.FileDescriptor + +var file_testpb_query_proto_rawDesc = []byte{ + 0x0a, 0x12, 0x74, 0x65, 0x73, 0x74, 0x70, 0x62, 0x2f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x06, 0x74, 0x65, 0x73, 0x74, 0x70, 0x62, 0x1a, 0x1f, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, + 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, + 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x63, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2f, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x62, 0x61, 0x73, + 0x65, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x63, 0x6f, 0x69, 0x6e, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xf0, 0x07, 0x0a, 0x0b, 0x45, 0x63, 0x68, 0x6f, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x33, 0x32, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0d, 0x52, 0x03, 0x75, 0x33, 0x32, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x36, 0x34, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x04, 0x52, 0x03, 0x75, 0x36, 0x34, 0x12, 0x10, 0x0a, 0x03, 0x73, 0x74, 0x72, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x73, 0x74, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x62, 0x7a, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x02, 0x62, 0x7a, 0x12, 0x38, 0x0a, 0x09, 0x74, 0x69, + 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, + 0x74, 0x61, 0x6d, 0x70, 0x12, 0x35, 0x0a, 0x08, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x52, 0x08, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x10, 0x0a, 0x03, 0x69, + 0x33, 0x32, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x69, 0x33, 0x32, 0x12, 0x10, 0x0a, + 0x03, 0x69, 0x36, 0x34, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x69, 0x36, 0x34, 0x12, + 0x15, 0x0a, 0x06, 0x61, 0x5f, 0x62, 0x6f, 0x6f, 0x6c, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x05, 0x61, 0x42, 0x6f, 0x6f, 0x6c, 0x12, 0x25, 0x0a, 0x07, 0x61, 0x6e, 0x5f, 0x65, 0x6e, 0x75, + 0x6d, 0x18, 0x10, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0c, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x70, 0x62, + 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x52, 0x06, 0x61, 0x6e, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x2d, 0x0a, + 0x09, 0x61, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x11, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x10, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x70, 0x62, 0x2e, 0x41, 0x4d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x52, 0x08, 0x61, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x30, 0x0a, 0x06, + 0x61, 0x5f, 0x63, 0x6f, 0x69, 0x6e, 0x18, 0x12, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x52, 0x05, 0x61, 0x43, 0x6f, 0x69, 0x6e, 0x12, 0x37, + 0x0a, 0x0a, 0x61, 0x6e, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x13, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x09, 0x61, 0x6e, + 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x3a, 0x0a, 0x04, 0x70, 0x61, 0x67, 0x65, 0x18, + 0x14, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, + 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x04, 0x70, + 0x61, 0x67, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x6f, 0x6f, 0x6c, 0x73, 0x18, 0x15, 0x20, 0x03, + 0x28, 0x08, 0x52, 0x05, 0x62, 0x6f, 0x6f, 0x6c, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x75, 0x69, 0x6e, + 0x74, 0x73, 0x18, 0x16, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x05, 0x75, 0x69, 0x6e, 0x74, 0x73, 0x12, + 0x18, 0x0a, 0x07, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x17, 0x20, 0x03, 0x28, 0x09, + 0x52, 0x07, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x22, 0x0a, 0x05, 0x65, 0x6e, 0x75, + 0x6d, 0x73, 0x18, 0x18, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x0c, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x70, + 0x62, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x52, 0x05, 0x65, 0x6e, 0x75, 0x6d, 0x73, 0x12, 0x37, 0x0a, + 0x09, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x19, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x64, 0x75, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x35, 0x0a, 0x0d, 0x73, 0x6f, 0x6d, 0x65, 0x5f, 0x6d, + 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x18, 0x1a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, + 0x74, 0x65, 0x73, 0x74, 0x70, 0x62, 0x2e, 0x41, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, + 0x0c, 0x73, 0x6f, 0x6d, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x12, 0x20, 0x0a, + 0x0b, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x31, 0x18, 0x1b, 0x20, 0x01, + 0x28, 0x05, 0x52, 0x0b, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x31, 0x12, + 0x20, 0x0a, 0x0b, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x32, 0x18, 0x1c, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, + 0x32, 0x12, 0x4a, 0x0a, 0x13, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x33, + 0x5f, 0x76, 0x61, 0x72, 0x61, 0x72, 0x67, 0x73, 0x18, 0x1d, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, + 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x52, 0x12, 0x70, 0x6f, 0x73, 0x69, 0x74, + 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x33, 0x56, 0x61, 0x72, 0x61, 0x72, 0x67, 0x73, 0x12, 0x29, 0x0a, + 0x10, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x66, 0x69, 0x65, 0x6c, + 0x64, 0x18, 0x1e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, + 0x74, 0x65, 0x64, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x3c, 0x0a, 0x1a, 0x73, 0x68, 0x6f, 0x72, + 0x74, 0x68, 0x61, 0x6e, 0x64, 0x5f, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, + 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x1f, 0x20, 0x01, 0x28, 0x09, 0x52, 0x18, 0x73, 0x68, + 0x6f, 0x72, 0x74, 0x68, 0x61, 0x6e, 0x64, 0x44, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, + 0x64, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x68, 0x69, 0x64, 0x64, 0x65, 0x6e, + 0x5f, 0x62, 0x6f, 0x6f, 0x6c, 0x18, 0x20, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x68, 0x69, 0x64, + 0x64, 0x65, 0x6e, 0x42, 0x6f, 0x6f, 0x6c, 0x22, 0x2e, 0x0a, 0x08, 0x41, 0x4d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x62, 0x61, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x03, 0x62, 0x61, 0x72, 0x12, 0x10, 0x0a, 0x03, 0x62, 0x61, 0x7a, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x05, 0x52, 0x03, 0x62, 0x61, 0x7a, 0x22, 0x3d, 0x0a, 0x0c, 0x45, 0x63, 0x68, 0x6f, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2d, 0x0a, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x70, + 0x62, 0x2e, 0x45, 0x63, 0x68, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x07, 0x72, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2a, 0x64, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x14, + 0x0a, 0x10, 0x45, 0x4e, 0x55, 0x4d, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, + 0x45, 0x44, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x45, 0x4e, 0x55, 0x4d, 0x5f, 0x4f, 0x4e, 0x45, + 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x45, 0x4e, 0x55, 0x4d, 0x5f, 0x54, 0x57, 0x4f, 0x10, 0x02, + 0x12, 0x0d, 0x0a, 0x09, 0x45, 0x4e, 0x55, 0x4d, 0x5f, 0x46, 0x49, 0x56, 0x45, 0x10, 0x05, 0x12, + 0x1b, 0x0a, 0x0e, 0x45, 0x4e, 0x55, 0x4d, 0x5f, 0x4e, 0x45, 0x47, 0x5f, 0x54, 0x48, 0x52, 0x45, + 0x45, 0x10, 0xfd, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0x32, 0x3a, 0x0a, 0x05, + 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x31, 0x0a, 0x04, 0x45, 0x63, 0x68, 0x6f, 0x12, 0x13, 0x2e, + 0x74, 0x65, 0x73, 0x74, 0x70, 0x62, 0x2e, 0x45, 0x63, 0x68, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x70, 0x62, 0x2e, 0x45, 0x63, 0x68, 0x6f, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x88, 0x01, 0x0a, 0x0a, 0x63, 0x6f, 0x6d, + 0x2e, 0x74, 0x65, 0x73, 0x74, 0x70, 0x62, 0x42, 0x0a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x36, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, + 0x73, 0x64, 0x6b, 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2f, 0x76, 0x32, 0x2f, 0x69, 0x6e, + 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x70, 0x62, 0xa2, 0x02, 0x03, + 0x54, 0x58, 0x58, 0xaa, 0x02, 0x06, 0x54, 0x65, 0x73, 0x74, 0x70, 0x62, 0xca, 0x02, 0x06, 0x54, + 0x65, 0x73, 0x74, 0x70, 0x62, 0xe2, 0x02, 0x12, 0x54, 0x65, 0x73, 0x74, 0x70, 0x62, 0x5c, 0x47, + 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x06, 0x54, 0x65, 0x73, + 0x74, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_testpb_query_proto_rawDescOnce sync.Once + file_testpb_query_proto_rawDescData = file_testpb_query_proto_rawDesc +) + +func file_testpb_query_proto_rawDescGZIP() []byte { + file_testpb_query_proto_rawDescOnce.Do(func() { + file_testpb_query_proto_rawDescData = protoimpl.X.CompressGZIP(file_testpb_query_proto_rawDescData) + }) + return file_testpb_query_proto_rawDescData +} + +var file_testpb_query_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_testpb_query_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_testpb_query_proto_goTypes = []interface{}{ + (Enum)(0), // 0: testpb.Enum + (*EchoRequest)(nil), // 1: testpb.EchoRequest + (*AMessage)(nil), // 2: testpb.AMessage + (*EchoResponse)(nil), // 3: testpb.EchoResponse + (*timestamppb.Timestamp)(nil), // 4: google.protobuf.Timestamp + (*durationpb.Duration)(nil), // 5: google.protobuf.Duration + (*v1beta1.Coin)(nil), // 6: cosmos.base.v1beta1.Coin + (*v1beta11.PageRequest)(nil), // 7: cosmos.base.query.v1beta1.PageRequest +} +var file_testpb_query_proto_depIdxs = []int32{ + 4, // 0: testpb.EchoRequest.timestamp:type_name -> google.protobuf.Timestamp + 5, // 1: testpb.EchoRequest.duration:type_name -> google.protobuf.Duration + 0, // 2: testpb.EchoRequest.an_enum:type_name -> testpb.Enum + 2, // 3: testpb.EchoRequest.a_message:type_name -> testpb.AMessage + 6, // 4: testpb.EchoRequest.a_coin:type_name -> cosmos.base.v1beta1.Coin + 7, // 5: testpb.EchoRequest.page:type_name -> cosmos.base.query.v1beta1.PageRequest + 0, // 6: testpb.EchoRequest.enums:type_name -> testpb.Enum + 5, // 7: testpb.EchoRequest.durations:type_name -> google.protobuf.Duration + 2, // 8: testpb.EchoRequest.some_messages:type_name -> testpb.AMessage + 6, // 9: testpb.EchoRequest.positional3_varargs:type_name -> cosmos.base.v1beta1.Coin + 1, // 10: testpb.EchoResponse.request:type_name -> testpb.EchoRequest + 1, // 11: testpb.Query.Echo:input_type -> testpb.EchoRequest + 3, // 12: testpb.Query.Echo:output_type -> testpb.EchoResponse + 12, // [12:13] is the sub-list for method output_type + 11, // [11:12] is the sub-list for method input_type + 11, // [11:11] is the sub-list for extension type_name + 11, // [11:11] is the sub-list for extension extendee + 0, // [0:11] is the sub-list for field type_name +} + +func init() { file_testpb_query_proto_init() } +func file_testpb_query_proto_init() { + if File_testpb_query_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_testpb_query_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EchoRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_testpb_query_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AMessage); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_testpb_query_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EchoResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_testpb_query_proto_rawDesc, + NumEnums: 1, + NumMessages: 3, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_testpb_query_proto_goTypes, + DependencyIndexes: file_testpb_query_proto_depIdxs, + EnumInfos: file_testpb_query_proto_enumTypes, + MessageInfos: file_testpb_query_proto_msgTypes, + }.Build() + File_testpb_query_proto = out.File + file_testpb_query_proto_rawDesc = nil + file_testpb_query_proto_goTypes = nil + file_testpb_query_proto_depIdxs = nil +} diff --git a/client/v2/internal/testpb/query_grpc.pb.go b/client/v2/internal/testpb/query_grpc.pb.go new file mode 100644 index 00000000000..56d177ddc86 --- /dev/null +++ b/client/v2/internal/testpb/query_grpc.pb.go @@ -0,0 +1,107 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.2.0 +// - protoc (unknown) +// source: testpb/query.proto + +package testpb + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +// QueryClient is the client API for Query service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type QueryClient interface { + // Echo returns the request in the response + Echo(ctx context.Context, in *EchoRequest, opts ...grpc.CallOption) (*EchoResponse, error) +} + +type queryClient struct { + cc grpc.ClientConnInterface +} + +func NewQueryClient(cc grpc.ClientConnInterface) QueryClient { + return &queryClient{cc} +} + +func (c *queryClient) Echo(ctx context.Context, in *EchoRequest, opts ...grpc.CallOption) (*EchoResponse, error) { + out := new(EchoResponse) + err := c.cc.Invoke(ctx, "/testpb.Query/Echo", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// QueryServer is the server API for Query service. +// All implementations must embed UnimplementedQueryServer +// for forward compatibility +type QueryServer interface { + // Echo returns the request in the response + Echo(context.Context, *EchoRequest) (*EchoResponse, error) + mustEmbedUnimplementedQueryServer() +} + +// UnimplementedQueryServer must be embedded to have forward compatible implementations. +type UnimplementedQueryServer struct { +} + +func (UnimplementedQueryServer) Echo(context.Context, *EchoRequest) (*EchoResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Echo not implemented") +} +func (UnimplementedQueryServer) mustEmbedUnimplementedQueryServer() {} + +// UnsafeQueryServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to QueryServer will +// result in compilation errors. +type UnsafeQueryServer interface { + mustEmbedUnimplementedQueryServer() +} + +func RegisterQueryServer(s grpc.ServiceRegistrar, srv QueryServer) { + s.RegisterService(&Query_ServiceDesc, srv) +} + +func _Query_Echo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(EchoRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Echo(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/testpb.Query/Echo", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Echo(ctx, req.(*EchoRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// Query_ServiceDesc is the grpc.ServiceDesc for Query service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var Query_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "testpb.Query", + HandlerType: (*QueryServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Echo", + Handler: _Query_Echo_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "testpb/query.proto", +} diff --git a/client/v2/internal/util/util.go b/client/v2/internal/util/util.go new file mode 100644 index 00000000000..18b8d53006a --- /dev/null +++ b/client/v2/internal/util/util.go @@ -0,0 +1,29 @@ +package util + +import ( + "github.com/iancoleman/strcase" + "google.golang.org/protobuf/reflect/protoreflect" + "google.golang.org/protobuf/reflect/protoregistry" + "google.golang.org/protobuf/types/dynamicpb" +) + +func DescriptorKebabName(descriptor protoreflect.Descriptor) string { + return strcase.ToKebab(string(descriptor.Name())) +} + +func DescriptorDocs(descriptor protoreflect.Descriptor) string { + return descriptor.ParentFile().SourceLocations().ByDescriptor(descriptor).LeadingComments +} + +func ResolveMessageType(resolver protoregistry.MessageTypeResolver, descriptor protoreflect.MessageDescriptor) protoreflect.MessageType { + if resolver == nil { + resolver = protoregistry.GlobalTypes + } + + typ, err := resolver.FindMessageByName(descriptor.FullName()) + if err == nil { + return typ + } + + return dynamicpb.NewMessageType(descriptor) +} diff --git a/cosmossdk.io/api/cosmos/base/cli/v1/options.pb.go b/cosmossdk.io/api/cosmos/base/cli/v1/options.pb.go new file mode 100644 index 00000000000..981871598b7 --- /dev/null +++ b/cosmossdk.io/api/cosmos/base/cli/v1/options.pb.go @@ -0,0 +1,2482 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: osmosis/autocli/v1/options.proto + +package cliv1 + +import ( + fmt "fmt" + proto "github.com/gogo/protobuf/proto" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// ModuleOptions describes the CLI options for a Cosmos SDK module. +type ModuleOptions struct { + // tx describes the tx command for the module. + Tx *ServiceCommandDescriptor `protobuf:"bytes,1,opt,name=tx,proto3" json:"tx,omitempty"` + // query describes the query command for the module. + Query *ServiceCommandDescriptor `protobuf:"bytes,2,opt,name=query,proto3" json:"query,omitempty"` +} + +func (m *ModuleOptions) Reset() { *m = ModuleOptions{} } +func (m *ModuleOptions) String() string { return proto.CompactTextString(m) } +func (*ModuleOptions) ProtoMessage() {} +func (*ModuleOptions) Descriptor() ([]byte, []int) { + return fileDescriptor_99a27c3c2ecce4b5, []int{0} +} +func (m *ModuleOptions) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ModuleOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ModuleOptions.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 *ModuleOptions) XXX_Merge(src proto.Message) { + xxx_messageInfo_ModuleOptions.Merge(m, src) +} +func (m *ModuleOptions) XXX_Size() int { + return m.Size() +} +func (m *ModuleOptions) XXX_DiscardUnknown() { + xxx_messageInfo_ModuleOptions.DiscardUnknown(m) +} + +var xxx_messageInfo_ModuleOptions proto.InternalMessageInfo + +func (m *ModuleOptions) GetTx() *ServiceCommandDescriptor { + if m != nil { + return m.Tx + } + return nil +} + +func (m *ModuleOptions) GetQuery() *ServiceCommandDescriptor { + if m != nil { + return m.Query + } + return nil +} + +// ServiceCommandDescriptor describes a CLI command based on a protobuf service. +type ServiceCommandDescriptor struct { + // service is the fully qualified name of the protobuf service to build + // the command from. It can be left empty if sub_commands are used instead + // which may be the case if a module provides multiple tx and/or query + // services. + Service string `protobuf:"bytes,1,opt,name=service,proto3" json:"service,omitempty"` + // rpc_command_options are options for commands generated from rpc methods. + // If no options are specified for a given rpc method on the service, a + // command will be generated for that method with the default options. + RpcCommandOptions []*RpcCommandOptions `protobuf:"bytes,2,rep,name=rpc_command_options,json=rpcCommandOptions,proto3" json:"rpc_command_options,omitempty"` + // sub_commands is a map of optional sub-commands for this command based on + // different protobuf services. The map key is used as the name of the + // sub-command. + SubCommands map[string]*ServiceCommandDescriptor `protobuf:"bytes,3,rep,name=sub_commands,json=subCommands,proto3" json:"sub_commands,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (m *ServiceCommandDescriptor) Reset() { *m = ServiceCommandDescriptor{} } +func (m *ServiceCommandDescriptor) String() string { return proto.CompactTextString(m) } +func (*ServiceCommandDescriptor) ProtoMessage() {} +func (*ServiceCommandDescriptor) Descriptor() ([]byte, []int) { + return fileDescriptor_99a27c3c2ecce4b5, []int{1} +} +func (m *ServiceCommandDescriptor) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ServiceCommandDescriptor) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ServiceCommandDescriptor.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 *ServiceCommandDescriptor) XXX_Merge(src proto.Message) { + xxx_messageInfo_ServiceCommandDescriptor.Merge(m, src) +} +func (m *ServiceCommandDescriptor) XXX_Size() int { + return m.Size() +} +func (m *ServiceCommandDescriptor) XXX_DiscardUnknown() { + xxx_messageInfo_ServiceCommandDescriptor.DiscardUnknown(m) +} + +var xxx_messageInfo_ServiceCommandDescriptor proto.InternalMessageInfo + +func (m *ServiceCommandDescriptor) GetService() string { + if m != nil { + return m.Service + } + return "" +} + +func (m *ServiceCommandDescriptor) GetRpcCommandOptions() []*RpcCommandOptions { + if m != nil { + return m.RpcCommandOptions + } + return nil +} + +func (m *ServiceCommandDescriptor) GetSubCommands() map[string]*ServiceCommandDescriptor { + if m != nil { + return m.SubCommands + } + return nil +} + +// RpcCommandOptions specifies options for commands generated from protobuf +// rpc methods. +type RpcCommandOptions struct { + // rpc_method is short name of the protobuf rpc method that this command is + // generated from. + RpcMethod string `protobuf:"bytes,1,opt,name=rpc_method,json=rpcMethod,proto3" json:"rpc_method,omitempty"` + // use is the one-line usage method. It also allows specifying an alternate + // name for the command as the first word of the usage text. + // + // By default the name of an rpc command is the kebab-case short name of the + // rpc method. + Use string `protobuf:"bytes,2,opt,name=use,proto3" json:"use,omitempty"` + // long is the long message shown in the 'help ' output. + Long string `protobuf:"bytes,3,opt,name=long,proto3" json:"long,omitempty"` + // short is the short description shown in the 'help' output. + Short string `protobuf:"bytes,4,opt,name=short,proto3" json:"short,omitempty"` + // example is examples of how to use the command. + Example string `protobuf:"bytes,5,opt,name=example,proto3" json:"example,omitempty"` + // alias is an array of aliases that can be used instead of the first word in + // Use. + Alias []string `protobuf:"bytes,6,rep,name=alias,proto3" json:"alias,omitempty"` + // suggest_for is an array of command names for which this command will be + // suggested - similar to aliases but only suggests. + SuggestFor []string `protobuf:"bytes,7,rep,name=suggest_for,json=suggestFor,proto3" json:"suggest_for,omitempty"` + // deprecated defines, if this command is deprecated and should print this + // string when used. + Deprecated string `protobuf:"bytes,8,opt,name=deprecated,proto3" json:"deprecated,omitempty"` + // version defines the version for this command. If this value is non-empty + // and the command does not define a "version" flag, a "version" boolean flag + // will be added to the command and, if specified, will print content of the + // "Version" variable. A shorthand "v" flag will also be added if the command + // does not define one. + Version string `protobuf:"bytes,9,opt,name=version,proto3" json:"version,omitempty"` + // flag_options are options for flags generated from rpc request fields. + // By default all request fields are configured as flags. They can + // also be configured as positional args instead using positional_args. + FlagOptions map[string]*FlagOptions `protobuf:"bytes,10,rep,name=flag_options,json=flagOptions,proto3" json:"flag_options,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + // positional_args specifies positional arguments for the command. + PositionalArgs []*PositionalArgDescriptor `protobuf:"bytes,11,rep,name=positional_args,json=positionalArgs,proto3" json:"positional_args,omitempty"` + // skip specifies whether to skip this rpc method when generating commands. + Skip bool `protobuf:"varint,12,opt,name=skip,proto3" json:"skip,omitempty"` +} + +func (m *RpcCommandOptions) Reset() { *m = RpcCommandOptions{} } +func (m *RpcCommandOptions) String() string { return proto.CompactTextString(m) } +func (*RpcCommandOptions) ProtoMessage() {} +func (*RpcCommandOptions) Descriptor() ([]byte, []int) { + return fileDescriptor_99a27c3c2ecce4b5, []int{2} +} +func (m *RpcCommandOptions) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RpcCommandOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RpcCommandOptions.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 *RpcCommandOptions) XXX_Merge(src proto.Message) { + xxx_messageInfo_RpcCommandOptions.Merge(m, src) +} +func (m *RpcCommandOptions) XXX_Size() int { + return m.Size() +} +func (m *RpcCommandOptions) XXX_DiscardUnknown() { + xxx_messageInfo_RpcCommandOptions.DiscardUnknown(m) +} + +var xxx_messageInfo_RpcCommandOptions proto.InternalMessageInfo + +func (m *RpcCommandOptions) GetRpcMethod() string { + if m != nil { + return m.RpcMethod + } + return "" +} + +func (m *RpcCommandOptions) GetUse() string { + if m != nil { + return m.Use + } + return "" +} + +func (m *RpcCommandOptions) GetLong() string { + if m != nil { + return m.Long + } + return "" +} + +func (m *RpcCommandOptions) GetShort() string { + if m != nil { + return m.Short + } + return "" +} + +func (m *RpcCommandOptions) GetExample() string { + if m != nil { + return m.Example + } + return "" +} + +func (m *RpcCommandOptions) GetAlias() []string { + if m != nil { + return m.Alias + } + return nil +} + +func (m *RpcCommandOptions) GetSuggestFor() []string { + if m != nil { + return m.SuggestFor + } + return nil +} + +func (m *RpcCommandOptions) GetDeprecated() string { + if m != nil { + return m.Deprecated + } + return "" +} + +func (m *RpcCommandOptions) GetVersion() string { + if m != nil { + return m.Version + } + return "" +} + +func (m *RpcCommandOptions) GetFlagOptions() map[string]*FlagOptions { + if m != nil { + return m.FlagOptions + } + return nil +} + +func (m *RpcCommandOptions) GetPositionalArgs() []*PositionalArgDescriptor { + if m != nil { + return m.PositionalArgs + } + return nil +} + +func (m *RpcCommandOptions) GetSkip() bool { + if m != nil { + return m.Skip + } + return false +} + +// FlagOptions are options for flags generated from rpc request fields. +// By default, all request fields are configured as flags based on the +// kebab-case name of the field. Fields can be turned into positional arguments +// instead by using RpcCommandOptions.positional_args. +type FlagOptions struct { + // name is an alternate name to use for the field flag. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // shorthand is a one-letter abbreviated flag. + Shorthand string `protobuf:"bytes,2,opt,name=shorthand,proto3" json:"shorthand,omitempty"` + // usage is the help message. + Usage string `protobuf:"bytes,3,opt,name=usage,proto3" json:"usage,omitempty"` + // default_value is the default value as text. + DefaultValue string `protobuf:"bytes,4,opt,name=default_value,json=defaultValue,proto3" json:"default_value,omitempty"` + // default value is the default value as text if the flag is used without any + // value. + NoOptDefaultValue string `protobuf:"bytes,5,opt,name=no_opt_default_value,json=noOptDefaultValue,proto3" json:"no_opt_default_value,omitempty"` + // deprecated is the usage text to show if this flag is deprecated. + Deprecated string `protobuf:"bytes,6,opt,name=deprecated,proto3" json:"deprecated,omitempty"` + // shorthand_deprecated is the usage text to show if the shorthand of this + // flag is deprecated. + ShorthandDeprecated string `protobuf:"bytes,7,opt,name=shorthand_deprecated,json=shorthandDeprecated,proto3" json:"shorthand_deprecated,omitempty"` + // hidden hides the flag from help/usage text + Hidden bool `protobuf:"varint,8,opt,name=hidden,proto3" json:"hidden,omitempty"` +} + +func (m *FlagOptions) Reset() { *m = FlagOptions{} } +func (m *FlagOptions) String() string { return proto.CompactTextString(m) } +func (*FlagOptions) ProtoMessage() {} +func (*FlagOptions) Descriptor() ([]byte, []int) { + return fileDescriptor_99a27c3c2ecce4b5, []int{3} +} +func (m *FlagOptions) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *FlagOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_FlagOptions.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 *FlagOptions) XXX_Merge(src proto.Message) { + xxx_messageInfo_FlagOptions.Merge(m, src) +} +func (m *FlagOptions) XXX_Size() int { + return m.Size() +} +func (m *FlagOptions) XXX_DiscardUnknown() { + xxx_messageInfo_FlagOptions.DiscardUnknown(m) +} + +var xxx_messageInfo_FlagOptions proto.InternalMessageInfo + +func (m *FlagOptions) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *FlagOptions) GetShorthand() string { + if m != nil { + return m.Shorthand + } + return "" +} + +func (m *FlagOptions) GetUsage() string { + if m != nil { + return m.Usage + } + return "" +} + +func (m *FlagOptions) GetDefaultValue() string { + if m != nil { + return m.DefaultValue + } + return "" +} + +func (m *FlagOptions) GetNoOptDefaultValue() string { + if m != nil { + return m.NoOptDefaultValue + } + return "" +} + +func (m *FlagOptions) GetDeprecated() string { + if m != nil { + return m.Deprecated + } + return "" +} + +func (m *FlagOptions) GetShorthandDeprecated() string { + if m != nil { + return m.ShorthandDeprecated + } + return "" +} + +func (m *FlagOptions) GetHidden() bool { + if m != nil { + return m.Hidden + } + return false +} + +// PositionalArgDescriptor describes a positional argument. +type PositionalArgDescriptor struct { + // proto_field specifies the proto field to use as the positional arg. Any + // fields used as positional args will not have a flag generated. + ProtoField string `protobuf:"bytes,1,opt,name=proto_field,json=protoField,proto3" json:"proto_field,omitempty"` + // varargs makes a positional parameter a varargs parameter. This can only be + // applied to last positional parameter and the proto_field must a repeated + // field. + Varargs bool `protobuf:"varint,2,opt,name=varargs,proto3" json:"varargs,omitempty"` +} + +func (m *PositionalArgDescriptor) Reset() { *m = PositionalArgDescriptor{} } +func (m *PositionalArgDescriptor) String() string { return proto.CompactTextString(m) } +func (*PositionalArgDescriptor) ProtoMessage() {} +func (*PositionalArgDescriptor) Descriptor() ([]byte, []int) { + return fileDescriptor_99a27c3c2ecce4b5, []int{4} +} +func (m *PositionalArgDescriptor) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *PositionalArgDescriptor) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_PositionalArgDescriptor.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 *PositionalArgDescriptor) XXX_Merge(src proto.Message) { + xxx_messageInfo_PositionalArgDescriptor.Merge(m, src) +} +func (m *PositionalArgDescriptor) XXX_Size() int { + return m.Size() +} +func (m *PositionalArgDescriptor) XXX_DiscardUnknown() { + xxx_messageInfo_PositionalArgDescriptor.DiscardUnknown(m) +} + +var xxx_messageInfo_PositionalArgDescriptor proto.InternalMessageInfo + +func (m *PositionalArgDescriptor) GetProtoField() string { + if m != nil { + return m.ProtoField + } + return "" +} + +func (m *PositionalArgDescriptor) GetVarargs() bool { + if m != nil { + return m.Varargs + } + return false +} + +func init() { + proto.RegisterType((*ModuleOptions)(nil), "osmosis.autocli.v1.ModuleOptions") + proto.RegisterType((*ServiceCommandDescriptor)(nil), "osmosis.autocli.v1.ServiceCommandDescriptor") + proto.RegisterMapType((map[string]*ServiceCommandDescriptor)(nil), "osmosis.autocli.v1.ServiceCommandDescriptor.SubCommandsEntry") + proto.RegisterType((*RpcCommandOptions)(nil), "osmosis.autocli.v1.RpcCommandOptions") + proto.RegisterMapType((map[string]*FlagOptions)(nil), "osmosis.autocli.v1.RpcCommandOptions.FlagOptionsEntry") + proto.RegisterType((*FlagOptions)(nil), "osmosis.autocli.v1.FlagOptions") + proto.RegisterType((*PositionalArgDescriptor)(nil), "osmosis.autocli.v1.PositionalArgDescriptor") +} + +func init() { proto.RegisterFile("osmosis/autocli/v1/options.proto", fileDescriptor_99a27c3c2ecce4b5) } + +var fileDescriptor_99a27c3c2ecce4b5 = []byte{ + // 694 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x54, 0xcd, 0x6e, 0xd3, 0x4c, + 0x14, 0xad, 0x9d, 0x36, 0x6d, 0x6e, 0xd2, 0xef, 0x6b, 0xa7, 0x15, 0x8c, 0x2a, 0x48, 0xa3, 0x20, + 0xa4, 0x22, 0x90, 0xad, 0x14, 0x81, 0x10, 0x3f, 0x0b, 0xda, 0xd2, 0x5d, 0x55, 0xe4, 0x16, 0x24, + 0xd8, 0x98, 0x89, 0x3d, 0x71, 0xac, 0x3a, 0x1e, 0x33, 0x63, 0x47, 0xed, 0x5b, 0xc0, 0x86, 0x2d, + 0xaf, 0xc3, 0xb2, 0x4b, 0x24, 0x36, 0xa8, 0x7d, 0x11, 0x34, 0x3f, 0x49, 0xdc, 0x36, 0x95, 0xa0, + 0xbb, 0x7b, 0xcf, 0x9c, 0xfb, 0x33, 0x73, 0x8e, 0x0d, 0x2d, 0x26, 0x06, 0x4c, 0xc4, 0xc2, 0x25, + 0x45, 0xce, 0x82, 0x24, 0x76, 0x87, 0x1d, 0x97, 0x65, 0x79, 0xcc, 0x52, 0xe1, 0x64, 0x9c, 0xe5, + 0x0c, 0x21, 0xc3, 0x70, 0x0c, 0xc3, 0x19, 0x76, 0xda, 0x5f, 0x2d, 0x58, 0xdc, 0x63, 0x61, 0x91, + 0xd0, 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, 0x55, 0x8d, 0x7a, 0xfc, 0x27, 0x00, 0x00, 0xff, 0xff, 0xcd, 0xe5, + 0x4a, 0xe3, 0x06, 0x06, 0x00, 0x00, +} + +func (m *ModuleOptions) 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 *ModuleOptions) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ModuleOptions) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Query != nil { + { + size, err := m.Query.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintOptions(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if m.Tx != nil { + { + size, err := m.Tx.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintOptions(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *ServiceCommandDescriptor) 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 *ServiceCommandDescriptor) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ServiceCommandDescriptor) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.SubCommands) > 0 { + for k := range m.SubCommands { + v := m.SubCommands[k] + baseI := i + if v != nil { + { + size, err := v.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintOptions(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + i -= len(k) + copy(dAtA[i:], k) + i = encodeVarintOptions(dAtA, i, uint64(len(k))) + i-- + dAtA[i] = 0xa + i = encodeVarintOptions(dAtA, i, uint64(baseI-i)) + i-- + dAtA[i] = 0x1a + } + } + if len(m.RpcCommandOptions) > 0 { + for iNdEx := len(m.RpcCommandOptions) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.RpcCommandOptions[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintOptions(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + if len(m.Service) > 0 { + i -= len(m.Service) + copy(dAtA[i:], m.Service) + i = encodeVarintOptions(dAtA, i, uint64(len(m.Service))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *RpcCommandOptions) 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 *RpcCommandOptions) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *RpcCommandOptions) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Skip { + i-- + if m.Skip { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x60 + } + if len(m.PositionalArgs) > 0 { + for iNdEx := len(m.PositionalArgs) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.PositionalArgs[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintOptions(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x5a + } + } + if len(m.FlagOptions) > 0 { + for k := range m.FlagOptions { + v := m.FlagOptions[k] + baseI := i + if v != nil { + { + size, err := v.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintOptions(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + i -= len(k) + copy(dAtA[i:], k) + i = encodeVarintOptions(dAtA, i, uint64(len(k))) + i-- + dAtA[i] = 0xa + i = encodeVarintOptions(dAtA, i, uint64(baseI-i)) + i-- + dAtA[i] = 0x52 + } + } + if len(m.Version) > 0 { + i -= len(m.Version) + copy(dAtA[i:], m.Version) + i = encodeVarintOptions(dAtA, i, uint64(len(m.Version))) + i-- + dAtA[i] = 0x4a + } + if len(m.Deprecated) > 0 { + i -= len(m.Deprecated) + copy(dAtA[i:], m.Deprecated) + i = encodeVarintOptions(dAtA, i, uint64(len(m.Deprecated))) + i-- + dAtA[i] = 0x42 + } + if len(m.SuggestFor) > 0 { + for iNdEx := len(m.SuggestFor) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.SuggestFor[iNdEx]) + copy(dAtA[i:], m.SuggestFor[iNdEx]) + i = encodeVarintOptions(dAtA, i, uint64(len(m.SuggestFor[iNdEx]))) + i-- + dAtA[i] = 0x3a + } + } + if len(m.Alias) > 0 { + for iNdEx := len(m.Alias) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Alias[iNdEx]) + copy(dAtA[i:], m.Alias[iNdEx]) + i = encodeVarintOptions(dAtA, i, uint64(len(m.Alias[iNdEx]))) + i-- + dAtA[i] = 0x32 + } + } + if len(m.Example) > 0 { + i -= len(m.Example) + copy(dAtA[i:], m.Example) + i = encodeVarintOptions(dAtA, i, uint64(len(m.Example))) + i-- + dAtA[i] = 0x2a + } + if len(m.Short) > 0 { + i -= len(m.Short) + copy(dAtA[i:], m.Short) + i = encodeVarintOptions(dAtA, i, uint64(len(m.Short))) + i-- + dAtA[i] = 0x22 + } + if len(m.Long) > 0 { + i -= len(m.Long) + copy(dAtA[i:], m.Long) + i = encodeVarintOptions(dAtA, i, uint64(len(m.Long))) + i-- + dAtA[i] = 0x1a + } + if len(m.Use) > 0 { + i -= len(m.Use) + copy(dAtA[i:], m.Use) + i = encodeVarintOptions(dAtA, i, uint64(len(m.Use))) + i-- + dAtA[i] = 0x12 + } + if len(m.RpcMethod) > 0 { + i -= len(m.RpcMethod) + copy(dAtA[i:], m.RpcMethod) + i = encodeVarintOptions(dAtA, i, uint64(len(m.RpcMethod))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *FlagOptions) 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 *FlagOptions) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *FlagOptions) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Hidden { + i-- + if m.Hidden { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x40 + } + if len(m.ShorthandDeprecated) > 0 { + i -= len(m.ShorthandDeprecated) + copy(dAtA[i:], m.ShorthandDeprecated) + i = encodeVarintOptions(dAtA, i, uint64(len(m.ShorthandDeprecated))) + i-- + dAtA[i] = 0x3a + } + if len(m.Deprecated) > 0 { + i -= len(m.Deprecated) + copy(dAtA[i:], m.Deprecated) + i = encodeVarintOptions(dAtA, i, uint64(len(m.Deprecated))) + i-- + dAtA[i] = 0x32 + } + if len(m.NoOptDefaultValue) > 0 { + i -= len(m.NoOptDefaultValue) + copy(dAtA[i:], m.NoOptDefaultValue) + i = encodeVarintOptions(dAtA, i, uint64(len(m.NoOptDefaultValue))) + i-- + dAtA[i] = 0x2a + } + if len(m.DefaultValue) > 0 { + i -= len(m.DefaultValue) + copy(dAtA[i:], m.DefaultValue) + i = encodeVarintOptions(dAtA, i, uint64(len(m.DefaultValue))) + i-- + dAtA[i] = 0x22 + } + if len(m.Usage) > 0 { + i -= len(m.Usage) + copy(dAtA[i:], m.Usage) + i = encodeVarintOptions(dAtA, i, uint64(len(m.Usage))) + i-- + dAtA[i] = 0x1a + } + if len(m.Shorthand) > 0 { + i -= len(m.Shorthand) + copy(dAtA[i:], m.Shorthand) + i = encodeVarintOptions(dAtA, i, uint64(len(m.Shorthand))) + i-- + dAtA[i] = 0x12 + } + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintOptions(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *PositionalArgDescriptor) 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 *PositionalArgDescriptor) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *PositionalArgDescriptor) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Varargs { + i-- + if m.Varargs { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x10 + } + if len(m.ProtoField) > 0 { + i -= len(m.ProtoField) + copy(dAtA[i:], m.ProtoField) + i = encodeVarintOptions(dAtA, i, uint64(len(m.ProtoField))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintOptions(dAtA []byte, offset int, v uint64) int { + offset -= sovOptions(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *ModuleOptions) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Tx != nil { + l = m.Tx.Size() + n += 1 + l + sovOptions(uint64(l)) + } + if m.Query != nil { + l = m.Query.Size() + n += 1 + l + sovOptions(uint64(l)) + } + return n +} + +func (m *ServiceCommandDescriptor) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Service) + if l > 0 { + n += 1 + l + sovOptions(uint64(l)) + } + if len(m.RpcCommandOptions) > 0 { + for _, e := range m.RpcCommandOptions { + l = e.Size() + n += 1 + l + sovOptions(uint64(l)) + } + } + if len(m.SubCommands) > 0 { + for k, v := range m.SubCommands { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + l += 1 + sovOptions(uint64(l)) + } + mapEntrySize := 1 + len(k) + sovOptions(uint64(len(k))) + l + n += mapEntrySize + 1 + sovOptions(uint64(mapEntrySize)) + } + } + return n +} + +func (m *RpcCommandOptions) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.RpcMethod) + if l > 0 { + n += 1 + l + sovOptions(uint64(l)) + } + l = len(m.Use) + if l > 0 { + n += 1 + l + sovOptions(uint64(l)) + } + l = len(m.Long) + if l > 0 { + n += 1 + l + sovOptions(uint64(l)) + } + l = len(m.Short) + if l > 0 { + n += 1 + l + sovOptions(uint64(l)) + } + l = len(m.Example) + if l > 0 { + n += 1 + l + sovOptions(uint64(l)) + } + if len(m.Alias) > 0 { + for _, s := range m.Alias { + l = len(s) + n += 1 + l + sovOptions(uint64(l)) + } + } + if len(m.SuggestFor) > 0 { + for _, s := range m.SuggestFor { + l = len(s) + n += 1 + l + sovOptions(uint64(l)) + } + } + l = len(m.Deprecated) + if l > 0 { + n += 1 + l + sovOptions(uint64(l)) + } + l = len(m.Version) + if l > 0 { + n += 1 + l + sovOptions(uint64(l)) + } + if len(m.FlagOptions) > 0 { + for k, v := range m.FlagOptions { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + l += 1 + sovOptions(uint64(l)) + } + mapEntrySize := 1 + len(k) + sovOptions(uint64(len(k))) + l + n += mapEntrySize + 1 + sovOptions(uint64(mapEntrySize)) + } + } + if len(m.PositionalArgs) > 0 { + for _, e := range m.PositionalArgs { + l = e.Size() + n += 1 + l + sovOptions(uint64(l)) + } + } + if m.Skip { + n += 2 + } + return n +} + +func (m *FlagOptions) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Name) + if l > 0 { + n += 1 + l + sovOptions(uint64(l)) + } + l = len(m.Shorthand) + if l > 0 { + n += 1 + l + sovOptions(uint64(l)) + } + l = len(m.Usage) + if l > 0 { + n += 1 + l + sovOptions(uint64(l)) + } + l = len(m.DefaultValue) + if l > 0 { + n += 1 + l + sovOptions(uint64(l)) + } + l = len(m.NoOptDefaultValue) + if l > 0 { + n += 1 + l + sovOptions(uint64(l)) + } + l = len(m.Deprecated) + if l > 0 { + n += 1 + l + sovOptions(uint64(l)) + } + l = len(m.ShorthandDeprecated) + if l > 0 { + n += 1 + l + sovOptions(uint64(l)) + } + if m.Hidden { + n += 2 + } + return n +} + +func (m *PositionalArgDescriptor) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.ProtoField) + if l > 0 { + n += 1 + l + sovOptions(uint64(l)) + } + if m.Varargs { + n += 2 + } + return n +} + +func sovOptions(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozOptions(x uint64) (n int) { + return sovOptions(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *ModuleOptions) 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 ErrIntOverflowOptions + } + 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: ModuleOptions: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ModuleOptions: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Tx", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOptions + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthOptions + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthOptions + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Tx == nil { + m.Tx = &ServiceCommandDescriptor{} + } + if err := m.Tx.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Query", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOptions + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthOptions + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthOptions + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Query == nil { + m.Query = &ServiceCommandDescriptor{} + } + if err := m.Query.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipOptions(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthOptions + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ServiceCommandDescriptor) 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 ErrIntOverflowOptions + } + 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: ServiceCommandDescriptor: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ServiceCommandDescriptor: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Service", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOptions + } + 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 ErrInvalidLengthOptions + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthOptions + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Service = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RpcCommandOptions", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOptions + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthOptions + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthOptions + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.RpcCommandOptions = append(m.RpcCommandOptions, &RpcCommandOptions{}) + if err := m.RpcCommandOptions[len(m.RpcCommandOptions)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SubCommands", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOptions + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthOptions + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthOptions + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.SubCommands == nil { + m.SubCommands = make(map[string]*ServiceCommandDescriptor) + } + var mapkey string + var mapvalue *ServiceCommandDescriptor + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOptions + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOptions + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthOptions + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey < 0 { + return ErrInvalidLengthOptions + } + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOptions + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthOptions + } + postmsgIndex := iNdEx + mapmsglen + if postmsgIndex < 0 { + return ErrInvalidLengthOptions + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue = &ServiceCommandDescriptor{} + if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipOptions(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthOptions + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.SubCommands[mapkey] = mapvalue + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipOptions(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthOptions + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RpcCommandOptions) 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 ErrIntOverflowOptions + } + 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: RpcCommandOptions: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: RpcCommandOptions: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RpcMethod", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOptions + } + 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 ErrInvalidLengthOptions + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthOptions + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.RpcMethod = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Use", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOptions + } + 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 ErrInvalidLengthOptions + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthOptions + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Use = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Long", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOptions + } + 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 ErrInvalidLengthOptions + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthOptions + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Long = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Short", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOptions + } + 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 ErrInvalidLengthOptions + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthOptions + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Short = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Example", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOptions + } + 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 ErrInvalidLengthOptions + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthOptions + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Example = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Alias", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOptions + } + 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 ErrInvalidLengthOptions + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthOptions + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Alias = append(m.Alias, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SuggestFor", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOptions + } + 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 ErrInvalidLengthOptions + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthOptions + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SuggestFor = append(m.SuggestFor, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Deprecated", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOptions + } + 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 ErrInvalidLengthOptions + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthOptions + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Deprecated = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOptions + } + 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 ErrInvalidLengthOptions + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthOptions + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Version = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FlagOptions", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOptions + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthOptions + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthOptions + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.FlagOptions == nil { + m.FlagOptions = make(map[string]*FlagOptions) + } + var mapkey string + var mapvalue *FlagOptions + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOptions + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOptions + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthOptions + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey < 0 { + return ErrInvalidLengthOptions + } + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOptions + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthOptions + } + postmsgIndex := iNdEx + mapmsglen + if postmsgIndex < 0 { + return ErrInvalidLengthOptions + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue = &FlagOptions{} + if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipOptions(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthOptions + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.FlagOptions[mapkey] = mapvalue + iNdEx = postIndex + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PositionalArgs", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOptions + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthOptions + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthOptions + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PositionalArgs = append(m.PositionalArgs, &PositionalArgDescriptor{}) + if err := m.PositionalArgs[len(m.PositionalArgs)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 12: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Skip", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOptions + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Skip = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := skipOptions(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthOptions + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *FlagOptions) 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 ErrIntOverflowOptions + } + 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: FlagOptions: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: FlagOptions: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOptions + } + 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 ErrInvalidLengthOptions + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthOptions + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Shorthand", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOptions + } + 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 ErrInvalidLengthOptions + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthOptions + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Shorthand = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Usage", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOptions + } + 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 ErrInvalidLengthOptions + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthOptions + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Usage = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DefaultValue", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOptions + } + 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 ErrInvalidLengthOptions + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthOptions + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DefaultValue = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NoOptDefaultValue", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOptions + } + 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 ErrInvalidLengthOptions + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthOptions + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NoOptDefaultValue = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Deprecated", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOptions + } + 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 ErrInvalidLengthOptions + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthOptions + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Deprecated = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ShorthandDeprecated", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOptions + } + 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 ErrInvalidLengthOptions + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthOptions + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ShorthandDeprecated = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Hidden", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOptions + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Hidden = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := skipOptions(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthOptions + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *PositionalArgDescriptor) 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 ErrIntOverflowOptions + } + 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: PositionalArgDescriptor: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PositionalArgDescriptor: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ProtoField", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOptions + } + 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 ErrInvalidLengthOptions + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthOptions + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ProtoField = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Varargs", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOptions + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Varargs = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := skipOptions(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthOptions + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipOptions(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowOptions + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowOptions + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowOptions + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthOptions + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupOptions + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthOptions + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthOptions = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowOptions = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupOptions = fmt.Errorf("proto: unexpected end of group") +) diff --git a/cosmossdk.io/api/cosmos/base/cli/v1/query.pb.go b/cosmossdk.io/api/cosmos/base/cli/v1/query.pb.go new file mode 100644 index 00000000000..41ff1917a96 --- /dev/null +++ b/cosmossdk.io/api/cosmos/base/cli/v1/query.pb.go @@ -0,0 +1,660 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: osmosis/autocli/v1/query.proto + +package cliv1 + +import ( + context "context" + fmt "fmt" + _ "github.com/cosmos/cosmos-sdk/types/query" + grpc1 "github.com/gogo/protobuf/grpc" + proto "github.com/gogo/protobuf/proto" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// AppOptionsRequest is the RemoteInfoService/AppOptions request type. +type AppOptionsRequest struct { +} + +func (m *AppOptionsRequest) Reset() { *m = AppOptionsRequest{} } +func (m *AppOptionsRequest) String() string { return proto.CompactTextString(m) } +func (*AppOptionsRequest) ProtoMessage() {} +func (*AppOptionsRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_49c0169e76c6feb2, []int{0} +} +func (m *AppOptionsRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *AppOptionsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_AppOptionsRequest.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 *AppOptionsRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_AppOptionsRequest.Merge(m, src) +} +func (m *AppOptionsRequest) XXX_Size() int { + return m.Size() +} +func (m *AppOptionsRequest) XXX_DiscardUnknown() { + xxx_messageInfo_AppOptionsRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_AppOptionsRequest proto.InternalMessageInfo + +// AppOptionsResponse is the RemoteInfoService/AppOptions response type. +type AppOptionsResponse struct { + // module_options is a map of module name to autocli module options. + ModuleOptions map[string]*ModuleOptions `protobuf:"bytes,1,rep,name=module_options,json=moduleOptions,proto3" json:"module_options,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (m *AppOptionsResponse) Reset() { *m = AppOptionsResponse{} } +func (m *AppOptionsResponse) String() string { return proto.CompactTextString(m) } +func (*AppOptionsResponse) ProtoMessage() {} +func (*AppOptionsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_49c0169e76c6feb2, []int{1} +} +func (m *AppOptionsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *AppOptionsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_AppOptionsResponse.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 *AppOptionsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_AppOptionsResponse.Merge(m, src) +} +func (m *AppOptionsResponse) XXX_Size() int { + return m.Size() +} +func (m *AppOptionsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_AppOptionsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_AppOptionsResponse proto.InternalMessageInfo + +func (m *AppOptionsResponse) GetModuleOptions() map[string]*ModuleOptions { + if m != nil { + return m.ModuleOptions + } + return nil +} + +func init() { + proto.RegisterType((*AppOptionsRequest)(nil), "osmosis.autocli.v1.AppOptionsRequest") + proto.RegisterType((*AppOptionsResponse)(nil), "osmosis.autocli.v1.AppOptionsResponse") + proto.RegisterMapType((map[string]*ModuleOptions)(nil), "osmosis.autocli.v1.AppOptionsResponse.ModuleOptionsEntry") +} + +func init() { proto.RegisterFile("osmosis/autocli/v1/query.proto", fileDescriptor_49c0169e76c6feb2) } + +var fileDescriptor_49c0169e76c6feb2 = []byte{ + // 309 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0xcb, 0x2f, 0xce, 0xcd, + 0x2f, 0xce, 0x2c, 0xd6, 0x4f, 0x2c, 0x2d, 0xc9, 0x4f, 0xce, 0xc9, 0xd4, 0x2f, 0x33, 0xd4, 0x2f, + 0x2c, 0x4d, 0x2d, 0xaa, 0xd4, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x82, 0xca, 0xeb, 0x41, + 0xe5, 0xf5, 0xca, 0x0c, 0xa5, 0x14, 0xb0, 0xe8, 0xc9, 0x2f, 0x28, 0xc9, 0xcc, 0xcf, 0x2b, 0x86, + 0xe8, 0x92, 0x92, 0x81, 0xa9, 0x00, 0x1b, 0x85, 0x66, 0xa6, 0x92, 0x30, 0x97, 0xa0, 0x63, 0x41, + 0x81, 0x3f, 0x44, 0x47, 0x50, 0x6a, 0x61, 0x69, 0x6a, 0x71, 0x89, 0xd2, 0x6d, 0x46, 0x2e, 0x21, + 0x64, 0xd1, 0xe2, 0x82, 0xfc, 0xbc, 0xe2, 0x54, 0xa1, 0x04, 0x2e, 0xbe, 0xdc, 0xfc, 0x94, 0xd2, + 0x9c, 0xd4, 0x78, 0xa8, 0x0d, 0x12, 0x8c, 0x0a, 0xcc, 0x1a, 0xdc, 0x46, 0x96, 0x7a, 0x98, 0x0e, + 0xd3, 0xc3, 0xd4, 0xaf, 0xe7, 0x0b, 0xd6, 0x0c, 0x15, 0x75, 0xcd, 0x2b, 0x29, 0xaa, 0x0c, 0xe2, + 0xcd, 0x45, 0x16, 0x93, 0x4a, 0xe6, 0x12, 0xc2, 0x54, 0x24, 0x24, 0xc0, 0xc5, 0x9c, 0x9d, 0x5a, + 0x29, 0xc1, 0xa8, 0xc0, 0xa8, 0xc1, 0x19, 0x04, 0x62, 0x0a, 0x99, 0x73, 0xb1, 0x96, 0x25, 0xe6, + 0x94, 0xa6, 0x4a, 0x30, 0x29, 0x30, 0x6a, 0x70, 0x1b, 0x29, 0x62, 0x73, 0x00, 0x8a, 0x41, 0x41, + 0x10, 0xf5, 0x56, 0x4c, 0x16, 0x8c, 0x46, 0xd9, 0x5c, 0xac, 0x81, 0xa0, 0x10, 0x10, 0x4a, 0xe2, + 0xe2, 0x42, 0xb8, 0x52, 0x48, 0x95, 0x90, 0x2f, 0xc0, 0x61, 0x23, 0xa5, 0x46, 0x9c, 0x67, 0x95, + 0x58, 0x3b, 0x9e, 0x6f, 0xd0, 0x62, 0x70, 0x72, 0x3e, 0xf1, 0x48, 0x8e, 0xf1, 0xc2, 0x23, 0x39, + 0xc6, 0x07, 0x8f, 0xe4, 0x18, 0x27, 0x3c, 0x96, 0x63, 0xb8, 0xf0, 0x58, 0x8e, 0xe1, 0xc6, 0x63, + 0x39, 0x86, 0x28, 0xcd, 0x64, 0xb0, 0x41, 0xc5, 0x29, 0xd9, 0x7a, 0x99, 0xf9, 0xfa, 0x89, 0x05, + 0x99, 0xfa, 0x10, 0x01, 0xfd, 0xa4, 0xc4, 0xe2, 0x54, 0x7d, 0x48, 0x54, 0x5a, 0x27, 0xe7, 0x64, + 0x96, 0x19, 0x26, 0xb1, 0x81, 0xe3, 0xca, 0x18, 0x10, 0x00, 0x00, 0xff, 0xff, 0x4c, 0xca, 0x37, + 0x51, 0x21, 0x02, 0x00, 0x00, +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion4 + +// QueryClient is the client API for Query service. +// +// 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 { + // AppOptions returns the autocli options for all of the modules in an app. + AppOptions(ctx context.Context, in *AppOptionsRequest, opts ...grpc.CallOption) (*AppOptionsResponse, error) +} + +type queryClient struct { + cc grpc1.ClientConn +} + +func NewQueryClient(cc grpc1.ClientConn) QueryClient { + return &queryClient{cc} +} + +func (c *queryClient) AppOptions(ctx context.Context, in *AppOptionsRequest, opts ...grpc.CallOption) (*AppOptionsResponse, error) { + out := new(AppOptionsResponse) + err := c.cc.Invoke(ctx, "/osmosis.autocli.v1.Query/AppOptions", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// QueryServer is the server API for Query service. +type QueryServer interface { + // AppOptions returns the autocli options for all of the modules in an app. + AppOptions(context.Context, *AppOptionsRequest) (*AppOptionsResponse, error) +} + +// UnimplementedQueryServer can be embedded to have forward compatible implementations. +type UnimplementedQueryServer struct { +} + +func (*UnimplementedQueryServer) AppOptions(ctx context.Context, req *AppOptionsRequest) (*AppOptionsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method AppOptions not implemented") +} + +func RegisterQueryServer(s grpc1.Server, srv QueryServer) { + s.RegisterService(&_Query_serviceDesc, srv) +} + +func _Query_AppOptions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(AppOptionsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).AppOptions(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/osmosis.autocli.v1.Query/AppOptions", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).AppOptions(ctx, req.(*AppOptionsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _Query_serviceDesc = grpc.ServiceDesc{ + ServiceName: "osmosis.autocli.v1.Query", + HandlerType: (*QueryServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "AppOptions", + Handler: _Query_AppOptions_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "osmosis/autocli/v1/query.proto", +} + +func (m *AppOptionsRequest) 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 *AppOptionsRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *AppOptionsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *AppOptionsResponse) 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 *AppOptionsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *AppOptionsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.ModuleOptions) > 0 { + for k := range m.ModuleOptions { + v := m.ModuleOptions[k] + baseI := i + if v != nil { + { + size, err := v.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + i -= len(k) + copy(dAtA[i:], k) + i = encodeVarintQuery(dAtA, i, uint64(len(k))) + i-- + dAtA[i] = 0xa + i = encodeVarintQuery(dAtA, i, uint64(baseI-i)) + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { + offset -= sovQuery(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *AppOptionsRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *AppOptionsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.ModuleOptions) > 0 { + for k, v := range m.ModuleOptions { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + l += 1 + sovQuery(uint64(l)) + } + mapEntrySize := 1 + len(k) + sovQuery(uint64(len(k))) + l + n += mapEntrySize + 1 + sovQuery(uint64(mapEntrySize)) + } + } + return n +} + +func sovQuery(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozQuery(x uint64) (n int) { + return sovQuery(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *AppOptionsRequest) 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: AppOptionsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AppOptionsRequest: 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 *AppOptionsResponse) 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: AppOptionsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AppOptionsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ModuleOptions", 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.ModuleOptions == nil { + m.ModuleOptions = make(map[string]*ModuleOptions) + } + var mapkey string + var mapvalue *ModuleOptions + for iNdEx < postIndex { + entryPreIndex := 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) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthQuery + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey < 0 { + return ErrInvalidLengthQuery + } + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthQuery + } + postmsgIndex := iNdEx + mapmsglen + if postmsgIndex < 0 { + return ErrInvalidLengthQuery + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue = &ModuleOptions{} + if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.ModuleOptions[mapkey] = mapvalue + 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 skipQuery(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowQuery + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowQuery + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowQuery + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthQuery + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupQuery + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthQuery + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthQuery = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowQuery = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group") +) diff --git a/proto/osmosis/autocli/v1/options.proto b/proto/osmosis/autocli/v1/options.proto new file mode 100644 index 00000000000..40aa093e416 --- /dev/null +++ b/proto/osmosis/autocli/v1/options.proto @@ -0,0 +1,133 @@ +syntax = "proto3"; + +package osmosis.autocli.v1; + +option go_package = "cosmossdk.io/api/cosmos/base/cli/v1;cliv1"; + +// ModuleOptions describes the CLI options for a Cosmos SDK module. +message ModuleOptions { + // tx describes the tx command for the module. + ServiceCommandDescriptor tx = 1; + + // query describes the query command for the module. + ServiceCommandDescriptor query = 2; +} + +// ServiceCommandDescriptor describes a CLI command based on a protobuf service. +message ServiceCommandDescriptor { + + // service is the fully qualified name of the protobuf service to build + // the command from. It can be left empty if sub_commands are used instead + // which may be the case if a module provides multiple tx and/or query + // services. + string service = 1; + + // rpc_command_options are options for commands generated from rpc methods. + // If no options are specified for a given rpc method on the service, a + // command will be generated for that method with the default options. + repeated RpcCommandOptions rpc_command_options = 2; + + // sub_commands is a map of optional sub-commands for this command based on + // different protobuf services. The map key is used as the name of the + // sub-command. + map sub_commands = 3; +} + +// RpcCommandOptions specifies options for commands generated from protobuf +// rpc methods. +message RpcCommandOptions { + // rpc_method is short name of the protobuf rpc method that this command is + // generated from. + string rpc_method = 1; + + // use is the one-line usage method. It also allows specifying an alternate + // name for the command as the first word of the usage text. + // + // By default the name of an rpc command is the kebab-case short name of the + // rpc method. + string use = 2; + + // long is the long message shown in the 'help ' output. + string long = 3; + + // short is the short description shown in the 'help' output. + string short = 4; + + // example is examples of how to use the command. + string example = 5; + + // alias is an array of aliases that can be used instead of the first word in + // Use. + repeated string alias = 6; + + // suggest_for is an array of command names for which this command will be + // suggested - similar to aliases but only suggests. + repeated string suggest_for = 7; + + // deprecated defines, if this command is deprecated and should print this + // string when used. + string deprecated = 8; + + // version defines the version for this command. If this value is non-empty + // and the command does not define a "version" flag, a "version" boolean flag + // will be added to the command and, if specified, will print content of the + // "Version" variable. A shorthand "v" flag will also be added if the command + // does not define one. + string version = 9; + + // flag_options are options for flags generated from rpc request fields. + // By default all request fields are configured as flags. They can + // also be configured as positional args instead using positional_args. + map flag_options = 10; + + // positional_args specifies positional arguments for the command. + repeated PositionalArgDescriptor positional_args = 11; + + // skip specifies whether to skip this rpc method when generating commands. + bool skip = 12; +} + +// FlagOptions are options for flags generated from rpc request fields. +// By default, all request fields are configured as flags based on the +// kebab-case name of the field. Fields can be turned into positional arguments +// instead by using RpcCommandOptions.positional_args. +message FlagOptions { + + // name is an alternate name to use for the field flag. + string name = 1; + + // shorthand is a one-letter abbreviated flag. + string shorthand = 2; + + // usage is the help message. + string usage = 3; + + // default_value is the default value as text. + string default_value = 4; + + // default value is the default value as text if the flag is used without any + // value. + string no_opt_default_value = 5; + + // deprecated is the usage text to show if this flag is deprecated. + string deprecated = 6; + + // shorthand_deprecated is the usage text to show if the shorthand of this + // flag is deprecated. + string shorthand_deprecated = 7; + + // hidden hides the flag from help/usage text + bool hidden = 8; +} + +// PositionalArgDescriptor describes a positional argument. +message PositionalArgDescriptor { + // proto_field specifies the proto field to use as the positional arg. Any + // fields used as positional args will not have a flag generated. + string proto_field = 1; + + // varargs makes a positional parameter a varargs parameter. This can only be + // applied to last positional parameter and the proto_field must a repeated + // field. + bool varargs = 2; +} \ No newline at end of file diff --git a/proto/osmosis/autocli/v1/query.proto b/proto/osmosis/autocli/v1/query.proto new file mode 100644 index 00000000000..20ab4d094b6 --- /dev/null +++ b/proto/osmosis/autocli/v1/query.proto @@ -0,0 +1,28 @@ +syntax = "proto3"; + +package osmosis.autocli.v1; + +import "osmosis/autocli/v1/options.proto"; +import "osmosis/query/v1/query.proto"; + +option go_package = "cosmossdk.io/api/cosmos/base/cli/v1;cliv1"; + +// RemoteInfoService provides clients with the information they need +// to build dynamically CLI clients for remote chains. +service Query { + // AppOptions returns the autocli options for all of the modules in an app. + rpc AppOptions(AppOptionsRequest) returns (AppOptionsResponse) { + // NOTE: autocli options SHOULD NOT be part of consensus and + // module_query_safe should be kept as false. + option (cosmos.query.v1.module_query_safe) = false; + } +} + +// AppOptionsRequest is the RemoteInfoService/AppOptions request type. +message AppOptionsRequest {} + +// AppOptionsResponse is the RemoteInfoService/AppOptions response type. +message AppOptionsResponse { + // module_options is a map of module name to autocli module options. + map module_options = 1; +} \ No newline at end of file diff --git a/proto/osmosis/query/v1/query.proto b/proto/osmosis/query/v1/query.proto new file mode 100644 index 00000000000..98053e44c75 --- /dev/null +++ b/proto/osmosis/query/v1/query.proto @@ -0,0 +1,36 @@ +syntax = "proto3"; + +package cosmos.query.v1; + +import "google/protobuf/descriptor.proto"; + +// TODO: once we fully migrate to protov2 the go_package needs to be updated. +// We need this right now because gogoproto codegen needs to import the +// extension. +option go_package = "github.com/cosmos/cosmos-sdk/types/query"; + +extend google.protobuf.MethodOptions { + // module_query_safe is set to true when the query is safe to be called from + // within the state machine, for example from another module's Keeper, via + // ADR-033 calls or from CosmWasm contracts. + // Concretely, it means that the query is: + // 1. deterministic: given a block height, returns the exact same response + // upon multiple calls; and doesn't introduce any state-machine-breaking + // changes across SDK patch version. + // 2. consumes gas correctly. + // + // If you are a module developer and want to add this annotation to one of + // your own queries, please make sure that the corresponding query: + // 1. is deterministic and won't introduce state-machine-breaking changes + // without a coordinated upgrade path, + // 2. has its gas tracked, to avoid the attack vector where no gas is + // accounted for on potentially high-computation queries. + // + // For queries that potentially consume a large amount of gas (for example + // those with pagination, if the pagination field is incorrectly set), we + // also recommend adding Protobuf comments to warn module developers + // consuming these queries. + // + // When set to true, the query can safely be called + bool module_query_safe = 11110001; +} \ No newline at end of file diff --git a/x/lockup/module.go b/x/lockup/module.go index a8702257c13..9e66eece1e9 100644 --- a/x/lockup/module.go +++ b/x/lockup/module.go @@ -16,6 +16,7 @@ import ( "encoding/json" "fmt" + autocliv1 "cosmossdk.io/api/cosmos/autocli/v1" "github.com/gorilla/mux" "github.com/grpc-ecosystem/grpc-gateway/runtime" "github.com/spf13/cobra" @@ -81,6 +82,11 @@ func (AppModuleBasic) ValidateGenesis(cdc codec.JSONCodec, config client.TxEncod return genState.Validate() } +// AutoCLIOptions implements the autocli.HasAutoCLIConfig interface. +func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions { + return types.AutoCLIOptions +} + // RegisterRESTRoutes registers the capability module's REST service handlers. func (AppModuleBasic) RegisterRESTRoutes(clientCtx client.Context, rtr *mux.Router) { rest.RegisterRoutes(clientCtx, rtr) diff --git a/x/lockup/types/autocli.go b/x/lockup/types/autocli.go new file mode 100644 index 00000000000..2467074ecec --- /dev/null +++ b/x/lockup/types/autocli.go @@ -0,0 +1,19 @@ +package types + +import autocliv1 "cosmossdk.io/api/cosmos/autocli/v1" + +var AutoCLIOptions = &autocliv1.ModuleOptions{ + Query: &autocliv1.ServiceCommandDescriptor{ + Service: _Query_serviceDesc.ServiceName, + RpcCommandOptions: []*autocliv1.RpcCommandOptions{ + { + RpcMethod: "Lockup", + Use: "lockup [command]", + Short: "lockup commands", + }, + }, + }, + Tx: &autocliv1.ServiceCommandDescriptor{ + Service: _Msg_serviceDesc.ServiceName, + }, +} From 0b360432d6300e12ef805e061c7a3e1d62b17533 Mon Sep 17 00:00:00 2001 From: Ruslan Akhtariev Date: Tue, 8 Nov 2022 12:06:46 +0700 Subject: [PATCH 39/59] reset --- client/v2/Makefile | 2 - client/v2/autocli/builder.go | 19 - client/v2/autocli/cmd.go | 60 - client/v2/autocli/flag/address.go | 39 - client/v2/autocli/flag/builder.go | 47 - client/v2/autocli/flag/doc.go | 4 - client/v2/autocli/flag/duration.go | 51 - client/v2/autocli/flag/enum.go | 73 - client/v2/autocli/flag/field.go | 115 - client/v2/autocli/flag/list.go | 107 - client/v2/autocli/flag/message.go | 99 - client/v2/autocli/flag/message_json.go | 63 - client/v2/autocli/flag/pagination.go | 21 - client/v2/autocli/flag/register.go | 112 - client/v2/autocli/flag/simple.go | 47 - client/v2/autocli/flag/timestamp.go | 50 - client/v2/autocli/flag/type.go | 15 - client/v2/autocli/flag/value.go | 21 - client/v2/autocli/interface.go | 32 - client/v2/autocli/query.go | 203 - client/v2/autocli/query_test.go | 304 -- client/v2/autocli/testdata/bank_example.yaml | 28 - .../autocli/testdata/help-deprecated.golden | 36 - client/v2/autocli/testdata/help-echo.golden | 40 - client/v2/autocli/testdata/help-skip.golden | 7 - .../v2/autocli/testdata/help-toplevel.golden | 17 - client/v2/autocli/testdata/help.golden | 40 - client/v2/go.mod | 29 - client/v2/go.sum | 82 - client/v2/internal/buf.gen.yaml | 16 - client/v2/internal/buf.lock | 19 - client/v2/internal/buf.yaml | 12 - client/v2/internal/testpb/query.proto | 61 - client/v2/internal/testpb/query.pulsar.go | 4141 ----------------- client/v2/internal/testpb/query_grpc.pb.go | 107 - client/v2/internal/util/util.go | 29 - .../api/cosmos/base/cli/v1/options.pb.go | 2482 ---------- .../api/cosmos/base/cli/v1/query.pb.go | 660 --- proto/osmosis/autocli/v1/options.proto | 133 - proto/osmosis/autocli/v1/query.proto | 28 - proto/osmosis/query/v1/query.proto | 36 - x/lockup/module.go | 6 - x/lockup/types/autocli.go | 19 - 43 files changed, 9512 deletions(-) delete mode 100644 client/v2/Makefile delete mode 100644 client/v2/autocli/builder.go delete mode 100644 client/v2/autocli/cmd.go delete mode 100644 client/v2/autocli/flag/address.go delete mode 100644 client/v2/autocli/flag/builder.go delete mode 100644 client/v2/autocli/flag/doc.go delete mode 100644 client/v2/autocli/flag/duration.go delete mode 100644 client/v2/autocli/flag/enum.go delete mode 100644 client/v2/autocli/flag/field.go delete mode 100644 client/v2/autocli/flag/list.go delete mode 100644 client/v2/autocli/flag/message.go delete mode 100644 client/v2/autocli/flag/message_json.go delete mode 100644 client/v2/autocli/flag/pagination.go delete mode 100644 client/v2/autocli/flag/register.go delete mode 100644 client/v2/autocli/flag/simple.go delete mode 100644 client/v2/autocli/flag/timestamp.go delete mode 100644 client/v2/autocli/flag/type.go delete mode 100644 client/v2/autocli/flag/value.go delete mode 100644 client/v2/autocli/interface.go delete mode 100644 client/v2/autocli/query.go delete mode 100644 client/v2/autocli/query_test.go delete mode 100644 client/v2/autocli/testdata/bank_example.yaml delete mode 100644 client/v2/autocli/testdata/help-deprecated.golden delete mode 100644 client/v2/autocli/testdata/help-echo.golden delete mode 100644 client/v2/autocli/testdata/help-skip.golden delete mode 100644 client/v2/autocli/testdata/help-toplevel.golden delete mode 100644 client/v2/autocli/testdata/help.golden delete mode 100644 client/v2/go.mod delete mode 100644 client/v2/go.sum delete mode 100644 client/v2/internal/buf.gen.yaml delete mode 100644 client/v2/internal/buf.lock delete mode 100644 client/v2/internal/buf.yaml delete mode 100644 client/v2/internal/testpb/query.proto delete mode 100644 client/v2/internal/testpb/query.pulsar.go delete mode 100644 client/v2/internal/testpb/query_grpc.pb.go delete mode 100644 client/v2/internal/util/util.go delete mode 100644 cosmossdk.io/api/cosmos/base/cli/v1/options.pb.go delete mode 100644 cosmossdk.io/api/cosmos/base/cli/v1/query.pb.go delete mode 100644 proto/osmosis/autocli/v1/options.proto delete mode 100644 proto/osmosis/autocli/v1/query.proto delete mode 100644 proto/osmosis/query/v1/query.proto delete mode 100644 x/lockup/types/autocli.go diff --git a/client/v2/Makefile b/client/v2/Makefile deleted file mode 100644 index 6868d1941a3..00000000000 --- a/client/v2/Makefile +++ /dev/null @@ -1,2 +0,0 @@ -codegen: - @(cd internal; buf generate) diff --git a/client/v2/autocli/builder.go b/client/v2/autocli/builder.go deleted file mode 100644 index daa63ff1a08..00000000000 --- a/client/v2/autocli/builder.go +++ /dev/null @@ -1,19 +0,0 @@ -package autocli - -import ( - "context" - - "google.golang.org/grpc" - - "cosmossdk.io/client/v2/autocli/flag" -) - -// Builder manages options for building CLI commands. -type Builder struct { - // flag.Builder embeds the flag builder and its options. - flag.Builder - - // GetClientConn specifies how CLI commands will resolve a grpc.ClientConnInterface - // from a given context. - GetClientConn func(context.Context) grpc.ClientConnInterface -} diff --git a/client/v2/autocli/cmd.go b/client/v2/autocli/cmd.go deleted file mode 100644 index 3256aeb8971..00000000000 --- a/client/v2/autocli/cmd.go +++ /dev/null @@ -1,60 +0,0 @@ -package autocli - -import ( - "errors" - "fmt" - "strings" - - "github.com/spf13/cobra" -) - -// NOTE: this was copied from client/cmd.go to avoid introducing a dependency -// on the v1 client package. - -// validateCmd returns unknown command error or Help display if help flag set -func validateCmd(cmd *cobra.Command, args []string) error { - var unknownCmd string - var skipNext bool - - for _, arg := range args { - // search for help flag - if arg == "--help" || arg == "-h" { - return cmd.Help() - } - - // check if the current arg is a flag - switch { - case len(arg) > 0 && (arg[0] == '-'): - // the next arg should be skipped if the current arg is a - // flag and does not use "=" to assign the flag's value - if !strings.Contains(arg, "=") { - skipNext = true - } else { - skipNext = false - } - case skipNext: - // skip current arg - skipNext = false - case unknownCmd == "": - // unknown command found - // continue searching for help flag - unknownCmd = arg - } - } - - // return the help screen if no unknown command is found - if unknownCmd != "" { - err := fmt.Sprintf("unknown command \"%s\" for \"%s\"", unknownCmd, cmd.CalledAs()) - - // build suggestions for unknown argument - if suggestions := cmd.SuggestionsFor(unknownCmd); len(suggestions) > 0 { - err += "\n\nDid you mean this?\n" - for _, s := range suggestions { - err += fmt.Sprintf("\t%v\n", s) - } - } - return errors.New(err) - } - - return cmd.Help() -} diff --git a/client/v2/autocli/flag/address.go b/client/v2/autocli/flag/address.go deleted file mode 100644 index 163fbfc9ae3..00000000000 --- a/client/v2/autocli/flag/address.go +++ /dev/null @@ -1,39 +0,0 @@ -package flag - -import ( - "context" - - "google.golang.org/protobuf/reflect/protoreflect" -) - -type addressStringType struct{} - -func (a addressStringType) NewValue(_ context.Context, _ *Builder) Value { - return &addressValue{} -} - -func (a addressStringType) DefaultValue() string { - return "" -} - -type addressValue struct { - value string -} - -func (a addressValue) Get(protoreflect.Value) (protoreflect.Value, error) { - return protoreflect.ValueOfString(a.value), nil -} - -func (a addressValue) String() string { - return a.value -} - -func (a *addressValue) Set(s string) error { - a.value = s - // TODO handle bech32 validation - return nil -} - -func (a addressValue) Type() string { - return "bech32 account address key name" -} diff --git a/client/v2/autocli/flag/builder.go b/client/v2/autocli/flag/builder.go deleted file mode 100644 index 2969314e84d..00000000000 --- a/client/v2/autocli/flag/builder.go +++ /dev/null @@ -1,47 +0,0 @@ -package flag - -import ( - "google.golang.org/protobuf/reflect/protodesc" - "google.golang.org/protobuf/reflect/protoreflect" - "google.golang.org/protobuf/reflect/protoregistry" -) - -// Builder manages options for building pflag flags for protobuf messages. -type Builder struct { - // TypeResolver specifies how protobuf types will be resolved. If it is - // nil protoregistry.GlobalTypes will be used. - TypeResolver interface { - protoregistry.MessageTypeResolver - protoregistry.ExtensionTypeResolver - } - - // FileResolver specifies how protobuf file descriptors will be resolved. If it is - // nil protoregistry.GlobalFiles will be used. - FileResolver protodesc.Resolver - - messageFlagTypes map[protoreflect.FullName]Type - scalarFlagTypes map[string]Type -} - -func (b *Builder) init() { - if b.messageFlagTypes == nil { - b.messageFlagTypes = map[protoreflect.FullName]Type{} - b.messageFlagTypes["google.protobuf.Timestamp"] = timestampType{} - b.messageFlagTypes["google.protobuf.Duration"] = durationType{} - } - - if b.scalarFlagTypes == nil { - b.scalarFlagTypes = map[string]Type{} - b.scalarFlagTypes["cosmos.AddressString"] = addressStringType{} - } -} - -func (b *Builder) DefineMessageFlagType(messageName protoreflect.FullName, flagType Type) { - b.init() - b.messageFlagTypes[messageName] = flagType -} - -func (b *Builder) DefineScalarFlagType(scalarName string, flagType Type) { - b.init() - b.scalarFlagTypes[scalarName] = flagType -} diff --git a/client/v2/autocli/flag/doc.go b/client/v2/autocli/flag/doc.go deleted file mode 100644 index 5e8a1f365d3..00000000000 --- a/client/v2/autocli/flag/doc.go +++ /dev/null @@ -1,4 +0,0 @@ -// Package flag defines functionality for automatically managing command -// line flags as well positional arguments that are based on protobuf message -// fields. -package flag diff --git a/client/v2/autocli/flag/duration.go b/client/v2/autocli/flag/duration.go deleted file mode 100644 index 5e02c00d29e..00000000000 --- a/client/v2/autocli/flag/duration.go +++ /dev/null @@ -1,51 +0,0 @@ -package flag - -import ( - "context" - "time" - - "google.golang.org/protobuf/reflect/protoreflect" - "google.golang.org/protobuf/types/known/durationpb" -) - -type durationType struct{} - -func (t durationType) NewValue(context.Context, *Builder) Value { - return &durationValue{} -} - -func (t durationType) DefaultValue() string { - return "" -} - -type durationValue struct { - value *durationpb.Duration -} - -func (a durationValue) Get(protoreflect.Value) (protoreflect.Value, error) { - if a.value == nil { - return protoreflect.Value{}, nil - } - return protoreflect.ValueOfMessage(a.value.ProtoReflect()), nil -} - -func (v durationValue) String() string { - if v.value == nil { - return "" - } - return v.value.AsDuration().String() -} - -func (v *durationValue) Set(s string) error { - dur, err := time.ParseDuration(s) - if err != nil { - return err - } - - v.value = durationpb.New(dur) - return nil -} - -func (v durationValue) Type() string { - return "duration" -} diff --git a/client/v2/autocli/flag/enum.go b/client/v2/autocli/flag/enum.go deleted file mode 100644 index 79e1cba53a4..00000000000 --- a/client/v2/autocli/flag/enum.go +++ /dev/null @@ -1,73 +0,0 @@ -package flag - -import ( - "context" - "fmt" - "strings" - - "github.com/iancoleman/strcase" - "google.golang.org/protobuf/reflect/protoreflect" -) - -type enumType struct { - enum protoreflect.EnumDescriptor -} - -func (b enumType) NewValue(context.Context, *Builder) Value { - val := &enumValue{ - enum: b.enum, - valMap: map[string]protoreflect.EnumValueDescriptor{}, - } - n := b.enum.Values().Len() - for i := 0; i < n; i++ { - valDesc := b.enum.Values().Get(i) - val.valMap[enumValueName(b.enum, valDesc)] = valDesc - } - return val -} - -func (b enumType) DefaultValue() string { - defValue := "" - if def := b.enum.Values().ByNumber(0); def != nil { - defValue = enumValueName(b.enum, def) - } - return defValue -} - -type enumValue struct { - enum protoreflect.EnumDescriptor - value protoreflect.EnumNumber - valMap map[string]protoreflect.EnumValueDescriptor -} - -func (e enumValue) Get(protoreflect.Value) (protoreflect.Value, error) { - return protoreflect.ValueOfEnum(e.value), nil -} - -func enumValueName(enum protoreflect.EnumDescriptor, enumValue protoreflect.EnumValueDescriptor) string { - name := string(enumValue.Name()) - name = strings.TrimPrefix(name, strcase.ToScreamingSnake(string(enum.Name()))+"_") - return strcase.ToKebab(name) -} - -func (e enumValue) String() string { - return enumValueName(e.enum, e.enum.Values().ByNumber(e.value)) -} - -func (e *enumValue) Set(s string) error { - valDesc, ok := e.valMap[s] - if !ok { - return fmt.Errorf("%s is not a valid value for enum %s", s, e.enum.FullName()) - } - e.value = valDesc.Number() - return nil -} - -func (e enumValue) Type() string { - var vals []string - n := e.enum.Values().Len() - for i := 0; i < n; i++ { - vals = append(vals, enumValueName(e.enum, e.enum.Values().Get(i))) - } - return fmt.Sprintf("%s (%s)", e.enum.Name(), strings.Join(vals, " | ")) -} diff --git a/client/v2/autocli/flag/field.go b/client/v2/autocli/flag/field.go deleted file mode 100644 index b2c385ac95d..00000000000 --- a/client/v2/autocli/flag/field.go +++ /dev/null @@ -1,115 +0,0 @@ -package flag - -import ( - "context" - - autocliv1 "cosmossdk.io/api/cosmos/autocli/v1" - cosmos_proto "github.com/cosmos/cosmos-proto" - "github.com/spf13/pflag" - "google.golang.org/protobuf/proto" - "google.golang.org/protobuf/reflect/protoreflect" - - "cosmossdk.io/client/v2/internal/util" -) - -// namingOptions specifies internal naming options for flags. -type namingOptions struct { - // Prefix is a prefix to prepend to all flags. - Prefix string -} - -// addFieldFlag adds a flag for the provided field to the flag set. -func (b *Builder) addFieldFlag(ctx context.Context, flagSet *pflag.FlagSet, field protoreflect.FieldDescriptor, opts *autocliv1.FlagOptions, options namingOptions) (name string, hasValue HasValue, err error) { - if opts == nil { - opts = &autocliv1.FlagOptions{} - } - - if field.Kind() == protoreflect.MessageKind && field.Message().FullName() == "cosmos.base.query.v1beta1.PageRequest" { - hasValue, err := b.bindPageRequest(ctx, flagSet, field) - return "", hasValue, err - } - - name = opts.Name - if name == "" { - name = options.Prefix + util.DescriptorKebabName(field) - } - - usage := opts.Usage - if usage == "" { - usage = util.DescriptorDocs(field) - } - - shorthand := opts.Shorthand - defaultValue := opts.DefaultValue - - if typ := b.resolveFlagType(field); typ != nil { - if defaultValue == "" { - defaultValue = typ.DefaultValue() - } - - val := typ.NewValue(ctx, b) - flagSet.AddFlag(&pflag.Flag{ - Name: name, - Shorthand: shorthand, - Usage: usage, - DefValue: defaultValue, - Value: val, - }) - return name, val, nil - } - - // use the built-in pflag StringP, Int32P, etc. functions - var val HasValue - if field.IsList() { - val = bindSimpleListFlag(flagSet, field.Kind(), name, shorthand, usage) - } else { - val = bindSimpleFlag(flagSet, field.Kind(), name, shorthand, usage) - } - - // This is a bit of hacking around the pflag API, but the - // defaultValue is set in this way because this is much easier than trying - // to parse the string into the types that StringSliceP, Int32P, etc. expect - if defaultValue != "" { - err = flagSet.Set(name, defaultValue) - } - return name, val, err -} - -func (b *Builder) resolveFlagType(field protoreflect.FieldDescriptor) Type { - typ := b.resolveFlagTypeBasic(field) - if field.IsList() { - if typ != nil { - return compositeListType{simpleType: typ} - } - - return nil - } - - return typ -} - -func (b *Builder) resolveFlagTypeBasic(field protoreflect.FieldDescriptor) Type { - scalar := proto.GetExtension(field.Options(), cosmos_proto.E_Scalar) - if scalar != nil { - b.init() - if typ, ok := b.scalarFlagTypes[scalar.(string)]; ok { - return typ - } - } - - switch field.Kind() { - case protoreflect.EnumKind: - return enumType{enum: field.Enum()} - case protoreflect.MessageKind: - b.init() - if flagType, ok := b.messageFlagTypes[field.Message().FullName()]; ok { - return flagType - } - - return jsonMessageFlagType{ - messageDesc: field.Message(), - } - default: - return nil - } -} diff --git a/client/v2/autocli/flag/list.go b/client/v2/autocli/flag/list.go deleted file mode 100644 index 72f84c8be3e..00000000000 --- a/client/v2/autocli/flag/list.go +++ /dev/null @@ -1,107 +0,0 @@ -package flag - -import ( - "context" - "fmt" - - "github.com/spf13/pflag" - "google.golang.org/protobuf/reflect/protoreflect" -) - -func bindSimpleListFlag(flagSet *pflag.FlagSet, kind protoreflect.Kind, name, shorthand, usage string) HasValue { - switch kind { - case protoreflect.StringKind: - val := flagSet.StringSliceP(name, shorthand, nil, usage) - return newListValue(val, protoreflect.ValueOfString) - case protoreflect.Uint32Kind, protoreflect.Fixed32Kind, - protoreflect.Uint64Kind, protoreflect.Fixed64Kind: - val := flagSet.UintSliceP(name, shorthand, nil, usage) - return newListValue(val, func(x uint) protoreflect.Value { return protoreflect.ValueOfUint64(uint64(x)) }) - case protoreflect.Int32Kind, protoreflect.Sint32Kind, protoreflect.Sfixed32Kind: - val := flagSet.Int32SliceP(name, shorthand, nil, usage) - return newListValue(val, protoreflect.ValueOfInt32) - case protoreflect.Int64Kind, protoreflect.Sint64Kind, protoreflect.Sfixed64Kind: - val := flagSet.Int64SliceP(name, shorthand, nil, usage) - return newListValue(val, protoreflect.ValueOfInt64) - case protoreflect.BoolKind: - val := flagSet.BoolSliceP(name, shorthand, nil, usage) - return newListValue(val, protoreflect.ValueOfBool) - default: - return nil - } -} - -type listValue[T any] struct { - array *[]T - toProtoreflectValue func(T) protoreflect.Value -} - -func newListValue[T any](array *[]T, toProtoreflectValue func(T) protoreflect.Value) listValue[T] { - return listValue[T]{array: array, toProtoreflectValue: toProtoreflectValue} -} - -func (v listValue[T]) Get(mutable protoreflect.Value) (protoreflect.Value, error) { - list := mutable.List() - for _, x := range *v.array { - list.Append(v.toProtoreflectValue(x)) - } - return mutable, nil -} - -type compositeListType struct { - simpleType Type -} - -func (t compositeListType) NewValue(ctx context.Context, opts *Builder) Value { - return &compositeListValue{ - simpleType: t.simpleType, - values: nil, - ctx: ctx, - opts: opts, - } -} - -func (t compositeListType) DefaultValue() string { - return "" -} - -type compositeListValue struct { - simpleType Type - values []protoreflect.Value - ctx context.Context - opts *Builder -} - -func (c *compositeListValue) Get(mutable protoreflect.Value) (protoreflect.Value, error) { - list := mutable.List() - for _, value := range c.values { - list.Append(value) - } - return mutable, nil -} - -func (c *compositeListValue) String() string { - if len(c.values) == 0 { - return "" - } - - return fmt.Sprintf("%+v", c.values) -} - -func (c *compositeListValue) Set(val string) error { - simpleVal := c.simpleType.NewValue(c.ctx, c.opts) - err := simpleVal.Set(val) - if err != nil { - return err - } - v, err := simpleVal.Get(protoreflect.Value{}) - if err != nil { - return err - } - c.values = append(c.values, v) - return nil -} - -func (c *compositeListValue) Type() string { - return fmt.Sprintf("%s (repeated)", c.simpleType.NewValue(c.ctx, c.opts).Type()) -} diff --git a/client/v2/autocli/flag/message.go b/client/v2/autocli/flag/message.go deleted file mode 100644 index 6d07e3564a0..00000000000 --- a/client/v2/autocli/flag/message.go +++ /dev/null @@ -1,99 +0,0 @@ -package flag - -import ( - "fmt" - - "github.com/spf13/cobra" - "github.com/spf13/pflag" - "google.golang.org/protobuf/reflect/protoreflect" -) - -// MessageBinder binds multiple flags in a flag set to a protobuf message. -type MessageBinder struct { - CobraArgs cobra.PositionalArgs - - positionalFlagSet *pflag.FlagSet - positionalArgs []fieldBinding - hasVarargs bool - - flagBindings []fieldBinding - messageType protoreflect.MessageType -} - -// BuildMessage builds and returns a new message for the bound flags. -func (m MessageBinder) BuildMessage(positionalArgs []string) (protoreflect.Message, error) { - msg := m.messageType.New() - err := m.Bind(msg, positionalArgs) - return msg, err -} - -// Bind binds the flag values to an existing protobuf message. -func (m MessageBinder) Bind(msg protoreflect.Message, positionalArgs []string) error { - // first set positional args in the positional arg flag set - n := len(positionalArgs) - for i := range m.positionalArgs { - if i >= n { - panic("unexpected: validate args should have caught this") - } - - name := fmt.Sprintf("%d", i) - if i == n-1 && m.hasVarargs { - for _, v := range positionalArgs[i:] { - err := m.positionalFlagSet.Set(name, v) - if err != nil { - return err - } - } - } else { - err := m.positionalFlagSet.Set(name, positionalArgs[i]) - if err != nil { - return err - } - } - } - - // bind positional arg values to the message - for _, arg := range m.positionalArgs { - err := arg.bind(msg) - if err != nil { - return err - } - } - - // bind flag values to the message - for _, binding := range m.flagBindings { - err := binding.bind(msg) - if err != nil { - return err - } - } - - return nil -} - -// Get calls BuildMessage and wraps the result in a protoreflect.Value. -func (m MessageBinder) Get(protoreflect.Value) (protoreflect.Value, error) { - msg, err := m.BuildMessage(nil) - return protoreflect.ValueOfMessage(msg), err -} - -type fieldBinding struct { - hasValue HasValue - field protoreflect.FieldDescriptor -} - -func (f fieldBinding) bind(msg protoreflect.Message) error { - field := f.field - val, err := f.hasValue.Get(msg.NewField(field)) - if err != nil { - return err - } - kind := f.field.Kind() - if !(field.IsList() || - field.IsMap() || - kind == protoreflect.MessageKind || - kind == protoreflect.GroupKind) { - msg.Set(f.field, val) - } - return nil -} diff --git a/client/v2/autocli/flag/message_json.go b/client/v2/autocli/flag/message_json.go deleted file mode 100644 index 69b0d69fea4..00000000000 --- a/client/v2/autocli/flag/message_json.go +++ /dev/null @@ -1,63 +0,0 @@ -package flag - -import ( - "context" - "fmt" - - "google.golang.org/protobuf/encoding/protojson" - "google.golang.org/protobuf/proto" - "google.golang.org/protobuf/reflect/protoreflect" - - "cosmossdk.io/client/v2/internal/util" -) - -type jsonMessageFlagType struct { - messageDesc protoreflect.MessageDescriptor -} - -func (j jsonMessageFlagType) NewValue(_ context.Context, builder *Builder) Value { - return &jsonMessageFlagValue{ - messageType: util.ResolveMessageType(builder.TypeResolver, j.messageDesc), - jsonMarshalOptions: protojson.MarshalOptions{Resolver: builder.TypeResolver}, - jsonUnmarshalOptions: protojson.UnmarshalOptions{Resolver: builder.TypeResolver}, - } -} - -func (j jsonMessageFlagType) DefaultValue() string { - return "" -} - -type jsonMessageFlagValue struct { - jsonMarshalOptions protojson.MarshalOptions - jsonUnmarshalOptions protojson.UnmarshalOptions - messageType protoreflect.MessageType - message proto.Message -} - -func (j *jsonMessageFlagValue) Get(protoreflect.Value) (protoreflect.Value, error) { - if j.message == nil { - return protoreflect.Value{}, nil - } - return protoreflect.ValueOfMessage(j.message.ProtoReflect()), nil -} - -func (j *jsonMessageFlagValue) String() string { - if j.message == nil { - return "" - } - - bz, err := j.jsonMarshalOptions.Marshal(j.message) - if err != nil { - return err.Error() - } - return string(bz) -} - -func (j *jsonMessageFlagValue) Set(s string) error { - j.message = j.messageType.New().Interface() - return j.jsonUnmarshalOptions.Unmarshal([]byte(s), j.message) -} - -func (j *jsonMessageFlagValue) Type() string { - return fmt.Sprintf("%s (json)", j.messageType.Descriptor().FullName()) -} diff --git a/client/v2/autocli/flag/pagination.go b/client/v2/autocli/flag/pagination.go deleted file mode 100644 index 31d5316251c..00000000000 --- a/client/v2/autocli/flag/pagination.go +++ /dev/null @@ -1,21 +0,0 @@ -package flag - -import ( - "context" - - autocliv1 "cosmossdk.io/api/cosmos/autocli/v1" - "github.com/spf13/pflag" - "google.golang.org/protobuf/reflect/protoreflect" - - "cosmossdk.io/client/v2/internal/util" -) - -func (b *Builder) bindPageRequest(ctx context.Context, flagSet *pflag.FlagSet, field protoreflect.FieldDescriptor) (HasValue, error) { - return b.addMessageFlags( - ctx, - flagSet, - util.ResolveMessageType(b.TypeResolver, field.Message()), - &autocliv1.RpcCommandOptions{}, - namingOptions{Prefix: "page-"}, - ) -} diff --git a/client/v2/autocli/flag/register.go b/client/v2/autocli/flag/register.go deleted file mode 100644 index cc18df69b6e..00000000000 --- a/client/v2/autocli/flag/register.go +++ /dev/null @@ -1,112 +0,0 @@ -package flag - -import ( - "context" - "fmt" - - autocliv1 "cosmossdk.io/api/cosmos/autocli/v1" - "github.com/spf13/cobra" - "github.com/spf13/pflag" - "google.golang.org/protobuf/reflect/protoreflect" -) - -func (b *Builder) AddMessageFlags(ctx context.Context, flagSet *pflag.FlagSet, messageType protoreflect.MessageType, commandOptions *autocliv1.RpcCommandOptions) (*MessageBinder, error) { - return b.addMessageFlags(ctx, flagSet, messageType, commandOptions, namingOptions{}) -} - -// AddMessageFlags adds flags for each field in the message to the flag set. -func (b *Builder) addMessageFlags(ctx context.Context, flagSet *pflag.FlagSet, messageType protoreflect.MessageType, commandOptions *autocliv1.RpcCommandOptions, options namingOptions) (*MessageBinder, error) { - fields := messageType.Descriptor().Fields() - numFields := fields.Len() - handler := &MessageBinder{ - messageType: messageType, - } - - isPositional := map[string]bool{} - hasVarargs := false - n := len(commandOptions.PositionalArgs) - // positional args are also parsed using a FlagSet so that we can reuse all the same parsers - handler.positionalFlagSet = pflag.NewFlagSet("positional", pflag.ContinueOnError) - for i, arg := range commandOptions.PositionalArgs { - isPositional[arg.ProtoField] = true - - field := fields.ByName(protoreflect.Name(arg.ProtoField)) - if field == nil { - return nil, fmt.Errorf("can't find field %s on %s", arg.ProtoField, messageType.Descriptor().FullName()) - } - - if arg.Varargs { - if i != n-1 { - return nil, fmt.Errorf("varargs positional argument %s must be the last argument", arg.ProtoField) - } - - hasVarargs = true - } - - _, hasValue, err := b.addFieldFlag( - ctx, - handler.positionalFlagSet, - field, - &autocliv1.FlagOptions{Name: fmt.Sprintf("%d", i)}, - namingOptions{}, - ) - if err != nil { - return nil, err - } - - handler.positionalArgs = append(handler.positionalArgs, fieldBinding{ - field: field, - hasValue: hasValue, - }) - } - - if hasVarargs { - handler.CobraArgs = cobra.MinimumNArgs(n) - handler.hasVarargs = true - } else { - handler.CobraArgs = cobra.ExactArgs(n) - } - - // validate flag options - for name := range commandOptions.FlagOptions { - if fields.ByName(protoreflect.Name(name)) == nil { - return nil, fmt.Errorf("can't find field %s on %s specified as a flag", name, messageType.Descriptor().FullName()) - } - } - - flagOptsByFlagName := map[string]*autocliv1.FlagOptions{} - for i := 0; i < numFields; i++ { - field := fields.Get(i) - if isPositional[string(field.Name())] { - continue - } - - flagOpts := commandOptions.FlagOptions[string(field.Name())] - name, hasValue, err := b.addFieldFlag(ctx, flagSet, field, flagOpts, options) - flagOptsByFlagName[name] = flagOpts - if err != nil { - return nil, err - } - - handler.flagBindings = append(handler.flagBindings, fieldBinding{ - hasValue: hasValue, - field: field, - }) - } - - flagSet.VisitAll(func(flag *pflag.Flag) { - opts := flagOptsByFlagName[flag.Name] - if opts != nil { - // This is a bit of hacking around the pflag API, but - // we need to set these options here using Flag.VisitAll because the flag - // constructors that pflag gives us (StringP, Int32P, etc.) do not - // actually return the *Flag instance - flag.Deprecated = opts.Deprecated - flag.ShorthandDeprecated = opts.ShorthandDeprecated - flag.Hidden = opts.Hidden - flag.NoOptDefVal = opts.NoOptDefaultValue - } - }) - - return handler, nil -} diff --git a/client/v2/autocli/flag/simple.go b/client/v2/autocli/flag/simple.go deleted file mode 100644 index d4ed6d4464e..00000000000 --- a/client/v2/autocli/flag/simple.go +++ /dev/null @@ -1,47 +0,0 @@ -package flag - -import ( - "github.com/spf13/pflag" - "google.golang.org/protobuf/reflect/protoreflect" -) - -func bindSimpleFlag(flagSet *pflag.FlagSet, kind protoreflect.Kind, name, shorthand, usage string) HasValue { - switch kind { - case protoreflect.BytesKind: - val := flagSet.BytesBase64P(name, shorthand, nil, usage) - return newSimpleValue(val, protoreflect.ValueOfBytes) - case protoreflect.StringKind: - val := flagSet.StringP(name, shorthand, "", usage) - return newSimpleValue(val, protoreflect.ValueOfString) - case protoreflect.Uint32Kind, protoreflect.Fixed32Kind: - val := flagSet.Uint32P(name, shorthand, 0, usage) - return newSimpleValue(val, protoreflect.ValueOfUint32) - case protoreflect.Uint64Kind, protoreflect.Fixed64Kind: - val := flagSet.Uint64P(name, shorthand, 0, usage) - return newSimpleValue(val, protoreflect.ValueOfUint64) - case protoreflect.Int32Kind, protoreflect.Sint32Kind, protoreflect.Sfixed32Kind: - val := flagSet.Int32P(name, shorthand, 0, usage) - return newSimpleValue(val, protoreflect.ValueOfInt32) - case protoreflect.Int64Kind, protoreflect.Sint64Kind, protoreflect.Sfixed64Kind: - val := flagSet.Int64P(name, shorthand, 0, usage) - return newSimpleValue(val, protoreflect.ValueOfInt64) - case protoreflect.BoolKind: - val := flagSet.BoolP(name, shorthand, false, usage) - return newSimpleValue(val, protoreflect.ValueOfBool) - default: - return nil - } -} - -type simpleValue[T any] struct { - val *T - toProtoreflectValue func(T) protoreflect.Value -} - -func newSimpleValue[T any](val *T, toProtoreflectValue func(T) protoreflect.Value) HasValue { - return simpleValue[T]{val: val, toProtoreflectValue: toProtoreflectValue} -} - -func (v simpleValue[T]) Get(protoreflect.Value) (protoreflect.Value, error) { - return v.toProtoreflectValue(*v.val), nil -} diff --git a/client/v2/autocli/flag/timestamp.go b/client/v2/autocli/flag/timestamp.go deleted file mode 100644 index 799dab4f32b..00000000000 --- a/client/v2/autocli/flag/timestamp.go +++ /dev/null @@ -1,50 +0,0 @@ -package flag - -import ( - "context" - "time" - - "google.golang.org/protobuf/reflect/protoreflect" - "google.golang.org/protobuf/types/known/timestamppb" -) - -type timestampType struct{} - -func (t timestampType) NewValue(context.Context, *Builder) Value { - return ×tampValue{} -} - -func (t timestampType) DefaultValue() string { - return "" -} - -type timestampValue struct { - value *timestamppb.Timestamp -} - -func (t timestampValue) Get(protoreflect.Value) (protoreflect.Value, error) { - if t.value == nil { - return protoreflect.Value{}, nil - } - return protoreflect.ValueOfMessage(t.value.ProtoReflect()), nil -} - -func (v timestampValue) String() string { - if v.value == nil { - return "" - } - return v.value.AsTime().Format(time.RFC3339) -} - -func (v *timestampValue) Set(s string) error { - t, err := time.Parse(time.RFC3339, s) - if err != nil { - return err - } - v.value = timestamppb.New(t) - return nil -} - -func (v timestampValue) Type() string { - return "timestamp (RFC 3339)" -} diff --git a/client/v2/autocli/flag/type.go b/client/v2/autocli/flag/type.go deleted file mode 100644 index a0e79b553d9..00000000000 --- a/client/v2/autocli/flag/type.go +++ /dev/null @@ -1,15 +0,0 @@ -package flag - -import ( - "context" -) - -// Type specifies a custom flag type. -type Type interface { - // NewValue returns a new pflag.Value which must also implement either - // SimpleValue or ListValue. - NewValue(context.Context, *Builder) Value - - // DefaultValue is the default value for this type. - DefaultValue() string -} diff --git a/client/v2/autocli/flag/value.go b/client/v2/autocli/flag/value.go deleted file mode 100644 index e42c524d785..00000000000 --- a/client/v2/autocli/flag/value.go +++ /dev/null @@ -1,21 +0,0 @@ -package flag - -import ( - "github.com/spf13/pflag" - "google.golang.org/protobuf/reflect/protoreflect" -) - -// Value represents a single pflag.Value value. -type Value interface { - pflag.Value - HasValue -} - -// HasValue wraps a reference to a protobuf value. -type HasValue interface { - // Get gets the value of the protobuf value reference and returns that value - // or an error. For composite protoreflect.Value types such as messages, - // lists and maps, a mutable reference to the value of field obtained with - // protoreflect.Message.NewField should be passed as the newFieldValue parameter. - Get(newFieldValue protoreflect.Value) (protoreflect.Value, error) -} diff --git a/client/v2/autocli/interface.go b/client/v2/autocli/interface.go deleted file mode 100644 index edcb5226094..00000000000 --- a/client/v2/autocli/interface.go +++ /dev/null @@ -1,32 +0,0 @@ -package autocli - -import ( - autocliv1 "cosmossdk.io/api/cosmos/autocli/v1" - "github.com/spf13/cobra" - - "cosmossdk.io/core/appmodule" -) - -// HasAutoCLIConfig is an AppModule extension interface for declaring autocli module options. -type HasAutoCLIConfig interface { - appmodule.AppModule - - // AutoCLIOptions are the autocli module options for this module. - AutoCLIOptions() *autocliv1.ModuleOptions -} - -// HasCustomQueryCommand is an AppModule extension interface for declaring a custom query command. -type HasCustomQueryCommand interface { - appmodule.AppModule - - // GetQueryCmd returns a custom cobra query command for this module. - GetQueryCmd() *cobra.Command -} - -// HasCustomTxCommand is an AppModule extension interface for declaring a custom tx command. -type HasCustomTxCommand interface { - appmodule.AppModule - - // GetTxCmd returns a custom cobra tx command for this module. - GetTxCmd() *cobra.Command -} diff --git a/client/v2/autocli/query.go b/client/v2/autocli/query.go deleted file mode 100644 index 9f748e4df9f..00000000000 --- a/client/v2/autocli/query.go +++ /dev/null @@ -1,203 +0,0 @@ -package autocli - -import ( - "fmt" - - autocliv1 "cosmossdk.io/api/cosmos/autocli/v1" - "github.com/iancoleman/strcase" - "github.com/spf13/cobra" - "google.golang.org/protobuf/encoding/protojson" - "google.golang.org/protobuf/reflect/protoreflect" - "google.golang.org/protobuf/reflect/protoregistry" - - "cosmossdk.io/client/v2/internal/util" -) - -// BuildQueryCommand builds the query commands for all the provided modules. If a custom command is provided for a -// module, this is used instead of any automatically generated CLI commands. This allows apps to a fully dynamic client -// with a more customized experience if a binary with custom commands is downloaded. -func (b *Builder) BuildQueryCommand(moduleOptions map[string]*autocliv1.ModuleOptions, customCmds map[string]*cobra.Command) (*cobra.Command, error) { - queryCmd := topLevelCmd("query", "Querying subcommands") - queryCmd.Aliases = []string{"q"} - for moduleName, modOpts := range moduleOptions { - if customCmds[moduleName] != nil { - // custom commands get added lower down - continue - } - - queryCmdDesc := modOpts.Query - if queryCmdDesc != nil { - cmd, err := b.BuildModuleQueryCommand(moduleName, queryCmdDesc) - if err != nil { - return nil, err - } - - queryCmd.AddCommand(cmd) - } - } - - for _, cmd := range customCmds { - queryCmd.AddCommand(cmd) - } - - return queryCmd, nil -} - -// BuildModuleQueryCommand builds the query command for a single module. -func (b *Builder) BuildModuleQueryCommand(moduleName string, cmdDescriptor *autocliv1.ServiceCommandDescriptor) (*cobra.Command, error) { - cmd := topLevelCmd(moduleName, fmt.Sprintf("Querying commands for the %s module", moduleName)) - - err := b.AddQueryServiceCommands(cmd, cmdDescriptor) - - return cmd, err -} - -// AddQueryServiceCommands adds a sub-command to the provided command for each -// method in the specified service and returns the command. This can be used in -// order to add auto-generated commands to an existing command. -func (b *Builder) AddQueryServiceCommands(cmd *cobra.Command, cmdDescriptor *autocliv1.ServiceCommandDescriptor) error { - resolver := b.FileResolver - if resolver == nil { - resolver = protoregistry.GlobalFiles - } - descriptor, err := resolver.FindDescriptorByName(protoreflect.FullName(cmdDescriptor.Service)) - if err != nil { - return fmt.Errorf("can't find service %s: %v", cmdDescriptor.Service, err) - } - - service := descriptor.(protoreflect.ServiceDescriptor) - methods := service.Methods() - - rpcOptMap := map[protoreflect.Name]*autocliv1.RpcCommandOptions{} - for _, option := range cmdDescriptor.RpcCommandOptions { - name := protoreflect.Name(option.RpcMethod) - rpcOptMap[name] = option - // make sure method exists - if m := methods.ByName(name); m == nil { - return fmt.Errorf("rpc method %s not found for service %s", name, service.FullName()) - } - } - - n := methods.Len() - for i := 0; i < n; i++ { - methodDescriptor := methods.Get(i) - methodOpts := rpcOptMap[methodDescriptor.Name()] - methodCmd, err := b.BuildQueryMethodCommand(methodDescriptor, methodOpts) - if err != nil { - return err - } - - if methodCmd != nil { - cmd.AddCommand(methodCmd) - } - } - - for cmdName, subCmdDesc := range cmdDescriptor.SubCommands { - subCmd := topLevelCmd(cmdName, fmt.Sprintf("Querying commands for the %s service", subCmdDesc.Service)) - err = b.AddQueryServiceCommands(subCmd, subCmdDesc) - if err != nil { - return err - } - - cmd.AddCommand(subCmd) - } - - return nil -} - -// BuildQueryMethodCommand creates a gRPC query command for the given service method. This can be used to auto-generate -// just a single command for a single service rpc method. -func (b *Builder) BuildQueryMethodCommand(descriptor protoreflect.MethodDescriptor, options *autocliv1.RpcCommandOptions) (*cobra.Command, error) { - if options == nil { - // use the defaults - options = &autocliv1.RpcCommandOptions{} - } - - if options.Skip { - return nil, nil - } - - serviceDescriptor := descriptor.Parent().(protoreflect.ServiceDescriptor) - - long := options.Long - if long == "" { - long = util.DescriptorDocs(descriptor) - } - - getClientConn := b.GetClientConn - methodName := fmt.Sprintf("/%s/%s", serviceDescriptor.FullName(), descriptor.Name()) - - inputDesc := descriptor.Input() - inputType := util.ResolveMessageType(b.TypeResolver, inputDesc) - outputType := util.ResolveMessageType(b.TypeResolver, descriptor.Output()) - - use := options.Use - if use == "" { - use = protoNameToCliName(descriptor.Name()) - } - - cmd := &cobra.Command{ - Use: use, - Long: long, - Short: options.Short, - Example: options.Example, - Aliases: options.Alias, - SuggestFor: options.SuggestFor, - Deprecated: options.Deprecated, - Version: options.Version, - } - - binder, err := b.AddMessageFlags(cmd.Context(), cmd.Flags(), inputType, options) - if err != nil { - return nil, err - } - - cmd.Args = binder.CobraArgs - - jsonMarshalOptions := protojson.MarshalOptions{ - Indent: " ", - UseProtoNames: true, - UseEnumNumbers: false, - EmitUnpopulated: true, - Resolver: b.TypeResolver, - } - - cmd.RunE = func(cmd *cobra.Command, args []string) error { - ctx := cmd.Context() - clientConn := getClientConn(ctx) - input, err := binder.BuildMessage(args) - if err != nil { - return err - } - - output := outputType.New() - err = clientConn.Invoke(ctx, methodName, input.Interface(), output.Interface()) - if err != nil { - return err - } - - bz, err := jsonMarshalOptions.Marshal(output.Interface()) - if err != nil { - return err - } - - _, err = fmt.Fprintln(cmd.OutOrStdout(), string(bz)) - return err - } - - return cmd, nil -} - -func protoNameToCliName(name protoreflect.Name) string { - return strcase.ToKebab(string(name)) -} - -func topLevelCmd(use, short string) *cobra.Command { - return &cobra.Command{ - Use: use, - Short: short, - DisableFlagParsing: false, - SuggestionsMinimumDistance: 2, - RunE: validateCmd, - } -} diff --git a/client/v2/autocli/query_test.go b/client/v2/autocli/query_test.go deleted file mode 100644 index 6eec93707b9..00000000000 --- a/client/v2/autocli/query_test.go +++ /dev/null @@ -1,304 +0,0 @@ -package autocli - -import ( - "bytes" - "context" - "net" - "strings" - "testing" - - autocliv1 "cosmossdk.io/api/cosmos/autocli/v1" - "github.com/spf13/cobra" - "google.golang.org/grpc" - "google.golang.org/grpc/credentials/insecure" - "google.golang.org/protobuf/testing/protocmp" - "gotest.tools/v3/assert" - "gotest.tools/v3/golden" - - "cosmossdk.io/client/v2/internal/testpb" -) - -var testCmdDesc = &autocliv1.ServiceCommandDescriptor{ - Service: testpb.Query_ServiceDesc.ServiceName, - RpcCommandOptions: []*autocliv1.RpcCommandOptions{ - { - RpcMethod: "Echo", - Use: "echo [pos1] [pos2] [pos3...]", - Version: "1.0", - Alias: []string{"e"}, - SuggestFor: []string{"eco"}, - Example: "echo 1 abc {}", - Short: "echo echos the value provided by the user", - Long: "echo echos the value provided by the user as a proto JSON object with populated with the provided fields and positional arguments", - PositionalArgs: []*autocliv1.PositionalArgDescriptor{ - { - ProtoField: "positional1", - }, - { - ProtoField: "positional2", - }, - { - ProtoField: "positional3_varargs", - Varargs: true, - }, - }, - FlagOptions: map[string]*autocliv1.FlagOptions{ - "u32": { - Name: "uint32", - Shorthand: "u", - Usage: "some random uint32", - }, - "i32": { - Usage: "some random int32", - DefaultValue: "3", - }, - "u64": { - Usage: "some random uint64", - NoOptDefaultValue: "5", - }, - "deprecated_field": { - Deprecated: "don't use this", - }, - "shorthand_deprecated_field": { - Shorthand: "s", - Deprecated: "bad idea", - }, - "hidden_bool": { - Hidden: true, - }, - }, - }, - }, - SubCommands: map[string]*autocliv1.ServiceCommandDescriptor{ - // we test the sub-command functionality using the same service with different options - "deprecatedecho": { - Service: testpb.Query_ServiceDesc.ServiceName, - RpcCommandOptions: []*autocliv1.RpcCommandOptions{ - { - RpcMethod: "Echo", - Deprecated: "don't use this", - }, - }, - }, - "skipecho": { - Service: testpb.Query_ServiceDesc.ServiceName, - RpcCommandOptions: []*autocliv1.RpcCommandOptions{ - { - RpcMethod: "Echo", - Skip: true, - }, - }, - }, - }, -} - -func testExec(t *testing.T, args ...string) *testClientConn { - server := grpc.NewServer() - testpb.RegisterQueryServer(server, &testEchoServer{}) - listener, err := net.Listen("tcp", "127.0.0.1:0") - assert.NilError(t, err) - go func() { - err := server.Serve(listener) - if err != nil { - panic(err) - } - }() - defer server.GracefulStop() - clientConn, err := grpc.Dial(listener.Addr().String(), grpc.WithTransportCredentials(insecure.NewCredentials())) - assert.NilError(t, err) - defer func() { - err := clientConn.Close() - if err != nil { - panic(err) - } - }() - - conn := &testClientConn{ - ClientConn: clientConn, - t: t, - out: &bytes.Buffer{}, - } - b := &Builder{ - GetClientConn: func(ctx context.Context) grpc.ClientConnInterface { - return conn - }, - } - cmd, err := b.BuildModuleQueryCommand("test", testCmdDesc) - assert.NilError(t, err) - cmd.SetArgs(args) - cmd.SetOut(conn.out) - assert.NilError(t, cmd.Execute()) - return conn -} - -func TestEverything(t *testing.T) { - conn := testExec(t, - "echo", - "1", - "abc", - `{"denom":"foo","amount":"1234"}`, - `{"denom":"bar","amount":"4321"}`, - "--a-bool", - "--an-enum", "one", - "--a-message", `{"bar":"abc", "baz":-3}`, - "--duration", "4h3s", - "--uint32", "27", - "--u-64", "3267246890", - "--i-32", "-253", - "--i-64", "-234602347", - "--str", "def", - "--timestamp", "2019-01-02T00:01:02Z", - "--a-coin", `{"denom":"foo","amount":"100000"}`, - "--an-address", "cosmossdghdsfoi2134sdgh", - "--bz", "c2RncXdlZndkZ3NkZw==", - "--page-count-total", - "--page-key", "MTIzNTQ4N3NnaGRhcw==", - "--page-limit", "1000", - "--page-offset", "10", - "--page-reverse", - "--bools", "true", - "--bools", "false,false,true", - "--enums", "one", - "--enums", "five", - "--enums", "two", - "--strings", "abc", - "--strings", "xyz", - "--strings", "xyz,qrs", - "--durations", "3s", - "--durations", "5s", - "--durations", "10h", - "--some-messages", "{}", - "--some-messages", `{"bar":"baz"}`, - "--some-messages", `{"baz":-1}`, - "--uints", "1,2,3", - "--uints", "4", - ) - assert.DeepEqual(t, conn.lastRequest, conn.lastResponse.(*testpb.EchoResponse).Request, protocmp.Transform()) -} - -func TestOptions(t *testing.T) { - conn := testExec(t, - "echo", - "1", "abc", `{"denom":"foo","amount":"1"}`, - "-u", "27", // shorthand - "--u-64", // no opt default value - ) - lastReq := conn.lastRequest.(*testpb.EchoRequest) - assert.Equal(t, uint32(27), lastReq.U32) // shorthand got set - assert.Equal(t, int32(3), lastReq.I32) // default value got set - assert.Equal(t, uint64(5), lastReq.U64) // no opt default value got set -} - -func TestHelp(t *testing.T) { - conn := testExec(t, "-h") - golden.Assert(t, conn.out.String(), "help-toplevel.golden") - - conn = testExec(t, "echo", "-h") - golden.Assert(t, conn.out.String(), "help-echo.golden") - - conn = testExec(t, "deprecatedecho", "echo", "-h") - golden.Assert(t, conn.out.String(), "help-deprecated.golden") - - conn = testExec(t, "skipecho", "-h") - golden.Assert(t, conn.out.String(), "help-skip.golden") -} - -func TestDeprecated(t *testing.T) { - conn := testExec(t, "echo", - "1", "abc", `{}`, - "--deprecated-field", "foo") - assert.Assert(t, strings.Contains(conn.out.String(), "--deprecated-field has been deprecated")) - - conn = testExec(t, "echo", - "1", "abc", `{}`, - "-s", "foo") - assert.Assert(t, strings.Contains(conn.out.String(), "--shorthand-deprecated-field has been deprecated")) -} - -func TestBuildCustomQueryCommand(t *testing.T) { - b := &Builder{} - customCommandCalled := false - cmd, err := b.BuildQueryCommand(map[string]*autocliv1.ModuleOptions{ - "test": { - Query: testCmdDesc, - }, - }, map[string]*cobra.Command{ - "test": {Use: "test", Run: func(cmd *cobra.Command, args []string) { - customCommandCalled = true - }}, - }) - assert.NilError(t, err) - cmd.SetArgs([]string{"test", "query"}) - assert.NilError(t, cmd.Execute()) - assert.Assert(t, customCommandCalled) -} - -func TestNotFoundErrors(t *testing.T) { - b := &Builder{} - - // bad service - _, err := b.BuildModuleQueryCommand("test", &autocliv1.ServiceCommandDescriptor{Service: "foo"}) - assert.ErrorContains(t, err, "can't find service foo") - - // bad method - _, err = b.BuildModuleQueryCommand("test", &autocliv1.ServiceCommandDescriptor{ - Service: testpb.Query_ServiceDesc.ServiceName, - RpcCommandOptions: []*autocliv1.RpcCommandOptions{{RpcMethod: "bar"}}, - }) - assert.ErrorContains(t, err, "rpc method bar not found") - - // bad positional field - _, err = b.BuildModuleQueryCommand("test", &autocliv1.ServiceCommandDescriptor{ - Service: testpb.Query_ServiceDesc.ServiceName, - RpcCommandOptions: []*autocliv1.RpcCommandOptions{ - { - RpcMethod: "Echo", - PositionalArgs: []*autocliv1.PositionalArgDescriptor{ - { - ProtoField: "foo", - }, - }, - }, - }, - }) - assert.ErrorContains(t, err, "can't find field foo") - - // bad flag field - _, err = b.BuildModuleQueryCommand("test", &autocliv1.ServiceCommandDescriptor{ - Service: testpb.Query_ServiceDesc.ServiceName, - RpcCommandOptions: []*autocliv1.RpcCommandOptions{ - { - RpcMethod: "Echo", - FlagOptions: map[string]*autocliv1.FlagOptions{ - "baz": {}, - }, - }, - }, - }) - assert.ErrorContains(t, err, "can't find field baz") -} - -type testClientConn struct { - *grpc.ClientConn - t *testing.T - lastRequest interface{} - lastResponse interface{} - out *bytes.Buffer -} - -func (t *testClientConn) Invoke(ctx context.Context, method string, args interface{}, reply interface{}, opts ...grpc.CallOption) error { - err := t.ClientConn.Invoke(ctx, method, args, reply, opts...) - t.lastRequest = args - t.lastResponse = reply - return err -} - -type testEchoServer struct { - testpb.UnimplementedQueryServer -} - -func (t testEchoServer) Echo(_ context.Context, request *testpb.EchoRequest) (*testpb.EchoResponse, error) { - return &testpb.EchoResponse{Request: request}, nil -} - -var _ testpb.QueryServer = testEchoServer{} diff --git a/client/v2/autocli/testdata/bank_example.yaml b/client/v2/autocli/testdata/bank_example.yaml deleted file mode 100644 index 6fb937482d2..00000000000 --- a/client/v2/autocli/testdata/bank_example.yaml +++ /dev/null @@ -1,28 +0,0 @@ -tx: - service: cosmos.bank.v1beta1.Msg - rpc_command_options: - - rpc_method: Send - use: send [from_key_or_address] [to_address] [amount...] - positional_args: - - proto_field: from_address - - proto_field: to_address - - proto_field: amount - varargs: true -query: - service: cosmos.bank.v1beta1.Query - rpc_command_options: - - rpc_method: Balance - use: balance [address] [denom] - positional_args: - - proto_field: address - - proto_field: denom - - rpc_method: SupplyOf - # this is a contrived example of how to customize flag options - # we would likely prefer positional args here, but this demonstrates usage - use: supply-of --denom [denom] - flag_options: - # flag_options is a map of proto field names to customization options - denom: - shorthand: d - usage: the denom to query - diff --git a/client/v2/autocli/testdata/help-deprecated.golden b/client/v2/autocli/testdata/help-deprecated.golden deleted file mode 100644 index 110b8812935..00000000000 --- a/client/v2/autocli/testdata/help-deprecated.golden +++ /dev/null @@ -1,36 +0,0 @@ -Command "echo" is deprecated, don't use this -Usage: - test deprecatedecho echo [flags] - -Flags: - --a-bool - --a-coin cosmos.base.v1beta1.Coin (json) - --a-message testpb.AMessage (json) - --an-address bech32 account address key name - --an-enum Enum (unspecified | one | two | five | neg-three) (default unspecified) - --bools bools (default []) - --bz bytesBase64 - --deprecated-field string - --duration duration - --durations duration (repeated) - --enums Enum (unspecified | one | two | five | neg-three) (repeated) - -h, --help help for echo - --hidden-bool - --i-32 int32 - --i-64 int - --page-count-total - --page-key bytesBase64 - --page-limit uint - --page-offset uint - --page-reverse - --positional-1 int32 - --positional-2 string - --positional-3-varargs cosmos.base.v1beta1.Coin (json) (repeated) - --shorthand-deprecated-field string - --some-messages testpb.AMessage (json) (repeated) - --str string - --strings strings - --timestamp timestamp (RFC 3339) - --u-32 uint32 - --u-64 uint - --uints uints (default []) diff --git a/client/v2/autocli/testdata/help-echo.golden b/client/v2/autocli/testdata/help-echo.golden deleted file mode 100644 index a1295533469..00000000000 --- a/client/v2/autocli/testdata/help-echo.golden +++ /dev/null @@ -1,40 +0,0 @@ -echo echos the value provided by the user as a proto JSON object with populated with the provided fields and positional arguments - -Usage: - test echo [pos1] [pos2] [pos3...] [flags] - -Aliases: - echo, e - -Examples: -echo 1 abc {} - -Flags: - --a-bool - --a-coin cosmos.base.v1beta1.Coin (json) - --a-message testpb.AMessage (json) - --an-address bech32 account address key name - --an-enum Enum (unspecified | one | two | five | neg-three) (default unspecified) - --bools bools (default []) - --bz bytesBase64 - --deprecated-field string (DEPRECATED: don't use this) - --duration duration - --durations duration (repeated) - --enums Enum (unspecified | one | two | five | neg-three) (repeated) - -h, --help help for echo - --i-32 int32 some random int32 - --i-64 int - --page-count-total - --page-key bytesBase64 - --page-limit uint - --page-offset uint - --page-reverse - -s, --shorthand-deprecated-field string (DEPRECATED: bad idea) - --some-messages testpb.AMessage (json) (repeated) - --str string - --strings strings - --timestamp timestamp (RFC 3339) - --u-64 uint[=5] some random uint64 - -u, --uint32 uint32 some random uint32 - --uints uints (default []) - -v, --version version for echo diff --git a/client/v2/autocli/testdata/help-skip.golden b/client/v2/autocli/testdata/help-skip.golden deleted file mode 100644 index a85dbef695c..00000000000 --- a/client/v2/autocli/testdata/help-skip.golden +++ /dev/null @@ -1,7 +0,0 @@ -Querying commands for the testpb.Query service - -Usage: - test skipecho [flags] - -Flags: - -h, --help help for skipecho diff --git a/client/v2/autocli/testdata/help-toplevel.golden b/client/v2/autocli/testdata/help-toplevel.golden deleted file mode 100644 index 7bab88a556b..00000000000 --- a/client/v2/autocli/testdata/help-toplevel.golden +++ /dev/null @@ -1,17 +0,0 @@ -Querying commands for the test module - -Usage: - test [flags] - test [command] - -Available Commands: - completion Generate the autocompletion script for the specified shell - deprecatedecho Querying commands for the testpb.Query service - echo echo echos the value provided by the user - help Help about any command - skipecho Querying commands for the testpb.Query service - -Flags: - -h, --help help for test - -Use "test [command] --help" for more information about a command. diff --git a/client/v2/autocli/testdata/help.golden b/client/v2/autocli/testdata/help.golden deleted file mode 100644 index a1295533469..00000000000 --- a/client/v2/autocli/testdata/help.golden +++ /dev/null @@ -1,40 +0,0 @@ -echo echos the value provided by the user as a proto JSON object with populated with the provided fields and positional arguments - -Usage: - test echo [pos1] [pos2] [pos3...] [flags] - -Aliases: - echo, e - -Examples: -echo 1 abc {} - -Flags: - --a-bool - --a-coin cosmos.base.v1beta1.Coin (json) - --a-message testpb.AMessage (json) - --an-address bech32 account address key name - --an-enum Enum (unspecified | one | two | five | neg-three) (default unspecified) - --bools bools (default []) - --bz bytesBase64 - --deprecated-field string (DEPRECATED: don't use this) - --duration duration - --durations duration (repeated) - --enums Enum (unspecified | one | two | five | neg-three) (repeated) - -h, --help help for echo - --i-32 int32 some random int32 - --i-64 int - --page-count-total - --page-key bytesBase64 - --page-limit uint - --page-offset uint - --page-reverse - -s, --shorthand-deprecated-field string (DEPRECATED: bad idea) - --some-messages testpb.AMessage (json) (repeated) - --str string - --strings strings - --timestamp timestamp (RFC 3339) - --u-64 uint[=5] some random uint64 - -u, --uint32 uint32 some random uint32 - --uints uints (default []) - -v, --version version for echo diff --git a/client/v2/go.mod b/client/v2/go.mod deleted file mode 100644 index d984af3986d..00000000000 --- a/client/v2/go.mod +++ /dev/null @@ -1,29 +0,0 @@ -module cosmossdk.io/client/v2 - -go 1.19 - -require ( - cosmossdk.io/api v0.2.4 - cosmossdk.io/core v0.3.2 - github.com/cosmos/cosmos-proto v1.0.0-alpha8 - github.com/iancoleman/strcase v0.2.0 - github.com/spf13/cobra v1.6.1 - github.com/spf13/pflag v1.0.5 - google.golang.org/grpc v1.50.1 - google.golang.org/protobuf v1.28.1 - gotest.tools/v3 v3.4.0 -) - -require ( - cosmossdk.io/depinject v1.0.0-alpha.3 // indirect - github.com/cosmos/gogoproto v1.4.2 // indirect - github.com/golang/protobuf v1.5.2 // indirect - github.com/google/go-cmp v0.5.9 // indirect - github.com/inconshreveable/mousetrap v1.0.1 // indirect - github.com/pkg/errors v0.9.1 // indirect - golang.org/x/exp v0.0.0-20221019170559-20944726eadf // indirect - golang.org/x/net v0.0.0-20221017152216-f25eb7ecb193 // indirect - golang.org/x/sys v0.0.0-20221013171732-95e765b1cc43 // indirect - golang.org/x/text v0.3.8 // indirect - google.golang.org/genproto v0.0.0-20221014213838-99cd37c6964a // indirect -) diff --git a/client/v2/go.sum b/client/v2/go.sum deleted file mode 100644 index 35c15f58501..00000000000 --- a/client/v2/go.sum +++ /dev/null @@ -1,82 +0,0 @@ -cosmossdk.io/api v0.2.4 h1:o2t77GXWWEN5egCzD2ZyyFgbsoAif/XdF3T+/sAYiHQ= -cosmossdk.io/api v0.2.4/go.mod h1:7xfxe8ghXHoKj3W2oG/HcuxGVwUHN3q8piiIEiJ3CEU= -cosmossdk.io/core v0.3.2 h1:KlQIufpJHJvOs7YLGTZsZcCo1WlkencDXepsr8STKZQ= -cosmossdk.io/core v0.3.2/go.mod h1:CO7vbe+evrBvHc0setFHL/u7nlY7HJGzdRSBkT/sirc= -cosmossdk.io/depinject v1.0.0-alpha.3 h1:6evFIgj//Y3w09bqOUOzEpFj5tsxBqdc5CfkO7z+zfw= -cosmossdk.io/depinject v1.0.0-alpha.3/go.mod h1:eRbcdQ7MRpIPEM5YUJh8k97nxHpYbc3sMUnEtt8HPWU= -github.com/alecthomas/participle/v2 v2.0.0-alpha7 h1:cK4vjj0VSgb3lN1nuKA5F7dw+1s1pWBe5bx7nNCnN+c= -github.com/cockroachdb/apd/v3 v3.1.0 h1:MK3Ow7LH0W8zkd5GMKA1PvS9qG3bWFI95WaVNfyZJ/w= -github.com/cosmos/cosmos-proto v1.0.0-alpha8 h1:d3pCRuMYYvGA5bM0ZbbjKn+AoQD4A7dyNG2wzwWalUw= -github.com/cosmos/cosmos-proto v1.0.0-alpha8/go.mod h1:6/p+Bc4O8JKeZqe0VqUGTX31eoYqemTT4C1hLCWsO7I= -github.com/cosmos/gogoproto v1.4.2 h1:UeGRcmFW41l0G0MiefWhkPEVEwvu78SZsHBvI78dAYw= -github.com/cosmos/gogoproto v1.4.2/go.mod h1:cLxOsn1ljAHSV527CHOtaIP91kK6cCrZETRBrkzItWU= -github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= -github.com/cucumber/common/gherkin/go/v22 v22.0.0 h1:4K8NqptbvdOrjL9DEea6HFjSpbdT9+Q5kgLpmmsHYl0= -github.com/cucumber/common/messages/go/v17 v17.1.1 h1:RNqopvIFyLWnKv0LfATh34SWBhXeoFTJnSrgm9cT/Ts= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/gofrs/uuid v4.2.0+incompatible h1:yyYWMnhkhrKwwr8gAOcOCYxOOscHgDS9yZgBrnJfGa0= -github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= -github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= -github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/iancoleman/strcase v0.2.0 h1:05I4QRnGpI0m37iZQRuskXh+w77mr6Z41lwQzuHLwW0= -github.com/iancoleman/strcase v0.2.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= -github.com/inconshreveable/mousetrap v1.0.1 h1:U3uMjPSQEBMNp1lFxmllqCPM6P5u/Xq7Pgzkat/bFNc= -github.com/inconshreveable/mousetrap v1.0.1/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= -github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= -github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= -github.com/regen-network/gocuke v0.6.2 h1:pHviZ0kKAq2U2hN2q3smKNxct6hS0mGByFMHGnWA97M= -github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= -github.com/spf13/cobra v1.6.1 h1:o94oiPyS4KD1mPy2fmcYYHHfCxLqYjJOhGsCHFZtEzA= -github.com/spf13/cobra v1.6.1/go.mod h1:IOw/AERYS7UzyrGinqmz6HLUo219MORXGxhbaJUqzrY= -github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= -github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= -github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk= -github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/exp v0.0.0-20221019170559-20944726eadf h1:nFVjjKDgNY37+ZSYCJmtYf7tOlfQswHqplG2eosjOMg= -golang.org/x/exp v0.0.0-20221019170559-20944726eadf/go.mod h1:cyybsKvd6eL0RnXn6p/Grxp8F5bW7iYuBgsNCOHpMYE= -golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20221017152216-f25eb7ecb193 h1:3Moaxt4TfzNcQH6DWvlYKraN1ozhBXQHcgvXjRGeim0= -golang.org/x/net v0.0.0-20221017152216-f25eb7ecb193/go.mod h1:RpDiru2p0u2F0lLpEoqnP2+7xs0ifAuOcJ442g6GU2s= -golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20221013171732-95e765b1cc43 h1:OK7RB6t2WQX54srQQYSXMW8dF5C6/8+oA/s5QBmmto4= -golang.org/x/sys v0.0.0-20221013171732-95e765b1cc43/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.8 h1:nAL+RVCQ9uMn3vJZbV+MRnydTJFPf8qqY42YiA6MrqY= -golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= -golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= -golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/genproto v0.0.0-20221014213838-99cd37c6964a h1:GH6UPn3ixhWcKDhpnEC55S75cerLPdpp3hrhfKYjZgw= -google.golang.org/genproto v0.0.0-20221014213838-99cd37c6964a/go.mod h1:1vXfmgAz9N9Jx0QA82PqRVauvCz1SGSz739p0f183jM= -google.golang.org/grpc v1.50.1 h1:DS/BukOZWp8s6p4Dt/tOaJaTQyPyOoCcrjroHuCeLzY= -google.golang.org/grpc v1.50.1/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= -google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= -google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= -google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= -gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gotest.tools/v3 v3.4.0 h1:ZazjZUfuVeZGLAmlKKuyv3IKP5orXcwtOwDQH6YVr6o= -gotest.tools/v3 v3.4.0/go.mod h1:CtbdzLSsqVhDgMtKsx03ird5YTGB3ar27v0u/yKBW5g= -pgregory.net/rapid v0.5.3 h1:163N50IHFqr1phZens4FQOdPgfJscR7a562mjQqeo4M= diff --git a/client/v2/internal/buf.gen.yaml b/client/v2/internal/buf.gen.yaml deleted file mode 100644 index 48859547099..00000000000 --- a/client/v2/internal/buf.gen.yaml +++ /dev/null @@ -1,16 +0,0 @@ -version: v1 -managed: - enabled: true - go_package_prefix: - default: github.com/cosmos/cosmos-sdk/client/v2/internal - except: - - buf.build/cosmos/cosmos-proto - override: - buf.build/cosmos/cosmos-sdk: cosmossdk.io/api -plugins: - - name: go-pulsar - out: . - opt: paths=source_relative - - name: go-grpc - out: . - opt: paths=source_relative diff --git a/client/v2/internal/buf.lock b/client/v2/internal/buf.lock deleted file mode 100644 index 696956596bf..00000000000 --- a/client/v2/internal/buf.lock +++ /dev/null @@ -1,19 +0,0 @@ -# Generated by buf. DO NOT EDIT. -version: v1 -deps: - - remote: buf.build - owner: cosmos - repository: cosmos-proto - commit: 1935555c206d4afb9e94615dfd0fad31 - - remote: buf.build - owner: cosmos - repository: cosmos-sdk - commit: b7797ff7f3814399b0c5d52e1b8227ed - - remote: buf.build - owner: cosmos - repository: gogo-proto - commit: 6652e3443c3b4504bb3bf82e73a7e409 - - remote: buf.build - owner: googleapis - repository: googleapis - commit: 62f35d8aed1149c291d606d958a7ce32 diff --git a/client/v2/internal/buf.yaml b/client/v2/internal/buf.yaml deleted file mode 100644 index 96af160bf13..00000000000 --- a/client/v2/internal/buf.yaml +++ /dev/null @@ -1,12 +0,0 @@ -version: v1 -deps: - - buf.build/cosmos/cosmos-sdk - - buf.build/cosmos/cosmos-proto -lint: - use: - - DEFAULT - except: - - PACKAGE_VERSION_SUFFIX -breaking: - ignore: - - testpb diff --git a/client/v2/internal/testpb/query.proto b/client/v2/internal/testpb/query.proto deleted file mode 100644 index 6b79351af45..00000000000 --- a/client/v2/internal/testpb/query.proto +++ /dev/null @@ -1,61 +0,0 @@ -syntax = "proto3"; - -package testpb; - -import "google/protobuf/timestamp.proto"; -import "google/protobuf/duration.proto"; -import "cosmos_proto/cosmos.proto"; -import "cosmos/base/query/v1beta1/pagination.proto"; -import "cosmos/base/v1beta1/coin.proto"; - -service Query { - // Echo returns the request in the response - rpc Echo(EchoRequest) returns (EchoResponse); -} - -message EchoRequest { - // u32 is an uint32 - uint32 u32 = 1; - uint64 u64 = 2; - string str = 3; - bytes bz = 4; - google.protobuf.Timestamp timestamp = 5; - google.protobuf.Duration duration = 6; - int32 i32 = 7; - int64 i64 = 10; - bool a_bool = 15; - Enum an_enum = 16; - AMessage a_message = 17; - cosmos.base.v1beta1.Coin a_coin = 18; - string an_address = 19 [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; - cosmos.base.query.v1beta1.PageRequest page = 20; - repeated bool bools = 21; - repeated uint32 uints = 22; - repeated string strings = 23; - repeated Enum enums = 24; - repeated google.protobuf.Duration durations = 25; - repeated AMessage some_messages = 26; - - int32 positional1 = 27; - string positional2 = 28; - repeated cosmos.base.v1beta1.Coin positional3_varargs = 29; - - string deprecated_field = 30; - string shorthand_deprecated_field = 31; - bool hidden_bool = 32; -} - -enum Enum { - ENUM_UNSPECIFIED = 0; - ENUM_ONE = 1; - ENUM_TWO = 2; - ENUM_FIVE = 5; - ENUM_NEG_THREE = -3; -} - -message AMessage { - string bar = 1; - int32 baz = 2; -} - -message EchoResponse { EchoRequest request = 1; } \ No newline at end of file diff --git a/client/v2/internal/testpb/query.pulsar.go b/client/v2/internal/testpb/query.pulsar.go deleted file mode 100644 index e8743333c3d..00000000000 --- a/client/v2/internal/testpb/query.pulsar.go +++ /dev/null @@ -1,4141 +0,0 @@ -// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. -package testpb - -import ( - v1beta11 "cosmossdk.io/api/cosmos/base/query/v1beta1" - v1beta1 "cosmossdk.io/api/cosmos/base/v1beta1" - fmt "fmt" - _ "github.com/cosmos/cosmos-proto" - runtime "github.com/cosmos/cosmos-proto/runtime" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoiface "google.golang.org/protobuf/runtime/protoiface" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - durationpb "google.golang.org/protobuf/types/known/durationpb" - timestamppb "google.golang.org/protobuf/types/known/timestamppb" - io "io" - reflect "reflect" - sync "sync" -) - -var _ protoreflect.List = (*_EchoRequest_21_list)(nil) - -type _EchoRequest_21_list struct { - list *[]bool -} - -func (x *_EchoRequest_21_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_EchoRequest_21_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfBool((*x.list)[i]) -} - -func (x *_EchoRequest_21_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Bool() - concreteValue := valueUnwrapped - (*x.list)[i] = concreteValue -} - -func (x *_EchoRequest_21_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Bool() - concreteValue := valueUnwrapped - *x.list = append(*x.list, concreteValue) -} - -func (x *_EchoRequest_21_list) AppendMutable() protoreflect.Value { - panic(fmt.Errorf("AppendMutable can not be called on message EchoRequest at list field Bools as it is not of Message kind")) -} - -func (x *_EchoRequest_21_list) Truncate(n int) { - *x.list = (*x.list)[:n] -} - -func (x *_EchoRequest_21_list) NewElement() protoreflect.Value { - v := false - return protoreflect.ValueOfBool(v) -} - -func (x *_EchoRequest_21_list) IsValid() bool { - return x.list != nil -} - -var _ protoreflect.List = (*_EchoRequest_22_list)(nil) - -type _EchoRequest_22_list struct { - list *[]uint32 -} - -func (x *_EchoRequest_22_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_EchoRequest_22_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfUint32((*x.list)[i]) -} - -func (x *_EchoRequest_22_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Uint() - concreteValue := (uint32)(valueUnwrapped) - (*x.list)[i] = concreteValue -} - -func (x *_EchoRequest_22_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Uint() - concreteValue := (uint32)(valueUnwrapped) - *x.list = append(*x.list, concreteValue) -} - -func (x *_EchoRequest_22_list) AppendMutable() protoreflect.Value { - panic(fmt.Errorf("AppendMutable can not be called on message EchoRequest at list field Uints as it is not of Message kind")) -} - -func (x *_EchoRequest_22_list) Truncate(n int) { - *x.list = (*x.list)[:n] -} - -func (x *_EchoRequest_22_list) NewElement() protoreflect.Value { - v := uint32(0) - return protoreflect.ValueOfUint32(v) -} - -func (x *_EchoRequest_22_list) IsValid() bool { - return x.list != nil -} - -var _ protoreflect.List = (*_EchoRequest_23_list)(nil) - -type _EchoRequest_23_list struct { - list *[]string -} - -func (x *_EchoRequest_23_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_EchoRequest_23_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfString((*x.list)[i]) -} - -func (x *_EchoRequest_23_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.String() - concreteValue := valueUnwrapped - (*x.list)[i] = concreteValue -} - -func (x *_EchoRequest_23_list) Append(value protoreflect.Value) { - valueUnwrapped := value.String() - concreteValue := valueUnwrapped - *x.list = append(*x.list, concreteValue) -} - -func (x *_EchoRequest_23_list) AppendMutable() protoreflect.Value { - panic(fmt.Errorf("AppendMutable can not be called on message EchoRequest at list field Strings as it is not of Message kind")) -} - -func (x *_EchoRequest_23_list) Truncate(n int) { - *x.list = (*x.list)[:n] -} - -func (x *_EchoRequest_23_list) NewElement() protoreflect.Value { - v := "" - return protoreflect.ValueOfString(v) -} - -func (x *_EchoRequest_23_list) IsValid() bool { - return x.list != nil -} - -var _ protoreflect.List = (*_EchoRequest_24_list)(nil) - -type _EchoRequest_24_list struct { - list *[]Enum -} - -func (x *_EchoRequest_24_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_EchoRequest_24_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfEnum((protoreflect.EnumNumber)((*x.list)[i])) -} - -func (x *_EchoRequest_24_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Enum() - concreteValue := (Enum)(valueUnwrapped) - (*x.list)[i] = concreteValue -} - -func (x *_EchoRequest_24_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Enum() - concreteValue := (Enum)(valueUnwrapped) - *x.list = append(*x.list, concreteValue) -} - -func (x *_EchoRequest_24_list) AppendMutable() protoreflect.Value { - panic(fmt.Errorf("AppendMutable can not be called on message EchoRequest at list field Enums as it is not of Message kind")) -} - -func (x *_EchoRequest_24_list) Truncate(n int) { - *x.list = (*x.list)[:n] -} - -func (x *_EchoRequest_24_list) NewElement() protoreflect.Value { - v := 0 - return protoreflect.ValueOfEnum((protoreflect.EnumNumber)(v)) -} - -func (x *_EchoRequest_24_list) IsValid() bool { - return x.list != nil -} - -var _ protoreflect.List = (*_EchoRequest_25_list)(nil) - -type _EchoRequest_25_list struct { - list *[]*durationpb.Duration -} - -func (x *_EchoRequest_25_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_EchoRequest_25_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_EchoRequest_25_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*durationpb.Duration) - (*x.list)[i] = concreteValue -} - -func (x *_EchoRequest_25_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*durationpb.Duration) - *x.list = append(*x.list, concreteValue) -} - -func (x *_EchoRequest_25_list) AppendMutable() protoreflect.Value { - v := new(durationpb.Duration) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_EchoRequest_25_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_EchoRequest_25_list) NewElement() protoreflect.Value { - v := new(durationpb.Duration) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_EchoRequest_25_list) IsValid() bool { - return x.list != nil -} - -var _ protoreflect.List = (*_EchoRequest_26_list)(nil) - -type _EchoRequest_26_list struct { - list *[]*AMessage -} - -func (x *_EchoRequest_26_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_EchoRequest_26_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_EchoRequest_26_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*AMessage) - (*x.list)[i] = concreteValue -} - -func (x *_EchoRequest_26_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*AMessage) - *x.list = append(*x.list, concreteValue) -} - -func (x *_EchoRequest_26_list) AppendMutable() protoreflect.Value { - v := new(AMessage) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_EchoRequest_26_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_EchoRequest_26_list) NewElement() protoreflect.Value { - v := new(AMessage) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_EchoRequest_26_list) IsValid() bool { - return x.list != nil -} - -var _ protoreflect.List = (*_EchoRequest_29_list)(nil) - -type _EchoRequest_29_list struct { - list *[]*v1beta1.Coin -} - -func (x *_EchoRequest_29_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_EchoRequest_29_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_EchoRequest_29_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) - (*x.list)[i] = concreteValue -} - -func (x *_EchoRequest_29_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) - *x.list = append(*x.list, concreteValue) -} - -func (x *_EchoRequest_29_list) AppendMutable() protoreflect.Value { - v := new(v1beta1.Coin) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_EchoRequest_29_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_EchoRequest_29_list) NewElement() protoreflect.Value { - v := new(v1beta1.Coin) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_EchoRequest_29_list) IsValid() bool { - return x.list != nil -} - -var ( - md_EchoRequest protoreflect.MessageDescriptor - fd_EchoRequest_u32 protoreflect.FieldDescriptor - fd_EchoRequest_u64 protoreflect.FieldDescriptor - fd_EchoRequest_str protoreflect.FieldDescriptor - fd_EchoRequest_bz protoreflect.FieldDescriptor - fd_EchoRequest_timestamp protoreflect.FieldDescriptor - fd_EchoRequest_duration protoreflect.FieldDescriptor - fd_EchoRequest_i32 protoreflect.FieldDescriptor - fd_EchoRequest_i64 protoreflect.FieldDescriptor - fd_EchoRequest_a_bool protoreflect.FieldDescriptor - fd_EchoRequest_an_enum protoreflect.FieldDescriptor - fd_EchoRequest_a_message protoreflect.FieldDescriptor - fd_EchoRequest_a_coin protoreflect.FieldDescriptor - fd_EchoRequest_an_address protoreflect.FieldDescriptor - fd_EchoRequest_page protoreflect.FieldDescriptor - fd_EchoRequest_bools protoreflect.FieldDescriptor - fd_EchoRequest_uints protoreflect.FieldDescriptor - fd_EchoRequest_strings protoreflect.FieldDescriptor - fd_EchoRequest_enums protoreflect.FieldDescriptor - fd_EchoRequest_durations protoreflect.FieldDescriptor - fd_EchoRequest_some_messages protoreflect.FieldDescriptor - fd_EchoRequest_positional1 protoreflect.FieldDescriptor - fd_EchoRequest_positional2 protoreflect.FieldDescriptor - fd_EchoRequest_positional3_varargs protoreflect.FieldDescriptor - fd_EchoRequest_deprecated_field protoreflect.FieldDescriptor - fd_EchoRequest_shorthand_deprecated_field protoreflect.FieldDescriptor - fd_EchoRequest_hidden_bool protoreflect.FieldDescriptor -) - -func init() { - file_testpb_query_proto_init() - md_EchoRequest = File_testpb_query_proto.Messages().ByName("EchoRequest") - fd_EchoRequest_u32 = md_EchoRequest.Fields().ByName("u32") - fd_EchoRequest_u64 = md_EchoRequest.Fields().ByName("u64") - fd_EchoRequest_str = md_EchoRequest.Fields().ByName("str") - fd_EchoRequest_bz = md_EchoRequest.Fields().ByName("bz") - fd_EchoRequest_timestamp = md_EchoRequest.Fields().ByName("timestamp") - fd_EchoRequest_duration = md_EchoRequest.Fields().ByName("duration") - fd_EchoRequest_i32 = md_EchoRequest.Fields().ByName("i32") - fd_EchoRequest_i64 = md_EchoRequest.Fields().ByName("i64") - fd_EchoRequest_a_bool = md_EchoRequest.Fields().ByName("a_bool") - fd_EchoRequest_an_enum = md_EchoRequest.Fields().ByName("an_enum") - fd_EchoRequest_a_message = md_EchoRequest.Fields().ByName("a_message") - fd_EchoRequest_a_coin = md_EchoRequest.Fields().ByName("a_coin") - fd_EchoRequest_an_address = md_EchoRequest.Fields().ByName("an_address") - fd_EchoRequest_page = md_EchoRequest.Fields().ByName("page") - fd_EchoRequest_bools = md_EchoRequest.Fields().ByName("bools") - fd_EchoRequest_uints = md_EchoRequest.Fields().ByName("uints") - fd_EchoRequest_strings = md_EchoRequest.Fields().ByName("strings") - fd_EchoRequest_enums = md_EchoRequest.Fields().ByName("enums") - fd_EchoRequest_durations = md_EchoRequest.Fields().ByName("durations") - fd_EchoRequest_some_messages = md_EchoRequest.Fields().ByName("some_messages") - fd_EchoRequest_positional1 = md_EchoRequest.Fields().ByName("positional1") - fd_EchoRequest_positional2 = md_EchoRequest.Fields().ByName("positional2") - fd_EchoRequest_positional3_varargs = md_EchoRequest.Fields().ByName("positional3_varargs") - fd_EchoRequest_deprecated_field = md_EchoRequest.Fields().ByName("deprecated_field") - fd_EchoRequest_shorthand_deprecated_field = md_EchoRequest.Fields().ByName("shorthand_deprecated_field") - fd_EchoRequest_hidden_bool = md_EchoRequest.Fields().ByName("hidden_bool") -} - -var _ protoreflect.Message = (*fastReflection_EchoRequest)(nil) - -type fastReflection_EchoRequest EchoRequest - -func (x *EchoRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_EchoRequest)(x) -} - -func (x *EchoRequest) slowProtoReflect() protoreflect.Message { - mi := &file_testpb_query_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_EchoRequest_messageType fastReflection_EchoRequest_messageType -var _ protoreflect.MessageType = fastReflection_EchoRequest_messageType{} - -type fastReflection_EchoRequest_messageType struct{} - -func (x fastReflection_EchoRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_EchoRequest)(nil) -} -func (x fastReflection_EchoRequest_messageType) New() protoreflect.Message { - return new(fastReflection_EchoRequest) -} -func (x fastReflection_EchoRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_EchoRequest -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_EchoRequest) Descriptor() protoreflect.MessageDescriptor { - return md_EchoRequest -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_EchoRequest) Type() protoreflect.MessageType { - return _fastReflection_EchoRequest_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_EchoRequest) New() protoreflect.Message { - return new(fastReflection_EchoRequest) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_EchoRequest) Interface() protoreflect.ProtoMessage { - return (*EchoRequest)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_EchoRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.U32 != uint32(0) { - value := protoreflect.ValueOfUint32(x.U32) - if !f(fd_EchoRequest_u32, value) { - return - } - } - if x.U64 != uint64(0) { - value := protoreflect.ValueOfUint64(x.U64) - if !f(fd_EchoRequest_u64, value) { - return - } - } - if x.Str != "" { - value := protoreflect.ValueOfString(x.Str) - if !f(fd_EchoRequest_str, value) { - return - } - } - if len(x.Bz) != 0 { - value := protoreflect.ValueOfBytes(x.Bz) - if !f(fd_EchoRequest_bz, value) { - return - } - } - if x.Timestamp != nil { - value := protoreflect.ValueOfMessage(x.Timestamp.ProtoReflect()) - if !f(fd_EchoRequest_timestamp, value) { - return - } - } - if x.Duration != nil { - value := protoreflect.ValueOfMessage(x.Duration.ProtoReflect()) - if !f(fd_EchoRequest_duration, value) { - return - } - } - if x.I32 != int32(0) { - value := protoreflect.ValueOfInt32(x.I32) - if !f(fd_EchoRequest_i32, value) { - return - } - } - if x.I64 != int64(0) { - value := protoreflect.ValueOfInt64(x.I64) - if !f(fd_EchoRequest_i64, value) { - return - } - } - if x.ABool != false { - value := protoreflect.ValueOfBool(x.ABool) - if !f(fd_EchoRequest_a_bool, value) { - return - } - } - if x.AnEnum != 0 { - value := protoreflect.ValueOfEnum((protoreflect.EnumNumber)(x.AnEnum)) - if !f(fd_EchoRequest_an_enum, value) { - return - } - } - if x.AMessage != nil { - value := protoreflect.ValueOfMessage(x.AMessage.ProtoReflect()) - if !f(fd_EchoRequest_a_message, value) { - return - } - } - if x.ACoin != nil { - value := protoreflect.ValueOfMessage(x.ACoin.ProtoReflect()) - if !f(fd_EchoRequest_a_coin, value) { - return - } - } - if x.AnAddress != "" { - value := protoreflect.ValueOfString(x.AnAddress) - if !f(fd_EchoRequest_an_address, value) { - return - } - } - if x.Page != nil { - value := protoreflect.ValueOfMessage(x.Page.ProtoReflect()) - if !f(fd_EchoRequest_page, value) { - return - } - } - if len(x.Bools) != 0 { - value := protoreflect.ValueOfList(&_EchoRequest_21_list{list: &x.Bools}) - if !f(fd_EchoRequest_bools, value) { - return - } - } - if len(x.Uints) != 0 { - value := protoreflect.ValueOfList(&_EchoRequest_22_list{list: &x.Uints}) - if !f(fd_EchoRequest_uints, value) { - return - } - } - if len(x.Strings) != 0 { - value := protoreflect.ValueOfList(&_EchoRequest_23_list{list: &x.Strings}) - if !f(fd_EchoRequest_strings, value) { - return - } - } - if len(x.Enums) != 0 { - value := protoreflect.ValueOfList(&_EchoRequest_24_list{list: &x.Enums}) - if !f(fd_EchoRequest_enums, value) { - return - } - } - if len(x.Durations) != 0 { - value := protoreflect.ValueOfList(&_EchoRequest_25_list{list: &x.Durations}) - if !f(fd_EchoRequest_durations, value) { - return - } - } - if len(x.SomeMessages) != 0 { - value := protoreflect.ValueOfList(&_EchoRequest_26_list{list: &x.SomeMessages}) - if !f(fd_EchoRequest_some_messages, value) { - return - } - } - if x.Positional1 != int32(0) { - value := protoreflect.ValueOfInt32(x.Positional1) - if !f(fd_EchoRequest_positional1, value) { - return - } - } - if x.Positional2 != "" { - value := protoreflect.ValueOfString(x.Positional2) - if !f(fd_EchoRequest_positional2, value) { - return - } - } - if len(x.Positional3Varargs) != 0 { - value := protoreflect.ValueOfList(&_EchoRequest_29_list{list: &x.Positional3Varargs}) - if !f(fd_EchoRequest_positional3_varargs, value) { - return - } - } - if x.DeprecatedField != "" { - value := protoreflect.ValueOfString(x.DeprecatedField) - if !f(fd_EchoRequest_deprecated_field, value) { - return - } - } - if x.ShorthandDeprecatedField != "" { - value := protoreflect.ValueOfString(x.ShorthandDeprecatedField) - if !f(fd_EchoRequest_shorthand_deprecated_field, value) { - return - } - } - if x.HiddenBool != false { - value := protoreflect.ValueOfBool(x.HiddenBool) - if !f(fd_EchoRequest_hidden_bool, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_EchoRequest) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "testpb.EchoRequest.u32": - return x.U32 != uint32(0) - case "testpb.EchoRequest.u64": - return x.U64 != uint64(0) - case "testpb.EchoRequest.str": - return x.Str != "" - case "testpb.EchoRequest.bz": - return len(x.Bz) != 0 - case "testpb.EchoRequest.timestamp": - return x.Timestamp != nil - case "testpb.EchoRequest.duration": - return x.Duration != nil - case "testpb.EchoRequest.i32": - return x.I32 != int32(0) - case "testpb.EchoRequest.i64": - return x.I64 != int64(0) - case "testpb.EchoRequest.a_bool": - return x.ABool != false - case "testpb.EchoRequest.an_enum": - return x.AnEnum != 0 - case "testpb.EchoRequest.a_message": - return x.AMessage != nil - case "testpb.EchoRequest.a_coin": - return x.ACoin != nil - case "testpb.EchoRequest.an_address": - return x.AnAddress != "" - case "testpb.EchoRequest.page": - return x.Page != nil - case "testpb.EchoRequest.bools": - return len(x.Bools) != 0 - case "testpb.EchoRequest.uints": - return len(x.Uints) != 0 - case "testpb.EchoRequest.strings": - return len(x.Strings) != 0 - case "testpb.EchoRequest.enums": - return len(x.Enums) != 0 - case "testpb.EchoRequest.durations": - return len(x.Durations) != 0 - case "testpb.EchoRequest.some_messages": - return len(x.SomeMessages) != 0 - case "testpb.EchoRequest.positional1": - return x.Positional1 != int32(0) - case "testpb.EchoRequest.positional2": - return x.Positional2 != "" - case "testpb.EchoRequest.positional3_varargs": - return len(x.Positional3Varargs) != 0 - case "testpb.EchoRequest.deprecated_field": - return x.DeprecatedField != "" - case "testpb.EchoRequest.shorthand_deprecated_field": - return x.ShorthandDeprecatedField != "" - case "testpb.EchoRequest.hidden_bool": - return x.HiddenBool != false - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.EchoRequest")) - } - panic(fmt.Errorf("message testpb.EchoRequest does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_EchoRequest) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "testpb.EchoRequest.u32": - x.U32 = uint32(0) - case "testpb.EchoRequest.u64": - x.U64 = uint64(0) - case "testpb.EchoRequest.str": - x.Str = "" - case "testpb.EchoRequest.bz": - x.Bz = nil - case "testpb.EchoRequest.timestamp": - x.Timestamp = nil - case "testpb.EchoRequest.duration": - x.Duration = nil - case "testpb.EchoRequest.i32": - x.I32 = int32(0) - case "testpb.EchoRequest.i64": - x.I64 = int64(0) - case "testpb.EchoRequest.a_bool": - x.ABool = false - case "testpb.EchoRequest.an_enum": - x.AnEnum = 0 - case "testpb.EchoRequest.a_message": - x.AMessage = nil - case "testpb.EchoRequest.a_coin": - x.ACoin = nil - case "testpb.EchoRequest.an_address": - x.AnAddress = "" - case "testpb.EchoRequest.page": - x.Page = nil - case "testpb.EchoRequest.bools": - x.Bools = nil - case "testpb.EchoRequest.uints": - x.Uints = nil - case "testpb.EchoRequest.strings": - x.Strings = nil - case "testpb.EchoRequest.enums": - x.Enums = nil - case "testpb.EchoRequest.durations": - x.Durations = nil - case "testpb.EchoRequest.some_messages": - x.SomeMessages = nil - case "testpb.EchoRequest.positional1": - x.Positional1 = int32(0) - case "testpb.EchoRequest.positional2": - x.Positional2 = "" - case "testpb.EchoRequest.positional3_varargs": - x.Positional3Varargs = nil - case "testpb.EchoRequest.deprecated_field": - x.DeprecatedField = "" - case "testpb.EchoRequest.shorthand_deprecated_field": - x.ShorthandDeprecatedField = "" - case "testpb.EchoRequest.hidden_bool": - x.HiddenBool = false - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.EchoRequest")) - } - panic(fmt.Errorf("message testpb.EchoRequest does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_EchoRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "testpb.EchoRequest.u32": - value := x.U32 - return protoreflect.ValueOfUint32(value) - case "testpb.EchoRequest.u64": - value := x.U64 - return protoreflect.ValueOfUint64(value) - case "testpb.EchoRequest.str": - value := x.Str - return protoreflect.ValueOfString(value) - case "testpb.EchoRequest.bz": - value := x.Bz - return protoreflect.ValueOfBytes(value) - case "testpb.EchoRequest.timestamp": - value := x.Timestamp - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "testpb.EchoRequest.duration": - value := x.Duration - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "testpb.EchoRequest.i32": - value := x.I32 - return protoreflect.ValueOfInt32(value) - case "testpb.EchoRequest.i64": - value := x.I64 - return protoreflect.ValueOfInt64(value) - case "testpb.EchoRequest.a_bool": - value := x.ABool - return protoreflect.ValueOfBool(value) - case "testpb.EchoRequest.an_enum": - value := x.AnEnum - return protoreflect.ValueOfEnum((protoreflect.EnumNumber)(value)) - case "testpb.EchoRequest.a_message": - value := x.AMessage - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "testpb.EchoRequest.a_coin": - value := x.ACoin - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "testpb.EchoRequest.an_address": - value := x.AnAddress - return protoreflect.ValueOfString(value) - case "testpb.EchoRequest.page": - value := x.Page - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "testpb.EchoRequest.bools": - if len(x.Bools) == 0 { - return protoreflect.ValueOfList(&_EchoRequest_21_list{}) - } - listValue := &_EchoRequest_21_list{list: &x.Bools} - return protoreflect.ValueOfList(listValue) - case "testpb.EchoRequest.uints": - if len(x.Uints) == 0 { - return protoreflect.ValueOfList(&_EchoRequest_22_list{}) - } - listValue := &_EchoRequest_22_list{list: &x.Uints} - return protoreflect.ValueOfList(listValue) - case "testpb.EchoRequest.strings": - if len(x.Strings) == 0 { - return protoreflect.ValueOfList(&_EchoRequest_23_list{}) - } - listValue := &_EchoRequest_23_list{list: &x.Strings} - return protoreflect.ValueOfList(listValue) - case "testpb.EchoRequest.enums": - if len(x.Enums) == 0 { - return protoreflect.ValueOfList(&_EchoRequest_24_list{}) - } - listValue := &_EchoRequest_24_list{list: &x.Enums} - return protoreflect.ValueOfList(listValue) - case "testpb.EchoRequest.durations": - if len(x.Durations) == 0 { - return protoreflect.ValueOfList(&_EchoRequest_25_list{}) - } - listValue := &_EchoRequest_25_list{list: &x.Durations} - return protoreflect.ValueOfList(listValue) - case "testpb.EchoRequest.some_messages": - if len(x.SomeMessages) == 0 { - return protoreflect.ValueOfList(&_EchoRequest_26_list{}) - } - listValue := &_EchoRequest_26_list{list: &x.SomeMessages} - return protoreflect.ValueOfList(listValue) - case "testpb.EchoRequest.positional1": - value := x.Positional1 - return protoreflect.ValueOfInt32(value) - case "testpb.EchoRequest.positional2": - value := x.Positional2 - return protoreflect.ValueOfString(value) - case "testpb.EchoRequest.positional3_varargs": - if len(x.Positional3Varargs) == 0 { - return protoreflect.ValueOfList(&_EchoRequest_29_list{}) - } - listValue := &_EchoRequest_29_list{list: &x.Positional3Varargs} - return protoreflect.ValueOfList(listValue) - case "testpb.EchoRequest.deprecated_field": - value := x.DeprecatedField - return protoreflect.ValueOfString(value) - case "testpb.EchoRequest.shorthand_deprecated_field": - value := x.ShorthandDeprecatedField - return protoreflect.ValueOfString(value) - case "testpb.EchoRequest.hidden_bool": - value := x.HiddenBool - return protoreflect.ValueOfBool(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.EchoRequest")) - } - panic(fmt.Errorf("message testpb.EchoRequest does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_EchoRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "testpb.EchoRequest.u32": - x.U32 = uint32(value.Uint()) - case "testpb.EchoRequest.u64": - x.U64 = value.Uint() - case "testpb.EchoRequest.str": - x.Str = value.Interface().(string) - case "testpb.EchoRequest.bz": - x.Bz = value.Bytes() - case "testpb.EchoRequest.timestamp": - x.Timestamp = value.Message().Interface().(*timestamppb.Timestamp) - case "testpb.EchoRequest.duration": - x.Duration = value.Message().Interface().(*durationpb.Duration) - case "testpb.EchoRequest.i32": - x.I32 = int32(value.Int()) - case "testpb.EchoRequest.i64": - x.I64 = value.Int() - case "testpb.EchoRequest.a_bool": - x.ABool = value.Bool() - case "testpb.EchoRequest.an_enum": - x.AnEnum = (Enum)(value.Enum()) - case "testpb.EchoRequest.a_message": - x.AMessage = value.Message().Interface().(*AMessage) - case "testpb.EchoRequest.a_coin": - x.ACoin = value.Message().Interface().(*v1beta1.Coin) - case "testpb.EchoRequest.an_address": - x.AnAddress = value.Interface().(string) - case "testpb.EchoRequest.page": - x.Page = value.Message().Interface().(*v1beta11.PageRequest) - case "testpb.EchoRequest.bools": - lv := value.List() - clv := lv.(*_EchoRequest_21_list) - x.Bools = *clv.list - case "testpb.EchoRequest.uints": - lv := value.List() - clv := lv.(*_EchoRequest_22_list) - x.Uints = *clv.list - case "testpb.EchoRequest.strings": - lv := value.List() - clv := lv.(*_EchoRequest_23_list) - x.Strings = *clv.list - case "testpb.EchoRequest.enums": - lv := value.List() - clv := lv.(*_EchoRequest_24_list) - x.Enums = *clv.list - case "testpb.EchoRequest.durations": - lv := value.List() - clv := lv.(*_EchoRequest_25_list) - x.Durations = *clv.list - case "testpb.EchoRequest.some_messages": - lv := value.List() - clv := lv.(*_EchoRequest_26_list) - x.SomeMessages = *clv.list - case "testpb.EchoRequest.positional1": - x.Positional1 = int32(value.Int()) - case "testpb.EchoRequest.positional2": - x.Positional2 = value.Interface().(string) - case "testpb.EchoRequest.positional3_varargs": - lv := value.List() - clv := lv.(*_EchoRequest_29_list) - x.Positional3Varargs = *clv.list - case "testpb.EchoRequest.deprecated_field": - x.DeprecatedField = value.Interface().(string) - case "testpb.EchoRequest.shorthand_deprecated_field": - x.ShorthandDeprecatedField = value.Interface().(string) - case "testpb.EchoRequest.hidden_bool": - x.HiddenBool = value.Bool() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.EchoRequest")) - } - panic(fmt.Errorf("message testpb.EchoRequest does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_EchoRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "testpb.EchoRequest.timestamp": - if x.Timestamp == nil { - x.Timestamp = new(timestamppb.Timestamp) - } - return protoreflect.ValueOfMessage(x.Timestamp.ProtoReflect()) - case "testpb.EchoRequest.duration": - if x.Duration == nil { - x.Duration = new(durationpb.Duration) - } - return protoreflect.ValueOfMessage(x.Duration.ProtoReflect()) - case "testpb.EchoRequest.a_message": - if x.AMessage == nil { - x.AMessage = new(AMessage) - } - return protoreflect.ValueOfMessage(x.AMessage.ProtoReflect()) - case "testpb.EchoRequest.a_coin": - if x.ACoin == nil { - x.ACoin = new(v1beta1.Coin) - } - return protoreflect.ValueOfMessage(x.ACoin.ProtoReflect()) - case "testpb.EchoRequest.page": - if x.Page == nil { - x.Page = new(v1beta11.PageRequest) - } - return protoreflect.ValueOfMessage(x.Page.ProtoReflect()) - case "testpb.EchoRequest.bools": - if x.Bools == nil { - x.Bools = []bool{} - } - value := &_EchoRequest_21_list{list: &x.Bools} - return protoreflect.ValueOfList(value) - case "testpb.EchoRequest.uints": - if x.Uints == nil { - x.Uints = []uint32{} - } - value := &_EchoRequest_22_list{list: &x.Uints} - return protoreflect.ValueOfList(value) - case "testpb.EchoRequest.strings": - if x.Strings == nil { - x.Strings = []string{} - } - value := &_EchoRequest_23_list{list: &x.Strings} - return protoreflect.ValueOfList(value) - case "testpb.EchoRequest.enums": - if x.Enums == nil { - x.Enums = []Enum{} - } - value := &_EchoRequest_24_list{list: &x.Enums} - return protoreflect.ValueOfList(value) - case "testpb.EchoRequest.durations": - if x.Durations == nil { - x.Durations = []*durationpb.Duration{} - } - value := &_EchoRequest_25_list{list: &x.Durations} - return protoreflect.ValueOfList(value) - case "testpb.EchoRequest.some_messages": - if x.SomeMessages == nil { - x.SomeMessages = []*AMessage{} - } - value := &_EchoRequest_26_list{list: &x.SomeMessages} - return protoreflect.ValueOfList(value) - case "testpb.EchoRequest.positional3_varargs": - if x.Positional3Varargs == nil { - x.Positional3Varargs = []*v1beta1.Coin{} - } - value := &_EchoRequest_29_list{list: &x.Positional3Varargs} - return protoreflect.ValueOfList(value) - case "testpb.EchoRequest.u32": - panic(fmt.Errorf("field u32 of message testpb.EchoRequest is not mutable")) - case "testpb.EchoRequest.u64": - panic(fmt.Errorf("field u64 of message testpb.EchoRequest is not mutable")) - case "testpb.EchoRequest.str": - panic(fmt.Errorf("field str of message testpb.EchoRequest is not mutable")) - case "testpb.EchoRequest.bz": - panic(fmt.Errorf("field bz of message testpb.EchoRequest is not mutable")) - case "testpb.EchoRequest.i32": - panic(fmt.Errorf("field i32 of message testpb.EchoRequest is not mutable")) - case "testpb.EchoRequest.i64": - panic(fmt.Errorf("field i64 of message testpb.EchoRequest is not mutable")) - case "testpb.EchoRequest.a_bool": - panic(fmt.Errorf("field a_bool of message testpb.EchoRequest is not mutable")) - case "testpb.EchoRequest.an_enum": - panic(fmt.Errorf("field an_enum of message testpb.EchoRequest is not mutable")) - case "testpb.EchoRequest.an_address": - panic(fmt.Errorf("field an_address of message testpb.EchoRequest is not mutable")) - case "testpb.EchoRequest.positional1": - panic(fmt.Errorf("field positional1 of message testpb.EchoRequest is not mutable")) - case "testpb.EchoRequest.positional2": - panic(fmt.Errorf("field positional2 of message testpb.EchoRequest is not mutable")) - case "testpb.EchoRequest.deprecated_field": - panic(fmt.Errorf("field deprecated_field of message testpb.EchoRequest is not mutable")) - case "testpb.EchoRequest.shorthand_deprecated_field": - panic(fmt.Errorf("field shorthand_deprecated_field of message testpb.EchoRequest is not mutable")) - case "testpb.EchoRequest.hidden_bool": - panic(fmt.Errorf("field hidden_bool of message testpb.EchoRequest is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.EchoRequest")) - } - panic(fmt.Errorf("message testpb.EchoRequest does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_EchoRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "testpb.EchoRequest.u32": - return protoreflect.ValueOfUint32(uint32(0)) - case "testpb.EchoRequest.u64": - return protoreflect.ValueOfUint64(uint64(0)) - case "testpb.EchoRequest.str": - return protoreflect.ValueOfString("") - case "testpb.EchoRequest.bz": - return protoreflect.ValueOfBytes(nil) - case "testpb.EchoRequest.timestamp": - m := new(timestamppb.Timestamp) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "testpb.EchoRequest.duration": - m := new(durationpb.Duration) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "testpb.EchoRequest.i32": - return protoreflect.ValueOfInt32(int32(0)) - case "testpb.EchoRequest.i64": - return protoreflect.ValueOfInt64(int64(0)) - case "testpb.EchoRequest.a_bool": - return protoreflect.ValueOfBool(false) - case "testpb.EchoRequest.an_enum": - return protoreflect.ValueOfEnum(0) - case "testpb.EchoRequest.a_message": - m := new(AMessage) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "testpb.EchoRequest.a_coin": - m := new(v1beta1.Coin) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "testpb.EchoRequest.an_address": - return protoreflect.ValueOfString("") - case "testpb.EchoRequest.page": - m := new(v1beta11.PageRequest) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "testpb.EchoRequest.bools": - list := []bool{} - return protoreflect.ValueOfList(&_EchoRequest_21_list{list: &list}) - case "testpb.EchoRequest.uints": - list := []uint32{} - return protoreflect.ValueOfList(&_EchoRequest_22_list{list: &list}) - case "testpb.EchoRequest.strings": - list := []string{} - return protoreflect.ValueOfList(&_EchoRequest_23_list{list: &list}) - case "testpb.EchoRequest.enums": - list := []Enum{} - return protoreflect.ValueOfList(&_EchoRequest_24_list{list: &list}) - case "testpb.EchoRequest.durations": - list := []*durationpb.Duration{} - return protoreflect.ValueOfList(&_EchoRequest_25_list{list: &list}) - case "testpb.EchoRequest.some_messages": - list := []*AMessage{} - return protoreflect.ValueOfList(&_EchoRequest_26_list{list: &list}) - case "testpb.EchoRequest.positional1": - return protoreflect.ValueOfInt32(int32(0)) - case "testpb.EchoRequest.positional2": - return protoreflect.ValueOfString("") - case "testpb.EchoRequest.positional3_varargs": - list := []*v1beta1.Coin{} - return protoreflect.ValueOfList(&_EchoRequest_29_list{list: &list}) - case "testpb.EchoRequest.deprecated_field": - return protoreflect.ValueOfString("") - case "testpb.EchoRequest.shorthand_deprecated_field": - return protoreflect.ValueOfString("") - case "testpb.EchoRequest.hidden_bool": - return protoreflect.ValueOfBool(false) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.EchoRequest")) - } - panic(fmt.Errorf("message testpb.EchoRequest does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_EchoRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in testpb.EchoRequest", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_EchoRequest) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_EchoRequest) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_EchoRequest) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_EchoRequest) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*EchoRequest) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if x.U32 != 0 { - n += 1 + runtime.Sov(uint64(x.U32)) - } - if x.U64 != 0 { - n += 1 + runtime.Sov(uint64(x.U64)) - } - l = len(x.Str) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Bz) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Timestamp != nil { - l = options.Size(x.Timestamp) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Duration != nil { - l = options.Size(x.Duration) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.I32 != 0 { - n += 1 + runtime.Sov(uint64(x.I32)) - } - if x.I64 != 0 { - n += 1 + runtime.Sov(uint64(x.I64)) - } - if x.ABool { - n += 2 - } - if x.AnEnum != 0 { - n += 2 + runtime.Sov(uint64(x.AnEnum)) - } - if x.AMessage != nil { - l = options.Size(x.AMessage) - n += 2 + l + runtime.Sov(uint64(l)) - } - if x.ACoin != nil { - l = options.Size(x.ACoin) - n += 2 + l + runtime.Sov(uint64(l)) - } - l = len(x.AnAddress) - if l > 0 { - n += 2 + l + runtime.Sov(uint64(l)) - } - if x.Page != nil { - l = options.Size(x.Page) - n += 2 + l + runtime.Sov(uint64(l)) - } - if len(x.Bools) > 0 { - n += 2 + runtime.Sov(uint64(len(x.Bools))) + len(x.Bools)*1 - } - if len(x.Uints) > 0 { - l = 0 - for _, e := range x.Uints { - l += runtime.Sov(uint64(e)) - } - n += 2 + runtime.Sov(uint64(l)) + l - } - if len(x.Strings) > 0 { - for _, s := range x.Strings { - l = len(s) - n += 2 + l + runtime.Sov(uint64(l)) - } - } - if len(x.Enums) > 0 { - l = 0 - for _, e := range x.Enums { - l += runtime.Sov(uint64(e)) - } - n += 2 + runtime.Sov(uint64(l)) + l - } - if len(x.Durations) > 0 { - for _, e := range x.Durations { - l = options.Size(e) - n += 2 + l + runtime.Sov(uint64(l)) - } - } - if len(x.SomeMessages) > 0 { - for _, e := range x.SomeMessages { - l = options.Size(e) - n += 2 + l + runtime.Sov(uint64(l)) - } - } - if x.Positional1 != 0 { - n += 2 + runtime.Sov(uint64(x.Positional1)) - } - l = len(x.Positional2) - if l > 0 { - n += 2 + l + runtime.Sov(uint64(l)) - } - if len(x.Positional3Varargs) > 0 { - for _, e := range x.Positional3Varargs { - l = options.Size(e) - n += 2 + l + runtime.Sov(uint64(l)) - } - } - l = len(x.DeprecatedField) - if l > 0 { - n += 2 + l + runtime.Sov(uint64(l)) - } - l = len(x.ShorthandDeprecatedField) - if l > 0 { - n += 2 + l + runtime.Sov(uint64(l)) - } - if x.HiddenBool { - n += 3 - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*EchoRequest) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if x.HiddenBool { - i-- - if x.HiddenBool { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x2 - i-- - dAtA[i] = 0x80 - } - if len(x.ShorthandDeprecatedField) > 0 { - i -= len(x.ShorthandDeprecatedField) - copy(dAtA[i:], x.ShorthandDeprecatedField) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ShorthandDeprecatedField))) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xfa - } - if len(x.DeprecatedField) > 0 { - i -= len(x.DeprecatedField) - copy(dAtA[i:], x.DeprecatedField) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.DeprecatedField))) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xf2 - } - if len(x.Positional3Varargs) > 0 { - for iNdEx := len(x.Positional3Varargs) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.Positional3Varargs[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xea - } - } - if len(x.Positional2) > 0 { - i -= len(x.Positional2) - copy(dAtA[i:], x.Positional2) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Positional2))) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xe2 - } - if x.Positional1 != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Positional1)) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xd8 - } - if len(x.SomeMessages) > 0 { - for iNdEx := len(x.SomeMessages) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.SomeMessages[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xd2 - } - } - if len(x.Durations) > 0 { - for iNdEx := len(x.Durations) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.Durations[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xca - } - } - if len(x.Enums) > 0 { - var pksize2 int - for _, num := range x.Enums { - pksize2 += runtime.Sov(uint64(num)) - } - i -= pksize2 - j1 := i - for _, num1 := range x.Enums { - num := uint64(num1) - for num >= 1<<7 { - dAtA[j1] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j1++ - } - dAtA[j1] = uint8(num) - j1++ - } - i = runtime.EncodeVarint(dAtA, i, uint64(pksize2)) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xc2 - } - if len(x.Strings) > 0 { - for iNdEx := len(x.Strings) - 1; iNdEx >= 0; iNdEx-- { - i -= len(x.Strings[iNdEx]) - copy(dAtA[i:], x.Strings[iNdEx]) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Strings[iNdEx]))) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xba - } - } - if len(x.Uints) > 0 { - var pksize4 int - for _, num := range x.Uints { - pksize4 += runtime.Sov(uint64(num)) - } - i -= pksize4 - j3 := i - for _, num := range x.Uints { - for num >= 1<<7 { - dAtA[j3] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j3++ - } - dAtA[j3] = uint8(num) - j3++ - } - i = runtime.EncodeVarint(dAtA, i, uint64(pksize4)) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xb2 - } - if len(x.Bools) > 0 { - for iNdEx := len(x.Bools) - 1; iNdEx >= 0; iNdEx-- { - i-- - if x.Bools[iNdEx] { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - } - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Bools))) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xaa - } - if x.Page != nil { - encoded, err := options.Marshal(x.Page) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xa2 - } - if len(x.AnAddress) > 0 { - i -= len(x.AnAddress) - copy(dAtA[i:], x.AnAddress) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.AnAddress))) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x9a - } - if x.ACoin != nil { - encoded, err := options.Marshal(x.ACoin) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x92 - } - if x.AMessage != nil { - encoded, err := options.Marshal(x.AMessage) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x8a - } - if x.AnEnum != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.AnEnum)) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x80 - } - if x.ABool { - i-- - if x.ABool { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x78 - } - if x.I64 != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.I64)) - i-- - dAtA[i] = 0x50 - } - if x.I32 != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.I32)) - i-- - dAtA[i] = 0x38 - } - if x.Duration != nil { - encoded, err := options.Marshal(x.Duration) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x32 - } - if x.Timestamp != nil { - encoded, err := options.Marshal(x.Timestamp) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x2a - } - if len(x.Bz) > 0 { - i -= len(x.Bz) - copy(dAtA[i:], x.Bz) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Bz))) - i-- - dAtA[i] = 0x22 - } - if len(x.Str) > 0 { - i -= len(x.Str) - copy(dAtA[i:], x.Str) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Str))) - i-- - dAtA[i] = 0x1a - } - if x.U64 != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.U64)) - i-- - dAtA[i] = 0x10 - } - if x.U32 != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.U32)) - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*EchoRequest) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: EchoRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: EchoRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field U32", wireType) - } - x.U32 = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.U32 |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field U64", wireType) - } - x.U64 = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.U64 |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Str", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Str = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Bz", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Bz = append(x.Bz[:0], dAtA[iNdEx:postIndex]...) - if x.Bz == nil { - x.Bz = []byte{} - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if x.Timestamp == nil { - x.Timestamp = ×tamppb.Timestamp{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Timestamp); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 6: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Duration", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if x.Duration == nil { - x.Duration = &durationpb.Duration{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Duration); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 7: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field I32", wireType) - } - x.I32 = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.I32 |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 10: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field I64", wireType) - } - x.I64 = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.I64 |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 15: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ABool", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - x.ABool = bool(v != 0) - case 16: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field AnEnum", wireType) - } - x.AnEnum = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.AnEnum |= Enum(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 17: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field AMessage", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if x.AMessage == nil { - x.AMessage = &AMessage{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.AMessage); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 18: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ACoin", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if x.ACoin == nil { - x.ACoin = &v1beta1.Coin{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.ACoin); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 19: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field AnAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.AnAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 20: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Page", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if x.Page == nil { - x.Page = &v1beta11.PageRequest{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Page); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 21: - if wireType == 0 { - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - x.Bools = append(x.Bools, bool(v != 0)) - } else if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - packedLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + packedLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - var elementCount int - elementCount = packedLen - if elementCount != 0 && len(x.Bools) == 0 { - x.Bools = make([]bool, 0, elementCount) - } - for iNdEx < postIndex { - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - x.Bools = append(x.Bools, bool(v != 0)) - } - } else { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Bools", wireType) - } - case 22: - if wireType == 0 { - var v uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - x.Uints = append(x.Uints, v) - } else if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - packedLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + packedLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - var elementCount int - var count int - for _, integer := range dAtA[iNdEx:postIndex] { - if integer < 128 { - count++ - } - } - elementCount = count - if elementCount != 0 && len(x.Uints) == 0 { - x.Uints = make([]uint32, 0, elementCount) - } - for iNdEx < postIndex { - var v uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - x.Uints = append(x.Uints, v) - } - } else { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Uints", wireType) - } - case 23: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Strings", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Strings = append(x.Strings, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 24: - if wireType == 0 { - var v Enum - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= Enum(b&0x7F) << shift - if b < 0x80 { - break - } - } - x.Enums = append(x.Enums, v) - } else if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - packedLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + packedLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - var elementCount int - if elementCount != 0 && len(x.Enums) == 0 { - x.Enums = make([]Enum, 0, elementCount) - } - for iNdEx < postIndex { - var v Enum - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= Enum(b&0x7F) << shift - if b < 0x80 { - break - } - } - x.Enums = append(x.Enums, v) - } - } else { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Enums", wireType) - } - case 25: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Durations", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Durations = append(x.Durations, &durationpb.Duration{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Durations[len(x.Durations)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 26: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field SomeMessages", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.SomeMessages = append(x.SomeMessages, &AMessage{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.SomeMessages[len(x.SomeMessages)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 27: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Positional1", wireType) - } - x.Positional1 = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.Positional1 |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 28: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Positional2", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Positional2 = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 29: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Positional3Varargs", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Positional3Varargs = append(x.Positional3Varargs, &v1beta1.Coin{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Positional3Varargs[len(x.Positional3Varargs)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 30: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field DeprecatedField", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.DeprecatedField = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 31: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ShorthandDeprecatedField", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.ShorthandDeprecatedField = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 32: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field HiddenBool", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - x.HiddenBool = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_AMessage protoreflect.MessageDescriptor - fd_AMessage_bar protoreflect.FieldDescriptor - fd_AMessage_baz protoreflect.FieldDescriptor -) - -func init() { - file_testpb_query_proto_init() - md_AMessage = File_testpb_query_proto.Messages().ByName("AMessage") - fd_AMessage_bar = md_AMessage.Fields().ByName("bar") - fd_AMessage_baz = md_AMessage.Fields().ByName("baz") -} - -var _ protoreflect.Message = (*fastReflection_AMessage)(nil) - -type fastReflection_AMessage AMessage - -func (x *AMessage) ProtoReflect() protoreflect.Message { - return (*fastReflection_AMessage)(x) -} - -func (x *AMessage) slowProtoReflect() protoreflect.Message { - mi := &file_testpb_query_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_AMessage_messageType fastReflection_AMessage_messageType -var _ protoreflect.MessageType = fastReflection_AMessage_messageType{} - -type fastReflection_AMessage_messageType struct{} - -func (x fastReflection_AMessage_messageType) Zero() protoreflect.Message { - return (*fastReflection_AMessage)(nil) -} -func (x fastReflection_AMessage_messageType) New() protoreflect.Message { - return new(fastReflection_AMessage) -} -func (x fastReflection_AMessage_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_AMessage -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_AMessage) Descriptor() protoreflect.MessageDescriptor { - return md_AMessage -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_AMessage) Type() protoreflect.MessageType { - return _fastReflection_AMessage_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_AMessage) New() protoreflect.Message { - return new(fastReflection_AMessage) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_AMessage) Interface() protoreflect.ProtoMessage { - return (*AMessage)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_AMessage) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Bar != "" { - value := protoreflect.ValueOfString(x.Bar) - if !f(fd_AMessage_bar, value) { - return - } - } - if x.Baz != int32(0) { - value := protoreflect.ValueOfInt32(x.Baz) - if !f(fd_AMessage_baz, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_AMessage) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "testpb.AMessage.bar": - return x.Bar != "" - case "testpb.AMessage.baz": - return x.Baz != int32(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.AMessage")) - } - panic(fmt.Errorf("message testpb.AMessage does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_AMessage) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "testpb.AMessage.bar": - x.Bar = "" - case "testpb.AMessage.baz": - x.Baz = int32(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.AMessage")) - } - panic(fmt.Errorf("message testpb.AMessage does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_AMessage) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "testpb.AMessage.bar": - value := x.Bar - return protoreflect.ValueOfString(value) - case "testpb.AMessage.baz": - value := x.Baz - return protoreflect.ValueOfInt32(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.AMessage")) - } - panic(fmt.Errorf("message testpb.AMessage does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_AMessage) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "testpb.AMessage.bar": - x.Bar = value.Interface().(string) - case "testpb.AMessage.baz": - x.Baz = int32(value.Int()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.AMessage")) - } - panic(fmt.Errorf("message testpb.AMessage does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_AMessage) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "testpb.AMessage.bar": - panic(fmt.Errorf("field bar of message testpb.AMessage is not mutable")) - case "testpb.AMessage.baz": - panic(fmt.Errorf("field baz of message testpb.AMessage is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.AMessage")) - } - panic(fmt.Errorf("message testpb.AMessage does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_AMessage) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "testpb.AMessage.bar": - return protoreflect.ValueOfString("") - case "testpb.AMessage.baz": - return protoreflect.ValueOfInt32(int32(0)) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.AMessage")) - } - panic(fmt.Errorf("message testpb.AMessage does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_AMessage) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in testpb.AMessage", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_AMessage) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_AMessage) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_AMessage) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_AMessage) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*AMessage) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Bar) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Baz != 0 { - n += 1 + runtime.Sov(uint64(x.Baz)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*AMessage) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if x.Baz != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Baz)) - i-- - dAtA[i] = 0x10 - } - if len(x.Bar) > 0 { - i -= len(x.Bar) - copy(dAtA[i:], x.Bar) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Bar))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*AMessage) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: AMessage: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: AMessage: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Bar", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Bar = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Baz", wireType) - } - x.Baz = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.Baz |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_EchoResponse protoreflect.MessageDescriptor - fd_EchoResponse_request protoreflect.FieldDescriptor -) - -func init() { - file_testpb_query_proto_init() - md_EchoResponse = File_testpb_query_proto.Messages().ByName("EchoResponse") - fd_EchoResponse_request = md_EchoResponse.Fields().ByName("request") -} - -var _ protoreflect.Message = (*fastReflection_EchoResponse)(nil) - -type fastReflection_EchoResponse EchoResponse - -func (x *EchoResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_EchoResponse)(x) -} - -func (x *EchoResponse) slowProtoReflect() protoreflect.Message { - mi := &file_testpb_query_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_EchoResponse_messageType fastReflection_EchoResponse_messageType -var _ protoreflect.MessageType = fastReflection_EchoResponse_messageType{} - -type fastReflection_EchoResponse_messageType struct{} - -func (x fastReflection_EchoResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_EchoResponse)(nil) -} -func (x fastReflection_EchoResponse_messageType) New() protoreflect.Message { - return new(fastReflection_EchoResponse) -} -func (x fastReflection_EchoResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_EchoResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_EchoResponse) Descriptor() protoreflect.MessageDescriptor { - return md_EchoResponse -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_EchoResponse) Type() protoreflect.MessageType { - return _fastReflection_EchoResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_EchoResponse) New() protoreflect.Message { - return new(fastReflection_EchoResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_EchoResponse) Interface() protoreflect.ProtoMessage { - return (*EchoResponse)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_EchoResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Request != nil { - value := protoreflect.ValueOfMessage(x.Request.ProtoReflect()) - if !f(fd_EchoResponse_request, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_EchoResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "testpb.EchoResponse.request": - return x.Request != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.EchoResponse")) - } - panic(fmt.Errorf("message testpb.EchoResponse does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_EchoResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "testpb.EchoResponse.request": - x.Request = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.EchoResponse")) - } - panic(fmt.Errorf("message testpb.EchoResponse does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_EchoResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "testpb.EchoResponse.request": - value := x.Request - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.EchoResponse")) - } - panic(fmt.Errorf("message testpb.EchoResponse does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_EchoResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "testpb.EchoResponse.request": - x.Request = value.Message().Interface().(*EchoRequest) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.EchoResponse")) - } - panic(fmt.Errorf("message testpb.EchoResponse does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_EchoResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "testpb.EchoResponse.request": - if x.Request == nil { - x.Request = new(EchoRequest) - } - return protoreflect.ValueOfMessage(x.Request.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.EchoResponse")) - } - panic(fmt.Errorf("message testpb.EchoResponse does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_EchoResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "testpb.EchoResponse.request": - m := new(EchoRequest) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: testpb.EchoResponse")) - } - panic(fmt.Errorf("message testpb.EchoResponse does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_EchoResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in testpb.EchoResponse", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_EchoResponse) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_EchoResponse) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_EchoResponse) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_EchoResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*EchoResponse) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if x.Request != nil { - l = options.Size(x.Request) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*EchoResponse) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if x.Request != nil { - encoded, err := options.Marshal(x.Request) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*EchoResponse) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: EchoResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: EchoResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Request", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if x.Request == nil { - x.Request = &EchoRequest{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Request); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.0 -// protoc (unknown) -// source: testpb/query.proto - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type Enum int32 - -const ( - Enum_ENUM_UNSPECIFIED Enum = 0 - Enum_ENUM_ONE Enum = 1 - Enum_ENUM_TWO Enum = 2 - Enum_ENUM_FIVE Enum = 5 - Enum_ENUM_NEG_THREE Enum = -3 -) - -// Enum value maps for Enum. -var ( - Enum_name = map[int32]string{ - 0: "ENUM_UNSPECIFIED", - 1: "ENUM_ONE", - 2: "ENUM_TWO", - 5: "ENUM_FIVE", - -3: "ENUM_NEG_THREE", - } - Enum_value = map[string]int32{ - "ENUM_UNSPECIFIED": 0, - "ENUM_ONE": 1, - "ENUM_TWO": 2, - "ENUM_FIVE": 5, - "ENUM_NEG_THREE": -3, - } -) - -func (x Enum) Enum() *Enum { - p := new(Enum) - *p = x - return p -} - -func (x Enum) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (Enum) Descriptor() protoreflect.EnumDescriptor { - return file_testpb_query_proto_enumTypes[0].Descriptor() -} - -func (Enum) Type() protoreflect.EnumType { - return &file_testpb_query_proto_enumTypes[0] -} - -func (x Enum) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use Enum.Descriptor instead. -func (Enum) EnumDescriptor() ([]byte, []int) { - return file_testpb_query_proto_rawDescGZIP(), []int{0} -} - -type EchoRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // u32 is an uint32 - U32 uint32 `protobuf:"varint,1,opt,name=u32,proto3" json:"u32,omitempty"` - U64 uint64 `protobuf:"varint,2,opt,name=u64,proto3" json:"u64,omitempty"` - Str string `protobuf:"bytes,3,opt,name=str,proto3" json:"str,omitempty"` - Bz []byte `protobuf:"bytes,4,opt,name=bz,proto3" json:"bz,omitempty"` - Timestamp *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=timestamp,proto3" json:"timestamp,omitempty"` - Duration *durationpb.Duration `protobuf:"bytes,6,opt,name=duration,proto3" json:"duration,omitempty"` - I32 int32 `protobuf:"varint,7,opt,name=i32,proto3" json:"i32,omitempty"` - I64 int64 `protobuf:"varint,10,opt,name=i64,proto3" json:"i64,omitempty"` - ABool bool `protobuf:"varint,15,opt,name=a_bool,json=aBool,proto3" json:"a_bool,omitempty"` - AnEnum Enum `protobuf:"varint,16,opt,name=an_enum,json=anEnum,proto3,enum=testpb.Enum" json:"an_enum,omitempty"` - AMessage *AMessage `protobuf:"bytes,17,opt,name=a_message,json=aMessage,proto3" json:"a_message,omitempty"` - ACoin *v1beta1.Coin `protobuf:"bytes,18,opt,name=a_coin,json=aCoin,proto3" json:"a_coin,omitempty"` - AnAddress string `protobuf:"bytes,19,opt,name=an_address,json=anAddress,proto3" json:"an_address,omitempty"` - Page *v1beta11.PageRequest `protobuf:"bytes,20,opt,name=page,proto3" json:"page,omitempty"` - Bools []bool `protobuf:"varint,21,rep,packed,name=bools,proto3" json:"bools,omitempty"` - Uints []uint32 `protobuf:"varint,22,rep,packed,name=uints,proto3" json:"uints,omitempty"` - Strings []string `protobuf:"bytes,23,rep,name=strings,proto3" json:"strings,omitempty"` - Enums []Enum `protobuf:"varint,24,rep,packed,name=enums,proto3,enum=testpb.Enum" json:"enums,omitempty"` - Durations []*durationpb.Duration `protobuf:"bytes,25,rep,name=durations,proto3" json:"durations,omitempty"` - SomeMessages []*AMessage `protobuf:"bytes,26,rep,name=some_messages,json=someMessages,proto3" json:"some_messages,omitempty"` - Positional1 int32 `protobuf:"varint,27,opt,name=positional1,proto3" json:"positional1,omitempty"` - Positional2 string `protobuf:"bytes,28,opt,name=positional2,proto3" json:"positional2,omitempty"` - Positional3Varargs []*v1beta1.Coin `protobuf:"bytes,29,rep,name=positional3_varargs,json=positional3Varargs,proto3" json:"positional3_varargs,omitempty"` - DeprecatedField string `protobuf:"bytes,30,opt,name=deprecated_field,json=deprecatedField,proto3" json:"deprecated_field,omitempty"` - ShorthandDeprecatedField string `protobuf:"bytes,31,opt,name=shorthand_deprecated_field,json=shorthandDeprecatedField,proto3" json:"shorthand_deprecated_field,omitempty"` - HiddenBool bool `protobuf:"varint,32,opt,name=hidden_bool,json=hiddenBool,proto3" json:"hidden_bool,omitempty"` -} - -func (x *EchoRequest) Reset() { - *x = EchoRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_testpb_query_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *EchoRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*EchoRequest) ProtoMessage() {} - -// Deprecated: Use EchoRequest.ProtoReflect.Descriptor instead. -func (*EchoRequest) Descriptor() ([]byte, []int) { - return file_testpb_query_proto_rawDescGZIP(), []int{0} -} - -func (x *EchoRequest) GetU32() uint32 { - if x != nil { - return x.U32 - } - return 0 -} - -func (x *EchoRequest) GetU64() uint64 { - if x != nil { - return x.U64 - } - return 0 -} - -func (x *EchoRequest) GetStr() string { - if x != nil { - return x.Str - } - return "" -} - -func (x *EchoRequest) GetBz() []byte { - if x != nil { - return x.Bz - } - return nil -} - -func (x *EchoRequest) GetTimestamp() *timestamppb.Timestamp { - if x != nil { - return x.Timestamp - } - return nil -} - -func (x *EchoRequest) GetDuration() *durationpb.Duration { - if x != nil { - return x.Duration - } - return nil -} - -func (x *EchoRequest) GetI32() int32 { - if x != nil { - return x.I32 - } - return 0 -} - -func (x *EchoRequest) GetI64() int64 { - if x != nil { - return x.I64 - } - return 0 -} - -func (x *EchoRequest) GetABool() bool { - if x != nil { - return x.ABool - } - return false -} - -func (x *EchoRequest) GetAnEnum() Enum { - if x != nil { - return x.AnEnum - } - return Enum_ENUM_UNSPECIFIED -} - -func (x *EchoRequest) GetAMessage() *AMessage { - if x != nil { - return x.AMessage - } - return nil -} - -func (x *EchoRequest) GetACoin() *v1beta1.Coin { - if x != nil { - return x.ACoin - } - return nil -} - -func (x *EchoRequest) GetAnAddress() string { - if x != nil { - return x.AnAddress - } - return "" -} - -func (x *EchoRequest) GetPage() *v1beta11.PageRequest { - if x != nil { - return x.Page - } - return nil -} - -func (x *EchoRequest) GetBools() []bool { - if x != nil { - return x.Bools - } - return nil -} - -func (x *EchoRequest) GetUints() []uint32 { - if x != nil { - return x.Uints - } - return nil -} - -func (x *EchoRequest) GetStrings() []string { - if x != nil { - return x.Strings - } - return nil -} - -func (x *EchoRequest) GetEnums() []Enum { - if x != nil { - return x.Enums - } - return nil -} - -func (x *EchoRequest) GetDurations() []*durationpb.Duration { - if x != nil { - return x.Durations - } - return nil -} - -func (x *EchoRequest) GetSomeMessages() []*AMessage { - if x != nil { - return x.SomeMessages - } - return nil -} - -func (x *EchoRequest) GetPositional1() int32 { - if x != nil { - return x.Positional1 - } - return 0 -} - -func (x *EchoRequest) GetPositional2() string { - if x != nil { - return x.Positional2 - } - return "" -} - -func (x *EchoRequest) GetPositional3Varargs() []*v1beta1.Coin { - if x != nil { - return x.Positional3Varargs - } - return nil -} - -func (x *EchoRequest) GetDeprecatedField() string { - if x != nil { - return x.DeprecatedField - } - return "" -} - -func (x *EchoRequest) GetShorthandDeprecatedField() string { - if x != nil { - return x.ShorthandDeprecatedField - } - return "" -} - -func (x *EchoRequest) GetHiddenBool() bool { - if x != nil { - return x.HiddenBool - } - return false -} - -type AMessage struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Bar string `protobuf:"bytes,1,opt,name=bar,proto3" json:"bar,omitempty"` - Baz int32 `protobuf:"varint,2,opt,name=baz,proto3" json:"baz,omitempty"` -} - -func (x *AMessage) Reset() { - *x = AMessage{} - if protoimpl.UnsafeEnabled { - mi := &file_testpb_query_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *AMessage) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*AMessage) ProtoMessage() {} - -// Deprecated: Use AMessage.ProtoReflect.Descriptor instead. -func (*AMessage) Descriptor() ([]byte, []int) { - return file_testpb_query_proto_rawDescGZIP(), []int{1} -} - -func (x *AMessage) GetBar() string { - if x != nil { - return x.Bar - } - return "" -} - -func (x *AMessage) GetBaz() int32 { - if x != nil { - return x.Baz - } - return 0 -} - -type EchoResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Request *EchoRequest `protobuf:"bytes,1,opt,name=request,proto3" json:"request,omitempty"` -} - -func (x *EchoResponse) Reset() { - *x = EchoResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_testpb_query_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *EchoResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*EchoResponse) ProtoMessage() {} - -// Deprecated: Use EchoResponse.ProtoReflect.Descriptor instead. -func (*EchoResponse) Descriptor() ([]byte, []int) { - return file_testpb_query_proto_rawDescGZIP(), []int{2} -} - -func (x *EchoResponse) GetRequest() *EchoRequest { - if x != nil { - return x.Request - } - return nil -} - -var File_testpb_query_proto protoreflect.FileDescriptor - -var file_testpb_query_proto_rawDesc = []byte{ - 0x0a, 0x12, 0x74, 0x65, 0x73, 0x74, 0x70, 0x62, 0x2f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x06, 0x74, 0x65, 0x73, 0x74, 0x70, 0x62, 0x1a, 0x1f, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, - 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, - 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x2f, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x62, 0x61, 0x73, - 0x65, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x63, 0x6f, 0x69, 0x6e, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xf0, 0x07, 0x0a, 0x0b, 0x45, 0x63, 0x68, 0x6f, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x33, 0x32, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0d, 0x52, 0x03, 0x75, 0x33, 0x32, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x36, 0x34, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x04, 0x52, 0x03, 0x75, 0x36, 0x34, 0x12, 0x10, 0x0a, 0x03, 0x73, 0x74, 0x72, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x73, 0x74, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x62, 0x7a, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x02, 0x62, 0x7a, 0x12, 0x38, 0x0a, 0x09, 0x74, 0x69, - 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, - 0x74, 0x61, 0x6d, 0x70, 0x12, 0x35, 0x0a, 0x08, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x52, 0x08, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x10, 0x0a, 0x03, 0x69, - 0x33, 0x32, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x69, 0x33, 0x32, 0x12, 0x10, 0x0a, - 0x03, 0x69, 0x36, 0x34, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x69, 0x36, 0x34, 0x12, - 0x15, 0x0a, 0x06, 0x61, 0x5f, 0x62, 0x6f, 0x6f, 0x6c, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x05, 0x61, 0x42, 0x6f, 0x6f, 0x6c, 0x12, 0x25, 0x0a, 0x07, 0x61, 0x6e, 0x5f, 0x65, 0x6e, 0x75, - 0x6d, 0x18, 0x10, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0c, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x70, 0x62, - 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x52, 0x06, 0x61, 0x6e, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x2d, 0x0a, - 0x09, 0x61, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x11, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x10, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x70, 0x62, 0x2e, 0x41, 0x4d, 0x65, 0x73, 0x73, 0x61, - 0x67, 0x65, 0x52, 0x08, 0x61, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x30, 0x0a, 0x06, - 0x61, 0x5f, 0x63, 0x6f, 0x69, 0x6e, 0x18, 0x12, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x52, 0x05, 0x61, 0x43, 0x6f, 0x69, 0x6e, 0x12, 0x37, - 0x0a, 0x0a, 0x61, 0x6e, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x13, 0x20, 0x01, - 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x09, 0x61, 0x6e, - 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x3a, 0x0a, 0x04, 0x70, 0x61, 0x67, 0x65, 0x18, - 0x14, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, - 0x61, 0x73, 0x65, 0x2e, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x2e, 0x50, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x04, 0x70, - 0x61, 0x67, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x6f, 0x6f, 0x6c, 0x73, 0x18, 0x15, 0x20, 0x03, - 0x28, 0x08, 0x52, 0x05, 0x62, 0x6f, 0x6f, 0x6c, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x75, 0x69, 0x6e, - 0x74, 0x73, 0x18, 0x16, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x05, 0x75, 0x69, 0x6e, 0x74, 0x73, 0x12, - 0x18, 0x0a, 0x07, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x17, 0x20, 0x03, 0x28, 0x09, - 0x52, 0x07, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x22, 0x0a, 0x05, 0x65, 0x6e, 0x75, - 0x6d, 0x73, 0x18, 0x18, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x0c, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x70, - 0x62, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x52, 0x05, 0x65, 0x6e, 0x75, 0x6d, 0x73, 0x12, 0x37, 0x0a, - 0x09, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x19, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x64, 0x75, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x35, 0x0a, 0x0d, 0x73, 0x6f, 0x6d, 0x65, 0x5f, 0x6d, - 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x18, 0x1a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, - 0x74, 0x65, 0x73, 0x74, 0x70, 0x62, 0x2e, 0x41, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, - 0x0c, 0x73, 0x6f, 0x6d, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x12, 0x20, 0x0a, - 0x0b, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x31, 0x18, 0x1b, 0x20, 0x01, - 0x28, 0x05, 0x52, 0x0b, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x31, 0x12, - 0x20, 0x0a, 0x0b, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x32, 0x18, 0x1c, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, - 0x32, 0x12, 0x4a, 0x0a, 0x13, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x33, - 0x5f, 0x76, 0x61, 0x72, 0x61, 0x72, 0x67, 0x73, 0x18, 0x1d, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, - 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x52, 0x12, 0x70, 0x6f, 0x73, 0x69, 0x74, - 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x33, 0x56, 0x61, 0x72, 0x61, 0x72, 0x67, 0x73, 0x12, 0x29, 0x0a, - 0x10, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x66, 0x69, 0x65, 0x6c, - 0x64, 0x18, 0x1e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, - 0x74, 0x65, 0x64, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x3c, 0x0a, 0x1a, 0x73, 0x68, 0x6f, 0x72, - 0x74, 0x68, 0x61, 0x6e, 0x64, 0x5f, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, - 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x1f, 0x20, 0x01, 0x28, 0x09, 0x52, 0x18, 0x73, 0x68, - 0x6f, 0x72, 0x74, 0x68, 0x61, 0x6e, 0x64, 0x44, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, - 0x64, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x68, 0x69, 0x64, 0x64, 0x65, 0x6e, - 0x5f, 0x62, 0x6f, 0x6f, 0x6c, 0x18, 0x20, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x68, 0x69, 0x64, - 0x64, 0x65, 0x6e, 0x42, 0x6f, 0x6f, 0x6c, 0x22, 0x2e, 0x0a, 0x08, 0x41, 0x4d, 0x65, 0x73, 0x73, - 0x61, 0x67, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x62, 0x61, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x03, 0x62, 0x61, 0x72, 0x12, 0x10, 0x0a, 0x03, 0x62, 0x61, 0x7a, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x05, 0x52, 0x03, 0x62, 0x61, 0x7a, 0x22, 0x3d, 0x0a, 0x0c, 0x45, 0x63, 0x68, 0x6f, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2d, 0x0a, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x70, - 0x62, 0x2e, 0x45, 0x63, 0x68, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x07, 0x72, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2a, 0x64, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x14, - 0x0a, 0x10, 0x45, 0x4e, 0x55, 0x4d, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, - 0x45, 0x44, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x45, 0x4e, 0x55, 0x4d, 0x5f, 0x4f, 0x4e, 0x45, - 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x45, 0x4e, 0x55, 0x4d, 0x5f, 0x54, 0x57, 0x4f, 0x10, 0x02, - 0x12, 0x0d, 0x0a, 0x09, 0x45, 0x4e, 0x55, 0x4d, 0x5f, 0x46, 0x49, 0x56, 0x45, 0x10, 0x05, 0x12, - 0x1b, 0x0a, 0x0e, 0x45, 0x4e, 0x55, 0x4d, 0x5f, 0x4e, 0x45, 0x47, 0x5f, 0x54, 0x48, 0x52, 0x45, - 0x45, 0x10, 0xfd, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0x32, 0x3a, 0x0a, 0x05, - 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x31, 0x0a, 0x04, 0x45, 0x63, 0x68, 0x6f, 0x12, 0x13, 0x2e, - 0x74, 0x65, 0x73, 0x74, 0x70, 0x62, 0x2e, 0x45, 0x63, 0x68, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x70, 0x62, 0x2e, 0x45, 0x63, 0x68, 0x6f, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x88, 0x01, 0x0a, 0x0a, 0x63, 0x6f, 0x6d, - 0x2e, 0x74, 0x65, 0x73, 0x74, 0x70, 0x62, 0x42, 0x0a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, - 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x36, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, - 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, - 0x73, 0x64, 0x6b, 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2f, 0x76, 0x32, 0x2f, 0x69, 0x6e, - 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x70, 0x62, 0xa2, 0x02, 0x03, - 0x54, 0x58, 0x58, 0xaa, 0x02, 0x06, 0x54, 0x65, 0x73, 0x74, 0x70, 0x62, 0xca, 0x02, 0x06, 0x54, - 0x65, 0x73, 0x74, 0x70, 0x62, 0xe2, 0x02, 0x12, 0x54, 0x65, 0x73, 0x74, 0x70, 0x62, 0x5c, 0x47, - 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x06, 0x54, 0x65, 0x73, - 0x74, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_testpb_query_proto_rawDescOnce sync.Once - file_testpb_query_proto_rawDescData = file_testpb_query_proto_rawDesc -) - -func file_testpb_query_proto_rawDescGZIP() []byte { - file_testpb_query_proto_rawDescOnce.Do(func() { - file_testpb_query_proto_rawDescData = protoimpl.X.CompressGZIP(file_testpb_query_proto_rawDescData) - }) - return file_testpb_query_proto_rawDescData -} - -var file_testpb_query_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_testpb_query_proto_msgTypes = make([]protoimpl.MessageInfo, 3) -var file_testpb_query_proto_goTypes = []interface{}{ - (Enum)(0), // 0: testpb.Enum - (*EchoRequest)(nil), // 1: testpb.EchoRequest - (*AMessage)(nil), // 2: testpb.AMessage - (*EchoResponse)(nil), // 3: testpb.EchoResponse - (*timestamppb.Timestamp)(nil), // 4: google.protobuf.Timestamp - (*durationpb.Duration)(nil), // 5: google.protobuf.Duration - (*v1beta1.Coin)(nil), // 6: cosmos.base.v1beta1.Coin - (*v1beta11.PageRequest)(nil), // 7: cosmos.base.query.v1beta1.PageRequest -} -var file_testpb_query_proto_depIdxs = []int32{ - 4, // 0: testpb.EchoRequest.timestamp:type_name -> google.protobuf.Timestamp - 5, // 1: testpb.EchoRequest.duration:type_name -> google.protobuf.Duration - 0, // 2: testpb.EchoRequest.an_enum:type_name -> testpb.Enum - 2, // 3: testpb.EchoRequest.a_message:type_name -> testpb.AMessage - 6, // 4: testpb.EchoRequest.a_coin:type_name -> cosmos.base.v1beta1.Coin - 7, // 5: testpb.EchoRequest.page:type_name -> cosmos.base.query.v1beta1.PageRequest - 0, // 6: testpb.EchoRequest.enums:type_name -> testpb.Enum - 5, // 7: testpb.EchoRequest.durations:type_name -> google.protobuf.Duration - 2, // 8: testpb.EchoRequest.some_messages:type_name -> testpb.AMessage - 6, // 9: testpb.EchoRequest.positional3_varargs:type_name -> cosmos.base.v1beta1.Coin - 1, // 10: testpb.EchoResponse.request:type_name -> testpb.EchoRequest - 1, // 11: testpb.Query.Echo:input_type -> testpb.EchoRequest - 3, // 12: testpb.Query.Echo:output_type -> testpb.EchoResponse - 12, // [12:13] is the sub-list for method output_type - 11, // [11:12] is the sub-list for method input_type - 11, // [11:11] is the sub-list for extension type_name - 11, // [11:11] is the sub-list for extension extendee - 0, // [0:11] is the sub-list for field type_name -} - -func init() { file_testpb_query_proto_init() } -func file_testpb_query_proto_init() { - if File_testpb_query_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_testpb_query_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EchoRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_testpb_query_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AMessage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_testpb_query_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EchoResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_testpb_query_proto_rawDesc, - NumEnums: 1, - NumMessages: 3, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_testpb_query_proto_goTypes, - DependencyIndexes: file_testpb_query_proto_depIdxs, - EnumInfos: file_testpb_query_proto_enumTypes, - MessageInfos: file_testpb_query_proto_msgTypes, - }.Build() - File_testpb_query_proto = out.File - file_testpb_query_proto_rawDesc = nil - file_testpb_query_proto_goTypes = nil - file_testpb_query_proto_depIdxs = nil -} diff --git a/client/v2/internal/testpb/query_grpc.pb.go b/client/v2/internal/testpb/query_grpc.pb.go deleted file mode 100644 index 56d177ddc86..00000000000 --- a/client/v2/internal/testpb/query_grpc.pb.go +++ /dev/null @@ -1,107 +0,0 @@ -// Code generated by protoc-gen-go-grpc. DO NOT EDIT. -// versions: -// - protoc-gen-go-grpc v1.2.0 -// - protoc (unknown) -// source: testpb/query.proto - -package testpb - -import ( - context "context" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" -) - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 - -// QueryClient is the client API for Query service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. -type QueryClient interface { - // Echo returns the request in the response - Echo(ctx context.Context, in *EchoRequest, opts ...grpc.CallOption) (*EchoResponse, error) -} - -type queryClient struct { - cc grpc.ClientConnInterface -} - -func NewQueryClient(cc grpc.ClientConnInterface) QueryClient { - return &queryClient{cc} -} - -func (c *queryClient) Echo(ctx context.Context, in *EchoRequest, opts ...grpc.CallOption) (*EchoResponse, error) { - out := new(EchoResponse) - err := c.cc.Invoke(ctx, "/testpb.Query/Echo", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// QueryServer is the server API for Query service. -// All implementations must embed UnimplementedQueryServer -// for forward compatibility -type QueryServer interface { - // Echo returns the request in the response - Echo(context.Context, *EchoRequest) (*EchoResponse, error) - mustEmbedUnimplementedQueryServer() -} - -// UnimplementedQueryServer must be embedded to have forward compatible implementations. -type UnimplementedQueryServer struct { -} - -func (UnimplementedQueryServer) Echo(context.Context, *EchoRequest) (*EchoResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Echo not implemented") -} -func (UnimplementedQueryServer) mustEmbedUnimplementedQueryServer() {} - -// UnsafeQueryServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to QueryServer will -// result in compilation errors. -type UnsafeQueryServer interface { - mustEmbedUnimplementedQueryServer() -} - -func RegisterQueryServer(s grpc.ServiceRegistrar, srv QueryServer) { - s.RegisterService(&Query_ServiceDesc, srv) -} - -func _Query_Echo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(EchoRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).Echo(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/testpb.Query/Echo", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).Echo(ctx, req.(*EchoRequest)) - } - return interceptor(ctx, in, info, handler) -} - -// Query_ServiceDesc is the grpc.ServiceDesc for Query service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var Query_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "testpb.Query", - HandlerType: (*QueryServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "Echo", - Handler: _Query_Echo_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "testpb/query.proto", -} diff --git a/client/v2/internal/util/util.go b/client/v2/internal/util/util.go deleted file mode 100644 index 18b8d53006a..00000000000 --- a/client/v2/internal/util/util.go +++ /dev/null @@ -1,29 +0,0 @@ -package util - -import ( - "github.com/iancoleman/strcase" - "google.golang.org/protobuf/reflect/protoreflect" - "google.golang.org/protobuf/reflect/protoregistry" - "google.golang.org/protobuf/types/dynamicpb" -) - -func DescriptorKebabName(descriptor protoreflect.Descriptor) string { - return strcase.ToKebab(string(descriptor.Name())) -} - -func DescriptorDocs(descriptor protoreflect.Descriptor) string { - return descriptor.ParentFile().SourceLocations().ByDescriptor(descriptor).LeadingComments -} - -func ResolveMessageType(resolver protoregistry.MessageTypeResolver, descriptor protoreflect.MessageDescriptor) protoreflect.MessageType { - if resolver == nil { - resolver = protoregistry.GlobalTypes - } - - typ, err := resolver.FindMessageByName(descriptor.FullName()) - if err == nil { - return typ - } - - return dynamicpb.NewMessageType(descriptor) -} diff --git a/cosmossdk.io/api/cosmos/base/cli/v1/options.pb.go b/cosmossdk.io/api/cosmos/base/cli/v1/options.pb.go deleted file mode 100644 index 981871598b7..00000000000 --- a/cosmossdk.io/api/cosmos/base/cli/v1/options.pb.go +++ /dev/null @@ -1,2482 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: osmosis/autocli/v1/options.proto - -package cliv1 - -import ( - fmt "fmt" - proto "github.com/gogo/protobuf/proto" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -// ModuleOptions describes the CLI options for a Cosmos SDK module. -type ModuleOptions struct { - // tx describes the tx command for the module. - Tx *ServiceCommandDescriptor `protobuf:"bytes,1,opt,name=tx,proto3" json:"tx,omitempty"` - // query describes the query command for the module. - Query *ServiceCommandDescriptor `protobuf:"bytes,2,opt,name=query,proto3" json:"query,omitempty"` -} - -func (m *ModuleOptions) Reset() { *m = ModuleOptions{} } -func (m *ModuleOptions) String() string { return proto.CompactTextString(m) } -func (*ModuleOptions) ProtoMessage() {} -func (*ModuleOptions) Descriptor() ([]byte, []int) { - return fileDescriptor_99a27c3c2ecce4b5, []int{0} -} -func (m *ModuleOptions) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ModuleOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ModuleOptions.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 *ModuleOptions) XXX_Merge(src proto.Message) { - xxx_messageInfo_ModuleOptions.Merge(m, src) -} -func (m *ModuleOptions) XXX_Size() int { - return m.Size() -} -func (m *ModuleOptions) XXX_DiscardUnknown() { - xxx_messageInfo_ModuleOptions.DiscardUnknown(m) -} - -var xxx_messageInfo_ModuleOptions proto.InternalMessageInfo - -func (m *ModuleOptions) GetTx() *ServiceCommandDescriptor { - if m != nil { - return m.Tx - } - return nil -} - -func (m *ModuleOptions) GetQuery() *ServiceCommandDescriptor { - if m != nil { - return m.Query - } - return nil -} - -// ServiceCommandDescriptor describes a CLI command based on a protobuf service. -type ServiceCommandDescriptor struct { - // service is the fully qualified name of the protobuf service to build - // the command from. It can be left empty if sub_commands are used instead - // which may be the case if a module provides multiple tx and/or query - // services. - Service string `protobuf:"bytes,1,opt,name=service,proto3" json:"service,omitempty"` - // rpc_command_options are options for commands generated from rpc methods. - // If no options are specified for a given rpc method on the service, a - // command will be generated for that method with the default options. - RpcCommandOptions []*RpcCommandOptions `protobuf:"bytes,2,rep,name=rpc_command_options,json=rpcCommandOptions,proto3" json:"rpc_command_options,omitempty"` - // sub_commands is a map of optional sub-commands for this command based on - // different protobuf services. The map key is used as the name of the - // sub-command. - SubCommands map[string]*ServiceCommandDescriptor `protobuf:"bytes,3,rep,name=sub_commands,json=subCommands,proto3" json:"sub_commands,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` -} - -func (m *ServiceCommandDescriptor) Reset() { *m = ServiceCommandDescriptor{} } -func (m *ServiceCommandDescriptor) String() string { return proto.CompactTextString(m) } -func (*ServiceCommandDescriptor) ProtoMessage() {} -func (*ServiceCommandDescriptor) Descriptor() ([]byte, []int) { - return fileDescriptor_99a27c3c2ecce4b5, []int{1} -} -func (m *ServiceCommandDescriptor) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ServiceCommandDescriptor) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ServiceCommandDescriptor.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 *ServiceCommandDescriptor) XXX_Merge(src proto.Message) { - xxx_messageInfo_ServiceCommandDescriptor.Merge(m, src) -} -func (m *ServiceCommandDescriptor) XXX_Size() int { - return m.Size() -} -func (m *ServiceCommandDescriptor) XXX_DiscardUnknown() { - xxx_messageInfo_ServiceCommandDescriptor.DiscardUnknown(m) -} - -var xxx_messageInfo_ServiceCommandDescriptor proto.InternalMessageInfo - -func (m *ServiceCommandDescriptor) GetService() string { - if m != nil { - return m.Service - } - return "" -} - -func (m *ServiceCommandDescriptor) GetRpcCommandOptions() []*RpcCommandOptions { - if m != nil { - return m.RpcCommandOptions - } - return nil -} - -func (m *ServiceCommandDescriptor) GetSubCommands() map[string]*ServiceCommandDescriptor { - if m != nil { - return m.SubCommands - } - return nil -} - -// RpcCommandOptions specifies options for commands generated from protobuf -// rpc methods. -type RpcCommandOptions struct { - // rpc_method is short name of the protobuf rpc method that this command is - // generated from. - RpcMethod string `protobuf:"bytes,1,opt,name=rpc_method,json=rpcMethod,proto3" json:"rpc_method,omitempty"` - // use is the one-line usage method. It also allows specifying an alternate - // name for the command as the first word of the usage text. - // - // By default the name of an rpc command is the kebab-case short name of the - // rpc method. - Use string `protobuf:"bytes,2,opt,name=use,proto3" json:"use,omitempty"` - // long is the long message shown in the 'help ' output. - Long string `protobuf:"bytes,3,opt,name=long,proto3" json:"long,omitempty"` - // short is the short description shown in the 'help' output. - Short string `protobuf:"bytes,4,opt,name=short,proto3" json:"short,omitempty"` - // example is examples of how to use the command. - Example string `protobuf:"bytes,5,opt,name=example,proto3" json:"example,omitempty"` - // alias is an array of aliases that can be used instead of the first word in - // Use. - Alias []string `protobuf:"bytes,6,rep,name=alias,proto3" json:"alias,omitempty"` - // suggest_for is an array of command names for which this command will be - // suggested - similar to aliases but only suggests. - SuggestFor []string `protobuf:"bytes,7,rep,name=suggest_for,json=suggestFor,proto3" json:"suggest_for,omitempty"` - // deprecated defines, if this command is deprecated and should print this - // string when used. - Deprecated string `protobuf:"bytes,8,opt,name=deprecated,proto3" json:"deprecated,omitempty"` - // version defines the version for this command. If this value is non-empty - // and the command does not define a "version" flag, a "version" boolean flag - // will be added to the command and, if specified, will print content of the - // "Version" variable. A shorthand "v" flag will also be added if the command - // does not define one. - Version string `protobuf:"bytes,9,opt,name=version,proto3" json:"version,omitempty"` - // flag_options are options for flags generated from rpc request fields. - // By default all request fields are configured as flags. They can - // also be configured as positional args instead using positional_args. - FlagOptions map[string]*FlagOptions `protobuf:"bytes,10,rep,name=flag_options,json=flagOptions,proto3" json:"flag_options,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - // positional_args specifies positional arguments for the command. - PositionalArgs []*PositionalArgDescriptor `protobuf:"bytes,11,rep,name=positional_args,json=positionalArgs,proto3" json:"positional_args,omitempty"` - // skip specifies whether to skip this rpc method when generating commands. - Skip bool `protobuf:"varint,12,opt,name=skip,proto3" json:"skip,omitempty"` -} - -func (m *RpcCommandOptions) Reset() { *m = RpcCommandOptions{} } -func (m *RpcCommandOptions) String() string { return proto.CompactTextString(m) } -func (*RpcCommandOptions) ProtoMessage() {} -func (*RpcCommandOptions) Descriptor() ([]byte, []int) { - return fileDescriptor_99a27c3c2ecce4b5, []int{2} -} -func (m *RpcCommandOptions) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *RpcCommandOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_RpcCommandOptions.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 *RpcCommandOptions) XXX_Merge(src proto.Message) { - xxx_messageInfo_RpcCommandOptions.Merge(m, src) -} -func (m *RpcCommandOptions) XXX_Size() int { - return m.Size() -} -func (m *RpcCommandOptions) XXX_DiscardUnknown() { - xxx_messageInfo_RpcCommandOptions.DiscardUnknown(m) -} - -var xxx_messageInfo_RpcCommandOptions proto.InternalMessageInfo - -func (m *RpcCommandOptions) GetRpcMethod() string { - if m != nil { - return m.RpcMethod - } - return "" -} - -func (m *RpcCommandOptions) GetUse() string { - if m != nil { - return m.Use - } - return "" -} - -func (m *RpcCommandOptions) GetLong() string { - if m != nil { - return m.Long - } - return "" -} - -func (m *RpcCommandOptions) GetShort() string { - if m != nil { - return m.Short - } - return "" -} - -func (m *RpcCommandOptions) GetExample() string { - if m != nil { - return m.Example - } - return "" -} - -func (m *RpcCommandOptions) GetAlias() []string { - if m != nil { - return m.Alias - } - return nil -} - -func (m *RpcCommandOptions) GetSuggestFor() []string { - if m != nil { - return m.SuggestFor - } - return nil -} - -func (m *RpcCommandOptions) GetDeprecated() string { - if m != nil { - return m.Deprecated - } - return "" -} - -func (m *RpcCommandOptions) GetVersion() string { - if m != nil { - return m.Version - } - return "" -} - -func (m *RpcCommandOptions) GetFlagOptions() map[string]*FlagOptions { - if m != nil { - return m.FlagOptions - } - return nil -} - -func (m *RpcCommandOptions) GetPositionalArgs() []*PositionalArgDescriptor { - if m != nil { - return m.PositionalArgs - } - return nil -} - -func (m *RpcCommandOptions) GetSkip() bool { - if m != nil { - return m.Skip - } - return false -} - -// FlagOptions are options for flags generated from rpc request fields. -// By default, all request fields are configured as flags based on the -// kebab-case name of the field. Fields can be turned into positional arguments -// instead by using RpcCommandOptions.positional_args. -type FlagOptions struct { - // name is an alternate name to use for the field flag. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // shorthand is a one-letter abbreviated flag. - Shorthand string `protobuf:"bytes,2,opt,name=shorthand,proto3" json:"shorthand,omitempty"` - // usage is the help message. - Usage string `protobuf:"bytes,3,opt,name=usage,proto3" json:"usage,omitempty"` - // default_value is the default value as text. - DefaultValue string `protobuf:"bytes,4,opt,name=default_value,json=defaultValue,proto3" json:"default_value,omitempty"` - // default value is the default value as text if the flag is used without any - // value. - NoOptDefaultValue string `protobuf:"bytes,5,opt,name=no_opt_default_value,json=noOptDefaultValue,proto3" json:"no_opt_default_value,omitempty"` - // deprecated is the usage text to show if this flag is deprecated. - Deprecated string `protobuf:"bytes,6,opt,name=deprecated,proto3" json:"deprecated,omitempty"` - // shorthand_deprecated is the usage text to show if the shorthand of this - // flag is deprecated. - ShorthandDeprecated string `protobuf:"bytes,7,opt,name=shorthand_deprecated,json=shorthandDeprecated,proto3" json:"shorthand_deprecated,omitempty"` - // hidden hides the flag from help/usage text - Hidden bool `protobuf:"varint,8,opt,name=hidden,proto3" json:"hidden,omitempty"` -} - -func (m *FlagOptions) Reset() { *m = FlagOptions{} } -func (m *FlagOptions) String() string { return proto.CompactTextString(m) } -func (*FlagOptions) ProtoMessage() {} -func (*FlagOptions) Descriptor() ([]byte, []int) { - return fileDescriptor_99a27c3c2ecce4b5, []int{3} -} -func (m *FlagOptions) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *FlagOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_FlagOptions.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 *FlagOptions) XXX_Merge(src proto.Message) { - xxx_messageInfo_FlagOptions.Merge(m, src) -} -func (m *FlagOptions) XXX_Size() int { - return m.Size() -} -func (m *FlagOptions) XXX_DiscardUnknown() { - xxx_messageInfo_FlagOptions.DiscardUnknown(m) -} - -var xxx_messageInfo_FlagOptions proto.InternalMessageInfo - -func (m *FlagOptions) GetName() string { - if m != nil { - return m.Name - } - return "" -} - -func (m *FlagOptions) GetShorthand() string { - if m != nil { - return m.Shorthand - } - return "" -} - -func (m *FlagOptions) GetUsage() string { - if m != nil { - return m.Usage - } - return "" -} - -func (m *FlagOptions) GetDefaultValue() string { - if m != nil { - return m.DefaultValue - } - return "" -} - -func (m *FlagOptions) GetNoOptDefaultValue() string { - if m != nil { - return m.NoOptDefaultValue - } - return "" -} - -func (m *FlagOptions) GetDeprecated() string { - if m != nil { - return m.Deprecated - } - return "" -} - -func (m *FlagOptions) GetShorthandDeprecated() string { - if m != nil { - return m.ShorthandDeprecated - } - return "" -} - -func (m *FlagOptions) GetHidden() bool { - if m != nil { - return m.Hidden - } - return false -} - -// PositionalArgDescriptor describes a positional argument. -type PositionalArgDescriptor struct { - // proto_field specifies the proto field to use as the positional arg. Any - // fields used as positional args will not have a flag generated. - ProtoField string `protobuf:"bytes,1,opt,name=proto_field,json=protoField,proto3" json:"proto_field,omitempty"` - // varargs makes a positional parameter a varargs parameter. This can only be - // applied to last positional parameter and the proto_field must a repeated - // field. - Varargs bool `protobuf:"varint,2,opt,name=varargs,proto3" json:"varargs,omitempty"` -} - -func (m *PositionalArgDescriptor) Reset() { *m = PositionalArgDescriptor{} } -func (m *PositionalArgDescriptor) String() string { return proto.CompactTextString(m) } -func (*PositionalArgDescriptor) ProtoMessage() {} -func (*PositionalArgDescriptor) Descriptor() ([]byte, []int) { - return fileDescriptor_99a27c3c2ecce4b5, []int{4} -} -func (m *PositionalArgDescriptor) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *PositionalArgDescriptor) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_PositionalArgDescriptor.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 *PositionalArgDescriptor) XXX_Merge(src proto.Message) { - xxx_messageInfo_PositionalArgDescriptor.Merge(m, src) -} -func (m *PositionalArgDescriptor) XXX_Size() int { - return m.Size() -} -func (m *PositionalArgDescriptor) XXX_DiscardUnknown() { - xxx_messageInfo_PositionalArgDescriptor.DiscardUnknown(m) -} - -var xxx_messageInfo_PositionalArgDescriptor proto.InternalMessageInfo - -func (m *PositionalArgDescriptor) GetProtoField() string { - if m != nil { - return m.ProtoField - } - return "" -} - -func (m *PositionalArgDescriptor) GetVarargs() bool { - if m != nil { - return m.Varargs - } - return false -} - -func init() { - proto.RegisterType((*ModuleOptions)(nil), "osmosis.autocli.v1.ModuleOptions") - proto.RegisterType((*ServiceCommandDescriptor)(nil), "osmosis.autocli.v1.ServiceCommandDescriptor") - proto.RegisterMapType((map[string]*ServiceCommandDescriptor)(nil), "osmosis.autocli.v1.ServiceCommandDescriptor.SubCommandsEntry") - proto.RegisterType((*RpcCommandOptions)(nil), "osmosis.autocli.v1.RpcCommandOptions") - proto.RegisterMapType((map[string]*FlagOptions)(nil), "osmosis.autocli.v1.RpcCommandOptions.FlagOptionsEntry") - proto.RegisterType((*FlagOptions)(nil), "osmosis.autocli.v1.FlagOptions") - proto.RegisterType((*PositionalArgDescriptor)(nil), "osmosis.autocli.v1.PositionalArgDescriptor") -} - -func init() { proto.RegisterFile("osmosis/autocli/v1/options.proto", fileDescriptor_99a27c3c2ecce4b5) } - -var fileDescriptor_99a27c3c2ecce4b5 = []byte{ - // 694 bytes of a gzipped FileDescriptorProto - 0x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, 0x72, 0xb5, 0x75, 0x96, 0x53, 0xb6, 0x9f, 0xe5, 0x3b, 0xe5, - 0x82, 0x8b, 0x6e, 0xa8, 0x5e, 0x71, 0x43, 0x07, 0x56, 0xc7, 0x8b, 0xf9, 0x25, 0xe6, 0xbc, 0x62, - 0xae, 0x8c, 0xcf, 0x76, 0x26, 0x25, 0xb7, 0xa0, 0xda, 0x8f, 0xc3, 0x90, 0xa6, 0xca, 0x5c, 0x0b, - 0x9e, 0xc9, 0xda, 0x87, 0x70, 0xfb, 0x1a, 0xe1, 0xa4, 0x69, 0xd5, 0x4f, 0xd6, 0xef, 0xc5, 0x34, - 0x19, 0x7d, 0x40, 0xa0, 0xa0, 0x5d, 0x89, 0x28, 0x53, 0x12, 0xae, 0x7c, 0x61, 0xab, 0xa6, 0xa3, - 0x74, 0x6b, 0xfb, 0xc7, 0x59, 0xd3, 0x3a, 0x3d, 0x6b, 0x5a, 0xbf, 0xcf, 0x9a, 0xd6, 0x97, 0xf3, - 0xe6, 0xcc, 0xe9, 0x79, 0x73, 0xe6, 0xe7, 0x79, 0x73, 0xe6, 0xe3, 0x83, 0x40, 0x89, 0x26, 0xc2, - 0x23, 0x27, 0x66, 0x2e, 0xc9, 0x62, 0x57, 0x03, 0x6e, 0x97, 0x08, 0xea, 0xea, 0x7f, 0xfc, 0x8b, - 0x20, 0x89, 0x87, 0x9d, 0x6e, 0x55, 0x8d, 0x7a, 0xfc, 0x27, 0x00, 0x00, 0xff, 0xff, 0xcd, 0xe5, - 0x4a, 0xe3, 0x06, 0x06, 0x00, 0x00, -} - -func (m *ModuleOptions) 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 *ModuleOptions) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ModuleOptions) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Query != nil { - { - size, err := m.Query.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintOptions(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.Tx != nil { - { - size, err := m.Tx.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintOptions(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *ServiceCommandDescriptor) 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 *ServiceCommandDescriptor) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ServiceCommandDescriptor) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.SubCommands) > 0 { - for k := range m.SubCommands { - v := m.SubCommands[k] - baseI := i - if v != nil { - { - size, err := v.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintOptions(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - i -= len(k) - copy(dAtA[i:], k) - i = encodeVarintOptions(dAtA, i, uint64(len(k))) - i-- - dAtA[i] = 0xa - i = encodeVarintOptions(dAtA, i, uint64(baseI-i)) - i-- - dAtA[i] = 0x1a - } - } - if len(m.RpcCommandOptions) > 0 { - for iNdEx := len(m.RpcCommandOptions) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.RpcCommandOptions[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintOptions(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - if len(m.Service) > 0 { - i -= len(m.Service) - copy(dAtA[i:], m.Service) - i = encodeVarintOptions(dAtA, i, uint64(len(m.Service))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *RpcCommandOptions) 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 *RpcCommandOptions) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *RpcCommandOptions) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Skip { - i-- - if m.Skip { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x60 - } - if len(m.PositionalArgs) > 0 { - for iNdEx := len(m.PositionalArgs) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.PositionalArgs[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintOptions(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x5a - } - } - if len(m.FlagOptions) > 0 { - for k := range m.FlagOptions { - v := m.FlagOptions[k] - baseI := i - if v != nil { - { - size, err := v.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintOptions(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - i -= len(k) - copy(dAtA[i:], k) - i = encodeVarintOptions(dAtA, i, uint64(len(k))) - i-- - dAtA[i] = 0xa - i = encodeVarintOptions(dAtA, i, uint64(baseI-i)) - i-- - dAtA[i] = 0x52 - } - } - if len(m.Version) > 0 { - i -= len(m.Version) - copy(dAtA[i:], m.Version) - i = encodeVarintOptions(dAtA, i, uint64(len(m.Version))) - i-- - dAtA[i] = 0x4a - } - if len(m.Deprecated) > 0 { - i -= len(m.Deprecated) - copy(dAtA[i:], m.Deprecated) - i = encodeVarintOptions(dAtA, i, uint64(len(m.Deprecated))) - i-- - dAtA[i] = 0x42 - } - if len(m.SuggestFor) > 0 { - for iNdEx := len(m.SuggestFor) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.SuggestFor[iNdEx]) - copy(dAtA[i:], m.SuggestFor[iNdEx]) - i = encodeVarintOptions(dAtA, i, uint64(len(m.SuggestFor[iNdEx]))) - i-- - dAtA[i] = 0x3a - } - } - if len(m.Alias) > 0 { - for iNdEx := len(m.Alias) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Alias[iNdEx]) - copy(dAtA[i:], m.Alias[iNdEx]) - i = encodeVarintOptions(dAtA, i, uint64(len(m.Alias[iNdEx]))) - i-- - dAtA[i] = 0x32 - } - } - if len(m.Example) > 0 { - i -= len(m.Example) - copy(dAtA[i:], m.Example) - i = encodeVarintOptions(dAtA, i, uint64(len(m.Example))) - i-- - dAtA[i] = 0x2a - } - if len(m.Short) > 0 { - i -= len(m.Short) - copy(dAtA[i:], m.Short) - i = encodeVarintOptions(dAtA, i, uint64(len(m.Short))) - i-- - dAtA[i] = 0x22 - } - if len(m.Long) > 0 { - i -= len(m.Long) - copy(dAtA[i:], m.Long) - i = encodeVarintOptions(dAtA, i, uint64(len(m.Long))) - i-- - dAtA[i] = 0x1a - } - if len(m.Use) > 0 { - i -= len(m.Use) - copy(dAtA[i:], m.Use) - i = encodeVarintOptions(dAtA, i, uint64(len(m.Use))) - i-- - dAtA[i] = 0x12 - } - if len(m.RpcMethod) > 0 { - i -= len(m.RpcMethod) - copy(dAtA[i:], m.RpcMethod) - i = encodeVarintOptions(dAtA, i, uint64(len(m.RpcMethod))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *FlagOptions) 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 *FlagOptions) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *FlagOptions) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Hidden { - i-- - if m.Hidden { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x40 - } - if len(m.ShorthandDeprecated) > 0 { - i -= len(m.ShorthandDeprecated) - copy(dAtA[i:], m.ShorthandDeprecated) - i = encodeVarintOptions(dAtA, i, uint64(len(m.ShorthandDeprecated))) - i-- - dAtA[i] = 0x3a - } - if len(m.Deprecated) > 0 { - i -= len(m.Deprecated) - copy(dAtA[i:], m.Deprecated) - i = encodeVarintOptions(dAtA, i, uint64(len(m.Deprecated))) - i-- - dAtA[i] = 0x32 - } - if len(m.NoOptDefaultValue) > 0 { - i -= len(m.NoOptDefaultValue) - copy(dAtA[i:], m.NoOptDefaultValue) - i = encodeVarintOptions(dAtA, i, uint64(len(m.NoOptDefaultValue))) - i-- - dAtA[i] = 0x2a - } - if len(m.DefaultValue) > 0 { - i -= len(m.DefaultValue) - copy(dAtA[i:], m.DefaultValue) - i = encodeVarintOptions(dAtA, i, uint64(len(m.DefaultValue))) - i-- - dAtA[i] = 0x22 - } - if len(m.Usage) > 0 { - i -= len(m.Usage) - copy(dAtA[i:], m.Usage) - i = encodeVarintOptions(dAtA, i, uint64(len(m.Usage))) - i-- - dAtA[i] = 0x1a - } - if len(m.Shorthand) > 0 { - i -= len(m.Shorthand) - copy(dAtA[i:], m.Shorthand) - i = encodeVarintOptions(dAtA, i, uint64(len(m.Shorthand))) - i-- - dAtA[i] = 0x12 - } - if len(m.Name) > 0 { - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintOptions(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *PositionalArgDescriptor) 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 *PositionalArgDescriptor) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *PositionalArgDescriptor) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Varargs { - i-- - if m.Varargs { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x10 - } - if len(m.ProtoField) > 0 { - i -= len(m.ProtoField) - copy(dAtA[i:], m.ProtoField) - i = encodeVarintOptions(dAtA, i, uint64(len(m.ProtoField))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func encodeVarintOptions(dAtA []byte, offset int, v uint64) int { - offset -= sovOptions(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *ModuleOptions) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Tx != nil { - l = m.Tx.Size() - n += 1 + l + sovOptions(uint64(l)) - } - if m.Query != nil { - l = m.Query.Size() - n += 1 + l + sovOptions(uint64(l)) - } - return n -} - -func (m *ServiceCommandDescriptor) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Service) - if l > 0 { - n += 1 + l + sovOptions(uint64(l)) - } - if len(m.RpcCommandOptions) > 0 { - for _, e := range m.RpcCommandOptions { - l = e.Size() - n += 1 + l + sovOptions(uint64(l)) - } - } - if len(m.SubCommands) > 0 { - for k, v := range m.SubCommands { - _ = k - _ = v - l = 0 - if v != nil { - l = v.Size() - l += 1 + sovOptions(uint64(l)) - } - mapEntrySize := 1 + len(k) + sovOptions(uint64(len(k))) + l - n += mapEntrySize + 1 + sovOptions(uint64(mapEntrySize)) - } - } - return n -} - -func (m *RpcCommandOptions) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.RpcMethod) - if l > 0 { - n += 1 + l + sovOptions(uint64(l)) - } - l = len(m.Use) - if l > 0 { - n += 1 + l + sovOptions(uint64(l)) - } - l = len(m.Long) - if l > 0 { - n += 1 + l + sovOptions(uint64(l)) - } - l = len(m.Short) - if l > 0 { - n += 1 + l + sovOptions(uint64(l)) - } - l = len(m.Example) - if l > 0 { - n += 1 + l + sovOptions(uint64(l)) - } - if len(m.Alias) > 0 { - for _, s := range m.Alias { - l = len(s) - n += 1 + l + sovOptions(uint64(l)) - } - } - if len(m.SuggestFor) > 0 { - for _, s := range m.SuggestFor { - l = len(s) - n += 1 + l + sovOptions(uint64(l)) - } - } - l = len(m.Deprecated) - if l > 0 { - n += 1 + l + sovOptions(uint64(l)) - } - l = len(m.Version) - if l > 0 { - n += 1 + l + sovOptions(uint64(l)) - } - if len(m.FlagOptions) > 0 { - for k, v := range m.FlagOptions { - _ = k - _ = v - l = 0 - if v != nil { - l = v.Size() - l += 1 + sovOptions(uint64(l)) - } - mapEntrySize := 1 + len(k) + sovOptions(uint64(len(k))) + l - n += mapEntrySize + 1 + sovOptions(uint64(mapEntrySize)) - } - } - if len(m.PositionalArgs) > 0 { - for _, e := range m.PositionalArgs { - l = e.Size() - n += 1 + l + sovOptions(uint64(l)) - } - } - if m.Skip { - n += 2 - } - return n -} - -func (m *FlagOptions) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Name) - if l > 0 { - n += 1 + l + sovOptions(uint64(l)) - } - l = len(m.Shorthand) - if l > 0 { - n += 1 + l + sovOptions(uint64(l)) - } - l = len(m.Usage) - if l > 0 { - n += 1 + l + sovOptions(uint64(l)) - } - l = len(m.DefaultValue) - if l > 0 { - n += 1 + l + sovOptions(uint64(l)) - } - l = len(m.NoOptDefaultValue) - if l > 0 { - n += 1 + l + sovOptions(uint64(l)) - } - l = len(m.Deprecated) - if l > 0 { - n += 1 + l + sovOptions(uint64(l)) - } - l = len(m.ShorthandDeprecated) - if l > 0 { - n += 1 + l + sovOptions(uint64(l)) - } - if m.Hidden { - n += 2 - } - return n -} - -func (m *PositionalArgDescriptor) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.ProtoField) - if l > 0 { - n += 1 + l + sovOptions(uint64(l)) - } - if m.Varargs { - n += 2 - } - return n -} - -func sovOptions(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozOptions(x uint64) (n int) { - return sovOptions(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *ModuleOptions) 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 ErrIntOverflowOptions - } - 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: ModuleOptions: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ModuleOptions: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Tx", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOptions - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthOptions - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthOptions - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Tx == nil { - m.Tx = &ServiceCommandDescriptor{} - } - if err := m.Tx.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Query", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOptions - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthOptions - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthOptions - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Query == nil { - m.Query = &ServiceCommandDescriptor{} - } - if err := m.Query.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipOptions(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthOptions - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ServiceCommandDescriptor) 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 ErrIntOverflowOptions - } - 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: ServiceCommandDescriptor: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ServiceCommandDescriptor: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Service", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOptions - } - 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 ErrInvalidLengthOptions - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthOptions - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Service = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RpcCommandOptions", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOptions - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthOptions - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthOptions - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.RpcCommandOptions = append(m.RpcCommandOptions, &RpcCommandOptions{}) - if err := m.RpcCommandOptions[len(m.RpcCommandOptions)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SubCommands", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOptions - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthOptions - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthOptions - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.SubCommands == nil { - m.SubCommands = make(map[string]*ServiceCommandDescriptor) - } - var mapkey string - var mapvalue *ServiceCommandDescriptor - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOptions - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOptions - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapkey |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthOptions - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return ErrInvalidLengthOptions - } - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - var mapmsglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOptions - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - mapmsglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if mapmsglen < 0 { - return ErrInvalidLengthOptions - } - postmsgIndex := iNdEx + mapmsglen - if postmsgIndex < 0 { - return ErrInvalidLengthOptions - } - if postmsgIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue = &ServiceCommandDescriptor{} - if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { - return err - } - iNdEx = postmsgIndex - } else { - iNdEx = entryPreIndex - skippy, err := skipOptions(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthOptions - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.SubCommands[mapkey] = mapvalue - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipOptions(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthOptions - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *RpcCommandOptions) 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 ErrIntOverflowOptions - } - 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: RpcCommandOptions: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: RpcCommandOptions: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RpcMethod", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOptions - } - 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 ErrInvalidLengthOptions - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthOptions - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.RpcMethod = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Use", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOptions - } - 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 ErrInvalidLengthOptions - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthOptions - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Use = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Long", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOptions - } - 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 ErrInvalidLengthOptions - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthOptions - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Long = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Short", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOptions - } - 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 ErrInvalidLengthOptions - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthOptions - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Short = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Example", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOptions - } - 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 ErrInvalidLengthOptions - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthOptions - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Example = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Alias", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOptions - } - 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 ErrInvalidLengthOptions - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthOptions - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Alias = append(m.Alias, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SuggestFor", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOptions - } - 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 ErrInvalidLengthOptions - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthOptions - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SuggestFor = append(m.SuggestFor, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Deprecated", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOptions - } - 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 ErrInvalidLengthOptions - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthOptions - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Deprecated = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOptions - } - 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 ErrInvalidLengthOptions - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthOptions - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Version = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 10: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FlagOptions", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOptions - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthOptions - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthOptions - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.FlagOptions == nil { - m.FlagOptions = make(map[string]*FlagOptions) - } - var mapkey string - var mapvalue *FlagOptions - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOptions - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOptions - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapkey |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthOptions - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return ErrInvalidLengthOptions - } - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - var mapmsglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOptions - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - mapmsglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if mapmsglen < 0 { - return ErrInvalidLengthOptions - } - postmsgIndex := iNdEx + mapmsglen - if postmsgIndex < 0 { - return ErrInvalidLengthOptions - } - if postmsgIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue = &FlagOptions{} - if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { - return err - } - iNdEx = postmsgIndex - } else { - iNdEx = entryPreIndex - skippy, err := skipOptions(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthOptions - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.FlagOptions[mapkey] = mapvalue - iNdEx = postIndex - case 11: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PositionalArgs", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOptions - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthOptions - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthOptions - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.PositionalArgs = append(m.PositionalArgs, &PositionalArgDescriptor{}) - if err := m.PositionalArgs[len(m.PositionalArgs)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 12: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Skip", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOptions - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Skip = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skipOptions(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthOptions - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *FlagOptions) 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 ErrIntOverflowOptions - } - 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: FlagOptions: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: FlagOptions: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOptions - } - 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 ErrInvalidLengthOptions - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthOptions - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Shorthand", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOptions - } - 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 ErrInvalidLengthOptions - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthOptions - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Shorthand = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Usage", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOptions - } - 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 ErrInvalidLengthOptions - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthOptions - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Usage = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DefaultValue", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOptions - } - 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 ErrInvalidLengthOptions - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthOptions - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DefaultValue = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NoOptDefaultValue", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOptions - } - 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 ErrInvalidLengthOptions - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthOptions - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.NoOptDefaultValue = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Deprecated", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOptions - } - 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 ErrInvalidLengthOptions - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthOptions - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Deprecated = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ShorthandDeprecated", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOptions - } - 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 ErrInvalidLengthOptions - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthOptions - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ShorthandDeprecated = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Hidden", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOptions - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Hidden = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skipOptions(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthOptions - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *PositionalArgDescriptor) 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 ErrIntOverflowOptions - } - 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: PositionalArgDescriptor: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: PositionalArgDescriptor: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ProtoField", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOptions - } - 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 ErrInvalidLengthOptions - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthOptions - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ProtoField = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Varargs", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOptions - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Varargs = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skipOptions(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthOptions - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipOptions(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowOptions - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowOptions - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowOptions - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthOptions - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupOptions - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthOptions - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthOptions = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowOptions = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupOptions = fmt.Errorf("proto: unexpected end of group") -) diff --git a/cosmossdk.io/api/cosmos/base/cli/v1/query.pb.go b/cosmossdk.io/api/cosmos/base/cli/v1/query.pb.go deleted file mode 100644 index 41ff1917a96..00000000000 --- a/cosmossdk.io/api/cosmos/base/cli/v1/query.pb.go +++ /dev/null @@ -1,660 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: osmosis/autocli/v1/query.proto - -package cliv1 - -import ( - context "context" - fmt "fmt" - _ "github.com/cosmos/cosmos-sdk/types/query" - grpc1 "github.com/gogo/protobuf/grpc" - proto "github.com/gogo/protobuf/proto" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -// AppOptionsRequest is the RemoteInfoService/AppOptions request type. -type AppOptionsRequest struct { -} - -func (m *AppOptionsRequest) Reset() { *m = AppOptionsRequest{} } -func (m *AppOptionsRequest) String() string { return proto.CompactTextString(m) } -func (*AppOptionsRequest) ProtoMessage() {} -func (*AppOptionsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_49c0169e76c6feb2, []int{0} -} -func (m *AppOptionsRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AppOptionsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AppOptionsRequest.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 *AppOptionsRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_AppOptionsRequest.Merge(m, src) -} -func (m *AppOptionsRequest) XXX_Size() int { - return m.Size() -} -func (m *AppOptionsRequest) XXX_DiscardUnknown() { - xxx_messageInfo_AppOptionsRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_AppOptionsRequest proto.InternalMessageInfo - -// AppOptionsResponse is the RemoteInfoService/AppOptions response type. -type AppOptionsResponse struct { - // module_options is a map of module name to autocli module options. - ModuleOptions map[string]*ModuleOptions `protobuf:"bytes,1,rep,name=module_options,json=moduleOptions,proto3" json:"module_options,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` -} - -func (m *AppOptionsResponse) Reset() { *m = AppOptionsResponse{} } -func (m *AppOptionsResponse) String() string { return proto.CompactTextString(m) } -func (*AppOptionsResponse) ProtoMessage() {} -func (*AppOptionsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_49c0169e76c6feb2, []int{1} -} -func (m *AppOptionsResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AppOptionsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AppOptionsResponse.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 *AppOptionsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_AppOptionsResponse.Merge(m, src) -} -func (m *AppOptionsResponse) XXX_Size() int { - return m.Size() -} -func (m *AppOptionsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_AppOptionsResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_AppOptionsResponse proto.InternalMessageInfo - -func (m *AppOptionsResponse) GetModuleOptions() map[string]*ModuleOptions { - if m != nil { - return m.ModuleOptions - } - return nil -} - -func init() { - proto.RegisterType((*AppOptionsRequest)(nil), "osmosis.autocli.v1.AppOptionsRequest") - proto.RegisterType((*AppOptionsResponse)(nil), "osmosis.autocli.v1.AppOptionsResponse") - proto.RegisterMapType((map[string]*ModuleOptions)(nil), "osmosis.autocli.v1.AppOptionsResponse.ModuleOptionsEntry") -} - -func init() { proto.RegisterFile("osmosis/autocli/v1/query.proto", fileDescriptor_49c0169e76c6feb2) } - -var fileDescriptor_49c0169e76c6feb2 = []byte{ - // 309 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0xcb, 0x2f, 0xce, 0xcd, - 0x2f, 0xce, 0x2c, 0xd6, 0x4f, 0x2c, 0x2d, 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x10, 0x4a, 0xe2, - 0xe2, 0x42, 0xb8, 0x52, 0x48, 0x95, 0x90, 0x2f, 0xc0, 0x61, 0x23, 0xa5, 0x46, 0x9c, 0x67, 0x95, - 0x58, 0x3b, 0x9e, 0x6f, 0xd0, 0x62, 0x70, 0x72, 0x3e, 0xf1, 0x48, 0x8e, 0xf1, 0xc2, 0x23, 0x39, - 0xc6, 0x07, 0x8f, 0xe4, 0x18, 0x27, 0x3c, 0x96, 0x63, 0xb8, 0xf0, 0x58, 0x8e, 0xe1, 0xc6, 0x63, - 0x39, 0x86, 0x28, 0xcd, 0x64, 0xb0, 0x41, 0xc5, 0x29, 0xd9, 0x7a, 0x99, 0xf9, 0xfa, 0x89, 0x05, - 0x99, 0xfa, 0x10, 0x01, 0xfd, 0xa4, 0xc4, 0xe2, 0x54, 0x7d, 0x48, 0x54, 0x5a, 0x27, 0xe7, 0x64, - 0x96, 0x19, 0x26, 0xb1, 0x81, 0xe3, 0xca, 0x18, 0x10, 0x00, 0x00, 0xff, 0xff, 0x4c, 0xca, 0x37, - 0x51, 0x21, 0x02, 0x00, 0x00, -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConn - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion4 - -// QueryClient is the client API for Query service. -// -// 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 { - // AppOptions returns the autocli options for all of the modules in an app. - AppOptions(ctx context.Context, in *AppOptionsRequest, opts ...grpc.CallOption) (*AppOptionsResponse, error) -} - -type queryClient struct { - cc grpc1.ClientConn -} - -func NewQueryClient(cc grpc1.ClientConn) QueryClient { - return &queryClient{cc} -} - -func (c *queryClient) AppOptions(ctx context.Context, in *AppOptionsRequest, opts ...grpc.CallOption) (*AppOptionsResponse, error) { - out := new(AppOptionsResponse) - err := c.cc.Invoke(ctx, "/osmosis.autocli.v1.Query/AppOptions", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// QueryServer is the server API for Query service. -type QueryServer interface { - // AppOptions returns the autocli options for all of the modules in an app. - AppOptions(context.Context, *AppOptionsRequest) (*AppOptionsResponse, error) -} - -// UnimplementedQueryServer can be embedded to have forward compatible implementations. -type UnimplementedQueryServer struct { -} - -func (*UnimplementedQueryServer) AppOptions(ctx context.Context, req *AppOptionsRequest) (*AppOptionsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method AppOptions not implemented") -} - -func RegisterQueryServer(s grpc1.Server, srv QueryServer) { - s.RegisterService(&_Query_serviceDesc, srv) -} - -func _Query_AppOptions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(AppOptionsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).AppOptions(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/osmosis.autocli.v1.Query/AppOptions", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).AppOptions(ctx, req.(*AppOptionsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -var _Query_serviceDesc = grpc.ServiceDesc{ - ServiceName: "osmosis.autocli.v1.Query", - HandlerType: (*QueryServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "AppOptions", - Handler: _Query_AppOptions_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "osmosis/autocli/v1/query.proto", -} - -func (m *AppOptionsRequest) 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 *AppOptionsRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AppOptionsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func (m *AppOptionsResponse) 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 *AppOptionsResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AppOptionsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.ModuleOptions) > 0 { - for k := range m.ModuleOptions { - v := m.ModuleOptions[k] - baseI := i - if v != nil { - { - size, err := v.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - i -= len(k) - copy(dAtA[i:], k) - i = encodeVarintQuery(dAtA, i, uint64(len(k))) - i-- - dAtA[i] = 0xa - i = encodeVarintQuery(dAtA, i, uint64(baseI-i)) - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { - offset -= sovQuery(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *AppOptionsRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *AppOptionsResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.ModuleOptions) > 0 { - for k, v := range m.ModuleOptions { - _ = k - _ = v - l = 0 - if v != nil { - l = v.Size() - l += 1 + sovQuery(uint64(l)) - } - mapEntrySize := 1 + len(k) + sovQuery(uint64(len(k))) + l - n += mapEntrySize + 1 + sovQuery(uint64(mapEntrySize)) - } - } - return n -} - -func sovQuery(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozQuery(x uint64) (n int) { - return sovQuery(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *AppOptionsRequest) 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: AppOptionsRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AppOptionsRequest: 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 *AppOptionsResponse) 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: AppOptionsResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AppOptionsResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ModuleOptions", 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.ModuleOptions == nil { - m.ModuleOptions = make(map[string]*ModuleOptions) - } - var mapkey string - var mapvalue *ModuleOptions - for iNdEx < postIndex { - entryPreIndex := 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) - if fieldNum == 1 { - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapkey |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthQuery - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return ErrInvalidLengthQuery - } - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - var mapmsglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - mapmsglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if mapmsglen < 0 { - return ErrInvalidLengthQuery - } - postmsgIndex := iNdEx + mapmsglen - if postmsgIndex < 0 { - return ErrInvalidLengthQuery - } - if postmsgIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue = &ModuleOptions{} - if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { - return err - } - iNdEx = postmsgIndex - } else { - iNdEx = entryPreIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.ModuleOptions[mapkey] = mapvalue - 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 skipQuery(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowQuery - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowQuery - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowQuery - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthQuery - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupQuery - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthQuery - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthQuery = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowQuery = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group") -) diff --git a/proto/osmosis/autocli/v1/options.proto b/proto/osmosis/autocli/v1/options.proto deleted file mode 100644 index 40aa093e416..00000000000 --- a/proto/osmosis/autocli/v1/options.proto +++ /dev/null @@ -1,133 +0,0 @@ -syntax = "proto3"; - -package osmosis.autocli.v1; - -option go_package = "cosmossdk.io/api/cosmos/base/cli/v1;cliv1"; - -// ModuleOptions describes the CLI options for a Cosmos SDK module. -message ModuleOptions { - // tx describes the tx command for the module. - ServiceCommandDescriptor tx = 1; - - // query describes the query command for the module. - ServiceCommandDescriptor query = 2; -} - -// ServiceCommandDescriptor describes a CLI command based on a protobuf service. -message ServiceCommandDescriptor { - - // service is the fully qualified name of the protobuf service to build - // the command from. It can be left empty if sub_commands are used instead - // which may be the case if a module provides multiple tx and/or query - // services. - string service = 1; - - // rpc_command_options are options for commands generated from rpc methods. - // If no options are specified for a given rpc method on the service, a - // command will be generated for that method with the default options. - repeated RpcCommandOptions rpc_command_options = 2; - - // sub_commands is a map of optional sub-commands for this command based on - // different protobuf services. The map key is used as the name of the - // sub-command. - map sub_commands = 3; -} - -// RpcCommandOptions specifies options for commands generated from protobuf -// rpc methods. -message RpcCommandOptions { - // rpc_method is short name of the protobuf rpc method that this command is - // generated from. - string rpc_method = 1; - - // use is the one-line usage method. It also allows specifying an alternate - // name for the command as the first word of the usage text. - // - // By default the name of an rpc command is the kebab-case short name of the - // rpc method. - string use = 2; - - // long is the long message shown in the 'help ' output. - string long = 3; - - // short is the short description shown in the 'help' output. - string short = 4; - - // example is examples of how to use the command. - string example = 5; - - // alias is an array of aliases that can be used instead of the first word in - // Use. - repeated string alias = 6; - - // suggest_for is an array of command names for which this command will be - // suggested - similar to aliases but only suggests. - repeated string suggest_for = 7; - - // deprecated defines, if this command is deprecated and should print this - // string when used. - string deprecated = 8; - - // version defines the version for this command. If this value is non-empty - // and the command does not define a "version" flag, a "version" boolean flag - // will be added to the command and, if specified, will print content of the - // "Version" variable. A shorthand "v" flag will also be added if the command - // does not define one. - string version = 9; - - // flag_options are options for flags generated from rpc request fields. - // By default all request fields are configured as flags. They can - // also be configured as positional args instead using positional_args. - map flag_options = 10; - - // positional_args specifies positional arguments for the command. - repeated PositionalArgDescriptor positional_args = 11; - - // skip specifies whether to skip this rpc method when generating commands. - bool skip = 12; -} - -// FlagOptions are options for flags generated from rpc request fields. -// By default, all request fields are configured as flags based on the -// kebab-case name of the field. Fields can be turned into positional arguments -// instead by using RpcCommandOptions.positional_args. -message FlagOptions { - - // name is an alternate name to use for the field flag. - string name = 1; - - // shorthand is a one-letter abbreviated flag. - string shorthand = 2; - - // usage is the help message. - string usage = 3; - - // default_value is the default value as text. - string default_value = 4; - - // default value is the default value as text if the flag is used without any - // value. - string no_opt_default_value = 5; - - // deprecated is the usage text to show if this flag is deprecated. - string deprecated = 6; - - // shorthand_deprecated is the usage text to show if the shorthand of this - // flag is deprecated. - string shorthand_deprecated = 7; - - // hidden hides the flag from help/usage text - bool hidden = 8; -} - -// PositionalArgDescriptor describes a positional argument. -message PositionalArgDescriptor { - // proto_field specifies the proto field to use as the positional arg. Any - // fields used as positional args will not have a flag generated. - string proto_field = 1; - - // varargs makes a positional parameter a varargs parameter. This can only be - // applied to last positional parameter and the proto_field must a repeated - // field. - bool varargs = 2; -} \ No newline at end of file diff --git a/proto/osmosis/autocli/v1/query.proto b/proto/osmosis/autocli/v1/query.proto deleted file mode 100644 index 20ab4d094b6..00000000000 --- a/proto/osmosis/autocli/v1/query.proto +++ /dev/null @@ -1,28 +0,0 @@ -syntax = "proto3"; - -package osmosis.autocli.v1; - -import "osmosis/autocli/v1/options.proto"; -import "osmosis/query/v1/query.proto"; - -option go_package = "cosmossdk.io/api/cosmos/base/cli/v1;cliv1"; - -// RemoteInfoService provides clients with the information they need -// to build dynamically CLI clients for remote chains. -service Query { - // AppOptions returns the autocli options for all of the modules in an app. - rpc AppOptions(AppOptionsRequest) returns (AppOptionsResponse) { - // NOTE: autocli options SHOULD NOT be part of consensus and - // module_query_safe should be kept as false. - option (cosmos.query.v1.module_query_safe) = false; - } -} - -// AppOptionsRequest is the RemoteInfoService/AppOptions request type. -message AppOptionsRequest {} - -// AppOptionsResponse is the RemoteInfoService/AppOptions response type. -message AppOptionsResponse { - // module_options is a map of module name to autocli module options. - map module_options = 1; -} \ No newline at end of file diff --git a/proto/osmosis/query/v1/query.proto b/proto/osmosis/query/v1/query.proto deleted file mode 100644 index 98053e44c75..00000000000 --- a/proto/osmosis/query/v1/query.proto +++ /dev/null @@ -1,36 +0,0 @@ -syntax = "proto3"; - -package cosmos.query.v1; - -import "google/protobuf/descriptor.proto"; - -// TODO: once we fully migrate to protov2 the go_package needs to be updated. -// We need this right now because gogoproto codegen needs to import the -// extension. -option go_package = "github.com/cosmos/cosmos-sdk/types/query"; - -extend google.protobuf.MethodOptions { - // module_query_safe is set to true when the query is safe to be called from - // within the state machine, for example from another module's Keeper, via - // ADR-033 calls or from CosmWasm contracts. - // Concretely, it means that the query is: - // 1. deterministic: given a block height, returns the exact same response - // upon multiple calls; and doesn't introduce any state-machine-breaking - // changes across SDK patch version. - // 2. consumes gas correctly. - // - // If you are a module developer and want to add this annotation to one of - // your own queries, please make sure that the corresponding query: - // 1. is deterministic and won't introduce state-machine-breaking changes - // without a coordinated upgrade path, - // 2. has its gas tracked, to avoid the attack vector where no gas is - // accounted for on potentially high-computation queries. - // - // For queries that potentially consume a large amount of gas (for example - // those with pagination, if the pagination field is incorrectly set), we - // also recommend adding Protobuf comments to warn module developers - // consuming these queries. - // - // When set to true, the query can safely be called - bool module_query_safe = 11110001; -} \ No newline at end of file diff --git a/x/lockup/module.go b/x/lockup/module.go index 9e66eece1e9..a8702257c13 100644 --- a/x/lockup/module.go +++ b/x/lockup/module.go @@ -16,7 +16,6 @@ import ( "encoding/json" "fmt" - autocliv1 "cosmossdk.io/api/cosmos/autocli/v1" "github.com/gorilla/mux" "github.com/grpc-ecosystem/grpc-gateway/runtime" "github.com/spf13/cobra" @@ -82,11 +81,6 @@ func (AppModuleBasic) ValidateGenesis(cdc codec.JSONCodec, config client.TxEncod return genState.Validate() } -// AutoCLIOptions implements the autocli.HasAutoCLIConfig interface. -func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions { - return types.AutoCLIOptions -} - // RegisterRESTRoutes registers the capability module's REST service handlers. func (AppModuleBasic) RegisterRESTRoutes(clientCtx client.Context, rtr *mux.Router) { rest.RegisterRoutes(clientCtx, rtr) diff --git a/x/lockup/types/autocli.go b/x/lockup/types/autocli.go deleted file mode 100644 index 2467074ecec..00000000000 --- a/x/lockup/types/autocli.go +++ /dev/null @@ -1,19 +0,0 @@ -package types - -import autocliv1 "cosmossdk.io/api/cosmos/autocli/v1" - -var AutoCLIOptions = &autocliv1.ModuleOptions{ - Query: &autocliv1.ServiceCommandDescriptor{ - Service: _Query_serviceDesc.ServiceName, - RpcCommandOptions: []*autocliv1.RpcCommandOptions{ - { - RpcMethod: "Lockup", - Use: "lockup [command]", - Short: "lockup commands", - }, - }, - }, - Tx: &autocliv1.ServiceCommandDescriptor{ - Service: _Msg_serviceDesc.ServiceName, - }, -} From 3a412be8ff224c6966e3ec7b4287870a3d3ae2c4 Mon Sep 17 00:00:00 2001 From: Ruslan Akhtariev Date: Thu, 3 Nov 2022 19:34:30 +0700 Subject: [PATCH 40/59] save --- proto/osmosis/gamm/v1beta1/query.proto | 19 +- x/gamm/keeper/grpc_query.go | 22 + x/gamm/keeper/grpc_query_test.go | 55 ++ x/gamm/pool-models/balancer/pool_test.go | 3 + x/gamm/types/query.pb.go | 643 +++++++++++++++++++---- 5 files changed, 631 insertions(+), 111 deletions(-) diff --git a/proto/osmosis/gamm/v1beta1/query.proto b/proto/osmosis/gamm/v1beta1/query.proto index f95e03b1e78..19abea37830 100644 --- a/proto/osmosis/gamm/v1beta1/query.proto +++ b/proto/osmosis/gamm/v1beta1/query.proto @@ -38,6 +38,9 @@ service Query { option (google.api.http).get = "/osmosis/gamm/v1beta1/pool_type/{pool_id}"; } + rpc CalcJoinPoolNoSwapShares(QueryCalcJoinPoolNoSwapSharesRequest) + returns (QueryCalcJoinPoolNoSwapSharesResponse) {} + rpc CalcJoinPoolShares(QueryCalcJoinPoolSharesRequest) returns (QueryCalcJoinPoolSharesResponse) { option (google.api.http).get = @@ -185,7 +188,21 @@ message QueryTotalSharesResponse { (gogoproto.nullable) = false ]; } - +//=============================== CalcJoinPoolNoSwapShares +message QueryCalcJoinPoolNoSwapSharesRequest { + uint64 pool_id = 1 [ (gogoproto.moretags) = "yaml:\"pool_id\"" ]; + repeated cosmos.base.v1beta1.Coin tokens_in = 2 [ + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", + (gogoproto.moretags) = "yaml:\"tokens_in\"", + (gogoproto.nullable) = false + ]; +} +message QueryCalcJoinPoolNoSwapSharesResponse { + string num_shares = 1 [ + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", + (gogoproto.nullable) = false + ]; +} // QuerySpotPriceRequest defines the gRPC request structure for a SpotPrice // query. message QuerySpotPriceRequest { diff --git a/x/gamm/keeper/grpc_query.go b/x/gamm/keeper/grpc_query.go index bd0ec301561..1e68467af44 100644 --- a/x/gamm/keeper/grpc_query.go +++ b/x/gamm/keeper/grpc_query.go @@ -193,6 +193,28 @@ func (q Querier) CalcExitPoolCoinsFromShares(ctx context.Context, req *types.Que return &types.QueryCalcExitPoolCoinsFromSharesResponse{TokensOut: exitCoins}, nil } +// CalcJoinPoolNoSwapShares returns the amount of shares you get by providing all possible tokens without a swap +func (q Querier) CalcJoinPoolNoSwapShares(ctx context.Context, req *types.QueryCalcJoinPoolNoSwapSharesRequest) (*types.QueryCalcJoinPoolNoSwapSharesResponse, error) { + if req == nil { + return nil, status.Error(codes.InvalidArgument, "empty request") + } + + sdkCtx := sdk.UnwrapSDKContext(ctx) + pool, err := q.Keeper.GetPoolAndPoke(sdkCtx, req.PoolId) + if err != nil { + return nil, types.ErrPoolNotFound + } + + sharesOut, _, err := pool.CalcJoinPoolNoSwapShares(sdkCtx, req.TokensIn, pool.GetSwapFee(sdkCtx)) + if err != nil { + return nil, err + } + + return &types.QueryCalcJoinPoolNoSwapSharesResponse{ + NumShares: sharesOut, + }, nil +} + // PoolParams queries a specified pool for its params. func (q Querier) PoolParams(ctx context.Context, req *types.QueryPoolParamsRequest) (*types.QueryPoolParamsResponse, error) { if req == nil { diff --git a/x/gamm/keeper/grpc_query_test.go b/x/gamm/keeper/grpc_query_test.go index 924aaa85302..464239d836a 100644 --- a/x/gamm/keeper/grpc_query_test.go +++ b/x/gamm/keeper/grpc_query_test.go @@ -8,6 +8,7 @@ import ( sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/cosmos/cosmos-sdk/types/query" + "github.com/osmosis-labs/osmosis/v12/x/gamm/pool-models/balancer" "github.com/osmosis-labs/osmosis/v12/x/gamm/types" ) @@ -86,6 +87,60 @@ func (suite *KeeperTestSuite) TestCalcExitPoolCoinsFromShares() { }) } } + +func (suite *KeeperTestSuite) TestCalcJoinPoolNoSwapShares() { + queryClient := suite.queryClient + ctx := suite.Ctx + poolId := suite.PrepareBalancerPool() + swapFee := sdk.ZeroDec() + var ( + defaultBalancer4Assets = []balancer.PoolAsset{ + {Token: sdk.NewInt64Coin("foo", 100), Weight: sdk.NewIntFromUint64(5)}, + {Token: sdk.NewInt64Coin("bar", 100), Weight: sdk.NewIntFromUint64(5)}, + {Token: sdk.NewInt64Coin("baz", 100), Weight: sdk.NewIntFromUint64(5)}, + {Token: sdk.NewInt64Coin("uosmo", 100), Weight: sdk.NewIntFromUint64(5)}, + } + + default4TokensIn = sdk.NewCoins( + sdk.NewCoin("foo", sdk.NewInt(100)), + sdk.NewCoin("bar", sdk.NewInt(100)), + sdk.NewCoin("baz", sdk.NewInt(100)), + sdk.NewCoin("uosmo", sdk.NewInt(100)), + ) + ) + testCases := []struct { + name string + poolId uint64 + tokensIn sdk.Coins + poolAssets []balancer.PoolAsset + + expectedShares sdk.Int + expectedErr error + }{ + { + name: "valid 4 tokens test", + poolId: poolId, + tokensIn: default4TokensIn, + poolAssets: defaultBalancer4Assets, + expectedShares: sdk.NewIntFromUint64(10000000000000000000), + expectedErr: nil, + }, + } + + for _, tc := range testCases { + suite.Run(tc.name, func() { + balancerPool := balancer.Pool{ + Address: types.NewPoolAddress(tc.poolId).String(), + Id: tc.poolId, + PoolParams: balancer.PoolParams{SwapFee: defaultSwapFee, ExitFee: defaultExitFee}, + PoolAssets: tc.poolAssets, + FuturePoolGovernor: defaultFutureGovernor, + TotalShares: sdk.NewCoin(types.GetPoolShareDenom(defaultPoolId), types.InitPoolSharesSupply), + } + }) + } +} + func (suite *KeeperTestSuite) TestCalcJoinPoolShares() { queryClient := suite.queryClient ctx := suite.Ctx diff --git a/x/gamm/pool-models/balancer/pool_test.go b/x/gamm/pool-models/balancer/pool_test.go index 63066309006..a63caeade7f 100644 --- a/x/gamm/pool-models/balancer/pool_test.go +++ b/x/gamm/pool-models/balancer/pool_test.go @@ -1350,6 +1350,9 @@ func TestCalcJoinPoolNoSwapShares(t *testing.T) { FuturePoolGovernor: defaultFutureGovernor, TotalShares: sdk.NewCoin(types.GetPoolShareDenom(defaultPoolId), types.InitPoolSharesSupply), } + fmt.Println(balancerPool.TotalShares) + fmt.Println(types.InitPoolSharesSupply) + fmt.Println("10000000000000000000") numShare, tokensJoined, err := balancerPool.CalcJoinPoolNoSwapShares(ctx, test.tokensIn, balancerPool.GetSwapFee(ctx)) diff --git a/x/gamm/types/query.pb.go b/x/gamm/types/query.pb.go index 5c0e3878a41..8ab33957947 100644 --- a/x/gamm/types/query.pb.go +++ b/x/gamm/types/query.pb.go @@ -851,6 +851,96 @@ func (m *QueryTotalSharesResponse) GetTotalShares() types1.Coin { return types1.Coin{} } +// =============================== CalcJoinPoolNoSwapShares +type QueryCalcJoinPoolNoSwapSharesRequest struct { + PoolId uint64 `protobuf:"varint,1,opt,name=pool_id,json=poolId,proto3" json:"pool_id,omitempty" yaml:"pool_id"` + TokensIn github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,2,rep,name=tokens_in,json=tokensIn,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"tokens_in" yaml:"tokens_in"` +} + +func (m *QueryCalcJoinPoolNoSwapSharesRequest) Reset() { *m = QueryCalcJoinPoolNoSwapSharesRequest{} } +func (m *QueryCalcJoinPoolNoSwapSharesRequest) String() string { return proto.CompactTextString(m) } +func (*QueryCalcJoinPoolNoSwapSharesRequest) ProtoMessage() {} +func (*QueryCalcJoinPoolNoSwapSharesRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_d9a717df9ca609ef, []int{18} +} +func (m *QueryCalcJoinPoolNoSwapSharesRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryCalcJoinPoolNoSwapSharesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryCalcJoinPoolNoSwapSharesRequest.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 *QueryCalcJoinPoolNoSwapSharesRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryCalcJoinPoolNoSwapSharesRequest.Merge(m, src) +} +func (m *QueryCalcJoinPoolNoSwapSharesRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryCalcJoinPoolNoSwapSharesRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryCalcJoinPoolNoSwapSharesRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryCalcJoinPoolNoSwapSharesRequest proto.InternalMessageInfo + +func (m *QueryCalcJoinPoolNoSwapSharesRequest) GetPoolId() uint64 { + if m != nil { + return m.PoolId + } + return 0 +} + +func (m *QueryCalcJoinPoolNoSwapSharesRequest) GetTokensIn() github_com_cosmos_cosmos_sdk_types.Coins { + if m != nil { + return m.TokensIn + } + return nil +} + +type QueryCalcJoinPoolNoSwapSharesResponse struct { + NumShares github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,1,opt,name=num_shares,json=numShares,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"num_shares"` +} + +func (m *QueryCalcJoinPoolNoSwapSharesResponse) Reset() { *m = QueryCalcJoinPoolNoSwapSharesResponse{} } +func (m *QueryCalcJoinPoolNoSwapSharesResponse) String() string { return proto.CompactTextString(m) } +func (*QueryCalcJoinPoolNoSwapSharesResponse) ProtoMessage() {} +func (*QueryCalcJoinPoolNoSwapSharesResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_d9a717df9ca609ef, []int{19} +} +func (m *QueryCalcJoinPoolNoSwapSharesResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryCalcJoinPoolNoSwapSharesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryCalcJoinPoolNoSwapSharesResponse.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 *QueryCalcJoinPoolNoSwapSharesResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryCalcJoinPoolNoSwapSharesResponse.Merge(m, src) +} +func (m *QueryCalcJoinPoolNoSwapSharesResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryCalcJoinPoolNoSwapSharesResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryCalcJoinPoolNoSwapSharesResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryCalcJoinPoolNoSwapSharesResponse proto.InternalMessageInfo + // QuerySpotPriceRequest defines the gRPC request structure for a SpotPrice // query. type QuerySpotPriceRequest struct { @@ -863,7 +953,7 @@ func (m *QuerySpotPriceRequest) Reset() { *m = QuerySpotPriceRequest{} } func (m *QuerySpotPriceRequest) String() string { return proto.CompactTextString(m) } func (*QuerySpotPriceRequest) ProtoMessage() {} func (*QuerySpotPriceRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_d9a717df9ca609ef, []int{18} + return fileDescriptor_d9a717df9ca609ef, []int{20} } func (m *QuerySpotPriceRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -924,7 +1014,7 @@ func (m *QuerySpotPriceResponse) Reset() { *m = QuerySpotPriceResponse{} func (m *QuerySpotPriceResponse) String() string { return proto.CompactTextString(m) } func (*QuerySpotPriceResponse) ProtoMessage() {} func (*QuerySpotPriceResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_d9a717df9ca609ef, []int{19} + return fileDescriptor_d9a717df9ca609ef, []int{21} } func (m *QuerySpotPriceResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -972,7 +1062,7 @@ func (m *QuerySwapExactAmountInRequest) Reset() { *m = QuerySwapExactAmo func (m *QuerySwapExactAmountInRequest) String() string { return proto.CompactTextString(m) } func (*QuerySwapExactAmountInRequest) ProtoMessage() {} func (*QuerySwapExactAmountInRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_d9a717df9ca609ef, []int{20} + return fileDescriptor_d9a717df9ca609ef, []int{22} } func (m *QuerySwapExactAmountInRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1037,7 +1127,7 @@ func (m *QuerySwapExactAmountInResponse) Reset() { *m = QuerySwapExactAm func (m *QuerySwapExactAmountInResponse) String() string { return proto.CompactTextString(m) } func (*QuerySwapExactAmountInResponse) ProtoMessage() {} func (*QuerySwapExactAmountInResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_d9a717df9ca609ef, []int{21} + return fileDescriptor_d9a717df9ca609ef, []int{23} } func (m *QuerySwapExactAmountInResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1078,7 +1168,7 @@ func (m *QuerySwapExactAmountOutRequest) Reset() { *m = QuerySwapExactAm func (m *QuerySwapExactAmountOutRequest) String() string { return proto.CompactTextString(m) } func (*QuerySwapExactAmountOutRequest) ProtoMessage() {} func (*QuerySwapExactAmountOutRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_d9a717df9ca609ef, []int{22} + return fileDescriptor_d9a717df9ca609ef, []int{24} } func (m *QuerySwapExactAmountOutRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1143,7 +1233,7 @@ func (m *QuerySwapExactAmountOutResponse) Reset() { *m = QuerySwapExactA func (m *QuerySwapExactAmountOutResponse) String() string { return proto.CompactTextString(m) } func (*QuerySwapExactAmountOutResponse) ProtoMessage() {} func (*QuerySwapExactAmountOutResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_d9a717df9ca609ef, []int{23} + return fileDescriptor_d9a717df9ca609ef, []int{25} } func (m *QuerySwapExactAmountOutResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1179,7 +1269,7 @@ func (m *QueryTotalLiquidityRequest) Reset() { *m = QueryTotalLiquidityR func (m *QueryTotalLiquidityRequest) String() string { return proto.CompactTextString(m) } func (*QueryTotalLiquidityRequest) ProtoMessage() {} func (*QueryTotalLiquidityRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_d9a717df9ca609ef, []int{24} + return fileDescriptor_d9a717df9ca609ef, []int{26} } func (m *QueryTotalLiquidityRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1216,7 +1306,7 @@ func (m *QueryTotalLiquidityResponse) Reset() { *m = QueryTotalLiquidity func (m *QueryTotalLiquidityResponse) String() string { return proto.CompactTextString(m) } func (*QueryTotalLiquidityResponse) ProtoMessage() {} func (*QueryTotalLiquidityResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_d9a717df9ca609ef, []int{25} + return fileDescriptor_d9a717df9ca609ef, []int{27} } func (m *QueryTotalLiquidityResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1271,6 +1361,8 @@ func init() { proto.RegisterType((*QueryTotalPoolLiquidityResponse)(nil), "osmosis.gamm.v1beta1.QueryTotalPoolLiquidityResponse") proto.RegisterType((*QueryTotalSharesRequest)(nil), "osmosis.gamm.v1beta1.QueryTotalSharesRequest") proto.RegisterType((*QueryTotalSharesResponse)(nil), "osmosis.gamm.v1beta1.QueryTotalSharesResponse") + proto.RegisterType((*QueryCalcJoinPoolNoSwapSharesRequest)(nil), "osmosis.gamm.v1beta1.QueryCalcJoinPoolNoSwapSharesRequest") + proto.RegisterType((*QueryCalcJoinPoolNoSwapSharesResponse)(nil), "osmosis.gamm.v1beta1.QueryCalcJoinPoolNoSwapSharesResponse") proto.RegisterType((*QuerySpotPriceRequest)(nil), "osmosis.gamm.v1beta1.QuerySpotPriceRequest") proto.RegisterType((*QuerySpotPriceResponse)(nil), "osmosis.gamm.v1beta1.QuerySpotPriceResponse") proto.RegisterType((*QuerySwapExactAmountInRequest)(nil), "osmosis.gamm.v1beta1.QuerySwapExactAmountInRequest") @@ -1284,108 +1376,112 @@ func init() { func init() { proto.RegisterFile("osmosis/gamm/v1beta1/query.proto", fileDescriptor_d9a717df9ca609ef) } var fileDescriptor_d9a717df9ca609ef = []byte{ - // 1603 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x58, 0x4b, 0x6f, 0x1c, 0xc5, - 0x16, 0x76, 0x3b, 0xb6, 0x63, 0x97, 0x6f, 0xfc, 0xa8, 0x38, 0x89, 0x33, 0x4e, 0x66, 0x72, 0xeb, - 0xea, 0xc6, 0x4e, 0x62, 0xf7, 0xc4, 0x8e, 0x23, 0x5d, 0x59, 0x37, 0x0f, 0x3b, 0xb1, 0x93, 0xb1, - 0x20, 0x36, 0x9d, 0x28, 0x08, 0x58, 0x8c, 0xda, 0x76, 0x33, 0xee, 0x64, 0xa6, 0xab, 0x3d, 0x55, - 0x1d, 0xdb, 0x42, 0x11, 0x52, 0x84, 0x58, 0xb1, 0x40, 0x0a, 0x64, 0x81, 0x22, 0xc1, 0x82, 0x05, - 0x62, 0x8d, 0xc4, 0x0f, 0x40, 0x48, 0x11, 0x12, 0x52, 0x10, 0x1b, 0xc4, 0x62, 0x40, 0x09, 0x20, - 0xd6, 0xfe, 0x03, 0xa0, 0xaa, 0x3a, 0xfd, 0x98, 0x57, 0xcf, 0x03, 0x22, 0xb1, 0xf2, 0x74, 0x9d, - 0x47, 0x7d, 0xe7, 0x3b, 0x55, 0xa7, 0xce, 0x31, 0x3a, 0x41, 0x59, 0x81, 0x32, 0x9b, 0xa5, 0x73, - 0x66, 0xa1, 0x90, 0xbe, 0x37, 0xbd, 0x66, 0x71, 0x73, 0x3a, 0xbd, 0xe5, 0x59, 0xc5, 0x5d, 0xdd, - 0x2d, 0x52, 0x4e, 0xf1, 0x08, 0x68, 0xe8, 0x42, 0x43, 0x07, 0x8d, 0xc4, 0x48, 0x8e, 0xe6, 0xa8, - 0x54, 0x48, 0x8b, 0x5f, 0x4a, 0x37, 0x71, 0xbc, 0xa6, 0x37, 0xbe, 0x03, 0xe2, 0xe4, 0xba, 0x94, - 0xa7, 0xd7, 0x4c, 0x66, 0x05, 0xd2, 0x75, 0x6a, 0x3b, 0x20, 0x3f, 0x1d, 0x95, 0x4b, 0x0c, 0x81, - 0x96, 0x6b, 0xe6, 0x6c, 0xc7, 0xe4, 0x36, 0xf5, 0x75, 0x8f, 0xe5, 0x28, 0xcd, 0xe5, 0xad, 0xb4, - 0xe9, 0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f8, - 0x5e, 0x29, 0x75, 0x44, 0x45, 0x5c, 0xe9, 0x8f, 0x18, 0x03, 0x72, 0x69, 0xc5, 0xe3, 0xf3, 0x72, - 0x01, 0xdf, 0x41, 0x08, 0x28, 0xa0, 0x1e, 0x7f, 0x11, 0x1c, 0x00, 0xc3, 0x2b, 0x1e, 0x27, 0x1f, - 0x69, 0x68, 0x3c, 0x20, 0x61, 0x71, 0xc7, 0xe6, 0x82, 0x04, 0xa9, 0xb5, 0x54, 0xa4, 0x85, 0xf2, - 0x3c, 0x1e, 0xa9, 0xc8, 0x63, 0x90, 0xb3, 0xdb, 0x68, 0x50, 0x45, 0x65, 0x3b, 0x3e, 0x49, 0x9d, - 0x92, 0x24, 0xbd, 0x35, 0x92, 0x8c, 0x03, 0xd2, 0x4d, 0xc6, 0x51, 0x44, 0x90, 0x47, 0x1a, 0x9a, - 0x68, 0x0c, 0x0e, 0x52, 0x55, 0xce, 0x9a, 0xf6, 0x42, 0x59, 0x5b, 0x44, 0x87, 0x83, 0x0b, 0xb4, - 0x6a, 0x16, 0xcd, 0x42, 0x5b, 0x67, 0x9d, 0x5c, 0x43, 0x47, 0xaa, 0xdc, 0x40, 0x34, 0x93, 0xa8, - 0xc7, 0x95, 0x2b, 0x71, 0x65, 0xd7, 0x00, 0x1d, 0xf2, 0x32, 0xdc, 0xc1, 0x5b, 0x94, 0x9b, 0x79, - 0xe1, 0xed, 0x25, 0x7b, 0xcb, 0xb3, 0x37, 0x6c, 0xbe, 0xdb, 0x16, 0xae, 0x4f, 0x34, 0xb8, 0x19, - 0xb5, 0xfc, 0x01, 0xc0, 0xfb, 0xa8, 0x2f, 0xef, 0x2f, 0x36, 0x66, 0xfb, 0xaa, 0x60, 0x3b, 0xac, - 0x24, 0x81, 0x25, 0x69, 0x2d, 0x03, 0xa1, 0xdd, 0x12, 0x50, 0x27, 0x11, 0xb6, 0x5f, 0x6e, 0x88, - 0x87, 0x46, 0xab, 0xfd, 0x40, 0x88, 0xaf, 0xa1, 0x7f, 0x71, 0xb1, 0x9c, 0x95, 0xa7, 0xd2, 0xcf, - 0x44, 0x4c, 0x94, 0x63, 0x10, 0xe5, 0x41, 0xb5, 0x59, 0xd4, 0x98, 0x18, 0xfd, 0x3c, 0xdc, 0x82, - 0xfc, 0xae, 0x41, 0x09, 0xbe, 0xe9, 0x52, 0xbe, 0x5a, 0xb4, 0xd7, 0xdb, 0x2a, 0xe4, 0x78, 0x11, - 0x0d, 0x09, 0x14, 0x59, 0x93, 0x31, 0x8b, 0x67, 0x37, 0x2c, 0x87, 0x16, 0xe0, 0xe6, 0x8d, 0x85, - 0x05, 0xa7, 0x52, 0x83, 0x18, 0x03, 0x62, 0x69, 0x5e, 0xac, 0x5c, 0x15, 0x0b, 0xf8, 0x3a, 0x1a, - 0xde, 0xf2, 0x28, 0x2f, 0xf7, 0xb3, 0x4f, 0xfa, 0x39, 0xb6, 0x57, 0x4a, 0x8d, 0x2a, 0x3f, 0x55, - 0x2a, 0xc4, 0x18, 0x94, 0x6b, 0xa1, 0xa7, 0xe5, 0xae, 0xde, 0xae, 0xa1, 0x6e, 0xa3, 0x7f, 0xdb, - 0xe6, 0x9b, 0x37, 0xb7, 0x4d, 0x77, 0xc9, 0xb2, 0xc8, 0x0d, 0xb8, 0x2b, 0x91, 0x48, 0x81, 0xdf, - 0x59, 0x84, 0x98, 0x4b, 0x79, 0xd6, 0x15, 0xab, 0x50, 0x56, 0x0f, 0xed, 0x95, 0x52, 0xc3, 0x50, - 0x28, 0x03, 0x19, 0x31, 0xfa, 0x98, 0x6f, 0x4d, 0xfe, 0xd0, 0xd0, 0x71, 0xe5, 0x70, 0xdb, 0x74, - 0x17, 0x77, 0xcc, 0x75, 0x28, 0x9b, 0x19, 0xc7, 0xa7, 0xf0, 0x14, 0xea, 0x61, 0x96, 0xb3, 0x61, - 0x15, 0xc1, 0xe7, 0xf0, 0x5e, 0x29, 0x75, 0x00, 0x7c, 0xca, 0x75, 0x62, 0x80, 0x42, 0x94, 0xed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0x0b, 0xb5, 0xe1, 0x47, 0xee, 0x1f, 0xa0, 0x4d, 0x47, 0x8a, 0x4c, 0x78, 0x07, - 0xbf, 0xd3, 0x50, 0xa2, 0x4e, 0x3c, 0x2b, 0x1e, 0xc7, 0x2d, 0x60, 0x0b, 0x1b, 0xd4, 0xd8, 0x93, - 0x5e, 0xbf, 0x9f, 0x23, 0x4b, 0x32, 0xa4, 0xcb, 0xf8, 0xe2, 0x5f, 0x08, 0x89, 0x7a, 0x7c, 0x61, - 0xf9, 0xc9, 0xb3, 0xa4, 0xf6, 0xf4, 0x59, 0x52, 0xfb, 0xf9, 0x59, 0x52, 0x7b, 0xff, 0x79, 0xb2, - 0xe3, 0xe9, 0xf3, 0x64, 0xc7, 0x0f, 0xcf, 0x93, 0x1d, 0xaf, 0x9f, 0x8d, 0xf4, 0x4d, 0xb0, 0xc7, - 0x54, 0xde, 0x5c, 0x63, 0xc1, 0x86, 0xf7, 0xa6, 0x67, 0xd2, 0x3b, 0x6a, 0x5b, 0xd9, 0x45, 0xad, - 0xf5, 0xc8, 0x7f, 0x15, 0x9c, 0xfb, 0x33, 0x00, 0x00, 0xff, 0xff, 0x69, 0xd3, 0xbc, 0xcf, 0x23, - 0x17, 0x00, 0x00, + // 1670 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x58, 0x4b, 0x6f, 0x14, 0xc7, + 0x16, 0x76, 0x19, 0xdb, 0xd8, 0xe5, 0x8b, 0x1f, 0x85, 0x81, 0x61, 0x0c, 0x33, 0xdc, 0xba, 0x17, + 0x6c, 0xc0, 0xee, 0xc1, 0xc6, 0x48, 0x57, 0xbe, 0xe1, 0x61, 0x83, 0x0d, 0x63, 0x05, 0xec, 0x34, + 0x88, 0x28, 0xc9, 0x62, 0xd4, 0xb6, 0x3b, 0xe3, 0x86, 0x99, 0xae, 0xf6, 0x74, 0x35, 0xb6, 0x95, + 0xa0, 0x48, 0x28, 0xca, 0x2a, 0x8b, 0x48, 0x04, 0x16, 0x11, 0x52, 0xb2, 0xc8, 0x22, 0xca, 0x3a, + 0x52, 0x7e, 0x40, 0x14, 0x09, 0x45, 0x8a, 0x04, 0xca, 0x26, 0xca, 0x62, 0x12, 0x41, 0x22, 0x65, + 0x3d, 0x3f, 0x20, 0x89, 0xaa, 0xea, 0x74, 0x4f, 0xcf, 0xfb, 0x41, 0x90, 0xb2, 0xc2, 0x53, 0xe7, + 0x51, 0xdf, 0xf9, 0xce, 0xe9, 0x53, 0xe7, 0x80, 0x8f, 0x30, 0x37, 0xcb, 0x5c, 0xcb, 0x4d, 0xa4, + 0x8d, 0x6c, 0x36, 0x71, 0x67, 0x6a, 0xd5, 0xe4, 0xc6, 0x54, 0x62, 0xd3, 0x33, 0x73, 0x3b, 0x9a, + 0x93, 0x63, 0x9c, 0x91, 0x11, 0xd0, 0xd0, 0x84, 0x86, 0x06, 0x1a, 0xd1, 0x91, 0x34, 0x4b, 0x33, + 0xa9, 0x90, 0x10, 0x7f, 0x29, 0xdd, 0xe8, 0xe1, 0xaa, 0xde, 0xf8, 0x36, 0x88, 0x63, 0x6b, 0x52, + 0x9e, 0x58, 0x35, 0x5c, 0x33, 0x90, 0xae, 0x31, 0xcb, 0x06, 0xf9, 0x89, 0xb0, 0x5c, 0x62, 0x08, + 0xb4, 0x1c, 0x23, 0x6d, 0xd9, 0x06, 0xb7, 0x98, 0xaf, 0x7b, 0x28, 0xcd, 0x58, 0x3a, 0x63, 0x26, + 0x0c, 0xc7, 0x4a, 0x18, 0xb6, 0xcd, 0xb8, 0x14, 0xba, 0x20, 0x3d, 0x08, 0x52, 0xf9, 0x6b, 0xd5, + 0x7b, 0x3b, 0x61, 0xd8, 0x3b, 0xbe, 0x48, 0x5d, 0x92, 0x52, 0xe0, 0xd5, 0x0f, 0x25, 0xa2, 0xe7, + 0xf1, 0xd0, 0x6b, 0xe2, 0xd6, 0x15, 0xc6, 0x32, 0xba, 0xb9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88, 0x97, 0x73, 0xfa, 0x0f, 0x82, 0xbb, 0x25, 0x3c, 0xf2, + 0x1e, 0x96, 0x8b, 0x90, 0x4b, 0x6a, 0x7c, 0x4c, 0x15, 0x0b, 0x5c, 0x74, 0xbc, 0xb1, 0xa2, 0x0a, + 0x92, 0xfe, 0xe7, 0xde, 0x0f, 0xbf, 0xde, 0xef, 0x3c, 0x4c, 0x46, 0x13, 0x55, 0x57, 0x6a, 0xb5, + 0x79, 0x7d, 0x88, 0x70, 0xaf, 0xbf, 0x14, 0x91, 0x13, 0x75, 0x7c, 0x97, 0x6d, 0x54, 0xd1, 0x93, + 0x4d, 0xe9, 0x02, 0x94, 0x31, 0x09, 0xe5, 0xdf, 0x24, 0x5e, 0x1d, 0x4a, 0xb0, 0x66, 0x91, 0xcf, + 0x11, 0x1e, 0x28, 0xcd, 0x19, 0x39, 0x55, 0xe7, 0xa2, 0xaa, 0xd9, 0x8f, 0x4e, 0xb5, 0x60, 0x01, + 0x00, 0x27, 0x25, 0xc0, 0x31, 0x72, 0xb4, 0x3a, 0x40, 0x35, 0x46, 0x04, 0x09, 0x24, 0x1f, 0x20, + 0xdc, 0x25, 0x22, 0x24, 0xc7, 0x1a, 0x64, 0xc3, 0x87, 0x34, 0xd6, 0x50, 0xaf, 0x39, 0x20, 0x92, + 0xa5, 0xc4, 0x3b, 0xd0, 0x30, 0xee, 0x92, 0x87, 0x08, 0xf7, 0xfa, 0x2b, 0x64, 0xdd, 0xf4, 0x95, + 0x2d, 0xab, 0x75, 0xd3, 0x57, 0xbe, 0x93, 0xd2, 0x29, 0x09, 0xea, 0x24, 0x39, 0x5e, 0x1b, 0x94, + 0x5c, 0x4a, 0x43, 0xc0, 0x1e, 0x20, 0x1c, 0xa9, 0x35, 0x85, 0x90, 0xd9, 0x3a, 0x97, 0x37, 0x98, + 0xc6, 0xa2, 0xff, 0x6f, 0xcb, 0x16, 0x02, 0xe9, 0x20, 0xdf, 0x20, 0x4c, 0x2a, 0x97, 0x4d,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5d, 0xf2, 0x3d, 0xc2, 0x07, 0x17, 0x5c, 0x6e, 0x65, 0x0d, + 0x6e, 0x56, 0x4c, 0xb4, 0xe4, 0x74, 0x3d, 0x04, 0x35, 0x36, 0x80, 0xe8, 0x4c, 0x6b, 0x46, 0x00, + 0x7f, 0x41, 0xc2, 0x3f, 0x4f, 0xce, 0x56, 0x87, 0x1f, 0xfa, 0xfe, 0x00, 0x6d, 0x22, 0xd4, 0x64, + 0x8a, 0xdf, 0xe0, 0x53, 0x84, 0xa3, 0x35, 0xe2, 0x59, 0xf6, 0x38, 0x69, 0x01, 0x5b, 0x71, 0x70, + 0xae, 0x5b, 0xe9, 0xb5, 0xe7, 0x4c, 0xba, 0x28, 0x43, 0xba, 0x40, 0xce, 0xbd, 0x40, 0x48, 0xcc, + 0xe3, 0xf3, 0x4b, 0x8f, 0x9f, 0xc5, 0xd0, 0x93, 0x67, 0x31, 0xf4, 0xcb, 0xb3, 0x18, 0xfa, 0xe8, + 0x79, 0xac, 0xe3, 0xc9, 0xf3, 0x58, 0xc7, 0x8f, 0xcf, 0x63, 0x1d, 0x6f, 0x9e, 0x0a, 0xcd, 0x73, + 0x70, 0xc7, 0x64, 0xc6, 0x58, 0x75, 0x83, 0x0b, 0xef, 0x4c, 0x4d, 0x27, 0xb6, 0xd5, 0xb5, 0x72, + 0xba, 0x5b, 0xed, 0x91, 0xff, 0x1d, 0x74, 0xfa, 0xaf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x37, 0x02, + 0x14, 0x1f, 0x07, 0x19, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1409,6 +1505,7 @@ type QueryClient interface { // Returns "Balancer" as a string literal when the pool is a balancer pool. // Errors if the pool is failed to be type caseted. PoolType(ctx context.Context, in *QueryPoolTypeRequest, opts ...grpc.CallOption) (*QueryPoolTypeResponse, error) + CalcJoinPoolNoSwapShares(ctx context.Context, in *QueryCalcJoinPoolNoSwapSharesRequest, opts ...grpc.CallOption) (*QueryCalcJoinPoolNoSwapSharesResponse, error) CalcJoinPoolShares(ctx context.Context, in *QueryCalcJoinPoolSharesRequest, opts ...grpc.CallOption) (*QueryCalcJoinPoolSharesResponse, error) CalcExitPoolCoinsFromShares(ctx context.Context, in *QueryCalcExitPoolCoinsFromSharesRequest, opts ...grpc.CallOption) (*QueryCalcExitPoolCoinsFromSharesResponse, error) PoolParams(ctx context.Context, in *QueryPoolParamsRequest, opts ...grpc.CallOption) (*QueryPoolParamsResponse, error) @@ -1475,6 +1572,15 @@ func (c *queryClient) PoolType(ctx context.Context, in *QueryPoolTypeRequest, op return out, nil } +func (c *queryClient) CalcJoinPoolNoSwapShares(ctx context.Context, in *QueryCalcJoinPoolNoSwapSharesRequest, opts ...grpc.CallOption) (*QueryCalcJoinPoolNoSwapSharesResponse, error) { + out := new(QueryCalcJoinPoolNoSwapSharesResponse) + err := c.cc.Invoke(ctx, "/osmosis.gamm.v1beta1.Query/CalcJoinPoolNoSwapShares", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *queryClient) CalcJoinPoolShares(ctx context.Context, in *QueryCalcJoinPoolSharesRequest, opts ...grpc.CallOption) (*QueryCalcJoinPoolSharesResponse, error) { out := new(QueryCalcJoinPoolSharesResponse) err := c.cc.Invoke(ctx, "/osmosis.gamm.v1beta1.Query/CalcJoinPoolShares", in, out, opts...) @@ -1558,6 +1664,7 @@ type QueryServer interface { // Returns "Balancer" as a string literal when the pool is a balancer pool. // Errors if the pool is failed to be type caseted. PoolType(context.Context, *QueryPoolTypeRequest) (*QueryPoolTypeResponse, error) + CalcJoinPoolNoSwapShares(context.Context, *QueryCalcJoinPoolNoSwapSharesRequest) (*QueryCalcJoinPoolNoSwapSharesResponse, error) CalcJoinPoolShares(context.Context, *QueryCalcJoinPoolSharesRequest) (*QueryCalcJoinPoolSharesResponse, error) CalcExitPoolCoinsFromShares(context.Context, *QueryCalcExitPoolCoinsFromSharesRequest) (*QueryCalcExitPoolCoinsFromSharesResponse, error) PoolParams(context.Context, *QueryPoolParamsRequest) (*QueryPoolParamsResponse, error) @@ -1590,6 +1697,9 @@ func (*UnimplementedQueryServer) Pool(ctx context.Context, req *QueryPoolRequest func (*UnimplementedQueryServer) PoolType(ctx context.Context, req *QueryPoolTypeRequest) (*QueryPoolTypeResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method PoolType not implemented") } +func (*UnimplementedQueryServer) CalcJoinPoolNoSwapShares(ctx context.Context, req *QueryCalcJoinPoolNoSwapSharesRequest) (*QueryCalcJoinPoolNoSwapSharesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CalcJoinPoolNoSwapShares not implemented") +} func (*UnimplementedQueryServer) CalcJoinPoolShares(ctx context.Context, req *QueryCalcJoinPoolSharesRequest) (*QueryCalcJoinPoolSharesResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method CalcJoinPoolShares not implemented") } @@ -1709,6 +1819,24 @@ func _Query_PoolType_Handler(srv interface{}, ctx context.Context, dec func(inte return interceptor(ctx, in, info, handler) } +func _Query_CalcJoinPoolNoSwapShares_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryCalcJoinPoolNoSwapSharesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).CalcJoinPoolNoSwapShares(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/osmosis.gamm.v1beta1.Query/CalcJoinPoolNoSwapShares", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).CalcJoinPoolNoSwapShares(ctx, req.(*QueryCalcJoinPoolNoSwapSharesRequest)) + } + return interceptor(ctx, in, info, handler) +} + func _Query_CalcJoinPoolShares_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(QueryCalcJoinPoolSharesRequest) if err := dec(in); err != nil { @@ -1877,6 +2005,10 @@ var _Query_serviceDesc = grpc.ServiceDesc{ MethodName: "PoolType", Handler: _Query_PoolType_Handler, }, + { + MethodName: "CalcJoinPoolNoSwapShares", + Handler: _Query_CalcJoinPoolNoSwapShares_Handler, + }, { MethodName: "CalcJoinPoolShares", Handler: _Query_CalcJoinPoolShares_Handler, @@ -2523,6 +2655,81 @@ func (m *QueryTotalSharesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error return len(dAtA) - i, nil } +func (m *QueryCalcJoinPoolNoSwapSharesRequest) 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 *QueryCalcJoinPoolNoSwapSharesRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryCalcJoinPoolNoSwapSharesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.TokensIn) > 0 { + for iNdEx := len(m.TokensIn) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.TokensIn[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + if m.PoolId != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.PoolId)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *QueryCalcJoinPoolNoSwapSharesResponse) 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 *QueryCalcJoinPoolNoSwapSharesResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryCalcJoinPoolNoSwapSharesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size := m.NumShares.Size() + i -= size + if _, err := m.NumShares.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + func (m *QuerySpotPriceRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -3086,6 +3293,35 @@ func (m *QueryTotalSharesResponse) Size() (n int) { return n } +func (m *QueryCalcJoinPoolNoSwapSharesRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.PoolId != 0 { + n += 1 + sovQuery(uint64(m.PoolId)) + } + if len(m.TokensIn) > 0 { + for _, e := range m.TokensIn { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + return n +} + +func (m *QueryCalcJoinPoolNoSwapSharesResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.NumShares.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + func (m *QuerySpotPriceRequest) Size() (n int) { if m == nil { return 0 @@ -4722,6 +4958,193 @@ func (m *QueryTotalSharesResponse) Unmarshal(dAtA []byte) error { } return nil } +func (m *QueryCalcJoinPoolNoSwapSharesRequest) 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: QueryCalcJoinPoolNoSwapSharesRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryCalcJoinPoolNoSwapSharesRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field PoolId", wireType) + } + m.PoolId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.PoolId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TokensIn", 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.TokensIn = append(m.TokensIn, types1.Coin{}) + if err := m.TokensIn[len(m.TokensIn)-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 *QueryCalcJoinPoolNoSwapSharesResponse) 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: QueryCalcJoinPoolNoSwapSharesResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryCalcJoinPoolNoSwapSharesResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NumShares", 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.NumShares.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 *QuerySpotPriceRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 From 44d5e7e6590367fb76bfd09915c1cf2a843d398f Mon Sep 17 00:00:00 2001 From: Ruslan Akhtariev Date: Fri, 4 Nov 2022 13:46:58 +0700 Subject: [PATCH 41/59] SimJoinPoolNoSwap --- proto/osmosis/gamm/v1beta1/query.proto | 20 +- x/gamm/keeper/export_test.go | 4 + x/gamm/keeper/grpc_query.go | 24 +- x/gamm/keeper/grpc_query_test.go | 115 +++--- x/gamm/keeper/pool_service.go | 2 +- x/gamm/types/query.pb.go | 462 ++++++++++++++----------- 6 files changed, 365 insertions(+), 262 deletions(-) diff --git a/proto/osmosis/gamm/v1beta1/query.proto b/proto/osmosis/gamm/v1beta1/query.proto index 19abea37830..8130395ed87 100644 --- a/proto/osmosis/gamm/v1beta1/query.proto +++ b/proto/osmosis/gamm/v1beta1/query.proto @@ -38,8 +38,8 @@ service Query { option (google.api.http).get = "/osmosis/gamm/v1beta1/pool_type/{pool_id}"; } - rpc CalcJoinPoolNoSwapShares(QueryCalcJoinPoolNoSwapSharesRequest) - returns (QueryCalcJoinPoolNoSwapSharesResponse) {} + rpc SimJoinPoolNoSwap(QueryJoinPoolNoSwapRequest) + returns (QueryJoinPoolNoSwapResponse) {} rpc CalcJoinPoolShares(QueryCalcJoinPoolSharesRequest) returns (QueryCalcJoinPoolSharesResponse) { @@ -188,17 +188,21 @@ message QueryTotalSharesResponse { (gogoproto.nullable) = false ]; } -//=============================== CalcJoinPoolNoSwapShares -message QueryCalcJoinPoolNoSwapSharesRequest { +//=============================== SimJoinPoolNoSwap +message QueryJoinPoolNoSwapRequest { uint64 pool_id = 1 [ (gogoproto.moretags) = "yaml:\"pool_id\"" ]; - repeated cosmos.base.v1beta1.Coin tokens_in = 2 [ + string shares_out_amount = 2 [ + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", + (gogoproto.nullable) = false + ]; +} +message QueryJoinPoolNoSwapResponse { + repeated cosmos.base.v1beta1.Coin tokens_in = 1 [ (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", (gogoproto.moretags) = "yaml:\"tokens_in\"", (gogoproto.nullable) = false ]; -} -message QueryCalcJoinPoolNoSwapSharesResponse { - string num_shares = 1 [ + string shares_out = 2 [ (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.nullable) = false ]; diff --git a/x/gamm/keeper/export_test.go b/x/gamm/keeper/export_test.go index 31119cbf1c7..9279bac0d5e 100644 --- a/x/gamm/keeper/export_test.go +++ b/x/gamm/keeper/export_test.go @@ -19,3 +19,7 @@ func (k Keeper) SetPool(ctx sdk.Context, pool types.PoolI) error { func (k Keeper) GetNextPoolIdAndIncrement(ctx sdk.Context) uint64 { return k.getNextPoolIdAndIncrement(ctx) } + +func (_ Keeper) GetMaximalNoSwapLPAmount(ctx sdk.Context, pool types.PoolI, numShares sdk.Int) (sdk.Coins, error) { + return getMaximalNoSwapLPAmount(ctx, pool, numShares) +} diff --git a/x/gamm/keeper/grpc_query.go b/x/gamm/keeper/grpc_query.go index 1e68467af44..9db0ace39b9 100644 --- a/x/gamm/keeper/grpc_query.go +++ b/x/gamm/keeper/grpc_query.go @@ -194,24 +194,36 @@ func (q Querier) CalcExitPoolCoinsFromShares(ctx context.Context, req *types.Que } // CalcJoinPoolNoSwapShares returns the amount of shares you get by providing all possible tokens without a swap -func (q Querier) CalcJoinPoolNoSwapShares(ctx context.Context, req *types.QueryCalcJoinPoolNoSwapSharesRequest) (*types.QueryCalcJoinPoolNoSwapSharesResponse, error) { +func (q Querier) SimJoinPoolNoSwap(ctx context.Context, req *types.QueryJoinPoolNoSwapRequest) (*types.QueryJoinPoolNoSwapResponse, error) { if req == nil { return nil, status.Error(codes.InvalidArgument, "empty request") } sdkCtx := sdk.UnwrapSDKContext(ctx) - pool, err := q.Keeper.GetPoolAndPoke(sdkCtx, req.PoolId) + pool, err := q.GetPoolAndPoke(sdkCtx, req.PoolId) if err != nil { - return nil, types.ErrPoolNotFound + return nil, err } - sharesOut, _, err := pool.CalcJoinPoolNoSwapShares(sdkCtx, req.TokensIn, pool.GetSwapFee(sdkCtx)) + neededLpLiquidity, err := getMaximalNoSwapLPAmount(sdkCtx, pool, req.SharesOutAmount) if err != nil { return nil, err } - return &types.QueryCalcJoinPoolNoSwapSharesResponse{ - NumShares: sharesOut, + sharesOut, _, err := pool.CalcJoinPoolNoSwapShares(sdkCtx, neededLpLiquidity, pool.GetSwapFee(sdkCtx)) + if err != nil { + return nil, err + } + + // sanity check + if sharesOut.LT(req.SharesOutAmount) { + return nil, fmt.Errorf("Expected to JoinPoolNoSwap >= %s shares, actually did %s shares", + req.SharesOutAmount, sharesOut) + } + + return &types.QueryJoinPoolNoSwapResponse{ + TokensIn: neededLpLiquidity, + SharesOut: sharesOut, }, nil } diff --git a/x/gamm/keeper/grpc_query_test.go b/x/gamm/keeper/grpc_query_test.go index 464239d836a..956b0fc3081 100644 --- a/x/gamm/keeper/grpc_query_test.go +++ b/x/gamm/keeper/grpc_query_test.go @@ -8,7 +8,6 @@ import ( sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/cosmos/cosmos-sdk/types/query" - "github.com/osmosis-labs/osmosis/v12/x/gamm/pool-models/balancer" "github.com/osmosis-labs/osmosis/v12/x/gamm/types" ) @@ -88,59 +87,95 @@ func (suite *KeeperTestSuite) TestCalcExitPoolCoinsFromShares() { } } -func (suite *KeeperTestSuite) TestCalcJoinPoolNoSwapShares() { +func (suite *KeeperTestSuite) TestSimJoinPoolNoSwap() { queryClient := suite.queryClient - ctx := suite.Ctx poolId := suite.PrepareBalancerPool() - swapFee := sdk.ZeroDec() - var ( - defaultBalancer4Assets = []balancer.PoolAsset{ - {Token: sdk.NewInt64Coin("foo", 100), Weight: sdk.NewIntFromUint64(5)}, - {Token: sdk.NewInt64Coin("bar", 100), Weight: sdk.NewIntFromUint64(5)}, - {Token: sdk.NewInt64Coin("baz", 100), Weight: sdk.NewIntFromUint64(5)}, - {Token: sdk.NewInt64Coin("uosmo", 100), Weight: sdk.NewIntFromUint64(5)}, - } - - default4TokensIn = sdk.NewCoins( - sdk.NewCoin("foo", sdk.NewInt(100)), - sdk.NewCoin("bar", sdk.NewInt(100)), - sdk.NewCoin("baz", sdk.NewInt(100)), - sdk.NewCoin("uosmo", sdk.NewInt(100)), - ) - ) - testCases := []struct { - name string - poolId uint64 - tokensIn sdk.Coins - poolAssets []balancer.PoolAsset + ctx := suite.Ctx - expectedShares sdk.Int - expectedErr error + testCases := []struct { + name string + sharesOutAmount sdk.Int + poolId uint64 + expectingErr bool }{ { - name: "valid 4 tokens test", - poolId: poolId, - tokensIn: default4TokensIn, - poolAssets: defaultBalancer4Assets, - expectedShares: sdk.NewIntFromUint64(10000000000000000000), - expectedErr: nil, + name: "valid test case", + sharesOutAmount: types.OneShare.MulRaw(50), + poolId: poolId, + + expectingErr: false, + }, + { + name: "too much shares required", + sharesOutAmount: types.InitPoolSharesSupply.Mul(sdk.NewInt(2)), + poolId: poolId, + + expectingErr: true, + }, + { + name: "invalid pool id", + sharesOutAmount: types.OneShare.MulRaw(50), + poolId: poolId + 1, + + expectingErr: true, + }, + { + name: "negative shares out", + sharesOutAmount: sdk.NewInt(-1), + poolId: poolId, + + expectingErr: true, + }, + { + name: "no pool id", + sharesOutAmount: sdk.NewInt(-1), + + expectingErr: true, + }, + { + name: "zero shares", + sharesOutAmount: sdk.ZeroInt(), + poolId: poolId, + + expectingErr: true, }, } for _, tc := range testCases { suite.Run(tc.name, func() { - balancerPool := balancer.Pool{ - Address: types.NewPoolAddress(tc.poolId).String(), - Id: tc.poolId, - PoolParams: balancer.PoolParams{SwapFee: defaultSwapFee, ExitFee: defaultExitFee}, - PoolAssets: tc.poolAssets, - FuturePoolGovernor: defaultFutureGovernor, - TotalShares: sdk.NewCoin(types.GetPoolShareDenom(defaultPoolId), types.InitPoolSharesSupply), + out, err := queryClient.SimJoinPoolNoSwap(gocontext.Background(), &types.QueryJoinPoolNoSwapRequest{ + PoolId: tc.poolId, + SharesOutAmount: tc.sharesOutAmount, + }) + + if !tc.expectingErr { + suite.Require().NoError(err) + + poolRes, err := queryClient.Pool(gocontext.Background(), &types.QueryPoolRequest{ + PoolId: tc.poolId, + }) + suite.Require().NoError(err) + + var pool types.PoolI + err = suite.App.InterfaceRegistry().UnpackAny(poolRes.Pool, &pool) + suite.Require().NoError(err) + + liquidityBefore := pool.GetTotalPoolLiquidity(ctx) + + neededLpLiquidity, err := suite.App.GAMMKeeper.GetMaximalNoSwapLPAmount(ctx, pool, tc.sharesOutAmount) + suite.Require().NoError(err) + expectedShares, _, err := pool.CalcJoinPoolNoSwapShares(ctx, neededLpLiquidity, pool.GetSwapFee(ctx)) + suite.Require().NoError(err) + + suite.Require().Equal(out.SharesOut, expectedShares) + suite.Require().Equal(out.TokensIn, neededLpLiquidity) + suite.Require().Equal(liquidityBefore, pool.GetTotalPoolLiquidity(ctx)) + } else { + suite.Require().Error(err) } }) } } - func (suite *KeeperTestSuite) TestCalcJoinPoolShares() { queryClient := suite.queryClient ctx := suite.Ctx diff --git a/x/gamm/keeper/pool_service.go b/x/gamm/keeper/pool_service.go index b464dc952c6..69872bb2f0c 100644 --- a/x/gamm/keeper/pool_service.go +++ b/x/gamm/keeper/pool_service.go @@ -259,7 +259,7 @@ func getMaximalNoSwapLPAmount(ctx sdk.Context, pool types.PoolI, shareOutAmount // shareRatio is the desired number of shares, divided by the total number of // shares currently in the pool. It is intended to be used in scenarios where you want shareRatio := shareOutAmount.ToDec().QuoInt(totalSharesAmount) - if shareRatio.LTE(sdk.ZeroDec()) { + if shareRatio.LTE(sdk.ZeroDec()) || shareRatio.GT(sdk.OneDec()) { return sdk.Coins{}, sdkerrors.Wrapf(types.ErrInvalidMathApprox, "share ratio is zero or negative") } diff --git a/x/gamm/types/query.pb.go b/x/gamm/types/query.pb.go index 8ab33957947..04fc1479c39 100644 --- a/x/gamm/types/query.pb.go +++ b/x/gamm/types/query.pb.go @@ -851,24 +851,24 @@ func (m *QueryTotalSharesResponse) GetTotalShares() types1.Coin { return types1.Coin{} } -// =============================== CalcJoinPoolNoSwapShares -type QueryCalcJoinPoolNoSwapSharesRequest struct { - PoolId uint64 `protobuf:"varint,1,opt,name=pool_id,json=poolId,proto3" json:"pool_id,omitempty" yaml:"pool_id"` - TokensIn github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,2,rep,name=tokens_in,json=tokensIn,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"tokens_in" yaml:"tokens_in"` +// =============================== SimJoinPoolNoSwap +type QueryJoinPoolNoSwapRequest struct { + PoolId uint64 `protobuf:"varint,1,opt,name=pool_id,json=poolId,proto3" json:"pool_id,omitempty" yaml:"pool_id"` + SharesOutAmount github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,2,opt,name=shares_out_amount,json=sharesOutAmount,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"shares_out_amount"` } -func (m *QueryCalcJoinPoolNoSwapSharesRequest) Reset() { *m = QueryCalcJoinPoolNoSwapSharesRequest{} } -func (m *QueryCalcJoinPoolNoSwapSharesRequest) String() string { return proto.CompactTextString(m) } -func (*QueryCalcJoinPoolNoSwapSharesRequest) ProtoMessage() {} -func (*QueryCalcJoinPoolNoSwapSharesRequest) Descriptor() ([]byte, []int) { +func (m *QueryJoinPoolNoSwapRequest) Reset() { *m = QueryJoinPoolNoSwapRequest{} } +func (m *QueryJoinPoolNoSwapRequest) String() string { return proto.CompactTextString(m) } +func (*QueryJoinPoolNoSwapRequest) ProtoMessage() {} +func (*QueryJoinPoolNoSwapRequest) Descriptor() ([]byte, []int) { return fileDescriptor_d9a717df9ca609ef, []int{18} } -func (m *QueryCalcJoinPoolNoSwapSharesRequest) XXX_Unmarshal(b []byte) error { +func (m *QueryJoinPoolNoSwapRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *QueryCalcJoinPoolNoSwapSharesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *QueryJoinPoolNoSwapRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_QueryCalcJoinPoolNoSwapSharesRequest.Marshal(b, m, deterministic) + return xxx_messageInfo_QueryJoinPoolNoSwapRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -878,48 +878,42 @@ func (m *QueryCalcJoinPoolNoSwapSharesRequest) XXX_Marshal(b []byte, determinist return b[:n], nil } } -func (m *QueryCalcJoinPoolNoSwapSharesRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryCalcJoinPoolNoSwapSharesRequest.Merge(m, src) +func (m *QueryJoinPoolNoSwapRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryJoinPoolNoSwapRequest.Merge(m, src) } -func (m *QueryCalcJoinPoolNoSwapSharesRequest) XXX_Size() int { +func (m *QueryJoinPoolNoSwapRequest) XXX_Size() int { return m.Size() } -func (m *QueryCalcJoinPoolNoSwapSharesRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueryCalcJoinPoolNoSwapSharesRequest.DiscardUnknown(m) +func (m *QueryJoinPoolNoSwapRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryJoinPoolNoSwapRequest.DiscardUnknown(m) } -var xxx_messageInfo_QueryCalcJoinPoolNoSwapSharesRequest proto.InternalMessageInfo +var xxx_messageInfo_QueryJoinPoolNoSwapRequest proto.InternalMessageInfo -func (m *QueryCalcJoinPoolNoSwapSharesRequest) GetPoolId() uint64 { +func (m *QueryJoinPoolNoSwapRequest) GetPoolId() uint64 { if m != nil { return m.PoolId } return 0 } -func (m *QueryCalcJoinPoolNoSwapSharesRequest) GetTokensIn() github_com_cosmos_cosmos_sdk_types.Coins { - if m != nil { - return m.TokensIn - } - return nil -} - -type QueryCalcJoinPoolNoSwapSharesResponse struct { - NumShares github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,1,opt,name=num_shares,json=numShares,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"num_shares"` +type QueryJoinPoolNoSwapResponse struct { + TokensIn github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,1,rep,name=tokens_in,json=tokensIn,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"tokens_in" yaml:"tokens_in"` + SharesOut github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,2,opt,name=shares_out,json=sharesOut,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"shares_out"` } -func (m *QueryCalcJoinPoolNoSwapSharesResponse) Reset() { *m = QueryCalcJoinPoolNoSwapSharesResponse{} } -func (m *QueryCalcJoinPoolNoSwapSharesResponse) String() string { return proto.CompactTextString(m) } -func (*QueryCalcJoinPoolNoSwapSharesResponse) ProtoMessage() {} -func (*QueryCalcJoinPoolNoSwapSharesResponse) Descriptor() ([]byte, []int) { +func (m *QueryJoinPoolNoSwapResponse) Reset() { *m = QueryJoinPoolNoSwapResponse{} } +func (m *QueryJoinPoolNoSwapResponse) String() string { return proto.CompactTextString(m) } +func (*QueryJoinPoolNoSwapResponse) ProtoMessage() {} +func (*QueryJoinPoolNoSwapResponse) Descriptor() ([]byte, []int) { return fileDescriptor_d9a717df9ca609ef, []int{19} } -func (m *QueryCalcJoinPoolNoSwapSharesResponse) XXX_Unmarshal(b []byte) error { +func (m *QueryJoinPoolNoSwapResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *QueryCalcJoinPoolNoSwapSharesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *QueryJoinPoolNoSwapResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_QueryCalcJoinPoolNoSwapSharesResponse.Marshal(b, m, deterministic) + return xxx_messageInfo_QueryJoinPoolNoSwapResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -929,17 +923,24 @@ func (m *QueryCalcJoinPoolNoSwapSharesResponse) XXX_Marshal(b []byte, determinis return b[:n], nil } } -func (m *QueryCalcJoinPoolNoSwapSharesResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryCalcJoinPoolNoSwapSharesResponse.Merge(m, src) +func (m *QueryJoinPoolNoSwapResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryJoinPoolNoSwapResponse.Merge(m, src) } -func (m *QueryCalcJoinPoolNoSwapSharesResponse) XXX_Size() int { +func (m *QueryJoinPoolNoSwapResponse) XXX_Size() int { return m.Size() } -func (m *QueryCalcJoinPoolNoSwapSharesResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryCalcJoinPoolNoSwapSharesResponse.DiscardUnknown(m) +func (m *QueryJoinPoolNoSwapResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryJoinPoolNoSwapResponse.DiscardUnknown(m) } -var xxx_messageInfo_QueryCalcJoinPoolNoSwapSharesResponse proto.InternalMessageInfo +var xxx_messageInfo_QueryJoinPoolNoSwapResponse proto.InternalMessageInfo + +func (m *QueryJoinPoolNoSwapResponse) GetTokensIn() github_com_cosmos_cosmos_sdk_types.Coins { + if m != nil { + return m.TokensIn + } + return nil +} // QuerySpotPriceRequest defines the gRPC request structure for a SpotPrice // query. @@ -1361,8 +1362,8 @@ func init() { proto.RegisterType((*QueryTotalPoolLiquidityResponse)(nil), "osmosis.gamm.v1beta1.QueryTotalPoolLiquidityResponse") proto.RegisterType((*QueryTotalSharesRequest)(nil), "osmosis.gamm.v1beta1.QueryTotalSharesRequest") proto.RegisterType((*QueryTotalSharesResponse)(nil), "osmosis.gamm.v1beta1.QueryTotalSharesResponse") - proto.RegisterType((*QueryCalcJoinPoolNoSwapSharesRequest)(nil), "osmosis.gamm.v1beta1.QueryCalcJoinPoolNoSwapSharesRequest") - proto.RegisterType((*QueryCalcJoinPoolNoSwapSharesResponse)(nil), "osmosis.gamm.v1beta1.QueryCalcJoinPoolNoSwapSharesResponse") + proto.RegisterType((*QueryJoinPoolNoSwapRequest)(nil), "osmosis.gamm.v1beta1.QueryJoinPoolNoSwapRequest") + proto.RegisterType((*QueryJoinPoolNoSwapResponse)(nil), "osmosis.gamm.v1beta1.QueryJoinPoolNoSwapResponse") proto.RegisterType((*QuerySpotPriceRequest)(nil), "osmosis.gamm.v1beta1.QuerySpotPriceRequest") proto.RegisterType((*QuerySpotPriceResponse)(nil), "osmosis.gamm.v1beta1.QuerySpotPriceResponse") proto.RegisterType((*QuerySwapExactAmountInRequest)(nil), "osmosis.gamm.v1beta1.QuerySwapExactAmountInRequest") @@ -1376,112 +1377,113 @@ func init() { func init() { proto.RegisterFile("osmosis/gamm/v1beta1/query.proto", fileDescriptor_d9a717df9ca609ef) } var fileDescriptor_d9a717df9ca609ef = []byte{ - // 1670 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x58, 0x4b, 0x6f, 0x14, 0xc7, - 0x16, 0x76, 0x19, 0xdb, 0xd8, 0xe5, 0x8b, 0x1f, 0x85, 0x81, 0x61, 0x0c, 0x33, 0xdc, 0xba, 0x17, - 0x6c, 0xc0, 0xee, 0xc1, 0xc6, 0x48, 0x57, 0xbe, 0xe1, 0x61, 0x83, 0x0d, 0x63, 0x05, 0xec, 0x34, - 0x88, 0x28, 0xc9, 0x62, 0xd4, 0xb6, 0x3b, 0xe3, 0x86, 0x99, 0xae, 0xf6, 0x74, 0x35, 0xb6, 0x95, - 0xa0, 0x48, 0x28, 0xca, 0x2a, 0x8b, 0x48, 0x04, 0x16, 0x11, 0x52, 0xb2, 0xc8, 0x22, 0xca, 0x3a, - 0x52, 0x7e, 0x40, 0x14, 0x09, 0x45, 0x8a, 0x04, 0xca, 0x26, 0xca, 0x62, 0x12, 0x41, 0x22, 0x65, - 0x3d, 0x3f, 0x20, 0x89, 0xaa, 0xea, 0x74, 0x4f, 0xcf, 0xfb, 0x41, 0x90, 0xb2, 0xc2, 0x53, 0xe7, - 0x51, 0xdf, 0xf9, 0xce, 0xe9, 0x53, 0xe7, 0x80, 0x8f, 0x30, 0x37, 0xcb, 0x5c, 0xcb, 0x4d, 0xa4, - 0x8d, 0x6c, 0x36, 0x71, 0x67, 0x6a, 0xd5, 0xe4, 0xc6, 0x54, 0x62, 0xd3, 0x33, 0x73, 0x3b, 0x9a, - 0x93, 0x63, 0x9c, 0x91, 0x11, 0xd0, 0xd0, 0x84, 0x86, 0x06, 0x1a, 0xd1, 0x91, 0x34, 0x4b, 0x33, - 0xa9, 0x90, 0x10, 0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4, 0x3a, 0x40, 0x35, 0x46, 0x04, 0x09, 0x24, 0x1f, 0x20, - 0xdc, 0x25, 0x22, 0x24, 0xc7, 0x1a, 0x64, 0xc3, 0x87, 0x34, 0xd6, 0x50, 0xaf, 0x39, 0x20, 0x92, - 0xa5, 0xc4, 0x3b, 0xd0, 0x30, 0xee, 0x92, 0x87, 0x08, 0xf7, 0xfa, 0x2b, 0x64, 0xdd, 0xf4, 0x95, - 0x2d, 0xab, 0x75, 0xd3, 0x57, 0xbe, 0x93, 0xd2, 0x29, 0x09, 0xea, 0x24, 0x39, 0x5e, 0x1b, 0x94, - 0x5c, 0x4a, 0x43, 0xc0, 0x1e, 0x20, 0x1c, 0xa9, 0x35, 0x85, 0x90, 0xd9, 0x3a, 0x97, 0x37, 0x98, - 0xc6, 0xa2, 0xff, 0x6f, 0xcb, 0x16, 0x02, 0xe9, 0x20, 0xdf, 0x20, 0x4c, 0x2a, 0x97, 0x4d, 0x32, - 0xd3, 0xa4, 0xd7, 0x52, 0x2c, 0x67, 0x5a, 0xb4, 0x02, 0x14, 0x17, 0x24, 0x9d, 0xb3, 0xe4, 0x7f, - 0x4d, 0xe5, 0x38, 0x71, 0x8b, 0x59, 0x76, 0xca, 0xdd, 0x32, 0x9c, 0x94, 0x29, 0xba, 0x6f, 0xca, - 0xb2, 0xc9, 0x6f, 0x08, 0x8f, 0xd6, 0x59, 0xc8, 0xc8, 0xd9, 0x06, 0xc0, 0xea, 0x6f, 0x99, 0xd1, - 0x73, 0xed, 0x9a, 0x43, 0x80, 0x97, 0x65, 0x80, 0x73, 0xe4, 0x7c, 0x73, 0x01, 0x9a, 0xdb, 0x16, - 0x57, 0x01, 0xaa, 0x15, 0x56, 0xb5, 0x7c, 0x11, 0xe7, 0xa7, 0x08, 0xe3, 0xe2, 0x66, 0x46, 0x26, - 0x1a, 0x14, 0x6d, 0xc9, 0x1e, 0x18, 0x9d, 0x6c, 0x52, 0x1b, 0x40, 0xcf, 0x48, 0xd0, 0x1a, 0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0xc7, 0x8f, 0xcf, 0x63, 0x1d, 0x6f, 0x9e, 0x0a, 0xcd, 0x73, - 0x70, 0xc7, 0x64, 0xc6, 0x58, 0x75, 0x83, 0x0b, 0xef, 0x4c, 0x4d, 0x27, 0xb6, 0xd5, 0xb5, 0x72, - 0xba, 0x5b, 0xed, 0x91, 0xff, 0x1d, 0x74, 0xfa, 0xaf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x37, 0x02, - 0x14, 0x1f, 0x07, 0x19, 0x00, 0x00, + // 1689 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x58, 0x4b, 0x6f, 0x1c, 0xc5, + 0x16, 0x76, 0x3b, 0xb6, 0xe3, 0x29, 0xdf, 0xf8, 0x51, 0x71, 0x12, 0x67, 0x9c, 0xcc, 0xe4, 0xd6, + 0xd5, 0x8d, 0x9d, 0xc4, 0xee, 0x89, 0x1d, 0x47, 0xba, 0xb2, 0x6e, 0x1e, 0x76, 0x62, 0x27, 0x63, + 0xdd, 0xc4, 0xbe, 0xed, 0x28, 0x88, 0xb0, 0x18, 0xb5, 0xed, 0x66, 0xdc, 0xc9, 0x4c, 0x57, 0x7b, + 0xba, 0x3a, 0xb6, 0x81, 0x08, 0x29, 0x42, 0xac, 0x58, 0x20, 0x05, 0xb2, 0x40, 0x91, 0x60, 0x01, + 0x12, 0x62, 0x8d, 0xc4, 0x0f, 0x40, 0x48, 0x11, 0x12, 0x52, 0x10, 0x1b, 0xc4, 0x62, 0x40, 0x0e, + 0x48, 0x88, 0xa5, 0xff, 0x00, 0xa8, 0xaa, 0x4e, 0x3f, 0x66, 0xdc, 0xd3, 0xf3, 0x80, 0x48, 0xac, + 0x3c, 0x5d, 0xe7, 0x51, 0xdf, 0xf9, 0xce, 0xa9, 0x53, 0x75, 0x8c, 0x4e, 0x50, 0xa7, 0x48, 0x1d, + 0xd3, 0xc9, 0xe4, 0xf5, 0x62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 0x9e, 0x4d, 0x7c, 0xfd, + 0xf9, 0x78, 0x27, 0xb7, 0xca, 0x6a, 0x42, 0x99, 0xbc, 0x12, 0xf2, 0xe4, 0x78, 0x58, 0xe6, 0x11, + 0x0a, 0x78, 0x18, 0x6a, 0x17, 0xfe, 0x4e, 0xaa, 0x10, 0x02, 0x27, 0x4d, 0x95, 0x89, 0x03, 0xd2, + 0xd4, 0x25, 0x3d, 0x6f, 0x80, 0xad, 0x16, 0xb2, 0x24, 0xef, 0x29, 0x08, 0x87, 0xbd, 0x03, 0xd0, + 0xf3, 0xa8, 0x93, 0xef, 0xed, 0x0c, 0x29, 0x27, 0xf6, 0x35, 0x82, 0x54, 0x6a, 0xe3, 0x6b, 0x11, + 0xa8, 0x46, 0xea, 0xa2, 0x92, 0x7b, 0x56, 0xc0, 0x3a, 0x8c, 0x06, 0x05, 0xaa, 0x9b, 0x6e, 0x31, + 0x1c, 0x36, 0x59, 0x40, 0x87, 0xaa, 0xd6, 0x01, 0xf0, 0x04, 0x4a, 0x58, 0x6e, 0x31, 0xe7, 0x81, + 0xe6, 0xd9, 0x19, 0xdc, 0x2d, 0xa7, 0xfb, 0x65, 0x76, 0x7c, 0x11, 0xd1, 0xba, 0x2d, 0x30, 0x25, + 0x57, 0x60, 0x0f, 0xfe, 0x75, 0x6b, 0xdb, 0x36, 0x5a, 0x4a, 0xb3, 0x07, 0x28, 0x70, 0x12, 0x00, + 0x12, 0xca, 0x6c, 0xdb, 0x36, 0x84, 0x9f, 0x44, 0x18, 0x90, 0x2f, 0x22, 0x5a, 0xb7, 0x0d, 0xa6, + 0xe4, 0x0b, 0x05, 0xa5, 0x84, 0xb3, 0x2b, 0x7a, 0x61, 0x75, 0x81, 0x9a, 0x16, 0x77, 0xba, 0xbc, + 0xae, 0x97, 0x0c, 0xa7, 0x15, 0x6c, 0x78, 0x1d, 0x25, 0x18, 0xbd, 0x67, 0x58, 0x4e, 0xce, 0xe4, + 0xc9, 0xe0, 0x89, 0x3c, 0x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, 0x43, 0x47, 0xf6, 0xb8, + 0x81, 0x68, 0xc6, 0x50, 0x97, 0x2d, 0x56, 0xe2, 0xda, 0xae, 0x06, 0x3a, 0xe4, 0x06, 0x9c, 0xc1, + 0x5b, 0x94, 0xe9, 0x05, 0xee, 0xed, 0x7f, 0xe6, 0x86, 0x6b, 0xae, 0x99, 0x6c, 0xbb, 0x25, 0x5c, + 0x1f, 0x29, 0x70, 0x32, 0xa2, 0xfc, 0x01, 0xc0, 0x07, 0x28, 0x51, 0xf0, 0x16, 0xeb, 0xb3, 0x7d, + 0x95, 0xb3, 0x1d, 0x74, 0x12, 0xdf, 0x92, 0x34, 0x97, 0x81, 0xc0, 0x6e, 0x1e, 0xa8, 0x13, 0x08, + 0x5b, 0x6f, 0x37, 0xc4, 0x45, 0x43, 0x7b, 0xfd, 0x40, 0x88, 0x2f, 0xa3, 0x7f, 0x30, 0xbe, 0x9c, + 0x13, 0x55, 0xe9, 0x65, 0x22, 0x26, 0xca, 0x61, 0x88, 0xf2, 0xa0, 0xdc, 0x2c, 0x6c, 0x4c, 0xb4, + 0x1e, 0x16, 0x6c, 0x41, 0x3e, 0x51, 0x50, 0x52, 0xec, 0xeb, 0xf5, 0x9d, 0x9b, 0x74, 0x79, 0x53, + 0xb7, 0x5b, 0xea, 0x98, 0x77, 0xd0, 0x80, 0xdc, 0x23, 0xdc, 0xa4, 0x5a, 0x3b, 0x7f, 0xf2, 0x18, + 0x3b, 0x7e, 0x2b, 0x22, 0xbf, 0x29, 0x68, 0x38, 0x12, 0x27, 0x50, 0xf4, 0x46, 0xb8, 0x5b, 0x37, + 0x5b, 0x05, 0xbe, 0x25, 0x69, 0xad, 0x83, 0xe3, 0x1b, 0x08, 0x05, 0x91, 0xb7, 0x18, 0x72, 0xc2, + 0x0f, 0x99, 0xfc, 0xaa, 0xc0, 0xbd, 0xb8, 0x6c, 0x53, 0xb6, 0x54, 0x32, 0x57, 0x5b, 0xba, 0x5d, + 0xf1, 0x1c, 0xea, 0xe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 0x9b, 0xc0, + 0x16, 0x3c, 0x8e, 0x63, 0x2b, 0xbd, 0xf6, 0x5b, 0x92, 0xcc, 0x8b, 0x90, 0x2e, 0xe3, 0x8b, 0x7f, + 0x22, 0x24, 0xea, 0xb2, 0xd9, 0x85, 0xa7, 0x3b, 0x29, 0xe5, 0xd9, 0x4e, 0x4a, 0xf9, 0x69, 0x27, + 0xa5, 0xbc, 0xfb, 0x3c, 0xd5, 0xf6, 0xec, 0x79, 0xaa, 0xed, 0xfb, 0xe7, 0xa9, 0xb6, 0x3b, 0x67, + 0x43, 0x6f, 0x36, 0xd8, 0x63, 0xbc, 0xa0, 0xaf, 0x38, 0xfe, 0x86, 0xf7, 0x27, 0x26, 0x33, 0x5b, + 0x72, 0x5b, 0xf1, 0x82, 0x5b, 0xe9, 0x12, 0xff, 0x3b, 0x3a, 0xf7, 0x47, 0x00, 0x00, 0x00, 0xff, + 0xff, 0xff, 0x3e, 0xc5, 0x35, 0x34, 0x19, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1505,7 +1507,7 @@ type QueryClient interface { // Returns "Balancer" as a string literal when the pool is a balancer pool. // Errors if the pool is failed to be type caseted. PoolType(ctx context.Context, in *QueryPoolTypeRequest, opts ...grpc.CallOption) (*QueryPoolTypeResponse, error) - CalcJoinPoolNoSwapShares(ctx context.Context, in *QueryCalcJoinPoolNoSwapSharesRequest, opts ...grpc.CallOption) (*QueryCalcJoinPoolNoSwapSharesResponse, error) + SimJoinPoolNoSwap(ctx context.Context, in *QueryJoinPoolNoSwapRequest, opts ...grpc.CallOption) (*QueryJoinPoolNoSwapResponse, error) CalcJoinPoolShares(ctx context.Context, in *QueryCalcJoinPoolSharesRequest, opts ...grpc.CallOption) (*QueryCalcJoinPoolSharesResponse, error) CalcExitPoolCoinsFromShares(ctx context.Context, in *QueryCalcExitPoolCoinsFromSharesRequest, opts ...grpc.CallOption) (*QueryCalcExitPoolCoinsFromSharesResponse, error) PoolParams(ctx context.Context, in *QueryPoolParamsRequest, opts ...grpc.CallOption) (*QueryPoolParamsResponse, error) @@ -1572,9 +1574,9 @@ func (c *queryClient) PoolType(ctx context.Context, in *QueryPoolTypeRequest, op return out, nil } -func (c *queryClient) CalcJoinPoolNoSwapShares(ctx context.Context, in *QueryCalcJoinPoolNoSwapSharesRequest, opts ...grpc.CallOption) (*QueryCalcJoinPoolNoSwapSharesResponse, error) { - out := new(QueryCalcJoinPoolNoSwapSharesResponse) - err := c.cc.Invoke(ctx, "/osmosis.gamm.v1beta1.Query/CalcJoinPoolNoSwapShares", in, out, opts...) +func (c *queryClient) SimJoinPoolNoSwap(ctx context.Context, in *QueryJoinPoolNoSwapRequest, opts ...grpc.CallOption) (*QueryJoinPoolNoSwapResponse, error) { + out := new(QueryJoinPoolNoSwapResponse) + err := c.cc.Invoke(ctx, "/osmosis.gamm.v1beta1.Query/SimJoinPoolNoSwap", in, out, opts...) if err != nil { return nil, err } @@ -1664,7 +1666,7 @@ type QueryServer interface { // Returns "Balancer" as a string literal when the pool is a balancer pool. // Errors if the pool is failed to be type caseted. PoolType(context.Context, *QueryPoolTypeRequest) (*QueryPoolTypeResponse, error) - CalcJoinPoolNoSwapShares(context.Context, *QueryCalcJoinPoolNoSwapSharesRequest) (*QueryCalcJoinPoolNoSwapSharesResponse, error) + SimJoinPoolNoSwap(context.Context, *QueryJoinPoolNoSwapRequest) (*QueryJoinPoolNoSwapResponse, error) CalcJoinPoolShares(context.Context, *QueryCalcJoinPoolSharesRequest) (*QueryCalcJoinPoolSharesResponse, error) CalcExitPoolCoinsFromShares(context.Context, *QueryCalcExitPoolCoinsFromSharesRequest) (*QueryCalcExitPoolCoinsFromSharesResponse, error) PoolParams(context.Context, *QueryPoolParamsRequest) (*QueryPoolParamsResponse, error) @@ -1697,8 +1699,8 @@ func (*UnimplementedQueryServer) Pool(ctx context.Context, req *QueryPoolRequest func (*UnimplementedQueryServer) PoolType(ctx context.Context, req *QueryPoolTypeRequest) (*QueryPoolTypeResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method PoolType not implemented") } -func (*UnimplementedQueryServer) CalcJoinPoolNoSwapShares(ctx context.Context, req *QueryCalcJoinPoolNoSwapSharesRequest) (*QueryCalcJoinPoolNoSwapSharesResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method CalcJoinPoolNoSwapShares not implemented") +func (*UnimplementedQueryServer) SimJoinPoolNoSwap(ctx context.Context, req *QueryJoinPoolNoSwapRequest) (*QueryJoinPoolNoSwapResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SimJoinPoolNoSwap not implemented") } func (*UnimplementedQueryServer) CalcJoinPoolShares(ctx context.Context, req *QueryCalcJoinPoolSharesRequest) (*QueryCalcJoinPoolSharesResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method CalcJoinPoolShares not implemented") @@ -1819,20 +1821,20 @@ func _Query_PoolType_Handler(srv interface{}, ctx context.Context, dec func(inte return interceptor(ctx, in, info, handler) } -func _Query_CalcJoinPoolNoSwapShares_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryCalcJoinPoolNoSwapSharesRequest) +func _Query_SimJoinPoolNoSwap_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryJoinPoolNoSwapRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(QueryServer).CalcJoinPoolNoSwapShares(ctx, in) + return srv.(QueryServer).SimJoinPoolNoSwap(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/osmosis.gamm.v1beta1.Query/CalcJoinPoolNoSwapShares", + FullMethod: "/osmosis.gamm.v1beta1.Query/SimJoinPoolNoSwap", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).CalcJoinPoolNoSwapShares(ctx, req.(*QueryCalcJoinPoolNoSwapSharesRequest)) + return srv.(QueryServer).SimJoinPoolNoSwap(ctx, req.(*QueryJoinPoolNoSwapRequest)) } return interceptor(ctx, in, info, handler) } @@ -2006,8 +2008,8 @@ var _Query_serviceDesc = grpc.ServiceDesc{ Handler: _Query_PoolType_Handler, }, { - MethodName: "CalcJoinPoolNoSwapShares", - Handler: _Query_CalcJoinPoolNoSwapShares_Handler, + MethodName: "SimJoinPoolNoSwap", + Handler: _Query_SimJoinPoolNoSwap_Handler, }, { MethodName: "CalcJoinPoolShares", @@ -2655,7 +2657,7 @@ func (m *QueryTotalSharesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error return len(dAtA) - i, nil } -func (m *QueryCalcJoinPoolNoSwapSharesRequest) Marshal() (dAtA []byte, err error) { +func (m *QueryJoinPoolNoSwapRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -2665,30 +2667,26 @@ func (m *QueryCalcJoinPoolNoSwapSharesRequest) Marshal() (dAtA []byte, err error return dAtA[:n], nil } -func (m *QueryCalcJoinPoolNoSwapSharesRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryJoinPoolNoSwapRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryCalcJoinPoolNoSwapSharesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryJoinPoolNoSwapRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if len(m.TokensIn) > 0 { - for iNdEx := len(m.TokensIn) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.TokensIn[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 + { + size := m.SharesOutAmount.Size() + i -= size + if _, err := m.SharesOutAmount.MarshalTo(dAtA[i:]); err != nil { + return 0, err } + i = encodeVarintQuery(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0x12 if m.PoolId != 0 { i = encodeVarintQuery(dAtA, i, uint64(m.PoolId)) i-- @@ -2697,7 +2695,7 @@ func (m *QueryCalcJoinPoolNoSwapSharesRequest) MarshalToSizedBuffer(dAtA []byte) return len(dAtA) - i, nil } -func (m *QueryCalcJoinPoolNoSwapSharesResponse) Marshal() (dAtA []byte, err error) { +func (m *QueryJoinPoolNoSwapResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -2707,26 +2705,40 @@ func (m *QueryCalcJoinPoolNoSwapSharesResponse) Marshal() (dAtA []byte, err erro return dAtA[:n], nil } -func (m *QueryCalcJoinPoolNoSwapSharesResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryJoinPoolNoSwapResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryCalcJoinPoolNoSwapSharesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryJoinPoolNoSwapResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l { - size := m.NumShares.Size() + size := m.SharesOut.Size() i -= size - if _, err := m.NumShares.MarshalTo(dAtA[i:]); err != nil { + if _, err := m.SharesOut.MarshalTo(dAtA[i:]); err != nil { return 0, err } i = encodeVarintQuery(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0xa + dAtA[i] = 0x12 + if len(m.TokensIn) > 0 { + for iNdEx := len(m.TokensIn) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.TokensIn[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 } @@ -3293,7 +3305,7 @@ func (m *QueryTotalSharesResponse) Size() (n int) { return n } -func (m *QueryCalcJoinPoolNoSwapSharesRequest) Size() (n int) { +func (m *QueryJoinPoolNoSwapRequest) Size() (n int) { if m == nil { return 0 } @@ -3302,22 +3314,24 @@ func (m *QueryCalcJoinPoolNoSwapSharesRequest) Size() (n int) { if m.PoolId != 0 { n += 1 + sovQuery(uint64(m.PoolId)) } - if len(m.TokensIn) > 0 { - for _, e := range m.TokensIn { - l = e.Size() - n += 1 + l + sovQuery(uint64(l)) - } - } + l = m.SharesOutAmount.Size() + n += 1 + l + sovQuery(uint64(l)) return n } -func (m *QueryCalcJoinPoolNoSwapSharesResponse) Size() (n int) { +func (m *QueryJoinPoolNoSwapResponse) Size() (n int) { if m == nil { return 0 } var l int _ = l - l = m.NumShares.Size() + if len(m.TokensIn) > 0 { + for _, e := range m.TokensIn { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + l = m.SharesOut.Size() n += 1 + l + sovQuery(uint64(l)) return n } @@ -4958,7 +4972,7 @@ func (m *QueryTotalSharesResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryCalcJoinPoolNoSwapSharesRequest) Unmarshal(dAtA []byte) error { +func (m *QueryJoinPoolNoSwapRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4981,10 +4995,10 @@ func (m *QueryCalcJoinPoolNoSwapSharesRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryCalcJoinPoolNoSwapSharesRequest: wiretype end group for non-group") + return fmt.Errorf("proto: QueryJoinPoolNoSwapRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryCalcJoinPoolNoSwapSharesRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryJoinPoolNoSwapRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -5008,9 +5022,9 @@ func (m *QueryCalcJoinPoolNoSwapSharesRequest) Unmarshal(dAtA []byte) error { } case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TokensIn", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field SharesOutAmount", wireType) } - var msglen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -5020,23 +5034,23 @@ func (m *QueryCalcJoinPoolNoSwapSharesRequest) 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 } - m.TokensIn = append(m.TokensIn, types1.Coin{}) - if err := m.TokensIn[len(m.TokensIn)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.SharesOutAmount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -5061,7 +5075,7 @@ func (m *QueryCalcJoinPoolNoSwapSharesRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryCalcJoinPoolNoSwapSharesResponse) Unmarshal(dAtA []byte) error { +func (m *QueryJoinPoolNoSwapResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -5084,15 +5098,49 @@ func (m *QueryCalcJoinPoolNoSwapSharesResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryCalcJoinPoolNoSwapSharesResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QueryJoinPoolNoSwapResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryCalcJoinPoolNoSwapSharesResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryJoinPoolNoSwapResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NumShares", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field TokensIn", 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.TokensIn = append(m.TokensIn, types1.Coin{}) + if err := m.TokensIn[len(m.TokensIn)-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 SharesOut", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -5120,7 +5168,7 @@ func (m *QueryCalcJoinPoolNoSwapSharesResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.NumShares.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.SharesOut.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex From d256d6a1880f2e24f6883acae7457c81db04e48f Mon Sep 17 00:00:00 2001 From: Ruslan Akhtariev Date: Fri, 4 Nov 2022 13:51:42 +0700 Subject: [PATCH 42/59] docs --- proto/osmosis/gamm/v1beta1/query.proto | 2 ++ x/gamm/keeper/grpc_query.go | 2 +- x/gamm/pool-models/balancer/pool_test.go | 3 --- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/proto/osmosis/gamm/v1beta1/query.proto b/proto/osmosis/gamm/v1beta1/query.proto index 8130395ed87..9c674addb4d 100644 --- a/proto/osmosis/gamm/v1beta1/query.proto +++ b/proto/osmosis/gamm/v1beta1/query.proto @@ -38,6 +38,8 @@ service Query { option (google.api.http).get = "/osmosis/gamm/v1beta1/pool_type/{pool_id}"; } + // Simulates joining pool without a swap. Returns the amount of shares you'd get + // and tokens needed to provide rpc SimJoinPoolNoSwap(QueryJoinPoolNoSwapRequest) returns (QueryJoinPoolNoSwapResponse) {} diff --git a/x/gamm/keeper/grpc_query.go b/x/gamm/keeper/grpc_query.go index 9db0ace39b9..94f2e1de3ed 100644 --- a/x/gamm/keeper/grpc_query.go +++ b/x/gamm/keeper/grpc_query.go @@ -193,7 +193,7 @@ func (q Querier) CalcExitPoolCoinsFromShares(ctx context.Context, req *types.Que return &types.QueryCalcExitPoolCoinsFromSharesResponse{TokensOut: exitCoins}, nil } -// CalcJoinPoolNoSwapShares returns the amount of shares you get by providing all possible tokens without a swap +// SimJoinPoolNoSwap returns the amount of shares you'd get if joined a pool without a swap and tokens which need to be provided func (q Querier) SimJoinPoolNoSwap(ctx context.Context, req *types.QueryJoinPoolNoSwapRequest) (*types.QueryJoinPoolNoSwapResponse, error) { if req == nil { return nil, status.Error(codes.InvalidArgument, "empty request") diff --git a/x/gamm/pool-models/balancer/pool_test.go b/x/gamm/pool-models/balancer/pool_test.go index a63caeade7f..63066309006 100644 --- a/x/gamm/pool-models/balancer/pool_test.go +++ b/x/gamm/pool-models/balancer/pool_test.go @@ -1350,9 +1350,6 @@ func TestCalcJoinPoolNoSwapShares(t *testing.T) { FuturePoolGovernor: defaultFutureGovernor, TotalShares: sdk.NewCoin(types.GetPoolShareDenom(defaultPoolId), types.InitPoolSharesSupply), } - fmt.Println(balancerPool.TotalShares) - fmt.Println(types.InitPoolSharesSupply) - fmt.Println("10000000000000000000") numShare, tokensJoined, err := balancerPool.CalcJoinPoolNoSwapShares(ctx, test.tokensIn, balancerPool.GetSwapFee(ctx)) From 21507ac7e1a34b8ef51ff4694313bde48ff957f0 Mon Sep 17 00:00:00 2001 From: Ruslan Akhtariev Date: Sat, 5 Nov 2022 11:58:24 +0700 Subject: [PATCH 43/59] JoinPoolNoSwap simulation --- proto/osmosis/gamm/v1beta1/query.proto | 2 +- x/gamm/keeper/grpc_query.go | 2 +- x/gamm/keeper/grpc_query_test.go | 11 +- x/gamm/keeper/pool_service.go | 2 +- x/gamm/types/query.pb.go | 242 +++++++++++++------------ 5 files changed, 128 insertions(+), 131 deletions(-) diff --git a/proto/osmosis/gamm/v1beta1/query.proto b/proto/osmosis/gamm/v1beta1/query.proto index 9c674addb4d..07b404f4c21 100644 --- a/proto/osmosis/gamm/v1beta1/query.proto +++ b/proto/osmosis/gamm/v1beta1/query.proto @@ -40,7 +40,7 @@ service Query { // Simulates joining pool without a swap. Returns the amount of shares you'd get // and tokens needed to provide - rpc SimJoinPoolNoSwap(QueryJoinPoolNoSwapRequest) + rpc CalcJoinPoolNoSwap(QueryJoinPoolNoSwapRequest) returns (QueryJoinPoolNoSwapResponse) {} rpc CalcJoinPoolShares(QueryCalcJoinPoolSharesRequest) diff --git a/x/gamm/keeper/grpc_query.go b/x/gamm/keeper/grpc_query.go index 94f2e1de3ed..48f08cc89b1 100644 --- a/x/gamm/keeper/grpc_query.go +++ b/x/gamm/keeper/grpc_query.go @@ -194,7 +194,7 @@ func (q Querier) CalcExitPoolCoinsFromShares(ctx context.Context, req *types.Que } // SimJoinPoolNoSwap returns the amount of shares you'd get if joined a pool without a swap and tokens which need to be provided -func (q Querier) SimJoinPoolNoSwap(ctx context.Context, req *types.QueryJoinPoolNoSwapRequest) (*types.QueryJoinPoolNoSwapResponse, error) { +func (q Querier) CalcJoinPoolNoSwap(ctx context.Context, req *types.QueryJoinPoolNoSwapRequest) (*types.QueryJoinPoolNoSwapResponse, error) { if req == nil { return nil, status.Error(codes.InvalidArgument, "empty request") } diff --git a/x/gamm/keeper/grpc_query_test.go b/x/gamm/keeper/grpc_query_test.go index 956b0fc3081..10e0cfb531b 100644 --- a/x/gamm/keeper/grpc_query_test.go +++ b/x/gamm/keeper/grpc_query_test.go @@ -87,7 +87,7 @@ func (suite *KeeperTestSuite) TestCalcExitPoolCoinsFromShares() { } } -func (suite *KeeperTestSuite) TestSimJoinPoolNoSwap() { +func (suite *KeeperTestSuite) TestCalcJoinPoolNoSwap() { queryClient := suite.queryClient poolId := suite.PrepareBalancerPool() ctx := suite.Ctx @@ -105,13 +105,6 @@ func (suite *KeeperTestSuite) TestSimJoinPoolNoSwap() { expectingErr: false, }, - { - name: "too much shares required", - sharesOutAmount: types.InitPoolSharesSupply.Mul(sdk.NewInt(2)), - poolId: poolId, - - expectingErr: true, - }, { name: "invalid pool id", sharesOutAmount: types.OneShare.MulRaw(50), @@ -143,7 +136,7 @@ func (suite *KeeperTestSuite) TestSimJoinPoolNoSwap() { for _, tc := range testCases { suite.Run(tc.name, func() { - out, err := queryClient.SimJoinPoolNoSwap(gocontext.Background(), &types.QueryJoinPoolNoSwapRequest{ + out, err := queryClient.CalcJoinPoolNoSwap(gocontext.Background(), &types.QueryJoinPoolNoSwapRequest{ PoolId: tc.poolId, SharesOutAmount: tc.sharesOutAmount, }) diff --git a/x/gamm/keeper/pool_service.go b/x/gamm/keeper/pool_service.go index 69872bb2f0c..b464dc952c6 100644 --- a/x/gamm/keeper/pool_service.go +++ b/x/gamm/keeper/pool_service.go @@ -259,7 +259,7 @@ func getMaximalNoSwapLPAmount(ctx sdk.Context, pool types.PoolI, shareOutAmount // shareRatio is the desired number of shares, divided by the total number of // shares currently in the pool. It is intended to be used in scenarios where you want shareRatio := shareOutAmount.ToDec().QuoInt(totalSharesAmount) - if shareRatio.LTE(sdk.ZeroDec()) || shareRatio.GT(sdk.OneDec()) { + if shareRatio.LTE(sdk.ZeroDec()) { return sdk.Coins{}, sdkerrors.Wrapf(types.ErrInvalidMathApprox, "share ratio is zero or negative") } diff --git a/x/gamm/types/query.pb.go b/x/gamm/types/query.pb.go index 04fc1479c39..4afa44ea021 100644 --- a/x/gamm/types/query.pb.go +++ b/x/gamm/types/query.pb.go @@ -1377,113 +1377,113 @@ func init() { func init() { proto.RegisterFile("osmosis/gamm/v1beta1/query.proto", fileDescriptor_d9a717df9ca609ef) } var fileDescriptor_d9a717df9ca609ef = []byte{ - // 1689 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x58, 0x4b, 0x6f, 0x1c, 0xc5, - 0x16, 0x76, 0x3b, 0xb6, 0xe3, 0x29, 0xdf, 0xf8, 0x51, 0x71, 0x12, 0x67, 0x9c, 0xcc, 0xe4, 0xd6, - 0xd5, 0x8d, 0x9d, 0xc4, 0xee, 0x89, 0x1d, 0x47, 0xba, 0xb2, 0x6e, 0x1e, 0x76, 0x62, 0x27, 0x63, - 0xdd, 0xc4, 0xbe, 0xed, 0x28, 0x88, 0xb0, 0x18, 0xb5, 0xed, 0x66, 0xdc, 0xc9, 0x4c, 0x57, 0x7b, - 0xba, 0x3a, 0xb6, 0x81, 0x08, 0x29, 0x42, 0xac, 0x58, 0x20, 0x05, 0xb2, 0x40, 0x91, 0x60, 0x01, - 0x12, 0x62, 0x8d, 0xc4, 0x0f, 0x40, 0x48, 0x11, 0x12, 0x52, 0x10, 0x1b, 0xc4, 0x62, 0x40, 0x0e, - 0x48, 0x88, 0xa5, 0xff, 0x00, 0xa8, 0xaa, 0x4e, 0x3f, 0x66, 0xdc, 0xd3, 0xf3, 0x80, 0x48, 0xac, - 0x3c, 0x5d, 0xe7, 0x51, 0xdf, 0xf9, 0xce, 0xa9, 0x53, 0x75, 0x8c, 0x4e, 0x50, 0xa7, 0x48, 0x1d, - 0xd3, 0xc9, 0xe4, 0xf5, 0x62, 0x31, 0x73, 0x7f, 0x62, 0xc5, 0x60, 0xfa, 0x44, 0x66, 0xc3, 0x35, - 0x4a, 0xdb, 0xaa, 0x5d, 0xa2, 0x8c, 0xe2, 0x41, 0xd0, 0x50, 0xb9, 0x86, 0x0a, 0x1a, 0xc9, 0xc1, - 0x3c, 0xcd, 0x53, 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 0x4d, 0x95, 0x89, 0x03, 0xd2, - 0xd4, 0x25, 0x3d, 0x6f, 0x80, 0xad, 0x16, 0xb2, 0x24, 0xef, 0x29, 0x08, 0x87, 0xbd, 0x03, 0xd0, - 0xf3, 0xa8, 0x93, 0xef, 0xed, 0x0c, 0x29, 0x27, 0xf6, 0x35, 0x82, 0x54, 0x6a, 0xe3, 0x6b, 0x11, - 0xa8, 0x46, 0xea, 0xa2, 0x92, 0x7b, 0x56, 0xc0, 0x3a, 0x8c, 0x06, 0x05, 0xaa, 0x9b, 0x6e, 0x31, - 0x1c, 0x36, 0x59, 0x40, 0x87, 0xaa, 0xd6, 0x01, 0xf0, 0x04, 0x4a, 0x58, 0x6e, 0x31, 0xe7, 0x81, - 0xe6, 0xd9, 0x19, 0xdc, 0x2d, 0xa7, 0xfb, 0x65, 0x76, 0x7c, 0x11, 0xd1, 0xba, 0x2d, 0x30, 0x25, - 0x57, 0x60, 0x0f, 0xfe, 0x75, 0x6b, 0xdb, 0x36, 0x5a, 0x4a, 0xb3, 0x07, 0x28, 0x70, 0x12, 0x00, - 0x12, 0xca, 0x6c, 0xdb, 0x36, 0x84, 0x9f, 0x44, 0x18, 0x90, 0x2f, 0x22, 0x5a, 0xb7, 0x0d, 0xa6, - 0xe4, 0x0b, 0x05, 0xa5, 0x84, 0xb3, 0x2b, 0x7a, 0x61, 0x75, 0x81, 0x9a, 0x16, 0x77, 0xba, 0xbc, - 0xae, 0x97, 0x0c, 0xa7, 0x15, 0x6c, 0x78, 0x1d, 0x25, 0x18, 0xbd, 0x67, 0x58, 0x4e, 0xce, 0xe4, - 0xc9, 0xe0, 0x89, 0x3c, 0x5a, 0x91, 0x0c, 0x2f, 0x0d, 0x57, 0xa8, 0x69, 0xcd, 0x9e, 0x7d, 0x5a, - 0x4e, 0xb7, 0x7d, 0xf6, 0x63, 0x7a, 0x34, 0x6f, 0xb2, 0x75, 0x77, 0x45, 0x5d, 0xa5, 0x45, 0x38, - 0x12, 0xf0, 0x67, 0xdc, 0x59, 0xbb, 0x97, 0xe1, 0x98, 0x1d, 0x61, 0xe0, 0x68, 0xdd, 0xd2, 0x7b, - 0xd6, 0x22, 0x0f, 0xdb, 0x51, 0xba, 0x26, 0x72, 0x20, 0xc4, 0x41, 0xfd, 0x0e, 0x5f, 0xc9, 0x51, - 0x97, 0xe5, 0xf4, 0x22, 0x75, 0x2d, 0x06, 0xbc, 0x64, 0xf9, 0xce, 0x3f, 0x94, 0xd3, 0x27, 0x1b, - 0xd8, 0x39, 0x6b, 0xb1, 0xdd, 0x72, 0xfa, 0x88, 0x8c, 0xb8, 0xda, 0x1f, 0xd1, 0x7a, 0xc5, 0xd2, - 0xa2, 0xcb, 0x66, 0xc4, 0x02, 0xbe, 0x8b, 0x10, 0x50, 0x40, 0x5d, 0xf6, 0x22, 0x38, 0x00, 0x86, - 0x17, 0x5d, 0x46, 0x3e, 0x50, 0xd0, 0x88, 0x4f, 0xc2, 0xdc, 0x96, 0xc9, 0x38, 0x09, 0x42, 0x6b, - 0xbe, 0x44, 0x8b, 0x95, 0x79, 0x3c, 0x52, 0x95, 0x47, 0x3f, 0x67, 0xb7, 0x51, 0x9f, 0x8c, 0xca, - 0xb4, 0x3c, 0x92, 0xda, 0x05, 0x49, 0x6a, 0x73, 0x24, 0x69, 0x07, 0x84, 0x9b, 0xac, 0x25, 0x89, - 0x20, 0x8f, 0x15, 0x34, 0x5a, 0x1f, 0x1c, 0xa4, 0xaa, 0x92, 0x35, 0xe5, 0x85, 0xb2, 0x36, 0x87, - 0x0e, 0xfb, 0x07, 0x68, 0x49, 0x2f, 0xe9, 0xc5, 0x96, 0x6a, 0x9d, 0x5c, 0x43, 0x47, 0xf6, 0xb8, - 0x81, 0x68, 0xc6, 0x50, 0x97, 0x2d, 0x56, 0xe2, 0xda, 0xae, 0x06, 0x3a, 0xe4, 0x06, 0x9c, 0xc1, - 0x5b, 0x94, 0xe9, 0x05, 0xee, 0xed, 0x7f, 0xe6, 0x86, 0x6b, 0xae, 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 0x4a, 0xf9, 0x69, 0x27, - 0xa5, 0xbc, 0xfb, 0x3c, 0xd5, 0xf6, 0xec, 0x79, 0xaa, 0xed, 0xfb, 0xe7, 0xa9, 0xb6, 0x3b, 0x67, - 0x43, 0x6f, 0x36, 0xd8, 0x63, 0xbc, 0xa0, 0xaf, 0x38, 0xfe, 0x86, 0xf7, 0x27, 0x26, 0x33, 0x5b, - 0x72, 0x5b, 0xf1, 0x82, 0x5b, 0xe9, 0x12, 0xff, 0x3b, 0x3a, 0xf7, 0x47, 0x00, 0x00, 0x00, 0xff, - 0xff, 0xff, 0x3e, 0xc5, 0x35, 0x34, 0x19, 0x00, 0x00, + // 1685 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x58, 0xdd, 0x6f, 0x14, 0x55, + 0x1b, 0xef, 0x94, 0xb6, 0x74, 0x4f, 0x5f, 0xfa, 0x71, 0x28, 0x50, 0xb6, 0xb0, 0xcb, 0x7b, 0xde, + 0xbc, 0xb4, 0x40, 0x3b, 0x4b, 0x4b, 0x49, 0x4c, 0x23, 0x1f, 0x2d, 0xb4, 0xb0, 0x8d, 0xd0, 0x3a, + 0x10, 0x8c, 0x78, 0xb1, 0x99, 0xb6, 0xe3, 0x76, 0x60, 0x77, 0xce, 0x74, 0xe7, 0x0c, 0x6d, 0x83, + 0xc4, 0x84, 0x18, 0xaf, 0xbc, 0x30, 0x41, 0xb9, 0x30, 0x24, 0x7a, 0xa1, 0x89, 0xf1, 0xda, 0xc4, + 0x3f, 0xc0, 0x98, 0x10, 0x13, 0x13, 0x8c, 0x37, 0xc6, 0x8b, 0xd5, 0x50, 0x4d, 0x8c, 0x97, 0xfd, + 0x07, 0x34, 0xe7, 0x9c, 0x67, 0x3e, 0x76, 0x3b, 0x3b, 0xfb, 0xa1, 0x24, 0x5e, 0x75, 0xe7, 0x3c, + 0x5f, 0xbf, 0xe7, 0xe3, 0x3c, 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 0x10, 0xef, 0x99, 0x1c, + 0x54, 0x25, 0x34, 0xd5, 0x83, 0xa6, 0xce, 0x58, 0x5b, 0xb3, 0x89, 0x6f, 0xbf, 0x1c, 0xef, 0xe4, + 0x52, 0x59, 0x4d, 0x30, 0x93, 0x37, 0x42, 0x9a, 0x1c, 0x0f, 0xcb, 0x3c, 0x42, 0x41, 0x1c, 0x86, + 0xda, 0x85, 0xbe, 0xe3, 0x2a, 0xb8, 0xc0, 0x83, 0xa6, 0xca, 0xc4, 0x41, 0xd0, 0xd4, 0x25, 0x3d, + 0x6f, 0x80, 0xac, 0x16, 0x92, 0x24, 0x1f, 0x28, 0x08, 0x87, 0xb5, 0x03, 0xd0, 0xb3, 0xa8, 0x93, + 0xdb, 0x76, 0x86, 0x94, 0x63, 0x7b, 0x1a, 0x41, 0x2a, 0xb9, 0xf1, 0x95, 0x08, 0x54, 0x23, 0x75, + 0x51, 0x49, 0x9b, 0x15, 0xb0, 0x0e, 0xa2, 0x41, 0x81, 0xea, 0xba, 0x5b, 0x0c, 0xbb, 0x4d, 0x16, + 0xd0, 0x81, 0xaa, 0x73, 0x00, 0x3c, 0x81, 0x12, 0x96, 0x5b, 0xcc, 0x79, 0xa0, 0x79, 0x76, 0x06, + 0x77, 0xca, 0xe9, 0x7e, 0x99, 0x1d, 0x9f, 0x44, 0xb4, 0x6e, 0x0b, 0x44, 0xc9, 0x25, 0xb0, 0xc1, + 0xbf, 0x6e, 0x6e, 0xd9, 0x46, 0x4b, 0x69, 0xf6, 0x00, 0x05, 0x4a, 0x02, 0x40, 0x82, 0x99, 0x6d, + 0xd9, 0x86, 0xd0, 0x93, 0x08, 0x03, 0xf2, 0x49, 0x44, 0xeb, 0xb6, 0x41, 0x94, 0x7c, 0xa5, 0xa0, + 0x94, 0x50, 0x76, 0x49, 0x2f, 0xac, 0x2c, 0x50, 0xd3, 0xe2, 0x4a, 0x6f, 0xac, 0xe9, 0x25, 0xc3, + 0x69, 0x05, 0x1b, 0x5e, 0x43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 0x99, 0xc8, 0xdd, 0x5c, 0xae, + 0x70, 0xef, 0x29, 0xa8, 0xdb, 0xdb, 0xae, 0xf0, 0xc9, 0x18, 0xdd, 0x55, 0xab, 0x59, 0xf2, 0x54, + 0x43, 0xbc, 0x00, 0x65, 0x44, 0x40, 0xf9, 0x2f, 0x4e, 0x47, 0x43, 0xf1, 0xf7, 0x35, 0xfc, 0xa9, + 0x82, 0x7a, 0x2b, 0x73, 0x86, 0x4f, 0xc7, 0x18, 0x8a, 0xcc, 0x7e, 0x72, 0xa2, 0x09, 0x09, 0x00, + 0x38, 0x2e, 0x00, 0x8e, 0xe0, 0xff, 0x47, 0x03, 0x94, 0xf3, 0x88, 0x9f, 0x40, 0xfc, 0xae, 0x82, + 0x3a, 0xb8, 0x87, 0xf8, 0x78, 0x9d, 0x6c, 0x78, 0x90, 0x46, 0xea, 0xf2, 0x35, 0x06, 0x44, 0x44, + 0x29, 0x73, 0x1f, 0x1a, 0xc6, 0x03, 0xfc, 0x58, 0x41, 0xdd, 0xde, 0x2e, 0x1a, 0x9b, 0xbe, 0xaa, + 0xad, 0x37, 0x36, 0x7d, 0xd5, 0xcb, 0x2d, 0x99, 0x10, 0xa0, 0x4e, 0xe1, 0x13, 0xb5, 0x41, 0x89, + 0xed, 0x36, 0x04, 0xec, 0x3e, 0xc2, 0xe1, 0xe5, 0x50, 0x0e, 0x3f, 0xb1, 0xb9, 0x8c, 0x9c, 0xe7, + 0x62, 0x73, 0x19, 0x3d, 0x59, 0x91, 0x36, 0xfc, 0xb5, 0x52, 0x69, 0x5d, 0x8e, 0x8e, 0x78, 0x2a, + 0x46, 0x57, 0xcd, 0x1d, 0x3c, 0x79, 0xb6, 0x49, 0x29, 0x40, 0x71, 0x51, 0xc4, 0x6c, 0x1a, 0xbf, + 0xd4, 0x50, 0x22, 0x33, 0x77, 0xa8, 0x69, 0xe5, 0x9c, 0x0d, 0xdd, 0xce, 0x19, 0xbc, 0xc5, 0xe6, + 0x4c, 0x0b, 0xff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0x74, 0xff, 0x00, 0x6d, 0x26, 0xd4, 0x64, + 0x82, 0x3b, 0xf8, 0xbd, 0x82, 0x92, 0x35, 0xfc, 0x59, 0x74, 0x19, 0x6e, 0x02, 0x5b, 0x30, 0x1d, + 0xc7, 0x56, 0x7a, 0xed, 0x61, 0x92, 0xcc, 0x0b, 0x97, 0x2e, 0xe2, 0xf3, 0x7f, 0xc3, 0x25, 0xea, + 0xb2, 0xd9, 0x85, 0xa7, 0xcf, 0x53, 0xca, 0xb3, 0xe7, 0x29, 0xe5, 0x97, 0xe7, 0x29, 0xe5, 0xfd, + 0xed, 0x54, 0xdb, 0xb3, 0xed, 0x54, 0xdb, 0x8f, 0xdb, 0xa9, 0xb6, 0xdb, 0xa7, 0x43, 0x43, 0x1b, + 0xd8, 0x18, 0x2f, 0xe8, 0xcb, 0x8e, 0x6f, 0xf0, 0xde, 0xc4, 0x64, 0x66, 0x53, 0x9a, 0x15, 0x23, + 0xdc, 0x72, 0x97, 0xf8, 0xe7, 0xd1, 0x99, 0xbf, 0x02, 0x00, 0x00, 0xff, 0xff, 0x9f, 0x91, 0x97, + 0x22, 0x35, 0x19, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1507,7 +1507,9 @@ type QueryClient interface { // Returns "Balancer" as a string literal when the pool is a balancer pool. // Errors if the pool is failed to be type caseted. PoolType(ctx context.Context, in *QueryPoolTypeRequest, opts ...grpc.CallOption) (*QueryPoolTypeResponse, error) - SimJoinPoolNoSwap(ctx context.Context, in *QueryJoinPoolNoSwapRequest, opts ...grpc.CallOption) (*QueryJoinPoolNoSwapResponse, error) + // Simulates joining pool without a swap. Returns the amount of shares you'd get + // and tokens needed to provide + CalcJoinPoolNoSwap(ctx context.Context, in *QueryJoinPoolNoSwapRequest, opts ...grpc.CallOption) (*QueryJoinPoolNoSwapResponse, error) CalcJoinPoolShares(ctx context.Context, in *QueryCalcJoinPoolSharesRequest, opts ...grpc.CallOption) (*QueryCalcJoinPoolSharesResponse, error) CalcExitPoolCoinsFromShares(ctx context.Context, in *QueryCalcExitPoolCoinsFromSharesRequest, opts ...grpc.CallOption) (*QueryCalcExitPoolCoinsFromSharesResponse, error) PoolParams(ctx context.Context, in *QueryPoolParamsRequest, opts ...grpc.CallOption) (*QueryPoolParamsResponse, error) @@ -1574,9 +1576,9 @@ func (c *queryClient) PoolType(ctx context.Context, in *QueryPoolTypeRequest, op return out, nil } -func (c *queryClient) SimJoinPoolNoSwap(ctx context.Context, in *QueryJoinPoolNoSwapRequest, opts ...grpc.CallOption) (*QueryJoinPoolNoSwapResponse, error) { +func (c *queryClient) CalcJoinPoolNoSwap(ctx context.Context, in *QueryJoinPoolNoSwapRequest, opts ...grpc.CallOption) (*QueryJoinPoolNoSwapResponse, error) { out := new(QueryJoinPoolNoSwapResponse) - err := c.cc.Invoke(ctx, "/osmosis.gamm.v1beta1.Query/SimJoinPoolNoSwap", in, out, opts...) + err := c.cc.Invoke(ctx, "/osmosis.gamm.v1beta1.Query/CalcJoinPoolNoSwap", in, out, opts...) if err != nil { return nil, err } @@ -1666,7 +1668,9 @@ type QueryServer interface { // Returns "Balancer" as a string literal when the pool is a balancer pool. // Errors if the pool is failed to be type caseted. PoolType(context.Context, *QueryPoolTypeRequest) (*QueryPoolTypeResponse, error) - SimJoinPoolNoSwap(context.Context, *QueryJoinPoolNoSwapRequest) (*QueryJoinPoolNoSwapResponse, error) + // Simulates joining pool without a swap. Returns the amount of shares you'd get + // and tokens needed to provide + CalcJoinPoolNoSwap(context.Context, *QueryJoinPoolNoSwapRequest) (*QueryJoinPoolNoSwapResponse, error) CalcJoinPoolShares(context.Context, *QueryCalcJoinPoolSharesRequest) (*QueryCalcJoinPoolSharesResponse, error) CalcExitPoolCoinsFromShares(context.Context, *QueryCalcExitPoolCoinsFromSharesRequest) (*QueryCalcExitPoolCoinsFromSharesResponse, error) PoolParams(context.Context, *QueryPoolParamsRequest) (*QueryPoolParamsResponse, error) @@ -1699,8 +1703,8 @@ func (*UnimplementedQueryServer) Pool(ctx context.Context, req *QueryPoolRequest func (*UnimplementedQueryServer) PoolType(ctx context.Context, req *QueryPoolTypeRequest) (*QueryPoolTypeResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method PoolType not implemented") } -func (*UnimplementedQueryServer) SimJoinPoolNoSwap(ctx context.Context, req *QueryJoinPoolNoSwapRequest) (*QueryJoinPoolNoSwapResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method SimJoinPoolNoSwap not implemented") +func (*UnimplementedQueryServer) CalcJoinPoolNoSwap(ctx context.Context, req *QueryJoinPoolNoSwapRequest) (*QueryJoinPoolNoSwapResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CalcJoinPoolNoSwap not implemented") } func (*UnimplementedQueryServer) CalcJoinPoolShares(ctx context.Context, req *QueryCalcJoinPoolSharesRequest) (*QueryCalcJoinPoolSharesResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method CalcJoinPoolShares not implemented") @@ -1821,20 +1825,20 @@ func _Query_PoolType_Handler(srv interface{}, ctx context.Context, dec func(inte return interceptor(ctx, in, info, handler) } -func _Query_SimJoinPoolNoSwap_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { +func _Query_CalcJoinPoolNoSwap_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(QueryJoinPoolNoSwapRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(QueryServer).SimJoinPoolNoSwap(ctx, in) + return srv.(QueryServer).CalcJoinPoolNoSwap(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/osmosis.gamm.v1beta1.Query/SimJoinPoolNoSwap", + FullMethod: "/osmosis.gamm.v1beta1.Query/CalcJoinPoolNoSwap", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).SimJoinPoolNoSwap(ctx, req.(*QueryJoinPoolNoSwapRequest)) + return srv.(QueryServer).CalcJoinPoolNoSwap(ctx, req.(*QueryJoinPoolNoSwapRequest)) } return interceptor(ctx, in, info, handler) } @@ -2008,8 +2012,8 @@ var _Query_serviceDesc = grpc.ServiceDesc{ Handler: _Query_PoolType_Handler, }, { - MethodName: "SimJoinPoolNoSwap", - Handler: _Query_SimJoinPoolNoSwap_Handler, + MethodName: "CalcJoinPoolNoSwap", + Handler: _Query_CalcJoinPoolNoSwap_Handler, }, { MethodName: "CalcJoinPoolShares", From 8c1842a7954737c9405d94b1333d58f2681e4f2c Mon Sep 17 00:00:00 2001 From: Ruslan Akhtariev Date: Thu, 10 Nov 2022 12:11:39 +0700 Subject: [PATCH 44/59] more fixes --- proto/osmosis/gamm/v1beta1/query.proto | 21 +- x/gamm/keeper/export_test.go | 4 +- x/gamm/keeper/grpc_query.go | 19 +- x/gamm/keeper/grpc_query_test.go | 89 +++--- x/gamm/types/query.pb.go | 362 ++++++++++++------------- 5 files changed, 239 insertions(+), 256 deletions(-) diff --git a/proto/osmosis/gamm/v1beta1/query.proto b/proto/osmosis/gamm/v1beta1/query.proto index 07b404f4c21..e4b22ee7b8f 100644 --- a/proto/osmosis/gamm/v1beta1/query.proto +++ b/proto/osmosis/gamm/v1beta1/query.proto @@ -38,10 +38,10 @@ service Query { option (google.api.http).get = "/osmosis/gamm/v1beta1/pool_type/{pool_id}"; } - // Simulates joining pool without a swap. Returns the amount of shares you'd get - // and tokens needed to provide - rpc CalcJoinPoolNoSwap(QueryJoinPoolNoSwapRequest) - returns (QueryJoinPoolNoSwapResponse) {} + // Simulates joining pool without a swap. Returns the amount of shares you'd + // get and tokens needed to provide + rpc CalcJoinPoolNoSwap(QueryCalcJoinPoolNoSwapRequest) + returns (QueryCalcJoinPoolNoSwapResponse) {} rpc CalcJoinPoolShares(QueryCalcJoinPoolSharesRequest) returns (QueryCalcJoinPoolSharesResponse) { @@ -191,17 +191,18 @@ message QueryTotalSharesResponse { ]; } //=============================== SimJoinPoolNoSwap -message QueryJoinPoolNoSwapRequest { +message QueryCalcJoinPoolNoSwapRequest { uint64 pool_id = 1 [ (gogoproto.moretags) = "yaml:\"pool_id\"" ]; - string shares_out_amount = 2 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", + string tokens_in = 2 [ + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Coins", + (gogoproto.moretags) = "yaml:\"tokens_in\"", (gogoproto.nullable) = false ]; } -message QueryJoinPoolNoSwapResponse { - repeated cosmos.base.v1beta1.Coin tokens_in = 1 [ +message QueryCalcJoinPoolNoSwapResponse { + repeated cosmos.base.v1beta1.Coin tokens_out = 1 [ (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", - (gogoproto.moretags) = "yaml:\"tokens_in\"", + (gogoproto.moretags) = "yaml:\"tokens_out\"", (gogoproto.nullable) = false ]; string shares_out = 2 [ diff --git a/x/gamm/keeper/export_test.go b/x/gamm/keeper/export_test.go index 9279bac0d5e..395f8d31e4d 100644 --- a/x/gamm/keeper/export_test.go +++ b/x/gamm/keeper/export_test.go @@ -20,6 +20,4 @@ func (k Keeper) GetNextPoolIdAndIncrement(ctx sdk.Context) uint64 { return k.getNextPoolIdAndIncrement(ctx) } -func (_ Keeper) GetMaximalNoSwapLPAmount(ctx sdk.Context, pool types.PoolI, numShares sdk.Int) (sdk.Coins, error) { - return getMaximalNoSwapLPAmount(ctx, pool, numShares) -} +// diff --git a/x/gamm/keeper/grpc_query.go b/x/gamm/keeper/grpc_query.go index 48f08cc89b1..7d7b494a1fc 100644 --- a/x/gamm/keeper/grpc_query.go +++ b/x/gamm/keeper/grpc_query.go @@ -194,7 +194,7 @@ func (q Querier) CalcExitPoolCoinsFromShares(ctx context.Context, req *types.Que } // SimJoinPoolNoSwap returns the amount of shares you'd get if joined a pool without a swap and tokens which need to be provided -func (q Querier) CalcJoinPoolNoSwap(ctx context.Context, req *types.QueryJoinPoolNoSwapRequest) (*types.QueryJoinPoolNoSwapResponse, error) { +func (q Querier) CalcJoinPoolNoSwap(ctx context.Context, req *types.QueryCalcJoinPoolNoSwapRequest) (*types.QueryCalcJoinPoolNoSwapResponse, error) { if req == nil { return nil, status.Error(codes.InvalidArgument, "empty request") } @@ -205,24 +205,13 @@ func (q Querier) CalcJoinPoolNoSwap(ctx context.Context, req *types.QueryJoinPoo return nil, err } - neededLpLiquidity, err := getMaximalNoSwapLPAmount(sdkCtx, pool, req.SharesOutAmount) + sharesOut, tokensJoined, err := pool.CalcJoinPoolNoSwapShares(sdkCtx, req.TokensIn, pool.GetSwapFee(sdkCtx)) if err != nil { return nil, err } - sharesOut, _, err := pool.CalcJoinPoolNoSwapShares(sdkCtx, neededLpLiquidity, pool.GetSwapFee(sdkCtx)) - if err != nil { - return nil, err - } - - // sanity check - if sharesOut.LT(req.SharesOutAmount) { - return nil, fmt.Errorf("Expected to JoinPoolNoSwap >= %s shares, actually did %s shares", - req.SharesOutAmount, sharesOut) - } - - return &types.QueryJoinPoolNoSwapResponse{ - TokensIn: neededLpLiquidity, + return &types.QueryCalcJoinPoolNoSwapResponse{ + TokensOut: tokensJoined, SharesOut: sharesOut, }, nil } diff --git a/x/gamm/keeper/grpc_query_test.go b/x/gamm/keeper/grpc_query_test.go index 10e0cfb531b..6293e11d252 100644 --- a/x/gamm/keeper/grpc_query_test.go +++ b/x/gamm/keeper/grpc_query_test.go @@ -87,63 +87,63 @@ func (suite *KeeperTestSuite) TestCalcExitPoolCoinsFromShares() { } } -func (suite *KeeperTestSuite) TestCalcJoinPoolNoSwap() { +func (suite *KeeperTestSuite) TestCalcJoinPoolNoSwapShares() { queryClient := suite.queryClient - poolId := suite.PrepareBalancerPool() ctx := suite.Ctx + poolId := suite.PrepareBalancerPool() + swapFee := sdk.ZeroDec() testCases := []struct { - name string - sharesOutAmount sdk.Int - poolId uint64 - expectingErr bool + name string + poolId uint64 + tokensIn sdk.Coins + expectedErr error }{ { - name: "valid test case", - sharesOutAmount: types.OneShare.MulRaw(50), - poolId: poolId, - - expectingErr: false, + "valid uneven multi asset join test case", + poolId, + sdk.NewCoins(sdk.NewCoin("foo", sdk.NewInt(5000000)), sdk.NewCoin("bar", sdk.NewInt(5000000)), sdk.NewCoin("baz", sdk.NewInt(5000000)), sdk.NewCoin("uosmo", sdk.NewInt(5000000))), + nil, }, { - name: "invalid pool id", - sharesOutAmount: types.OneShare.MulRaw(50), - poolId: poolId + 1, - - expectingErr: true, + "valid even multi asset join test case", + poolId, + sdk.NewCoins(sdk.NewCoin("foo", sdk.NewInt(500000)), sdk.NewCoin("bar", sdk.NewInt(1000000)), sdk.NewCoin("baz", sdk.NewInt(1500000)), sdk.NewCoin("uosmo", sdk.NewInt(2000000))), + nil, }, { - name: "negative shares out", - sharesOutAmount: sdk.NewInt(-1), - poolId: poolId, - - expectingErr: true, + "valid single asset join test case", + poolId, + sdk.NewCoins(sdk.NewCoin("uosmo", sdk.NewInt(1000000))), + nil, }, { - name: "no pool id", - sharesOutAmount: sdk.NewInt(-1), - - expectingErr: true, + "pool id does not exist", + poolId + 1, + sdk.NewCoins(sdk.NewCoin("uosmo", sdk.NewInt(1000000))), + types.PoolDoesNotExistError{PoolId: poolId + 1}, }, { - name: "zero shares", - sharesOutAmount: sdk.ZeroInt(), - poolId: poolId, - - expectingErr: true, + "token in denom does not exist", + poolId, + sdk.NewCoins(sdk.NewCoin("random", sdk.NewInt(10000))), + sdkerrors.Wrapf(types.ErrDenomNotFoundInPool, "input denoms must already exist in the pool (%s)", "random"), + }, + { + "join pool with incorrect amount of assets", + poolId, + sdk.NewCoins(sdk.NewCoin("uosmo", sdk.NewInt(10000)), sdk.NewCoin("bar", sdk.NewInt(10000))), + errors.New("balancer pool only supports LP'ing with one asset or all assets in pool"), }, } for _, tc := range testCases { suite.Run(tc.name, func() { - out, err := queryClient.CalcJoinPoolNoSwap(gocontext.Background(), &types.QueryJoinPoolNoSwapRequest{ - PoolId: tc.poolId, - SharesOutAmount: tc.sharesOutAmount, + out, err := queryClient.CalcJoinPoolNoSwap(gocontext.Background(), &types.QueryCalcJoinPoolNoSwapRequest{ + PoolId: tc.poolId, + TokensIn: tc.tokensIn, }) - - if !tc.expectingErr { - suite.Require().NoError(err) - + if tc.expectedErr == nil { poolRes, err := queryClient.Pool(gocontext.Background(), &types.QueryPoolRequest{ PoolId: tc.poolId, }) @@ -153,21 +153,16 @@ func (suite *KeeperTestSuite) TestCalcJoinPoolNoSwap() { err = suite.App.InterfaceRegistry().UnpackAny(poolRes.Pool, &pool) suite.Require().NoError(err) - liquidityBefore := pool.GetTotalPoolLiquidity(ctx) - - neededLpLiquidity, err := suite.App.GAMMKeeper.GetMaximalNoSwapLPAmount(ctx, pool, tc.sharesOutAmount) - suite.Require().NoError(err) - expectedShares, _, err := pool.CalcJoinPoolNoSwapShares(ctx, neededLpLiquidity, pool.GetSwapFee(ctx)) + numShares, numLiquidity, err := pool.CalcJoinPoolNoSwapShares(ctx, tc.tokensIn, swapFee) suite.Require().NoError(err) - - suite.Require().Equal(out.SharesOut, expectedShares) - suite.Require().Equal(out.TokensIn, neededLpLiquidity) - suite.Require().Equal(liquidityBefore, pool.GetTotalPoolLiquidity(ctx)) + suite.Require().Equal(numShares, out.SharesOut) + suite.Require().Equal(numLiquidity, out.TokensOut) } else { - suite.Require().Error(err) + suite.Require().EqualError(err, tc.expectedErr.Error()) } }) } + } func (suite *KeeperTestSuite) TestCalcJoinPoolShares() { queryClient := suite.queryClient diff --git a/x/gamm/types/query.pb.go b/x/gamm/types/query.pb.go index 4afa44ea021..ddb13c4ca49 100644 --- a/x/gamm/types/query.pb.go +++ b/x/gamm/types/query.pb.go @@ -852,23 +852,23 @@ func (m *QueryTotalSharesResponse) GetTotalShares() types1.Coin { } // =============================== SimJoinPoolNoSwap -type QueryJoinPoolNoSwapRequest struct { - PoolId uint64 `protobuf:"varint,1,opt,name=pool_id,json=poolId,proto3" json:"pool_id,omitempty" yaml:"pool_id"` - SharesOutAmount github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,2,opt,name=shares_out_amount,json=sharesOutAmount,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"shares_out_amount"` +type QueryCalcJoinPoolNoSwapRequest struct { + PoolId uint64 `protobuf:"varint,1,opt,name=pool_id,json=poolId,proto3" json:"pool_id,omitempty" yaml:"pool_id"` + TokensIn github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,2,opt,name=tokens_in,json=tokensIn,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Coins" json:"tokens_in" yaml:"tokens_in"` } -func (m *QueryJoinPoolNoSwapRequest) Reset() { *m = QueryJoinPoolNoSwapRequest{} } -func (m *QueryJoinPoolNoSwapRequest) String() string { return proto.CompactTextString(m) } -func (*QueryJoinPoolNoSwapRequest) ProtoMessage() {} -func (*QueryJoinPoolNoSwapRequest) Descriptor() ([]byte, []int) { +func (m *QueryCalcJoinPoolNoSwapRequest) Reset() { *m = QueryCalcJoinPoolNoSwapRequest{} } +func (m *QueryCalcJoinPoolNoSwapRequest) String() string { return proto.CompactTextString(m) } +func (*QueryCalcJoinPoolNoSwapRequest) ProtoMessage() {} +func (*QueryCalcJoinPoolNoSwapRequest) Descriptor() ([]byte, []int) { return fileDescriptor_d9a717df9ca609ef, []int{18} } -func (m *QueryJoinPoolNoSwapRequest) XXX_Unmarshal(b []byte) error { +func (m *QueryCalcJoinPoolNoSwapRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *QueryJoinPoolNoSwapRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *QueryCalcJoinPoolNoSwapRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_QueryJoinPoolNoSwapRequest.Marshal(b, m, deterministic) + return xxx_messageInfo_QueryCalcJoinPoolNoSwapRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -878,42 +878,42 @@ func (m *QueryJoinPoolNoSwapRequest) XXX_Marshal(b []byte, deterministic bool) ( return b[:n], nil } } -func (m *QueryJoinPoolNoSwapRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryJoinPoolNoSwapRequest.Merge(m, src) +func (m *QueryCalcJoinPoolNoSwapRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryCalcJoinPoolNoSwapRequest.Merge(m, src) } -func (m *QueryJoinPoolNoSwapRequest) XXX_Size() int { +func (m *QueryCalcJoinPoolNoSwapRequest) XXX_Size() int { return m.Size() } -func (m *QueryJoinPoolNoSwapRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueryJoinPoolNoSwapRequest.DiscardUnknown(m) +func (m *QueryCalcJoinPoolNoSwapRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryCalcJoinPoolNoSwapRequest.DiscardUnknown(m) } -var xxx_messageInfo_QueryJoinPoolNoSwapRequest proto.InternalMessageInfo +var xxx_messageInfo_QueryCalcJoinPoolNoSwapRequest proto.InternalMessageInfo -func (m *QueryJoinPoolNoSwapRequest) GetPoolId() uint64 { +func (m *QueryCalcJoinPoolNoSwapRequest) GetPoolId() uint64 { if m != nil { return m.PoolId } return 0 } -type QueryJoinPoolNoSwapResponse struct { - TokensIn github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,1,rep,name=tokens_in,json=tokensIn,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"tokens_in" yaml:"tokens_in"` +type QueryCalcJoinPoolNoSwapResponse struct { + TokensOut github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,1,rep,name=tokens_out,json=tokensOut,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"tokens_out" yaml:"tokens_out"` SharesOut github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,2,opt,name=shares_out,json=sharesOut,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"shares_out"` } -func (m *QueryJoinPoolNoSwapResponse) Reset() { *m = QueryJoinPoolNoSwapResponse{} } -func (m *QueryJoinPoolNoSwapResponse) String() string { return proto.CompactTextString(m) } -func (*QueryJoinPoolNoSwapResponse) ProtoMessage() {} -func (*QueryJoinPoolNoSwapResponse) Descriptor() ([]byte, []int) { +func (m *QueryCalcJoinPoolNoSwapResponse) Reset() { *m = QueryCalcJoinPoolNoSwapResponse{} } +func (m *QueryCalcJoinPoolNoSwapResponse) String() string { return proto.CompactTextString(m) } +func (*QueryCalcJoinPoolNoSwapResponse) ProtoMessage() {} +func (*QueryCalcJoinPoolNoSwapResponse) Descriptor() ([]byte, []int) { return fileDescriptor_d9a717df9ca609ef, []int{19} } -func (m *QueryJoinPoolNoSwapResponse) XXX_Unmarshal(b []byte) error { +func (m *QueryCalcJoinPoolNoSwapResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *QueryJoinPoolNoSwapResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *QueryCalcJoinPoolNoSwapResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_QueryJoinPoolNoSwapResponse.Marshal(b, m, deterministic) + return xxx_messageInfo_QueryCalcJoinPoolNoSwapResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -923,21 +923,21 @@ func (m *QueryJoinPoolNoSwapResponse) XXX_Marshal(b []byte, deterministic bool) return b[:n], nil } } -func (m *QueryJoinPoolNoSwapResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryJoinPoolNoSwapResponse.Merge(m, src) +func (m *QueryCalcJoinPoolNoSwapResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryCalcJoinPoolNoSwapResponse.Merge(m, src) } -func (m *QueryJoinPoolNoSwapResponse) XXX_Size() int { +func (m *QueryCalcJoinPoolNoSwapResponse) XXX_Size() int { return m.Size() } -func (m *QueryJoinPoolNoSwapResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryJoinPoolNoSwapResponse.DiscardUnknown(m) +func (m *QueryCalcJoinPoolNoSwapResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryCalcJoinPoolNoSwapResponse.DiscardUnknown(m) } -var xxx_messageInfo_QueryJoinPoolNoSwapResponse proto.InternalMessageInfo +var xxx_messageInfo_QueryCalcJoinPoolNoSwapResponse proto.InternalMessageInfo -func (m *QueryJoinPoolNoSwapResponse) GetTokensIn() github_com_cosmos_cosmos_sdk_types.Coins { +func (m *QueryCalcJoinPoolNoSwapResponse) GetTokensOut() github_com_cosmos_cosmos_sdk_types.Coins { if m != nil { - return m.TokensIn + return m.TokensOut } return nil } @@ -1362,8 +1362,8 @@ func init() { proto.RegisterType((*QueryTotalPoolLiquidityResponse)(nil), "osmosis.gamm.v1beta1.QueryTotalPoolLiquidityResponse") proto.RegisterType((*QueryTotalSharesRequest)(nil), "osmosis.gamm.v1beta1.QueryTotalSharesRequest") proto.RegisterType((*QueryTotalSharesResponse)(nil), "osmosis.gamm.v1beta1.QueryTotalSharesResponse") - proto.RegisterType((*QueryJoinPoolNoSwapRequest)(nil), "osmosis.gamm.v1beta1.QueryJoinPoolNoSwapRequest") - proto.RegisterType((*QueryJoinPoolNoSwapResponse)(nil), "osmosis.gamm.v1beta1.QueryJoinPoolNoSwapResponse") + proto.RegisterType((*QueryCalcJoinPoolNoSwapRequest)(nil), "osmosis.gamm.v1beta1.QueryCalcJoinPoolNoSwapRequest") + proto.RegisterType((*QueryCalcJoinPoolNoSwapResponse)(nil), "osmosis.gamm.v1beta1.QueryCalcJoinPoolNoSwapResponse") proto.RegisterType((*QuerySpotPriceRequest)(nil), "osmosis.gamm.v1beta1.QuerySpotPriceRequest") proto.RegisterType((*QuerySpotPriceResponse)(nil), "osmosis.gamm.v1beta1.QuerySpotPriceResponse") proto.RegisterType((*QuerySwapExactAmountInRequest)(nil), "osmosis.gamm.v1beta1.QuerySwapExactAmountInRequest") @@ -1377,113 +1377,113 @@ func init() { func init() { proto.RegisterFile("osmosis/gamm/v1beta1/query.proto", fileDescriptor_d9a717df9ca609ef) } var fileDescriptor_d9a717df9ca609ef = []byte{ - // 1685 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x58, 0xdd, 0x6f, 0x14, 0x55, - 0x1b, 0xef, 0x94, 0xb6, 0x74, 0x4f, 0x5f, 0xfa, 0x71, 0x28, 0x50, 0xb6, 0xb0, 0xcb, 0x7b, 0xde, - 0xbc, 0xb4, 0x40, 0x3b, 0x4b, 0x4b, 0x49, 0x4c, 0x23, 0x1f, 0x2d, 0xb4, 0xb0, 0x8d, 0xd0, 0x3a, - 0x10, 0x8c, 0x78, 0xb1, 0x99, 0xb6, 0xe3, 0x76, 0x60, 0x77, 0xce, 0x74, 0xe7, 0x0c, 0x6d, 0x83, - 0xc4, 0x84, 0x18, 0xaf, 0xbc, 0x30, 0x41, 0xb9, 0x30, 0x24, 0x7a, 0xa1, 0x89, 0xf1, 0xda, 0xc4, - 0x3f, 0xc0, 0x98, 0x10, 0x13, 0x13, 0x8c, 0x37, 0xc6, 0x8b, 0xd5, 0x50, 0x4d, 0x8c, 0x97, 0xfd, - 0x07, 0x34, 0xe7, 0x9c, 0x67, 0x3e, 0x76, 0x3b, 0x3b, 0xfb, 0xa1, 0x24, 0x5e, 0x75, 0xe7, 0x3c, - 0x5f, 0xbf, 0xe7, 0xe3, 0x3c, 0xe7, 0x79, 0x8a, 0x8e, 0x51, 0xa7, 0x48, 0x1d, 0xd3, 0xc9, 0xe4, - 0xf5, 0x62, 0x31, 0x73, 0x6f, 0x62, 0xd9, 0x60, 0xfa, 0x44, 0x66, 0xdd, 0x35, 0x4a, 0x5b, 0xaa, - 0x5d, 0xa2, 0x8c, 0xe2, 0x41, 0xe0, 0x50, 0x39, 0x87, 0x0a, 0x1c, 0xc9, 0xc1, 0x3c, 0xcd, 0x53, - 0xc1, 0x90, 0xe1, 0xbf, 0x24, 0x6f, 0xf2, 0x68, 0xa4, 0x36, 0xb6, 0x09, 0xe4, 0xd4, 0x8a, 0xa0, - 0x67, 0x96, 0x75, 0xc7, 0xf0, 0xa9, 0x2b, 0xd4, 0xb4, 0x80, 0x7e, 0x32, 0x4c, 0x17, 0x18, 0x7c, - 0x2e, 0x5b, 0xcf, 0x9b, 0x96, 0xce, 0x4c, 0xea, 0xf1, 0x1e, 0xc9, 0x53, 0x9a, 0x2f, 0x18, 0x19, - 0xdd, 0x36, 0x33, 0xba, 0x65, 0x51, 0x26, 0x88, 0x0e, 0x50, 0x0f, 0x03, 0x55, 0x7c, 0x2d, 0xbb, - 0x6f, 0x66, 0x74, 0x6b, 0xcb, 0x23, 0x49, 0x23, 0x39, 0x09, 0x5e, 0x7e, 0x48, 0x12, 0xb9, 0x80, - 0xfa, 0x5f, 0xe5, 0x56, 0x97, 0x28, 0x2d, 0x68, 0xc6, 0xba, 0x6b, 0x38, 0x0c, 0x9f, 0x42, 0x7b, - 0x6d, 0x4a, 0x0b, 0x39, 0x73, 0x75, 0x48, 0x39, 0xa6, 0x8c, 0x76, 0xcc, 0xe2, 0x9d, 0x72, 0xba, - 0x77, 0x4b, 0x2f, 0x16, 0xa6, 0x09, 0x10, 0x88, 0xd6, 0xc5, 0x7f, 0x65, 0x57, 0xc9, 0x55, 0x34, - 0x10, 0x52, 0xe0, 0xd8, 0xd4, 0x72, 0x0c, 0x7c, 0x06, 0x75, 0x70, 0xb2, 0x10, 0xef, 0x99, 0x1c, - 0x54, 0x25, 0x34, 0xd5, 0x83, 0xa6, 0xce, 0x58, 0x5b, 0xb3, 0x89, 0x6f, 0xbf, 0x1c, 0xef, 0xe4, - 0x52, 0x59, 0x4d, 0x30, 0x93, 0x37, 0x42, 0x9a, 0x1c, 0x0f, 0xcb, 0x3c, 0x42, 0x41, 0x1c, 0x86, - 0xda, 0x85, 0xbe, 0xe3, 0x2a, 0xb8, 0xc0, 0x83, 0xa6, 0xca, 0xc4, 0x41, 0xd0, 0xd4, 0x25, 0x3d, - 0x6f, 0x80, 0xac, 0x16, 0x92, 0x24, 0x1f, 0x28, 0x08, 0x87, 0xb5, 0x03, 0xd0, 0xb3, 0xa8, 0x93, - 0xdb, 0x76, 0x86, 0x94, 0x63, 0x7b, 0x1a, 0x41, 0x2a, 0xb9, 0xf1, 0x95, 0x08, 0x54, 0x23, 0x75, - 0x51, 0x49, 0x9b, 0x15, 0xb0, 0x0e, 0xa2, 0x41, 0x81, 0xea, 0xba, 0x5b, 0x0c, 0xbb, 0x4d, 0x16, - 0xd0, 0x81, 0xaa, 0x73, 0x00, 0x3c, 0x81, 0x12, 0x96, 0x5b, 0xcc, 0x79, 0xa0, 0x79, 0x76, 0x06, - 0x77, 0xca, 0xe9, 0x7e, 0x99, 0x1d, 0x9f, 0x44, 0xb4, 0x6e, 0x0b, 0x44, 0xc9, 0x25, 0xb0, 0xc1, - 0xbf, 0x6e, 0x6e, 0xd9, 0x46, 0x4b, 0x69, 0xf6, 0x00, 0x05, 0x4a, 0x02, 0x40, 0x82, 0x99, 0x6d, - 0xd9, 0x86, 0xd0, 0x93, 0x08, 0x03, 0xf2, 0x49, 0x44, 0xeb, 0xb6, 0x41, 0x94, 0x7c, 0xa5, 0xa0, - 0x94, 0x50, 0x76, 0x49, 0x2f, 0xac, 0x2c, 0x50, 0xd3, 0xe2, 0x4a, 0x6f, 0xac, 0xe9, 0x25, 0xc3, - 0x69, 0x05, 0x1b, 0x5e, 0x43, 0x09, 0x46, 0xef, 0x1a, 0x96, 0x93, 0x33, 0x79, 0x32, 0x78, 0x22, - 0x0f, 0x57, 0x24, 0xc3, 0x4b, 0xc3, 0x25, 0x6a, 0x5a, 0xb3, 0xa7, 0x9f, 0x96, 0xd3, 0x6d, 0x5f, - 0xfc, 0x9c, 0x1e, 0xcd, 0x9b, 0x6c, 0xcd, 0x5d, 0x56, 0x57, 0x68, 0x11, 0xae, 0x04, 0xfc, 0x19, - 0x77, 0x56, 0xef, 0x66, 0x38, 0x66, 0x47, 0x08, 0x38, 0x5a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29, 0xe5, 0xfd, - 0xed, 0x54, 0xdb, 0xb3, 0xed, 0x54, 0xdb, 0x8f, 0xdb, 0xa9, 0xb6, 0xdb, 0xa7, 0x43, 0x43, 0x1b, - 0xd8, 0x18, 0x2f, 0xe8, 0xcb, 0x8e, 0x6f, 0xf0, 0xde, 0xc4, 0x64, 0x66, 0x53, 0x9a, 0x15, 0x23, - 0xdc, 0x72, 0x97, 0xf8, 0xe7, 0xd1, 0x99, 0xbf, 0x02, 0x00, 0x00, 0xff, 0xff, 0x9f, 0x91, 0x97, - 0x22, 0x35, 0x19, 0x00, 0x00, + // 1689 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x58, 0xcf, 0x6f, 0x1b, 0xc5, + 0x17, 0xcf, 0xa6, 0x49, 0x1a, 0x4f, 0xbe, 0xcd, 0x8f, 0x69, 0xda, 0xa6, 0x4e, 0x6b, 0xf7, 0x3b, + 0x5f, 0x7d, 0x9b, 0xb4, 0x4d, 0xd6, 0x4d, 0x9a, 0x4a, 0x28, 0xa2, 0x3f, 0x92, 0x36, 0x69, 0x1d, + 0xd1, 0x36, 0x6c, 0xab, 0x22, 0xe0, 0x60, 0x6d, 0x92, 0xc5, 0xd9, 0xd6, 0xde, 0xd9, 0x78, 0x67, + 0x9b, 0x44, 0xa8, 0xaa, 0x54, 0x10, 0x27, 0x0e, 0x48, 0x85, 0x1e, 0x50, 0x25, 0x38, 0x70, 0x40, + 0x9c, 0x38, 0x20, 0xf1, 0x07, 0x20, 0xa4, 0x0a, 0x09, 0xa9, 0x88, 0x0b, 0xe2, 0x60, 0x50, 0x0b, + 0x12, 0x07, 0x2e, 0xe4, 0x1f, 0x00, 0xcd, 0xcc, 0xdb, 0x1f, 0xb6, 0xd7, 0xf6, 0xda, 0x50, 0x89, + 0x53, 0xbc, 0xf3, 0xde, 0xbc, 0xf9, 0xbc, 0xcf, 0x7b, 0xf3, 0xe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, 0x54, 0x64, 0x82, 0x3b, 0xf8, 0x9d, 0x82, 0x92, 0x75, 0xfc, 0xe1, 0x73, 0x63, 0x0b, + 0xd8, 0x82, 0x36, 0xb9, 0x61, 0xa6, 0xd7, 0xef, 0x2a, 0xc9, 0xa2, 0x70, 0xe9, 0x3c, 0x3e, 0xfb, + 0x37, 0x5c, 0xa2, 0x2e, 0x9b, 0x5f, 0x7a, 0xfc, 0x34, 0xa5, 0x3c, 0x79, 0x9a, 0x52, 0x7e, 0x7e, + 0x9a, 0x52, 0xde, 0x7b, 0x96, 0xea, 0x78, 0xf2, 0x2c, 0xd5, 0xf1, 0xc3, 0xb3, 0x54, 0xc7, 0x6b, + 0x27, 0x43, 0xdd, 0x1b, 0x9c, 0x31, 0x59, 0xd0, 0x57, 0x1c, 0xff, 0xc0, 0x3b, 0x53, 0xd3, 0x99, + 0x2d, 0x79, 0xac, 0xe8, 0xe5, 0x56, 0x7a, 0xc4, 0xff, 0x95, 0x4e, 0xfd, 0x15, 0x00, 0x00, 0xff, + 0xff, 0x51, 0x83, 0x8f, 0x15, 0x50, 0x19, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1507,9 +1507,9 @@ type QueryClient interface { // Returns "Balancer" as a string literal when the pool is a balancer pool. // Errors if the pool is failed to be type caseted. PoolType(ctx context.Context, in *QueryPoolTypeRequest, opts ...grpc.CallOption) (*QueryPoolTypeResponse, error) - // Simulates joining pool without a swap. Returns the amount of shares you'd get - // and tokens needed to provide - CalcJoinPoolNoSwap(ctx context.Context, in *QueryJoinPoolNoSwapRequest, opts ...grpc.CallOption) (*QueryJoinPoolNoSwapResponse, error) + // Simulates joining pool without a swap. Returns the amount of shares you'd + // get and tokens needed to provide + CalcJoinPoolNoSwap(ctx context.Context, in *QueryCalcJoinPoolNoSwapRequest, opts ...grpc.CallOption) (*QueryCalcJoinPoolNoSwapResponse, error) CalcJoinPoolShares(ctx context.Context, in *QueryCalcJoinPoolSharesRequest, opts ...grpc.CallOption) (*QueryCalcJoinPoolSharesResponse, error) CalcExitPoolCoinsFromShares(ctx context.Context, in *QueryCalcExitPoolCoinsFromSharesRequest, opts ...grpc.CallOption) (*QueryCalcExitPoolCoinsFromSharesResponse, error) PoolParams(ctx context.Context, in *QueryPoolParamsRequest, opts ...grpc.CallOption) (*QueryPoolParamsResponse, error) @@ -1576,8 +1576,8 @@ func (c *queryClient) PoolType(ctx context.Context, in *QueryPoolTypeRequest, op return out, nil } -func (c *queryClient) CalcJoinPoolNoSwap(ctx context.Context, in *QueryJoinPoolNoSwapRequest, opts ...grpc.CallOption) (*QueryJoinPoolNoSwapResponse, error) { - out := new(QueryJoinPoolNoSwapResponse) +func (c *queryClient) CalcJoinPoolNoSwap(ctx context.Context, in *QueryCalcJoinPoolNoSwapRequest, opts ...grpc.CallOption) (*QueryCalcJoinPoolNoSwapResponse, error) { + out := new(QueryCalcJoinPoolNoSwapResponse) err := c.cc.Invoke(ctx, "/osmosis.gamm.v1beta1.Query/CalcJoinPoolNoSwap", in, out, opts...) if err != nil { return nil, err @@ -1668,9 +1668,9 @@ type QueryServer interface { // Returns "Balancer" as a string literal when the pool is a balancer pool. // Errors if the pool is failed to be type caseted. PoolType(context.Context, *QueryPoolTypeRequest) (*QueryPoolTypeResponse, error) - // Simulates joining pool without a swap. Returns the amount of shares you'd get - // and tokens needed to provide - CalcJoinPoolNoSwap(context.Context, *QueryJoinPoolNoSwapRequest) (*QueryJoinPoolNoSwapResponse, error) + // Simulates joining pool without a swap. Returns the amount of shares you'd + // get and tokens needed to provide + CalcJoinPoolNoSwap(context.Context, *QueryCalcJoinPoolNoSwapRequest) (*QueryCalcJoinPoolNoSwapResponse, error) CalcJoinPoolShares(context.Context, *QueryCalcJoinPoolSharesRequest) (*QueryCalcJoinPoolSharesResponse, error) CalcExitPoolCoinsFromShares(context.Context, *QueryCalcExitPoolCoinsFromSharesRequest) (*QueryCalcExitPoolCoinsFromSharesResponse, error) PoolParams(context.Context, *QueryPoolParamsRequest) (*QueryPoolParamsResponse, error) @@ -1703,7 +1703,7 @@ func (*UnimplementedQueryServer) Pool(ctx context.Context, req *QueryPoolRequest func (*UnimplementedQueryServer) PoolType(ctx context.Context, req *QueryPoolTypeRequest) (*QueryPoolTypeResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method PoolType not implemented") } -func (*UnimplementedQueryServer) CalcJoinPoolNoSwap(ctx context.Context, req *QueryJoinPoolNoSwapRequest) (*QueryJoinPoolNoSwapResponse, error) { +func (*UnimplementedQueryServer) CalcJoinPoolNoSwap(ctx context.Context, req *QueryCalcJoinPoolNoSwapRequest) (*QueryCalcJoinPoolNoSwapResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method CalcJoinPoolNoSwap not implemented") } func (*UnimplementedQueryServer) CalcJoinPoolShares(ctx context.Context, req *QueryCalcJoinPoolSharesRequest) (*QueryCalcJoinPoolSharesResponse, error) { @@ -1826,7 +1826,7 @@ func _Query_PoolType_Handler(srv interface{}, ctx context.Context, dec func(inte } func _Query_CalcJoinPoolNoSwap_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryJoinPoolNoSwapRequest) + in := new(QueryCalcJoinPoolNoSwapRequest) if err := dec(in); err != nil { return nil, err } @@ -1838,7 +1838,7 @@ func _Query_CalcJoinPoolNoSwap_Handler(srv interface{}, ctx context.Context, dec FullMethod: "/osmosis.gamm.v1beta1.Query/CalcJoinPoolNoSwap", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).CalcJoinPoolNoSwap(ctx, req.(*QueryJoinPoolNoSwapRequest)) + return srv.(QueryServer).CalcJoinPoolNoSwap(ctx, req.(*QueryCalcJoinPoolNoSwapRequest)) } return interceptor(ctx, in, info, handler) } @@ -2661,7 +2661,7 @@ func (m *QueryTotalSharesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error return len(dAtA) - i, nil } -func (m *QueryJoinPoolNoSwapRequest) Marshal() (dAtA []byte, err error) { +func (m *QueryCalcJoinPoolNoSwapRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -2671,20 +2671,20 @@ func (m *QueryJoinPoolNoSwapRequest) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *QueryJoinPoolNoSwapRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryCalcJoinPoolNoSwapRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryJoinPoolNoSwapRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryCalcJoinPoolNoSwapRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l { - size := m.SharesOutAmount.Size() + size := m.TokensIn.Size() i -= size - if _, err := m.SharesOutAmount.MarshalTo(dAtA[i:]); err != nil { + if _, err := m.TokensIn.MarshalTo(dAtA[i:]); err != nil { return 0, err } i = encodeVarintQuery(dAtA, i, uint64(size)) @@ -2699,7 +2699,7 @@ func (m *QueryJoinPoolNoSwapRequest) MarshalToSizedBuffer(dAtA []byte) (int, err return len(dAtA) - i, nil } -func (m *QueryJoinPoolNoSwapResponse) Marshal() (dAtA []byte, err error) { +func (m *QueryCalcJoinPoolNoSwapResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -2709,12 +2709,12 @@ func (m *QueryJoinPoolNoSwapResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *QueryJoinPoolNoSwapResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryCalcJoinPoolNoSwapResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryJoinPoolNoSwapResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryCalcJoinPoolNoSwapResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -2729,10 +2729,10 @@ func (m *QueryJoinPoolNoSwapResponse) MarshalToSizedBuffer(dAtA []byte) (int, er } i-- dAtA[i] = 0x12 - if len(m.TokensIn) > 0 { - for iNdEx := len(m.TokensIn) - 1; iNdEx >= 0; iNdEx-- { + if len(m.TokensOut) > 0 { + for iNdEx := len(m.TokensOut) - 1; iNdEx >= 0; iNdEx-- { { - size, err := m.TokensIn[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + size, err := m.TokensOut[iNdEx].MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -3309,7 +3309,7 @@ func (m *QueryTotalSharesResponse) Size() (n int) { return n } -func (m *QueryJoinPoolNoSwapRequest) Size() (n int) { +func (m *QueryCalcJoinPoolNoSwapRequest) Size() (n int) { if m == nil { return 0 } @@ -3318,19 +3318,19 @@ func (m *QueryJoinPoolNoSwapRequest) Size() (n int) { if m.PoolId != 0 { n += 1 + sovQuery(uint64(m.PoolId)) } - l = m.SharesOutAmount.Size() + l = m.TokensIn.Size() n += 1 + l + sovQuery(uint64(l)) return n } -func (m *QueryJoinPoolNoSwapResponse) Size() (n int) { +func (m *QueryCalcJoinPoolNoSwapResponse) Size() (n int) { if m == nil { return 0 } var l int _ = l - if len(m.TokensIn) > 0 { - for _, e := range m.TokensIn { + if len(m.TokensOut) > 0 { + for _, e := range m.TokensOut { l = e.Size() n += 1 + l + sovQuery(uint64(l)) } @@ -4976,7 +4976,7 @@ func (m *QueryTotalSharesResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryJoinPoolNoSwapRequest) Unmarshal(dAtA []byte) error { +func (m *QueryCalcJoinPoolNoSwapRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4999,10 +4999,10 @@ func (m *QueryJoinPoolNoSwapRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryJoinPoolNoSwapRequest: wiretype end group for non-group") + return fmt.Errorf("proto: QueryCalcJoinPoolNoSwapRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryJoinPoolNoSwapRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryCalcJoinPoolNoSwapRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -5026,7 +5026,7 @@ func (m *QueryJoinPoolNoSwapRequest) Unmarshal(dAtA []byte) error { } case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SharesOutAmount", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field TokensIn", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -5054,7 +5054,7 @@ func (m *QueryJoinPoolNoSwapRequest) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.SharesOutAmount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.TokensIn.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -5079,7 +5079,7 @@ func (m *QueryJoinPoolNoSwapRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryJoinPoolNoSwapResponse) Unmarshal(dAtA []byte) error { +func (m *QueryCalcJoinPoolNoSwapResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -5102,15 +5102,15 @@ func (m *QueryJoinPoolNoSwapResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryJoinPoolNoSwapResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QueryCalcJoinPoolNoSwapResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryJoinPoolNoSwapResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryCalcJoinPoolNoSwapResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TokensIn", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field TokensOut", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -5137,8 +5137,8 @@ func (m *QueryJoinPoolNoSwapResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.TokensIn = append(m.TokensIn, types1.Coin{}) - if err := m.TokensIn[len(m.TokensIn)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.TokensOut = append(m.TokensOut, types1.Coin{}) + if err := m.TokensOut[len(m.TokensOut)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex From b0a7e02345a92d34e96e7c8e693158781a4b0437 Mon Sep 17 00:00:00 2001 From: Ruslan Akhtariev Date: Thu, 10 Nov 2022 12:16:53 +0700 Subject: [PATCH 45/59] fix docs and name --- proto/osmosis/gamm/v1beta1/query.proto | 10 +- x/gamm/keeper/grpc_query.go | 4 +- x/gamm/keeper/grpc_query_test.go | 2 +- x/gamm/types/query.pb.go | 334 ++++++++++++------------- 4 files changed, 175 insertions(+), 175 deletions(-) diff --git a/proto/osmosis/gamm/v1beta1/query.proto b/proto/osmosis/gamm/v1beta1/query.proto index e4b22ee7b8f..32a1497c05e 100644 --- a/proto/osmosis/gamm/v1beta1/query.proto +++ b/proto/osmosis/gamm/v1beta1/query.proto @@ -40,8 +40,8 @@ service Query { // Simulates joining pool without a swap. Returns the amount of shares you'd // get and tokens needed to provide - rpc CalcJoinPoolNoSwap(QueryCalcJoinPoolNoSwapRequest) - returns (QueryCalcJoinPoolNoSwapResponse) {} + rpc CalcJoinPoolNoSwapShares(QueryCalcJoinPoolNoSwapSharesRequest) + returns (QueryCalcJoinPoolNoSwapSharesResponse) {} rpc CalcJoinPoolShares(QueryCalcJoinPoolSharesRequest) returns (QueryCalcJoinPoolSharesResponse) { @@ -190,8 +190,8 @@ message QueryTotalSharesResponse { (gogoproto.nullable) = false ]; } -//=============================== SimJoinPoolNoSwap -message QueryCalcJoinPoolNoSwapRequest { +//=============================== CalcJoinPoolNoSwapShares +message QueryCalcJoinPoolNoSwapSharesRequest { uint64 pool_id = 1 [ (gogoproto.moretags) = "yaml:\"pool_id\"" ]; string tokens_in = 2 [ (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Coins", @@ -199,7 +199,7 @@ message QueryCalcJoinPoolNoSwapRequest { (gogoproto.nullable) = false ]; } -message QueryCalcJoinPoolNoSwapResponse { +message QueryCalcJoinPoolNoSwapSharesResponse { repeated cosmos.base.v1beta1.Coin tokens_out = 1 [ (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", (gogoproto.moretags) = "yaml:\"tokens_out\"", diff --git a/x/gamm/keeper/grpc_query.go b/x/gamm/keeper/grpc_query.go index 7d7b494a1fc..e70f045ff71 100644 --- a/x/gamm/keeper/grpc_query.go +++ b/x/gamm/keeper/grpc_query.go @@ -194,7 +194,7 @@ func (q Querier) CalcExitPoolCoinsFromShares(ctx context.Context, req *types.Que } // SimJoinPoolNoSwap returns the amount of shares you'd get if joined a pool without a swap and tokens which need to be provided -func (q Querier) CalcJoinPoolNoSwap(ctx context.Context, req *types.QueryCalcJoinPoolNoSwapRequest) (*types.QueryCalcJoinPoolNoSwapResponse, error) { +func (q Querier) CalcJoinPoolNoSwapShares(ctx context.Context, req *types.QueryCalcJoinPoolNoSwapSharesRequest) (*types.QueryCalcJoinPoolNoSwapSharesResponse, error) { if req == nil { return nil, status.Error(codes.InvalidArgument, "empty request") } @@ -210,7 +210,7 @@ func (q Querier) CalcJoinPoolNoSwap(ctx context.Context, req *types.QueryCalcJoi return nil, err } - return &types.QueryCalcJoinPoolNoSwapResponse{ + return &types.QueryCalcJoinPoolNoSwapSharesResponse{ TokensOut: tokensJoined, SharesOut: sharesOut, }, nil diff --git a/x/gamm/keeper/grpc_query_test.go b/x/gamm/keeper/grpc_query_test.go index 6293e11d252..21453ebc212 100644 --- a/x/gamm/keeper/grpc_query_test.go +++ b/x/gamm/keeper/grpc_query_test.go @@ -139,7 +139,7 @@ func (suite *KeeperTestSuite) TestCalcJoinPoolNoSwapShares() { for _, tc := range testCases { suite.Run(tc.name, func() { - out, err := queryClient.CalcJoinPoolNoSwap(gocontext.Background(), &types.QueryCalcJoinPoolNoSwapRequest{ + out, err := queryClient.CalcJoinPoolNoSwapShares(gocontext.Background(), &types.QueryCalcJoinPoolNoSwapSharesRequest{ PoolId: tc.poolId, TokensIn: tc.tokensIn, }) diff --git a/x/gamm/types/query.pb.go b/x/gamm/types/query.pb.go index ddb13c4ca49..49c3beb12ed 100644 --- a/x/gamm/types/query.pb.go +++ b/x/gamm/types/query.pb.go @@ -852,23 +852,23 @@ func (m *QueryTotalSharesResponse) GetTotalShares() types1.Coin { } // =============================== SimJoinPoolNoSwap -type QueryCalcJoinPoolNoSwapRequest struct { +type QueryCalcJoinPoolNoSwapSharesRequest struct { PoolId uint64 `protobuf:"varint,1,opt,name=pool_id,json=poolId,proto3" json:"pool_id,omitempty" yaml:"pool_id"` TokensIn github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,2,opt,name=tokens_in,json=tokensIn,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Coins" json:"tokens_in" yaml:"tokens_in"` } -func (m *QueryCalcJoinPoolNoSwapRequest) Reset() { *m = QueryCalcJoinPoolNoSwapRequest{} } -func (m *QueryCalcJoinPoolNoSwapRequest) String() string { return proto.CompactTextString(m) } -func (*QueryCalcJoinPoolNoSwapRequest) ProtoMessage() {} -func (*QueryCalcJoinPoolNoSwapRequest) Descriptor() ([]byte, []int) { +func (m *QueryCalcJoinPoolNoSwapSharesRequest) Reset() { *m = QueryCalcJoinPoolNoSwapSharesRequest{} } +func (m *QueryCalcJoinPoolNoSwapSharesRequest) String() string { return proto.CompactTextString(m) } +func (*QueryCalcJoinPoolNoSwapSharesRequest) ProtoMessage() {} +func (*QueryCalcJoinPoolNoSwapSharesRequest) Descriptor() ([]byte, []int) { return fileDescriptor_d9a717df9ca609ef, []int{18} } -func (m *QueryCalcJoinPoolNoSwapRequest) XXX_Unmarshal(b []byte) error { +func (m *QueryCalcJoinPoolNoSwapSharesRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *QueryCalcJoinPoolNoSwapRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *QueryCalcJoinPoolNoSwapSharesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_QueryCalcJoinPoolNoSwapRequest.Marshal(b, m, deterministic) + return xxx_messageInfo_QueryCalcJoinPoolNoSwapSharesRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -878,42 +878,42 @@ func (m *QueryCalcJoinPoolNoSwapRequest) XXX_Marshal(b []byte, deterministic boo return b[:n], nil } } -func (m *QueryCalcJoinPoolNoSwapRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryCalcJoinPoolNoSwapRequest.Merge(m, src) +func (m *QueryCalcJoinPoolNoSwapSharesRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryCalcJoinPoolNoSwapSharesRequest.Merge(m, src) } -func (m *QueryCalcJoinPoolNoSwapRequest) XXX_Size() int { +func (m *QueryCalcJoinPoolNoSwapSharesRequest) XXX_Size() int { return m.Size() } -func (m *QueryCalcJoinPoolNoSwapRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueryCalcJoinPoolNoSwapRequest.DiscardUnknown(m) +func (m *QueryCalcJoinPoolNoSwapSharesRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryCalcJoinPoolNoSwapSharesRequest.DiscardUnknown(m) } -var xxx_messageInfo_QueryCalcJoinPoolNoSwapRequest proto.InternalMessageInfo +var xxx_messageInfo_QueryCalcJoinPoolNoSwapSharesRequest proto.InternalMessageInfo -func (m *QueryCalcJoinPoolNoSwapRequest) GetPoolId() uint64 { +func (m *QueryCalcJoinPoolNoSwapSharesRequest) GetPoolId() uint64 { if m != nil { return m.PoolId } return 0 } -type QueryCalcJoinPoolNoSwapResponse struct { +type QueryCalcJoinPoolNoSwapSharesResponse struct { TokensOut github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,1,rep,name=tokens_out,json=tokensOut,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"tokens_out" yaml:"tokens_out"` SharesOut github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,2,opt,name=shares_out,json=sharesOut,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"shares_out"` } -func (m *QueryCalcJoinPoolNoSwapResponse) Reset() { *m = QueryCalcJoinPoolNoSwapResponse{} } -func (m *QueryCalcJoinPoolNoSwapResponse) String() string { return proto.CompactTextString(m) } -func (*QueryCalcJoinPoolNoSwapResponse) ProtoMessage() {} -func (*QueryCalcJoinPoolNoSwapResponse) Descriptor() ([]byte, []int) { +func (m *QueryCalcJoinPoolNoSwapSharesResponse) Reset() { *m = QueryCalcJoinPoolNoSwapSharesResponse{} } +func (m *QueryCalcJoinPoolNoSwapSharesResponse) String() string { return proto.CompactTextString(m) } +func (*QueryCalcJoinPoolNoSwapSharesResponse) ProtoMessage() {} +func (*QueryCalcJoinPoolNoSwapSharesResponse) Descriptor() ([]byte, []int) { return fileDescriptor_d9a717df9ca609ef, []int{19} } -func (m *QueryCalcJoinPoolNoSwapResponse) XXX_Unmarshal(b []byte) error { +func (m *QueryCalcJoinPoolNoSwapSharesResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *QueryCalcJoinPoolNoSwapResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *QueryCalcJoinPoolNoSwapSharesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_QueryCalcJoinPoolNoSwapResponse.Marshal(b, m, deterministic) + return xxx_messageInfo_QueryCalcJoinPoolNoSwapSharesResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -923,19 +923,19 @@ func (m *QueryCalcJoinPoolNoSwapResponse) XXX_Marshal(b []byte, deterministic bo return b[:n], nil } } -func (m *QueryCalcJoinPoolNoSwapResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryCalcJoinPoolNoSwapResponse.Merge(m, src) +func (m *QueryCalcJoinPoolNoSwapSharesResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryCalcJoinPoolNoSwapSharesResponse.Merge(m, src) } -func (m *QueryCalcJoinPoolNoSwapResponse) XXX_Size() int { +func (m *QueryCalcJoinPoolNoSwapSharesResponse) XXX_Size() int { return m.Size() } -func (m *QueryCalcJoinPoolNoSwapResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryCalcJoinPoolNoSwapResponse.DiscardUnknown(m) +func (m *QueryCalcJoinPoolNoSwapSharesResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryCalcJoinPoolNoSwapSharesResponse.DiscardUnknown(m) } -var xxx_messageInfo_QueryCalcJoinPoolNoSwapResponse proto.InternalMessageInfo +var xxx_messageInfo_QueryCalcJoinPoolNoSwapSharesResponse proto.InternalMessageInfo -func (m *QueryCalcJoinPoolNoSwapResponse) GetTokensOut() github_com_cosmos_cosmos_sdk_types.Coins { +func (m *QueryCalcJoinPoolNoSwapSharesResponse) GetTokensOut() github_com_cosmos_cosmos_sdk_types.Coins { if m != nil { return m.TokensOut } @@ -1362,8 +1362,8 @@ func init() { proto.RegisterType((*QueryTotalPoolLiquidityResponse)(nil), "osmosis.gamm.v1beta1.QueryTotalPoolLiquidityResponse") proto.RegisterType((*QueryTotalSharesRequest)(nil), "osmosis.gamm.v1beta1.QueryTotalSharesRequest") proto.RegisterType((*QueryTotalSharesResponse)(nil), "osmosis.gamm.v1beta1.QueryTotalSharesResponse") - proto.RegisterType((*QueryCalcJoinPoolNoSwapRequest)(nil), "osmosis.gamm.v1beta1.QueryCalcJoinPoolNoSwapRequest") - proto.RegisterType((*QueryCalcJoinPoolNoSwapResponse)(nil), "osmosis.gamm.v1beta1.QueryCalcJoinPoolNoSwapResponse") + proto.RegisterType((*QueryCalcJoinPoolNoSwapSharesRequest)(nil), "osmosis.gamm.v1beta1.QueryCalcJoinPoolNoSwapSharesRequest") + proto.RegisterType((*QueryCalcJoinPoolNoSwapSharesResponse)(nil), "osmosis.gamm.v1beta1.QueryCalcJoinPoolNoSwapSharesResponse") proto.RegisterType((*QuerySpotPriceRequest)(nil), "osmosis.gamm.v1beta1.QuerySpotPriceRequest") proto.RegisterType((*QuerySpotPriceResponse)(nil), "osmosis.gamm.v1beta1.QuerySpotPriceResponse") proto.RegisterType((*QuerySwapExactAmountInRequest)(nil), "osmosis.gamm.v1beta1.QuerySwapExactAmountInRequest") @@ -1377,113 +1377,113 @@ func init() { func init() { proto.RegisterFile("osmosis/gamm/v1beta1/query.proto", fileDescriptor_d9a717df9ca609ef) } var fileDescriptor_d9a717df9ca609ef = []byte{ - // 1689 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x58, 0xcf, 0x6f, 0x1b, 0xc5, - 0x17, 0xcf, 0xa6, 0x49, 0x1a, 0x4f, 0xbe, 0xcd, 0x8f, 0x69, 0xda, 0xa6, 0x4e, 0x6b, 0xf7, 0x3b, - 0x5f, 0x7d, 0x9b, 0xb4, 0x4d, 0xd6, 0x4d, 0x9a, 0x4a, 0x28, 0xa2, 0x3f, 0x92, 0x36, 0x69, 0x1d, - 0xd1, 0x36, 0x6c, 0xab, 0x22, 0xe0, 0x60, 0x6d, 0x92, 0xc5, 0xd9, 0xd6, 0xde, 0xd9, 0x78, 0x67, - 0x9b, 0x44, 0xa8, 0xaa, 0x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0x1b, 0x95, 0xad, 0xea, - 0xd9, 0x23, 0x39, 0x11, 0x4f, 0xb9, 0xcd, 0x8c, 0xe0, 0x9b, 0x1d, 0xfc, 0xad, 0x82, 0x0e, 0x2e, - 0x38, 0xcc, 0x2c, 0xea, 0xcc, 0xa8, 0xe9, 0x5f, 0xf1, 0xa9, 0x46, 0x08, 0xea, 0xf4, 0xfb, 0xc9, - 0x99, 0xd6, 0x36, 0x01, 0xfc, 0x05, 0x01, 0xff, 0x1c, 0x3e, 0x13, 0x0d, 0x3f, 0x74, 0xff, 0x00, - 0x6d, 0x26, 0x54, 0x64, 0x82, 0x3b, 0xf8, 0x9d, 0x82, 0x92, 0x75, 0xfc, 0xe1, 0x73, 0x63, 0x0b, - 0xd8, 0x82, 0x36, 0xb9, 0x61, 0xa6, 0xd7, 0xef, 0x2a, 0xc9, 0xa2, 0x70, 0xe9, 0x3c, 0x3e, 0xfb, - 0x37, 0x5c, 0xa2, 0x2e, 0x9b, 0x5f, 0x7a, 0xfc, 0x34, 0xa5, 0x3c, 0x79, 0x9a, 0x52, 0x7e, 0x7e, - 0x9a, 0x52, 0xde, 0x7b, 0x96, 0xea, 0x78, 0xf2, 0x2c, 0xd5, 0xf1, 0xc3, 0xb3, 0x54, 0xc7, 0x6b, - 0x27, 0x43, 0xdd, 0x1b, 0x9c, 0x31, 0x59, 0xd0, 0x57, 0x1c, 0xff, 0xc0, 0x3b, 0x53, 0xd3, 0x99, - 0x2d, 0x79, 0xac, 0xe8, 0xe5, 0x56, 0x7a, 0xc4, 0xff, 0x95, 0x4e, 0xfd, 0x15, 0x00, 0x00, 0xff, - 0xff, 0x51, 0x83, 0x8f, 0x15, 0x50, 0x19, 0x00, 0x00, + // 1691 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x58, 0xcd, 0x6f, 0x14, 0x47, + 0x16, 0x77, 0x19, 0xdb, 0x78, 0xca, 0x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da, 0xb0, 0x9e, 0xea, 0x8f, 0x9b, 0x74, 0x41, 0x22, 0xff, + 0x13, 0x99, 0x6b, 0x0d, 0xb9, 0x6a, 0x66, 0xf2, 0x33, 0xec, 0x68, 0xef, 0x21, 0x3c, 0x10, 0x99, + 0xf3, 0xc8, 0x54, 0x33, 0x28, 0xe5, 0x15, 0xa3, 0xb5, 0xaa, 0x0e, 0x90, 0xe7, 0x24, 0xe4, 0x59, + 0x32, 0xd3, 0x0e, 0x64, 0x35, 0x6f, 0x90, 0x67, 0x08, 0xc7, 0x82, 0xd7, 0x37, 0x69, 0xd4, 0xc8, + 0x2a, 0xa7, 0x91, 0xc4, 0x64, 0x6b, 0xca, 0x1d, 0x56, 0x84, 0x30, 0x76, 0xc9, 0x67, 0x08, 0x1f, + 0x5e, 0x74, 0xb9, 0x55, 0x30, 0xb8, 0x59, 0xf5, 0xa2, 0x25, 0x67, 0x1b, 0x21, 0xa8, 0x33, 0x01, + 0x24, 0x66, 0xdb, 0x33, 0x02, 0xf8, 0x8b, 0x12, 0xfe, 0x45, 0x72, 0xbe, 0x36, 0xfc, 0xc8, 0xf9, + 0x03, 0xb4, 0xe9, 0x48, 0x93, 0x09, 0xcf, 0xe0, 0xe7, 0x08, 0x27, 0xea, 0xc4, 0x23, 0x26, 0xc9, + 0x36, 0xb0, 0x85, 0x0f, 0xe7, 0x86, 0x95, 0x5e, 0xff, 0x9d, 0x49, 0x97, 0x64, 0x48, 0x97, 0xc8, + 0x85, 0xd7, 0x08, 0x89, 0x79, 0x7c, 0x61, 0xf9, 0xf9, 0xcb, 0x24, 0x7a, 0xf1, 0x32, 0x89, 0xbe, + 0x79, 0x99, 0x44, 0xff, 0x7b, 0x95, 0xec, 0x7a, 0xf1, 0x2a, 0xd9, 0xf5, 0xe5, 0xab, 0x64, 0xd7, + 0xdf, 0xcf, 0x44, 0xde, 0x73, 0xb0, 0xc7, 0x54, 0xde, 0x58, 0x75, 0x83, 0x0d, 0xef, 0x4f, 0xcf, + 0xa4, 0xb7, 0xd5, 0xb6, 0xf2, 0x75, 0xb7, 0xda, 0x27, 0xff, 0xeb, 0x74, 0xf6, 0xe7, 0x00, 0x00, + 0x00, 0xff, 0xff, 0xc1, 0xc8, 0x71, 0xb8, 0x6e, 0x19, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1509,7 +1509,7 @@ type QueryClient interface { PoolType(ctx context.Context, in *QueryPoolTypeRequest, opts ...grpc.CallOption) (*QueryPoolTypeResponse, error) // Simulates joining pool without a swap. Returns the amount of shares you'd // get and tokens needed to provide - CalcJoinPoolNoSwap(ctx context.Context, in *QueryCalcJoinPoolNoSwapRequest, opts ...grpc.CallOption) (*QueryCalcJoinPoolNoSwapResponse, error) + CalcJoinPoolNoSwapShares(ctx context.Context, in *QueryCalcJoinPoolNoSwapSharesRequest, opts ...grpc.CallOption) (*QueryCalcJoinPoolNoSwapSharesResponse, error) CalcJoinPoolShares(ctx context.Context, in *QueryCalcJoinPoolSharesRequest, opts ...grpc.CallOption) (*QueryCalcJoinPoolSharesResponse, error) CalcExitPoolCoinsFromShares(ctx context.Context, in *QueryCalcExitPoolCoinsFromSharesRequest, opts ...grpc.CallOption) (*QueryCalcExitPoolCoinsFromSharesResponse, error) PoolParams(ctx context.Context, in *QueryPoolParamsRequest, opts ...grpc.CallOption) (*QueryPoolParamsResponse, error) @@ -1576,9 +1576,9 @@ func (c *queryClient) PoolType(ctx context.Context, in *QueryPoolTypeRequest, op return out, nil } -func (c *queryClient) CalcJoinPoolNoSwap(ctx context.Context, in *QueryCalcJoinPoolNoSwapRequest, opts ...grpc.CallOption) (*QueryCalcJoinPoolNoSwapResponse, error) { - out := new(QueryCalcJoinPoolNoSwapResponse) - err := c.cc.Invoke(ctx, "/osmosis.gamm.v1beta1.Query/CalcJoinPoolNoSwap", in, out, opts...) +func (c *queryClient) CalcJoinPoolNoSwapShares(ctx context.Context, in *QueryCalcJoinPoolNoSwapSharesRequest, opts ...grpc.CallOption) (*QueryCalcJoinPoolNoSwapSharesResponse, error) { + out := new(QueryCalcJoinPoolNoSwapSharesResponse) + err := c.cc.Invoke(ctx, "/osmosis.gamm.v1beta1.Query/CalcJoinPoolNoSwapShares", in, out, opts...) if err != nil { return nil, err } @@ -1670,7 +1670,7 @@ type QueryServer interface { PoolType(context.Context, *QueryPoolTypeRequest) (*QueryPoolTypeResponse, error) // Simulates joining pool without a swap. Returns the amount of shares you'd // get and tokens needed to provide - CalcJoinPoolNoSwap(context.Context, *QueryCalcJoinPoolNoSwapRequest) (*QueryCalcJoinPoolNoSwapResponse, error) + CalcJoinPoolNoSwapShares(context.Context, *QueryCalcJoinPoolNoSwapSharesRequest) (*QueryCalcJoinPoolNoSwapSharesResponse, error) CalcJoinPoolShares(context.Context, *QueryCalcJoinPoolSharesRequest) (*QueryCalcJoinPoolSharesResponse, error) CalcExitPoolCoinsFromShares(context.Context, *QueryCalcExitPoolCoinsFromSharesRequest) (*QueryCalcExitPoolCoinsFromSharesResponse, error) PoolParams(context.Context, *QueryPoolParamsRequest) (*QueryPoolParamsResponse, error) @@ -1703,8 +1703,8 @@ func (*UnimplementedQueryServer) Pool(ctx context.Context, req *QueryPoolRequest func (*UnimplementedQueryServer) PoolType(ctx context.Context, req *QueryPoolTypeRequest) (*QueryPoolTypeResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method PoolType not implemented") } -func (*UnimplementedQueryServer) CalcJoinPoolNoSwap(ctx context.Context, req *QueryCalcJoinPoolNoSwapRequest) (*QueryCalcJoinPoolNoSwapResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method CalcJoinPoolNoSwap not implemented") +func (*UnimplementedQueryServer) CalcJoinPoolNoSwapShares(ctx context.Context, req *QueryCalcJoinPoolNoSwapSharesRequest) (*QueryCalcJoinPoolNoSwapSharesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CalcJoinPoolNoSwapShares not implemented") } func (*UnimplementedQueryServer) CalcJoinPoolShares(ctx context.Context, req *QueryCalcJoinPoolSharesRequest) (*QueryCalcJoinPoolSharesResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method CalcJoinPoolShares not implemented") @@ -1825,20 +1825,20 @@ func _Query_PoolType_Handler(srv interface{}, ctx context.Context, dec func(inte return interceptor(ctx, in, info, handler) } -func _Query_CalcJoinPoolNoSwap_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryCalcJoinPoolNoSwapRequest) +func _Query_CalcJoinPoolNoSwapShares_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryCalcJoinPoolNoSwapSharesRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(QueryServer).CalcJoinPoolNoSwap(ctx, in) + return srv.(QueryServer).CalcJoinPoolNoSwapShares(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/osmosis.gamm.v1beta1.Query/CalcJoinPoolNoSwap", + FullMethod: "/osmosis.gamm.v1beta1.Query/CalcJoinPoolNoSwapShares", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).CalcJoinPoolNoSwap(ctx, req.(*QueryCalcJoinPoolNoSwapRequest)) + return srv.(QueryServer).CalcJoinPoolNoSwapShares(ctx, req.(*QueryCalcJoinPoolNoSwapSharesRequest)) } return interceptor(ctx, in, info, handler) } @@ -2012,8 +2012,8 @@ var _Query_serviceDesc = grpc.ServiceDesc{ Handler: _Query_PoolType_Handler, }, { - MethodName: "CalcJoinPoolNoSwap", - Handler: _Query_CalcJoinPoolNoSwap_Handler, + MethodName: "CalcJoinPoolNoSwapShares", + Handler: _Query_CalcJoinPoolNoSwapShares_Handler, }, { MethodName: "CalcJoinPoolShares", @@ -2661,7 +2661,7 @@ func (m *QueryTotalSharesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error return len(dAtA) - i, nil } -func (m *QueryCalcJoinPoolNoSwapRequest) Marshal() (dAtA []byte, err error) { +func (m *QueryCalcJoinPoolNoSwapSharesRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -2671,12 +2671,12 @@ func (m *QueryCalcJoinPoolNoSwapRequest) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *QueryCalcJoinPoolNoSwapRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryCalcJoinPoolNoSwapSharesRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryCalcJoinPoolNoSwapRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryCalcJoinPoolNoSwapSharesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -2699,7 +2699,7 @@ func (m *QueryCalcJoinPoolNoSwapRequest) MarshalToSizedBuffer(dAtA []byte) (int, return len(dAtA) - i, nil } -func (m *QueryCalcJoinPoolNoSwapResponse) Marshal() (dAtA []byte, err error) { +func (m *QueryCalcJoinPoolNoSwapSharesResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -2709,12 +2709,12 @@ func (m *QueryCalcJoinPoolNoSwapResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *QueryCalcJoinPoolNoSwapResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryCalcJoinPoolNoSwapSharesResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryCalcJoinPoolNoSwapResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryCalcJoinPoolNoSwapSharesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -3309,7 +3309,7 @@ func (m *QueryTotalSharesResponse) Size() (n int) { return n } -func (m *QueryCalcJoinPoolNoSwapRequest) Size() (n int) { +func (m *QueryCalcJoinPoolNoSwapSharesRequest) Size() (n int) { if m == nil { return 0 } @@ -3323,7 +3323,7 @@ func (m *QueryCalcJoinPoolNoSwapRequest) Size() (n int) { return n } -func (m *QueryCalcJoinPoolNoSwapResponse) Size() (n int) { +func (m *QueryCalcJoinPoolNoSwapSharesResponse) Size() (n int) { if m == nil { return 0 } @@ -4976,7 +4976,7 @@ func (m *QueryTotalSharesResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryCalcJoinPoolNoSwapRequest) Unmarshal(dAtA []byte) error { +func (m *QueryCalcJoinPoolNoSwapSharesRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -4999,10 +4999,10 @@ func (m *QueryCalcJoinPoolNoSwapRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryCalcJoinPoolNoSwapRequest: wiretype end group for non-group") + return fmt.Errorf("proto: QueryCalcJoinPoolNoSwapSharesRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryCalcJoinPoolNoSwapRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryCalcJoinPoolNoSwapSharesRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -5079,7 +5079,7 @@ func (m *QueryCalcJoinPoolNoSwapRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryCalcJoinPoolNoSwapResponse) Unmarshal(dAtA []byte) error { +func (m *QueryCalcJoinPoolNoSwapSharesResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -5102,10 +5102,10 @@ func (m *QueryCalcJoinPoolNoSwapResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryCalcJoinPoolNoSwapResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QueryCalcJoinPoolNoSwapSharesResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryCalcJoinPoolNoSwapResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryCalcJoinPoolNoSwapSharesResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: From d27f5f521eaf422caa2758f8ca47afec14a92921 Mon Sep 17 00:00:00 2001 From: George McAskill <42020095+georgemc98@users.noreply.github.com> Date: Thu, 10 Nov 2022 07:22:29 -0600 Subject: [PATCH 46/59] fix: change tokens_in type --- proto/osmosis/gamm/v1beta1/query.proto | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/proto/osmosis/gamm/v1beta1/query.proto b/proto/osmosis/gamm/v1beta1/query.proto index 32a1497c05e..a20959609ff 100644 --- a/proto/osmosis/gamm/v1beta1/query.proto +++ b/proto/osmosis/gamm/v1beta1/query.proto @@ -193,9 +193,8 @@ message QueryTotalSharesResponse { //=============================== CalcJoinPoolNoSwapShares message QueryCalcJoinPoolNoSwapSharesRequest { uint64 pool_id = 1 [ (gogoproto.moretags) = "yaml:\"pool_id\"" ]; - string tokens_in = 2 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Coins", - (gogoproto.moretags) = "yaml:\"tokens_in\"", + repeated cosmos.base.v1beta1.Coin tokens_in = 2 [ + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", (gogoproto.nullable) = false ]; } From 1885ab39b21d3cbfb2f21e29c3f97d7fc8173ddb Mon Sep 17 00:00:00 2001 From: George McAskill <42020095+georgemc98@users.noreply.github.com> Date: Thu, 10 Nov 2022 09:16:17 -0600 Subject: [PATCH 47/59] test: fix TestCalcJoinPoolNoSwapShares test --- x/gamm/keeper/grpc_query_test.go | 6 +- x/gamm/types/query.pb.go | 264 ++++++++++++++++--------------- 2 files changed, 142 insertions(+), 128 deletions(-) diff --git a/x/gamm/keeper/grpc_query_test.go b/x/gamm/keeper/grpc_query_test.go index 21453ebc212..f0c11769c18 100644 --- a/x/gamm/keeper/grpc_query_test.go +++ b/x/gamm/keeper/grpc_query_test.go @@ -112,10 +112,10 @@ func (suite *KeeperTestSuite) TestCalcJoinPoolNoSwapShares() { nil, }, { - "valid single asset join test case", + "invalid single asset join test case", poolId, sdk.NewCoins(sdk.NewCoin("uosmo", sdk.NewInt(1000000))), - nil, + errors.New("no-swap joins require LP'ing with all assets in pool"), }, { "pool id does not exist", @@ -133,7 +133,7 @@ func (suite *KeeperTestSuite) TestCalcJoinPoolNoSwapShares() { "join pool with incorrect amount of assets", poolId, sdk.NewCoins(sdk.NewCoin("uosmo", sdk.NewInt(10000)), sdk.NewCoin("bar", sdk.NewInt(10000))), - errors.New("balancer pool only supports LP'ing with one asset or all assets in pool"), + errors.New("no-swap joins require LP'ing with all assets in pool"), }, } diff --git a/x/gamm/types/query.pb.go b/x/gamm/types/query.pb.go index 49c3beb12ed..297540e16bd 100644 --- a/x/gamm/types/query.pb.go +++ b/x/gamm/types/query.pb.go @@ -851,10 +851,10 @@ func (m *QueryTotalSharesResponse) GetTotalShares() types1.Coin { return types1.Coin{} } -// =============================== SimJoinPoolNoSwap +// =============================== CalcJoinPoolNoSwapShares type QueryCalcJoinPoolNoSwapSharesRequest struct { PoolId uint64 `protobuf:"varint,1,opt,name=pool_id,json=poolId,proto3" json:"pool_id,omitempty" yaml:"pool_id"` - TokensIn github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,2,opt,name=tokens_in,json=tokensIn,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Coins" json:"tokens_in" yaml:"tokens_in"` + TokensIn github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,2,rep,name=tokens_in,json=tokensIn,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"tokens_in"` } func (m *QueryCalcJoinPoolNoSwapSharesRequest) Reset() { *m = QueryCalcJoinPoolNoSwapSharesRequest{} } @@ -897,6 +897,13 @@ func (m *QueryCalcJoinPoolNoSwapSharesRequest) GetPoolId() uint64 { return 0 } +func (m *QueryCalcJoinPoolNoSwapSharesRequest) GetTokensIn() github_com_cosmos_cosmos_sdk_types.Coins { + if m != nil { + return m.TokensIn + } + return nil +} + type QueryCalcJoinPoolNoSwapSharesResponse struct { TokensOut github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,1,rep,name=tokens_out,json=tokensOut,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"tokens_out" yaml:"tokens_out"` SharesOut github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,2,opt,name=shares_out,json=sharesOut,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"shares_out"` @@ -1377,113 +1384,112 @@ func init() { func init() { proto.RegisterFile("osmosis/gamm/v1beta1/query.proto", fileDescriptor_d9a717df9ca609ef) } var fileDescriptor_d9a717df9ca609ef = []byte{ - // 1691 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x58, 0xcd, 0x6f, 0x14, 0x47, - 0x16, 0x77, 0x19, 0xdb, 0x78, 0xca, 0x8b, 0x3f, 0x0a, 0x03, 0xc3, 0x18, 0x66, 0xd8, 0xda, 0x05, - 0x1b, 0xb0, 0x7b, 0xb0, 0x31, 0xd2, 0xca, 0xbb, 0x7c, 0xd8, 0x60, 0xc3, 0x58, 0x0b, 0x78, 0x1b, - 0xc4, 0x6a, 0x77, 0x0f, 0xa3, 0xb6, 0xdd, 0x3b, 0x6e, 0x98, 0xe9, 0x6a, 0x4f, 0x57, 0x63, 0x5b, - 0x2b, 0x84, 0x84, 0x56, 0x7b, 0xda, 0xc3, 0x4a, 0x2c, 0x1c, 0x22, 0xa4, 0xe4, 0x90, 0x43, 0x94, - 0x73, 0x94, 0xfc,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64, 0x6b, 0xca, 0x1d, 0x56, 0x84, 0x30, 0x76, 0xc9, 0x67, 0x08, 0x1f, - 0x5e, 0x74, 0xb9, 0x55, 0x30, 0xb8, 0x59, 0xf5, 0xa2, 0x25, 0x67, 0x1b, 0x21, 0xa8, 0x33, 0x01, - 0x24, 0x66, 0xdb, 0x33, 0x02, 0xf8, 0x8b, 0x12, 0xfe, 0x45, 0x72, 0xbe, 0x36, 0xfc, 0xc8, 0xf9, - 0x03, 0xb4, 0xe9, 0x48, 0x93, 0x09, 0xcf, 0xe0, 0xe7, 0x08, 0x27, 0xea, 0xc4, 0x23, 0x26, 0xc9, - 0x36, 0xb0, 0x85, 0x0f, 0xe7, 0x86, 0x95, 0x5e, 0xff, 0x9d, 0x49, 0x97, 0x64, 0x48, 0x97, 0xc8, - 0x85, 0xd7, 0x08, 0x89, 0x79, 0x7c, 0x61, 0xf9, 0xf9, 0xcb, 0x24, 0x7a, 0xf1, 0x32, 0x89, 0xbe, - 0x79, 0x99, 0x44, 0xff, 0x7b, 0x95, 0xec, 0x7a, 0xf1, 0x2a, 0xd9, 0xf5, 0xe5, 0xab, 0x64, 0xd7, - 0xdf, 0xcf, 0x44, 0xde, 0x73, 0xb0, 0xc7, 0x54, 0xde, 0x58, 0x75, 0x83, 0x0d, 0xef, 0x4f, 0xcf, - 0xa4, 0xb7, 0xd5, 0xb6, 0xf2, 0x75, 0xb7, 0xda, 0x27, 0xff, 0xeb, 0x74, 0xf6, 0xe7, 0x00, 0x00, - 0x00, 0xff, 0xff, 0xc1, 0xc8, 0x71, 0xb8, 0x6e, 0x19, 0x00, 0x00, + // 1673 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x58, 0x4b, 0x6c, 0x14, 0x47, + 0x1a, 0x76, 0x19, 0xdb, 0x78, 0xca, 0x8b, 0x1f, 0x85, 0x81, 0x61, 0x0c, 0x33, 0x6c, 0xed, 0x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00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -2681,16 +2687,20 @@ func (m *QueryCalcJoinPoolNoSwapSharesRequest) MarshalToSizedBuffer(dAtA []byte) _ = i var l int _ = l - { - size := m.TokensIn.Size() - i -= size - if _, err := m.TokensIn.MarshalTo(dAtA[i:]); err != nil { - return 0, err + if len(m.TokensIn) > 0 { + for iNdEx := len(m.TokensIn) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.TokensIn[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 } - i = encodeVarintQuery(dAtA, i, uint64(size)) } - i-- - dAtA[i] = 0x12 if m.PoolId != 0 { i = encodeVarintQuery(dAtA, i, uint64(m.PoolId)) i-- @@ -3318,8 +3328,12 @@ func (m *QueryCalcJoinPoolNoSwapSharesRequest) Size() (n int) { if m.PoolId != 0 { n += 1 + sovQuery(uint64(m.PoolId)) } - l = m.TokensIn.Size() - n += 1 + l + sovQuery(uint64(l)) + if len(m.TokensIn) > 0 { + for _, e := range m.TokensIn { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } return n } @@ -5028,7 +5042,7 @@ func (m *QueryCalcJoinPoolNoSwapSharesRequest) Unmarshal(dAtA []byte) error { if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field TokensIn", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -5038,23 +5052,23 @@ func (m *QueryCalcJoinPoolNoSwapSharesRequest) 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.TokensIn.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.TokensIn = append(m.TokensIn, types1.Coin{}) + if err := m.TokensIn[len(m.TokensIn)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex From 2165705ae962133da26640e57c31da1c5e53a32f Mon Sep 17 00:00:00 2001 From: George McAskill <42020095+georgemc98@users.noreply.github.com> Date: Fri, 11 Nov 2022 17:56:05 -0600 Subject: [PATCH 48/59] feat: build query.pb.go file --- x/gamm/types/query.pb.go | 236 ++++++++++++++++++++------------------- 1 file changed, 121 insertions(+), 115 deletions(-) diff --git a/x/gamm/types/query.pb.go b/x/gamm/types/query.pb.go index b1f7f091354..728f50f2402 100644 --- a/x/gamm/types/query.pb.go +++ b/x/gamm/types/query.pb.go @@ -1020,7 +1020,7 @@ func (m *QueryPoolsWithFilterRequest) Reset() { *m = QueryPoolsWithFilte func (m *QueryPoolsWithFilterRequest) String() string { return proto.CompactTextString(m) } func (*QueryPoolsWithFilterRequest) ProtoMessage() {} func (*QueryPoolsWithFilterRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_d9a717df9ca609ef, []int{19} + return fileDescriptor_d9a717df9ca609ef, []int{21} } func (m *QueryPoolsWithFilterRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1071,7 +1071,7 @@ func (m *QueryPoolsWithFilterResponse) Reset() { *m = QueryPoolsWithFilt func (m *QueryPoolsWithFilterResponse) String() string { return proto.CompactTextString(m) } func (*QueryPoolsWithFilterResponse) ProtoMessage() {} func (*QueryPoolsWithFilterResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_d9a717df9ca609ef, []int{20} + return fileDescriptor_d9a717df9ca609ef, []int{22} } func (m *QueryPoolsWithFilterResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1118,7 +1118,7 @@ func (m *QuerySpotPriceResponse) Reset() { *m = QuerySpotPriceResponse{} func (m *QuerySpotPriceResponse) String() string { return proto.CompactTextString(m) } func (*QuerySpotPriceResponse) ProtoMessage() {} func (*QuerySpotPriceResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_d9a717df9ca609ef, []int{21} + return fileDescriptor_d9a717df9ca609ef, []int{23} } func (m *QuerySpotPriceResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1166,7 +1166,7 @@ func (m *QuerySwapExactAmountInRequest) Reset() { *m = QuerySwapExactAmo func (m *QuerySwapExactAmountInRequest) String() string { return proto.CompactTextString(m) } func (*QuerySwapExactAmountInRequest) ProtoMessage() {} func (*QuerySwapExactAmountInRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_d9a717df9ca609ef, []int{22} + return fileDescriptor_d9a717df9ca609ef, []int{24} } func (m *QuerySwapExactAmountInRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1231,7 +1231,7 @@ func (m *QuerySwapExactAmountInResponse) Reset() { *m = QuerySwapExactAm func (m *QuerySwapExactAmountInResponse) String() string { return proto.CompactTextString(m) } func (*QuerySwapExactAmountInResponse) ProtoMessage() {} func (*QuerySwapExactAmountInResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_d9a717df9ca609ef, []int{23} + return fileDescriptor_d9a717df9ca609ef, []int{25} } func (m *QuerySwapExactAmountInResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1272,7 +1272,7 @@ func (m *QuerySwapExactAmountOutRequest) Reset() { *m = QuerySwapExactAm func (m *QuerySwapExactAmountOutRequest) String() string { return proto.CompactTextString(m) } func (*QuerySwapExactAmountOutRequest) ProtoMessage() {} func (*QuerySwapExactAmountOutRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_d9a717df9ca609ef, []int{24} + return fileDescriptor_d9a717df9ca609ef, []int{26} } func (m *QuerySwapExactAmountOutRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1337,7 +1337,7 @@ func (m *QuerySwapExactAmountOutResponse) Reset() { *m = QuerySwapExactA func (m *QuerySwapExactAmountOutResponse) String() string { return proto.CompactTextString(m) } func (*QuerySwapExactAmountOutResponse) ProtoMessage() {} func (*QuerySwapExactAmountOutResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_d9a717df9ca609ef, []int{25} + return fileDescriptor_d9a717df9ca609ef, []int{27} } func (m *QuerySwapExactAmountOutResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1373,7 +1373,7 @@ func (m *QueryTotalLiquidityRequest) Reset() { *m = QueryTotalLiquidityR func (m *QueryTotalLiquidityRequest) String() string { return proto.CompactTextString(m) } func (*QueryTotalLiquidityRequest) ProtoMessage() {} func (*QueryTotalLiquidityRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_d9a717df9ca609ef, []int{26} + return fileDescriptor_d9a717df9ca609ef, []int{28} } func (m *QueryTotalLiquidityRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1410,7 +1410,7 @@ func (m *QueryTotalLiquidityResponse) Reset() { *m = QueryTotalLiquidity func (m *QueryTotalLiquidityResponse) String() string { return proto.CompactTextString(m) } func (*QueryTotalLiquidityResponse) ProtoMessage() {} func (*QueryTotalLiquidityResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_d9a717df9ca609ef, []int{27} + return fileDescriptor_d9a717df9ca609ef, []int{29} } func (m *QueryTotalLiquidityResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1482,112 +1482,118 @@ func init() { func init() { proto.RegisterFile("osmosis/gamm/v1beta1/query.proto", fileDescriptor_d9a717df9ca609ef) } var fileDescriptor_d9a717df9ca609ef = []byte{ - // 1673 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x58, 0x4b, 0x6c, 0x14, 0x47, - 0x1a, 0x76, 0x19, 0xdb, 0x78, 0xca, 0x8b, 0x1f, 0x85, 0x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0x84, 0xde, 0x67, 0x28, 0x75, 0x19, 0x00, 0x00, + // 1774 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x58, 0x4b, 0x6c, 0x1c, 0x4b, + 0x15, 0x75, 0x39, 0xb6, 0x9f, 0xa7, 0xfc, 0xfc, 0xab, 0xe7, 0x24, 0x93, 0xb1, 0x33, 0x13, 0x8a, + 0xf7, 0x6c, 0xbf, 0xc4, 0xee, 0x89, 0x1d, 0x47, 0x42, 0x86, 0x7c, 0xec, 0xc4, 0x8e, 0xc7, 0x22, + 0xb1, 0xe9, 0x84, 0x44, 0xc0, 0x62, 0xd4, 0xb6, 0x3b, 0xe3, 0x4e, 0x66, 0xba, 0xda, 0xd3, 0xd5, + 0xb1, 0x2d, 0x14, 0x45, 0x8a, 0x10, 0x62, 0xc1, 0x02, 0x29, 0x24, 0x0b, 0x14, 0x09, 0x16, 0x08, + 0x10, 0x6b, 0x24, 0x56, 0xac, 0x50, 0xa4, 0x08, 0x09, 0x29, 0x88, 0x0d, 0x62, 0x31, 0xa0, 0x04, + 0x24, 0xd6, 0xde, 0xb0, 0x04, 0x55, 0xd5, 0xed, 0xcf, 0xfc, 0x3f, 0x21, 0x12, 0x6f, 0x65, 0x4f, + 0xdd, 0x4f, 0x9d, 0x7b, 0xee, 0xad, 0xdb, 0xb7, 0x0a, 0x9f, 0x61, 0x6e, 0x81, 0xb9, 0x96, 0x9b, + 0xce, 0x19, 0x85, 0x42, 0xfa, 0xd1, 0xdc, 0x96, 0xc9, 0x8d, 0xb9, 0xf4, 0x9e, 0x67, 0x16, 0x0f, + 0x35, 0xa7, 0xc8, 0x38, 0x23, 0x63, 0xa0, 0xa1, 0x09, 0x0d, 0x0d, 0x34, 0x12, 0x63, 0x39, 0x96, + 0x63, 0x52, 0x21, 0x2d, 0xfe, 0x53, 0xba, 0x89, 0xd3, 0x35, 0xbd, 0xf1, 0x03, 0x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, 0x97, + 0xfc, 0x11, 0xe1, 0x53, 0x2b, 0x2e, 0xb7, 0x0a, 0x06, 0x37, 0xab, 0x46, 0x6f, 0x72, 0xa1, 0x11, + 0x82, 0x3a, 0x57, 0x95, 0xc4, 0x42, 0x7b, 0x46, 0x00, 0x7f, 0x45, 0xc2, 0xbf, 0x42, 0x2e, 0xd5, + 0x86, 0x1f, 0x39, 0x7f, 0x80, 0x36, 0x1d, 0x69, 0x32, 0xe1, 0x19, 0xfc, 0x13, 0xc2, 0x89, 0x3a, + 0xf1, 0x6c, 0x78, 0x9c, 0xb4, 0x81, 0x2d, 0x9c, 0xf0, 0x1b, 0x56, 0x7a, 0xfd, 0x81, 0x98, 0xae, + 0xca, 0x90, 0xae, 0x92, 0xcb, 0xef, 0x11, 0x12, 0xf3, 0xf8, 0xf2, 0xfa, 0xeb, 0xb7, 0x49, 0xf4, + 0xe6, 0x6d, 0x12, 0xfd, 0xfd, 0x6d, 0x12, 0xfd, 0xe8, 0x5d, 0xb2, 0xeb, 0xcd, 0xbb, 0x64, 0xd7, + 0x5f, 0xde, 0x25, 0xbb, 0xbe, 0x7d, 0x3e, 0x32, 0x78, 0xc2, 0x1e, 0xb3, 0x79, 0x63, 0xcb, 0x0d, + 0x36, 0x7c, 0x34, 0x37, 0x9f, 0x3e, 0x50, 0xdb, 0xca, 0x31, 0x74, 0xab, 0x4f, 0xde, 0x6c, 0x2f, + 0xfc, 0x37, 0x00, 0x00, 0xff, 0xff, 0x86, 0xdb, 0xde, 0xd2, 0x3d, 0x1b, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. From 4c4b9f089f563e2b4e28c0c74e64313dc408a153 Mon Sep 17 00:00:00 2001 From: Ruslan Akhtariev Date: Mon, 14 Nov 2022 10:38:55 +0700 Subject: [PATCH 49/59] name version >> --- .github/workflows/docker.yml | 2 +- .github/workflows/mutest-issue-generate.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 09d9132f8cf..3a201f6da0d 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -56,7 +56,7 @@ jobs: id: find_go_version run: | GO_VERSION=$(cat go.mod | grep -E 'go [0-9].[0-9]+' | cut -d ' ' -f 2) - echo "::set-output name=go_version::$(echo ${GO_VERSION})" + echo "name=go_version::$(echo ${GO_VERSION})" >> $GITHUB_OUTPUT # Distroless Docker image (default) - diff --git a/.github/workflows/mutest-issue-generate.yml b/.github/workflows/mutest-issue-generate.yml index 44ac6559e39..4a9581b5cbd 100644 --- a/.github/workflows/mutest-issue-generate.yml +++ b/.github/workflows/mutest-issue-generate.yml @@ -39,7 +39,7 @@ jobs: name: Get today's date id: date run: | - echo "::set-output name=today::$(date "+%Y/%m/%d")" + echo "name=today::$(date "+%Y/%m/%d")" >> $GITHUB_OUTPUT - name: Read mutation_test_txt file id: result From 25f5f54e60d7c683c428152d5cc1b1a61c2d2c8f Mon Sep 17 00:00:00 2001 From: Ruslan Akhtariev Date: Mon, 14 Nov 2022 10:46:47 +0700 Subject: [PATCH 50/59] update action v --- .github/workflows/required_labels.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/required_labels.yml b/.github/workflows/required_labels.yml index a0abea269e9..5a4173ed136 100644 --- a/.github/workflows/required_labels.yml +++ b/.github/workflows/required_labels.yml @@ -9,7 +9,7 @@ jobs: state_compatability_labels: runs-on: ubuntu-latest steps: - - uses: mheap/github-action-required-labels@v2 + - uses: mheap/github-action-required-labels@v2.2.3 env: GITHUB_TOKEN: ${{ secrets.ADD_TO_PROJECT_PAT }} with: #Require one of the following labels From 77e1fba8e68578e9a3d8c71971f97479d0e53820 Mon Sep 17 00:00:00 2001 From: Ruslan Akhtariev Date: Mon, 14 Nov 2022 11:24:50 +0700 Subject: [PATCH 51/59] check variable --- .github/workflows/required_labels.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/required_labels.yml b/.github/workflows/required_labels.yml index 5a4173ed136..8a354ecf401 100644 --- a/.github/workflows/required_labels.yml +++ b/.github/workflows/required_labels.yml @@ -9,6 +9,8 @@ jobs: state_compatability_labels: runs-on: ubuntu-latest steps: + - name: Check + run: echo ${{ secrets.ADD_TO_PROJECT_PAT }} - uses: mheap/github-action-required-labels@v2.2.3 env: GITHUB_TOKEN: ${{ secrets.ADD_TO_PROJECT_PAT }} From 5f8bf752719b5f0af35a4cf48626f6a28a4c377e Mon Sep 17 00:00:00 2001 From: Ruslan Akhtariev Date: Mon, 14 Nov 2022 12:54:37 +0700 Subject: [PATCH 52/59] action from personal fork --- .github/workflows/required_labels.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/required_labels.yml b/.github/workflows/required_labels.yml index 8a354ecf401..f8adeb6ac41 100644 --- a/.github/workflows/required_labels.yml +++ b/.github/workflows/required_labels.yml @@ -9,12 +9,10 @@ jobs: state_compatability_labels: runs-on: ubuntu-latest steps: - - name: Check - run: echo ${{ secrets.ADD_TO_PROJECT_PAT }} - - uses: mheap/github-action-required-labels@v2.2.3 + - uses: RusAkh/github-action-required-labels@v2.2.3 env: GITHUB_TOKEN: ${{ secrets.ADD_TO_PROJECT_PAT }} - with: #Require one of the following labels + with: # Require one of the following labels mode: exactly count: 1 labels: "V:state/breaking, V:state/compatible/no_backport, V:state/compatible/backport" \ No newline at end of file From 49499bd474144a28ad0a1ce09d311c2a8d1442c1 Mon Sep 17 00:00:00 2001 From: Ruslan Akhtariev Date: Mon, 14 Nov 2022 12:58:16 +0700 Subject: [PATCH 53/59] remove tag --- .github/workflows/required_labels.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/required_labels.yml b/.github/workflows/required_labels.yml index f8adeb6ac41..69f14943287 100644 --- a/.github/workflows/required_labels.yml +++ b/.github/workflows/required_labels.yml @@ -9,7 +9,7 @@ jobs: state_compatability_labels: runs-on: ubuntu-latest steps: - - uses: RusAkh/github-action-required-labels@v2.2.3 + - uses: RusAkh/github-action-required-labels env: GITHUB_TOKEN: ${{ secrets.ADD_TO_PROJECT_PAT }} with: # Require one of the following labels From 371a4d21c2a810384c25a61af7f3577c614a51fc Mon Sep 17 00:00:00 2001 From: George <42020095+georgemc98@users.noreply.github.com> Date: Mon, 14 Nov 2022 09:28:11 -0600 Subject: [PATCH 54/59] chore: remove whitespace Co-authored-by: Roman --- x/gamm/keeper/export_test.go | 2 -- 1 file changed, 2 deletions(-) diff --git a/x/gamm/keeper/export_test.go b/x/gamm/keeper/export_test.go index 395f8d31e4d..31119cbf1c7 100644 --- a/x/gamm/keeper/export_test.go +++ b/x/gamm/keeper/export_test.go @@ -19,5 +19,3 @@ func (k Keeper) SetPool(ctx sdk.Context, pool types.PoolI) error { func (k Keeper) GetNextPoolIdAndIncrement(ctx sdk.Context) uint64 { return k.getNextPoolIdAndIncrement(ctx) } - -// From 86f92c04b7091cb98dc8569b61c7801b523edd92 Mon Sep 17 00:00:00 2001 From: George McAskill <42020095+georgemc98@users.noreply.github.com> Date: Mon, 14 Nov 2022 09:29:54 -0600 Subject: [PATCH 55/59] chore: workflow files --- .github/workflows/docker.yml | 2 +- .github/workflows/mutest-issue-generate.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 3a201f6da0d..cfef92d9ce9 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -56,7 +56,7 @@ jobs: id: find_go_version run: | GO_VERSION=$(cat go.mod | grep -E 'go [0-9].[0-9]+' | cut -d ' ' -f 2) - echo "name=go_version::$(echo ${GO_VERSION})" >> $GITHUB_OUTPUT + echo "::set-output name=today::$(date "+%Y/%m/%d")" # Distroless Docker image (default) - diff --git a/.github/workflows/mutest-issue-generate.yml b/.github/workflows/mutest-issue-generate.yml index 4a9581b5cbd..44ac6559e39 100644 --- a/.github/workflows/mutest-issue-generate.yml +++ b/.github/workflows/mutest-issue-generate.yml @@ -39,7 +39,7 @@ jobs: name: Get today's date id: date run: | - echo "name=today::$(date "+%Y/%m/%d")" >> $GITHUB_OUTPUT + echo "::set-output name=today::$(date "+%Y/%m/%d")" - name: Read mutation_test_txt file id: result From 2654ea7dfbfbdcd4b54a133827c34a631c0745f7 Mon Sep 17 00:00:00 2001 From: George McAskill <42020095+georgemc98@users.noreply.github.com> Date: Mon, 14 Nov 2022 09:30:56 -0600 Subject: [PATCH 56/59] chore: fix docker.yml file --- .github/workflows/docker.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index cfef92d9ce9..09d9132f8cf 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -56,7 +56,7 @@ jobs: id: find_go_version run: | GO_VERSION=$(cat go.mod | grep -E 'go [0-9].[0-9]+' | cut -d ' ' -f 2) - echo "::set-output name=today::$(date "+%Y/%m/%d")" + echo "::set-output name=go_version::$(echo ${GO_VERSION})" # Distroless Docker image (default) - From e55493a3194aa73778796f3853e7af93f60fd0ec Mon Sep 17 00:00:00 2001 From: George McAskill <42020095+georgemc98@users.noreply.github.com> Date: Mon, 14 Nov 2022 09:35:57 -0600 Subject: [PATCH 57/59] chore: fix required_labels.yml --- .github/workflows/required_labels.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/required_labels.yml b/.github/workflows/required_labels.yml index 69f14943287..acb67aef590 100644 --- a/.github/workflows/required_labels.yml +++ b/.github/workflows/required_labels.yml @@ -9,7 +9,7 @@ jobs: state_compatability_labels: runs-on: ubuntu-latest steps: - - uses: RusAkh/github-action-required-labels + - uses: mheap/github-action-required-labels@v2 env: GITHUB_TOKEN: ${{ secrets.ADD_TO_PROJECT_PAT }} with: # Require one of the following labels From c02d0af68099fe1602c805ca7a89991a630e23cb Mon Sep 17 00:00:00 2001 From: George McAskill <42020095+georgemc98@users.noreply.github.com> Date: Mon, 14 Nov 2022 09:36:26 -0600 Subject: [PATCH 58/59] chore: remove space --- .github/workflows/required_labels.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/required_labels.yml b/.github/workflows/required_labels.yml index acb67aef590..a0abea269e9 100644 --- a/.github/workflows/required_labels.yml +++ b/.github/workflows/required_labels.yml @@ -12,7 +12,7 @@ jobs: - uses: mheap/github-action-required-labels@v2 env: GITHUB_TOKEN: ${{ secrets.ADD_TO_PROJECT_PAT }} - with: # Require one of the following labels + with: #Require one of the following labels mode: exactly count: 1 labels: "V:state/breaking, V:state/compatible/no_backport, V:state/compatible/backport" \ No newline at end of file From 2aa3637f5ed005b8ffcd0828c4bd08c333de0062 Mon Sep 17 00:00:00 2001 From: Roman Date: Mon, 14 Nov 2022 21:47:28 -0500 Subject: [PATCH 59/59] Update CHANGELOG.md Co-authored-by: Matt, Park <45252226+mattverse@users.noreply.github.com> --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 949465c656b..c550a45be9b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -47,7 +47,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 * [#2788](https://github.com/osmosis-labs/osmosis/pull/2788) Add logarithm base 2 implementation. * [#2739](https://github.com/osmosis-labs/osmosis/pull/2739),[#3356](https://github.com/osmosis-labs/osmosis/pull/3356) Add pool type query, and add it to stargate whitelist * [#2956](https://github.com/osmosis-labs/osmosis/issues/2956) Add queries for calculating amount of shares/tokens you get by providing X tokens/shares when entering/exiting a pool -* [#3217](https://github.com/osmosis-labs/osmosis/pull/3217) Add three pool queries to the registered Stargate queries list. +* [#3217](https://github.com/osmosis-labs/osmosis/pull/3217) Add `CalcJoinPoolShares`, `CalcExitPoolCoinsFromShares`, `CalcJoinPoolNoSwapShares` to the registered Stargate queries list. * [#3313](https://github.com/osmosis-labs/osmosis/pull/3313) Upgrade to IBC v3.4.0, allowing for IBC transfers with metadata. * [#3335](https://github.com/osmosis-labs/osmosis/pull/3335) Add v2 spot price queries - The v1beta1 queries actually have base asset and quote asset reversed, so you were always getting 1/correct spot price. People fixed this by reordering the arguments.