Update ethermint app to no longer use SDK address
This commit is contained in:
parent
cd593e3e37
commit
7d4b3ef51e
@ -9,7 +9,6 @@ import (
|
|||||||
"github.com/cosmos/ethermint/handlers"
|
"github.com/cosmos/ethermint/handlers"
|
||||||
"github.com/cosmos/ethermint/types"
|
"github.com/cosmos/ethermint/types"
|
||||||
|
|
||||||
ethcmn "github.com/ethereum/go-ethereum/common"
|
|
||||||
ethparams "github.com/ethereum/go-ethereum/params"
|
ethparams "github.com/ethereum/go-ethereum/params"
|
||||||
|
|
||||||
tmcmn "github.com/tendermint/tendermint/libs/common"
|
tmcmn "github.com/tendermint/tendermint/libs/common"
|
||||||
@ -43,20 +42,17 @@ type (
|
|||||||
|
|
||||||
// NewEthermintApp returns a reference to a new initialized Ethermint
|
// NewEthermintApp returns a reference to a new initialized Ethermint
|
||||||
// application.
|
// application.
|
||||||
func NewEthermintApp(
|
func NewEthermintApp(logger tmlog.Logger, db dbm.DB, ethChainCfg *ethparams.ChainConfig, opts ...Options,
|
||||||
logger tmlog.Logger, db dbm.DB, ethChainCfg *ethparams.ChainConfig,
|
|
||||||
sdkAddr ethcmn.Address, opts ...Options,
|
|
||||||
) *EthermintApp {
|
) *EthermintApp {
|
||||||
|
|
||||||
codec := CreateCodec()
|
codec := CreateCodec()
|
||||||
app := &EthermintApp{
|
app := &EthermintApp{
|
||||||
BaseApp: bam.NewBaseApp(appName, codec, logger, db),
|
BaseApp: bam.NewBaseApp(appName, logger, db, types.TxDecoder(codec)),
|
||||||
codec: codec,
|
codec: codec,
|
||||||
accountKey: sdk.NewKVStoreKey("accounts"),
|
accountKey: sdk.NewKVStoreKey("accounts"),
|
||||||
}
|
}
|
||||||
app.accountMapper = auth.NewAccountMapper(codec, app.accountKey, auth.ProtoBaseAccount)
|
app.accountMapper = auth.NewAccountMapper(codec, app.accountKey, auth.ProtoBaseAccount)
|
||||||
|
|
||||||
app.SetTxDecoder(types.TxDecoder(codec, sdkAddr))
|
|
||||||
app.SetAnteHandler(handlers.AnteHandler(app.accountMapper))
|
app.SetAnteHandler(handlers.AnteHandler(app.accountMapper))
|
||||||
app.MountStoresIAVL(app.accountKey)
|
app.MountStoresIAVL(app.accountKey)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user