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

Conversation

czarcas7ic
Copy link
Member

@czarcas7ic czarcas7ic commented May 31, 2023

Closes: #XXX

What is the purpose of the change

Whitelists the cosmwasm MsgExecuteContract and MsgInstantiateContract for ICA in the v16 upgrade handler.

Testing and Verifying

(Please pick one of the following options)

This change has been done in multiple upgrade handlers previously.

Documentation and Release Note

  • Does this pull request introduce a new feature or user-facing behavior changes?
  • Changelog entry added to Unreleased section of CHANGELOG.md?

Where is the change documented?

  • Specification (x/{module}/README.md)
  • Osmosis documentation site
  • Code comments?
  • N/A

@czarcas7ic czarcas7ic added V:state/breaking State machine breaking PR A:no-changelog labels May 31, 2023
@github-actions github-actions bot added the C:app-wiring Changes to the app folder label May 31, 2023
@czarcas7ic czarcas7ic marked this pull request as ready for review May 31, 2023 23:26
app/upgrades/v16/upgrades.go Outdated Show resolved Hide resolved
Comment on lines 81 to 94
// Add both MsgExecuteContract and MsgInstantiateContract to the list of allowed messages.
hostParams := keepers.ICAHostKeeper.GetParams(ctx)
exists := false
for _, msg := range hostParams.AllowMessages {
if msg == sdk.MsgTypeURL(&cosmwasmtypes.MsgExecuteContract{}) || msg == sdk.MsgTypeURL(&cosmwasmtypes.MsgInstantiateContract{}) {
exists = true
break
}
}
if !exists {
hostParams.AllowMessages = append(hostParams.AllowMessages, sdk.MsgTypeURL(&cosmwasmtypes.MsgExecuteContract{}))
hostParams.AllowMessages = append(hostParams.AllowMessages, sdk.MsgTypeURL(&cosmwasmtypes.MsgInstantiateContract{}))
keepers.ICAHostKeeper.SetParams(ctx, hostParams)
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have some comments but I'm going to make the changes directly to save time on back and forth

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@czarcas7ic can you ACK this change and we merge?

da5a349

Copy link
Member

@p0mvn p0mvn Jun 2, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got ACK on Slack, going to merge upon CI passing

@p0mvn p0mvn merged commit 692462a into main Jun 2, 2023
@p0mvn p0mvn deleted the adam/add-ica-messages branch June 2, 2023 19:40
pysel pushed a commit that referenced this pull request Jun 6, 2023
* add ica auth messages

* append instead

* check if message is in list before adding

* updates

---------

Co-authored-by: Roman <[email protected]>
@github-actions github-actions bot mentioned this pull request Feb 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A:no-changelog C:app-wiring Changes to the app folder V:state/breaking State machine breaking PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants