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