refactor!: remove global config from x/auth and client (#19447)

This commit is contained in:
Julián Toledano
2024-03-06 13:14:16 +00:00
committed by GitHub
parent 06a398931e
commit 25aea8af8a
140 changed files with 572 additions and 300 deletions
+9 -2
View File
@@ -18,6 +18,7 @@ import (
minttypes "cosmossdk.io/x/mint/types"
addresscodec "github.com/cosmos/cosmos-sdk/codec/address"
codectestutil "github.com/cosmos/cosmos-sdk/codec/testutil"
"github.com/cosmos/cosmos-sdk/runtime"
"github.com/cosmos/cosmos-sdk/testutil/integration"
sdk "github.com/cosmos/cosmos-sdk/types"
@@ -29,7 +30,9 @@ import (
func Example() {
// in this example we are testing the integration of the following modules:
// - mint, which directly depends on auth, bank and staking
encodingCfg := moduletestutil.MakeTestEncodingConfig(auth.AppModule{}, mint.AppModule{})
encodingCfg := moduletestutil.MakeTestEncodingConfig(codectestutil.CodecOptions{}, auth.AppModule{}, mint.AppModule{})
signingCtx := encodingCfg.InterfaceRegistry.SigningContext()
keys := storetypes.NewKVStoreKeys(authtypes.StoreKey, minttypes.StoreKey)
authority := authtypes.NewModuleAddress("gov").String()
@@ -63,6 +66,8 @@ func Example() {
logger,
keys,
encodingCfg.Codec,
signingCtx.AddressCodec(),
signingCtx.ValidatorAddressCodec(),
map[string]appmodule.AppModule{
authtypes.ModuleName: authModule,
minttypes.ModuleName: mintModule,
@@ -118,7 +123,7 @@ func Example() {
// That module has no dependency on other modules.
func Example_oneModule() {
// in this example we are testing the integration of the auth module:
encodingCfg := moduletestutil.MakeTestEncodingConfig(auth.AppModule{})
encodingCfg := moduletestutil.MakeTestEncodingConfig(codectestutil.CodecOptions{}, auth.AppModule{})
keys := storetypes.NewKVStoreKeys(authtypes.StoreKey)
authority := authtypes.NewModuleAddress("gov").String()
@@ -147,6 +152,8 @@ func Example_oneModule() {
logger,
keys,
encodingCfg.Codec,
encodingCfg.InterfaceRegistry.SigningContext().AddressCodec(),
encodingCfg.InterfaceRegistry.SigningContext().ValidatorAddressCodec(),
map[string]appmodule.AppModule{
authtypes.ModuleName: authModule,
},