tx · 6JFgCCCvtJVWqpa5esiTGBNkwVZHMKkotAX6UwJioLEA

3Mxk4Jmjd8SdE2MojSXsUQ8LVYM8vRzmFSA:  -0.10000000 Waves

2020.12.27 06:01 [1326538] smart account 3Mxk4Jmjd8SdE2MojSXsUQ8LVYM8vRzmFSA > SELF 0.00000000 Waves

{ "type": 13, "id": "6JFgCCCvtJVWqpa5esiTGBNkwVZHMKkotAX6UwJioLEA", "fee": 10000000, "feeAssetId": null, "timestamp": 1609038116967, "version": 2, "chainId": 84, "sender": "3Mxk4Jmjd8SdE2MojSXsUQ8LVYM8vRzmFSA", "senderPublicKey": "4xMxUnfdbHYsent96ThiYC63gXHiahi6bh3urdHHntHi", "proofs": [ "2MnEdECM4WJP72JfsHTmUcaRqXZmJja8k2nQR6b6cHrJ2711u2Rns8HWCkHCUL3zU4ZFHuedcrpydgdLviNgrn6N" ], "script": "base64:AAIDAAAAAAAAADsIARIECgIICBIDCgEIEgQKAggIEgMKAQgSBQoDCAgIEgUKAwgICBIDCgEIEgMKAQgSBAoCCAgSAwoBCAAAABQAAAAADG1haW5Db250cmFjdAkBAAAAHEBleHRyVXNlcihhZGRyZXNzRnJvbVN0cmluZykAAAABAgAAACMzTXdSemkyQm1xWlpYV3JDR0N3Y1JRTHNuaWMyQW9kNnpoUwAAAAAGUVVPUlVNAAAAAAAAAAABAQAAAA10cnlHZXRJbnRlZ2VyAAAAAQAAAANrZXkEAAAAA3ZhbAQAAAAHJG1hdGNoMAkABBoAAAACBQAAAAR0aGlzBQAAAANrZXkDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAA0ludAQAAAABYgUAAAAHJG1hdGNoMAUAAAABYgAAAAAAAAAAAAUAAAADdmFsAQAAAAx0cnlHZXRTdHJpbmcAAAABAAAAA2tleQQAAAADdmFsBAAAAAckbWF0Y2gwCQAEHQAAAAIFAAAABHRoaXMFAAAAA2tleQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAGU3RyaW5nBAAAAAFiBQAAAA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XNzRnJvbVN0cmluZykAAAABBQAAAAt0ZWFtQWRkcmVzcwUAAAAMcmV3YXJkQW1vdW50BQAAAAR1bml0BQAAAANuaWwJAAACAAAAAQIAAAAVY2hlY2tzIGFyZSBub3QgcGFzc2VkAAAAAWkBAAAACnJlamVjdFRhc2sAAAABAAAABnRhc2tJZAMJAQAAAA1pc0dyb3VwTWVtYmVyAAAAAQgFAAAAAWkAAAAGY2FsbGVyCQEAAAAIV3JpdGVTZXQAAAABCQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACCQABLAAAAAIJAAEsAAAAAgIAAAAGdGFza3NfBQAAAAZ0YXNrSWQCAAAAB19zdGF0dXMCAAAACHJlamVjdGVkBQAAAANuaWwJAAACAAAAAQIAAAAgZ3JhbnRzIHdvcmtpbmcgZ3JvdXAgYWNjZXNzIG9ubHkAAAAAXHmyYw==", "height": 1326538, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 69qhAhzYgPdSdH8AHFtgUD59AMtBuAWkJRgzETyPeW1Y Next: DzZTpyVyuCod1HZcAbSwS4B5XHGJb8LzP8cpDidM7P6w Diff:
OldNewDifferences
141141
142142 func finishApplicantsVotingConditions (address,taskId,applicantsList) = if (!(isGroupMember(address)))
143143 then throw("grants working group access only")
144- else if ((tryGetString((("tasks_" + taskId) + "_status")) != "ready_to_apply"))
145- then throw("voting is not active")
146- else if ((size(applicantsList) == 0))
147- then throw("no one has yet responded to the grant")
148- else true
144+ else if ((size(applicantsList) == 0))
145+ then throw("no one has yet responded to the grant")
146+ else true
149147
150148
151149 func startWorkConditions (address,taskId,teamIdentifier) = if ((tryGetString((("tasks_" + taskId) + "_status")) != "team_chosen"))
262260 if (finishApplicantsVotingConditions(i.caller, taskId, applicantsList))
263261 then {
264262 let chosenTeamId = {
265- let $list1244112472 = [0, 1]
266- let $size1244112472 = size($list1244112472)
267- let $acc01244112472 = 0
268- if (($size1244112472 == 0))
269- then $acc01244112472
263+ let $list1244512476 = [0, 1]
264+ let $size1244512476 = size($list1244512476)
265+ let $acc01244512476 = 0
266+ if (($size1244512476 == 0))
267+ then $acc01244512476
270268 else {
271- let $acc11244112472 = hasMoreVotes($acc01244112472, $list1244112472[0])
272- if (($size1244112472 == 1))
273- then $acc11244112472
269+ let $acc11244512476 = hasMoreVotes($acc01244512476, $list1244512476[0])
270+ if (($size1244512476 == 1))
271+ then $acc11244512476
274272 else {
275- let $acc21244112472 = hasMoreVotes($acc11244112472, $list1244112472[1])
276- if (($size1244112472 == 2))
277- then $acc21244112472
273+ let $acc21244512476 = hasMoreVotes($acc11244512476, $list1244512476[1])
274+ if (($size1244512476 == 2))
275+ then $acc21244512476
278276 else {
279- let $acc31244112472 = hasMoreVotes($acc21244112472, $list1244112472[2])
277+ let $acc31244512476 = hasMoreVotes($acc21244512476, $list1244512476[2])
280278 throw("List size exceed 2")
281279 }
282280 }
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let mainContract = addressFromStringValue("3MwRzi2BmqZZXWrCGCwcRQLsnic2Aod6zhS")
55
66 let QUORUM = 1
77
88 func tryGetInteger (key) = {
99 let val = match getInteger(this, key) {
1010 case b: Int =>
1111 b
1212 case _ =>
1313 0
1414 }
1515 val
1616 }
1717
1818
1919 func tryGetString (key) = {
2020 let val = match getString(this, key) {
2121 case b: String =>
2222 b
2323 case _ =>
2424 ""
2525 }
2626 val
2727 }
2828
2929
3030 func isOwner (address) = (address == this)
3131
3232
3333 func getGroup () = {
3434 let val = match getString(mainContract, "working_group_members") {
3535 case b: String =>
3636 b
3737 case _ =>
3838 ""
3939 }
4040 val
4141 }
4242
4343
4444 func getMembers () = {
4545 let val = match getString(mainContract, "dao_members") {
4646 case b: String =>
4747 b
4848 case _ =>
4949 ""
5050 }
5151 val
5252 }
5353
5454
5555 func getDAOSize () = {
5656 let val = match getInteger(mainContract, "dao_size") {
5757 case b: Int =>
5858 b
5959 case _ =>
6060 0
6161 }
6262 val
6363 }
6464
6565
6666 func isGroupMember (a) = {
6767 let val = match getInteger(mainContract, (("working_group_member_" + toString(a)) + "_weight")) {
6868 case b: Int =>
6969 b
7070 case _ =>
7171 0
7272 }
7373 (val > 0)
7474 }
7575
7676
7777 func canMemberVote (address) = {
7878 let val = match getInteger(mainContract, (("dao_member_" + toString(address)) + "_weight")) {
7979 case b: Int =>
8080 b
8181 case _ =>
8282 0
8383 }
8484 (val > 0)
8585 }
8686
8787
8888 func getVoteValue (s) = if ((s == "like"))
8989 then 1
9090 else if ((s == "dislike"))
9191 then -1
9292 else throw("you need to vote with 'like' or 'dislike' value")
9393
9494
9595 func addTaskConditions (address) = if (!(isGroupMember(address)))
9696 then throw("grants working group access only")
9797 else true
9898
9999
100100 func addRewardConditions (address,taskId) = if (!(isGroupMember(address)))
101101 then throw("grants working group access only")
102102 else if ((tryGetString((("tasks_" + taskId) + "_status")) != ""))
103103 then throw("grant isn`t new")
104104 else true
105105
106106
107107 func voteForTaskProposalConditions (address,taskId) = if (!(canMemberVote(address)))
108108 then throw("you can't vote")
109109 else if ((tryGetString((("tasks_" + taskId) + "_status")) != "proposed"))
110110 then throw("voting is closed or not started")
111111 else if ((tryGetInteger(((("tasks_" + taskId) + "_voted_") + toString(address))) != 0))
112112 then throw("you have already voted")
113113 else true
114114
115115
116116 func finishTaskProposalVotingConditions (address,taskId) = if (!(isGroupMember(address)))
117117 then throw("grants working group access only")
118118 else if ((tryGetString((("tasks_" + taskId) + "_status")) != "proposed"))
119119 then throw("voting is not active")
120120 else if ((QUORUM > ((tryGetInteger((("tasks_" + taskId) + "_voting_amount")) * 100) / getDAOSize())))
121121 then throw((("more than " + toString(QUORUM)) + "% members have to vote before finishing the voting"))
122122 else true
123123
124124
125125 func applyForTaskConditions (address,taskId,teamIdentifier) = if ((tryGetString((("tasks_" + taskId) + "_status")) != "ready_to_apply"))
126126 then throw("this grant has not yet been approved")
127127 else if ((tryGetString((((("tasks_" + taskId) + "_app_") + teamIdentifier) + "_leader")) == toString(address)))
128128 then throw("you are applied")
129129 else true
130130
131131
132132 func voteForApplicantConditions (address,taskId,teamIdentifier) = {
133133 let voteHash = (drop(toString(address), 10) + drop(teamIdentifier, 10))
134134 if (!(canMemberVote(address)))
135135 then throw("you can't vote")
136136 else if ((tryGetInteger(((("tasks_" + taskId) + "_vote_") + voteHash)) != 0))
137137 then throw("you have already voted on this team")
138138 else true
139139 }
140140
141141
142142 func finishApplicantsVotingConditions (address,taskId,applicantsList) = if (!(isGroupMember(address)))
143143 then throw("grants working group access only")
144- else if ((tryGetString((("tasks_" + taskId) + "_status")) != "ready_to_apply"))
145- then throw("voting is not active")
146- else if ((size(applicantsList) == 0))
147- then throw("no one has yet responded to the grant")
148- else true
144+ else if ((size(applicantsList) == 0))
145+ then throw("no one has yet responded to the grant")
146+ else true
149147
150148
151149 func startWorkConditions (address,taskId,teamIdentifier) = if ((tryGetString((("tasks_" + taskId) + "_status")) != "team_chosen"))
152150 then throw("winner is not define")
153151 else if ((toString(address) != tryGetString((((("tasks_" + taskId) + "_app_") + teamIdentifier) + "_leader"))))
154152 then throw("team leader only")
155153 else true
156154
157155
158156 func acceptWorkResultConditions (address,taskId) = if (!(isGroupMember(address)))
159157 then throw("grants working group access only")
160158 else true
161159
162160
163161 @Callable(i)
164162 func addTask (title,link) = if (addTaskConditions(i.caller))
165163 then WriteSet([DataEntry((("tasks_" + toBase58String(i.transactionId)) + "_title"), title), DataEntry((("tasks_" + toBase58String(i.transactionId)) + "_link"), link)])
166164 else throw("checks are not passed")
167165
168166
169167
170168 @Callable(i)
171169 func addReward (taskId) = if (addRewardConditions(i.caller, taskId))
172170 then {
173171 let reward = extract(i.payment).amount
174172 WriteSet([DataEntry((("tasks_" + taskId) + "_reward"), reward), DataEntry((("tasks_" + taskId) + "_status"), "proposed")])
175173 }
176174 else throw("checks are not passed")
177175
178176
179177
180178 @Callable(i)
181179 func voteForTaskProposal (taskId,voteValue) = if (voteForTaskProposalConditions(i.caller, taskId))
182180 then {
183181 let voteKey = ((("tasks_" + taskId) + "_voted_") + toString(i.caller))
184182 let votingKey = (("tasks_" + taskId) + "_voting_state")
185183 let votingState = tryGetInteger(votingKey)
186184 let votesAmountKey = (("tasks_" + taskId) + "_voting_amount")
187185 let votesAmountState = (tryGetInteger(votingKey) + 1)
188186 let voteValueInt = getVoteValue(voteValue)
189187 let newVotingState = (votingState + voteValueInt)
190188 WriteSet([DataEntry(votingKey, newVotingState), DataEntry(voteKey, voteValueInt), DataEntry(votesAmountKey, votesAmountState)])
191189 }
192190 else throw("checks are not passed")
193191
194192
195193
196194 @Callable(i)
197195 func finishTaskProposalVoting (taskId) = if (finishTaskProposalVotingConditions(i.caller, taskId))
198196 then {
199197 let votingKey = (("tasks_" + taskId) + "_voting_state")
200198 WriteSet([DataEntry((("tasks_" + taskId) + "_status"), if ((tryGetInteger(votingKey) > 0))
201199 then "ready_to_apply"
202200 else "rejected")])
203201 }
204202 else throw("checks are not passed")
205203
206204
207205
208206 @Callable(i)
209207 func applyForTask (taskId,teamName,link) = {
210208 let teamIdentifier = drop(toString(i.caller), 10)
211209 if (applyForTaskConditions(i.caller, taskId, teamIdentifier))
212210 then {
213211 let listKey = (("tasks_" + taskId) + "_applicants")
214212 let currentApplicantsList = tryGetString(listKey)
215213 let newApplicantsList = ((currentApplicantsList + ";") + toString(i.caller))
216214 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)])
217215 }
218216 else throw("checks are not passed")
219217 }
220218
221219
222220
223221 @Callable(i)
224222 func voteForApplicant (taskId,teamIdentifier,voteValue) = if (voteForApplicantConditions(i.caller, taskId, teamIdentifier))
225223 then {
226224 let listKey = (((("tasks_" + taskId) + "_app_") + teamIdentifier) + "_voted")
227225 let newApplicantsList = ((tryGetString(listKey) + ";") + toString(i.caller))
228226 let voteHash = (drop(toString(i.caller), 20) + teamIdentifier)
229227 let voteKey = ((("tasks_" + taskId) + "_vh_") + voteHash)
230228 if ((tryGetString(voteKey) == toString(i.caller)))
231229 then throw("you have already voted on this team")
232230 else {
233231 let teamVotesAmountKey = (((("tasks_" + taskId) + "_app_") + teamIdentifier) + "_votes")
234232 let teamScoreKey = (((("tasks_" + taskId) + "_app_") + teamIdentifier) + "_score")
235233 let teamVotesAmount = (1 + tryGetInteger(teamVotesAmountKey))
236234 let newTeamScore = (getVoteValue(voteValue) + tryGetInteger(teamScoreKey))
237235 WriteSet([DataEntry(listKey, newApplicantsList), DataEntry(voteKey, toString(i.caller)), DataEntry(teamVotesAmountKey, teamVotesAmount), DataEntry(teamScoreKey, newTeamScore)])
238236 }
239237 }
240238 else throw("checks are not passed")
241239
242240
243241
244242 @Callable(i)
245243 func finishApplicantsVoting (taskId) = {
246244 func hasMoreVotes (aid,aid2) = {
247245 let listKey = (("tasks_" + taskId) + "_applicants")
248246 let applicantsList = split(getStringValue(this, listKey), ";")
249247 let teamIdentifier = applicantsList[aid]
250248 let teamVotesAmountKey = (((("tasks_" + taskId) + "_app_") + teamIdentifier) + "_votes")
251249 let teamVotesAmount = tryGetInteger(teamVotesAmountKey)
252250 let team2Identifier = applicantsList[aid2]
253251 let team2VotesAmountKey = (((("tasks_" + taskId) + "_app_") + team2Identifier) + "_votes")
254252 let team2VotesAmount = tryGetInteger(team2VotesAmountKey)
255253 if ((teamVotesAmount > team2VotesAmount))
256254 then aid
257255 else aid2
258256 }
259257
260258 let listKeys = tryGetString((("tasks_" + taskId) + "_applicants"))
261259 let applicantsList = split(listKeys, ";")
262260 if (finishApplicantsVotingConditions(i.caller, taskId, applicantsList))
263261 then {
264262 let chosenTeamId = {
265- let $list1244112472 = [0, 1]
266- let $size1244112472 = size($list1244112472)
267- let $acc01244112472 = 0
268- if (($size1244112472 == 0))
269- then $acc01244112472
263+ let $list1244512476 = [0, 1]
264+ let $size1244512476 = size($list1244512476)
265+ let $acc01244512476 = 0
266+ if (($size1244512476 == 0))
267+ then $acc01244512476
270268 else {
271- let $acc11244112472 = hasMoreVotes($acc01244112472, $list1244112472[0])
272- if (($size1244112472 == 1))
273- then $acc11244112472
269+ let $acc11244512476 = hasMoreVotes($acc01244512476, $list1244512476[0])
270+ if (($size1244512476 == 1))
271+ then $acc11244512476
274272 else {
275- let $acc21244112472 = hasMoreVotes($acc11244112472, $list1244112472[1])
276- if (($size1244112472 == 2))
277- then $acc21244112472
273+ let $acc21244512476 = hasMoreVotes($acc11244512476, $list1244512476[1])
274+ if (($size1244512476 == 2))
275+ then $acc21244512476
278276 else {
279- let $acc31244112472 = hasMoreVotes($acc21244112472, $list1244112472[2])
277+ let $acc31244512476 = hasMoreVotes($acc21244512476, $list1244512476[2])
280278 throw("List size exceed 2")
281279 }
282280 }
283281 }
284282 }
285283 let teamIdentifier = drop(applicantsList[chosenTeamId], 20)
286284 WriteSet([DataEntry((("tasks_" + taskId) + "_status"), "team_chosen"), DataEntry((("tasks_" + taskId) + "_performer"), teamIdentifier), DataEntry((((("tasks_" + taskId) + "_app_") + teamIdentifier) + "_process"), "can_begin")])
287285 }
288286 else throw("checks are not passed")
289287 }
290288
291289
292290
293291 @Callable(i)
294292 func startWork (taskId) = {
295293 let teamIdentifier = tryGetString((("tasks_" + taskId) + "_performer"))
296294 if (startWorkConditions(i.caller, taskId, teamIdentifier))
297295 then WriteSet([DataEntry((("tasks_" + taskId) + "_status"), "work_started"), DataEntry((((("tasks_" + taskId) + "_app_") + teamIdentifier) + "_process"), "work_started")])
298296 else throw("checks are not passed")
299297 }
300298
301299
302300
303301 @Callable(i)
304302 func acceptWorkResult (taskId,reportLink) = if (acceptWorkResultConditions(i.caller, taskId))
305303 then {
306304 let rewardAmount = tryGetInteger((("tasks_" + taskId) + "_reward"))
307305 let teamIdentifier = tryGetString((("tasks_" + taskId) + "_performer"))
308306 let teamAddress = tryGetString((((("tasks_" + taskId) + "_app_") + teamIdentifier) + "_leader"))
309307 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)]))
310308 }
311309 else throw("checks are not passed")
312310
313311
314312
315313 @Callable(i)
316314 func rejectTask (taskId) = if (isGroupMember(i.caller))
317315 then WriteSet([DataEntry((("tasks_" + taskId) + "_status"), "rejected")])
318316 else throw("grants working group access only")
319317
320318

github/deemru/w8io/026f985 
61.71 ms