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

feat: add ica authorized messages in upgrade handler #5380

Merged
merged 5 commits into from
Jun 2, 2023
Merged
Changes from 2 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
11 changes: 9 additions & 2 deletions app/upgrades/v16/upgrades.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ import (
"github.com/osmosis-labs/osmosis/v15/app/keepers"
"github.com/osmosis-labs/osmosis/v15/app/upgrades"

distributiontypes "github.com/cosmos/cosmos-sdk/x/distribution/types"
cosmwasmtypes "github.com/CosmWasm/wasmd/x/wasm/types"
distrtypes "github.com/cosmos/cosmos-sdk/x/distribution/types"

cltypes "github.com/osmosis-labs/osmosis/v15/x/concentrated-liquidity/types"
superfluidtypes "github.com/osmosis-labs/osmosis/v15/x/superfluid/types"
Expand Down Expand Up @@ -77,6 +78,12 @@ func CreateUpgradeHandler(
return nil, err
}

// Add both MsgExecuteContract and MsgInstantiateContract to the list of allowed messages.
hostParams := keepers.ICAHostKeeper.GetParams(ctx)
hostParams.AllowMessages = append(hostParams.AllowMessages, sdk.MsgTypeURL(&cosmwasmtypes.MsgExecuteContract{}))
hostParams.AllowMessages = append(hostParams.AllowMessages, sdk.MsgTypeURL(&cosmwasmtypes.MsgInstantiateContract{}))
keepers.ICAHostKeeper.SetParams(ctx, hostParams)

p0mvn marked this conversation as resolved.
Show resolved Hide resolved
// Although parameters are set on InitGenesis() in RunMigrations(), we reset them here
// for visibility of the final configuration.
defaultConcentratedLiquidityParams := keepers.ConcentratedLiquidityKeeper.GetParams(ctx)
Expand All @@ -98,7 +105,7 @@ func CreateUpgradeHandler(
// Create a position to initialize the balancerPool.

// Get community pool and DAI/OSMO pool address.
communityPoolAddress := keepers.AccountKeeper.GetModuleAddress(distributiontypes.ModuleName)
communityPoolAddress := keepers.AccountKeeper.GetModuleAddress(distrtypes.ModuleName)
daiOsmoPool, err := keepers.PoolManagerKeeper.GetPool(ctx, DaiOsmoPoolId)
if err != nil {
return nil, err
Expand Down