Skip to content

Commit

Permalink
feat(genesis_bridge): update to use new genesis bridge (#143)
Browse files Browse the repository at this point in the history
  • Loading branch information
mtsitrin authored Oct 9, 2024
1 parent 0f65b88 commit 97b6b38
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 8 deletions.
15 changes: 10 additions & 5 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -508,28 +508,33 @@ func NewRollapp(
keys[hubgentypes.StoreKey],
app.GetSubspace(hubgentypes.ModuleName),
app.AccountKeeper,
app.BankKeeper,
app.MintKeeper,
)

app.HubKeeper = hubkeeper.NewKeeper(
appCodec,
keys[hubtypes.StoreKey],
)

denomMetadataMiddleware := denommetadata.NewICS4Wrapper(
var ics4Wrapper ibcporttypes.ICS4Wrapper
// The IBC tranfer submit is wrapped with the following middlewares:
// - denom metadata middleware
ics4Wrapper = denommetadata.NewICS4Wrapper(
app.IBCKeeper.ChannelKeeper,
app.HubKeeper,
app.BankKeeper,
app.HubGenesisKeeper.GetState,
)

genesisTransfersBlocker := hubgenkeeper.NewICS4Wrapper(denomMetadataMiddleware, app.HubGenesisKeeper) // ICS4 Wrapper: claims IBC middleware
// - genesis bridge - IBC transfer disabled until genesis bridge protocol completes
ics4Wrapper = hubgenkeeper.NewICS4Wrapper(ics4Wrapper, app.HubGenesisKeeper)

// Create Transfer Keepers
app.TransferKeeper = ibctransferkeeper.NewKeeper(
appCodec,
keys[ibctransfertypes.StoreKey],
app.GetSubspace(ibctransfertypes.ModuleName),
genesisTransfersBlocker,
ics4Wrapper,
app.IBCKeeper.ChannelKeeper,
&app.IBCKeeper.PortKeeper,
app.AccountKeeper,
Expand All @@ -551,9 +556,9 @@ func NewRollapp(

transferStack = hubgenkeeper.NewIBCModule(
transferStack,
app.TransferKeeper,
app.HubGenesisKeeper,
app.BankKeeper,
app.IBCKeeper.ChannelKeeper,
)

app.CallbackKeeper = callbackKeeper.NewKeeper(
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ require (
github.com/cosmos/gogoproto v1.5.0
github.com/cosmos/ibc-go/v6 v6.3.0
github.com/dvsekhvalnov/jose2go v1.5.0
github.com/dymensionxyz/dymension-rdk v1.6.1-0.20240930130421-82c4d5f8c093
github.com/dymensionxyz/dymension-rdk v1.6.1-0.20241009122948-623826e0daa4
github.com/dymensionxyz/dymint v1.2.0-rc01.0.20240919105350-66f9b353655d
github.com/ethereum/go-ethereum v1.12.0
github.com/evmos/evmos/v12 v12.1.6
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -570,8 +570,8 @@ github.com/dymensionxyz/cometbft v0.34.29-0.20240906143736-1e3959c2826e h1:A5FIv
github.com/dymensionxyz/cometbft v0.34.29-0.20240906143736-1e3959c2826e/go.mod h1:L9shMfbkZ8B+7JlwANEr+NZbBcn+hBpwdbeYvA5rLCw=
github.com/dymensionxyz/cosmosclient v0.4.2-beta.0.20240821081230-b4018b2bac13 h1:u5yeve5jZR6TdRjjR+vYT/8PWKbhwCZxUmAu+/Tnxyg=
github.com/dymensionxyz/cosmosclient v0.4.2-beta.0.20240821081230-b4018b2bac13/go.mod h1:jabDQYXrccscSE0fXkh7eQFYPWJCRiuWKonFGObVq6s=
github.com/dymensionxyz/dymension-rdk v1.6.1-0.20240930130421-82c4d5f8c093 h1:qIEM9vKVBPfBkNTDEI0aKXzNdJ/LC9m0P5jiNM7SqU4=
github.com/dymensionxyz/dymension-rdk v1.6.1-0.20240930130421-82c4d5f8c093/go.mod h1:lMDz6B2DeH5SJeUAtFwxNeD8g1sj0cJGiDJf4rOz5tg=
github.com/dymensionxyz/dymension-rdk v1.6.1-0.20241009122948-623826e0daa4 h1:NZdp1MgtkMOdTmJmS4gslWZz+ko3s7ykHc7UZroUYEA=
github.com/dymensionxyz/dymension-rdk v1.6.1-0.20241009122948-623826e0daa4/go.mod h1:lMDz6B2DeH5SJeUAtFwxNeD8g1sj0cJGiDJf4rOz5tg=
github.com/dymensionxyz/dymint v1.2.0-rc01.0.20240919105350-66f9b353655d h1:YZ49Dd17SA//VBTKVncav7DhV5VE6M9n4a9Slm/hQeM=
github.com/dymensionxyz/dymint v1.2.0-rc01.0.20240919105350-66f9b353655d/go.mod h1:eEUBqDHi7EiO3CK1Fqct5joa5UeNzcEDJnXzvXuP5oA=
github.com/dymensionxyz/evmos/v12 v12.1.6-dymension-v0.4.2 h1:aVP3off7u2vsvRH7lHAUPTLdf9/AfnzC/rvvi0wC/co=
Expand Down

0 comments on commit 97b6b38

Please sign in to comment.