feat(x/gov): execute any msg as sudo (#19304)

This commit is contained in:
Julien Robert
2024-02-02 08:41:50 +00:00
committed by GitHub
parent d783739dbd
commit 0830071053
49 changed files with 2202 additions and 515 deletions
+10
View File
@@ -16,6 +16,16 @@ const (
// in Anys.
type MsgResponse interface{}
// SetMsg takes a sdk.Msg and turn them into Any.
func SetMsg(msg sdk.Msg) (*types.Any, error) {
any, err := types.NewAnyWithValue(msg)
if err != nil {
return nil, err
}
return any, nil
}
// SetMsgs takes a slice of sdk.Msg's and turn them into Any's.
func SetMsgs(msgs []sdk.Msg) ([]*types.Any, error) {
anys := make([]*types.Any, len(msgs))