forked from crypto-com/chain-indexing
-
Notifications
You must be signed in to change notification settings - Fork 0
/
create_msg_submit_param_change_proposal.go
38 lines (32 loc) · 1.1 KB
/
create_msg_submit_param_change_proposal.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
package command
import (
entity_event "github.com/WilliamXieCrypto/chain-indexing/entity/event"
"github.com/WilliamXieCrypto/chain-indexing/usecase/event"
"github.com/WilliamXieCrypto/chain-indexing/usecase/model"
)
type CreateMsgSubmitParamChangeProposal struct {
msgCommonParams event.MsgCommonParams
params model.MsgSubmitParamChangeProposalParams
}
func NewCreateMsgSubmitParamChangeProposal(
msgCommonParams event.MsgCommonParams,
params model.MsgSubmitParamChangeProposalParams,
) *CreateMsgSubmitParamChangeProposal {
return &CreateMsgSubmitParamChangeProposal{
msgCommonParams,
params,
}
}
// Name returns name of command
func (*CreateMsgSubmitParamChangeProposal) Name() string {
return "CreateSubmitMsgParamChangeProposal"
}
// Version returns version of command
func (*CreateMsgSubmitParamChangeProposal) Version() int {
return 1
}
// Exec process the command data and return the event accordingly
func (cmd *CreateMsgSubmitParamChangeProposal) Exec() (entity_event.Event, error) {
event := event.NewMsgSubmitParamChangeProposal(cmd.msgCommonParams, cmd.params)
return event, nil
}