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

Co-authored-by: Marko <marbar3778@yahoo.com>
Co-authored-by: Julien Robert <julien@rbrt.fr>
This commit is contained in:
mergify[bot]
2023-06-28 12:19:55 +00:00
committed by GitHub
co-authored by Marko Julien Robert
parent 2377c638b2
commit cd8ba48926
22 changed files with 155 additions and 14 deletions
+3 -2
View File
@@ -6,11 +6,10 @@ import (
"cosmossdk.io/log"
storetypes "cosmossdk.io/store/types"
cmtproto "github.com/cometbft/cometbft/proto/tendermint/types"
"github.com/google/go-cmp/cmp"
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"
@@ -44,6 +43,7 @@ func Example() {
runtime.NewKVStoreService(keys[authtypes.StoreKey]),
authtypes.ProtoBaseAccount,
map[string][]string{minttypes.ModuleName: {authtypes.Minter}},
addresscodec.NewBech32Codec("cosmos"),
"cosmos",
authority,
)
@@ -129,6 +129,7 @@ func Example_oneModule() {
runtime.NewKVStoreService(keys[authtypes.StoreKey]),
authtypes.ProtoBaseAccount,
map[string][]string{minttypes.ModuleName: {authtypes.Minter}},
addresscodec.NewBech32Codec("cosmos"),
"cosmos",
authority,
)