fixes, add to changelog

This commit is contained in:
rigelrozanski 2018-03-03 19:41:43 +00:00
parent a2e4479dcc
commit fb199e293e
5 changed files with 31 additions and 8 deletions

View File

@ -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

View File

@ -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)

View File

@ -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(

View File

@ -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]",

View File

@ -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
}