diff --git a/docs/core/proto-docs.md b/docs/core/proto-docs.md index 0aaee8601..2fce7d919 100644 --- a/docs/core/proto-docs.md +++ b/docs/core/proto-docs.md @@ -1888,7 +1888,7 @@ Query defines the gRPC querier service. | Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | | ----------- | ------------ | ------------- | ------------| ------- | -------- | -| `PostPriceResponse` | [MsgPostPriceResponse](#botany.pricefeed.MsgPostPriceResponse) | [MsgPostPriceResponse](#botany.pricefeed.MsgPostPriceResponse) | | | +| `PostPrice` | [MsgPostPrice](#botany.pricefeed.MsgPostPrice) | [MsgPostPriceResponse](#botany.pricefeed.MsgPostPriceResponse) | | | diff --git a/proto/pricefeed/tx.proto b/proto/pricefeed/tx.proto index 299c15826..5c3b7e0a2 100644 --- a/proto/pricefeed/tx.proto +++ b/proto/pricefeed/tx.proto @@ -8,7 +8,7 @@ import "cosmos/base/v1beta1/coin.proto"; option go_package = "github.com/lcnem/jpyx/x/pricefeed/types"; service Msg { - rpc PostPriceResponse(MsgPostPriceResponse) returns (MsgPostPriceResponse); + rpc PostPrice(MsgPostPrice) returns (MsgPostPriceResponse); } message MsgPostPrice { diff --git a/x/auction/types/codec.go b/x/auction/types/codec.go index 43c536dd4..9f804e93a 100644 --- a/x/auction/types/codec.go +++ b/x/auction/types/codec.go @@ -3,6 +3,8 @@ package types import ( "github.com/cosmos/cosmos-sdk/codec" cdctypes "github.com/cosmos/cosmos-sdk/codec/types" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/msgservice" ) func RegisterCodec(cdc *codec.LegacyAmino) { @@ -12,6 +14,16 @@ func RegisterCodec(cdc *codec.LegacyAmino) { func RegisterInterfaces(registry cdctypes.InterfaceRegistry) { // this line is used by starport scaffolding # 3 + registry.RegisterImplementations((*sdk.Msg)(nil), + &MsgPlaceBid{}, + ) + registry.RegisterImplementations((*Auction)(nil), + &SurplusAuction{}, + &DebtAuction{}, + &CollateralAuction{}, + ) + + msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc) } var ( diff --git a/x/cdp/client/cli/txCdp.go b/x/cdp/client/cli/txCdp.go index 4f4f087c2..89202103a 100644 --- a/x/cdp/client/cli/txCdp.go +++ b/x/cdp/client/cli/txCdp.go @@ -21,7 +21,7 @@ func CmdCreateCdp() *cobra.Command { Long: strings.TrimSpace( fmt.Sprintf(`Create a new cdp, depositing some collateral and drawing some debt. Example: -$ %s tx %s create 10000000ubtc 1000jpyx ubtc-a --from myKeyName +$ %s tx %s create-cdp 10ubtc 10jpyx ubtc-a --from myKeyName --chain-id jpyx-3-test `, version.AppName, types.ModuleName)), Args: cobra.ExactArgs(3), RunE: func(cmd *cobra.Command, args []string) error { diff --git a/x/cdp/types/codec.go b/x/cdp/types/codec.go index 43c536dd4..7ddb06504 100644 --- a/x/cdp/types/codec.go +++ b/x/cdp/types/codec.go @@ -3,6 +3,8 @@ package types import ( "github.com/cosmos/cosmos-sdk/codec" cdctypes "github.com/cosmos/cosmos-sdk/codec/types" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/msgservice" ) func RegisterCodec(cdc *codec.LegacyAmino) { @@ -12,6 +14,16 @@ func RegisterCodec(cdc *codec.LegacyAmino) { func RegisterInterfaces(registry cdctypes.InterfaceRegistry) { // this line is used by starport scaffolding # 3 + registry.RegisterImplementations((*sdk.Msg)(nil), + &MsgCreateCdp{}, + &MsgDeposit{}, + &MsgDrawDebt{}, + &MsgLiquidate{}, + &MsgRepayDebt{}, + &MsgWithdraw{}, + ) + + msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc) } var ( diff --git a/x/incentive/types/codec.go b/x/incentive/types/codec.go index 8fb9abf55..a1588f733 100644 --- a/x/incentive/types/codec.go +++ b/x/incentive/types/codec.go @@ -3,6 +3,8 @@ package types import ( "github.com/cosmos/cosmos-sdk/codec" cdctypes "github.com/cosmos/cosmos-sdk/codec/types" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/msgservice" // this line is used by starport scaffolding # 1 ) @@ -12,6 +14,11 @@ func RegisterCodec(cdc *codec.LegacyAmino) { func RegisterInterfaces(registry cdctypes.InterfaceRegistry) { // this line is used by starport scaffolding # 3 + registry.RegisterImplementations((*sdk.Msg)(nil), + &MsgClaimCdpMintingReward{}, + ) + + msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc) } var ( diff --git a/x/pricefeed/types/codec.go b/x/pricefeed/types/codec.go index 8fb9abf55..95502e665 100644 --- a/x/pricefeed/types/codec.go +++ b/x/pricefeed/types/codec.go @@ -3,6 +3,8 @@ package types import ( "github.com/cosmos/cosmos-sdk/codec" cdctypes "github.com/cosmos/cosmos-sdk/codec/types" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/msgservice" // this line is used by starport scaffolding # 1 ) @@ -12,6 +14,11 @@ func RegisterCodec(cdc *codec.LegacyAmino) { func RegisterInterfaces(registry cdctypes.InterfaceRegistry) { // this line is used by starport scaffolding # 3 + registry.RegisterImplementations((*sdk.Msg)(nil), + &MsgPostPrice{}, + ) + + msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc) } var ( diff --git a/x/pricefeed/types/tx.pb.go b/x/pricefeed/types/tx.pb.go index 78d47597b..5298b0c31 100644 --- a/x/pricefeed/types/tx.pb.go +++ b/x/pricefeed/types/tx.pb.go @@ -133,34 +133,34 @@ func init() { func init() { proto.RegisterFile("pricefeed/tx.proto", fileDescriptor_27d54c954ce5f810) } var fileDescriptor_27d54c954ce5f810 = []byte{ - // 419 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x92, 0x31, 0x6f, 0xd3, 0x40, - 0x14, 0xc7, 0xed, 0xb6, 0x54, 0xf4, 0x5a, 0xa4, 0x72, 0x8a, 0x90, 0xf1, 0xe0, 0xab, 0x3c, 0x94, - 0x0e, 0x70, 0xa7, 0x94, 0x8d, 0x01, 0x29, 0x81, 0x85, 0x21, 0x52, 0x65, 0x2a, 0x21, 0xb1, 0x20, - 0xfb, 0x7c, 0x39, 0xdc, 0xe6, 0x7c, 0x96, 0xef, 0x8a, 0xec, 0x6f, 0x91, 0x6f, 0xc4, 0x9a, 0x31, - 0x23, 0x62, 0x30, 0x28, 0xf9, 0x06, 0xfe, 0x04, 0xc8, 0x77, 0x4e, 0x14, 0x41, 0x06, 0x26, 0x3f, - 0xeb, 0xff, 0xf7, 0xef, 0xbd, 0xf7, 0x7f, 0x06, 0xb0, 0x28, 0x33, 0xca, 0xa6, 0x8c, 0xa5, 0x44, - 0x57, 0xb8, 0x28, 0xa5, 0x96, 0xf0, 0x3c, 0x91, 0x3a, 0xce, 0x6b, 0xbc, 0x95, 0xfc, 0x01, 0x97, - 0x5c, 0x1a, 0x91, 0x74, 0x95, 0xf5, 0xf9, 0x88, 0x4b, 0xc9, 0x67, 0x8c, 0x98, 0xb7, 0xe4, 0x61, - 0x4a, 0x74, 0x26, 0x98, 0xd2, 0xb1, 0x28, 0x7a, 0x43, 0x40, 0xa5, 0x12, 0x52, 0x91, 0x24, 0x56, - 0x8c, 0x7c, 0x1b, 0x26, 0x4c, 0xc7, 0x43, 0x42, 0x65, 0x96, 0x5b, 0x3d, 0xfc, 0x7e, 0x00, 0xce, - 0x26, 0x8a, 0xdf, 0x48, 0xa5, 0x6f, 0xba, 0x5e, 0xf0, 0x13, 0x38, 0x9a, 0x96, 0x52, 0x78, 0xee, - 0x85, 0x7b, 0x75, 0x32, 0x7e, 0xb7, 0x68, 0x90, 0xf3, 0xb3, 0x41, 0x2f, 0x79, 0xa6, 0xbf, 0x3e, - 0x24, 0x98, 0x4a, 0x41, 0x66, 0x34, 0x67, 0x82, 0xdc, 0x15, 0x75, 0x45, 0x74, 0x5d, 0x30, 0x85, - 0x3f, 0xea, 0x32, 0xcb, 0xf9, 0x88, 0xd2, 0x51, 0x9a, 0x96, 0x4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, - 0xc9, 0xb1, 0xd9, 0xfe, 0xf5, 0x9f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x55, 0xe8, 0x39, 0xbe, 0x8e, - 0x02, 0x00, 0x00, + // 420 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x92, 0xb1, 0x6e, 0xd4, 0x30, + 0x18, 0xc7, 0x93, 0xb6, 0x54, 0x9c, 0x5b, 0xa4, 0x2a, 0x3a, 0xa1, 0x90, 0xc1, 0xae, 0x32, 0x94, + 0x0e, 0x60, 0xeb, 0xca, 0xc6, 0x80, 0x74, 0x07, 0x0b, 0xc3, 0x49, 0x55, 0x5a, 0x09, 0xa9, 0x0b, + 0x4a, 0x1c, 0x9f, 0x09, 0x3d, 0xc7, 0x51, 0xec, 0xa2, 0xe4, 0x2d, 0xfa, 0x46, 0xac, 0x1d, 0x6f, + 0x44, 0x0c, 0x01, 0xdd, 0xbd, 0x41, 0x9e, 0x00, 0xc5, 0xce, 0x1d, 0x11, 0x42, 0x9d, 0xe2, 0xe8, + 0xff, 0xf7, 0xef, 0xfb, 0xbe, 0xff, 0x67, 0xe0, 0x15, 0x65, 0x46, 0xd9, 0x82, 0xb1, 0x94, 0xe8, + 0x0a, 0x17, 0xa5, 0xd4, 0xd2, 0x3b, 0x49, 0xa4, 0x8e, 0xf3, 0x1a, 0xef, 0xa4, 0x60, 0xcc, 0x25, + 0x97, 0x46, 0x24, 0xdd, 0xc9, 0xfa, 0x02, 0xc4, 0xa5, 0xe4, 0x4b, 0x46, 0xcc, 0x5f, 0x72, 0xb7, + 0x20, 0x3a, 0x13, 0x4c, 0xe9, 0x58, 0x14, 0xbd, 0x01, 0x52, 0xa9, 0x84, 0x54, 0x24, 0x89, 0x15, + 0x23, 0xdf, 0x26, 0x09, 0xd3, 0xf1, 0x84, 0x50, 0x99, 0xe5, 0x56, 0x0f, 0xbf, 0xef, 0x81, 0xe3, +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, 0xaa, 0x90, 0xb9, 0x62, 0x17, 0x37, 0x60, 0x7f, 0xae, 0xb8, + 0x77, 0x05, 0x46, 0x7f, 0xc3, 0x85, 0xf8, 0xdf, 0xbd, 0xe2, 0xe1, 0xdd, 0xe0, 0xec, 0x71, 0x7d, + 0xcb, 0x9e, 0x4d, 0x1f, 0xd6, 0xd0, 0x5d, 0xad, 0xa1, 0xfb, 0x7b, 0x0d, 0xdd, 0xfb, 0x0d, 0x74, + 0x56, 0x1b, 0xe8, 0xfc, 0xd8, 0x40, 0xe7, 0xe6, 0xe5, 0xff, 0x17, 0x55, 0x91, 0xc1, 0x23, 0xeb, + 0x02, 0x4a, 0x0e, 0xcd, 0xb4, 0x6f, 0xfe, 0x04, 0x00, 0x00, 0xff, 0xff, 0x94, 0xf9, 0x56, 0x09, + 0x7e, 0x02, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -175,7 +175,7 @@ const _ = grpc.SupportPackageIsVersion4 // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. type MsgClient interface { - PostPriceResponse(ctx context.Context, in *MsgPostPriceResponse, opts ...grpc.CallOption) (*MsgPostPriceResponse, error) + PostPrice(ctx context.Context, in *MsgPostPrice, opts ...grpc.CallOption) (*MsgPostPriceResponse, error) } type msgClient struct { @@ -186,9 +186,9 @@ func NewMsgClient(cc grpc1.ClientConn) MsgClient { return &msgClient{cc} } -func (c *msgClient) PostPriceResponse(ctx context.Context, in *MsgPostPriceResponse, opts ...grpc.CallOption) (*MsgPostPriceResponse, error) { +func (c *msgClient) PostPrice(ctx context.Context, in *MsgPostPrice, opts ...grpc.CallOption) (*MsgPostPriceResponse, error) { out := new(MsgPostPriceResponse) - err := c.cc.Invoke(ctx, "/botany.pricefeed.Msg/PostPriceResponse", in, out, opts...) + err := c.cc.Invoke(ctx, "/botany.pricefeed.Msg/PostPrice", in, out, opts...) if err != nil { return nil, err } @@ -197,35 +197,35 @@ func (c *msgClient) PostPriceResponse(ctx context.Context, in *MsgPostPriceRespo // MsgServer is the server API for Msg service. type MsgServer interface { - PostPriceResponse(context.Context, *MsgPostPriceResponse) (*MsgPostPriceResponse, error) + PostPrice(context.Context, *MsgPostPrice) (*MsgPostPriceResponse, error) } // UnimplementedMsgServer can be embedded to have forward compatible implementations. type UnimplementedMsgServer struct { } -func (*UnimplementedMsgServer) PostPriceResponse(ctx context.Context, req *MsgPostPriceResponse) (*MsgPostPriceResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method PostPriceResponse not implemented") +func (*UnimplementedMsgServer) PostPrice(ctx context.Context, req *MsgPostPrice) (*MsgPostPriceResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method PostPrice not implemented") } func RegisterMsgServer(s grpc1.Server, srv MsgServer) { s.RegisterService(&_Msg_serviceDesc, srv) } -func _Msg_PostPriceResponse_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgPostPriceResponse) +func _Msg_PostPrice_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgPostPrice) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(MsgServer).PostPriceResponse(ctx, in) + return srv.(MsgServer).PostPrice(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/botany.pricefeed.Msg/PostPriceResponse", + FullMethod: "/botany.pricefeed.Msg/PostPrice", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).PostPriceResponse(ctx, req.(*MsgPostPriceResponse)) + return srv.(MsgServer).PostPrice(ctx, req.(*MsgPostPrice)) } return interceptor(ctx, in, info, handler) } @@ -235,8 +235,8 @@ var _Msg_serviceDesc = grpc.ServiceDesc{ HandlerType: (*MsgServer)(nil), Methods: []grpc.MethodDesc{ { - MethodName: "PostPriceResponse", - Handler: _Msg_PostPriceResponse_Handler, + MethodName: "PostPrice", + Handler: _Msg_PostPrice_Handler, }, }, Streams: []grpc.StreamDesc{},