tx · ADbk2so6oBzPKuYcdpMGTcWADPPZghrBSgoYQ1Ls3ZfJ 3MzSNsJLeYj6Eh6u2QzJrbByPCySgFoCbWC: -0.05000000 Waves 2020.01.05 08:35 [840166] smart account 3MzSNsJLeYj6Eh6u2QzJrbByPCySgFoCbWC > SELF 0.00000000 Waves
{ "type": 13, "id": "ADbk2so6oBzPKuYcdpMGTcWADPPZghrBSgoYQ1Ls3ZfJ", "fee": 5000000, "feeAssetId": null, "timestamp": 1578201630361, "version": 1, "sender": "3MzSNsJLeYj6Eh6u2QzJrbByPCySgFoCbWC", "senderPublicKey": "99sSPZk2SumsopYRh2PAvWL8BHjDhYsY5NspsFGXLnAm", "proofs": [ "5wKRDK4xkncFJn9ARK9wzLLAqrQ8rBk98oDVUFXCYjPZm717Rcuq5vhUcydowhpVpjn8Z4jPXT69Uexz4uNzGWQq" ], "script": "base64:AAIDAAAAAAAAAF8IARIDCgEBEgUKAwgBCBIDCgEIEgQKAggIEgUKAwgICBIECgIICBIDCgEIEgMKAQgSBAoCCAQSBAoCCAESBAoCCAgSAwoBCBIECgIICBIFCgMICAgSBAoCCAgSAwoBCAAAAEkAAAAABE5PTkUCAAAABG5vbmUAAAAACEZFQVRVUkVEAgAAAAhmZWF0dXJlZAAAAAAEREFQUAIAAAAAAAAAAANNT0QCAAAAA21vZAAAAAAKUkVHSVNURVJFRAIAAAAKcmVnaXN0ZXJlZAAAAAAHQ1JFQVRPUgIAAAAjM01zVExpekVnNHZxTmdEN1pWamhrUGFaZ3NyTjExSnF6TEoAAAAACklOUFJPR1JFU1MCAAAAC2luIHByb2dyZXNzAAAAAAlDT01QTEVURUQCAAAACWNvbXBsZXRlZAAAAAAHUEVORElORwIAAAAHcGVuZGluZwAAAAAJSU5ESVNQVVRFAgAAAAppbiBkaXNwdXRlAAAAAAhSRVZJU0lPTgIAAAAIcmV2aXNpb24AAAAACENBTkNFTEVEAgAAAAhjYW5jZWxlZAAAAAAKREVDUllCRUZFRQkAAGkAAAACAAAA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0F1dGhvcgAAAAEFAAAABHRhc2sEAAAABGJhbmsJAQAAABBnZXRWYWx1ZVRhc2tCYW5rAAAAAQUAAAAEdGFzawMJAAAAAAAAAgkBAAAAD2dldFZhbHVlVXNlckJpbwAAAAEFAAAAB2FjY291bnQFAAAABE5PTkUJAAACAAAAAQIAAAAOWW91IG5vdCBzaWdudXADCQAAAAAAAAIJAQAAABBnZXRWYWx1ZVRhc2tEYXRhAAAAAQUAAAAEdGFzawUAAAAETk9ORQkAAAIAAAABAgAAABFUYXNrIGRvZXNudCBleGlzdAMJAQAAAAIhPQAAAAIJAQAAABJnZXRWYWx1ZVRhc2tTdGF0dXMAAAABBQAAAAR0YXNrBQAAAAhGRUFUVVJFRAkAAAIAAAABAgAAAB1Zb3UgY2FuJ3QgY2FuY2VsIHRoZSB0YXNrIG5vdwMJAQAAAAIhPQAAAAIFAAAAB2FjY291bnQFAAAAB2NyZWF0b3IJAAACAAAAAQIAAAAeWW91IGFyZSBub3QgYXV0aG9yIG9mIHRoZSB0YXNrCQEAAAAMU2NyaXB0UmVzdWx0AAAAAgkBAAAACFdyaXRlU2V0AAAAAQkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgkBAAAAEGdldEtleVRhc2tTdGF0dXMAAAABBQAAAAR0YXNrBQAAAAhDQU5DRUxFRAUAAAADbmlsCQEAAAALVHJhbnNmZXJTZXQAAAABCQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMJAQAAABxAZXh0clVzZXIoYWRkcmVzc0Zyb21TdHJpbmcpAAAAAQUAAAAHY3JlYXRvcgUAAAAEYmFuawUAAAAEdW5pdAUAAAADbmlsAAAAAFO7vNI=", "chainId": 84, "height": 840166, "spentComplexity": 0 } View: original | compacted Prev: J5vuZc1SvYoMjh9AZtpA9gCkHpfsaDq5ASBv2zBYWfNC Next: G4b9KPVosQ4Xyonz2LkUpCy6kUya7ae4Eg5u5iJyEv1L Diff:
Old | New | Differences | |
---|---|---|---|
276 | 276 | then throw("Freelancer not signup") | |
277 | 277 | else if ((getValueTaskAuthor(task) != account)) | |
278 | 278 | then throw("You're not author") | |
279 | - | else if ((getValueTaskStatus(task) | |
280 | - | then throw("Freelancer is no longer required | |
279 | + | else if ((getValueTaskStatus(task) != FEATURED)) | |
280 | + | then throw("Freelancer is no longer required") | |
281 | 281 | else if ((freelancer == account)) | |
282 | 282 | then throw("You can't hire yourself") | |
283 | - | else WriteSet([DataEntry(getKeyTaskFreelancer(task), freelancer), DataEntry(getKeyTaskStatus(task), INPROGRESS)]) | |
283 | + | else if ((getValueUserMessage(freelancer, account, "1") == NONE)) | |
284 | + | then throw("The freelancer was not attached to the task") | |
285 | + | else WriteSet([DataEntry(getKeyTaskFreelancer(task), freelancer), DataEntry(getKeyTaskStatus(task), INPROGRESS)]) | |
284 | 286 | } | |
285 | 287 | ||
286 | 288 | ||
336 | 338 | let status = getValueTaskStatus(task) | |
337 | 339 | let freelancerMessagesCnt = getValueUserMessagesCnt(account, taskCreator) | |
338 | 340 | let lastFreelancerMessage = getValueUserMessage(account, taskCreator, toString(freelancerMessagesCnt)) | |
339 | - | if (( | |
340 | - | then | |
341 | - | | |
342 | - | | |
343 | - | | |
344 | - | | |
345 | - | else if (( | |
346 | - | then throw(" | |
347 | - | else if (( | |
348 | - | then throw(" | |
349 | - | else | |
341 | + | if ((getValueUserBio(account) == NONE)) | |
342 | + | then throw("User not signup") | |
343 | + | else if ((getValueTaskAuthor(task) == account)) | |
344 | + | then throw("You are author") | |
345 | + | else if ((getValueTaskFreelancer(task) != account)) | |
346 | + | then throw("You are not freelancer") | |
347 | + | else if ((status != INPROGRESS)) | |
348 | + | then throw(("Status must be in progress, now: " + status)) | |
349 | + | else if ((getValueTaskFreelancer(task) == NONE)) | |
350 | + | then throw("Task freelancer doesnt exist") | |
351 | + | else WriteSet([DataEntry(getKeyTaskReportComplete(account, task, toString(stage)), freelancerMessagesCnt), DataEntry(getKeyTaskStatus(task), PENDING)]) | |
350 | 352 | } | |
351 | 353 | ||
352 | 354 | ||
359 | 361 | let stage = getValueTaskReportCompleteCnt(task, freelancer) | |
360 | 362 | let status = getValueTaskStatus(task) | |
361 | 363 | let bank = getValueTaskBank(task) | |
362 | - | if ((account == creator)) | |
363 | - | then if ((status == PENDING)) | |
364 | - | then if (complete) | |
365 | - | then ScriptResult(WriteSet([DataEntry(getKeyTaskStatus(task), COMPLETED), DataEntry(getKeyUserRating(freelancer), (getValueUserRating(freelancer) + 1)), DataEntry(getKeyUserRatingVote(account, freelancer), "positive"), DataEntry(getKeyTaskBank(task), "0")]), TransferSet([ScriptTransfer(addressFromStringValue(freelancer), bank, unit)])) | |
366 | - | else WriteSet([DataEntry(getKeyTaskStatus(task), INPROGRESS)]) | |
367 | - | else throw("Freelancer doesnt complete the task") | |
364 | + | if ((getValueUserBio(account) == NONE)) | |
365 | + | then throw("Sender not signup") | |
368 | 366 | else if ((getValueTaskData(task) == NONE)) | |
369 | 367 | then throw("Task doesnt exist") | |
370 | - | else if ((getValueUserBio(account) == NONE)) | |
371 | - | then throw("Sender not signup") | |
372 | - | else throw("You are not author") | |
368 | + | else if ((account != creator)) | |
369 | + | then throw("You are not author") | |
370 | + | else if ((status != PENDING)) | |
371 | + | then throw("Freelancer doesnt complete the task") | |
372 | + | else if (complete) | |
373 | + | then ScriptResult(WriteSet([DataEntry(getKeyTaskStatus(task), COMPLETED), DataEntry(getKeyUserRating(freelancer), (getValueUserRating(freelancer) + 1)), DataEntry(getKeyUserRatingVote(account, freelancer), "positive"), DataEntry(getKeyTaskBank(task), "0")]), TransferSet([ScriptTransfer(addressFromStringValue(freelancer), bank, unit)])) | |
374 | + | else WriteSet([DataEntry(getKeyTaskStatus(task), INPROGRESS)]) | |
373 | 375 | } | |
374 | 376 | ||
375 | 377 | ||
380 | 382 | let creator = getValueTaskAuthor(task) | |
381 | 383 | let expiration = getValueTaskExpiration(task) | |
382 | 384 | let status = getValueTaskStatus(task) | |
383 | - | if ((status | |
385 | + | if ((status == COMPLETED)) | |
384 | 386 | then throw("The task is completed") | |
385 | 387 | else if ((status == INDISPUTE)) | |
386 | 388 | then throw("You can't change the deadline at this time") |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 3 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let NONE = "none" | |
5 | 5 | ||
6 | 6 | let FEATURED = "featured" | |
7 | 7 | ||
8 | 8 | let DAPP = "" | |
9 | 9 | ||
10 | 10 | let MOD = "mod" | |
11 | 11 | ||
12 | 12 | let REGISTERED = "registered" | |
13 | 13 | ||
14 | 14 | let CREATOR = "3MsTLizEg4vqNgD7ZVjhkPaZgsrN11JqzLJ" | |
15 | 15 | ||
16 | 16 | let INPROGRESS = "in progress" | |
17 | 17 | ||
18 | 18 | let COMPLETED = "completed" | |
19 | 19 | ||
20 | 20 | let PENDING = "pending" | |
21 | 21 | ||
22 | 22 | let INDISPUTE = "in dispute" | |
23 | 23 | ||
24 | 24 | let REVISION = "revision" | |
25 | 25 | ||
26 | 26 | let CANCELED = "canceled" | |
27 | 27 | ||
28 | 28 | let DECRYBEFEE = (2 / 100) | |
29 | 29 | ||
30 | 30 | let WAVESLET = 100000000 | |
31 | 31 | ||
32 | 32 | func getStrByKey (key) = { | |
33 | 33 | let str = match getString(this, key) { | |
34 | 34 | case a: String => | |
35 | 35 | a | |
36 | 36 | case _ => | |
37 | 37 | NONE | |
38 | 38 | } | |
39 | 39 | str | |
40 | 40 | } | |
41 | 41 | ||
42 | 42 | ||
43 | 43 | func getNumberByKey (key) = { | |
44 | 44 | let num = match getInteger(this, key) { | |
45 | 45 | case a: Int => | |
46 | 46 | a | |
47 | 47 | case _ => | |
48 | 48 | 0 | |
49 | 49 | } | |
50 | 50 | num | |
51 | 51 | } | |
52 | 52 | ||
53 | 53 | ||
54 | 54 | func getKeyUserMessagesCnt (from,to) = ((("msg_cnt_" + from) + "_") + to) | |
55 | 55 | ||
56 | 56 | ||
57 | 57 | func getValueUserMessagesCnt (from,to) = getNumberByKey(getKeyUserMessagesCnt(from, to)) | |
58 | 58 | ||
59 | 59 | ||
60 | 60 | func getKeyUserMessage (from,to,id) = ((((("msg_" + from) + "_") + to) + "_id:") + id) | |
61 | 61 | ||
62 | 62 | ||
63 | 63 | func getValueUserMessage (from,to,cnt) = getStrByKey(getKeyUserMessage(from, to, cnt)) | |
64 | 64 | ||
65 | 65 | ||
66 | 66 | func getKeyUserMessageBlock (from,to,cnt) = ((((("block_msg_" + from) + "_") + to) + "_id:") + cnt) | |
67 | 67 | ||
68 | 68 | ||
69 | 69 | func getValueUserMessageBlock (from,to,cnt) = getStrByKey(getKeyUserMessageBlock(from, to, cnt)) | |
70 | 70 | ||
71 | 71 | ||
72 | 72 | func getKeyTaskData (task) = ("datajson_" + task) | |
73 | 73 | ||
74 | 74 | ||
75 | 75 | func getValueTaskData (task) = getStrByKey(getKeyTaskData(task)) | |
76 | 76 | ||
77 | 77 | ||
78 | 78 | func getKeyTaskAuthor (task) = ("author_" + task) | |
79 | 79 | ||
80 | 80 | ||
81 | 81 | func getValueTaskAuthor (task) = getStrByKey(getKeyTaskAuthor(task)) | |
82 | 82 | ||
83 | 83 | ||
84 | 84 | func getKeyTaskBlock (task) = ("block_" + task) | |
85 | 85 | ||
86 | 86 | ||
87 | 87 | func getValueTaskBlock (task) = getNumberByKey(getKeyTaskBlock(task)) | |
88 | 88 | ||
89 | 89 | ||
90 | 90 | func getKeyTaskBank (task) = ("bank_" + task) | |
91 | 91 | ||
92 | 92 | ||
93 | 93 | func getValueTaskBank (task) = getNumberByKey(getKeyTaskBank(task)) | |
94 | 94 | ||
95 | 95 | ||
96 | 96 | func getKeyTaskFreelancer (task) = ("freelancer_" + task) | |
97 | 97 | ||
98 | 98 | ||
99 | 99 | func getValueTaskFreelancer (task) = getStrByKey(getKeyTaskFreelancer(task)) | |
100 | 100 | ||
101 | 101 | ||
102 | 102 | func getKeyTaskStatus (task) = ("status_" + task) | |
103 | 103 | ||
104 | 104 | ||
105 | 105 | func getValueTaskStatus (task) = getStrByKey(getKeyTaskStatus(task)) | |
106 | 106 | ||
107 | 107 | ||
108 | 108 | func getKeyTaskExpiration (task) = ("expiration_block_" + task) | |
109 | 109 | ||
110 | 110 | ||
111 | 111 | func getValueTaskExpiration (task) = getNumberByKey(getKeyTaskExpiration(task)) | |
112 | 112 | ||
113 | 113 | ||
114 | 114 | func getKeyUserBio (account) = ("user_bio_" + account) | |
115 | 115 | ||
116 | 116 | ||
117 | 117 | func getValueUserBio (account) = getStrByKey(getKeyUserBio(account)) | |
118 | 118 | ||
119 | 119 | ||
120 | 120 | func getKeyUserStatus (account) = ("user_sts_" + account) | |
121 | 121 | ||
122 | 122 | ||
123 | 123 | func getValueUserStatus (account) = getStrByKey(getKeyUserStatus(account)) | |
124 | 124 | ||
125 | 125 | ||
126 | 126 | func getKeyUserBlock (account) = ("user_blk_" + account) | |
127 | 127 | ||
128 | 128 | ||
129 | 129 | func getKeyTaskReportComplete (freelancer,task,stage) = ((((("rc_" + task) + "_") + freelancer) + "_stage:") + stage) | |
130 | 130 | ||
131 | 131 | ||
132 | 132 | func getValueTaskReportComplete (freelancer,task,stage) = getStrByKey(getKeyTaskReportComplete(freelancer, task, stage)) | |
133 | 133 | ||
134 | 134 | ||
135 | 135 | func getKeyTaskReportCompleteCnt (task,freelancer) = ((("rc_cnt_" + task) + "_") + freelancer) | |
136 | 136 | ||
137 | 137 | ||
138 | 138 | func getValueTaskReportCompleteCnt (task,freelancer) = getNumberByKey(getKeyTaskReportCompleteCnt(task, freelancer)) | |
139 | 139 | ||
140 | 140 | ||
141 | 141 | func getKeyDecrybeBalance () = "decrybe_balance" | |
142 | 142 | ||
143 | 143 | ||
144 | 144 | func getValueDecrybeBalance () = getNumberByKey(getKeyDecrybeBalance()) | |
145 | 145 | ||
146 | 146 | ||
147 | 147 | func getKeyTaskRating (task) = ("task_rating_" + task) | |
148 | 148 | ||
149 | 149 | ||
150 | 150 | func getValueTaskRating (task) = getNumberByKey(getKeyTaskRating(task)) | |
151 | 151 | ||
152 | 152 | ||
153 | 153 | func getKeyTaskUserVoteRating (task,user) = ((("task_vote_" + task) + "_") + user) | |
154 | 154 | ||
155 | 155 | ||
156 | 156 | func getValueTaskUserVoteRating (task,user) = getStrByKey(getKeyTaskUserVoteRating(task, user)) | |
157 | 157 | ||
158 | 158 | ||
159 | 159 | func getKeyUserRating (user) = ("user_rating_" + user) | |
160 | 160 | ||
161 | 161 | ||
162 | 162 | func getValueUserRating (user) = getNumberByKey(getKeyUserRating(user)) | |
163 | 163 | ||
164 | 164 | ||
165 | 165 | func getKeyUserRatingVote (user,voting) = (("user_vote_" + user) + voting) | |
166 | 166 | ||
167 | 167 | ||
168 | 168 | func getValueUserRatingVote (user,voting) = getStrByKey(getKeyUserRatingVote(user, voting)) | |
169 | 169 | ||
170 | 170 | ||
171 | 171 | func getKeyTaskDispute (task) = ("task_dispute_" + task) | |
172 | 172 | ||
173 | 173 | ||
174 | 174 | func getValueTaskDispute (task) = getStrByKey(getKeyTaskDispute(task)) | |
175 | 175 | ||
176 | 176 | ||
177 | 177 | func getKeyTaskDisputeVoteCustomer (task) = ("task_dispvote_cst_" + task) | |
178 | 178 | ||
179 | 179 | ||
180 | 180 | func getValueTaskDisputeVoteCustomer (task) = getNumberByKey(getKeyTaskDisputeVoteCustomer(task)) | |
181 | 181 | ||
182 | 182 | ||
183 | 183 | func getKeyTaskDisputeVoteFreelancer (task) = ("task_dispvote_flr_" + task) | |
184 | 184 | ||
185 | 185 | ||
186 | 186 | func getValueTaskDisputeVoteFreelancer (task) = getNumberByKey(getKeyTaskDisputeVoteFreelancer(task)) | |
187 | 187 | ||
188 | 188 | ||
189 | 189 | func getKeyTaskDisputeMessage (task,sender,id) = ((((("task_dispmsg_" + task) + "_") + sender) + "_id:") + id) | |
190 | 190 | ||
191 | 191 | ||
192 | 192 | func getValueTaskDisputeMessage (task,sender,id) = getStrByKey(getKeyTaskDisputeMessage(task, sender, id)) | |
193 | 193 | ||
194 | 194 | ||
195 | 195 | func getKeyTaskDisputeMessageBlock (task,sender,id) = ((((("task_dispmsg_blk_" + task) + "_") + sender) + "_id:") + id) | |
196 | 196 | ||
197 | 197 | ||
198 | 198 | func getValueTaskDisputeMessageBlock (task,sender,id) = getStrByKey(getKeyTaskDisputeMessageBlock(task, sender, id)) | |
199 | 199 | ||
200 | 200 | ||
201 | 201 | func getKeyTaskDisputeMessagesCnt (task,user) = ((("task_dispmsg_cnt_" + task) + "_") + user) | |
202 | 202 | ||
203 | 203 | ||
204 | 204 | func getValueTaskDisputeMessagesCnt (task,user) = getNumberByKey(getKeyTaskDisputeMessagesCnt(task, user)) | |
205 | 205 | ||
206 | 206 | ||
207 | 207 | func getKeyTaskDisputeComment (task,sender) = ((("task_dispcom_" + task) + "_") + sender) | |
208 | 208 | ||
209 | 209 | ||
210 | 210 | func getValueTaskDisputeComment (task,sender) = getStrByKey(getKeyTaskDisputeComment(task, sender)) | |
211 | 211 | ||
212 | 212 | ||
213 | 213 | func getKeyTaskDisputeCommentBlock (task,sender) = ((("task_dispcom_blk_" + task) + "_") + sender) | |
214 | 214 | ||
215 | 215 | ||
216 | 216 | func getValueTaskDisputeCommentBlock (task,sender) = getStrByKey(getKeyTaskDisputeCommentBlock(task, sender)) | |
217 | 217 | ||
218 | 218 | ||
219 | 219 | func getKeyTaskDisputeVoteVariant (task,user) = ((("task_dispvar_" + task) + "_") + user) | |
220 | 220 | ||
221 | 221 | ||
222 | 222 | func getValueTaskDisputeVoteVariant (task,user) = getStrByKey(getKeyTaskDisputeVoteVariant(task, user)) | |
223 | 223 | ||
224 | 224 | ||
225 | 225 | @Callable(i) | |
226 | 226 | func withdrawDecrybeBalance (amount) = { | |
227 | 227 | let account = toBase58String(i.caller.bytes) | |
228 | 228 | let balance = getValueDecrybeBalance() | |
229 | 229 | if ((account == CREATOR)) | |
230 | 230 | then if ((balance >= amount)) | |
231 | 231 | then TransferSet([ScriptTransfer(addressFromStringValue(account), amount, unit)]) | |
232 | 232 | else throw(("You cannot withdraw an amount greater than " + toString(balance))) | |
233 | 233 | else throw("You can't do that") | |
234 | 234 | } | |
235 | 235 | ||
236 | 236 | ||
237 | 237 | ||
238 | 238 | @Callable(i) | |
239 | 239 | func createTask (task,expiration,data) = { | |
240 | 240 | let account = toBase58String(i.caller.bytes) | |
241 | 241 | let pmt = extract(i.payment) | |
242 | 242 | let pmtAmount = pmt.amount | |
243 | 243 | let payment = ((pmtAmount / ((1 * WAVESLET) + DECRYBEFEE)) * WAVESLET) | |
244 | 244 | let commission = (pmtAmount - payment) | |
245 | 245 | if (isDefined(pmt.assetId)) | |
246 | 246 | then throw("Can use waves only at the moment") | |
247 | 247 | else if ((pmtAmount == 0)) | |
248 | 248 | then throw("Amount must be higher then 0") | |
249 | 249 | else if ((getValueTaskAuthor(task) != NONE)) | |
250 | 250 | then throw("Task already exist") | |
251 | 251 | else if ((getValueUserBio(account) == NONE)) | |
252 | 252 | then throw("User not signup") | |
253 | 253 | else WriteSet([DataEntry(getKeyTaskAuthor(task), account), DataEntry(getKeyTaskBlock(task), height), DataEntry(getKeyTaskExpiration(task), (height + expiration)), DataEntry(getKeyTaskBank(task), payment), DataEntry(getKeyTaskStatus(task), FEATURED), DataEntry(getKeyTaskData(task), data), DataEntry(getKeyDecrybeBalance(), (getValueDecrybeBalance() + commission)), DataEntry(getKeyTaskRating(task), 0)]) | |
254 | 254 | } | |
255 | 255 | ||
256 | 256 | ||
257 | 257 | ||
258 | 258 | @Callable(i) | |
259 | 259 | func signUp (data) = { | |
260 | 260 | let account = toBase58String(i.caller.bytes) | |
261 | 261 | if ((getValueUserBio(account) != NONE)) | |
262 | 262 | then throw("User already exist") | |
263 | 263 | else WriteSet([DataEntry(getKeyUserBio(account), data), DataEntry(getKeyUserBlock(account), height), DataEntry(getKeyUserStatus(account), REGISTERED)]) | |
264 | 264 | } | |
265 | 265 | ||
266 | 266 | ||
267 | 267 | ||
268 | 268 | @Callable(i) | |
269 | 269 | func hireFreelancer (task,freelancer) = { | |
270 | 270 | let account = toBase58String(i.caller.bytes) | |
271 | 271 | if ((getValueTaskData(task) == NONE)) | |
272 | 272 | then throw("Task doesnt exist") | |
273 | 273 | else if ((getValueUserBio(account) == NONE)) | |
274 | 274 | then throw("Customer not signup") | |
275 | 275 | else if ((getValueUserBio(freelancer) == NONE)) | |
276 | 276 | then throw("Freelancer not signup") | |
277 | 277 | else if ((getValueTaskAuthor(task) != account)) | |
278 | 278 | then throw("You're not author") | |
279 | - | else if ((getValueTaskStatus(task) | |
280 | - | then throw("Freelancer is no longer required | |
279 | + | else if ((getValueTaskStatus(task) != FEATURED)) | |
280 | + | then throw("Freelancer is no longer required") | |
281 | 281 | else if ((freelancer == account)) | |
282 | 282 | then throw("You can't hire yourself") | |
283 | - | else WriteSet([DataEntry(getKeyTaskFreelancer(task), freelancer), DataEntry(getKeyTaskStatus(task), INPROGRESS)]) | |
283 | + | else if ((getValueUserMessage(freelancer, account, "1") == NONE)) | |
284 | + | then throw("The freelancer was not attached to the task") | |
285 | + | else WriteSet([DataEntry(getKeyTaskFreelancer(task), freelancer), DataEntry(getKeyTaskStatus(task), INPROGRESS)]) | |
284 | 286 | } | |
285 | 287 | ||
286 | 288 | ||
287 | 289 | ||
288 | 290 | @Callable(i) | |
289 | 291 | func sendMessage (task,to,message) = { | |
290 | 292 | let account = toBase58String(i.caller.bytes) | |
291 | 293 | let cnt = (getValueUserMessagesCnt(account, to) + 1) | |
292 | 294 | if ((getValueTaskData(task) == NONE)) | |
293 | 295 | then throw("Task doesnt exist") | |
294 | 296 | else if ((account == to)) | |
295 | 297 | then throw("You can't send messages to yourself") | |
296 | 298 | else if ((getValueUserBio(account) == NONE)) | |
297 | 299 | then throw("Sender not signup") | |
298 | 300 | else if ((getValueUserBio(to) == NONE)) | |
299 | 301 | then throw("Recipient not singup") | |
300 | 302 | else WriteSet([DataEntry(getKeyUserMessagesCnt(account, to), cnt), DataEntry(getKeyUserMessage(account, to, toString(cnt)), message), DataEntry(getKeyUserMessageBlock(account, to, toString(cnt)), height)]) | |
301 | 303 | } | |
302 | 304 | ||
303 | 305 | ||
304 | 306 | ||
305 | 307 | @Callable(i) | |
306 | 308 | func taskUpdate (task,data) = { | |
307 | 309 | let account = toBase58String(i.caller.bytes) | |
308 | 310 | if ((getValueUserBio(account) == NONE)) | |
309 | 311 | then throw("User not signup") | |
310 | 312 | else if ((getValueTaskData(task) == NONE)) | |
311 | 313 | then throw("Task doesnt exist") | |
312 | 314 | else if ((getValueTaskAuthor(task) != account)) | |
313 | 315 | then throw("You're not author") | |
314 | 316 | else if ((getValueTaskStatus(task) != FEATURED)) | |
315 | 317 | then throw("Editing tasks is not available after hiring a freelancer") | |
316 | 318 | else WriteSet([DataEntry(getKeyTaskData(task), data)]) | |
317 | 319 | } | |
318 | 320 | ||
319 | 321 | ||
320 | 322 | ||
321 | 323 | @Callable(i) | |
322 | 324 | func userUpdate (data) = { | |
323 | 325 | let account = toBase58String(i.caller.bytes) | |
324 | 326 | if ((getValueUserBio(account) == NONE)) | |
325 | 327 | then throw("User not signup") | |
326 | 328 | else WriteSet([DataEntry(getKeyUserBio(account), data)]) | |
327 | 329 | } | |
328 | 330 | ||
329 | 331 | ||
330 | 332 | ||
331 | 333 | @Callable(i) | |
332 | 334 | func reportCompleteTask (task) = { | |
333 | 335 | let account = toBase58String(i.caller.bytes) | |
334 | 336 | let stage = (getValueTaskReportCompleteCnt(task, account) + 1) | |
335 | 337 | let taskCreator = getValueTaskAuthor(task) | |
336 | 338 | let status = getValueTaskStatus(task) | |
337 | 339 | let freelancerMessagesCnt = getValueUserMessagesCnt(account, taskCreator) | |
338 | 340 | let lastFreelancerMessage = getValueUserMessage(account, taskCreator, toString(freelancerMessagesCnt)) | |
339 | - | if (( | |
340 | - | then | |
341 | - | | |
342 | - | | |
343 | - | | |
344 | - | | |
345 | - | else if (( | |
346 | - | then throw(" | |
347 | - | else if (( | |
348 | - | then throw(" | |
349 | - | else | |
341 | + | if ((getValueUserBio(account) == NONE)) | |
342 | + | then throw("User not signup") | |
343 | + | else if ((getValueTaskAuthor(task) == account)) | |
344 | + | then throw("You are author") | |
345 | + | else if ((getValueTaskFreelancer(task) != account)) | |
346 | + | then throw("You are not freelancer") | |
347 | + | else if ((status != INPROGRESS)) | |
348 | + | then throw(("Status must be in progress, now: " + status)) | |
349 | + | else if ((getValueTaskFreelancer(task) == NONE)) | |
350 | + | then throw("Task freelancer doesnt exist") | |
351 | + | else WriteSet([DataEntry(getKeyTaskReportComplete(account, task, toString(stage)), freelancerMessagesCnt), DataEntry(getKeyTaskStatus(task), PENDING)]) | |
350 | 352 | } | |
351 | 353 | ||
352 | 354 | ||
353 | 355 | ||
354 | 356 | @Callable(i) | |
355 | 357 | func acceptWork (task,complete) = { | |
356 | 358 | let account = toBase58String(i.caller.bytes) | |
357 | 359 | let creator = getValueTaskAuthor(task) | |
358 | 360 | let freelancer = getValueTaskFreelancer(task) | |
359 | 361 | let stage = getValueTaskReportCompleteCnt(task, freelancer) | |
360 | 362 | let status = getValueTaskStatus(task) | |
361 | 363 | let bank = getValueTaskBank(task) | |
362 | - | if ((account == creator)) | |
363 | - | then if ((status == PENDING)) | |
364 | - | then if (complete) | |
365 | - | then ScriptResult(WriteSet([DataEntry(getKeyTaskStatus(task), COMPLETED), DataEntry(getKeyUserRating(freelancer), (getValueUserRating(freelancer) + 1)), DataEntry(getKeyUserRatingVote(account, freelancer), "positive"), DataEntry(getKeyTaskBank(task), "0")]), TransferSet([ScriptTransfer(addressFromStringValue(freelancer), bank, unit)])) | |
366 | - | else WriteSet([DataEntry(getKeyTaskStatus(task), INPROGRESS)]) | |
367 | - | else throw("Freelancer doesnt complete the task") | |
364 | + | if ((getValueUserBio(account) == NONE)) | |
365 | + | then throw("Sender not signup") | |
368 | 366 | else if ((getValueTaskData(task) == NONE)) | |
369 | 367 | then throw("Task doesnt exist") | |
370 | - | else if ((getValueUserBio(account) == NONE)) | |
371 | - | then throw("Sender not signup") | |
372 | - | else throw("You are not author") | |
368 | + | else if ((account != creator)) | |
369 | + | then throw("You are not author") | |
370 | + | else if ((status != PENDING)) | |
371 | + | then throw("Freelancer doesnt complete the task") | |
372 | + | else if (complete) | |
373 | + | then ScriptResult(WriteSet([DataEntry(getKeyTaskStatus(task), COMPLETED), DataEntry(getKeyUserRating(freelancer), (getValueUserRating(freelancer) + 1)), DataEntry(getKeyUserRatingVote(account, freelancer), "positive"), DataEntry(getKeyTaskBank(task), "0")]), TransferSet([ScriptTransfer(addressFromStringValue(freelancer), bank, unit)])) | |
374 | + | else WriteSet([DataEntry(getKeyTaskStatus(task), INPROGRESS)]) | |
373 | 375 | } | |
374 | 376 | ||
375 | 377 | ||
376 | 378 | ||
377 | 379 | @Callable(i) | |
378 | 380 | func moveDeadline (task,deadline) = { | |
379 | 381 | let account = toBase58String(i.caller.bytes) | |
380 | 382 | let creator = getValueTaskAuthor(task) | |
381 | 383 | let expiration = getValueTaskExpiration(task) | |
382 | 384 | let status = getValueTaskStatus(task) | |
383 | - | if ((status | |
385 | + | if ((status == COMPLETED)) | |
384 | 386 | then throw("The task is completed") | |
385 | 387 | else if ((status == INDISPUTE)) | |
386 | 388 | then throw("You can't change the deadline at this time") | |
387 | 389 | else if ((account != creator)) | |
388 | 390 | then throw("You are not author of the task") | |
389 | 391 | else if ((height > deadline)) | |
390 | 392 | then throw("The deadline must be > the current block") | |
391 | 393 | else if ((expiration > deadline)) | |
392 | 394 | then throw("The deadline can only be moved forward") | |
393 | 395 | else WriteSet([DataEntry(getKeyTaskExpiration(task), deadline)]) | |
394 | 396 | } | |
395 | 397 | ||
396 | 398 | ||
397 | 399 | ||
398 | 400 | @Callable(i) | |
399 | 401 | func voteTask (task,vote) = { | |
400 | 402 | let account = toBase58String(i.caller.bytes) | |
401 | 403 | if ((getValueUserBio(account) == NONE)) | |
402 | 404 | then throw("User not signup") | |
403 | 405 | else if ((getValueTaskAuthor(task) == account)) | |
404 | 406 | then throw("You cannot change the rating of a task") | |
405 | 407 | else if ((getValueTaskData(task) == NONE)) | |
406 | 408 | then throw("Task doesnt exist") | |
407 | 409 | else if ((getValueTaskStatus(task) != FEATURED)) | |
408 | 410 | then throw("Now you can’t lower the task rating") | |
409 | 411 | else if ((getValueTaskUserVoteRating(task, account) != NONE)) | |
410 | 412 | then throw("You have already voted") | |
411 | 413 | else if ((vote == "positive")) | |
412 | 414 | then WriteSet([DataEntry(getKeyTaskRating(task), (getValueTaskRating(task) + 1)), DataEntry(getKeyTaskUserVoteRating(task, account), "positive")]) | |
413 | 415 | else if ((vote == "negative")) | |
414 | 416 | then WriteSet([DataEntry(getKeyTaskRating(task), (getValueTaskRating(task) - 1)), DataEntry(getKeyTaskUserVoteRating(task, account), "negative")]) | |
415 | 417 | else throw("Use positive/negative only") | |
416 | 418 | } | |
417 | 419 | ||
418 | 420 | ||
419 | 421 | ||
420 | 422 | @Callable(i) | |
421 | 423 | func reportUser (user) = { | |
422 | 424 | let account = toBase58String(i.caller.bytes) | |
423 | 425 | if ((getValueUserBio(account) == NONE)) | |
424 | 426 | then throw("You not signup") | |
425 | 427 | else if ((getValueUserBio(user) == NONE)) | |
426 | 428 | then throw("User not signup") | |
427 | 429 | else if ((user == account)) | |
428 | 430 | then throw("You can't complain about yourself") | |
429 | 431 | else if ((getValueUserRatingVote(account, user) != NONE)) | |
430 | 432 | then throw("You have already voted") | |
431 | 433 | else WriteSet([DataEntry(getKeyUserRating(user), (getValueUserRating(user) - 1)), DataEntry(getKeyUserRatingVote(account, user), "negative")]) | |
432 | 434 | } | |
433 | 435 | ||
434 | 436 | ||
435 | 437 | ||
436 | 438 | @Callable(i) | |
437 | 439 | func openTaskDispute (task,message) = { | |
438 | 440 | let account = toBase58String(i.caller.bytes) | |
439 | 441 | let creator = getValueTaskAuthor(task) | |
440 | 442 | let freelancer = getValueTaskFreelancer(task) | |
441 | 443 | if ((getValueUserBio(account) == NONE)) | |
442 | 444 | then throw("You not signup") | |
443 | 445 | else if ((getValueTaskData(task) == NONE)) | |
444 | 446 | then throw("Task doesnt exist") | |
445 | 447 | else if (if ((account != creator)) | |
446 | 448 | then true | |
447 | 449 | else (account != freelancer)) | |
448 | 450 | then throw("You must be a freelancer or a customer of this task") | |
449 | 451 | else if ((getValueTaskStatus(task) == INDISPUTE)) | |
450 | 452 | then throw("Dispute already open") | |
451 | 453 | else WriteSet([DataEntry(getKeyTaskDispute(task), account), DataEntry(getKeyTaskDisputeMessage(task, account, "0"), message), DataEntry(getKeyTaskDisputeMessageBlock(task, account, "0"), height), DataEntry(getKeyTaskStatus(task), INDISPUTE)]) | |
452 | 454 | } | |
453 | 455 | ||
454 | 456 | ||
455 | 457 | ||
456 | 458 | @Callable(i) | |
457 | 459 | func voteTaskDispute (task,variant,message) = { | |
458 | 460 | let account = toBase58String(i.caller.bytes) | |
459 | 461 | let creator = getValueTaskAuthor(task) | |
460 | 462 | let freelancer = getValueTaskFreelancer(task) | |
461 | 463 | if ((getValueUserBio(account) == NONE)) | |
462 | 464 | then throw("You not signup") | |
463 | 465 | else if ((getValueTaskData(task) == NONE)) | |
464 | 466 | then throw("Task doesnt exist") | |
465 | 467 | else if ((getValueTaskDispute(task) == NONE)) | |
466 | 468 | then throw("Dispute doesnt exist") | |
467 | 469 | else if ((account == creator)) | |
468 | 470 | then throw("The creator of the task can not vote") | |
469 | 471 | else if ((account == freelancer)) | |
470 | 472 | then throw("The freelancer of the task can not vote") | |
471 | 473 | else if ((getValueTaskDisputeVoteVariant(task, account) != NONE)) | |
472 | 474 | then throw("You have already voted") | |
473 | 475 | else if ((variant == "customer")) | |
474 | 476 | then WriteSet([DataEntry(getKeyTaskDisputeVoteCustomer(task), (getValueTaskDisputeVoteCustomer(task) + 1)), DataEntry(getKeyTaskDisputeVoteVariant(task, account), "customer"), DataEntry(getKeyTaskDisputeComment(task, account), message), DataEntry(getKeyTaskDisputeCommentBlock(task, account), height)]) | |
475 | 477 | else if ((variant == "freelancer")) | |
476 | 478 | then WriteSet([DataEntry(getKeyTaskDisputeVoteFreelancer(task), (getValueTaskDisputeVoteFreelancer(task) + 1)), DataEntry(getKeyTaskDisputeVoteVariant(task, account), "freelancer"), DataEntry(getKeyTaskDisputeComment(task, account), message), DataEntry(getKeyTaskDisputeCommentBlock(task, account), height)]) | |
477 | 479 | else throw("Select one of the sides") | |
478 | 480 | } | |
479 | 481 | ||
480 | 482 | ||
481 | 483 | ||
482 | 484 | @Callable(i) | |
483 | 485 | func taskDisputeMessage (task,message) = { | |
484 | 486 | let account = toBase58String(i.caller.bytes) | |
485 | 487 | let creator = getValueTaskAuthor(task) | |
486 | 488 | let freelancer = getValueTaskFreelancer(task) | |
487 | 489 | let cnt = (getValueTaskDisputeMessagesCnt(task, account) + 1) | |
488 | 490 | if ((getValueUserBio(account) == NONE)) | |
489 | 491 | then throw("You not signup") | |
490 | 492 | else if ((getValueTaskData(task) == NONE)) | |
491 | 493 | then throw("Task doesnt exist") | |
492 | 494 | else if ((getValueTaskDispute(task) == NONE)) | |
493 | 495 | then throw("Dispute doesnt exist") | |
494 | 496 | else if (if ((account != creator)) | |
495 | 497 | then true | |
496 | 498 | else (account != freelancer)) | |
497 | 499 | then throw("You must be a freelancer or a customer of this task") | |
498 | 500 | else if ((getValueTaskStatus(task) != INDISPUTE)) | |
499 | 501 | then throw("You cannot send messages at this time") | |
500 | 502 | else WriteSet([DataEntry(getKeyTaskDisputeMessage(task, account, toString(cnt)), message), DataEntry(getKeyTaskDisputeMessageBlock(task, account, toString(cnt)), height)]) | |
501 | 503 | } | |
502 | 504 | ||
503 | 505 | ||
504 | 506 | ||
505 | 507 | @Callable(i) | |
506 | 508 | func cancelTask (task) = { | |
507 | 509 | let account = toBase58String(i.caller.bytes) | |
508 | 510 | let creator = getValueTaskAuthor(task) | |
509 | 511 | let bank = getValueTaskBank(task) | |
510 | 512 | if ((getValueUserBio(account) == NONE)) | |
511 | 513 | then throw("You not signup") | |
512 | 514 | else if ((getValueTaskData(task) == NONE)) | |
513 | 515 | then throw("Task doesnt exist") | |
514 | 516 | else if ((getValueTaskStatus(task) != FEATURED)) | |
515 | 517 | then throw("You can't cancel the task now") | |
516 | 518 | else if ((account != creator)) | |
517 | 519 | then throw("You are not author of the task") | |
518 | 520 | else ScriptResult(WriteSet([DataEntry(getKeyTaskStatus(task), CANCELED)]), TransferSet([ScriptTransfer(addressFromStringValue(creator), bank, unit)])) | |
519 | 521 | } | |
520 | 522 | ||
521 | 523 |
github/deemru/w8io/169f3d6 112.32 ms ◑