-
Notifications
You must be signed in to change notification settings - Fork 4
/
proposal.go
60 lines (57 loc) · 2.18 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
package v1beta1
import (
models "github.com/kaifei-bianjie/common-parser/types"
"time"
)
const (
ProposalTypeSoftwareUpgrade = "SoftwareUpgrade"
ProposalTypeCancelSoftwareUpgrade = "CancelSoftwareUpgrade"
ProposalTypeParameterChange = "ParameterChange"
ProposalTypeCommunityPoolSpend = "CommunityPoolSpend"
ProposalTypeText = "Text"
ProposalTypeClientUpdate = "ClientUpdate"
)
type (
ContentTextProposal struct {
Title string `json:"title" bson:"title"`
Description string `json:"description" bson:"description"`
}
ContentParameterChangeProposal struct {
Title string `json:"title" bson:"title"`
Description string `json:"description" bson:"description"`
Changes []ParamChange `json:"changes" bson:"changes"`
}
ParamChange struct {
Subspace string `json:"subspace" bson:"subspace"`
Key string `json:"key" bson:"key"`
Value string `json:"value" bson:"value"`
}
ContentCommunityPoolSpendProposal struct {
Title string `json:"title" bson:"title"`
Description string `json:"description" bson:"description"`
Recipient string `json:"recipient" bson:"recipient"`
Amount []models.Coin `json:"amount" bson:"amount"`
}
ContentSoftwareUpgradeProposal struct {
Title string `json:"title" bson:"title"`
Description string `json:"description" bson:"description"`
Plan Plan `json:"plan" bson:"plan"`
}
Plan struct {
Name string `json:"name" bson:"name"`
Time time.Time `json:"time" bson:"time"`
Height int64 `json:"height" bson:"height"`
Info string `json:"info" bson:"info"`
UpgradedClientState string `json:"upgraded_client_state" bson:"upgraded_client_state"`
}
ContentCancelSoftwareUpgradeProposal struct {
Title string `json:"title" bson:"title"`
Description string `json:"description" bson:"description"`
}
ContentClientUpdateProposal struct {
Title string `json:"title" bson:"title"`
Description string `json:"description" bson:"description"`
ClientId string `json:"client_id" bson:"client_id"`
Header string `json:"header" bson:"header"`
}
)