-
Notifications
You must be signed in to change notification settings - Fork 1
/
proposal.go
63 lines (48 loc) · 2.35 KB
/
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
package types
import (
govv1beta1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1"
)
const (
ProposalTypeUnfreezeSignerParty = "rarimocore/UnfreezeSignerParty"
ProposalTypeReshareKeys = "rarimocore/ReshareKeys"
ProposalTypeSlash = "rarimocore/SlashProposal"
ProposalTypeDropParties = "rarimocore/DropPartiesProposal"
)
func init() {
govv1beta1.RegisterProposalType(ProposalTypeUnfreezeSignerParty)
govv1beta1.RegisterProposalType(ProposalTypeReshareKeys)
govv1beta1.RegisterProposalType(ProposalTypeSlash)
govv1beta1.RegisterProposalType(ProposalTypeDropParties)
govv1beta1.ModuleCdc.RegisterConcrete(&UnfreezeSignerPartyProposal{}, "rarimocore/UnfreezeSignerPartyProposal", nil)
govv1beta1.ModuleCdc.RegisterConcrete(&ReshareKeysProposal{}, "rarimocore/ReshareKeysProposal", nil)
govv1beta1.ModuleCdc.RegisterConcrete(&SlashProposal{}, "rarimocore/SlashProposal", nil)
govv1beta1.ModuleCdc.RegisterConcrete(&DropPartiesProposal{}, "rarimocore/DropPartiesProposal", nil)
}
// Implements Proposal Interface
var _ govv1beta1.Content = &UnfreezeSignerPartyProposal{}
func (m *UnfreezeSignerPartyProposal) ProposalRoute() string { return RouterKey }
func (m *UnfreezeSignerPartyProposal) ProposalType() string { return ProposalTypeUnfreezeSignerParty }
func (m *UnfreezeSignerPartyProposal) ValidateBasic() error {
return govv1beta1.ValidateAbstract(m)
}
// Implements Proposal Interface
var _ govv1beta1.Content = &ReshareKeysProposal{}
func (m *ReshareKeysProposal) ProposalRoute() string { return RouterKey }
func (m *ReshareKeysProposal) ProposalType() string { return ProposalTypeReshareKeys }
func (m *ReshareKeysProposal) ValidateBasic() error {
return govv1beta1.ValidateAbstract(m)
}
// Implements Proposal Interface
var _ govv1beta1.Content = &SlashProposal{}
func (m *SlashProposal) ProposalRoute() string { return RouterKey }
func (m *SlashProposal) ProposalType() string { return ProposalTypeSlash }
func (m *SlashProposal) ValidateBasic() error {
return govv1beta1.ValidateAbstract(m)
}
// Implements Proposal Interface
var _ govv1beta1.Content = &DropPartiesProposal{}
func (m *DropPartiesProposal) ProposalRoute() string { return RouterKey }
func (m *DropPartiesProposal) ProposalType() string { return ProposalTypeDropParties }
func (m *DropPartiesProposal) ValidateBasic() error {
return govv1beta1.ValidateAbstract(m)
}