Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to cosmos-sdk v0.30.0 #198

Merged
merged 1 commit into from
Jan 25, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 25 additions & 30 deletions cli/main.go
Original file line number Diff line number Diff line change
@@ -1,35 +1,30 @@
package main

import (
"github.com/cosmos/cosmos-sdk/client/tx"
"github.com/cybercongress/cyberd/cli/commands/keys"
"github.com/spf13/viper"
"github.com/tendermint/go-amino"
"os"

"github.com/cosmos/cosmos-sdk/client"
"github.com/cosmos/cosmos-sdk/client/rpc"
"github.com/cosmos/cosmos-sdk/client/tx"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/version"
"github.com/cybercongress/cyberd/app"
cyberdcmd "github.com/cybercongress/cyberd/cli/commands"
"github.com/spf13/cobra"
"github.com/tendermint/tendermint/libs/cli"

at "github.com/cosmos/cosmos-sdk/x/auth"
authcmd "github.com/cosmos/cosmos-sdk/x/auth/client/cli"
bankcmd "github.com/cosmos/cosmos-sdk/x/bank/client/cli"
dist "github.com/cosmos/cosmos-sdk/x/distribution"
distClient "github.com/cosmos/cosmos-sdk/x/distribution/client"
gv "github.com/cosmos/cosmos-sdk/x/gov"
govClient "github.com/cosmos/cosmos-sdk/x/gov/client"
sl "github.com/cosmos/cosmos-sdk/x/slashing"
slashingClient "github.com/cosmos/cosmos-sdk/x/slashing/client"
st "github.com/cosmos/cosmos-sdk/x/staking"
stakingClient "github.com/cosmos/cosmos-sdk/x/staking/client"
)

const (
storeAcc = "acc"
storeGov = "gov"
storeSlashing = "slashing"
storeStake = "stake"
storeDist = "distr"
"github.com/cybercongress/cyberd/app"
cyberdcmd "github.com/cybercongress/cyberd/cli/commands"
"github.com/cybercongress/cyberd/cli/commands/keys"
"github.com/spf13/cobra"
"github.com/spf13/viper"
"github.com/tendermint/go-amino"
"github.com/tendermint/tendermint/libs/cli"
"os"
)

func main() {
Expand All @@ -46,33 +41,32 @@ func main() {
}

mc := []sdk.ModuleClients{
govClient.NewModuleClient(storeGov, cdc),
distClient.NewModuleClient(storeDist, cdc),
stakingClient.NewModuleClient(storeStake, cdc),
slashingClient.NewModuleClient(storeSlashing, cdc),
govClient.NewModuleClient(gv.StoreKey, cdc),
distClient.NewModuleClient(dist.StoreKey, cdc),
stakingClient.NewModuleClient(st.StoreKey, cdc),
slashingClient.NewModuleClient(sl.StoreKey, cdc),
}

// todo: hack till we don't handle with all merkle proofs
viper.SetDefault(client.FlagTrustNode, true)
cyberdcli.PersistentFlags().String(client.FlagChainID, "", "Chain Id of cyberd node")

// Construct Root Command
cyberdcli.AddCommand(
rpc.StatusCommand(),
client.ConfigCmd(),
queryCmd(cdc, mc),
txCmd(cdc, mc),
keys.Commands(),
client.LineBreak,
version.VersionCmd,
client.NewCompletionCmd(cyberdcli, true),
)

cyberdcli.AddCommand(
client.PostCommands(
cyberdcmd.LinkTxCmd(cdc),
)...)

// todo: hack till we don't handle with all merkle proofs
viper.SetDefault(client.FlagTrustNode, true)

cyberdcli.PersistentFlags().String(client.FlagChainID, "", "Chain ID of cyberd node")

executor := cli.PrepareMainCmd(cyberdcli, "CBD", os.ExpandEnv("$HOME/.cyberdcli"))
err := executor.Execute()
if err != nil {
Expand All @@ -94,7 +88,7 @@ func queryCmd(cdc *amino.Codec, mc []sdk.ModuleClients) *cobra.Command {
tx.SearchTxCmd(cdc),
tx.QueryTxCmd(cdc),
client.LineBreak,
authcmd.GetAccountCmd(storeAcc, cdc),
authcmd.GetAccountCmd(at.StoreKey, cdc),
)

for _, m := range mc {
Expand All @@ -114,6 +108,7 @@ func txCmd(cdc *amino.Codec, mc []sdk.ModuleClients) *cobra.Command {
bankcmd.SendTxCmd(cdc),
client.LineBreak,
authcmd.GetSignCommand(cdc),
authcmd.GetMultiSignCommand(cdc),
bankcmd.GetBroadcastCommand(cdc),
client.LineBreak,
)
Expand Down
2 changes: 1 addition & 1 deletion docs/run_validator.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ So the validator candidate is an account this time.
To declare a validator candidate, run the following command adjusting stake amount and other fields.

```bash
docker exec -ti cyberd cyberdcli tx stake create-validator \
docker exec -ti cyberd cyberdcli tx staking create-validator \
--amount=100CBD \
--pubkey=<your_node_pubkey> \
--moniker=<your_node_nickname> \
Expand Down
7 changes: 3 additions & 4 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ require (
github.com/bgentry/speakeasy v0.1.0 // indirect
github.com/btcsuite/btcd v0.0.0-20180903232927-cff30e1d23fc // indirect
github.com/btcsuite/btcutil v0.0.0-20180706230648-ab6388e0c60a // indirect
github.com/cosmos/cosmos-sdk v0.28.2-0.20190123020839-b2ae4ed57319
github.com/cosmos/cosmos-sdk v0.30.0
github.com/cosmos/go-bip39 v0.0.0-20180618194314-52158e4697b8
github.com/fortytw2/leaktest v1.2.0 // indirect
github.com/go-kit/kit v0.7.0 // indirect
Expand All @@ -32,11 +32,10 @@ require (
github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect
github.com/minio/blake2b-simd v0.0.0-20160723061019-3f5f724cb5b1 // indirect
github.com/minio/sha256-simd v0.0.0-20181005183134-51976451ce19 // indirect
github.com/mitchellh/go-homedir v1.0.0
github.com/mitchellh/mapstructure v1.0.0 // indirect
github.com/mr-tron/base58 v1.1.0 // indirect
github.com/multiformats/go-multibase v0.3.0 // indirect
github.com/multiformats/go-multihash v1.0.8
github.com/multiformats/go-multihash v1.0.8 // indirect
github.com/onsi/gomega v1.4.2 // indirect
github.com/pelletier/go-toml v1.2.0 // indirect
github.com/pkg/errors v0.8.0
Expand All @@ -59,7 +58,7 @@ require (
github.com/tendermint/btcd v0.0.0-20180816174608-e5840949ff4f
github.com/tendermint/go-amino v0.14.1
github.com/tendermint/iavl v0.12.0 // indirect
github.com/tendermint/tendermint v0.29.0
github.com/tendermint/tendermint v0.29.1
github.com/whyrusleeping/base32 v0.0.0-20170828182744-c30ac30633cc // indirect
github.com/zondax/ledger-cosmos-go v0.1.0 // indirect
golang.org/x/crypto v0.0.0-20181015023909-0c41d7ab0a0e // indirect
Expand Down
10 changes: 4 additions & 6 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ github.com/btcsuite/btcd v0.0.0-20180903232927-cff30e1d23fc/go.mod h1:Dmm/EzmjnC
github.com/btcsuite/btcutil v0.0.0-20180706230648-ab6388e0c60a h1:RQMUrEILyYJEoAT34XS/kLu40vC0+po/UfxrBBA4qZE=
github.com/btcsuite/btcutil v0.0.0-20180706230648-ab6388e0c60a/go.mod h1:+5NJ2+qvTyV9exUAL/rxXi3DcLg2Ts+ymUAY5y4NvMg=
github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
github.com/cosmos/cosmos-sdk v0.28.2-0.20190123020839-b2ae4ed57319 h1:T2U3Z5ftqqECTF6y8lHiWS5ld4ZXon2/tYSnc+flWUo=
github.com/cosmos/cosmos-sdk v0.28.2-0.20190123020839-b2ae4ed57319/go.mod h1:JrX/JpJunJQXBI5PEX2zELHMFzQr/159jDjIhesOh2c=
github.com/cosmos/cosmos-sdk v0.30.0 h1:DUpcAqHalX2IEvum2wjPIos6sRcOYVd1wNSfiQ+wdfo=
github.com/cosmos/cosmos-sdk v0.30.0/go.mod h1:JrX/JpJunJQXBI5PEX2zELHMFzQr/159jDjIhesOh2c=
github.com/cosmos/go-bip39 v0.0.0-20180618194314-52158e4697b8 h1:Iwin12wRQtyZhH6FV3ykFcdGNlYEzoeR0jN8Vn+JWsI=
github.com/cosmos/go-bip39 v0.0.0-20180618194314-52158e4697b8/go.mod h1:tSxLoYXyBmiFeKpvmq4dzayMdCjCnu8uqmCysIGBT2Y=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
Expand Down Expand Up @@ -75,8 +75,6 @@ github.com/minio/blake2b-simd v0.0.0-20160723061019-3f5f724cb5b1 h1:lYpkrQH5ajf0
github.com/minio/blake2b-simd v0.0.0-20160723061019-3f5f724cb5b1/go.mod h1:pD8RvIylQ358TN4wwqatJ8rNavkEINozVn9DtGI3dfQ=
github.com/minio/sha256-simd v0.0.0-20181005183134-51976451ce19 h1:d9VfRe71OW+ZtutCBgQ54kXBwFy5Tz5hR0OBIE6qlFo=
github.com/minio/sha256-simd v0.0.0-20181005183134-51976451ce19/go.mod h1:2FMWW+8GMoPweT6+pI63m9YE3Lmw4J71hV56Chs1E/U=
github.com/mitchellh/go-homedir v1.0.0 h1:vKb8ShqSby24Yrqr/yDYkuFz8d0WUjys40rvnGC8aR0=
github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
github.com/mitchellh/mapstructure v1.0.0 h1:vVpGvMXJPqSDh2VYHF7gsfQj8Ncx+Xw5Y1KHeTRY+7I=
github.com/mitchellh/mapstructure v1.0.0/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
github.com/mr-tron/base58 v1.1.0 h1:Y51FGVJ91WBqCEabAi5OPUz38eAx8DakuAm5svLcsfQ=
Expand Down Expand Up @@ -133,8 +131,8 @@ github.com/tendermint/go-amino v0.14.1 h1:o2WudxNfdLNBwMyl2dqOJxiro5rfrEaU0Ugs6o
github.com/tendermint/go-amino v0.14.1/go.mod h1:i/UKE5Uocn+argJJBb12qTZsCDBcAYMbR92AaJVmKso=
github.com/tendermint/iavl v0.12.0 h1:xcaFAr+ycqCj7WN1RzL2EfcBioRDOHcU1oWcg83K028=
github.com/tendermint/iavl v0.12.0/go.mod h1:EoKMMv++tDOL5qKKVnoIqtVPshRrEPeJ0WsgDOLAauM=
github.com/tendermint/tendermint v0.29.0 h1:zaJwtaAQVUC4QxqImtpPlCpMGroVvPU0g75ZTlvmFg8=
github.com/tendermint/tendermint v0.29.0/go.mod h1:ymcPyWblXCplCPQjbOYbrF1fWnpslATMVqiGgWbZrlc=
github.com/tendermint/tendermint v0.29.1 h1:9QwXNxtxgfekONjEBvnZp2g3mQH/fS5QiUyEXo7QOGs=
github.com/tendermint/tendermint v0.29.1/go.mod h1:ymcPyWblXCplCPQjbOYbrF1fWnpslATMVqiGgWbZrlc=
github.com/whyrusleeping/base32 v0.0.0-20170828182744-c30ac30633cc h1:BCPnHtcboadS0DvysUuJXZ4lWVv5Bh5i7+tbIyi+ck4=
github.com/whyrusleeping/base32 v0.0.0-20170828182744-c30ac30633cc/go.mod h1:r45hJU7yEoA81k6MWNhpMj/kms0n14dkzkxYHoB96UM=
github.com/zondax/ledger-cosmos-go v0.1.0 h1:Qf4OrBXabhUrDqTtq47QSBLqWV4QYQDQwJQ2qZCbzT8=
Expand Down