diff --git a/app/app.go b/app/app.go index 442660d..4a4ba26 100644 --- a/app/app.go +++ b/app/app.go @@ -643,6 +643,7 @@ func (app *PassageApp) Name() string { return app.BaseApp.Name() } // BeginBlocker application updates every begin block func (app *PassageApp) BeginBlocker(ctx sdk.Context, req abci.RequestBeginBlock) abci.ResponseBeginBlock { + BeginBlockFork(ctx, app) return app.mm.BeginBlock(ctx, req) } diff --git a/app/forks.go b/app/forks.go new file mode 100644 index 0000000..b4d1cd0 --- /dev/null +++ b/app/forks.go @@ -0,0 +1,19 @@ +package app + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/ibc-go/v4/modules/apps/transfer/types" +) + +const forkHeight = 4426144 + +// BeginBlockFork updates, the IBC Transfer module's SendEnabled and ReceiveEnabled parameters are set to true. +func BeginBlockFork(ctx sdk.Context, app *PassageApp) { + if ctx.BlockHeight() == forkHeight { + ctx.Logger().Info("Applying Passage v2.1 upgrade. Enabling IBC transfers") + app.TransferKeeper.SetParams(ctx, types.Params{ + SendEnabled: true, + ReceiveEnabled: true, + }) + } +}