From 4f211af49a48726c5aa80dccc42a35953e524b5f Mon Sep 17 00:00:00 2001 From: Aleksandr Bezobchuk Date: Thu, 30 Aug 2018 14:32:32 -0400 Subject: [PATCH] Update ethermint appt to accept an SDK address --- app/ethermint.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/app/ethermint.go b/app/ethermint.go index ad9bbd56..be17045f 100644 --- a/app/ethermint.go +++ b/app/ethermint.go @@ -15,6 +15,7 @@ import ( "github.com/cosmos/ethermint/handlers" "github.com/cosmos/ethermint/types" + ethcmn "github.com/ethereum/go-ethereum/common" ethparams "github.com/ethereum/go-ethereum/params" abci "github.com/tendermint/tendermint/abci/types" @@ -58,12 +59,13 @@ type ( // NewEthermintApp returns a reference to a new initialized Ethermint // application. func NewEthermintApp( - logger tmlog.Logger, db dbm.DB, ethChainCfg *ethparams.ChainConfig, baseAppOptions ...func(*bam.BaseApp), + logger tmlog.Logger, db dbm.DB, ethChainCfg *ethparams.ChainConfig, + sdkAddr ethcmn.Address, baseAppOpts ...func(*bam.BaseApp), ) *EthermintApp { codec := CreateCodec() app := &EthermintApp{ - BaseApp: bam.NewBaseApp(appName, logger, db, types.TxDecoder(codec), baseAppOptions...), + BaseApp: bam.NewBaseApp(appName, logger, db, types.TxDecoder(codec, sdkAddr), baseAppOpts...), codec: codec, accountKey: sdk.NewKVStoreKey("acc"), mainKey: sdk.NewKVStoreKey("main"), @@ -177,7 +179,7 @@ func (app *EthermintApp) initChainer(ctx sdk.Context, req abci.RequestInitChain) } // CreateCodec creates a new amino wire codec and registers all the necessary -// structures and interfaces needed for the application. +// concrete types and interfaces needed for the application. func CreateCodec() *wire.Codec { codec := wire.NewCodec()