Update x/auth to use Any (#6165)
* Migrate keeper codec to use marshaler * Migrate AccountI to types * Did go imports * Fix tests for x/auth * Cleanup std/codec * Sort imports * Fix legacy codec * Add godoc for RegisterInterfaces * Add RegisterInterfaces to std * Fix typo * Fixed merge changes * Eliminate vesting import in auth * Fix lint issues * Fix tests * Addressed comments * Rename interfaces in RegisterInterfaces * Removed codec.proto from std * Minor code cleanup Co-authored-by: Aaron Craelius <aaron@regen.network>
This commit is contained in:
+1
-1
@@ -367,7 +367,7 @@ func NewSimApp(
|
||||
func MakeCodecs() (*std.Codec, *codec.Codec) {
|
||||
cdc := std.MakeCodec(ModuleBasics)
|
||||
interfaceRegistry := types.NewInterfaceRegistry()
|
||||
sdk.RegisterInterfaces(interfaceRegistry)
|
||||
std.RegisterInterfaces(interfaceRegistry)
|
||||
ModuleBasics.RegisterInterfaceModules(interfaceRegistry)
|
||||
appCodec := std.NewAppCodec(cdc, interfaceRegistry)
|
||||
return appCodec, cdc
|
||||
|
||||
@@ -19,7 +19,7 @@ import (
|
||||
"github.com/cosmos/cosmos-sdk/server"
|
||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||
"github.com/cosmos/cosmos-sdk/x/auth"
|
||||
authexported "github.com/cosmos/cosmos-sdk/x/auth/exported"
|
||||
"github.com/cosmos/cosmos-sdk/x/auth/types"
|
||||
authvesting "github.com/cosmos/cosmos-sdk/x/auth/vesting"
|
||||
"github.com/cosmos/cosmos-sdk/x/bank"
|
||||
"github.com/cosmos/cosmos-sdk/x/genutil"
|
||||
@@ -85,7 +85,7 @@ contain valid denominations. Accounts may optionally be supplied with vesting pa
|
||||
}
|
||||
|
||||
// create concrete account type based on input parameters
|
||||
var genAccount authexported.GenesisAccount
|
||||
var genAccount types.GenesisAccount
|
||||
|
||||
balances := bank.Balance{Address: addr, Coins: coins.Sort()}
|
||||
baseAccount := auth.NewBaseAccount(addr, nil, 0, 0)
|
||||
|
||||
@@ -5,11 +5,10 @@ import (
|
||||
|
||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||
"github.com/cosmos/cosmos-sdk/x/auth"
|
||||
authexported "github.com/cosmos/cosmos-sdk/x/auth/exported"
|
||||
authtypes "github.com/cosmos/cosmos-sdk/x/auth/types"
|
||||
)
|
||||
|
||||
var _ authexported.GenesisAccount = (*SimGenesisAccount)(nil)
|
||||
var _ authtypes.GenesisAccount = (*SimGenesisAccount)(nil)
|
||||
|
||||
// SimGenesisAccount defines a type that implements the GenesisAccount interface
|
||||
// to be used for simulation accounts in the genesis state.
|
||||
|
||||
@@ -20,7 +20,6 @@ import (
|
||||
"github.com/cosmos/cosmos-sdk/simapp/helpers"
|
||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||
"github.com/cosmos/cosmos-sdk/x/auth"
|
||||
authexported "github.com/cosmos/cosmos-sdk/x/auth/exported"
|
||||
"github.com/cosmos/cosmos-sdk/x/bank"
|
||||
)
|
||||
|
||||
@@ -70,7 +69,7 @@ func Setup(isCheckTx bool) *SimApp {
|
||||
|
||||
// SetupWithGenesisAccounts initializes a new SimApp with the provided genesis
|
||||
// accounts and possible balances.
|
||||
func SetupWithGenesisAccounts(genAccs []authexported.GenesisAccount, balances ...bank.Balance) *SimApp {
|
||||
func SetupWithGenesisAccounts(genAccs []auth.GenesisAccount, balances ...bank.Balance) *SimApp {
|
||||
db := dbm.NewMemDB()
|
||||
app := NewSimApp(log.NewNopLogger(), db, nil, true, map[int64]bool{}, DefaultNodeHome, 0)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user