Skip to content

Commit

Permalink
Merge branch 'main' into mattverse/use-ragel
Browse files Browse the repository at this point in the history
  • Loading branch information
mattverse authored Mar 7, 2024
2 parents 7018ae4 + 4edf6b2 commit c4e1abe
Show file tree
Hide file tree
Showing 300 changed files with 1,882 additions and 1,177 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ Every module contains its own CHANGELOG.md. Please refer to the module you are i
* (crypto/keys) [#18026](https://github.com/cosmos/cosmos-sdk/pull/18026) Made public key generation constant time on `secp256k1`
* (crypto | x/auth) [#14372](https://github.com/cosmos/cosmos-sdk/pull/18194) Key checks on signatures antehandle.
* (types) [#18963](https://github.com/cosmos/cosmos-sdk/pull/18963) Swap out amino json encoding of `ABCIMessageLogs` for std lib json encoding
* (x/auth) [#19651](https://github.com/cosmos/cosmos-sdk/pull/19651) Allow empty public keys in `GetSignBytesAdapter`.

### Bug Fixes

Expand All @@ -96,6 +97,7 @@ Every module contains its own CHANGELOG.md. Please refer to the module you are i

### API Breaking Changes

* (types) [#19447](https://github.com/cosmos/cosmos-sdk/pull/19447) `module.testutil.MakeTestEncodingConfig` now takes `CodecOptions` as argument.
* (types) [#19512](https://github.com/cosmos/cosmos-sdk/pull/19512) Remove basic manager and all related functions (`module.BasicManager`, `module.NewBasicManager`, `module.NewBasicManagerFromManager`, `NewGenesisOnlyAppModule`).
* The module manager now can do everything that the basic manager was doing.
* When using runtime, just inject the module manager when needed using your app config.
Expand Down Expand Up @@ -139,6 +141,9 @@ Every module contains its own CHANGELOG.md. Please refer to the module you are i
* (types) [#18607](https://github.com/cosmos/cosmos-sdk/pull/18607) Removed address verifier from global config, moved verifier function to bech32 codec.
* (server) [#18909](https://github.com/cosmos/cosmos-sdk/pull/18909) Remove configuration endpoint on grpc reflection endpoint in favour of auth module bech32prefix endpoint already exposed.
* (crypto) [#19541](https://github.com/cosmos/cosmos-sdk/pull/19541) The deprecated `FromTmProtoPublicKey`, `ToTmProtoPublicKey`, `FromTmPubKeyInterface` and `ToTmPubKeyInterface` functions have been removed. Use their replacements (`Cmt` instead of `Tm`) instead.
* (types) [#19652](https://github.com/cosmos/cosmos-sdk/pull/19652)
* Moved`types/module.HasRegisterInterfaces` to `cosmossdk.io/core`.
* Moved `RegisterInterfaces` and `RegisterImplementations` from `InterfaceRegistry` to `cosmossdk.io/core/registry.LegacyRegistry` interface.

### Client Breaking Changes

Expand Down
30 changes: 26 additions & 4 deletions UPGRADING.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,19 @@ In this section we describe the changes made in Cosmos SDK' SimApp.

#### Client (`root.go`)

The `client` package has been refactored to make use of the address codecs (address, validator address, consensus address, etc.).
The `client` package has been refactored to make use of the address codecs (address, validator address, consensus address, etc.)
and address bech32 prefixes (address and validator address).
This is part of the work of abstracting the SDK from the global bech32 config.

This means the address codecs must be provided in the `client.Context` in the application client (usually `root.go`).
This means the address codecs and prefixes must be provided in the `client.Context` in the application client (usually `root.go`).

```diff
clientCtx = clientCtx.
+ WithAddressCodec(addressCodec).
+ WithValidatorAddressCodec(validatorAddressCodec).
+ WithConsensusAddressCodec(consensusAddressCodec)
+ WithConsensusAddressCodec(consensusAddressCodec).
+ WithAddressPrefix("cosmos").
+ WithValidatorPrefix("cosmosvaloper")
```

**When using `depinject` / `app v2`, the client codecs can be provided directly from application config.**
Expand Down Expand Up @@ -148,12 +151,26 @@ Additionally, the `appmodule.Environment` interface is introduced to fetch diffe
This should be used as an alternative to using `sdk.UnwrapContext(ctx)` to fetch the services.
It needs to be passed into a module at instantiation.

`x/circuit` is used as an example.:
`x/circuit` is used as an example:

```go
app.CircuitKeeper = circuitkeeper.NewKeeper(runtime.NewEnvironment((keys[circuittypes.StoreKey])), appCodec, authtypes.NewModuleAddress(govtypes.ModuleName).String(), app.AuthKeeper.AddressCodec())
```

If your module requires a message server or query server, it should be passed in the environment as well.

```diff
-govKeeper := govkeeper.NewKeeper(appCodec, runtime.NewKVStoreService(keys[govtypes.StoreKey]), app.AuthKeeper, app.BankKeeper,app.StakingKeeper, app.PoolKeeper, app.MsgServiceRouter(), govConfig, authtypes.NewModuleAddress(govtypes.ModuleName).String())
+govKeeper := govkeeper.NewKeeper(appCodec, runtime.NewEnvironment(runtime.NewKVStoreService(keys[govtypes.StoreKey]), logger, runtime.EnvWithRouterService(app.GRPCQueryRouter(), app.MsgServiceRouter())), app.AuthKeeper, app.BankKeeper, app.StakingKeeper, app.PoolKeeper, govConfig, authtypes.NewModuleAddress(govtypes.ModuleName).String())
```

The signature of the extension interface `HasRegisterInterfaces` has been changed to accept a `cosmossdk.io/core/registry.LegacyRegistry` instead of a `codec.InterfaceRegistry`. `HasRegisterInterfaces` is now a part of `cosmossdk.io/core/appmodule`. Modules should update their `HasRegisterInterfaces` implementation to accept a `cosmossdk.io/core/registry.LegacyRegistry` interface.

```diff
-func (AppModule) RegisterInterfaces(registry codectypes.InterfaceRegistry) {
+func (AppModule) RegisterInterfaces(registry registry.LegacyRegistry) {
```

##### Dependency Injection

Previously `cosmossdk.io/core` held functions `Invoke`, `Provide` and `Register` were moved to `cosmossdk.io/depinject/appconfig`.
Expand Down Expand Up @@ -210,6 +227,11 @@ Group was spun out into its own `go.mod`. To import it use `cosmossdk.io/x/group

Gov was spun out into its own `go.mod`. To import it use `cosmossdk.io/x/gov`

Gov v1beta1 proposal handler has been changed to take in a `context.Context` instead of `sdk.Context`.
This change was made to allow legacy proposals to be compatible with server/v2.
If you wish to migrate to server/v2, you should update your proposal handler to take in a `context.Context` and use services.
On the other hand, if you wish to keep using baseapp, simply unwrap the sdk context in your proposal handler.

#### `x/mint`

Mint was spun out into its own `go.mod`. To import it use `cosmossdk.io/x/mint`
Expand Down
6 changes: 4 additions & 2 deletions baseapp/abci_utils_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -469,9 +469,10 @@ func (s *ABCIUtilsTestSuite) TestDefaultProposalHandler_NoOpMempoolTxSelection()
// create a codec for marshaling
cdc := codectestutil.CodecOptions{}.NewCodec()
baseapptestutil.RegisterInterfaces(cdc.InterfaceRegistry())
signingCtx := cdc.InterfaceRegistry().SigningContext()

// create a baseapp along with a tx config for tx generation
txConfig := authtx.NewTxConfig(cdc, authtx.DefaultSignModes)
txConfig := authtx.NewTxConfig(cdc, signingCtx.AddressCodec(), signingCtx.ValidatorAddressCodec(), authtx.DefaultSignModes)
app := baseapp.NewBaseApp(s.T().Name(), log.NewNopLogger(), dbm.NewMemDB(), txConfig.TxDecoder())

// create a proposal handler
Expand Down Expand Up @@ -566,7 +567,8 @@ func (s *ABCIUtilsTestSuite) TestDefaultProposalHandler_NoOpMempoolTxSelection()
func (s *ABCIUtilsTestSuite) TestDefaultProposalHandler_PriorityNonceMempoolTxSelection() {
cdc := codectestutil.CodecOptions{}.NewCodec()
baseapptestutil.RegisterInterfaces(cdc.InterfaceRegistry())
txConfig := authtx.NewTxConfig(cdc, authtx.DefaultSignModes)
signingCtx := cdc.InterfaceRegistry().SigningContext()
txConfig := authtx.NewTxConfig(cdc, signingCtx.AddressCodec(), signingCtx.ValidatorAddressCodec(), authtx.DefaultSignModes)

var (
secret1 = []byte("secret1")
Expand Down
9 changes: 5 additions & 4 deletions baseapp/baseapp_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ import (
"github.com/cosmos/cosmos-sdk/client"
"github.com/cosmos/cosmos-sdk/codec"
codectestutil "github.com/cosmos/cosmos-sdk/codec/testutil"
codectypes "github.com/cosmos/cosmos-sdk/codec/types"
"github.com/cosmos/cosmos-sdk/testutil"
"github.com/cosmos/cosmos-sdk/testutil/testdata"
sdk "github.com/cosmos/cosmos-sdk/types"
Expand Down Expand Up @@ -65,8 +64,9 @@ func NewBaseAppSuite(t *testing.T, opts ...func(*baseapp.BaseApp)) *BaseAppSuite
t.Helper()
cdc := codectestutil.CodecOptions{}.NewCodec()
baseapptestutil.RegisterInterfaces(cdc.InterfaceRegistry())
signingCtx := cdc.InterfaceRegistry().SigningContext()

txConfig := authtx.NewTxConfig(cdc, authtx.DefaultSignModes)
txConfig := authtx.NewTxConfig(cdc, signingCtx.AddressCodec(), signingCtx.ValidatorAddressCodec(), authtx.DefaultSignModes)
db := dbm.NewMemDB()
logBuffer := new(bytes.Buffer)
logger := log.NewLogger(logBuffer, log.ColorOption(false))
Expand Down Expand Up @@ -499,11 +499,12 @@ func TestBaseAppOptionSeal(t *testing.T) {
}

func TestTxDecoder(t *testing.T) {
cdc := codec.NewProtoCodec(codectypes.NewInterfaceRegistry())
cdc := codectestutil.CodecOptions{}.NewCodec()
baseapptestutil.RegisterInterfaces(cdc.InterfaceRegistry())
signingCtx := cdc.InterfaceRegistry().SigningContext()

// patch in TxConfig instead of using an output from x/auth/tx
txConfig := authtx.NewTxConfig(cdc, authtx.DefaultSignModes)
txConfig := authtx.NewTxConfig(cdc, signingCtx.AddressCodec(), signingCtx.ValidatorAddressCodec(), authtx.DefaultSignModes)

tx := newTxCounter(t, txConfig, 1, 0)
txBytes, err := txConfig.TxEncoder()(tx)
Expand Down
3 changes: 2 additions & 1 deletion baseapp/msg_service_router_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,10 @@ func TestMsgService(t *testing.T) {
), &appBuilder, &cdc, &interfaceRegistry)
require.NoError(t, err)
app := appBuilder.Build(dbm.NewMemDB(), nil)
signingCtx := interfaceRegistry.SigningContext()

// patch in TxConfig instead of using an output from x/auth/tx
txConfig := authtx.NewTxConfig(cdc, authtx.DefaultSignModes)
txConfig := authtx.NewTxConfig(cdc, signingCtx.AddressCodec(), signingCtx.ValidatorAddressCodec(), authtx.DefaultSignModes)
// set the TxDecoder in the BaseApp for minimal tx simulations
app.SetTxDecoder(txConfig.TxDecoder())

Expand Down
16 changes: 16 additions & 0 deletions client/context.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,10 @@ type Context struct {
AddressCodec address.Codec
ValidatorAddressCodec address.Codec
ConsensusAddressCodec address.Codec

// Bech32 address prefixes.
AddressPrefix string
ValidatorPrefix string
}

// WithCmdContext returns a copy of the context with an updated context.Context,
Expand Down Expand Up @@ -337,6 +341,18 @@ func (ctx Context) WithConsensusAddressCodec(consensusAddressCodec address.Codec
return ctx
}

// WithAddressPrefix returns the context with the provided address bech32 prefix.
func (ctx Context) WithAddressPrefix(addressPrefix string) Context {
ctx.AddressPrefix = addressPrefix
return ctx
}

// WithValidatorPrefix returns the context with the provided validator bech32 prefix.
func (ctx Context) WithValidatorPrefix(validatorPrefix string) Context {
ctx.ValidatorPrefix = validatorPrefix
return ctx
}

// PrintString prints the raw string to ctx.Output if it's defined, otherwise to os.Stdout
func (ctx Context) PrintString(str string) error {
return ctx.PrintBytes([]byte(str))
Expand Down
3 changes: 2 additions & 1 deletion client/context_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import (
"github.com/cosmos/cosmos-sdk/client/flags"
"github.com/cosmos/cosmos-sdk/codec"
addresscodec "github.com/cosmos/cosmos-sdk/codec/address"
codectestutil "github.com/cosmos/cosmos-sdk/codec/testutil"
"github.com/cosmos/cosmos-sdk/codec/types"
"github.com/cosmos/cosmos-sdk/crypto/hd"
"github.com/cosmos/cosmos-sdk/crypto/keyring"
Expand Down Expand Up @@ -98,7 +99,7 @@ x: "10"
}

func TestGetFromFields(t *testing.T) {
cfg := testutil.MakeTestEncodingConfig()
cfg := testutil.MakeTestEncodingConfig(codectestutil.CodecOptions{})
path := hd.CreateHDPath(118, 0, 0).String()

testCases := []struct {
Expand Down
3 changes: 2 additions & 1 deletion client/grpc_query_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import (

"github.com/cosmos/cosmos-sdk/baseapp"
"github.com/cosmos/cosmos-sdk/codec"
"github.com/cosmos/cosmos-sdk/codec/testutil"
"github.com/cosmos/cosmos-sdk/runtime"
"github.com/cosmos/cosmos-sdk/testutil/integration"
"github.com/cosmos/cosmos-sdk/testutil/testdata"
Expand All @@ -39,7 +40,7 @@ func (s *IntegrationTestSuite) SetupSuite() {
keys := storetypes.NewKVStoreKeys(countertypes.StoreKey)
cms := integration.CreateMultiStore(keys, logger)
s.ctx = sdk.NewContext(cms, true, logger)
cfg := moduletestutil.MakeTestEncodingConfig(counter.AppModule{})
cfg := moduletestutil.MakeTestEncodingConfig(testutil.CodecOptions{}, counter.AppModule{})
s.cdc = cfg.Codec

queryHelper := baseapp.NewQueryServerTestHelper(s.ctx, cfg.InterfaceRegistry)
Expand Down
2 changes: 1 addition & 1 deletion client/keys/add.go
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ func runAddCmd(ctx client.Context, cmd *cobra.Command, args []string, inBuf *buf

// If we're using ledger, only thing we need is the path and the bech32 prefix.
if useLedger {
bech32PrefixAccAddr := sdk.GetConfig().GetBech32AccountAddrPrefix()
bech32PrefixAccAddr := ctx.AddressPrefix
k, err := kb.SaveLedgerKey(name, hd.Secp256k1, bech32PrefixAccAddr, coinType, account, index)
if err != nil {
return err
Expand Down
7 changes: 4 additions & 3 deletions client/keys/add_ledger_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import (
"github.com/cosmos/cosmos-sdk/client"
"github.com/cosmos/cosmos-sdk/client/flags"
addresscodec "github.com/cosmos/cosmos-sdk/codec/address"
codectestutil "github.com/cosmos/cosmos-sdk/codec/testutil"
"github.com/cosmos/cosmos-sdk/crypto/hd"
"github.com/cosmos/cosmos-sdk/crypto/keyring"
"github.com/cosmos/cosmos-sdk/testutil"
Expand All @@ -39,7 +40,7 @@ func Test_runAddCmdLedgerWithCustomCoinType(t *testing.T) {
// Prepare a keybase
kbHome := t.TempDir()

cdc := moduletestutil.MakeTestEncodingConfig().Codec
cdc := moduletestutil.MakeTestEncodingConfig(codectestutil.CodecOptions{}).Codec
clientCtx := client.Context{}.
WithKeyringDir(kbHome).
WithCodec(cdc).
Expand Down Expand Up @@ -97,7 +98,7 @@ func Test_runAddCmdLedger(t *testing.T) {

mockIn := testutil.ApplyMockIODiscardOutErr(cmd)
kbHome := t.TempDir()
cdc := moduletestutil.MakeTestEncodingConfig().Codec
cdc := moduletestutil.MakeTestEncodingConfig(codectestutil.CodecOptions{}).Codec

clientCtx := client.Context{}.
WithKeyringDir(kbHome).
Expand Down Expand Up @@ -144,7 +145,7 @@ func Test_runAddCmdLedger(t *testing.T) {
}

func Test_runAddCmdLedgerDryRun(t *testing.T) {
cdc := moduletestutil.MakeTestEncodingConfig().Codec
cdc := moduletestutil.MakeTestEncodingConfig(codectestutil.CodecOptions{}).Codec
testData := []struct {
name string
args []string
Expand Down
9 changes: 5 additions & 4 deletions client/keys/add_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import (
"github.com/cosmos/cosmos-sdk/client"
"github.com/cosmos/cosmos-sdk/client/flags"
addresscodec "github.com/cosmos/cosmos-sdk/codec/address"
codectestutil "github.com/cosmos/cosmos-sdk/codec/testutil"
"github.com/cosmos/cosmos-sdk/crypto/hd"
"github.com/cosmos/cosmos-sdk/crypto/keyring"
"github.com/cosmos/cosmos-sdk/testutil"
Expand All @@ -28,7 +29,7 @@ func Test_runAddCmdBasic(t *testing.T) {
mockIn := testutil.ApplyMockIODiscardOutErr(cmd)
kbHome := t.TempDir()

cdc := moduletestutil.MakeTestEncodingConfig().Codec
cdc := moduletestutil.MakeTestEncodingConfig(codectestutil.CodecOptions{}).Codec
kb, err := keyring.New(sdk.KeyringServiceName(), keyring.BackendTest, kbHome, mockIn, cdc)
require.NoError(t, err)

Expand Down Expand Up @@ -149,7 +150,7 @@ func Test_runAddCmdMultisigDupKeys(t *testing.T) {
mockIn := testutil.ApplyMockIODiscardOutErr(cmd)
kbHome := t.TempDir()

cdc := moduletestutil.MakeTestEncodingConfig().Codec
cdc := moduletestutil.MakeTestEncodingConfig(codectestutil.CodecOptions{}).Codec
kb, err := keyring.New(sdk.KeyringServiceName(), keyring.BackendTest, kbHome, mockIn, cdc)
require.NoError(t, err)

Expand Down Expand Up @@ -217,7 +218,7 @@ func Test_runAddCmdDryRun(t *testing.T) {
pubkey1 := `{"@type":"/cosmos.crypto.secp256k1.PubKey","key":"AtObiFVE4s+9+RX5SP8TN9r2mxpoaT4eGj9CJfK7VRzN"}`
pubkey2 := `{"@type":"/cosmos.crypto.secp256k1.PubKey","key":"A/se1vkqgdQ7VJQCM4mxN+L+ciGhnnJ4XYsQCRBMrdRi"}`
b64Pubkey := "QWhnOHhpdXBJcGZ2UlR2ak5la1ExclROUThTOW96YjdHK2RYQmFLVjl4aUo="
cdc := moduletestutil.MakeTestEncodingConfig().Codec
cdc := moduletestutil.MakeTestEncodingConfig(codectestutil.CodecOptions{}).Codec

testData := []struct {
name string
Expand Down Expand Up @@ -349,7 +350,7 @@ func Test_runAddCmdDryRun(t *testing.T) {
func TestAddRecoverFileBackend(t *testing.T) {
cmd := AddKeyCommand()
cmd.Flags().AddFlagSet(Commands().PersistentFlags())
cdc := moduletestutil.MakeTestEncodingConfig().Codec
cdc := moduletestutil.MakeTestEncodingConfig(codectestutil.CodecOptions{}).Codec

mockIn := testutil.ApplyMockIODiscardOutErr(cmd)
kbHome := t.TempDir()
Expand Down
3 changes: 2 additions & 1 deletion client/keys/delete_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (

"github.com/cosmos/cosmos-sdk/client"
"github.com/cosmos/cosmos-sdk/client/flags"
codectestutil "github.com/cosmos/cosmos-sdk/codec/testutil"
"github.com/cosmos/cosmos-sdk/crypto/hd"
"github.com/cosmos/cosmos-sdk/crypto/keyring"
"github.com/cosmos/cosmos-sdk/testutil"
Expand All @@ -34,7 +35,7 @@ func Test_runDeleteCmd(t *testing.T) {
fakeKeyName2 := "runDeleteCmd_Key2"

path := sdk.GetFullBIP44Path()
cdc := moduletestutil.MakeTestEncodingConfig().Codec
cdc := moduletestutil.MakeTestEncodingConfig(codectestutil.CodecOptions{}).Codec

cmd.SetArgs([]string{"blah", fmt.Sprintf("--%s=%s", flags.FlagKeyringDir, kbHome)})
kb, err := keyring.New(sdk.KeyringServiceName(), keyring.BackendTest, kbHome, mockIn, cdc)
Expand Down
3 changes: 2 additions & 1 deletion client/keys/export_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import (

"github.com/cosmos/cosmos-sdk/client"
"github.com/cosmos/cosmos-sdk/client/flags"
codectestutil "github.com/cosmos/cosmos-sdk/codec/testutil"
"github.com/cosmos/cosmos-sdk/crypto/hd"
"github.com/cosmos/cosmos-sdk/crypto/keyring"
"github.com/cosmos/cosmos-sdk/testutil"
Expand All @@ -19,7 +20,7 @@ import (
)

func Test_runExportCmd(t *testing.T) {
cdc := moduletestutil.MakeTestEncodingConfig().Codec
cdc := moduletestutil.MakeTestEncodingConfig(codectestutil.CodecOptions{}).Codec
testCases := []struct {
name string
keyringBackend string
Expand Down
7 changes: 4 additions & 3 deletions client/keys/import_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,15 @@ import (

"github.com/cosmos/cosmos-sdk/client"
"github.com/cosmos/cosmos-sdk/client/flags"
codectestutil "github.com/cosmos/cosmos-sdk/codec/testutil"
"github.com/cosmos/cosmos-sdk/crypto/keyring"
"github.com/cosmos/cosmos-sdk/testutil"
sdk "github.com/cosmos/cosmos-sdk/types"
moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil"
)

func Test_runImportCmd(t *testing.T) {
cdc := moduletestutil.MakeTestEncodingConfig().Codec
cdc := moduletestutil.MakeTestEncodingConfig(codectestutil.CodecOptions{}).Codec
testCases := []struct {
name string
keyringBackend string
Expand Down Expand Up @@ -122,7 +123,7 @@ HbP+c6JmeJy9JXe2rbbF1QtCX1gLqGcDQPBXiCtFvP7/8wTZtVOPj8vREzhZ9ElO
}

func Test_runImportHexCmd(t *testing.T) {
cdc := moduletestutil.MakeTestEncodingConfig().Codec
cdc := moduletestutil.MakeTestEncodingConfig(codectestutil.CodecOptions{}).Codec
testCases := []struct {
name string
keyringBackend string
Expand Down Expand Up @@ -184,7 +185,7 @@ func Test_runImportCmdWithEmptyName(t *testing.T) {
mockIn := testutil.ApplyMockIODiscardOutErr(cmd)
// Now add a temporary keybase
kbHome := t.TempDir()
cdc := moduletestutil.MakeTestEncodingConfig().Codec
cdc := moduletestutil.MakeTestEncodingConfig(codectestutil.CodecOptions{}).Codec
kb, err := keyring.New(sdk.KeyringServiceName(), keyring.BackendTest, kbHome, mockIn, cdc)
require.NoError(t, err)

Expand Down
Loading

0 comments on commit c4e1abe

Please sign in to comment.