tx · 69qhAhzYgPdSdH8AHFtgUD59AMtBuAWkJRgzETyPeW1Y

3Mxk4Jmjd8SdE2MojSXsUQ8LVYM8vRzmFSA:  -0.10000000 Waves

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

{ "type": 13, "id": "69qhAhzYgPdSdH8AHFtgUD59AMtBuAWkJRgzETyPeW1Y", "fee": 10000000, "feeAssetId": null, "timestamp": 1609038089503, "version": 2, "chainId": 84, "sender": "3Mxk4Jmjd8SdE2MojSXsUQ8LVYM8vRzmFSA", "senderPublicKey": "4xMxUnfdbHYsent96ThiYC63gXHiahi6bh3urdHHntHi", "proofs": [ "7EXdVQZJLRou9qEkshqQqKwX4Lji7YdwmRi9BvdomiADQQWh8KxMbzW22DnFZZbY51zVdiS9JEYHKJaj4DuZvMJ" ], "script": "base64:AAIDAAAAAAAAADsIARIECgIICBIDCgEIEgQKAggIEgMKAQgSBQoDCAgIEgUKAwgICBIDCgEIEgMKAQgSBAoCCAgSAwoBCAAAABQAAAAADG1haW5Db250cmFjdAkBAAAAHEBleHRyVXNlcihhZGRyZXNzRnJvbVN0cmluZykAAAABAgAAACMzTXdSemkyQm1xWlpYV3JDR0N3Y1JRTHNuaWMyQW9kNnpoUwAAAAAGUVVPUlVNAAAAAAAAAAABAQAAAA10cnlHZXRJbnRlZ2VyAAAAAQAAAANrZXkEAAAAA3ZhbAQAAAAHJG1hdGNoMAkABBoAAAACBQAAAAR0aGlzBQAAAANrZXkDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAA0ludAQAAAABYgUAAAAHJG1hdGNoMAUAAAABYgAAAAAAAAAAAAUAAAADdmFsAQAAAAx0cnlHZXRTdHJpbmcAAAABAAAAA2tleQQAAAADdmFsBAAAAAckbWF0Y2gwCQAEHQAAAAIFAAAABHRoaXMFAAAAA2tleQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAGU3RyaW5nBAAAAAFiBQAA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AAAAAIJAAEsAAAAAgIAAAAGdGFza3NfBQAAAAZ0YXNrSWQCAAAAB19yZXBvcnQFAAAACnJlcG9ydExpbmsFAAAAA25pbAkBAAAAC1RyYW5zZmVyU2V0AAAAAQkABEwAAAACCQEAAAAOU2NyaXB0VHJhbnNmZXIAAAADCQEAAAAcQGV4dHJVc2VyKGFkZHJlc3NGcm9tU3RyaW5nKQAAAAEFAAAAC3RlYW1BZGRyZXNzBQAAAAxyZXdhcmRBbW91bnQFAAAABHVuaXQFAAAAA25pbAkAAAIAAAABAgAAABVjaGVja3MgYXJlIG5vdCBwYXNzZWQAAAABaQEAAAAKcmVqZWN0VGFzawAAAAEAAAAGdGFza0lkAwkBAAAADWlzR3JvdXBNZW1iZXIAAAABCAUAAAABaQAAAAZjYWxsZXIJAQAAAAhXcml0ZVNldAAAAAEJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIJAAEsAAAAAgkAASwAAAACAgAAAAZ0YXNrc18FAAAABnRhc2tJZAIAAAAHX3N0YXR1cwIAAAAIcmVqZWN0ZWQFAAAAA25pbAkAAAIAAAABAgAAACBncmFudHMgd29ya2luZyBncm91cCBhY2Nlc3Mgb25seQAAAADGCP2L", "height": 1326538, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: BeqCv6w7wz1CzpU11NU7EQVwmV4EDqGHHX4SxmqTU3oP Next: 6JFgCCCvtJVWqpa5esiTGBNkwVZHMKkotAX6UwJioLEA Diff:
OldNewDifferences
131131
132132 func voteForApplicantConditions (address,taskId,teamIdentifier) = {
133133 let voteHash = (drop(toString(address), 10) + drop(teamIdentifier, 10))
134- if ((tryGetInteger(((("tasks_" + taskId) + "_vote_") + voteHash)) != 0))
135- then throw("you have already voted on this team")
136- else true
134+ if (!(canMemberVote(address)))
135+ then throw("you can't vote")
136+ else if ((tryGetInteger(((("tasks_" + taskId) + "_vote_") + voteHash)) != 0))
137+ then throw("you have already voted on this team")
138+ else true
137139 }
138140
139141
260262 if (finishApplicantsVotingConditions(i.caller, taskId, applicantsList))
261263 then {
262264 let chosenTeamId = {
263- let $list1235912390 = [0, 1]
264- let $size1235912390 = size($list1235912390)
265- let $acc01235912390 = 0
266- if (($size1235912390 == 0))
267- then $acc01235912390
265+ let $list1244112472 = [0, 1]
266+ let $size1244112472 = size($list1244112472)
267+ let $acc01244112472 = 0
268+ if (($size1244112472 == 0))
269+ then $acc01244112472
268270 else {
269- let $acc11235912390 = hasMoreVotes($acc01235912390, $list1235912390[0])
270- if (($size1235912390 == 1))
271- then $acc11235912390
271+ let $acc11244112472 = hasMoreVotes($acc01244112472, $list1244112472[0])
272+ if (($size1244112472 == 1))
273+ then $acc11244112472
272274 else {
273- let $acc21235912390 = hasMoreVotes($acc11235912390, $list1235912390[1])
274- if (($size1235912390 == 2))
275- then $acc21235912390
275+ let $acc21244112472 = hasMoreVotes($acc11244112472, $list1244112472[1])
276+ if (($size1244112472 == 2))
277+ then $acc21244112472
276278 else {
277- let $acc31235912390 = hasMoreVotes($acc21235912390, $list1235912390[2])
279+ let $acc31244112472 = hasMoreVotes($acc21244112472, $list1244112472[2])
278280 throw("List size exceed 2")
279281 }
280282 }
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))
134- if ((tryGetInteger(((("tasks_" + taskId) + "_vote_") + voteHash)) != 0))
135- then throw("you have already voted on this team")
136- else true
134+ if (!(canMemberVote(address)))
135+ then throw("you can't vote")
136+ else if ((tryGetInteger(((("tasks_" + taskId) + "_vote_") + voteHash)) != 0))
137+ then throw("you have already voted on this team")
138+ else true
137139 }
138140
139141
140142 func finishApplicantsVotingConditions (address,taskId,applicantsList) = if (!(isGroupMember(address)))
141143 then throw("grants working group access only")
142144 else if ((tryGetString((("tasks_" + taskId) + "_status")) != "ready_to_apply"))
143145 then throw("voting is not active")
144146 else if ((size(applicantsList) == 0))
145147 then throw("no one has yet responded to the grant")
146148 else true
147149
148150
149151 func startWorkConditions (address,taskId,teamIdentifier) = if ((tryGetString((("tasks_" + taskId) + "_status")) != "team_chosen"))
150152 then throw("winner is not define")
151153 else if ((toString(address) != tryGetString((((("tasks_" + taskId) + "_app_") + teamIdentifier) + "_leader"))))
152154 then throw("team leader only")
153155 else true
154156
155157
156158 func acceptWorkResultConditions (address,taskId) = if (!(isGroupMember(address)))
157159 then throw("grants working group access only")
158160 else true
159161
160162
161163 @Callable(i)
162164 func addTask (title,link) = if (addTaskConditions(i.caller))
163165 then WriteSet([DataEntry((("tasks_" + toBase58String(i.transactionId)) + "_title"), title), DataEntry((("tasks_" + toBase58String(i.transactionId)) + "_link"), link)])
164166 else throw("checks are not passed")
165167
166168
167169
168170 @Callable(i)
169171 func addReward (taskId) = if (addRewardConditions(i.caller, taskId))
170172 then {
171173 let reward = extract(i.payment).amount
172174 WriteSet([DataEntry((("tasks_" + taskId) + "_reward"), reward), DataEntry((("tasks_" + taskId) + "_status"), "proposed")])
173175 }
174176 else throw("checks are not passed")
175177
176178
177179
178180 @Callable(i)
179181 func voteForTaskProposal (taskId,voteValue) = if (voteForTaskProposalConditions(i.caller, taskId))
180182 then {
181183 let voteKey = ((("tasks_" + taskId) + "_voted_") + toString(i.caller))
182184 let votingKey = (("tasks_" + taskId) + "_voting_state")
183185 let votingState = tryGetInteger(votingKey)
184186 let votesAmountKey = (("tasks_" + taskId) + "_voting_amount")
185187 let votesAmountState = (tryGetInteger(votingKey) + 1)
186188 let voteValueInt = getVoteValue(voteValue)
187189 let newVotingState = (votingState + voteValueInt)
188190 WriteSet([DataEntry(votingKey, newVotingState), DataEntry(voteKey, voteValueInt), DataEntry(votesAmountKey, votesAmountState)])
189191 }
190192 else throw("checks are not passed")
191193
192194
193195
194196 @Callable(i)
195197 func finishTaskProposalVoting (taskId) = if (finishTaskProposalVotingConditions(i.caller, taskId))
196198 then {
197199 let votingKey = (("tasks_" + taskId) + "_voting_state")
198200 WriteSet([DataEntry((("tasks_" + taskId) + "_status"), if ((tryGetInteger(votingKey) > 0))
199201 then "ready_to_apply"
200202 else "rejected")])
201203 }
202204 else throw("checks are not passed")
203205
204206
205207
206208 @Callable(i)
207209 func applyForTask (taskId,teamName,link) = {
208210 let teamIdentifier = drop(toString(i.caller), 10)
209211 if (applyForTaskConditions(i.caller, taskId, teamIdentifier))
210212 then {
211213 let listKey = (("tasks_" + taskId) + "_applicants")
212214 let currentApplicantsList = tryGetString(listKey)
213215 let newApplicantsList = ((currentApplicantsList + ";") + toString(i.caller))
214216 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)])
215217 }
216218 else throw("checks are not passed")
217219 }
218220
219221
220222
221223 @Callable(i)
222224 func voteForApplicant (taskId,teamIdentifier,voteValue) = if (voteForApplicantConditions(i.caller, taskId, teamIdentifier))
223225 then {
224226 let listKey = (((("tasks_" + taskId) + "_app_") + teamIdentifier) + "_voted")
225227 let newApplicantsList = ((tryGetString(listKey) + ";") + toString(i.caller))
226228 let voteHash = (drop(toString(i.caller), 20) + teamIdentifier)
227229 let voteKey = ((("tasks_" + taskId) + "_vh_") + voteHash)
228230 if ((tryGetString(voteKey) == toString(i.caller)))
229231 then throw("you have already voted on this team")
230232 else {
231233 let teamVotesAmountKey = (((("tasks_" + taskId) + "_app_") + teamIdentifier) + "_votes")
232234 let teamScoreKey = (((("tasks_" + taskId) + "_app_") + teamIdentifier) + "_score")
233235 let teamVotesAmount = (1 + tryGetInteger(teamVotesAmountKey))
234236 let newTeamScore = (getVoteValue(voteValue) + tryGetInteger(teamScoreKey))
235237 WriteSet([DataEntry(listKey, newApplicantsList), DataEntry(voteKey, toString(i.caller)), DataEntry(teamVotesAmountKey, teamVotesAmount), DataEntry(teamScoreKey, newTeamScore)])
236238 }
237239 }
238240 else throw("checks are not passed")
239241
240242
241243
242244 @Callable(i)
243245 func finishApplicantsVoting (taskId) = {
244246 func hasMoreVotes (aid,aid2) = {
245247 let listKey = (("tasks_" + taskId) + "_applicants")
246248 let applicantsList = split(getStringValue(this, listKey), ";")
247249 let teamIdentifier = applicantsList[aid]
248250 let teamVotesAmountKey = (((("tasks_" + taskId) + "_app_") + teamIdentifier) + "_votes")
249251 let teamVotesAmount = tryGetInteger(teamVotesAmountKey)
250252 let team2Identifier = applicantsList[aid2]
251253 let team2VotesAmountKey = (((("tasks_" + taskId) + "_app_") + team2Identifier) + "_votes")
252254 let team2VotesAmount = tryGetInteger(team2VotesAmountKey)
253255 if ((teamVotesAmount > team2VotesAmount))
254256 then aid
255257 else aid2
256258 }
257259
258260 let listKeys = tryGetString((("tasks_" + taskId) + "_applicants"))
259261 let applicantsList = split(listKeys, ";")
260262 if (finishApplicantsVotingConditions(i.caller, taskId, applicantsList))
261263 then {
262264 let chosenTeamId = {
263- let $list1235912390 = [0, 1]
264- let $size1235912390 = size($list1235912390)
265- let $acc01235912390 = 0
266- if (($size1235912390 == 0))
267- then $acc01235912390
265+ let $list1244112472 = [0, 1]
266+ let $size1244112472 = size($list1244112472)
267+ let $acc01244112472 = 0
268+ if (($size1244112472 == 0))
269+ then $acc01244112472
268270 else {
269- let $acc11235912390 = hasMoreVotes($acc01235912390, $list1235912390[0])
270- if (($size1235912390 == 1))
271- then $acc11235912390
271+ let $acc11244112472 = hasMoreVotes($acc01244112472, $list1244112472[0])
272+ if (($size1244112472 == 1))
273+ then $acc11244112472
272274 else {
273- let $acc21235912390 = hasMoreVotes($acc11235912390, $list1235912390[1])
274- if (($size1235912390 == 2))
275- then $acc21235912390
275+ let $acc21244112472 = hasMoreVotes($acc11244112472, $list1244112472[1])
276+ if (($size1244112472 == 2))
277+ then $acc21244112472
276278 else {
277- let $acc31235912390 = hasMoreVotes($acc21235912390, $list1235912390[2])
279+ let $acc31244112472 = hasMoreVotes($acc21244112472, $list1244112472[2])
278280 throw("List size exceed 2")
279281 }
280282 }
281283 }
282284 }
283285 let teamIdentifier = drop(applicantsList[chosenTeamId], 20)
284286 WriteSet([DataEntry((("tasks_" + taskId) + "_status"), "team_chosen"), DataEntry((("tasks_" + taskId) + "_performer"), teamIdentifier), DataEntry((((("tasks_" + taskId) + "_app_") + teamIdentifier) + "_process"), "can_begin")])
285287 }
286288 else throw("checks are not passed")
287289 }
288290
289291
290292
291293 @Callable(i)
292294 func startWork (taskId) = {
293295 let teamIdentifier = tryGetString((("tasks_" + taskId) + "_performer"))
294296 if (startWorkConditions(i.caller, taskId, teamIdentifier))
295297 then WriteSet([DataEntry((("tasks_" + taskId) + "_status"), "work_started"), DataEntry((((("tasks_" + taskId) + "_app_") + teamIdentifier) + "_process"), "work_started")])
296298 else throw("checks are not passed")
297299 }
298300
299301
300302
301303 @Callable(i)
302304 func acceptWorkResult (taskId,reportLink) = if (acceptWorkResultConditions(i.caller, taskId))
303305 then {
304306 let rewardAmount = tryGetInteger((("tasks_" + taskId) + "_reward"))
305307 let teamIdentifier = tryGetString((("tasks_" + taskId) + "_performer"))
306308 let teamAddress = tryGetString((((("tasks_" + taskId) + "_app_") + teamIdentifier) + "_leader"))
307309 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)]))
308310 }
309311 else throw("checks are not passed")
310312
311313
312314
313315 @Callable(i)
314316 func rejectTask (taskId) = if (isGroupMember(i.caller))
315317 then WriteSet([DataEntry((("tasks_" + taskId) + "_status"), "rejected")])
316318 else throw("grants working group access only")
317319
318320

github/deemru/w8io/026f985 
54.93 ms