Skip to content

Commit

Permalink
set message router
Browse files Browse the repository at this point in the history
  • Loading branch information
fish-sammy committed Nov 7, 2023
1 parent c5a42a0 commit 0bea633
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -297,13 +297,12 @@ func NewAxelarApp(

setKeeper(keepers, initAxelarIBCKeeper(keepers))

axelarnetModule := axelarnet.NewAppModule(getKeeper[axelarnetKeeper.Keeper](keepers), getKeeper[nexusKeeper.Keeper](keepers), axelarbankkeeper.NewBankKeeper(getKeeper[bankkeeper.BaseKeeper](keepers)), getKeeper[authkeeper.AccountKeeper](keepers), getKeeper[axelarnetKeeper.IBCKeeper](keepers), transferStack, rateLimiter, logger)
messageRouter := nexusTypes.NewMessageRouter().
AddRoute(evmTypes.ModuleName, evmKeeper.NewMessageRoute()).
AddRoute(axelarnetTypes.ModuleName, axelarnetKeeper.NewMessageRoute(getKeeper[axelarnetKeeper.Keeper](keepers), getKeeperAsRef[axelarnetKeeper.IBCKeeper](keepers), getKeeper[feegrantkeeper.Keeper](keepers), axelarbankkeeper.NewBankKeeper(getKeeper[bankkeeper.BaseKeeper](keepers)), getKeeper[nexusKeeper.Keeper](keepers), getKeeper[authkeeper.AccountKeeper](keepers)))
getKeeperAsRef[nexusKeeper.Keeper](keepers).SetMessageRouter(messageRouter)

// TODO: fix this
// messageRouter := nexusTypes.NewMessageRouter().
// AddRoute(evmTypes.ModuleName, evmKeeper.NewMessageRoute()).
// AddRoute(axelarnetTypes.ModuleName, axelarnetKeeper.NewMessageRoute(ibcK, axelarnetK, feegrantK, axelarbankkeeper.NewBankKeeper(bankK), nexusK, accountK))
// nexusK.SetMessageRouter(messageRouter)
axelarnetModule := axelarnet.NewAppModule(getKeeper[axelarnetKeeper.Keeper](keepers), getKeeper[nexusKeeper.Keeper](keepers), axelarbankkeeper.NewBankKeeper(getKeeper[bankkeeper.BaseKeeper](keepers)), getKeeper[authkeeper.AccountKeeper](keepers), getKeeper[axelarnetKeeper.IBCKeeper](keepers), transferStack, rateLimiter, logger)

// Create static IBC router, add axelarnet module as the IBC transfer route, and seal it
ibcRouter := porttypes.NewRouter()
Expand Down

0 comments on commit 0bea633

Please sign in to comment.