forked from cerc-io/laconicd-deprecated
Update ethermint appt to accept an SDK address
This commit is contained in:
parent
682a81f133
commit
4f211af49a
@ -15,6 +15,7 @@ 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"
|
||||||
|
|
||||||
abci "github.com/tendermint/tendermint/abci/types"
|
abci "github.com/tendermint/tendermint/abci/types"
|
||||||
@ -58,12 +59,13 @@ 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, baseAppOptions ...func(*bam.BaseApp),
|
logger tmlog.Logger, db dbm.DB, ethChainCfg *ethparams.ChainConfig,
|
||||||
|
sdkAddr ethcmn.Address, baseAppOpts ...func(*bam.BaseApp),
|
||||||
) *EthermintApp {
|
) *EthermintApp {
|
||||||
|
|
||||||
codec := CreateCodec()
|
codec := CreateCodec()
|
||||||
app := &EthermintApp{
|
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,
|
codec: codec,
|
||||||
accountKey: sdk.NewKVStoreKey("acc"),
|
accountKey: sdk.NewKVStoreKey("acc"),
|
||||||
mainKey: sdk.NewKVStoreKey("main"),
|
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
|
// 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 {
|
func CreateCodec() *wire.Codec {
|
||||||
codec := wire.NewCodec()
|
codec := wire.NewCodec()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user