/
gov.go
68 lines (52 loc) · 1.68 KB
/
gov.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
64
65
66
67
68
package types
import (
govtypes "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1"
)
const (
ProposalTypeCreateIBCConfig = "CreateIBCConfig"
ProposalTypeUpdateIBCConfig = "UpdateIBCConfig"
// ProposalTypeDeleteIBCConfig = "DeleteIBCConfig"
)
func init() {
govtypes.RegisterProposalType(ProposalTypeCreateIBCConfig)
govtypes.RegisterProposalType(ProposalTypeUpdateIBCConfig)
// govtypes.RegisterProposalType(ProposalTypeDeleteIBCConfig)
}
var (
_ govtypes.Content = &CrosschainCreateIBCConfigProposal{}
_ govtypes.Content = &CrosschainUpdateIBCConfigProposal{}
// _ govtypes.Content = &CrosschainDeleteIBCConfigProposal{}
)
func (p *CrosschainCreateIBCConfigProposal) ProposalRoute() string { return RouterKey }
func (p *CrosschainCreateIBCConfigProposal) ProposalType() string {
return ProposalTypeCreateIBCConfig
}
func (p *CrosschainCreateIBCConfigProposal) ValidateBasic() error {
err := govtypes.ValidateAbstract(p)
if err != nil {
return err
}
return nil
}
func (p *CrosschainUpdateIBCConfigProposal) ProposalRoute() string { return RouterKey }
func (p *CrosschainUpdateIBCConfigProposal) ProposalType() string {
return ProposalTypeUpdateIBCConfig
}
func (p *CrosschainUpdateIBCConfigProposal) ValidateBasic() error {
err := govtypes.ValidateAbstract(p)
if err != nil {
return err
}
return nil
}
// func (p *CrosschainDeleteIBCConfigProposal) ProposalRoute() string { return RouterKey }
// func (p *CrosschainDeleteIBCConfigProposal) ProposalType() string {
// return ProposalTypeCreateIBCConfig
// }
// func (p *CrosschainDeleteIBCConfigProposal) ValidateBasic() error {
// err := govtypes.ValidateAbstract(p)
// if err != nil {
// return err
// }
// return nil
// }