-
Notifications
You must be signed in to change notification settings - Fork 0
/
gridiron_ap_voting.go
85 lines (72 loc) · 2.67 KB
/
gridiron_ap_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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
package contract
import (
sdk "github.com/cosmos/cosmos-sdk/types"
)
// APVotingInitMsg instantiation message
type APVotingInitMsg struct {
VotingRules VotingRules `json:"rules"`
// GroupContractAddress is the group contract that contains the member list
GroupContractAddress string `json:"group_addr"`
// Dispute cost on this contract
DisputeCost sdk.Coin `json:"dispute_cost"`
// Waiting period in seconds for this contract
WaitingPeriod uint64 `json:"waiting_period"`
// Cw3-fixed-multisig contract code id.
// This code id will be used to instantiate a group contract with the proposed arbiters list.
MultisigCodeID uint64 `json:"multisig_code_id"`
}
// APVotingExecute ap-voting contract execute messages
// See https://github.com/mage-coven/gridiron-contracts/blob/v0.9.0/contracts/gridiron-ap-voting/src/msg.rs
type APVotingExecute struct {
Propose *Propose `json:"propose,omitempty"`
Vote *VoteProposal `json:"vote,omitempty"`
Execute *ExecuteProposal `json:"execute,omitempty"`
Close *CloseProposal `json:"close,omitempty"`
RegisterComplaint *RegisterComplaint `json:"register_complaint,omitempty"`
AcceptComplaint *AcceptComplaint `json:"accept_complaint,omitempty"`
WithdrawComplaint *WithdrawComplaint `json:"withdraw_complaint,omitempty"`
RenderDecision *RenderDecision `json:"render_decision,omitempty"`
}
// Propose arbiters for a given dispute
type Propose struct {
Title string `json:"title"`
Description string `json:"description"`
APProposal APProposal `json:"arbiter_pool_proposal"`
}
type APProposal struct {
// An open text proposal with no actual logic executed when it passes
Text *struct{} `json:"text,omitempty"`
// Proposes arbiters for existing complaint
ProposeArbiters *ProposeArbiters `json:"propose_arbiters,omitempty"`
}
type ProposeArbiters struct {
CaseID uint64 `json:"case_id"`
Arbiters []sdk.AccAddress `json:"arbiters"`
}
type VoteProposal struct {
ProposalID uint64 `json:"proposal_id"`
Vote Vote `json:"vote"`
}
type ExecuteProposal struct {
ProposalID uint64 `json:"proposal_id"`
}
type CloseProposal struct {
ProposalID uint64 `json:"proposal_id"`
}
type RegisterComplaint struct {
Title string `json:"title"`
Description string `json:"description"`
Defendant string `json:"defendant"`
}
type AcceptComplaint struct {
ComplaintID uint64 `json:"complaint_id"`
}
type WithdrawComplaint struct {
ComplaintID uint64 `json:"complaint_id"`
Reason string `json:"reason"`
}
type RenderDecision struct {
ComplaintID uint64 `json:"complaint_id"`
Summary string `json:"summary"`
IpfsLink string `json:"ipfs_link"`
}