tx · 25pk9sPbXUGhnRhfTSbeWTuypf9KAQnPKdMi6HGtk2we 3MvqnYLwBErxGtKzeEjgWgr2RXgniokicR2: -0.01400000 Waves 2020.09.30 15:44 [1200060] smart account 3MvqnYLwBErxGtKzeEjgWgr2RXgniokicR2 > SELF 0.00000000 Waves
{ "type": 13, "id": "25pk9sPbXUGhnRhfTSbeWTuypf9KAQnPKdMi6HGtk2we", "fee": 1400000, "feeAssetId": null, "timestamp": 1601469895547, "version": 2, "chainId": 84, "sender": "3MvqnYLwBErxGtKzeEjgWgr2RXgniokicR2", "senderPublicKey": "3dxKqzB5AWentnFkyzLnbnRfN2iRWgE7Q4paMwfi9MoT", "proofs": [ "5wVLenmgxA8H5YmLyqcXRa1EyXooMJyme3UCYU18ZmqxxyjDgPG3JSxv3ejn8hTfS4SYnghfLf2DS7fpWHmBYkqc" ], "script": "base64:AAIDAAAAAAAAAEMIARIDCgEIEgMKAQgSAwoBCBIECgIIARIDCgEIEgQKAggBEgMKAQgSBAoCCAgSBQoDCAgBEgMKAQgSAwoBCBIDCgEIAAAACAAAAAAGUVVPUlVNAAAAAAAAAAAyAAAAAAVXQ1RpZAEAAAAgO1kbDPy5xEIOvJ4v22ekSZz5VGdcetD16T0T8sRYgmMBAAAADXRyeUdldEludGVnZXIAAAABAAAAA2tleQQAAAADdmFsBAAAAAckbWF0Y2gwCQAEGgAAAAIFAAAABHRoaXMFAAAAA2tleQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAADSW50BAAAAAFiBQAAAAckbWF0Y2gwBQAAAAFiAAAAAAAAAAAABQAAAAN2YWwBAAAAB2lzT3duZXIAAAABAAAAB2FkZHJlc3MJAAAAAAAAAgUAAAAHYWRkcmVzcwUAAAAEdGhpcwEAAAAIZ2V0R3JvdXAAAAAABAAAAAN2YWwEAAAAByRtYXRjaDAJAAQdAAAAAgUAAAAEdGhpcwIAAAANd29ya2luZ19ncm91cAMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAGU3RyaW5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AAAAlEYXRhRW50cnkAAAACCQABLAAAAAIJAAEsAAAAAgkAASwAAAACBQAAAAZ0YXNrSWQCAAAAC19hcHBsaWNhbnRfBQAAAAh0ZWFtTmFtZQIAAAANX3dvcmtfcHJvY2VzcwIAAAANd29ya19maW5pc2hlZAUAAAADbmlsCQEAAAALVHJhbnNmZXJTZXQAAAABCQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMJAQAAABxAZXh0clVzZXIoYWRkcmVzc0Zyb21TdHJpbmcpAAAAAQUAAAALdGVhbUFkZHJlc3MFAAAADHJld2FyZEFtb3VudAUAAAAEdW5pdAUAAAADbmlsAAAAANu+qco=", "height": 1200060, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 9eiYxMChRd2ijzayz4mSkRx4LzYLU3S46na2R2M1BUMQ Next: 5TpwqYSbWw3yrqV8taWPud8oKtC3j97perB4hoVJHTCt Diff:
Old | New | Differences | |
---|---|---|---|
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let QUORUM = 50 | |
5 | + | ||
6 | + | let WCTid = base58'4zfrrwDVjbGFM8wxbZGriVLY4XJsVD4oNMp21FnDnMAa' | |
5 | 7 | ||
6 | 8 | func tryGetInteger (key) = { | |
7 | 9 | let val = match getInteger(this, key) { | |
75 | 77 | func addTask (title) = if (!(isGroupMember(i.caller))) | |
76 | 78 | then throw("grants working group access only") | |
77 | 79 | else WriteSet([DataEntry((toBase58String(i.transactionId) + "_task"), title)]) | |
80 | + | ||
81 | + | ||
82 | + | ||
83 | + | @Callable(i) | |
84 | + | func rateTask (taskId,rate) = if (!(if ((rate == 1)) | |
85 | + | then true | |
86 | + | else (rate == -1))) | |
87 | + | then throw("your rate needs to be +1 or -1") | |
88 | + | else { | |
89 | + | let pmt = extract(i.payment) | |
90 | + | if ((pmt.assetId != WCTid)) | |
91 | + | then throw("you need to vote using WCT") | |
92 | + | else { | |
93 | + | let weight = pmt.amount | |
94 | + | let vote = (rate * weight) | |
95 | + | let previousRate = tryGetInteger((taskId + "_community_rate")) | |
96 | + | ScriptResult(WriteSet([DataEntry((taskId + "_community_rate"), (previousRate + vote))]), TransferSet([ScriptTransfer(i.caller, pmt.amount, pmt.assetId)])) | |
97 | + | } | |
98 | + | } | |
78 | 99 | ||
79 | 100 | ||
80 | 101 | ||
200 | 221 | then throw("grants working group access only") | |
201 | 222 | else { | |
202 | 223 | let chosenTeamId = { | |
203 | - | let $ | |
204 | - | let $ | |
205 | - | let $ | |
206 | - | if (($ | |
207 | - | then $ | |
224 | + | let $list85228553 = [0, 1] | |
225 | + | let $size85228553 = size($list85228553) | |
226 | + | let $acc085228553 = 0 | |
227 | + | if (($size85228553 == 0)) | |
228 | + | then $acc085228553 | |
208 | 229 | else { | |
209 | - | let $ | |
210 | - | if (($ | |
211 | - | then $ | |
230 | + | let $acc185228553 = hasMoreVotes($acc085228553, $list85228553[0]) | |
231 | + | if (($size85228553 == 1)) | |
232 | + | then $acc185228553 | |
212 | 233 | else { | |
213 | - | let $ | |
214 | - | if (($ | |
215 | - | then $ | |
234 | + | let $acc285228553 = hasMoreVotes($acc185228553, $list85228553[1]) | |
235 | + | if (($size85228553 == 2)) | |
236 | + | then $acc285228553 | |
216 | 237 | else { | |
217 | - | let $ | |
238 | + | let $acc385228553 = hasMoreVotes($acc285228553, $list85228553[2]) | |
218 | 239 | throw("List size exceed 2") | |
219 | 240 | } | |
220 | 241 | } |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 3 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let QUORUM = 50 | |
5 | + | ||
6 | + | let WCTid = base58'4zfrrwDVjbGFM8wxbZGriVLY4XJsVD4oNMp21FnDnMAa' | |
5 | 7 | ||
6 | 8 | func tryGetInteger (key) = { | |
7 | 9 | let val = match getInteger(this, key) { | |
8 | 10 | case b: Int => | |
9 | 11 | b | |
10 | 12 | case _ => | |
11 | 13 | 0 | |
12 | 14 | } | |
13 | 15 | val | |
14 | 16 | } | |
15 | 17 | ||
16 | 18 | ||
17 | 19 | func isOwner (address) = (address == this) | |
18 | 20 | ||
19 | 21 | ||
20 | 22 | func getGroup () = { | |
21 | 23 | let val = match getString(this, "working_group") { | |
22 | 24 | case b: String => | |
23 | 25 | b | |
24 | 26 | case _ => | |
25 | 27 | "" | |
26 | 28 | } | |
27 | 29 | val | |
28 | 30 | } | |
29 | 31 | ||
30 | 32 | ||
31 | 33 | func getMembers () = { | |
32 | 34 | let val = match getString(this, "dao_members") { | |
33 | 35 | case b: String => | |
34 | 36 | b | |
35 | 37 | case _ => | |
36 | 38 | "" | |
37 | 39 | } | |
38 | 40 | val | |
39 | 41 | } | |
40 | 42 | ||
41 | 43 | ||
42 | 44 | func isGroupMember (a) = (tryGetInteger(("group_member_weight_" + toString(a))) > 0) | |
43 | 45 | ||
44 | 46 | ||
45 | 47 | func canMemberVote (i) = (tryGetInteger(("dao_member_weight_" + toString(i.caller))) > 0) | |
46 | 48 | ||
47 | 49 | ||
48 | 50 | @Callable(i) | |
49 | 51 | func addDAOMember (memberAddress) = if (!(isOwner(i.caller))) | |
50 | 52 | then throw("access only to the DAO owner") | |
51 | 53 | else { | |
52 | 54 | let group = getMembers() | |
53 | 55 | let newGroup = ((group + ";") + memberAddress) | |
54 | 56 | let groupSize = tryGetInteger("dao_size") | |
55 | 57 | let newGroupSize = (groupSize + 1) | |
56 | 58 | WriteSet([DataEntry("dao_members", newGroup), DataEntry("dao_size", newGroupSize), DataEntry(("dao_member_weight_" + memberAddress), 1)]) | |
57 | 59 | } | |
58 | 60 | ||
59 | 61 | ||
60 | 62 | ||
61 | 63 | @Callable(i) | |
62 | 64 | func addGroupMember (memberAddress) = if (!(isOwner(i.caller))) | |
63 | 65 | then throw("access only to the DAO owner") | |
64 | 66 | else { | |
65 | 67 | let group = getGroup() | |
66 | 68 | let newGroup = ((group + ";") + memberAddress) | |
67 | 69 | let groupSize = tryGetInteger("working_group_size") | |
68 | 70 | let newGroupSize = (groupSize + 1) | |
69 | 71 | WriteSet([DataEntry("working_group", newGroup), DataEntry("working_group_size", newGroupSize), DataEntry(("group_member_weight_" + memberAddress), 1)]) | |
70 | 72 | } | |
71 | 73 | ||
72 | 74 | ||
73 | 75 | ||
74 | 76 | @Callable(i) | |
75 | 77 | func addTask (title) = if (!(isGroupMember(i.caller))) | |
76 | 78 | then throw("grants working group access only") | |
77 | 79 | else WriteSet([DataEntry((toBase58String(i.transactionId) + "_task"), title)]) | |
80 | + | ||
81 | + | ||
82 | + | ||
83 | + | @Callable(i) | |
84 | + | func rateTask (taskId,rate) = if (!(if ((rate == 1)) | |
85 | + | then true | |
86 | + | else (rate == -1))) | |
87 | + | then throw("your rate needs to be +1 or -1") | |
88 | + | else { | |
89 | + | let pmt = extract(i.payment) | |
90 | + | if ((pmt.assetId != WCTid)) | |
91 | + | then throw("you need to vote using WCT") | |
92 | + | else { | |
93 | + | let weight = pmt.amount | |
94 | + | let vote = (rate * weight) | |
95 | + | let previousRate = tryGetInteger((taskId + "_community_rate")) | |
96 | + | ScriptResult(WriteSet([DataEntry((taskId + "_community_rate"), (previousRate + vote))]), TransferSet([ScriptTransfer(i.caller, pmt.amount, pmt.assetId)])) | |
97 | + | } | |
98 | + | } | |
78 | 99 | ||
79 | 100 | ||
80 | 101 | ||
81 | 102 | @Callable(i) | |
82 | 103 | func addTaskDetails (taskId) = if (!(isGroupMember(i.caller))) | |
83 | 104 | then throw("grants working group access only") | |
84 | 105 | else { | |
85 | 106 | let reward = extract(i.payment).amount | |
86 | 107 | WriteSet([DataEntry((taskId + "_reward"), reward), DataEntry((taskId + "_status"), "proposed")]) | |
87 | 108 | } | |
88 | 109 | ||
89 | 110 | ||
90 | 111 | ||
91 | 112 | @Callable(i) | |
92 | 113 | func voteForTaskProposal (taskId,voteValue) = if (!(canMemberVote(i))) | |
93 | 114 | then throw("you can't vote") | |
94 | 115 | else if ((getStringValue(this, (taskId + "_status")) != "proposed")) | |
95 | 116 | then throw("voting is closed or not started") | |
96 | 117 | else if (if ((voteValue != -1)) | |
97 | 118 | then (voteValue != 1) | |
98 | 119 | else false) | |
99 | 120 | then throw("you need to vote 1 or -1") | |
100 | 121 | else { | |
101 | 122 | let voteKey = (((taskId + "_") + toString(i.caller)) + "_vote1") | |
102 | 123 | let previousVote = tryGetInteger(voteKey) | |
103 | 124 | if (!((previousVote == 0))) | |
104 | 125 | then throw("you have already voted") | |
105 | 126 | else { | |
106 | 127 | let votingKey = (taskId + "_voting1") | |
107 | 128 | let votingState = tryGetInteger(votingKey) | |
108 | 129 | let votesAmountKey = (taskId + "_voting1_amount") | |
109 | 130 | let votesAmountState = (tryGetInteger(votingKey) + 1) | |
110 | 131 | let newVotingState = (votingState + voteValue) | |
111 | 132 | ScriptResult(WriteSet([DataEntry(votingKey, newVotingState), DataEntry(voteKey, voteValue), DataEntry(votesAmountKey, votesAmountState)]), TransferSet([ScriptTransfer(i.caller, 500000, unit)])) | |
112 | 133 | } | |
113 | 134 | } | |
114 | 135 | ||
115 | 136 | ||
116 | 137 | ||
117 | 138 | @Callable(i) | |
118 | 139 | func finishTaskProposalVoting (taskId) = if ((QUORUM > ((tryGetInteger((taskId + "_voting1_amount")) * 100) / tryGetInteger("dao_size")))) | |
119 | 140 | then throw((("more than " + toString(QUORUM)) + "% members have to vote before finishing the voting")) | |
120 | 141 | else if (!(isGroupMember(i.caller))) | |
121 | 142 | then throw("grants working group access only") | |
122 | 143 | else { | |
123 | 144 | let votingKey = (taskId + "_voting1") | |
124 | 145 | let votingState = tryGetInteger(votingKey) | |
125 | 146 | if ((votingState > 0)) | |
126 | 147 | then { | |
127 | 148 | let votingResult = "ready_to_apply" | |
128 | 149 | WriteSet([DataEntry((taskId + "_status"), votingResult)]) | |
129 | 150 | } | |
130 | 151 | else { | |
131 | 152 | let votingResult = "rejected" | |
132 | 153 | WriteSet([DataEntry((taskId + "_status"), votingResult)]) | |
133 | 154 | } | |
134 | 155 | } | |
135 | 156 | ||
136 | 157 | ||
137 | 158 | ||
138 | 159 | @Callable(i) | |
139 | 160 | func applyForTask (taskId,teamName) = { | |
140 | 161 | let listKey = (taskId + "_applicants") | |
141 | 162 | let currentApplicantsList = match getString(this, listKey) { | |
142 | 163 | case b: String => | |
143 | 164 | b | |
144 | 165 | case _ => | |
145 | 166 | "" | |
146 | 167 | } | |
147 | 168 | let newApplicantsList = ((currentApplicantsList + ";") + teamName) | |
148 | 169 | WriteSet([DataEntry((((taskId + "_applicant_") + teamName) + "_leader"), toString(i.caller)), DataEntry(listKey, newApplicantsList)]) | |
149 | 170 | } | |
150 | 171 | ||
151 | 172 | ||
152 | 173 | ||
153 | 174 | @Callable(i) | |
154 | 175 | func voteForApplicant (taskId,teamName,voteValue) = if (!(canMemberVote(i))) | |
155 | 176 | then throw("you can't vote") | |
156 | 177 | else { | |
157 | 178 | let voteKey = ((((taskId + "_") + toString(i.caller)) + "_vote_") + teamName) | |
158 | 179 | let vote = tryGetInteger(voteKey) | |
159 | 180 | if ((vote != 0)) | |
160 | 181 | then throw("you have already voted on this team") | |
161 | 182 | else { | |
162 | 183 | let teamVotesAmountKey = (((taskId + "_applicant_") + teamName) + "_votes") | |
163 | 184 | let teamScoreKey = (((taskId + "_applicant_") + teamName) + "_score") | |
164 | 185 | let teamVotesAmount = (1 + tryGetInteger(teamVotesAmountKey)) | |
165 | 186 | let newTeamScore = (voteValue + tryGetInteger(teamScoreKey)) | |
166 | 187 | WriteSet([DataEntry(voteKey, voteValue), DataEntry(teamScoreKey, newTeamScore)]) | |
167 | 188 | } | |
168 | 189 | } | |
169 | 190 | ||
170 | 191 | ||
171 | 192 | ||
172 | 193 | @Callable(i) | |
173 | 194 | func finishApplicantsVoting (taskId) = { | |
174 | 195 | func isApplicantVotedEnough (aid,aid2) = { | |
175 | 196 | let listKey = (taskId + "_applicants") | |
176 | 197 | let applicantsList = split(getStringValue(this, listKey), ";") | |
177 | 198 | let teamName = applicantsList[aid] | |
178 | 199 | let teamVotesAmountKey = (((taskId + "_applicant_") + teamName) + "_votes") | |
179 | 200 | let teamVotesAmount = tryGetInteger(teamVotesAmountKey) | |
180 | 201 | if ((teamVotesAmount > 0)) | |
181 | 202 | then 1 | |
182 | 203 | else throw(("not enough votes to make decision on " + teamName)) | |
183 | 204 | } | |
184 | 205 | ||
185 | 206 | func hasMoreVotes (aid,aid2) = { | |
186 | 207 | let listKey = (taskId + "_applicants") | |
187 | 208 | let applicantsList = split(getStringValue(this, listKey), ";") | |
188 | 209 | let teamName = applicantsList[aid] | |
189 | 210 | let teamVotesAmountKey = (((taskId + "_applicant_") + teamName) + "_votes") | |
190 | 211 | let teamVotesAmount = tryGetInteger(teamVotesAmountKey) | |
191 | 212 | let team2Name = applicantsList[aid2] | |
192 | 213 | let team2VotesAmountKey = (((taskId + "_applicant_") + team2Name) + "_votes") | |
193 | 214 | let team2VotesAmount = tryGetInteger(team2VotesAmountKey) | |
194 | 215 | if ((teamVotesAmount > team2VotesAmount)) | |
195 | 216 | then aid | |
196 | 217 | else aid2 | |
197 | 218 | } | |
198 | 219 | ||
199 | 220 | if (!(isGroupMember(i.caller))) | |
200 | 221 | then throw("grants working group access only") | |
201 | 222 | else { | |
202 | 223 | let chosenTeamId = { | |
203 | - | let $ | |
204 | - | let $ | |
205 | - | let $ | |
206 | - | if (($ | |
207 | - | then $ | |
224 | + | let $list85228553 = [0, 1] | |
225 | + | let $size85228553 = size($list85228553) | |
226 | + | let $acc085228553 = 0 | |
227 | + | if (($size85228553 == 0)) | |
228 | + | then $acc085228553 | |
208 | 229 | else { | |
209 | - | let $ | |
210 | - | if (($ | |
211 | - | then $ | |
230 | + | let $acc185228553 = hasMoreVotes($acc085228553, $list85228553[0]) | |
231 | + | if (($size85228553 == 1)) | |
232 | + | then $acc185228553 | |
212 | 233 | else { | |
213 | - | let $ | |
214 | - | if (($ | |
215 | - | then $ | |
234 | + | let $acc285228553 = hasMoreVotes($acc185228553, $list85228553[1]) | |
235 | + | if (($size85228553 == 2)) | |
236 | + | then $acc285228553 | |
216 | 237 | else { | |
217 | - | let $ | |
238 | + | let $acc385228553 = hasMoreVotes($acc285228553, $list85228553[2]) | |
218 | 239 | throw("List size exceed 2") | |
219 | 240 | } | |
220 | 241 | } | |
221 | 242 | } | |
222 | 243 | } | |
223 | 244 | let listKey = (taskId + "_applicants") | |
224 | 245 | let applicantsList = split(getStringValue(this, listKey), ";") | |
225 | 246 | let teamName = applicantsList[chosenTeamId] | |
226 | 247 | WriteSet([DataEntry((taskId + "_status"), "team_chosen"), DataEntry((taskId + "_performer"), teamName), DataEntry((((taskId + "_applicant_") + teamName) + "_work_process"), "can_begin")]) | |
227 | 248 | } | |
228 | 249 | } | |
229 | 250 | ||
230 | 251 | ||
231 | 252 | ||
232 | 253 | @Callable(i) | |
233 | 254 | func startWork (taskId) = { | |
234 | 255 | let teamName = getStringValue(this, (taskId + "_performer")) | |
235 | 256 | if ((toString(i.caller) != getStringValue(this, (((taskId + "_applicant_") + teamName) + "_leader")))) | |
236 | 257 | then throw("team leader only") | |
237 | 258 | else WriteSet([DataEntry((taskId + "_status"), "work_started"), DataEntry((((taskId + "_applicant_") + teamName) + "_work_process"), "work_started")]) | |
238 | 259 | } | |
239 | 260 | ||
240 | 261 | ||
241 | 262 | ||
242 | 263 | @Callable(i) | |
243 | 264 | func acceptWorkResult (taskId) = if (!(isGroupMember(i.caller))) | |
244 | 265 | then throw("grants working group access only") | |
245 | 266 | else { | |
246 | 267 | let rewardAmount = tryGetInteger((taskId + "_reward")) | |
247 | 268 | let teamName = getStringValue(this, (taskId + "_performer")) | |
248 | 269 | let teamAddress = getStringValue(this, (((taskId + "_applicant_") + teamName) + "_leader")) | |
249 | 270 | ScriptResult(WriteSet([DataEntry((taskId + "_status"), "work_finished"), DataEntry((((taskId + "_applicant_") + teamName) + "_work_process"), "work_finished")]), TransferSet([ScriptTransfer(addressFromStringValue(teamAddress), rewardAmount, unit)])) | |
250 | 271 | } | |
251 | 272 | ||
252 | 273 |
github/deemru/w8io/026f985 54.80 ms ◑