Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 28 additions & 30 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,6 @@
feemarkettypes "github.com/cosmos/evm/x/feemarket/types"
"github.com/cosmos/evm/x/ibc/transfer"
transferkeeper "github.com/cosmos/evm/x/ibc/transfer/keeper"
transferv2 "github.com/cosmos/evm/x/ibc/transfer/v2"
"github.com/cosmos/evm/x/precisebank"
precisebankkeeper "github.com/cosmos/evm/x/precisebank/keeper"
precisebanktypes "github.com/cosmos/evm/x/precisebank/types"
Expand All @@ -144,7 +143,6 @@
ratelimit "github.com/cosmos/ibc-apps/modules/rate-limiting/v10"
ratelimitkeeper "github.com/cosmos/ibc-apps/modules/rate-limiting/v10/keeper"
ratelimittypes "github.com/cosmos/ibc-apps/modules/rate-limiting/v10/types"
ratelimitv2 "github.com/cosmos/ibc-apps/modules/rate-limiting/v10/v2"
ica "github.com/cosmos/ibc-go/v10/modules/apps/27-interchain-accounts"
icacontroller "github.com/cosmos/ibc-go/v10/modules/apps/27-interchain-accounts/controller"
icacontrollerkeeper "github.com/cosmos/ibc-go/v10/modules/apps/27-interchain-accounts/controller/keeper"
Expand All @@ -158,7 +156,6 @@
ibc "github.com/cosmos/ibc-go/v10/modules/core"
ibcclienttypes "github.com/cosmos/ibc-go/v10/modules/core/02-client/types"
porttypes "github.com/cosmos/ibc-go/v10/modules/core/05-port/types"
ibcapi "github.com/cosmos/ibc-go/v10/modules/core/api"
ibcexported "github.com/cosmos/ibc-go/v10/modules/core/exported"
ibckeeper "github.com/cosmos/ibc-go/v10/modules/core/keeper"
ibctm "github.com/cosmos/ibc-go/v10/modules/light-clients/07-tendermint"
Expand Down Expand Up @@ -749,32 +746,33 @@
AddRoute(wasmtypes.ModuleName, wasmStack)
app.IBCKeeper.SetRouter(ibcRouter)

var transferStackv2 ibcapi.IBCModule
transferStackv2 = transferv2.NewIBCModule(app.TransferKeeper)
transferStackv2 = ratelimitv2.NewIBCMiddleware(app.RateLimitKeeper, transferStackv2)
transferStackv2 = tokenfactory.NewIBCV2Module(transferStackv2, app.TokenFactoryKeeper)

ibcRouterV2 := ibcapi.NewRouter()
ibcRouterV2.AddRoute(ibctransfertypes.ModuleName, transferStackv2)
app.IBCKeeper.SetRouterV2(ibcRouterV2)

// Configure EVM precompiles
corePrecompiles := NewAvailableStaticPrecompiles(
app.StakingKeeper,
app.DistrKeeper,
app.PreciseBankKeeper,
app.Erc20Keeper,
app.TransferKeeper,
app.IBCKeeper.ChannelKeeper,
app.EVMKeeper,
app.GovKeeper,
app.SlashingKeeper,
app.EvidenceKeeper,
appCodec,
)
app.EVMKeeper.WithStaticPrecompiles(
corePrecompiles,
)
// TODO: add IBC v2 (Eureka) support in future
// var transferStackv2 ibcapi.IBCModule
// transferStackv2 = transferv2.NewIBCModule(app.TransferKeeper)
// transferStackv2 = ratelimitv2.NewIBCMiddleware(app.RateLimitKeeper, transferStackv2)
// transferStackv2 = tokenfactory.NewIBCV2Module(transferStackv2, app.TokenFactoryKeeper)

// ibcRouterV2 := ibcapi.NewRouter()
// ibcRouterV2.AddRoute(ibctransfertypes.ModuleName, transferStackv2)
// app.IBCKeeper.SetRouterV2(ibcRouterV2)

// TODO: Configure EVM precompiles when needed
// corePrecompiles := NewAvailableStaticPrecompiles(
// app.StakingKeeper,
// app.DistrKeeper,
// app.PreciseBankKeeper,
// app.Erc20Keeper,
// app.TransferKeeper,
// app.IBCKeeper.ChannelKeeper,
// app.EVMKeeper,
// app.GovKeeper,
// app.SlashingKeeper,
// app.EvidenceKeeper,
// appCodec,
// )
// app.EVMKeeper.WithStaticPrecompiles(
// corePrecompiles,
// )

storeProvider := app.IBCKeeper.ClientKeeper.GetStoreProvider()
tmLightClientModule := ibctm.NewLightClientModule(appCodec, storeProvider)
Expand Down Expand Up @@ -814,7 +812,7 @@
wasmtypes.VMConfig{},
AllCapabilities(),
authtypes.NewModuleAddress(govtypes.ModuleName).String(),
ibcRouterV2,
nil, // TODO: add ibc v2 wasm keeper when available
wasmOpts...,
)

Expand Down
Loading