diff --git a/CHANGELOG.md b/CHANGELOG.md index 3f71b5cc70..f2746b60ac 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,19 @@ # Changelog +## unrealease + +BREAKING CHANGES + +FEATURES + +* [examples/basecoin] new cool module to demonstrate use of state and custom transactions + +IMPROVEMENTS + +* [client] refactor to now include more standard code + +BUG FIXES + ## 0.11.0 (March 1, 2017) BREAKING CHANGES diff --git a/client/builder/builder.go b/client/builder/builder.go index 65c2ffe436..f36cc159de 100644 --- a/client/builder/builder.go +++ b/client/builder/builder.go @@ -75,6 +75,10 @@ func GetFromAddress() (from sdk.Address, err error) { } name := viper.GetString(client.FlagName) + if name == "" { + return nil, errors.Errorf("must provide a name using --name") + } + info, err := keybase.Get(name) if err != nil { return nil, errors.Errorf("No key for: %s", name) diff --git a/examples/basecoin/cmd/basecli/main.go b/examples/basecoin/cmd/basecli/main.go index 638071d14f..4a2cdd6f4b 100644 --- a/examples/basecoin/cmd/basecli/main.go +++ b/examples/basecoin/cmd/basecli/main.go @@ -13,6 +13,7 @@ import ( "github.com/cosmos/cosmos-sdk/client/lcd" "github.com/cosmos/cosmos-sdk/client/rpc" "github.com/cosmos/cosmos-sdk/client/tx" + coolcmd "github.com/cosmos/cosmos-sdk/examples/basecoin/x/cool/commands" "github.com/cosmos/cosmos-sdk/version" authcmd "github.com/cosmos/cosmos-sdk/x/auth/commands" bankcmd "github.com/cosmos/cosmos-sdk/x/bank/commands" @@ -55,6 +56,14 @@ func main() { client.PostCommands( bankcmd.SendTxCmd(cdc), )...) + basecliCmd.AddCommand( + client.PostCommands( + coolcmd.WhatCoolTxCmd(cdc), + )...) + basecliCmd.AddCommand( + client.PostCommands( + coolcmd.SetWhatCoolTxCmd(cdc), + )...) // add proxy, version and key info basecliCmd.AddCommand( diff --git a/examples/basecoin/x/cool/commands/cooltx.go b/examples/basecoin/x/cool/commands/cooltx.go index e1f1b866f0..c2a1acee97 100644 --- a/examples/basecoin/x/cool/commands/cooltx.go +++ b/examples/basecoin/x/cool/commands/cooltx.go @@ -12,7 +12,7 @@ import ( "github.com/cosmos/cosmos-sdk/examples/basecoin/x/cool" ) -// what cool trasaction +// what cool transaction func WhatCoolTxCmd(cdc *wire.Codec) *cobra.Command { return &cobra.Command{ Use: "whatcool [answer]", @@ -43,7 +43,7 @@ func WhatCoolTxCmd(cdc *wire.Codec) *cobra.Command { } } -// set what cool trasaction +// set what cool transaction func SetWhatCoolTxCmd(cdc *wire.Codec) *cobra.Command { return &cobra.Command{ Use: "setwhatcool [answer]", diff --git a/x/bank/commands/sendtx.go b/x/bank/commands/sendtx.go index e743612314..7e6dd463dd 100644 --- a/x/bank/commands/sendtx.go +++ b/x/bank/commands/sendtx.go @@ -15,10 +15,8 @@ import ( ) const ( - flagTo = "to" - flagAmount = "amount" - flagFee = "fee" - flagSequence = "seq" + flagTo = "to" + flagAmount = "amount" ) // SendTxCommand will create a send tx and sign it with the given key @@ -31,8 +29,6 @@ func SendTxCmd(cdc *wire.Codec) *cobra.Command { } cmd.Flags().String(flagTo, "", "Address to send coins") cmd.Flags().String(flagAmount, "", "Amount of coins to send") - cmd.Flags().String(flagFee, "", "Fee to pay along with transaction") - cmd.Flags().Int64(flagSequence, 0, "Sequence number to sign the tx") return cmd }