feat(auth): make address codec pluggable (#16621)

Co-authored-by: Matt Kocubinski <mkocubinski@gmail.com>
Co-authored-by: Julien Robert <julien@rbrt.fr>
This commit is contained in:
Marko
2023-06-28 11:57:26 +00:00
committed by GitHub
co-authored by Matt Kocubinski Julien Robert
parent e2b38b6619
commit 256e37c523
22 changed files with 155 additions and 12 deletions
+3
View File
@@ -10,6 +10,7 @@ import (
"cosmossdk.io/log"
storetypes "cosmossdk.io/store/types"
addresscodec "github.com/cosmos/cosmos-sdk/codec/address"
"github.com/cosmos/cosmos-sdk/runtime"
"github.com/cosmos/cosmos-sdk/testutil/integration"
sdk "github.com/cosmos/cosmos-sdk/types"
@@ -43,6 +44,7 @@ func Example() {
runtime.NewKVStoreService(keys[authtypes.StoreKey]),
authtypes.ProtoBaseAccount,
map[string][]string{minttypes.ModuleName: {authtypes.Minter}},
addresscodec.NewBech32Codec("cosmos"),
"cosmos",
authority,
)
@@ -128,6 +130,7 @@ func Example_oneModule() {
runtime.NewKVStoreService(keys[authtypes.StoreKey]),
authtypes.ProtoBaseAccount,
map[string][]string{minttypes.ModuleName: {authtypes.Minter}},
addresscodec.NewBech32Codec("cosmos"),
"cosmos",
authority,
)