tx · 92wxRTFVQPcoWMqAyEoTZYP5kZZmDTpfrn82JWyyhVo6 3Mxzu6EvNWuSH59RpfuFwF94srJSeC6Z7iN: -0.01000000 Waves 2021.02.11 19:07 [1393730] smart account 3Mxzu6EvNWuSH59RpfuFwF94srJSeC6Z7iN > SELF 0.00000000 Waves
{ "type": 13, "id": "92wxRTFVQPcoWMqAyEoTZYP5kZZmDTpfrn82JWyyhVo6", "fee": 1000000, "feeAssetId": null, "timestamp": 1613059637530, "version": 1, "sender": "3Mxzu6EvNWuSH59RpfuFwF94srJSeC6Z7iN", "senderPublicKey": "H3qEWiJ9e78XAQUcPaeJEhCX2ASmm6ZrLA7Fv8aqJnhf", "proofs": [ "57Y7PPgjm2yMD9NBvaGE2wGTLqL5QtDGAnxt4x7zy1WD25EnVvEoymeWGKP4nVJAG2wXVrbDkkaFacBG9PXY7cLj" ], "script": "base64:AAIDAAAAAAAAADwIARIECgIICBIDCgEIEgQKAggIEgMKAQgSBQoDCAgIEgUKAwgICBIECgIICBIDCgEIEgQKAggIEgMKAQgAAAAUAAAAAAxtYWluQ29udHJhY3QJAQAAABxAZXh0clVzZXIoYWRkcmVzc0Zyb21TdHJpbmcpAAAAAQIAAAAjM05Dc3FmNHBGR3RFQ3Mzdk00ajFuS3FMNlZBM0hkaU5HZVoAAAAABlFVT1JVTQAAAAAAAAAAAQEAAAANdHJ5R2V0SW50ZWdlcgAAAAEAAAADa2V5BAAAAAN2YWwEAAAAByRtYXRjaDAJAAQaAAAAAgUAAAAEdGhpcwUAAAADa2V5AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAANJbnQEAAAAAWIFAAAAByRtYXRjaDAFAAAAAWIAAAAAAAAAAAAFAAAAA3ZhbAEAAAAMdHJ5R2V0U3RyaW5nAAAAAQAAAANrZXkEAAAAA3ZhbAQAAAAHJG1hdGNoMAkABB0AAAACBQAAAAR0aGlzBQAAAANrZXkDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAABlN0cmluZwQAAAABYg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AAIJAQAAAAhXcml0ZVNldAAAAAEJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIJAAEsAAAAAgkAASwAAAACAgAAAAZ0YXNrc18FAAAABnRhc2tJZAIAAAAHX3N0YXR1cwIAAAANd29ya19maW5pc2hlZAkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgkAASwAAAACCQABLAAAAAIJAAEsAAAAAgkAASwAAAACAgAAAAZ0YXNrc18FAAAABnRhc2tJZAIAAAAFX2FwcF8FAAAADnRlYW1JZGVudGlmaWVyAgAAAAhfcHJvY2VzcwIAAAANd29ya19maW5pc2hlZAkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgkAASwAAAACCQABLAAAAAICAAAABnRhc2tzXwUAAAAGdGFza0lkAgAAAAdfcmVwb3J0BQAAAApyZXBvcnRMaW5rBQAAAANuaWwJAQAAAAtUcmFuc2ZlclNldAAAAAEJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwkBAAAAHEBleHRyVXNlcihhZGRyZXNzRnJvbVN0cmluZykAAAABBQAAAAt0ZWFtQWRkcmVzcwUAAAAMcmV3YXJkQW1vdW50BQAAAAR1bml0BQAAAANuaWwJAAACAAAAAQIAAAAVY2hlY2tzIGFyZSBub3QgcGFzc2VkAAAAAWkBAAAACnJlamVjdFRhc2sAAAABAAAABnRhc2tJZAMJAQAAAA1pc0dyb3VwTWVtYmVyAAAAAQgFAAAAAWkAAAAGY2FsbGVyCQEAAAAIV3JpdGVTZXQAAAABCQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACCQABLAAAAAIJAAEsAAAAAgIAAAAGdGFza3NfBQAAAAZ0YXNrSWQCAAAAB19zdGF0dXMCAAAACHJlamVjdGVkBQAAAANuaWwJAAACAAAAAQIAAAAgZ3JhbnRzIHdvcmtpbmcgZ3JvdXAgYWNjZXNzIG9ubHkAAAAA0HPHBQ==", "chainId": 84, "height": 1393730, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: none Next: none Full:
Old | New | Differences | |
---|---|---|---|
1 | - | # no script | |
1 | + | {-# STDLIB_VERSION 3 #-} | |
2 | + | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | + | {-# CONTENT_TYPE DAPP #-} | |
4 | + | let mainContract = addressFromStringValue("3NCsqf4pFGtECs3vM4j1nKqL6VA3HdiNGeZ") | |
5 | + | ||
6 | + | let QUORUM = 1 | |
7 | + | ||
8 | + | func tryGetInteger (key) = { | |
9 | + | let val = match getInteger(this, key) { | |
10 | + | case b: Int => | |
11 | + | b | |
12 | + | case _ => | |
13 | + | 0 | |
14 | + | } | |
15 | + | val | |
16 | + | } | |
17 | + | ||
18 | + | ||
19 | + | func tryGetString (key) = { | |
20 | + | let val = match getString(this, key) { | |
21 | + | case b: String => | |
22 | + | b | |
23 | + | case _ => | |
24 | + | "" | |
25 | + | } | |
26 | + | val | |
27 | + | } | |
28 | + | ||
29 | + | ||
30 | + | func isOwner (address) = (address == this) | |
31 | + | ||
32 | + | ||
33 | + | func getGroup () = { | |
34 | + | let val = match getString(mainContract, "working_group_members") { | |
35 | + | case b: String => | |
36 | + | b | |
37 | + | case _ => | |
38 | + | "" | |
39 | + | } | |
40 | + | val | |
41 | + | } | |
42 | + | ||
43 | + | ||
44 | + | func getMembers () = { | |
45 | + | let val = match getString(mainContract, "dao_members") { | |
46 | + | case b: String => | |
47 | + | b | |
48 | + | case _ => | |
49 | + | "" | |
50 | + | } | |
51 | + | val | |
52 | + | } | |
53 | + | ||
54 | + | ||
55 | + | func getDAOSize () = { | |
56 | + | let val = match getInteger(mainContract, "dao_size") { | |
57 | + | case b: Int => | |
58 | + | b | |
59 | + | case _ => | |
60 | + | 0 | |
61 | + | } | |
62 | + | val | |
63 | + | } | |
64 | + | ||
65 | + | ||
66 | + | func isGroupMember (a) = { | |
67 | + | let val = match getInteger(mainContract, (("working_group_member_" + toString(a)) + "_weight")) { | |
68 | + | case b: Int => | |
69 | + | b | |
70 | + | case _ => | |
71 | + | 0 | |
72 | + | } | |
73 | + | (val > 0) | |
74 | + | } | |
75 | + | ||
76 | + | ||
77 | + | func canMemberVote (address) = { | |
78 | + | let val = match getInteger(mainContract, (("dao_member_" + toString(address)) + "_weight")) { | |
79 | + | case b: Int => | |
80 | + | b | |
81 | + | case _ => | |
82 | + | 0 | |
83 | + | } | |
84 | + | (val > 0) | |
85 | + | } | |
86 | + | ||
87 | + | ||
88 | + | func getVoteValue (s) = if ((s == "like")) | |
89 | + | then 1 | |
90 | + | else if ((s == "dislike")) | |
91 | + | then -1 | |
92 | + | else throw("you need to vote with 'like' or 'dislike' value") | |
93 | + | ||
94 | + | ||
95 | + | func addTaskConditions (address) = if (!(isGroupMember(address))) | |
96 | + | then throw("grants working group access only") | |
97 | + | else true | |
98 | + | ||
99 | + | ||
100 | + | func addRewardConditions (address,taskId) = if (!(isGroupMember(address))) | |
101 | + | then throw("grants working group access only") | |
102 | + | else if ((tryGetString((("tasks_" + taskId) + "_status")) != "")) | |
103 | + | then throw("grant isn`t new") | |
104 | + | else true | |
105 | + | ||
106 | + | ||
107 | + | func voteForTaskProposalConditions (address,taskId) = if (!(canMemberVote(address))) | |
108 | + | then throw("you can't vote") | |
109 | + | else if ((tryGetString((("tasks_" + taskId) + "_status")) != "proposed")) | |
110 | + | then throw("voting is closed or not started") | |
111 | + | else if ((tryGetInteger(((("tasks_" + taskId) + "_voted_") + toString(address))) != 0)) | |
112 | + | then throw("you have already voted") | |
113 | + | else true | |
114 | + | ||
115 | + | ||
116 | + | func finishTaskProposalVotingConditions (address,taskId) = if (!(isGroupMember(address))) | |
117 | + | then throw("grants working group access only") | |
118 | + | else if ((tryGetString((("tasks_" + taskId) + "_status")) != "proposed")) | |
119 | + | then throw("voting is not active") | |
120 | + | else if ((QUORUM > ((tryGetInteger((("tasks_" + taskId) + "_voting_amount")) * 100) / getDAOSize()))) | |
121 | + | then throw((("more than " + toString(QUORUM)) + "% members have to vote before finishing the voting")) | |
122 | + | else true | |
123 | + | ||
124 | + | ||
125 | + | func applyForTaskConditions (address,taskId,teamIdentifier) = if ((tryGetString((("tasks_" + taskId) + "_status")) != "ready_to_apply")) | |
126 | + | then throw("this grant has not yet been approved") | |
127 | + | else if ((tryGetString((((("tasks_" + taskId) + "_app_") + teamIdentifier) + "_leader")) == toString(address))) | |
128 | + | then throw("you are applied") | |
129 | + | else true | |
130 | + | ||
131 | + | ||
132 | + | func voteForApplicantConditions (address,taskId,teamIdentifier) = { | |
133 | + | let voteHash = (drop(toString(address), 10) + drop(teamIdentifier, 10)) | |
134 | + | if (!(canMemberVote(address))) | |
135 | + | then throw("you can't vote") | |
136 | + | else if ((tryGetString((("tasks_" + taskId) + "_status")) != "ready_to_apply")) | |
137 | + | then throw("voting is not active") | |
138 | + | else if ((tryGetInteger(((("tasks_" + taskId) + "_vote_") + voteHash)) != 0)) | |
139 | + | then throw("you have already voted on this team") | |
140 | + | else true | |
141 | + | } | |
142 | + | ||
143 | + | ||
144 | + | func finishApplicantsVotingConditions (address,taskId,applicantsList) = if (!(isGroupMember(address))) | |
145 | + | then throw("grants working group access only") | |
146 | + | else if ((tryGetString((("tasks_" + taskId) + "_status")) != "ready_to_apply")) | |
147 | + | then throw("voting is not active") | |
148 | + | else if ((size(applicantsList) == 0)) | |
149 | + | then throw("no one has yet responded to the grant") | |
150 | + | else true | |
151 | + | ||
152 | + | ||
153 | + | func startWorkConditions (address,taskId,teamIdentifier) = if ((tryGetString((("tasks_" + taskId) + "_status")) != "team_chosen")) | |
154 | + | then throw("winner is not define") | |
155 | + | else if ((toString(address) != tryGetString((((("tasks_" + taskId) + "_app_") + teamIdentifier) + "_leader")))) | |
156 | + | then throw("team leader only") | |
157 | + | else true | |
158 | + | ||
159 | + | ||
160 | + | func acceptWorkResultConditions (address,taskId) = if (!(isGroupMember(address))) | |
161 | + | then throw("grants working group access only") | |
162 | + | else true | |
163 | + | ||
164 | + | ||
165 | + | @Callable(i) | |
166 | + | func addTask (title,link) = if (addTaskConditions(i.caller)) | |
167 | + | then WriteSet([DataEntry((("tasks_" + toBase58String(i.transactionId)) + "_title"), title), DataEntry((("tasks_" + toBase58String(i.transactionId)) + "_link"), link)]) | |
168 | + | else throw("checks are not passed") | |
169 | + | ||
170 | + | ||
171 | + | ||
172 | + | @Callable(i) | |
173 | + | func addReward (taskId) = if (addRewardConditions(i.caller, taskId)) | |
174 | + | then { | |
175 | + | let reward = extract(i.payment).amount | |
176 | + | WriteSet([DataEntry((("tasks_" + taskId) + "_reward"), reward), DataEntry((("tasks_" + taskId) + "_status"), "proposed")]) | |
177 | + | } | |
178 | + | else throw("checks are not passed") | |
179 | + | ||
180 | + | ||
181 | + | ||
182 | + | @Callable(i) | |
183 | + | func voteForTaskProposal (taskId,voteValue) = if (voteForTaskProposalConditions(i.caller, taskId)) | |
184 | + | then { | |
185 | + | let voteKey = ((("tasks_" + taskId) + "_voted_") + toString(i.caller)) | |
186 | + | let votingKey = (("tasks_" + taskId) + "_voting_state") | |
187 | + | let votingState = tryGetInteger(votingKey) | |
188 | + | let votesAmountKey = (("tasks_" + taskId) + "_voting_amount") | |
189 | + | let votesAmountState = (tryGetInteger(votingKey) + 1) | |
190 | + | let voteValueInt = getVoteValue(voteValue) | |
191 | + | let newVotingState = (votingState + voteValueInt) | |
192 | + | WriteSet([DataEntry(votingKey, newVotingState), DataEntry(voteKey, voteValueInt), DataEntry(votesAmountKey, votesAmountState)]) | |
193 | + | } | |
194 | + | else throw("checks are not passed") | |
195 | + | ||
196 | + | ||
197 | + | ||
198 | + | @Callable(i) | |
199 | + | func finishTaskProposalVoting (taskId) = if (finishTaskProposalVotingConditions(i.caller, taskId)) | |
200 | + | then { | |
201 | + | let votingKey = (("tasks_" + taskId) + "_voting_state") | |
202 | + | WriteSet([DataEntry((("tasks_" + taskId) + "_status"), if ((tryGetInteger(votingKey) > 0)) | |
203 | + | then "ready_to_apply" | |
204 | + | else "rejected")]) | |
205 | + | } | |
206 | + | else throw("checks are not passed") | |
207 | + | ||
208 | + | ||
209 | + | ||
210 | + | @Callable(i) | |
211 | + | func applyForTask (taskId,teamName,link) = { | |
212 | + | let teamIdentifier = drop(toString(i.caller), 10) | |
213 | + | if (applyForTaskConditions(i.caller, taskId, teamIdentifier)) | |
214 | + | then { | |
215 | + | let listKey = (("tasks_" + taskId) + "_applicants") | |
216 | + | let currentApplicantsList = tryGetString(listKey) | |
217 | + | let newApplicantsList = ((currentApplicantsList + ";") + toString(i.caller)) | |
218 | + | WriteSet([DataEntry((((("tasks_" + taskId) + "_app_") + teamIdentifier) + "_name"), teamName), DataEntry((((("tasks_" + taskId) + "_app_") + teamIdentifier) + "_link"), link), DataEntry((((("tasks_" + taskId) + "_app_") + teamIdentifier) + "_leader"), toString(i.caller)), DataEntry((((("tasks_" + taskId) + "_app_") + teamIdentifier) + "_id"), teamIdentifier), DataEntry(listKey, newApplicantsList)]) | |
219 | + | } | |
220 | + | else throw("checks are not passed") | |
221 | + | } | |
222 | + | ||
223 | + | ||
224 | + | ||
225 | + | @Callable(i) | |
226 | + | func voteForApplicant (taskId,teamIdentifier,voteValue) = if (voteForApplicantConditions(i.caller, taskId, teamIdentifier)) | |
227 | + | then { | |
228 | + | let listKey = (((("tasks_" + taskId) + "_app_") + teamIdentifier) + "_voted") | |
229 | + | let newApplicantsList = ((tryGetString(listKey) + ";") + toString(i.caller)) | |
230 | + | let voteHash = (drop(toString(i.caller), 20) + teamIdentifier) | |
231 | + | let voteKey = ((("tasks_" + taskId) + "_vh_") + voteHash) | |
232 | + | if ((tryGetString(voteKey) == toString(i.caller))) | |
233 | + | then throw("you have already voted on this team") | |
234 | + | else { | |
235 | + | let teamVotesAmountKey = (((("tasks_" + taskId) + "_app_") + teamIdentifier) + "_votes") | |
236 | + | let teamScoreKey = (((("tasks_" + taskId) + "_app_") + teamIdentifier) + "_score") | |
237 | + | let teamVotesAmount = (1 + tryGetInteger(teamVotesAmountKey)) | |
238 | + | let newTeamScore = (getVoteValue(voteValue) + tryGetInteger(teamScoreKey)) | |
239 | + | WriteSet([DataEntry(listKey, newApplicantsList), DataEntry(voteKey, toString(i.caller)), DataEntry(teamVotesAmountKey, teamVotesAmount), DataEntry(teamScoreKey, newTeamScore)]) | |
240 | + | } | |
241 | + | } | |
242 | + | else throw("checks are not passed") | |
243 | + | ||
244 | + | ||
245 | + | ||
246 | + | @Callable(i) | |
247 | + | func finishApplicantsVoting (taskId,teamIdentifier) = { | |
248 | + | let listKeys = tryGetString((("tasks_" + taskId) + "_applicants")) | |
249 | + | let applicantsList = split(listKeys, ";") | |
250 | + | if (finishApplicantsVotingConditions(i.caller, taskId, applicantsList)) | |
251 | + | then WriteSet([DataEntry((("tasks_" + taskId) + "_status"), "team_chosen"), DataEntry((("tasks_" + taskId) + "_performer"), teamIdentifier), DataEntry((((("tasks_" + taskId) + "_app_") + teamIdentifier) + "_process"), "can_begin")]) | |
252 | + | else throw("checks are not passed") | |
253 | + | } | |
254 | + | ||
255 | + | ||
256 | + | ||
257 | + | @Callable(i) | |
258 | + | func startWork (taskId) = { | |
259 | + | let teamIdentifier = tryGetString((("tasks_" + taskId) + "_performer")) | |
260 | + | if (startWorkConditions(i.caller, taskId, teamIdentifier)) | |
261 | + | then WriteSet([DataEntry((("tasks_" + taskId) + "_status"), "work_started"), DataEntry((((("tasks_" + taskId) + "_app_") + teamIdentifier) + "_process"), "work_started")]) | |
262 | + | else throw("checks are not passed") | |
263 | + | } | |
264 | + | ||
265 | + | ||
266 | + | ||
267 | + | @Callable(i) | |
268 | + | func acceptWorkResult (taskId,reportLink) = if (acceptWorkResultConditions(i.caller, taskId)) | |
269 | + | then { | |
270 | + | let rewardAmount = tryGetInteger((("tasks_" + taskId) + "_reward")) | |
271 | + | let teamIdentifier = tryGetString((("tasks_" + taskId) + "_performer")) | |
272 | + | let teamAddress = tryGetString((((("tasks_" + taskId) + "_app_") + teamIdentifier) + "_leader")) | |
273 | + | ScriptResult(WriteSet([DataEntry((("tasks_" + taskId) + "_status"), "work_finished"), DataEntry((((("tasks_" + taskId) + "_app_") + teamIdentifier) + "_process"), "work_finished"), DataEntry((("tasks_" + taskId) + "_report"), reportLink)]), TransferSet([ScriptTransfer(addressFromStringValue(teamAddress), rewardAmount, unit)])) | |
274 | + | } | |
275 | + | else throw("checks are not passed") | |
276 | + | ||
277 | + | ||
278 | + | ||
279 | + | @Callable(i) | |
280 | + | func rejectTask (taskId) = if (isGroupMember(i.caller)) | |
281 | + | then WriteSet([DataEntry((("tasks_" + taskId) + "_status"), "rejected")]) | |
282 | + | else throw("grants working group access only") | |
283 | + | ||
284 | + |
github/deemru/w8io/026f985 38.66 ms ◑