-
Notifications
You must be signed in to change notification settings - Fork 607
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
Conversation
app/upgrades/v16/upgrades.go
Outdated
// 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) | ||
} |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
* add ica auth messages * append instead * check if message is in list before adding * updates --------- Co-authored-by: Roman <[email protected]>
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
Unreleased
section ofCHANGELOG.md
?Where is the change documented?
x/{module}/README.md
)