Merge pull request #6085: Move codec/std to std

This commit is contained in:
Aaron Craelius
2020-04-27 15:40:50 -04:00
committed by GitHub
parent 9b51908597
commit cc90f2e002
39 changed files with 233 additions and 234 deletions
+4 -3
View File
@@ -5,6 +5,8 @@ import (
"os"
"path"
"github.com/cosmos/cosmos-sdk/std"
"github.com/spf13/cobra"
"github.com/spf13/viper"
"github.com/tendermint/go-amino"
@@ -15,7 +17,6 @@ import (
"github.com/cosmos/cosmos-sdk/client/keys"
"github.com/cosmos/cosmos-sdk/client/lcd"
"github.com/cosmos/cosmos-sdk/client/rpc"
codecstd "github.com/cosmos/cosmos-sdk/codec/std"
"github.com/cosmos/cosmos-sdk/simapp"
sdk "github.com/cosmos/cosmos-sdk/types"
authclient "github.com/cosmos/cosmos-sdk/x/auth/client"
@@ -25,8 +26,8 @@ import (
)
var (
cdc = codecstd.MakeCodec(simapp.ModuleBasics)
appCodec = codecstd.NewAppCodec(cdc)
cdc = std.MakeCodec(simapp.ModuleBasics)
appCodec = std.NewAppCodec(cdc)
)
func init() {
+3 -2
View File
@@ -5,6 +5,8 @@ import (
"errors"
"fmt"
"github.com/cosmos/cosmos-sdk/std"
"github.com/spf13/cobra"
"github.com/spf13/viper"
@@ -12,7 +14,6 @@ import (
"github.com/tendermint/tendermint/libs/cli"
"github.com/cosmos/cosmos-sdk/client/flags"
codecstd "github.com/cosmos/cosmos-sdk/codec/std"
"github.com/cosmos/cosmos-sdk/crypto/keyring"
"github.com/cosmos/cosmos-sdk/server"
sdk "github.com/cosmos/cosmos-sdk/types"
@@ -32,7 +33,7 @@ const (
// AddGenesisAccountCmd returns add-genesis-account cobra Command.
func AddGenesisAccountCmd(
ctx *server.Context, depCdc *amino.Codec, cdc *codecstd.Codec, defaultNodeHome, defaultClientHome string,
ctx *server.Context, depCdc *amino.Codec, cdc *std.Codec, defaultNodeHome, defaultClientHome string,
) *cobra.Command {
cmd := &cobra.Command{
+4 -3
View File
@@ -4,6 +4,8 @@ import (
"encoding/json"
"io"
"github.com/cosmos/cosmos-sdk/std"
"github.com/spf13/cobra"
"github.com/spf13/viper"
abci "github.com/tendermint/tendermint/abci/types"
@@ -15,7 +17,6 @@ import (
"github.com/cosmos/cosmos-sdk/baseapp"
"github.com/cosmos/cosmos-sdk/client/debug"
"github.com/cosmos/cosmos-sdk/client/flags"
codecstd "github.com/cosmos/cosmos-sdk/codec/std"
"github.com/cosmos/cosmos-sdk/server"
"github.com/cosmos/cosmos-sdk/simapp"
"github.com/cosmos/cosmos-sdk/store"
@@ -30,8 +31,8 @@ const flagInvCheckPeriod = "inv-check-period"
var invCheckPeriod uint
func main() {
cdc := codecstd.MakeCodec(simapp.ModuleBasics)
appCodec := codecstd.NewAppCodec(cdc)
cdc := std.MakeCodec(simapp.ModuleBasics)
appCodec := std.NewAppCodec(cdc)
config := sdk.GetConfig()
config.SetBech32PrefixForAccount(sdk.Bech32PrefixAccAddr, sdk.Bech32PrefixAccPub)