This commit is contained in:
0xmuralik
2022-10-17 16:33:31 +05:30
parent 74ed0f7e0f
commit 482d597318
40 changed files with 636 additions and 628 deletions
+3 -3
View File
@@ -24,7 +24,7 @@ func GetQueryCmd() *cobra.Command {
bondQueryCmd.AddCommand(
GetQueryParamsCmd(),
GetQueryBondLists(),
GetBondByIdCmd(),
GetBondByIDCmd(),
GetBondListByOwnerCmd(),
GetBondModuleBalanceCmd(),
)
@@ -99,7 +99,7 @@ $ %s query %s list
}
// GetBondByIdCmd implements the bond info by id query command.
func GetBondByIdCmd() *cobra.Command {
func GetBondByIDCmd() *cobra.Command {
cmd := &cobra.Command{
Use: "get [bond Id]",
Short: "Get bond.",
@@ -122,7 +122,7 @@ $ %s query bond get {BOND ID}
id := args[0]
res, err := queryClient.GetBondById(cmd.Context(), &types.QueryGetBondByIdRequest{Id: id})
res, err := queryClient.GetBondByID(cmd.Context(), &types.QueryGetBondByIDRequest{Id: id})
if err != nil {
return err
}
+6 -6
View File
@@ -65,13 +65,13 @@ func RefillBondCmd() *cobra.Command {
if err != nil {
return err
}
bondId := args[0]
bondID := args[0]
coin, err := sdk.ParseCoinNormalized(args[1])
if err != nil {
return err
}
msg := types.NewMsgRefillBond(bondId, coin, clientCtx.GetFromAddress())
msg := types.NewMsgRefillBond(bondID, coin, clientCtx.GetFromAddress())
return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), &msg)
},
}
@@ -91,13 +91,13 @@ func WithdrawBondCmd() *cobra.Command {
if err != nil {
return err
}
bondId := args[0]
bondID := args[0]
coin, err := sdk.ParseCoinNormalized(args[1])
if err != nil {
return err
}
msg := types.NewMsgWithdrawBond(bondId, coin, clientCtx.GetFromAddress())
msg := types.NewMsgWithdrawBond(bondID, coin, clientCtx.GetFromAddress())
return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), &msg)
},
}
@@ -117,8 +117,8 @@ func CancelBondCmd() *cobra.Command {
if err != nil {
return err
}
bondId := args[0]
msg := types.NewMsgCancelBond(bondId, clientCtx.GetFromAddress())
bondID := args[0]
msg := types.NewMsgCancelBond(bondID, clientCtx.GetFromAddress())
return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), &msg)
},
}
+22 -22
View File
@@ -13,7 +13,7 @@ import (
func (s *IntegrationTestSuite) TestGRPCGetBonds() {
val := s.network.Validators[0]
sr := s.Require()
reqUrl := fmt.Sprintf("%s/vulcanize/bond/v1beta1/bonds", val.APIAddress)
reqURL := fmt.Sprintf("%s/vulcanize/bond/v1beta1/bonds", val.APIAddress)
testCases := []struct {
name string
@@ -24,7 +24,7 @@ func (s *IntegrationTestSuite) TestGRPCGetBonds() {
}{
{
"invalid request with headers",
reqUrl + "asdasdas",
reqURL + "asdasdas",
true,
"",
func() {
@@ -32,7 +32,7 @@ func (s *IntegrationTestSuite) TestGRPCGetBonds() {
},
{
"valid request",
reqUrl,
reqURL,
false,
"",
func() {
@@ -58,9 +58,9 @@ func (s *IntegrationTestSuite) TestGRPCGetBonds() {
func (s *IntegrationTestSuite) TestGRPCGetParams() {
val := s.network.Validators[0]
sr := s.Require()
reqUrl := fmt.Sprintf("%s/vulcanize/bond/v1beta1/params", val.APIAddress)
reqURL := fmt.Sprintf("%s/vulcanize/bond/v1beta1/params", val.APIAddress)
resp, err := rest.GetRequest(reqUrl)
resp, err := rest.GetRequest(reqURL)
s.Require().NoError(err)
var params bondtypes.QueryParamsResponse
@@ -73,7 +73,7 @@ func (s *IntegrationTestSuite) TestGRPCGetParams() {
func (s *IntegrationTestSuite) TestGRPCGetBondsByOwner() {
val := s.network.Validators[0]
sr := s.Require()
reqUrl := val.APIAddress + "/vulcanize/bond/v1beta1/by-owner/%s"
reqURL := val.APIAddress + "/vulcanize/bond/v1beta1/by-owner/%s"
testCases := []struct {
name string
@@ -83,14 +83,14 @@ func (s *IntegrationTestSuite) TestGRPCGetBondsByOwner() {
}{
{
"empty list",
fmt.Sprintf(reqUrl, "asdasd"),
fmt.Sprintf(reqURL, "asdasd"),
true,
func() {
},
},
{
"valid request",
fmt.Sprintf(reqUrl, s.accountAddress),
fmt.Sprintf(reqURL, s.accountAddress),
false,
func() {
s.createBond()
@@ -121,10 +121,10 @@ func (s *IntegrationTestSuite) TestGRPCGetBondsByOwner() {
}
}
func (s *IntegrationTestSuite) TestGRPCGetBondById() {
func (s *IntegrationTestSuite) TestGRPCGetBondByID() {
val := s.network.Validators[0]
sr := s.Require()
reqUrl := val.APIAddress + "/vulcanize/bond/v1beta1/bonds/%s"
reqURL := val.APIAddress + "/vulcanize/bond/v1beta1/bonds/%s"
testCases := []struct {
name string
@@ -134,7 +134,7 @@ func (s *IntegrationTestSuite) TestGRPCGetBondById() {
}{
{
"invalid request",
fmt.Sprintf(reqUrl, "asdadad"),
fmt.Sprintf(reqURL, "asdadad"),
true,
func() string {
return ""
@@ -142,7 +142,7 @@ func (s *IntegrationTestSuite) TestGRPCGetBondById() {
},
{
"valid request",
reqUrl,
reqURL,
false,
func() string {
// creating the bond
@@ -162,30 +162,30 @@ func (s *IntegrationTestSuite) TestGRPCGetBondById() {
// extract bond id from bonds list
bond := queryResponse.GetBonds()[0]
return bond.GetId()
return bond.GetID()
},
},
}
for _, tc := range testCases {
s.Run(tc.name, func() {
var bondId string
var bondID string
if !tc.expErr {
bondId = tc.preRun()
tc.url = fmt.Sprintf(reqUrl, bondId)
bondID = tc.preRun()
tc.url = fmt.Sprintf(reqURL, bondID)
}
resp, err := rest.GetRequest(tc.url)
s.Require().NoError(err)
var bonds bondtypes.QueryGetBondByIdResponse
var bonds bondtypes.QueryGetBondByIDResponse
err = val.ClientCtx.Codec.UnmarshalJSON(resp, &bonds)
if tc.expErr {
sr.Empty(bonds.GetBond().GetId())
sr.Empty(bonds.GetBond().GetID())
} else {
sr.NoError(err)
sr.NotZero(bonds.GetBond().GetId())
sr.Equal(bonds.GetBond().GetId(), bondId)
sr.NotZero(bonds.GetBond().GetID())
sr.Equal(bonds.GetBond().GetID(), bondID)
}
})
}
@@ -194,13 +194,13 @@ func (s *IntegrationTestSuite) TestGRPCGetBondById() {
func (s *IntegrationTestSuite) TestGRPCGetBondModuleBalance() {
val := s.network.Validators[0]
sr := s.Require()
reqUrl := fmt.Sprintf("%s/vulcanize/bond/v1beta1/balance", val.APIAddress)
reqURL := fmt.Sprintf("%s/vulcanize/bond/v1beta1/balance", val.APIAddress)
// creating the bond
s.createBond()
s.Run("valid request", func() {
resp, err := rest.GetRequest(reqUrl)
resp, err := rest.GetRequest(reqURL)
sr.NoError(err)
var response bondtypes.QueryGetBondModuleBalanceResponse
+8 -8
View File
@@ -163,7 +163,7 @@ func (s *IntegrationTestSuite) TestGetQueryBondLists() {
}
}
func (s *IntegrationTestSuite) TestGetQueryBondById() {
func (s *IntegrationTestSuite) TestGetQueryBondByID() {
val := s.network.Validators[0]
sr := s.Require()
testCases := []struct {
@@ -205,7 +205,7 @@ func (s *IntegrationTestSuite) TestGetQueryBondById() {
// extract bond id from bonds list
bond := queryResponse.GetBonds()[0]
return bond.GetId()
return bond.GetID()
},
},
}
@@ -214,20 +214,20 @@ func (s *IntegrationTestSuite) TestGetQueryBondById() {
s.Run(fmt.Sprintf("Case %s", tc.name), func() {
clientCtx := val.ClientCtx
if !tc.err {
bondId := tc.preRun()
tc.args = append([]string{bondId}, tc.args...)
bondID := tc.preRun()
tc.args = append([]string{bondID}, tc.args...)
}
cmd := cli.GetBondByIdCmd()
cmd := cli.GetBondByIDCmd()
out, err := clitestutil.ExecTestCLICmd(clientCtx, cmd, tc.args)
sr.NoError(err)
var queryResponse types.QueryGetBondByIdResponse
var queryResponse types.QueryGetBondByIDResponse
err = clientCtx.Codec.UnmarshalJSON(out.Bytes(), &queryResponse)
sr.NoError(err)
if tc.err {
sr.Zero(len(queryResponse.GetBond().GetId()))
sr.Zero(len(queryResponse.GetBond().GetID()))
} else {
sr.NotZero(len(queryResponse.GetBond().GetId()))
sr.NotZero(len(queryResponse.GetBond().GetID()))
sr.Equal(s.accountAddress, queryResponse.GetBond().GetOwner())
}
})
+10 -10
View File
@@ -118,7 +118,7 @@ func (s *IntegrationTestSuite) TestTxRefillBond() {
// extract bond id from bonds list
bond := queryResponse.GetBonds()[0]
tc.args = append([]string{bond.GetId()}, tc.args...)
tc.args = append([]string{bond.GetID()}, tc.args...)
}
out, err := clitestutil.ExecTestCLICmd(clientCtx, cmd, tc.args)
if tc.err {
@@ -131,14 +131,14 @@ func (s *IntegrationTestSuite) TestTxRefillBond() {
sr.Zero(d.Code)
// checking the balance of bond
cmd := cli.GetBondByIdCmd()
cmd := cli.GetBondByIDCmd()
out, err := clitestutil.ExecTestCLICmd(clientCtx, cmd, []string{
fmt.Sprintf(tc.args[0]),
fmt.Sprintf("--%s=json", tmcli.OutputFlag),
})
sr.NoError(err)
var queryResponse types.QueryGetBondByIdResponse
var queryResponse types.QueryGetBondByIDResponse
err = clientCtx.Codec.UnmarshalJSON(out.Bytes(), &queryResponse)
sr.NoError(err)
@@ -204,7 +204,7 @@ func (s *IntegrationTestSuite) TestTxWithdrawAmountFromBond() {
// extract bond id from bonds list
bond := queryResponse.GetBonds()[0]
tc.args = append([]string{bond.GetId()}, tc.args...)
tc.args = append([]string{bond.GetID()}, tc.args...)
}
out, err := clitestutil.ExecTestCLICmd(clientCtx, cmd, tc.args)
if tc.err {
@@ -217,14 +217,14 @@ func (s *IntegrationTestSuite) TestTxWithdrawAmountFromBond() {
sr.Zero(d.Code)
// checking the balance of bond
cmd := cli.GetBondByIdCmd()
cmd := cli.GetBondByIDCmd()
out, err := clitestutil.ExecTestCLICmd(clientCtx, cmd, []string{
fmt.Sprintf(tc.args[0]),
fmt.Sprintf("--%s=json", tmcli.OutputFlag),
})
sr.NoError(err)
var queryResponse types.QueryGetBondByIdResponse
var queryResponse types.QueryGetBondByIDResponse
err = clientCtx.Codec.UnmarshalJSON(out.Bytes(), &queryResponse)
sr.NoError(err)
@@ -288,7 +288,7 @@ func (s *IntegrationTestSuite) TestTxCancelBond() {
// extract bond id from bonds list
bond := queryResponse.GetBonds()[0]
tc.args = append([]string{bond.GetId()}, tc.args...)
tc.args = append([]string{bond.GetID()}, tc.args...)
}
out, err := clitestutil.ExecTestCLICmd(clientCtx, cmd, tc.args)
if tc.err {
@@ -301,18 +301,18 @@ func (s *IntegrationTestSuite) TestTxCancelBond() {
sr.Zero(d.Code)
// checking the bond exists or not after cancel
cmd := cli.GetBondByIdCmd()
cmd := cli.GetBondByIDCmd()
out, err := clitestutil.ExecTestCLICmd(clientCtx, cmd, []string{
fmt.Sprintf(tc.args[0]),
fmt.Sprintf("--%s=json", tmcli.OutputFlag),
})
sr.NoError(err)
var queryResponse types.QueryGetBondByIdResponse
var queryResponse types.QueryGetBondByIDResponse
err = clientCtx.Codec.UnmarshalJSON(out.Bytes(), &queryResponse)
sr.NoError(err)
sr.Zero(queryResponse.GetBond().GetId())
sr.Zero(queryResponse.GetBond().GetID())
}
})
}
+5 -5
View File
@@ -26,14 +26,14 @@ func (q Querier) Params(c context.Context, _ *types.QueryParamsRequest) (*types.
return &types.QueryParamsResponse{Params: &params}, nil
}
func (q Querier) GetBondById(c context.Context, req *types.QueryGetBondByIdRequest) (*types.QueryGetBondByIdResponse, error) {
func (q Querier) GetBondByID(c context.Context, req *types.QueryGetBondByIDRequest) (*types.QueryGetBondByIDResponse, error) {
ctx := sdk.UnwrapSDKContext(c)
bondId := req.GetId()
if len(bondId) == 0 {
bondID := req.GetID()
if len(bondID) == 0 {
return nil, sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "bond id required")
}
bond := q.Keeper.GetBond(ctx, req.GetId())
return &types.QueryGetBondByIdResponse{Bond: &bond}, nil
bond := q.Keeper.GetBond(ctx, req.GetID())
return &types.QueryGetBondByIDResponse{Bond: &bond}, nil
}
func (q Querier) GetBondsByOwner(c context.Context, req *types.QueryGetBondsByOwnerRequest) (*types.QueryGetBondsByOwnerResponse, error) {
+5 -5
View File
@@ -84,21 +84,21 @@ func (suite *KeeperTestSuite) TestGrpcQueryBondBondId() {
testCases := []struct {
msg string
req *types.QueryGetBondByIdRequest
req *types.QueryGetBondByIDRequest
createBonds bool
errResponse bool
bondId string
}{
{
"empty request",
&types.QueryGetBondByIdRequest{},
&types.QueryGetBondByIDRequest{},
false,
true,
"",
},
{
"Get Bond By ID",
&types.QueryGetBondByIdRequest{},
&types.QueryGetBondByIDRequest{},
true,
false,
"",
@@ -120,11 +120,11 @@ func (suite *KeeperTestSuite) TestGrpcQueryBondBondId() {
suiteRequire.NoError(err)
test.req.Id = bond.Id
}
resp, err := grpcClient.GetBondById(context.Background(), test.req)
resp, err := grpcClient.GetBondByID(context.Background(), test.req)
if !test.errResponse {
suiteRequire.Nil(err)
suiteRequire.NotNil(resp.GetBond())
suiteRequire.Equal(test.req.Id, resp.GetBond().GetId())
suiteRequire.Equal(test.req.Id, resp.GetBond().GetID())
} else {
suiteRequire.NotNil(err)
suiteRequire.Error(err)
+3 -3
View File
@@ -62,7 +62,7 @@ func (k msgServer) RefillBond(c context.Context, msg *types.MsgRefillBond) (*typ
sdk.NewEvent(
types.EventTypeRefillBond,
sdk.NewAttribute(types.AttributeKeySigner, msg.Signer),
sdk.NewAttribute(types.AttributeKeyBondId, msg.Id),
sdk.NewAttribute(types.AttributeKeyBondID, msg.Id),
sdk.NewAttribute(sdk.AttributeKeyAmount, msg.Coins.String()),
),
sdk.NewEvent(
@@ -92,7 +92,7 @@ func (k msgServer) WithdrawBond(c context.Context, msg *types.MsgWithdrawBond) (
sdk.NewEvent(
types.EventTypeWithdrawBond,
sdk.NewAttribute(types.AttributeKeySigner, msg.Signer),
sdk.NewAttribute(types.AttributeKeyBondId, msg.Id),
sdk.NewAttribute(types.AttributeKeyBondID, msg.Id),
sdk.NewAttribute(sdk.AttributeKeyAmount, msg.Coins.String()),
),
sdk.NewEvent(
@@ -120,7 +120,7 @@ func (k msgServer) CancelBond(c context.Context, msg *types.MsgCancelBond) (*typ
sdk.NewEvent(
types.EventTypeCancelBond,
sdk.NewAttribute(types.AttributeKeySigner, msg.Signer),
sdk.NewAttribute(types.AttributeKeyBondId, msg.Id),
sdk.NewAttribute(types.AttributeKeyBondID, msg.Id),
),
sdk.NewEvent(
sdk.EventTypeMessage,
+1 -1
View File
@@ -114,7 +114,7 @@ func (m *Bond) XXX_DiscardUnknown() {
var xxx_messageInfo_Bond proto.InternalMessageInfo
func (m *Bond) GetId() string {
func (m *Bond) GetID() string {
if m != nil {
return m.Id
}
+1 -1
View File
@@ -10,6 +10,6 @@ const (
AttributeKeySigner = "signer"
AttributeKeyAmount = "amount"
AttributeKeyBondId = "bond_id"
AttributeKeyBondID = "bond_id"
AttributeValueCategory = ModuleName
)
+1 -1
View File
@@ -8,5 +8,5 @@ import (
// Used to, for example, prevent deletion of a bond that's in use.
type BondUsageKeeper interface {
ModuleName() string
UsesBond(ctx sdk.Context, bondId string) bool
UsesBond(ctx sdk.Context, bondID string) bool
}
+111 -111
View File
@@ -214,23 +214,23 @@ func (m *QueryGetBondsResponse) GetPagination() *query.PageResponse {
return nil
}
// QueryGetBondById
type QueryGetBondByIdRequest struct {
// QueryGetBondByID
type QueryGetBondByIDRequest struct {
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty" json:"id" yaml:"id"`
}
func (m *QueryGetBondByIdRequest) Reset() { *m = QueryGetBondByIdRequest{} }
func (m *QueryGetBondByIdRequest) String() string { return proto.CompactTextString(m) }
func (*QueryGetBondByIdRequest) ProtoMessage() {}
func (*QueryGetBondByIdRequest) Descriptor() ([]byte, []int) {
func (m *QueryGetBondByIDRequest) Reset() { *m = QueryGetBondByIDRequest{} }
func (m *QueryGetBondByIDRequest) String() string { return proto.CompactTextString(m) }
func (*QueryGetBondByIDRequest) ProtoMessage() {}
func (*QueryGetBondByIDRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_2f225717b20da431, []int{4}
}
func (m *QueryGetBondByIdRequest) XXX_Unmarshal(b []byte) error {
func (m *QueryGetBondByIDRequest) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *QueryGetBondByIdRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
func (m *QueryGetBondByIDRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_QueryGetBondByIdRequest.Marshal(b, m, deterministic)
return xxx_messageInfo_QueryGetBondByIDRequest.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalToSizedBuffer(b)
@@ -240,42 +240,42 @@ func (m *QueryGetBondByIdRequest) XXX_Marshal(b []byte, deterministic bool) ([]b
return b[:n], nil
}
}
func (m *QueryGetBondByIdRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_QueryGetBondByIdRequest.Merge(m, src)
func (m *QueryGetBondByIDRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_QueryGetBondByIDRequest.Merge(m, src)
}
func (m *QueryGetBondByIdRequest) XXX_Size() int {
func (m *QueryGetBondByIDRequest) XXX_Size() int {
return m.Size()
}
func (m *QueryGetBondByIdRequest) XXX_DiscardUnknown() {
xxx_messageInfo_QueryGetBondByIdRequest.DiscardUnknown(m)
func (m *QueryGetBondByIDRequest) XXX_DiscardUnknown() {
xxx_messageInfo_QueryGetBondByIDRequest.DiscardUnknown(m)
}
var xxx_messageInfo_QueryGetBondByIdRequest proto.InternalMessageInfo
var xxx_messageInfo_QueryGetBondByIDRequest proto.InternalMessageInfo
func (m *QueryGetBondByIdRequest) GetId() string {
func (m *QueryGetBondByIDRequest) GetID() string {
if m != nil {
return m.Id
}
return ""
}
// QueryGetBondByIdResponse returns QueryGetBondById query response
type QueryGetBondByIdResponse struct {
// QueryGetBondByIDResponse returns QueryGetBondByID query response
type QueryGetBondByIDResponse struct {
Bond *Bond `protobuf:"bytes,1,opt,name=bond,proto3" json:"bond,omitempty" json:"bond" yaml:"bond"`
}
func (m *QueryGetBondByIdResponse) Reset() { *m = QueryGetBondByIdResponse{} }
func (m *QueryGetBondByIdResponse) String() string { return proto.CompactTextString(m) }
func (*QueryGetBondByIdResponse) ProtoMessage() {}
func (*QueryGetBondByIdResponse) Descriptor() ([]byte, []int) {
func (m *QueryGetBondByIDResponse) Reset() { *m = QueryGetBondByIDResponse{} }
func (m *QueryGetBondByIDResponse) String() string { return proto.CompactTextString(m) }
func (*QueryGetBondByIDResponse) ProtoMessage() {}
func (*QueryGetBondByIDResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_2f225717b20da431, []int{5}
}
func (m *QueryGetBondByIdResponse) XXX_Unmarshal(b []byte) error {
func (m *QueryGetBondByIDResponse) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *QueryGetBondByIdResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
func (m *QueryGetBondByIDResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_QueryGetBondByIdResponse.Marshal(b, m, deterministic)
return xxx_messageInfo_QueryGetBondByIDResponse.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalToSizedBuffer(b)
@@ -285,19 +285,19 @@ func (m *QueryGetBondByIdResponse) XXX_Marshal(b []byte, deterministic bool) ([]
return b[:n], nil
}
}
func (m *QueryGetBondByIdResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_QueryGetBondByIdResponse.Merge(m, src)
func (m *QueryGetBondByIDResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_QueryGetBondByIDResponse.Merge(m, src)
}
func (m *QueryGetBondByIdResponse) XXX_Size() int {
func (m *QueryGetBondByIDResponse) XXX_Size() int {
return m.Size()
}
func (m *QueryGetBondByIdResponse) XXX_DiscardUnknown() {
xxx_messageInfo_QueryGetBondByIdResponse.DiscardUnknown(m)
func (m *QueryGetBondByIDResponse) XXX_DiscardUnknown() {
xxx_messageInfo_QueryGetBondByIDResponse.DiscardUnknown(m)
}
var xxx_messageInfo_QueryGetBondByIdResponse proto.InternalMessageInfo
var xxx_messageInfo_QueryGetBondByIDResponse proto.InternalMessageInfo
func (m *QueryGetBondByIdResponse) GetBond() *Bond {
func (m *QueryGetBondByIDResponse) GetBond() *Bond {
if m != nil {
return m.Bond
}
@@ -499,8 +499,8 @@ func init() {
proto.RegisterType((*QueryParamsResponse)(nil), "vulcanize.bond.v1beta1.QueryParamsResponse")
proto.RegisterType((*QueryGetBondsRequest)(nil), "vulcanize.bond.v1beta1.QueryGetBondsRequest")
proto.RegisterType((*QueryGetBondsResponse)(nil), "vulcanize.bond.v1beta1.QueryGetBondsResponse")
proto.RegisterType((*QueryGetBondByIdRequest)(nil), "vulcanize.bond.v1beta1.QueryGetBondByIdRequest")
proto.RegisterType((*QueryGetBondByIdResponse)(nil), "vulcanize.bond.v1beta1.QueryGetBondByIdResponse")
proto.RegisterType((*QueryGetBondByIDRequest)(nil), "vulcanize.bond.v1beta1.QueryGetBondByIDRequest")
proto.RegisterType((*QueryGetBondByIDResponse)(nil), "vulcanize.bond.v1beta1.QueryGetBondByIDResponse")
proto.RegisterType((*QueryGetBondsByOwnerRequest)(nil), "vulcanize.bond.v1beta1.QueryGetBondsByOwnerRequest")
proto.RegisterType((*QueryGetBondsByOwnerResponse)(nil), "vulcanize.bond.v1beta1.QueryGetBondsByOwnerResponse")
proto.RegisterType((*QueryGetBondModuleBalanceRequest)(nil), "vulcanize.bond.v1beta1.QueryGetBondModuleBalanceRequest")
@@ -512,55 +512,55 @@ func init() {
}
var fileDescriptor_2f225717b20da431 = []byte{
// 759 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x95, 0xbf, 0x6f, 0xd3, 0x40,
0x14, 0xc7, 0xe3, 0x40, 0x82, 0xb8, 0x0e, 0x48, 0xd7, 0x94, 0xb6, 0x69, 0x6b, 0x27, 0x27, 0x68,
0xa3, 0x40, 0x7c, 0xfd, 0xc1, 0x00, 0x8c, 0x46, 0xa2, 0x62, 0xa8, 0xa0, 0x96, 0x10, 0x12, 0x03,
0x92, 0x63, 0x9f, 0xc2, 0x41, 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03, 0x63, 0xb1, 0xc1,
0x84, 0x78, 0x94, 0x2a, 0xb1, 0x35, 0x90, 0x5f, 0x1c, 0x3d, 0x40, 0x91, 0x95, 0x05, 0xd9, 0x25,
0x88, 0x86, 0x92, 0xe1, 0x2d, 0xea, 0x6d, 0xc3, 0x4f, 0x1a, 0xb8, 0x70, 0x64, 0x9a, 0xe0, 0xca,
0x48, 0x8d, 0x48, 0x8e, 0x7e, 0xfe, 0xda, 0xe9, 0x82, 0x14, 0xea, 0xa2, 0x40, 0x2d, 0xc3, 0xd2,
0x40, 0xd4, 0x4e, 0x45, 0x2c, 0x11, 0xbc, 0x25, 0x2e, 0xdb, 0xf0, 0x8b, 0x06, 0x26, 0xa2, 0x6c,
0x89, 0xd1, 0x80, 0xd7, 0x47, 0x21, 0x38, 0x69, 0xe4, 0xf2, 0x37, 0xfe, 0x22, 0x52, 0x19, 0x58,
0x10, 0x06, 0x8a, 0xd0, 0x18, 0x68, 0x40, 0x06, 0x58, 0xd6, 0xee, 0xbe, 0xae, 0xed, 0xed, 0xeb,
0xda, 0xcf, 0x7d, 0x5d, 0x7b, 0x73, 0xa0, 0xa7, 0xf6, 0x0e, 0xf4, 0xd4, 0xf7, 0x03, 0x3d, 0xf5,
0x30, 0x31, 0x78, 0xa4, 0xe5, 0x56, 0x28, 0xc7, 0x75, 0xc7, 0xe5, 0x8c, 0xba, 0x1e, 0x7e, 0x2e,
0xb3, 0x89, 0xf1, 0xab, 0x66, 0xc5, 0xff, 0xf9, 0xca, 0xef, 0x00, 0x00, 0x00, 0xff, 0xff, 0xdb,
0x62, 0x7c, 0x63, 0xb0, 0x08, 0x00, 0x00,
// 761 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x95, 0x3f, 0x6f, 0xd3, 0x4e,
0x18, 0xc7, 0xe3, 0xfc, 0x7e, 0x09, 0xe2, 0x3a, 0x20, 0x5d, 0x53, 0xda,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 0xc4, 0xd7, 0x01, 0x2f, 0x0f, 0x4d, 0x7f, 0x64, 0x11, 0xe5, 0x2b, 0x23,
0xaa, 0x15, 0xce, 0x45, 0x81, 0x63, 0xc0, 0x39, 0x3c, 0x64, 0xd7, 0xfb, 0xf0, 0xad, 0x06, 0xc6,
0x62, 0x83, 0x09, 0xf1, 0x28, 0x55, 0x62, 0x6b, 0x20, 0xbf, 0x38, 0x7a, 0x80, 0x22, 0x2b, 0x0b,
0xb2, 0x0b, 0x10, 0x0d, 0x25, 0xc3, 0x5b, 0xd4, 0xdb, 0x86, 0x1f, 0x35, 0x70, 0xee, 0xc8, 0x34,
0xc1, 0x95, 0x91, 0x1a, 0x91, 0x1c, 0xfd, 0xfc, 0x95, 0xd3, 0x05, 0x29, 0xd4, 0x45, 0x81, 0x5a,
0x86, 0xa5, 0x81, 0xa8, 0x9d, 0x8a, 0x58, 0x22, 0x78, 0x4b, 0x5c, 0xb6, 0xe1, 0x67, 0x0d, 0x4c,
0x44, 0xd9, 0x12, 0xa3, 0x01, 0xaf, 0x8e, 0x42, 0x70, 0xd2, 0xc8, 0xe5, 0xaf, 0xfd, 0x41, 0xa4,
0x32, 0xb0, 0x20, 0x0c, 0x14, 0xa1, 0x31, 0xd0, 0x80, 0x0c, 0xb0, 0xac, 0xdd, 0x7d, 0x5d, 0xdb,
0xdb, 0xd7, 0xb5, 0x1f, 0xfb, 0xba, 0xf6, 0xfa, 0x40, 0x4f, 0xed, 0x1d, 0xe8, 0xa9, 0x6f, 0x07,
0x7a, 0xea, 0x41, 0x62, 0xf0, 0x48, 0xcb, 0xad, 0x50, 0x8e, 0xeb, 0x8e, 0xcb, 0x19, 0x75, 0x3d,
0xfc, 0x4c, 0x66, 0x13, 0xe3, 0x57, 0xcd, 0x8a, 0xff, 0xf3, 0x95, 0x5f, 0x01, 0x00, 0x00, 0xff,
0xff, 0xd8, 0xd4, 0xc7, 0x22, 0xb0, 0x08, 0x00, 0x00,
}
// Reference imports to suppress errors if they are not otherwise used.
@@ -580,7 +580,7 @@ type QueryClient interface {
// Bonds queries bonds list.
Bonds(ctx context.Context, in *QueryGetBondsRequest, opts ...grpc.CallOption) (*QueryGetBondsResponse, error)
// GetBondById
GetBondById(ctx context.Context, in *QueryGetBondByIdRequest, opts ...grpc.CallOption) (*QueryGetBondByIdResponse, error)
GetBondByID(ctx context.Context, in *QueryGetBondByIDRequest, opts ...grpc.CallOption) (*QueryGetBondByIDResponse, error)
// Get Bonds List by Owner
GetBondsByOwner(ctx context.Context, in *QueryGetBondsByOwnerRequest, opts ...grpc.CallOption) (*QueryGetBondsByOwnerResponse, error)
// Get Bonds module balance
@@ -613,9 +613,9 @@ func (c *queryClient) Bonds(ctx context.Context, in *QueryGetBondsRequest, opts
return out, nil
}
func (c *queryClient) GetBondById(ctx context.Context, in *QueryGetBondByIdRequest, opts ...grpc.CallOption) (*QueryGetBondByIdResponse, error) {
out := new(QueryGetBondByIdResponse)
err := c.cc.Invoke(ctx, "/vulcanize.bond.v1beta1.Query/GetBondById", in, out, opts...)
func (c *queryClient) GetBondByID(ctx context.Context, in *QueryGetBondByIDRequest, opts ...grpc.CallOption) (*QueryGetBondByIDResponse, error) {
out := new(QueryGetBondByIDResponse)
err := c.cc.Invoke(ctx, "/vulcanize.bond.v1beta1.Query/GetBondByID", in, out, opts...)
if err != nil {
return nil, err
}
@@ -647,7 +647,7 @@ type QueryServer interface {
// Bonds queries bonds list.
Bonds(context.Context, *QueryGetBondsRequest) (*QueryGetBondsResponse, error)
// GetBondById
GetBondById(context.Context, *QueryGetBondByIdRequest) (*QueryGetBondByIdResponse, error)
GetBondByID(context.Context, *QueryGetBondByIDRequest) (*QueryGetBondByIDResponse, error)
// Get Bonds List by Owner
GetBondsByOwner(context.Context, *QueryGetBondsByOwnerRequest) (*QueryGetBondsByOwnerResponse, error)
// Get Bonds module balance
@@ -664,8 +664,8 @@ func (*UnimplementedQueryServer) Params(ctx context.Context, req *QueryParamsReq
func (*UnimplementedQueryServer) Bonds(ctx context.Context, req *QueryGetBondsRequest) (*QueryGetBondsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Bonds not implemented")
}
func (*UnimplementedQueryServer) GetBondById(ctx context.Context, req *QueryGetBondByIdRequest) (*QueryGetBondByIdResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetBondById not implemented")
func (*UnimplementedQueryServer) GetBondByID(ctx context.Context, req *QueryGetBondByIDRequest) (*QueryGetBondByIDResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetBondByID not implemented")
}
func (*UnimplementedQueryServer) GetBondsByOwner(ctx context.Context, req *QueryGetBondsByOwnerRequest) (*QueryGetBondsByOwnerResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetBondsByOwner not implemented")
@@ -714,20 +714,20 @@ func _Query_Bonds_Handler(srv interface{}, ctx context.Context, dec func(interfa
return interceptor(ctx, in, info, handler)
}
func _Query_GetBondById_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(QueryGetBondByIdRequest)
func _Query_GetBondByID_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(QueryGetBondByIDRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(QueryServer).GetBondById(ctx, in)
return srv.(QueryServer).GetBondByID(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/vulcanize.bond.v1beta1.Query/GetBondById",
FullMethod: "/vulcanize.bond.v1beta1.Query/GetBondByID",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(QueryServer).GetBondById(ctx, req.(*QueryGetBondByIdRequest))
return srv.(QueryServer).GetBondByID(ctx, req.(*QueryGetBondByIDRequest))
}
return interceptor(ctx, in, info, handler)
}
@@ -781,8 +781,8 @@ var _Query_serviceDesc = grpc.ServiceDesc{
Handler: _Query_Bonds_Handler,
},
{
MethodName: "GetBondById",
Handler: _Query_GetBondById_Handler,
MethodName: "GetBondByID",
Handler: _Query_GetBondByID_Handler,
},
{
MethodName: "GetBondsByOwner",
@@ -939,7 +939,7 @@ func (m *QueryGetBondsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
return len(dAtA) - i, nil
}
func (m *QueryGetBondByIdRequest) Marshal() (dAtA []byte, err error) {
func (m *QueryGetBondByIDRequest) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalToSizedBuffer(dAtA[:size])
@@ -949,12 +949,12 @@ func (m *QueryGetBondByIdRequest) Marshal() (dAtA []byte, err error) {
return dAtA[:n], nil
}
func (m *QueryGetBondByIdRequest) MarshalTo(dAtA []byte) (int, error) {
func (m *QueryGetBondByIDRequest) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *QueryGetBondByIdRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
func (m *QueryGetBondByIDRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
@@ -969,7 +969,7 @@ func (m *QueryGetBondByIdRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
return len(dAtA) - i, nil
}
func (m *QueryGetBondByIdResponse) Marshal() (dAtA []byte, err error) {
func (m *QueryGetBondByIDResponse) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalToSizedBuffer(dAtA[:size])
@@ -979,12 +979,12 @@ func (m *QueryGetBondByIdResponse) Marshal() (dAtA []byte, err error) {
return dAtA[:n], nil
}
func (m *QueryGetBondByIdResponse) MarshalTo(dAtA []byte) (int, error) {
func (m *QueryGetBondByIDResponse) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *QueryGetBondByIdResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
func (m *QueryGetBondByIDResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
@@ -1220,7 +1220,7 @@ func (m *QueryGetBondsResponse) Size() (n int) {
return n
}
func (m *QueryGetBondByIdRequest) Size() (n int) {
func (m *QueryGetBondByIDRequest) Size() (n int) {
if m == nil {
return 0
}
@@ -1233,7 +1233,7 @@ func (m *QueryGetBondByIdRequest) Size() (n int) {
return n
}
func (m *QueryGetBondByIdResponse) Size() (n int) {
func (m *QueryGetBondByIDResponse) Size() (n int) {
if m == nil {
return 0
}
@@ -1654,7 +1654,7 @@ func (m *QueryGetBondsResponse) Unmarshal(dAtA []byte) error {
}
return nil
}
func (m *QueryGetBondByIdRequest) Unmarshal(dAtA []byte) error {
func (m *QueryGetBondByIDRequest) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
@@ -1677,10 +1677,10 @@ func (m *QueryGetBondByIdRequest) Unmarshal(dAtA []byte) error {
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: QueryGetBondByIdRequest: wiretype end group for non-group")
return fmt.Errorf("proto: QueryGetBondByIDRequest: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: QueryGetBondByIdRequest: illegal tag %d (wire type %d)", fieldNum, wire)
return fmt.Errorf("proto: QueryGetBondByIDRequest: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
@@ -1736,7 +1736,7 @@ func (m *QueryGetBondByIdRequest) Unmarshal(dAtA []byte) error {
}
return nil
}
func (m *QueryGetBondByIdResponse) Unmarshal(dAtA []byte) error {
func (m *QueryGetBondByIDResponse) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
@@ -1759,10 +1759,10 @@ func (m *QueryGetBondByIdResponse) Unmarshal(dAtA []byte) error {
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: QueryGetBondByIdResponse: wiretype end group for non-group")
return fmt.Errorf("proto: QueryGetBondByIDResponse: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: QueryGetBondByIdResponse: illegal tag %d (wire type %d)", fieldNum, wire)
return fmt.Errorf("proto: QueryGetBondByIDResponse: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
+14 -14
View File
@@ -85,8 +85,8 @@ func local_request_Query_Bonds_0(ctx context.Context, marshaler runtime.Marshale
}
func request_Query_GetBondById_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq QueryGetBondByIdRequest
func request_Query_GetBondByID_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq QueryGetBondByIDRequest
var metadata runtime.ServerMetadata
var (
@@ -107,13 +107,13 @@ func request_Query_GetBondById_0(ctx context.Context, marshaler runtime.Marshale
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err)
}
msg, err := client.GetBondById(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
msg, err := client.GetBondByID(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
return msg, metadata, err
}
func local_request_Query_GetBondById_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq QueryGetBondByIdRequest
func local_request_Query_GetBondByID_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq QueryGetBondByIDRequest
var metadata runtime.ServerMetadata
var (
@@ -134,7 +134,7 @@ func local_request_Query_GetBondById_0(ctx context.Context, marshaler runtime.Ma
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err)
}
msg, err := server.GetBondById(ctx, &protoReq)
msg, err := server.GetBondByID(ctx, &protoReq)
return msg, metadata, err
}
@@ -275,7 +275,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv
})
mux.Handle("GET", pattern_Query_GetBondById_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
mux.Handle("GET", pattern_Query_GetBondByID_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)
@@ -284,14 +284,14 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := local_request_Query_GetBondById_0(rctx, inboundMarshaler, server, req, pathParams)
resp, md, err := local_request_Query_GetBondByID_0(rctx, inboundMarshaler, server, req, pathParams)
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_Query_GetBondById_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
forward_Query_GetBondByID_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
@@ -416,7 +416,7 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie
})
mux.Handle("GET", pattern_Query_GetBondById_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
mux.Handle("GET", pattern_Query_GetBondByID_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)
@@ -425,14 +425,14 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := request_Query_GetBondById_0(rctx, inboundMarshaler, client, req, pathParams)
resp, md, err := request_Query_GetBondByID_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_GetBondById_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
forward_Query_GetBondByID_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
@@ -484,7 +484,7 @@ var (
pattern_Query_Bonds_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"vulcanize", "bond", "v1beta1", "bonds"}, "", runtime.AssumeColonVerbOpt(true)))
pattern_Query_GetBondById_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"vulcanize", "bond", "v1beta1", "bonds", "id"}, "", runtime.AssumeColonVerbOpt(true)))
pattern_Query_GetBondByID_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"vulcanize", "bond", "v1beta1", "bonds", "id"}, "", runtime.AssumeColonVerbOpt(true)))
pattern_Query_GetBondsByOwner_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"vulcanize", "bond", "v1beta1", "by-owner", "owner"}, "", runtime.AssumeColonVerbOpt(true)))
@@ -496,7 +496,7 @@ var (
forward_Query_Bonds_0 = runtime.ForwardResponseMessage
forward_Query_GetBondById_0 = runtime.ForwardResponseMessage
forward_Query_GetBondByID_0 = runtime.ForwardResponseMessage
forward_Query_GetBondsByOwner_0 = runtime.ForwardResponseMessage