tx · B7Cife248UdeoER7nKSG6NCsmULfhytdEeD92HQYWK7B 3N8ecywhTyHzzhq9CfyC93xqLb1RAgbrKNo: -0.01400000 Waves 2021.03.23 12:07 [1450189] smart account 3N8ecywhTyHzzhq9CfyC93xqLb1RAgbrKNo > SELF 0.00000000 Waves
{ "type": 13, "id": "B7Cife248UdeoER7nKSG6NCsmULfhytdEeD92HQYWK7B", "fee": 1400000, "feeAssetId": null, "timestamp": 1616490314117, "version": 2, "chainId": 84, "sender": "3N8ecywhTyHzzhq9CfyC93xqLb1RAgbrKNo", "senderPublicKey": "GVVLiK3vsQPVDK1J1n1zq9hDw6nqXmAVhnB4ozEh8UGu", "proofs": [ "3Di1VZ9PinseTcBkU3wwvVSs1HjuDF4ATmtp32MDXKY4KCv5NS4utr9SbKSntNotH1jpF8r5n4NfrrK1H4PGUi3o" ], "script": "base64:AAIDAAAAAAAAADoIARIFCgMICAgSBAoCCAgSAwoBCBIECgIIARIDCgEIEgQKAggIEgMKAQgSAwoBCBIDCgEIEgQKAggIAAAAEgAAAAAGUVVPUlVNAAAAAAAAAAABAQAAAA10cnlHZXRJbnRlZ2VyAAAAAQAAAANrZXkEAAAAA3ZhbAQAAAAHJG1hdGNoMAkABBoAAAACBQAAAAR0aGlzBQAAAANrZXkDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAA0ludAQAAAABYgUAAAAHJG1hdGNoMAUAAAABYgAAAAAAAAAAAAUAAAADdmFsAQAAAAx0cnlHZXRTdHJpbmcAAAABAAAAA2tleQQAAAADdmFsBAAAAAckbWF0Y2gwCQAEHQAAAAIFAAAABHRoaXMFAAAAA2tleQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAGU3RyaW5nBAAAAAFiBQAAAAckbWF0Y2gwBQAAAAFiAgAAAAAFAAAAA3ZhbAAAAAAMbWFpbkNvbnRyYWN0CQEAAAAcQGV4dHJVc2VyKGFkZHJlc3NGcm9tU3RyaW5nKQAAAAECAAAAIzNOQ3NxZjRwRkd0R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pAAAABmNhbGxlcgQAAAAMcmV3YXJkQW1vdW50CQEAAAANdHJ5R2V0SW50ZWdlcgAAAAEJAAEsAAAAAgkAASwAAAACAgAAAAZ0YXNrc18FAAAABnRhc2tJZAIAAAAHX3Jld2FyZAQAAAALdGVhbUFkZHJlc3MJAQAAABFAZXh0ck5hdGl2ZSgxMDUzKQAAAAIFAAAABHRoaXMJAAEsAAAAAgkAASwAAAACAgAAAAZ0YXNrc18FAAAABnRhc2tJZAIAAAAHX2xlYWRlcgkBAAAADFNjcmlwdFJlc3VsdAAAAAIJAQAAAAhXcml0ZVNldAAAAAEJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIJAAEsAAAAAgkAASwAAAACAgAAAAZ0YXNrc18FAAAABnRhc2tJZAIAAAAHX3N0YXR1cwIAAAANd29ya19maW5pc2hlZAkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgkAASwAAAACCQABLAAAAAICAAAABnRhc2tzXwUAAAAGdGFza0lkAgAAAAdfcmVwb3J0BQAAAApyZXBvcnRMaW5rBQAAAANuaWwJAQAAAAtUcmFuc2ZlclNldAAAAAEJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwkBAAAAHEBleHRyVXNlcihhZGRyZXNzRnJvbVN0cmluZykAAAABBQAAAAt0ZWFtQWRkcmVzcwUAAAAMcmV3YXJkQW1vdW50BQAAAAR1bml0BQAAAANuaWwJAAACAAAAAQIAAAAgZ3JhbnRzIHdvcmtpbmcgZ3JvdXAgYWNjZXNzIG9ubHkAAAAAvRq5OA==", "height": 1450189, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 6NsJ8CxspFwH3Wzr9HyAB7opSjvk3j9fhDgFtmNoL4zM Next: none Full:
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 3 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let QUORUM = 1 | |
5 | 5 | ||
6 | 6 | func tryGetInteger (key) = { | |
7 | 7 | let val = match getInteger(this, key) { | |
8 | 8 | case b: Int => | |
9 | 9 | b | |
10 | 10 | case _ => | |
11 | 11 | 0 | |
12 | 12 | } | |
13 | 13 | val | |
14 | 14 | } | |
15 | 15 | ||
16 | 16 | ||
17 | 17 | func tryGetString (key) = { | |
18 | 18 | let val = match getString(this, key) { | |
19 | 19 | case b: String => | |
20 | 20 | b | |
21 | 21 | case _ => | |
22 | 22 | "" | |
23 | 23 | } | |
24 | 24 | val | |
25 | 25 | } | |
26 | 26 | ||
27 | 27 | ||
28 | 28 | let mainContract = addressFromStringValue("3NCsqf4pFGtECs3vM4j1nKqL6VA3HdiNGeZ") | |
29 | 29 | ||
30 | 30 | func getGroup () = { | |
31 | 31 | let val = match getString(mainContract, "working_group_members") { | |
32 | 32 | case b: String => | |
33 | 33 | b | |
34 | 34 | case _ => | |
35 | 35 | "" | |
36 | 36 | } | |
37 | 37 | val | |
38 | 38 | } | |
39 | 39 | ||
40 | 40 | ||
41 | 41 | func getMembers () = { | |
42 | 42 | let val = match getString(mainContract, "dao_members") { | |
43 | 43 | case b: String => | |
44 | 44 | b | |
45 | 45 | case _ => | |
46 | 46 | "" | |
47 | 47 | } | |
48 | 48 | val | |
49 | 49 | } | |
50 | 50 | ||
51 | 51 | ||
52 | 52 | func getDAOSize () = { | |
53 | 53 | let val = match getInteger(mainContract, "dao_size") { | |
54 | 54 | case b: Int => | |
55 | 55 | b | |
56 | 56 | case _ => | |
57 | 57 | 0 | |
58 | 58 | } | |
59 | 59 | val | |
60 | 60 | } | |
61 | 61 | ||
62 | 62 | ||
63 | 63 | func isGroupMember (a) = { | |
64 | 64 | let val = match getInteger(mainContract, (("working_group_member_" + toString(a)) + "_weight")) { | |
65 | 65 | case b: Int => | |
66 | 66 | b | |
67 | 67 | case _ => | |
68 | 68 | 0 | |
69 | 69 | } | |
70 | 70 | (val > 0) | |
71 | 71 | } | |
72 | 72 | ||
73 | 73 | ||
74 | 74 | func canMemberVote (i) = { | |
75 | 75 | let val = match getInteger(mainContract, (("dao_member_" + toString(i.caller)) + "_weight")) { | |
76 | 76 | case b: Int => | |
77 | 77 | b | |
78 | 78 | case _ => | |
79 | 79 | 0 | |
80 | 80 | } | |
81 | 81 | (val > 0) | |
82 | 82 | } | |
83 | 83 | ||
84 | 84 | ||
85 | 85 | func isVotingDisable (taskId) = (tryGetString((("tasks_" + taskId) + "_status")) != "voting_started") | |
86 | 86 | ||
87 | 87 | ||
88 | 88 | func isQuorumAchieved (taskId) = (QUORUM > ((tryGetInteger((("tasks_" + taskId) + "_voting_amount")) * 100) / getDAOSize())) | |
89 | 89 | ||
90 | 90 | ||
91 | 91 | func getVoteValue (s) = if ((s == "like")) | |
92 | 92 | then 1 | |
93 | 93 | else if ((s == "dislike")) | |
94 | 94 | then -1 | |
95 | 95 | else throw("you need to vote with 'like' or 'dislike' value") | |
96 | 96 | ||
97 | 97 | ||
98 | 98 | func initTaskVotingConditions (taskId,address) = if (!(isGroupMember(address))) | |
99 | 99 | then throw("grants working group access only") | |
100 | 100 | else if ((tryGetString((("tasks_" + taskId) + "_status")) != "")) | |
101 | 101 | then throw("task is not new") | |
102 | 102 | else true | |
103 | 103 | ||
104 | 104 | ||
105 | 105 | func startWorkConditions (taskId,address) = if ((tryGetString((("tasks_" + taskId) + "_status")) != "approved")) | |
106 | 106 | then throw("the task is not approved") | |
107 | 107 | else if ((toString(address) != tryGetString((("tasks_" + taskId) + "_leader")))) | |
108 | 108 | then throw("team leader only") | |
109 | 109 | else true | |
110 | 110 | ||
111 | 111 | ||
112 | 112 | func addRewardConditions (taskId,reward,address) = if ((tryGetString((("tasks_" + taskId) + "_status")) != "")) | |
113 | 113 | then throw("voting was already started, so the reward amount cannot be changed") | |
114 | 114 | else if ((toString(address) != tryGetString((("tasks_" + taskId) + "_leader")))) | |
115 | 115 | then throw("team leader only") | |
116 | 116 | else true | |
117 | 117 | ||
118 | 118 | ||
119 | 119 | func voteForTaskProposalConditions (taskId,i) = if (!(canMemberVote(i))) | |
120 | 120 | then throw("you can't vote") | |
121 | 121 | else if (isVotingDisable(taskId)) | |
122 | 122 | then throw("voting is closed or not started") | |
123 | 123 | else if (!((tryGetInteger(((("tasks_" + taskId) + "_voted_") + toString(i.caller))) == 0))) | |
124 | 124 | then throw("you have already voted") | |
125 | 125 | else true | |
126 | 126 | ||
127 | 127 | ||
128 | 128 | func finishTaskProposalVotingConditions (taskId,address) = if ((tryGetString((("tasks_" + taskId) + "_status")) != "voting_started")) | |
129 | 129 | then throw("voting is not active") | |
130 | 130 | else if (isQuorumAchieved(taskId)) | |
131 | 131 | then throw((("more than " + toString(QUORUM)) + "% members have to vote before finishing the voting")) | |
132 | 132 | else if (!(isGroupMember(address))) | |
133 | 133 | then throw("grants working group access only") | |
134 | 134 | else true | |
135 | 135 | ||
136 | 136 | ||
137 | 137 | func acceptWorkResultConditions (address) = if (!(isGroupMember(address))) | |
138 | 138 | then throw("grants working group access only") | |
139 | 139 | else true | |
140 | 140 | ||
141 | 141 | ||
142 | 142 | @Callable(i) | |
143 | 143 | func addTask (title,link,hash) = WriteSet([DataEntry((("tasks_" + toBase58String(i.transactionId)) + "_title"), title), DataEntry((("tasks_" + toBase58String(i.transactionId)) + "_link"), link), DataEntry((("tasks_" + toBase58String(i.transactionId)) + "_hash"), hash), DataEntry((("tasks_" + toBase58String(i.transactionId)) + "_leader"), toString(i.caller))]) | |
144 | 144 | ||
145 | 145 | ||
146 | 146 | ||
147 | 147 | @Callable(i) | |
148 | 148 | func resetHash (taskId,hash) = WriteSet([DataEntry((("tasks_" + taskId) + "_hash"), hash)]) | |
149 | 149 | ||
150 | 150 | ||
151 | 151 | ||
152 | 152 | @Callable(i) | |
153 | 153 | func hideTask (taskId) = WriteSet([DataEntry((("tasks_" + taskId) + "_status"), "hide")]) | |
154 | 154 | ||
155 | 155 | ||
156 | 156 | ||
157 | 157 | @Callable(i) | |
158 | 158 | func addReward (taskId,reward) = if (addRewardConditions(taskId, reward, i.caller)) | |
159 | 159 | then WriteSet([DataEntry((("tasks_" + taskId) + "_reward"), reward)]) | |
160 | 160 | else throw("checks are not passed") | |
161 | 161 | ||
162 | 162 | ||
163 | 163 | ||
164 | 164 | @Callable(i) | |
165 | 165 | func initTaskVoting (taskId) = if (initTaskVotingConditions(taskId, i.caller)) | |
166 | 166 | then WriteSet([DataEntry((("tasks_" + taskId) + "_status"), "voting_started")]) | |
167 | 167 | else throw("checks are not passed") | |
168 | 168 | ||
169 | 169 | ||
170 | 170 | ||
171 | 171 | @Callable(i) | |
172 | 172 | func voteForTaskProposal (taskId,voteValueString) = if (voteForTaskProposalConditions(taskId, i)) | |
173 | 173 | then { | |
174 | 174 | let voteKey = ((("tasks_" + taskId) + "_voted_") + toString(i.caller)) | |
175 | 175 | let votingKey = (("tasks_" + taskId) + "_voting_state") | |
176 | 176 | let votesAmountKey = (("tasks_" + taskId) + "_voting_amount") | |
177 | 177 | let voteValue = getVoteValue(voteValueString) | |
178 | 178 | let votingState = tryGetInteger(votingKey) | |
179 | 179 | let votesAmountState = (tryGetInteger(votesAmountKey) + 1) | |
180 | 180 | WriteSet([DataEntry(votingKey, (votingState + voteValue)), DataEntry(voteKey, voteValue), DataEntry(votesAmountKey, votesAmountState)]) | |
181 | 181 | } | |
182 | 182 | else throw("checks are not passed") | |
183 | 183 | ||
184 | 184 | ||
185 | 185 | ||
186 | 186 | @Callable(i) | |
187 | 187 | func finishTaskProposalVoting (taskId) = if (finishTaskProposalVotingConditions(taskId, i.caller)) | |
188 | 188 | then { | |
189 | 189 | let statusKey = (("tasks_" + taskId) + "_status") | |
190 | 190 | let votingKey = (("tasks_" + taskId) + "_voting_state") | |
191 | 191 | WriteSet([DataEntry(statusKey, if ((tryGetInteger(votingKey) > 0)) | |
192 | 192 | then "approved" | |
193 | 193 | else "rejected")]) | |
194 | 194 | } | |
195 | 195 | else throw("checks are not passed") | |
196 | 196 | ||
197 | 197 | ||
198 | 198 | ||
199 | 199 | @Callable(i) | |
200 | 200 | func startWork (taskId) = if (startWorkConditions(taskId, i.caller)) | |
201 | 201 | then WriteSet([DataEntry((("tasks_" + taskId) + "_status"), "work_started")]) | |
202 | 202 | else throw("checks are not passed") | |
203 | 203 | ||
204 | 204 | ||
205 | 205 | ||
206 | 206 | @Callable(i) | |
207 | 207 | func rejectTask (taskId) = if (isGroupMember(i.caller)) | |
208 | 208 | then WriteSet([DataEntry((("tasks_" + taskId) + "_status"), "rejected")]) | |
209 | 209 | else throw("grants working group access only") | |
210 | 210 | ||
211 | 211 | ||
212 | 212 | ||
213 | 213 | @Callable(i) | |
214 | 214 | func acceptWorkResult (taskId,reportLink) = if (acceptWorkResultConditions(i.caller)) | |
215 | 215 | then { | |
216 | 216 | let rewardAmount = tryGetInteger((("tasks_" + taskId) + "_reward")) | |
217 | 217 | let teamAddress = getStringValue(this, (("tasks_" + taskId) + "_leader")) | |
218 | 218 | ScriptResult(WriteSet([DataEntry((("tasks_" + taskId) + "_status"), "work_finished"), DataEntry((("tasks_" + taskId) + "_report"), reportLink)]), TransferSet([ScriptTransfer(addressFromStringValue(teamAddress), rewardAmount, unit)])) | |
219 | 219 | } | |
220 | 220 | else throw("grants working group access only") | |
221 | 221 | ||
222 | 222 |
github/deemru/w8io/026f985 35.64 ms ◑