Skip to content

Commit

Permalink
ibc-transfer account creation fix
Browse files Browse the repository at this point in the history
  • Loading branch information
mikluke committed Mar 5, 2024
1 parent 1f9c7aa commit e09844b
Showing 1 changed file with 22 additions and 11 deletions.
33 changes: 22 additions & 11 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -432,6 +432,15 @@ func New(

// ... other modules keepers

app.ScorumKeeper = scorumkeeper.NewKeeper(
appCodec,
keys[scorumtypes.StoreKey],
app.GetSubspace(scorumtypes.ModuleName),
app.AccountKeeper,
app.BankKeeper,
authtypes.FeeCollectorName,
)

// Create IBC Keeper
app.IBCKeeper = ibckeeper.NewKeeper(
appCodec, keys[ibchost.StoreKey],
Expand All @@ -441,6 +450,16 @@ func New(
scopedIBCKeeper,
)

// create keeper wrappers to mint gas
scorumWrapperAccountKeeper := scorumwrapper.NewAccountKeeper(app.AccountKeeper, app.BankKeeper, app.ScorumKeeper)
scorumWrapperBankKeeper := bankkeeper.NewBaseKeeper(
appCodec,
keys[banktypes.StoreKey],
scorumWrapperAccountKeeper,
app.GetSubspace(banktypes.ModuleName),
app.BlockedModuleAccountAddrs(),
)

// Create Transfer Keepers
app.TransferKeeper = ibctransferkeeper.NewKeeper(
appCodec,
Expand All @@ -449,8 +468,8 @@ func New(
app.IBCKeeper.ChannelKeeper,
app.IBCKeeper.ChannelKeeper,
&app.IBCKeeper.PortKeeper,
scorumwrapper.NewAccountKeeper(app.AccountKeeper, app.BankKeeper, app.ScorumKeeper),
app.BankKeeper,
scorumWrapperAccountKeeper,
scorumWrapperBankKeeper,
scopedTransferKeeper,
)
transferModule := transfer.NewAppModule(app.TransferKeeper)
Expand All @@ -462,7 +481,7 @@ func New(
app.IBCKeeper.ChannelKeeper,
app.IBCKeeper.ChannelKeeper,
&app.IBCKeeper.PortKeeper,
scorumwrapper.NewAccountKeeper(app.AccountKeeper, app.BankKeeper, app.ScorumKeeper),
scorumWrapperAccountKeeper,
scopedICAHostKeeper,
app.MsgServiceRouter(),
)
Expand Down Expand Up @@ -493,14 +512,6 @@ func New(
app.BankKeeper,
)

app.ScorumKeeper = scorumkeeper.NewKeeper(
appCodec,
keys[scorumtypes.StoreKey],
app.GetSubspace(scorumtypes.ModuleName),
app.AccountKeeper,
app.BankKeeper,
authtypes.FeeCollectorName,
)
scorumModule := scorum.NewAppModule(appCodec, app.ScorumKeeper, app.AccountKeeper, app.BankKeeper)

app.AviatrixKeeper = aviatrixkeeper.NewKeeper(
Expand Down

0 comments on commit e09844b

Please sign in to comment.