Skip to content

Commit

Permalink
feat(x/gov): add MsgSubmitProposal SetMsgs method (#17387)
Browse files Browse the repository at this point in the history
(cherry picked from commit ded6b47)

# Conflicts:
#	x/gov/types/v1/msgs.go
  • Loading branch information
julienrbrt authored and mergify[bot] committed Aug 15, 2023
1 parent dd028ed commit e4fcea6
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ Ref: https://keepachangelog.com/en/1.0.0/

### Improvements

* (x/gov) [#17387](https://github.com/cosmos/cosmos-sdk/pull/17387) Add `MsgSubmitProposal` `SetMsgs` method.
* (x/gov) [#17354](https://github.com/cosmos/cosmos-sdk/issues/17354) Emit `VoterAddr` in `proposal_vote` event.
* (x/genutil) [#17296](https://github.com/cosmos/cosmos-sdk/pull/17296) Add `MigrateHandler` to allow reuse migrate genesis related function.
* In v0.46, v0.47 this function is additive to the `genesis migrate` command. However in v0.50+, adding custom migrations to the `genesis migrate` command is directly possible.
Expand Down
16 changes: 16 additions & 0 deletions x/gov/types/v1/msgs.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,23 @@ func (m *MsgSubmitProposal) GetMsgs() ([]sdk.Msg, error) {
return sdktx.GetMsgs(m.Messages, "sdk.MsgProposal")
}

<<<<<<< HEAD

Check failure on line 43 in x/gov/types/v1/msgs.go

View workflow job for this annotation

GitHub Actions / build

syntax error: non-declaration statement outside function body

Check failure on line 43 in x/gov/types/v1/msgs.go

View workflow job for this annotation

GitHub Actions / build (arm64)

syntax error: non-declaration statement outside function body

Check failure on line 43 in x/gov/types/v1/msgs.go

View workflow job for this annotation

GitHub Actions / build (amd64)

syntax error: non-declaration statement outside function body

Check failure on line 43 in x/gov/types/v1/msgs.go

View workflow job for this annotation

GitHub Actions / build (arm)

syntax error: non-declaration statement outside function body

Check failure on line 43 in x/gov/types/v1/msgs.go

View workflow job for this annotation

GitHub Actions / test-race (02)

syntax error: non-declaration statement outside function body

Check failure on line 43 in x/gov/types/v1/msgs.go

View workflow job for this annotation

GitHub Actions / golangci-lint

syntax error: non-declaration statement outside function body

Check failure on line 43 in x/gov/types/v1/msgs.go

View workflow job for this annotation

GitHub Actions / golangci-lint

expected declaration, found '<<' (typecheck)

Check failure on line 43 in x/gov/types/v1/msgs.go

View workflow job for this annotation

GitHub Actions / golangci-lint

syntax error: non-declaration statement outside function body

Check failure on line 43 in x/gov/types/v1/msgs.go

View workflow job for this annotation

GitHub Actions / tests (02)

syntax error: non-declaration statement outside function body

Check failure on line 43 in x/gov/types/v1/msgs.go

View workflow job for this annotation

GitHub Actions / tests (03)

syntax error: non-declaration statement outside function body

Check failure on line 43 in x/gov/types/v1/msgs.go

View workflow job for this annotation

GitHub Actions / tests (03)

syntax error: non-declaration statement outside function body

Check failure on line 43 in x/gov/types/v1/msgs.go

View workflow job for this annotation

GitHub Actions / tests (03)

syntax error: non-declaration statement outside function body

Check failure on line 43 in x/gov/types/v1/msgs.go

View workflow job for this annotation

GitHub Actions / test-race (03)

syntax error: non-declaration statement outside function body

Check failure on line 43 in x/gov/types/v1/msgs.go

View workflow job for this annotation

GitHub Actions / test-race (03)

syntax error: non-declaration statement outside function body

Check failure on line 43 in x/gov/types/v1/msgs.go

View workflow job for this annotation

GitHub Actions / test-race (01)

syntax error: non-declaration statement outside function body

Check failure on line 43 in x/gov/types/v1/msgs.go

View workflow job for this annotation

GitHub Actions / test-race (01)

syntax error: non-declaration statement outside function body

Check failure on line 43 in x/gov/types/v1/msgs.go

View workflow job for this annotation

GitHub Actions / test-race (01)

syntax error: non-declaration statement outside function body

Check failure on line 43 in x/gov/types/v1/msgs.go

View workflow job for this annotation

GitHub Actions / tests (01)

syntax error: non-declaration statement outside function body

Check failure on line 43 in x/gov/types/v1/msgs.go

View workflow job for this annotation

GitHub Actions / tests (01)

syntax error: non-declaration statement outside function body

Check failure on line 43 in x/gov/types/v1/msgs.go

View workflow job for this annotation

GitHub Actions / tests (01)

syntax error: non-declaration statement outside function body

Check failure on line 43 in x/gov/types/v1/msgs.go

View workflow job for this annotation

GitHub Actions / tests (01)

syntax error: non-declaration statement outside function body

Check failure on line 43 in x/gov/types/v1/msgs.go

View workflow job for this annotation

GitHub Actions / tests (00)

syntax error: non-declaration statement outside function body

Check failure on line 43 in x/gov/types/v1/msgs.go

View workflow job for this annotation

GitHub Actions / tests (00)

syntax error: non-declaration statement outside function body

Check failure on line 43 in x/gov/types/v1/msgs.go

View workflow job for this annotation

GitHub Actions / tests (00)

syntax error: non-declaration statement outside function body

Check failure on line 43 in x/gov/types/v1/msgs.go

View workflow job for this annotation

GitHub Actions / tests (00)

syntax error: non-declaration statement outside function body

Check failure on line 43 in x/gov/types/v1/msgs.go

View workflow job for this annotation

GitHub Actions / test-race (00)

syntax error: non-declaration statement outside function body

Check failure on line 43 in x/gov/types/v1/msgs.go

View workflow job for this annotation

GitHub Actions / test-race (00)

syntax error: non-declaration statement outside function body

Check failure on line 43 in x/gov/types/v1/msgs.go

View workflow job for this annotation

GitHub Actions / test-race (00)

syntax error: non-declaration statement outside function body

Check failure on line 43 in x/gov/types/v1/msgs.go

View workflow job for this annotation

GitHub Actions / Analyze

syntax error: non-declaration statement outside function body
// Route implements Msg
=======
// SetMsgs packs sdk.Msg's into m.Messages Any's
// NOTE: this will overwrite any existing messages
func (m *MsgSubmitProposal) SetMsgs(msgs []sdk.Msg) error {
anys, err := sdktx.SetMsgs(msgs)
if err != nil {
return err
}

m.Messages = anys
return nil
}

// Route implements the sdk.Msg interface.
>>>>>>> ded6b47ae (feat(x/gov): add MsgSubmitProposal SetMsgs method (#17387))

Check failure on line 59 in x/gov/types/v1/msgs.go

View workflow job for this annotation

GitHub Actions / build

syntax error: non-declaration statement outside function body

Check failure on line 59 in x/gov/types/v1/msgs.go

View workflow job for this annotation

GitHub Actions / build

invalid character U+0023 '#'

Check failure on line 59 in x/gov/types/v1/msgs.go

View workflow job for this annotation

GitHub Actions / build (arm64)

syntax error: non-declaration statement outside function body

Check failure on line 59 in x/gov/types/v1/msgs.go

View workflow job for this annotation

GitHub Actions / build (arm64)

invalid character U+0023 '#'

Check failure on line 59 in x/gov/types/v1/msgs.go

View workflow job for this annotation

GitHub Actions / build (amd64)

syntax error: non-declaration statement outside function body

Check failure on line 59 in x/gov/types/v1/msgs.go

View workflow job for this annotation

GitHub Actions / build (amd64)

invalid character U+0023 '#'

Check failure on line 59 in x/gov/types/v1/msgs.go

View workflow job for this annotation

GitHub Actions / build (arm)

syntax error: non-declaration statement outside function body

Check failure on line 59 in x/gov/types/v1/msgs.go

View workflow job for this annotation

GitHub Actions / build (arm)

invalid character U+0023 '#'

Check failure on line 59 in x/gov/types/v1/msgs.go

View workflow job for this annotation

GitHub Actions / test-race (02)

syntax error: non-declaration statement outside function body

Check failure on line 59 in x/gov/types/v1/msgs.go

View workflow job for this annotation

GitHub Actions / test-race (02)

invalid character U+0023 '#'

Check failure on line 59 in x/gov/types/v1/msgs.go

View workflow job for this annotation

GitHub Actions / golangci-lint

syntax error: non-declaration statement outside function body

Check failure on line 59 in x/gov/types/v1/msgs.go

View workflow job for this annotation

GitHub Actions / golangci-lint

invalid character U+0023 '#' (typecheck)

Check failure on line 59 in x/gov/types/v1/msgs.go

View workflow job for this annotation

GitHub Actions / golangci-lint

illegal character U+0023 '#' (typecheck)

Check failure on line 59 in x/gov/types/v1/msgs.go

View workflow job for this annotation

GitHub Actions / golangci-lint

syntax error: non-declaration statement outside function body

Check failure on line 59 in x/gov/types/v1/msgs.go

View workflow job for this annotation

GitHub Actions / tests (02)

syntax error: non-declaration statement outside function body

Check failure on line 59 in x/gov/types/v1/msgs.go

View workflow job for this annotation

GitHub Actions / tests (02)

invalid character U+0023 '#'

Check failure on line 59 in x/gov/types/v1/msgs.go

View workflow job for this annotation

GitHub Actions / tests (03)

syntax error: non-declaration statement outside function body

Check failure on line 59 in x/gov/types/v1/msgs.go

View workflow job for this annotation

GitHub Actions / tests (03)

invalid character U+0023 '#'

Check failure on line 59 in x/gov/types/v1/msgs.go

View workflow job for this annotation

GitHub Actions / tests (03)

syntax error: non-declaration statement outside function body

Check failure on line 59 in x/gov/types/v1/msgs.go

View workflow job for this annotation

GitHub Actions / tests (03)

invalid character U+0023 '#'

Check failure on line 59 in x/gov/types/v1/msgs.go

View workflow job for this annotation

GitHub Actions / tests (03)

syntax error: non-declaration statement outside function body

Check failure on line 59 in x/gov/types/v1/msgs.go

View workflow job for this annotation

GitHub Actions / tests (03)

invalid character U+0023 '#'

Check failure on line 59 in x/gov/types/v1/msgs.go

View workflow job for this annotation

GitHub Actions / test-race (03)

syntax error: non-declaration statement outside function body

Check failure on line 59 in x/gov/types/v1/msgs.go

View workflow job for this annotation

GitHub Actions / test-race (03)

invalid character U+0023 '#'

Check failure on line 59 in x/gov/types/v1/msgs.go

View workflow job for this annotation

GitHub Actions / test-race (03)

syntax error: non-declaration statement outside function body

Check failure on line 59 in x/gov/types/v1/msgs.go

View workflow job for this annotation

GitHub Actions / test-race (03)

invalid character U+0023 '#'

Check failure on line 59 in x/gov/types/v1/msgs.go

View workflow job for this annotation

GitHub Actions / test-race (01)

syntax error: non-declaration statement outside function body

Check failure on line 59 in x/gov/types/v1/msgs.go

View workflow job for this annotation

GitHub Actions / test-race (01)

invalid character U+0023 '#'

Check failure on line 59 in x/gov/types/v1/msgs.go

View workflow job for this annotation

GitHub Actions / test-race (01)

syntax error: non-declaration statement outside function body

Check failure on line 59 in x/gov/types/v1/msgs.go

View workflow job for this annotation

GitHub Actions / test-race (01)

invalid character U+0023 '#'

Check failure on line 59 in x/gov/types/v1/msgs.go

View workflow job for this annotation

GitHub Actions / test-race (01)

syntax error: non-declaration statement outside function body

Check failure on line 59 in x/gov/types/v1/msgs.go

View workflow job for this annotation

GitHub Actions / test-race (01)

invalid character U+0023 '#'

Check failure on line 59 in x/gov/types/v1/msgs.go

View workflow job for this annotation

GitHub Actions / tests (01)

syntax error: non-declaration statement outside function body

Check failure on line 59 in x/gov/types/v1/msgs.go

View workflow job for this annotation

GitHub Actions / tests (01)

invalid character U+0023 '#'

Check failure on line 59 in x/gov/types/v1/msgs.go

View workflow job for this annotation

GitHub Actions / tests (01)

syntax error: non-declaration statement outside function body

Check failure on line 59 in x/gov/types/v1/msgs.go

View workflow job for this annotation

GitHub Actions / tests (01)

invalid character U+0023 '#'

Check failure on line 59 in x/gov/types/v1/msgs.go

View workflow job for this annotation

GitHub Actions / tests (01)

syntax error: non-declaration statement outside function body

Check failure on line 59 in x/gov/types/v1/msgs.go

View workflow job for this annotation

GitHub Actions / tests (01)

invalid character U+0023 '#'

Check failure on line 59 in x/gov/types/v1/msgs.go

View workflow job for this annotation

GitHub Actions / tests (00)

syntax error: non-declaration statement outside function body

Check failure on line 59 in x/gov/types/v1/msgs.go

View workflow job for this annotation

GitHub Actions / tests (00)

invalid character U+0023 '#'

Check failure on line 59 in x/gov/types/v1/msgs.go

View workflow job for this annotation

GitHub Actions / tests (00)

syntax error: non-declaration statement outside function body

Check failure on line 59 in x/gov/types/v1/msgs.go

View workflow job for this annotation

GitHub Actions / tests (00)

invalid character U+0023 '#'

Check failure on line 59 in x/gov/types/v1/msgs.go

View workflow job for this annotation

GitHub Actions / tests (00)

syntax error: non-declaration statement outside function body

Check failure on line 59 in x/gov/types/v1/msgs.go

View workflow job for this annotation

GitHub Actions / tests (00)

invalid character U+0023 '#'

Check failure on line 59 in x/gov/types/v1/msgs.go

View workflow job for this annotation

GitHub Actions / test-race (00)

syntax error: non-declaration statement outside function body

Check failure on line 59 in x/gov/types/v1/msgs.go

View workflow job for this annotation

GitHub Actions / test-race (00)

invalid character U+0023 '#'

Check failure on line 59 in x/gov/types/v1/msgs.go

View workflow job for this annotation

GitHub Actions / test-race (00)

syntax error: non-declaration statement outside function body

Check failure on line 59 in x/gov/types/v1/msgs.go

View workflow job for this annotation

GitHub Actions / test-race (00)

invalid character U+0023 '#'

Check failure on line 59 in x/gov/types/v1/msgs.go

View workflow job for this annotation

GitHub Actions / test-race (00)

syntax error: non-declaration statement outside function body

Check failure on line 59 in x/gov/types/v1/msgs.go

View workflow job for this annotation

GitHub Actions / test-race (00)

invalid character U+0023 '#'

Check failure on line 59 in x/gov/types/v1/msgs.go

View workflow job for this annotation

GitHub Actions / Analyze

syntax error: non-declaration statement outside function body

Check failure on line 59 in x/gov/types/v1/msgs.go

View workflow job for this annotation

GitHub Actions / Analyze

invalid character U+0023 '#'
func (m MsgSubmitProposal) Route() string { return types.RouterKey }

// Type implements Msg
Expand Down

0 comments on commit e4fcea6

Please sign in to comment.