Skip to content

Commit

Permalink
Problem: recent version of go-ethereum is not used
Browse files Browse the repository at this point in the history
Closes: crypto-org-chain#142 crypto-org-chain#102

Solution:
- update to ethermint's recent main branch
- add feemarket module

changelog
  • Loading branch information
yihuang committed Oct 11, 2021
1 parent 7ff1cb9 commit 09edb13
Show file tree
Hide file tree
Showing 9 changed files with 257 additions and 516 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@

### Improvements
- [cronos#162](https://github.com/crypto-org-chain/cronos/pull/162) bump ibc-go to v1.2.1 with hooks support
- [cronos#143](https://github.com/crypto-org-chain/cronos/pull/143) update go-ethereum to 1.10.9 and add fee market
module.

*October 4, 2021*
## v0.5.5
Expand Down
20 changes: 18 additions & 2 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,9 @@ import (
evmrest "github.com/tharsis/ethermint/x/evm/client/rest"
evmkeeper "github.com/tharsis/ethermint/x/evm/keeper"
evmtypes "github.com/tharsis/ethermint/x/evm/types"
"github.com/tharsis/ethermint/x/feemarket"
feemarketkeeper "github.com/tharsis/ethermint/x/feemarket/keeper"
feemarkettypes "github.com/tharsis/ethermint/x/feemarket/types"

"github.com/peggyjv/gravity-bridge/module/x/gravity"
gravitykeeper "github.com/peggyjv/gravity-bridge/module/x/gravity/keeper"
Expand Down Expand Up @@ -171,6 +174,7 @@ var (
transfer.AppModuleBasic{},
vesting.AppModuleBasic{},
evm.AppModuleBasic{},
feemarket.AppModuleBasic{},
gravity.AppModuleBasic{},
// this line is used by starport scaffolding # stargate/app/moduleBasic
cronos.AppModuleBasic{},
Expand Down Expand Up @@ -247,7 +251,8 @@ type App struct {
ScopedTransferKeeper capabilitykeeper.ScopedKeeper

// Ethermint keepers
EvmKeeper *evmkeeper.Keeper
EvmKeeper *evmkeeper.Keeper
FeeMarketKeeper feemarketkeeper.Keeper

// Gravity module
GravityKeeper gravitykeeper.Keeper
Expand Down Expand Up @@ -294,6 +299,7 @@ func New(
ibchost.StoreKey, ibctransfertypes.StoreKey,
// ethermint keys
evmtypes.StoreKey,
feemarkettypes.StoreKey,
gravitytypes.StoreKey,
// this line is used by starport scaffolding # stargate/app/storeKey
cronostypes.StoreKey,
Expand Down Expand Up @@ -382,9 +388,14 @@ func New(

// Create Ethermint keepers
tracer := cast.ToString(appOpts.Get(srvflags.EVMTracer))

// Create Ethermint keepers
app.FeeMarketKeeper = feemarketkeeper.NewKeeper(
appCodec, keys[feemarkettypes.StoreKey], app.GetSubspace(feemarkettypes.ModuleName),
)
app.EvmKeeper = evmkeeper.NewKeeper(
appCodec, keys[evmtypes.StoreKey], tkeys[evmtypes.TransientKey], app.GetSubspace(evmtypes.ModuleName),
app.AccountKeeper, app.BankKeeper, stakingKeeper,
app.AccountKeeper, app.BankKeeper, stakingKeeper, app.FeeMarketKeeper,
tracer, bApp.Trace(), // debug EVM based on Baseapp options
)

Expand Down Expand Up @@ -488,6 +499,7 @@ func New(

transferModule,
evm.NewAppModule(app.EvmKeeper, app.AccountKeeper),
feemarket.NewAppModule(app.FeeMarketKeeper),
gravity.NewAppModule(app.GravityKeeper, app.BankKeeper),
// this line is used by starport scaffolding # stargate/app/appModule
cronosModule,
Expand All @@ -509,6 +521,7 @@ func New(
app.mm.SetOrderEndBlockers(
crisistypes.ModuleName, govtypes.ModuleName, stakingtypes.ModuleName,
evmtypes.ModuleName,
feemarkettypes.ModuleName,
gravitytypes.ModuleName,
)

Expand All @@ -534,6 +547,7 @@ func New(
authz.ModuleName,
feegrant.ModuleName,
evmtypes.ModuleName,
feemarkettypes.ModuleName,
gravitytypes.ModuleName,
// this line is used by starport scaffolding # stargate/app/initGenesis
cronostypes.ModuleName,
Expand Down Expand Up @@ -583,6 +597,7 @@ func New(
app.SetAnteHandler(
evmante.NewAnteHandler(
app.AccountKeeper, app.BankKeeper, app.EvmKeeper, app.FeeGrantKeeper, app.IBCKeeper.ChannelKeeper,
app.FeeMarketKeeper,
encodingConfig.TxConfig.SignModeHandler(),
),
)
Expand Down Expand Up @@ -763,6 +778,7 @@ func initParamsKeeper(appCodec codec.BinaryCodec, legacyAmino *codec.LegacyAmino
paramsKeeper.Subspace(ibctransfertypes.ModuleName)
paramsKeeper.Subspace(ibchost.ModuleName)
paramsKeeper.Subspace(evmtypes.ModuleName)
paramsKeeper.Subspace(feemarkettypes.ModuleName)
paramsKeeper.Subspace(gravitytypes.ModuleName)
// this line is used by starport scaffolding # stargate/app/paramSubspace
paramsKeeper.Subspace(cronostypes.ModuleName)
Expand Down
9 changes: 3 additions & 6 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ require (
github.com/armon/go-metrics v0.3.9
github.com/cosmos/cosmos-sdk v0.44.1
github.com/cosmos/ibc-go v1.2.1
github.com/ethereum/go-ethereum v1.10.3
github.com/ethereum/go-ethereum v1.10.9
github.com/gogo/protobuf v1.3.3
github.com/golang/protobuf v1.5.2
github.com/gorilla/mux v1.8.0
Expand All @@ -19,8 +19,8 @@ require (
github.com/stretchr/testify v1.7.0
github.com/tendermint/tendermint v0.34.13
github.com/tendermint/tm-db v0.6.4
github.com/tharsis/ethermint v0.4.2-0.20210927141513-04c2f05002f8
google.golang.org/genproto v0.0.0-20210909211513-a8c4777a87af
github.com/tharsis/ethermint v0.6.1-0.20211005160855-202bc5f1cd2e
google.golang.org/genproto v0.0.0-20211001223012-bfb93cce50d9
google.golang.org/grpc v1.41.0
gopkg.in/yaml.v2 v2.4.0
)
Expand All @@ -40,6 +40,3 @@ replace github.com/cosmos/ibc-go => github.com/crypto-org-chain/ibc-go v1.2.1-ho
replace github.com/peggyjv/gravity-bridge/module => github.com/crypto-org-chain/gravity-bridge/module v0.1.22-0.20211011065300-a09cf050d304

replace github.com/cosmos/iavl => github.com/cosmos/iavl v0.17.1

// FIXME: https://github.com/crypto-org-chain/ethermint/tree/cronos2
replace github.com/tharsis/ethermint => github.com/crypto-org-chain/ethermint v0.4.2-0.20211004101819-7b5449f36cc8
Loading

0 comments on commit 09edb13

Please sign in to comment.