tx · 8v8LYRYan6USKnRKgtkSH1B77bBAFHfJjm1ucsnLAt3E 3Mxk4Jmjd8SdE2MojSXsUQ8LVYM8vRzmFSA: -0.10000000 Waves 2020.11.23 14:04 [1277947] smart account 3Mxk4Jmjd8SdE2MojSXsUQ8LVYM8vRzmFSA > SELF 0.00000000 Waves
{ "type": 13, "id": "8v8LYRYan6USKnRKgtkSH1B77bBAFHfJjm1ucsnLAt3E", "fee": 10000000, "feeAssetId": null, "timestamp": 1606129478308, "version": 2, "chainId": 84, "sender": "3Mxk4Jmjd8SdE2MojSXsUQ8LVYM8vRzmFSA", "senderPublicKey": "4xMxUnfdbHYsent96ThiYC63gXHiahi6bh3urdHHntHi", "proofs": [ "3JL5keQN1qn5tjvVaFbuoNnK8cJ58J9W7JzhF4Zr9fNXPV9iveRX614ARbsVUQdrKhUibLyj4vtAGg1WimaLautr" ], "script": "base64:AAIDAAAAAAAAAEUIARIDCgEIEgMKAQgSBAoCCAgSAwoBCBIECgIICBIDCgEIEgUKAwgICBIFCgMICAgSAwoBCBIDCgEIEgMKAQgSBAoCCAgAAAAIAAAAAAZRVU9SVU0AAAAAAAAAAAEBAAAADXRyeUdldEludGVnZXIAAAABAAAAA2tleQQAAAADdmFsBAAAAAckbWF0Y2gwCQAEGgAAAAIFAAAABHRoaXMFAAAAA2tleQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAADSW50BAAAAAFiBQAAAAckbWF0Y2gwBQAAAAFiAAAAAAAAAAAABQAAAAN2YWwBAAAADHRyeUdldFN0cmluZwAAAAEAAAADa2V5BAAAAAN2YWwEAAAAByRtYXRjaDAJAAQdAAAAAgUAAAAEdGhpcwUAAAADa2V5AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAAZTdHJpbmcEAAAAAWIFAAAAByRtYXRjaDAFAAAAAWICAAAAAAUAAAADdmFsAQAAAAdpc093bmVyAAAAAQAAAAdhZGRyZXNzCQAAAAAAAAIFAAAAB2FkZHJlc3MFAAAABHRoaXMBAA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kABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgkAASwAAAACCQABLAAAAAIJAAEsAAAAAgkAASwAAAACAgAAAAZ0YXNrc18FAAAABnRhc2tJZAIAAAAFX2FwcF8FAAAADnRlYW1JZGVudGlmaWVyAgAAAAdfcmVwb3J0BQAAAApyZXBvcnRMaW5rBQAAAANuaWwJAQAAAAtUcmFuc2ZlclNldAAAAAEJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwkBAAAAHEBleHRyVXNlcihhZGRyZXNzRnJvbVN0cmluZykAAAABBQAAAAt0ZWFtQWRkcmVzcwUAAAAMcmV3YXJkQW1vdW50BQAAAAR1bml0BQAAAANuaWwAAAAAkChD0w==", "height": 1277947, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 7SgJtYZxBxuknKwKiRf4Rm3Vyu3bJWH2mDptNNpgjcoG Next: 7euChW2kU371bRpT1KyZsEuh4abHga1h5rUQmDdjEBSB Diff:
Old | New | Differences | |
---|---|---|---|
29 | 29 | ||
30 | 30 | ||
31 | 31 | func getGroup () = { | |
32 | - | let val = match getString(this, "working_group") { | |
32 | + | let val = match getString(this, "working_group_members") { | |
33 | 33 | case b: String => | |
34 | 34 | b | |
35 | 35 | case _ => | |
60 | 60 | func addDAOMember (memberAddress) = if (!(isOwner(i.caller))) | |
61 | 61 | then throw("access only to the DAO owner") | |
62 | 62 | else if ((tryGetInteger((("dao_member_" + memberAddress) + "_weight")) == 1)) | |
63 | - | then throw(" | |
63 | + | then throw("This user already exists") | |
64 | 64 | else { | |
65 | 65 | let group = getMembers() | |
66 | 66 | let newGroup = ((group + ";") + memberAddress) | |
158 | 158 | func applyForTask (taskId,teamName,link) = { | |
159 | 159 | let status = tryGetString((("tasks_" + taskId) + "_status")) | |
160 | 160 | if ((status != "ready_to_apply")) | |
161 | - | then throw(" | |
161 | + | then throw("This grant has not yet been approved") | |
162 | 162 | else { | |
163 | 163 | let applicantKey = drop(toString(i.caller), 20) | |
164 | 164 | if ((tryGetString((((("tasks_" + taskId) + "_app_") + applicantKey) + "_name")) == teamName)) | |
243 | 243 | then throw("No one has yet responded to the grant") | |
244 | 244 | else { | |
245 | 245 | let chosenTeamId = { | |
246 | - | let $ | |
247 | - | let $ | |
248 | - | let $ | |
249 | - | if (($ | |
250 | - | then $ | |
246 | + | let $list1255712588 = [0, 1] | |
247 | + | let $size1255712588 = size($list1255712588) | |
248 | + | let $acc01255712588 = 0 | |
249 | + | if (($size1255712588 == 0)) | |
250 | + | then $acc01255712588 | |
251 | 251 | else { | |
252 | - | let $ | |
253 | - | if (($ | |
254 | - | then $ | |
252 | + | let $acc11255712588 = hasMoreVotes($acc01255712588, $list1255712588[0]) | |
253 | + | if (($size1255712588 == 1)) | |
254 | + | then $acc11255712588 | |
255 | 255 | else { | |
256 | - | let $ | |
257 | - | if (($ | |
258 | - | then $ | |
256 | + | let $acc21255712588 = hasMoreVotes($acc11255712588, $list1255712588[1]) | |
257 | + | if (($size1255712588 == 2)) | |
258 | + | then $acc21255712588 | |
259 | 259 | else { | |
260 | - | let $ | |
260 | + | let $acc31255712588 = hasMoreVotes($acc21255712588, $list1255712588[2]) | |
261 | 261 | throw("List size exceed 2") | |
262 | 262 | } | |
263 | 263 | } | |
284 | 284 | ||
285 | 285 | ||
286 | 286 | @Callable(i) | |
287 | - | func acceptWorkResult (taskId) = if (!(isGroupMember(i.caller))) | |
287 | + | func rejectTask (taskId) = if (!(isGroupMember(i.caller))) | |
288 | + | then throw("grants working group access only") | |
289 | + | else { | |
290 | + | let teamIdentifier = getStringValue(this, (("tasks_" + taskId) + "_performer")) | |
291 | + | WriteSet([DataEntry((("tasks_" + taskId) + "_status"), "rejected"), DataEntry((((("tasks_" + taskId) + "_app_") + teamIdentifier) + "_process"), "rejected")]) | |
292 | + | } | |
293 | + | ||
294 | + | ||
295 | + | ||
296 | + | @Callable(i) | |
297 | + | func acceptWorkResult (taskId,reportLink) = if (!(isGroupMember(i.caller))) | |
288 | 298 | then throw("grants working group access only") | |
289 | 299 | else { | |
290 | 300 | let rewardAmount = tryGetInteger((("tasks_" + taskId) + "_reward")) | |
291 | 301 | let teamIdentifier = getStringValue(this, (("tasks_" + taskId) + "_performer")) | |
292 | 302 | let teamAddress = getStringValue(this, (((("tasks_" + taskId) + "_app_") + teamIdentifier) + "_leader")) | |
293 | - | ScriptResult(WriteSet([DataEntry((("tasks_" + taskId) + "_status"), "work_finished"), DataEntry((((("tasks_" + taskId) + "_app_") + teamIdentifier) + "_process"), "work_finished")]), TransferSet([ScriptTransfer(addressFromStringValue(teamAddress), rewardAmount, unit)])) | |
303 | + | ScriptResult(WriteSet([DataEntry((("tasks_" + taskId) + "_status"), "work_finished"), DataEntry((((("tasks_" + taskId) + "_app_") + teamIdentifier) + "_process"), "work_finished"), DataEntry((((("tasks_" + taskId) + "_app_") + teamIdentifier) + "_report"), reportLink)]), TransferSet([ScriptTransfer(addressFromStringValue(teamAddress), rewardAmount, unit)])) | |
294 | 304 | } | |
295 | 305 | ||
296 | 306 |
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 | func isOwner (address) = (address == this) | |
29 | 29 | ||
30 | 30 | ||
31 | 31 | func getGroup () = { | |
32 | - | let val = match getString(this, "working_group") { | |
32 | + | let val = match getString(this, "working_group_members") { | |
33 | 33 | case b: String => | |
34 | 34 | b | |
35 | 35 | case _ => | |
36 | 36 | "" | |
37 | 37 | } | |
38 | 38 | val | |
39 | 39 | } | |
40 | 40 | ||
41 | 41 | ||
42 | 42 | func getMembers () = { | |
43 | 43 | let val = match getString(this, "dao_members") { | |
44 | 44 | case b: String => | |
45 | 45 | b | |
46 | 46 | case _ => | |
47 | 47 | "" | |
48 | 48 | } | |
49 | 49 | val | |
50 | 50 | } | |
51 | 51 | ||
52 | 52 | ||
53 | 53 | func isGroupMember (a) = (tryGetInteger((("working_group_member_" + toString(a)) + "_weight")) > 0) | |
54 | 54 | ||
55 | 55 | ||
56 | 56 | func canMemberVote (i) = (tryGetInteger((("dao_member_" + toString(i.caller)) + "_weight")) > 0) | |
57 | 57 | ||
58 | 58 | ||
59 | 59 | @Callable(i) | |
60 | 60 | func addDAOMember (memberAddress) = if (!(isOwner(i.caller))) | |
61 | 61 | then throw("access only to the DAO owner") | |
62 | 62 | else if ((tryGetInteger((("dao_member_" + memberAddress) + "_weight")) == 1)) | |
63 | - | then throw(" | |
63 | + | then throw("This user already exists") | |
64 | 64 | else { | |
65 | 65 | let group = getMembers() | |
66 | 66 | let newGroup = ((group + ";") + memberAddress) | |
67 | 67 | let groupSize = tryGetInteger("dao_size") | |
68 | 68 | let newGroupSize = (groupSize + 1) | |
69 | 69 | WriteSet([DataEntry("dao_members", newGroup), DataEntry("dao_size", newGroupSize), DataEntry((("dao_member_" + memberAddress) + "_weight"), 1)]) | |
70 | 70 | } | |
71 | 71 | ||
72 | 72 | ||
73 | 73 | ||
74 | 74 | @Callable(i) | |
75 | 75 | func addGroupMember (memberAddress) = if (!(isOwner(i.caller))) | |
76 | 76 | then throw("access only to the DAO owner") | |
77 | 77 | else if ((tryGetInteger((("working_group_member_" + memberAddress) + "_weight")) == 1)) | |
78 | 78 | then throw("This user already exists") | |
79 | 79 | else { | |
80 | 80 | let group = getGroup() | |
81 | 81 | let newGroup = ((group + ";") + memberAddress) | |
82 | 82 | let groupSize = tryGetInteger("working_group_size") | |
83 | 83 | let newGroupSize = (groupSize + 1) | |
84 | 84 | WriteSet([DataEntry("working_group_members", newGroup), DataEntry("working_group_size", newGroupSize), DataEntry((("working_group_member_" + memberAddress) + "_weight"), 1)]) | |
85 | 85 | } | |
86 | 86 | ||
87 | 87 | ||
88 | 88 | ||
89 | 89 | @Callable(i) | |
90 | 90 | func addTask (title,link) = if (!(isGroupMember(i.caller))) | |
91 | 91 | then throw("grants working group access only") | |
92 | 92 | else WriteSet([DataEntry((("tasks_" + toBase58String(i.transactionId)) + "_title"), title), DataEntry((("tasks_" + toBase58String(i.transactionId)) + "_link"), link)]) | |
93 | 93 | ||
94 | 94 | ||
95 | 95 | ||
96 | 96 | @Callable(i) | |
97 | 97 | func addTaskDetails (taskId) = if (!(isGroupMember(i.caller))) | |
98 | 98 | then throw("grants working group access only") | |
99 | 99 | else { | |
100 | 100 | let reward = extract(i.payment).amount | |
101 | 101 | WriteSet([DataEntry((("tasks_" + taskId) + "_reward"), reward), DataEntry((("tasks_" + taskId) + "_status"), "proposed")]) | |
102 | 102 | } | |
103 | 103 | ||
104 | 104 | ||
105 | 105 | ||
106 | 106 | @Callable(i) | |
107 | 107 | func voteForTaskProposal (taskId,voteValue) = if (!(canMemberVote(i))) | |
108 | 108 | then throw("you can't vote") | |
109 | 109 | else if ((getStringValue(this, (("tasks_" + taskId) + "_status")) != "proposed")) | |
110 | 110 | then throw("voting is closed or not started") | |
111 | 111 | else if (if ((voteValue != "like")) | |
112 | 112 | then (voteValue != "dislike") | |
113 | 113 | else false) | |
114 | 114 | then throw("you need to vote like or dislike") | |
115 | 115 | else { | |
116 | 116 | func getValue (vote) = if ((vote == "like")) | |
117 | 117 | then 1 | |
118 | 118 | else -1 | |
119 | 119 | ||
120 | 120 | let voteKey = ((("tasks_" + taskId) + "_voted_") + toString(i.caller)) | |
121 | 121 | let previousVote = tryGetInteger(voteKey) | |
122 | 122 | if (!((previousVote == 0))) | |
123 | 123 | then throw("you have already voted") | |
124 | 124 | else { | |
125 | 125 | let votingKey = (("tasks_" + taskId) + "_voting_state") | |
126 | 126 | let votingState = tryGetInteger(votingKey) | |
127 | 127 | let votesAmountKey = (("tasks_" + taskId) + "_voting_amount") | |
128 | 128 | let votesAmountState = (tryGetInteger(votingKey) + 1) | |
129 | 129 | let newVotingState = (votingState + getValue(voteValue)) | |
130 | 130 | ScriptResult(WriteSet([DataEntry(votingKey, newVotingState), DataEntry(voteKey, getValue(voteValue)), DataEntry(votesAmountKey, votesAmountState)]), TransferSet([ScriptTransfer(i.caller, 500000, unit)])) | |
131 | 131 | } | |
132 | 132 | } | |
133 | 133 | ||
134 | 134 | ||
135 | 135 | ||
136 | 136 | @Callable(i) | |
137 | 137 | func finishTaskProposalVoting (taskId) = if ((QUORUM > ((tryGetInteger((("tasks_" + taskId) + "_voting_amount")) * 100) / tryGetInteger("dao_size")))) | |
138 | 138 | then throw((("more than " + toString(QUORUM)) + "% members have to vote before finishing the voting")) | |
139 | 139 | else if (!(isGroupMember(i.caller))) | |
140 | 140 | then throw("grants working group access only") | |
141 | 141 | else { | |
142 | 142 | let votingKey = (("tasks_" + taskId) + "_voting_state") | |
143 | 143 | let votingState = tryGetInteger(votingKey) | |
144 | 144 | if ((votingState > 0)) | |
145 | 145 | then { | |
146 | 146 | let votingResult = "ready_to_apply" | |
147 | 147 | WriteSet([DataEntry((("tasks_" + taskId) + "_status"), votingResult)]) | |
148 | 148 | } | |
149 | 149 | else { | |
150 | 150 | let votingResult = "rejected" | |
151 | 151 | WriteSet([DataEntry((("tasks_" + taskId) + "_status"), votingResult)]) | |
152 | 152 | } | |
153 | 153 | } | |
154 | 154 | ||
155 | 155 | ||
156 | 156 | ||
157 | 157 | @Callable(i) | |
158 | 158 | func applyForTask (taskId,teamName,link) = { | |
159 | 159 | let status = tryGetString((("tasks_" + taskId) + "_status")) | |
160 | 160 | if ((status != "ready_to_apply")) | |
161 | - | then throw(" | |
161 | + | then throw("This grant has not yet been approved") | |
162 | 162 | else { | |
163 | 163 | let applicantKey = drop(toString(i.caller), 20) | |
164 | 164 | if ((tryGetString((((("tasks_" + taskId) + "_app_") + applicantKey) + "_name")) == teamName)) | |
165 | 165 | then throw("commnad with name is exist") | |
166 | 166 | else { | |
167 | 167 | let listKey = (("tasks_" + taskId) + "_applicants") | |
168 | 168 | let currentApplicantsList = tryGetString(listKey) | |
169 | 169 | let newApplicantsList = ((currentApplicantsList + ";") + toString(i.caller)) | |
170 | 170 | WriteSet([DataEntry((((("tasks_" + taskId) + "_app_") + applicantKey) + "_name"), teamName), DataEntry((((("tasks_" + taskId) + "_app_") + applicantKey) + "_link"), link), DataEntry((((("tasks_" + taskId) + "_app_") + applicantKey) + "_leader"), toString(i.caller)), DataEntry((((("tasks_" + taskId) + "_app_") + applicantKey) + "_id"), applicantKey), DataEntry(listKey, newApplicantsList)]) | |
171 | 171 | } | |
172 | 172 | } | |
173 | 173 | } | |
174 | 174 | ||
175 | 175 | ||
176 | 176 | ||
177 | 177 | @Callable(i) | |
178 | 178 | func voteForApplicant (taskId,teamIdentifier,voteValue) = if (!(canMemberVote(i))) | |
179 | 179 | then throw("you can't vote") | |
180 | 180 | else if ((tryGetString((("tasks_" + taskId) + "_status")) != "ready_to_apply")) | |
181 | 181 | then throw("voting is closed or not started") | |
182 | 182 | else if ((tryGetString((((("tasks_" + taskId) + "_app_") + teamIdentifier) + "_id")) != teamIdentifier)) | |
183 | 183 | then throw("team is not found use id team on application") | |
184 | 184 | else if (if ((voteValue != "like")) | |
185 | 185 | then (voteValue != "dislike") | |
186 | 186 | else false) | |
187 | 187 | then throw("you need to vote like or dislike") | |
188 | 188 | else { | |
189 | 189 | func getValue (vote) = if ((vote == "like")) | |
190 | 190 | then 1 | |
191 | 191 | else -1 | |
192 | 192 | ||
193 | 193 | let listKey = (((("tasks_" + taskId) + "_app_") + teamIdentifier) + "_voted") | |
194 | 194 | let newApplicantsList = ((tryGetString(listKey) + ";") + toString(i.caller)) | |
195 | 195 | let voteHash = (drop(toString(i.caller), 20) + teamIdentifier) | |
196 | 196 | let voteKey = ((("tasks_" + taskId) + "_vh_") + voteHash) | |
197 | 197 | if ((tryGetString(voteKey) == toString(i.caller))) | |
198 | 198 | then throw("you have already voted on this team") | |
199 | 199 | else { | |
200 | 200 | let teamVotesAmountKey = (((("tasks_" + taskId) + "_app_") + teamIdentifier) + "_votes") | |
201 | 201 | let teamScoreKey = (((("tasks_" + taskId) + "_app_") + teamIdentifier) + "_score") | |
202 | 202 | let teamVotesAmount = (1 + tryGetInteger(teamVotesAmountKey)) | |
203 | 203 | let newTeamScore = (getValue(voteValue) + tryGetInteger(teamScoreKey)) | |
204 | 204 | WriteSet([DataEntry(listKey, newApplicantsList), DataEntry(voteKey, toString(i.caller)), DataEntry(teamVotesAmountKey, teamVotesAmount), DataEntry(teamScoreKey, newTeamScore)]) | |
205 | 205 | } | |
206 | 206 | } | |
207 | 207 | ||
208 | 208 | ||
209 | 209 | ||
210 | 210 | @Callable(i) | |
211 | 211 | func finishApplicantsVoting (taskId) = { | |
212 | 212 | func isApplicantVotedEnough (aid,aid2) = { | |
213 | 213 | let listKey = (("tasks_" + taskId) + "_applicants") | |
214 | 214 | let applicantsList = split(getStringValue(this, listKey), ";") | |
215 | 215 | let teamIdentifier = applicantsList[aid] | |
216 | 216 | let teamVotesAmountKey = (((("tasks_" + taskId) + "_app_") + teamIdentifier) + "_votes") | |
217 | 217 | let teamVotesAmount = tryGetInteger(teamVotesAmountKey) | |
218 | 218 | if ((teamVotesAmount > 0)) | |
219 | 219 | then 1 | |
220 | 220 | else throw(("not enough votes to make decision on " + teamIdentifier)) | |
221 | 221 | } | |
222 | 222 | ||
223 | 223 | func hasMoreVotes (aid,aid2) = { | |
224 | 224 | let listKey = (("tasks_" + taskId) + "_applicants") | |
225 | 225 | let applicantsList = split(getStringValue(this, listKey), ";") | |
226 | 226 | let teamIdentifier = applicantsList[aid] | |
227 | 227 | let teamVotesAmountKey = (((("tasks_" + taskId) + "_app_") + teamIdentifier) + "_votes") | |
228 | 228 | let teamVotesAmount = tryGetInteger(teamVotesAmountKey) | |
229 | 229 | let team2Identifier = applicantsList[aid2] | |
230 | 230 | let team2VotesAmountKey = (((("tasks_" + taskId) + "_app_") + team2Identifier) + "_votes") | |
231 | 231 | let team2VotesAmount = tryGetInteger(team2VotesAmountKey) | |
232 | 232 | if ((teamVotesAmount > team2VotesAmount)) | |
233 | 233 | then aid | |
234 | 234 | else aid2 | |
235 | 235 | } | |
236 | 236 | ||
237 | 237 | if (!(isGroupMember(i.caller))) | |
238 | 238 | then throw("grants working group access only") | |
239 | 239 | else { | |
240 | 240 | let listKeys = tryGetString((("tasks_" + taskId) + "_applicants")) | |
241 | 241 | let applicantsList = split(listKeys, ";") | |
242 | 242 | if ((size(applicantsList) == 0)) | |
243 | 243 | then throw("No one has yet responded to the grant") | |
244 | 244 | else { | |
245 | 245 | let chosenTeamId = { | |
246 | - | let $ | |
247 | - | let $ | |
248 | - | let $ | |
249 | - | if (($ | |
250 | - | then $ | |
246 | + | let $list1255712588 = [0, 1] | |
247 | + | let $size1255712588 = size($list1255712588) | |
248 | + | let $acc01255712588 = 0 | |
249 | + | if (($size1255712588 == 0)) | |
250 | + | then $acc01255712588 | |
251 | 251 | else { | |
252 | - | let $ | |
253 | - | if (($ | |
254 | - | then $ | |
252 | + | let $acc11255712588 = hasMoreVotes($acc01255712588, $list1255712588[0]) | |
253 | + | if (($size1255712588 == 1)) | |
254 | + | then $acc11255712588 | |
255 | 255 | else { | |
256 | - | let $ | |
257 | - | if (($ | |
258 | - | then $ | |
256 | + | let $acc21255712588 = hasMoreVotes($acc11255712588, $list1255712588[1]) | |
257 | + | if (($size1255712588 == 2)) | |
258 | + | then $acc21255712588 | |
259 | 259 | else { | |
260 | - | let $ | |
260 | + | let $acc31255712588 = hasMoreVotes($acc21255712588, $list1255712588[2]) | |
261 | 261 | throw("List size exceed 2") | |
262 | 262 | } | |
263 | 263 | } | |
264 | 264 | } | |
265 | 265 | } | |
266 | 266 | let teamIdentifier = drop(applicantsList[chosenTeamId], 20) | |
267 | 267 | WriteSet([DataEntry((("tasks_" + taskId) + "_status"), "team_chosen"), DataEntry((("tasks_" + taskId) + "_performer"), teamIdentifier), DataEntry((((("tasks_" + taskId) + "_app_") + teamIdentifier) + "_process"), "can_begin")]) | |
268 | 268 | } | |
269 | 269 | } | |
270 | 270 | } | |
271 | 271 | ||
272 | 272 | ||
273 | 273 | ||
274 | 274 | @Callable(i) | |
275 | 275 | func startWork (taskId) = { | |
276 | 276 | let teamIdentifier = tryGetString((("tasks_" + taskId) + "_performer")) | |
277 | 277 | if ((tryGetString((("tasks_" + taskId) + "_status")) != "team_chosen")) | |
278 | 278 | then throw("team is not choosen") | |
279 | 279 | else if ((toString(i.caller) != tryGetString((((("tasks_" + taskId) + "_app_") + teamIdentifier) + "_leader")))) | |
280 | 280 | then throw("team leader only") | |
281 | 281 | else WriteSet([DataEntry((("tasks_" + taskId) + "_status"), "work_started"), DataEntry((((("tasks_" + taskId) + "_app_") + teamIdentifier) + "_process"), "work_started")]) | |
282 | 282 | } | |
283 | 283 | ||
284 | 284 | ||
285 | 285 | ||
286 | 286 | @Callable(i) | |
287 | - | func acceptWorkResult (taskId) = if (!(isGroupMember(i.caller))) | |
287 | + | func rejectTask (taskId) = if (!(isGroupMember(i.caller))) | |
288 | + | then throw("grants working group access only") | |
289 | + | else { | |
290 | + | let teamIdentifier = getStringValue(this, (("tasks_" + taskId) + "_performer")) | |
291 | + | WriteSet([DataEntry((("tasks_" + taskId) + "_status"), "rejected"), DataEntry((((("tasks_" + taskId) + "_app_") + teamIdentifier) + "_process"), "rejected")]) | |
292 | + | } | |
293 | + | ||
294 | + | ||
295 | + | ||
296 | + | @Callable(i) | |
297 | + | func acceptWorkResult (taskId,reportLink) = if (!(isGroupMember(i.caller))) | |
288 | 298 | then throw("grants working group access only") | |
289 | 299 | else { | |
290 | 300 | let rewardAmount = tryGetInteger((("tasks_" + taskId) + "_reward")) | |
291 | 301 | let teamIdentifier = getStringValue(this, (("tasks_" + taskId) + "_performer")) | |
292 | 302 | let teamAddress = getStringValue(this, (((("tasks_" + taskId) + "_app_") + teamIdentifier) + "_leader")) | |
293 | - | ScriptResult(WriteSet([DataEntry((("tasks_" + taskId) + "_status"), "work_finished"), DataEntry((((("tasks_" + taskId) + "_app_") + teamIdentifier) + "_process"), "work_finished")]), TransferSet([ScriptTransfer(addressFromStringValue(teamAddress), rewardAmount, unit)])) | |
303 | + | ScriptResult(WriteSet([DataEntry((("tasks_" + taskId) + "_status"), "work_finished"), DataEntry((((("tasks_" + taskId) + "_app_") + teamIdentifier) + "_process"), "work_finished"), DataEntry((((("tasks_" + taskId) + "_app_") + teamIdentifier) + "_report"), reportLink)]), TransferSet([ScriptTransfer(addressFromStringValue(teamAddress), rewardAmount, unit)])) | |
294 | 304 | } | |
295 | 305 | ||
296 | 306 |
github/deemru/w8io/026f985 53.16 ms ◑