-
Notifications
You must be signed in to change notification settings - Fork 0
/
tgrade_validator_voting.go
57 lines (48 loc) · 2.19 KB
/
tgrade_validator_voting.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
package contract
import "github.com/furyanrasta/furya/x/twasm/contract"
// ValidatorVotingInitMsg setup contract on instantiation
type ValidatorVotingInitMsg struct {
VotingRules VotingRules `json:"rules"`
GroupAddress string `json:"group_addr"`
}
// ValidatorVotingExecuteMsg executable contract message
type ValidatorVotingExecuteMsg struct {
Propose *ValidatorVotingPropose `json:"propose,omitempty"`
Vote *struct{} `json:"vote,omitempty"`
Execute *struct{} `json:"execute,omitempty"`
// Close *struct{} `json:"close,omitempty"`
}
// ValidatorVotingPropose submit a new gov proposal
type ValidatorVotingPropose struct {
Title string `json:"title"`
Description string `json:"description"`
Proposal ValidatorProposal `json:"proposal"`
}
// ValidatorProposal proposal options.
type ValidatorProposal struct {
RegisterUpgrade *ChainUpgrade `json:"register_upgrade,omitempty"`
CancelUpgrade *struct{} `json:"cancel_upgrade,omitempty"`
// PinCodes that should be pinned in cache for high performance
PinCodes []uint64 `json:"pin_codes,omitempty"`
/// UnpinCodes that should be removed from cache to free space
UnpinCodes []uint64 `json:"unpin_codes,omitempty"`
UpdateConsensusBlockParams *ConsensusBlockParamsUpdate `json:"update_consensus_block_params,omitempty"`
UpdateConsensusEvidenceParams *ConsensusEvidenceParamsUpdate `json:"update_consensus_evidence_params,omitempty"`
MigrateContract *Migration `json:"migrate_contract,omitempty"`
Text *struct{} `json:"text,omitempty"`
}
type ChainUpgrade struct {
Name string `json:"name"`
Height uint64 `json:"height"`
Info string `json:"info"`
}
type ConsensusBlockParamsUpdate = contract.BlockParams
type ConsensusEvidenceParamsUpdate = contract.EvidenceParams
type Migration struct {
/// the contract address to be migrated
Contract string `json:"contract"`
/// a reference to the new WASM code that it should be migrated to
CodeID uint64 `json:"code_id"`
/// encoded message to be passed to perform the migration
MigrateMsg []byte `json:"migrate_msg"`
}