Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(app): initialize transferkeeper before denommetadatakeeper to avoid nil pointer error #194

Merged
merged 3 commits into from
Apr 26, 2024
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* **deps:** bumps `block-explorer-rpc-cosmos v1.0.3` & `evm-block-explorer-rpc-cosmos` v1.0.3 ([#142](https://github.com/dymensionxyz/rollapp-evm/issues/142)) ([ea5e5fd](https://github.com/dymensionxyz/rollapp-evm/commit/ea5e5fdc854d5a4fa4079c4d79b79732e78cf9d8))
* **init scripts:** update account-prefix in ibc script ([#190](https://github.com/dymensionxyz/rollapp-evm/issues/190)) ([25be6c3](https://github.com/dymensionxyz/rollapp-evm/commit/25be6c3dda7885870d514438548e10daad45f4d7))
* **local script:** updated default genesis created on extended guide with EIP 3855 ([#183](https://github.com/dymensionxyz/rollapp-evm/issues/183)) ([d201be4](https://github.com/dymensionxyz/rollapp-evm/commit/d201be4ee6757c912ecae568207c1ea358387cae))
* make sure that accounts are not double funded during eibc channel creation ([6e5b6f1](https://github.com/dymensionxyz/rollapp-evm/commit/6e5b6f1ac826ccf926815e7d0d73fe004b5f5842))
* make sure that accounts are not double funded during eibc channel creation ([#191](https://github.com/dymensionxyz/rollapp-evm/issues/191)) ([0d6bb2d](https://github.com/dymensionxyz/rollapp-evm/commit/0d6bb2de7c667191352bdac8e00631165b675250))
* multiple fixes to advance readme features ([#141](https://github.com/dymensionxyz/rollapp-evm/issues/141)) ([469d39f](https://github.com/dymensionxyz/rollapp-evm/commit/469d39fc79591cdae4455839db1546cc5bd9c053))
* **readme:** broken links have been renewed. ([#78](https://github.com/dymensionxyz/rollapp-evm/issues/78)) ([c7df6f2](https://github.com/dymensionxyz/rollapp-evm/commit/c7df6f29c8b9981d7a998be4091d2e96c19647a3))
* remove deprecated denommetadata param ([#189](https://github.com/dymensionxyz/rollapp-evm/issues/189)) ([927f7f9](https://github.com/dymensionxyz/rollapp-evm/commit/927f7f92ab7c84d39931a1923780d8c373dfce74))
Expand Down
16 changes: 8 additions & 8 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -530,6 +530,14 @@ func NewRollapp(
erc20keeper.NewERC20ContractRegistrationHook(app.Erc20Keeper),
)

app.TransferKeeper = transferkeeper.NewKeeper(
appCodec, keys[ibctransfertypes.StoreKey], app.GetSubspace(ibctransfertypes.ModuleName),
app.IBCKeeper.ChannelKeeper,
app.IBCKeeper.ChannelKeeper, &app.IBCKeeper.PortKeeper,
app.AccountKeeper, app.BankKeeper, scopedTransferKeeper,
app.Erc20Keeper, // Add ERC20 Keeper for ERC20 transfers
)

app.DenomMetadataKeeper = denommetadatamodulekeeper.NewKeeper(
appCodec,
keys[denommetadatamoduletypes.StoreKey],
Expand All @@ -539,14 +547,6 @@ func NewRollapp(
denomMetadataHooks,
)

app.TransferKeeper = transferkeeper.NewKeeper(
appCodec, keys[ibctransfertypes.StoreKey], app.GetSubspace(ibctransfertypes.ModuleName),
app.IBCKeeper.ChannelKeeper,
app.IBCKeeper.ChannelKeeper, &app.IBCKeeper.PortKeeper,
app.AccountKeeper, app.BankKeeper, scopedTransferKeeper,
app.Erc20Keeper, // Add ERC20 Keeper for ERC20 transfers
)

app.HubGenesisKeeper = hubgenkeeper.NewKeeper(
appCodec,
keys[hubgentypes.StoreKey],
Expand Down