Skip to content

Commit

Permalink
Merge pull request #101 from lcnem/fix/cdp-tx
Browse files Browse the repository at this point in the history
fix: example
  • Loading branch information
kimurayu45z authored Sep 22, 2021
2 parents d1fe035 + 1a97db1 commit 408d25b
Show file tree
Hide file tree
Showing 8 changed files with 82 additions and 44 deletions.
2 changes: 1 addition & 1 deletion docs/core/proto-docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -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) | | |

<!-- end services -->

Expand Down
2 changes: 1 addition & 1 deletion proto/pricefeed/tx.proto
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
12 changes: 12 additions & 0 deletions x/auction/types/codec.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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 (
Expand Down
2 changes: 1 addition & 1 deletion x/cdp/client/cli/txCdp.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
12 changes: 12 additions & 0 deletions x/cdp/types/codec.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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 (
Expand Down
7 changes: 7 additions & 0 deletions x/incentive/types/codec.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
)

Expand All @@ -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 (
Expand Down
7 changes: 7 additions & 0 deletions x/pricefeed/types/codec.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
)

Expand All @@ -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 (
Expand Down
82 changes: 41 additions & 41 deletions x/pricefeed/types/tx.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 408d25b

Please sign in to comment.