tx · 7rvQMyy4CtojGSToxHZYVY9okMpf53U8Fdwv8LiVYyex 3N2EM5HFgf6UMBnvcJX3Cegmozwdv1iDeq2: -0.01500000 Waves 2019.09.26 15:49 [693345] smart account 3N2EM5HFgf6UMBnvcJX3Cegmozwdv1iDeq2 > SELF 0.00000000 Waves
{ "type": 13, "id": "7rvQMyy4CtojGSToxHZYVY9okMpf53U8Fdwv8LiVYyex", "fee": 1500000, "feeAssetId": null, "timestamp": 1569502174703, "version": 1, "sender": "3N2EM5HFgf6UMBnvcJX3Cegmozwdv1iDeq2", "senderPublicKey": "8y2Uc9uYf5gRD6Dzm1aC73zYe3LZvtVDUVAnAhNdN2mg", "proofs": [ "3ffTPsgxk4GNmLoGeirFdRRptfH4LfVffTUy8QrXXmjSdEGQMauA4KuWc9sVjETDj4Yjw6ueESLAQ2DrwRtVF9jP" ], "script": "base64:AAIDAAAAAAAAAD8IARIDCgEIEgMKAQgSBQoDAQEIEgQKAggBEgQKAggIEgQKAggBEgMKAQgSAwoBCBIECgIICBIDCgEIEgMKAQgAAAAcAAAAAANkYXkAAAAAAAAABaAAAAAABVdBVkVTBQAAAAR1bml0AAAAAAR3QlRDAQAAACBs+mr/xe2qjAt/tSqT0qIML4KC23R6BIxT+/0TH3Og/wAAAAAEd0VVUgEAAAAg7BZhBF97kSFBBjs38+fX1Pjz08YOqoCX85C/0PoVupkAAAAABHdVU0QBAAAAIN0cvQHwz3UFMHgHsqi2OJjRRd1cH7ozWuNAb/pmWXD9AAAAAAlzdGF0ZU9wZW4CAAAABk9wZW5lZAAAAAAOc3RhdGVTdWdnZXN0ZWQCAAAACVN1Z2dlc3RlZAAAAAALc3RhdGVDYW5jZWwCAAAACENhbmNlbGVkAAAAAA9zdGF0ZUluUHJvZ3Jlc3MCAAAACkluUHJvZ3Jlc3MAAAAAEXN0YXRlV2FpdDRDb25maXJtAgAAABNXYWl0Rm9yQ29uZmlybWF0aW9uAAAAAA1zdGF0ZUNvbXBsZXRlAgAAAAlDb21w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AAAAnR4AQAAAAZ2ZXJpZnkAAAAAAwkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAIBQAAAAJ0eAAAAA9zZW5kZXJQdWJsaWNLZXkEAAAAByRtYXRjaDAFAAAAAnR4AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAABNUcmFuc2ZlclRyYW5zYWN0aW9uBAAAAAN0dHgFAAAAByRtYXRjaDAGAwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAABRTZXRTY3JpcHRUcmFuc2FjdGlvbgQAAAADc3R4BQAAAAckbWF0Y2gwBgcHFGZfiA==", "chainId": 84, "height": 693345, "spentComplexity": 0 } View: original | compacted Prev: B7LnJBzoDvajfnDqSFAPgQrKdDwUpRco2CnqWCvvSRxH Next: FgtBeHs5LpX3qTrV2Cim5CQ2PryMgAaToPSjLfzxth8x Diff:
Old | New | Differences | |
---|---|---|---|
80 | 80 | else throw("Incorrect Asset Id") | |
81 | 81 | ||
82 | 82 | ||
83 | - | func betPriceCheck (betPrice,auctionPrice) = if ((auctionPrice > betPrice)) | |
84 | - | then betPrice | |
85 | - | else throw(("Bet price must be lower than actual price. Actual price: " + toString(auctionPrice))) | |
86 | - | ||
87 | - | ||
88 | 83 | func timeCheck (currentTime,startTime,expirationTime) = ((currentTime - startTime) > expirationTime) | |
89 | 84 | ||
90 | 85 | ||
151 | 146 | @Callable(i) | |
152 | 147 | func createAuction (jobExecutionDays,auctionDurationDays,auctionInfo) = { | |
153 | 148 | let auctionId = toBase58String(i.transactionId) | |
154 | - | let | |
149 | + | let auctionClient = toBase58String(i.callerPublicKey) | |
155 | 150 | let pmt = extract(i.payment) | |
156 | 151 | let pmtAmount = pmt.amount | |
157 | 152 | let auctionPrice = if ((pmtAmount > 0)) | |
170 | 165 | then "USD" | |
171 | 166 | else throw("AssetId is incorrect") | |
172 | 167 | let newFreezedBalance = increaseFreezedBalance(pmtAssetName, auctionPrice) | |
173 | - | WriteSet([DataEntry( | |
168 | + | WriteSet([DataEntry((auctionId + "_State"), auctionId), DataEntry((auctionId + "_Info"), auctionInfo), DataEntry((auctionId + "_Client"), auctionClient), DataEntry((auctionId + "_AuctionStart"), auctionStart), DataEntry((auctionId + "_AuctionDuration"), auctionDurationBlocks), DataEntry((auctionId + "JobPerformance"), blocksForExecution), DataEntry((auctionId + "_AssetName"), pmtAssetName), DataEntry((auctionId + "_Price"), auctionPrice), DataEntry((pmtAssetName + "_Freezed"), newFreezedBalance)]) | |
174 | 169 | } | |
175 | 170 | ||
176 | 171 | ||
179 | 174 | func makeBid (auctionId,betPrice) = { | |
180 | 175 | let callerPub = toBase58String(i.callerPublicKey) | |
181 | 176 | let betTime = height | |
182 | - | let AuctionIdKey = AuctionIdDataKey(auctionId) | |
183 | - | let auctionDataList = getDataList(AuctionIdKey) | |
184 | - | let auctionState = auctionDataList[0] | |
185 | - | let auctionInfo = auctionDataList[1] | |
186 | - | let auctionCustomer = fromBase58String(auctionDataList[2]) | |
187 | - | let auctionStart = parseIntValue(auctionDataList[3]) | |
188 | - | let auctionDuration = parseIntValue(auctionDataList[4]) | |
189 | - | let auctionBlocksForExecution = parseIntValue(auctionDataList[5]) | |
190 | - | let auctionAssetName = auctionDataList[6] | |
191 | - | let auctionPrice = parseIntValue(auctionDataList[7]) | |
177 | + | let auctionState = { | |
178 | + | let valueState = getString(this, (auctionId + "_State")) | |
179 | + | match valueState { | |
180 | + | case a: String => | |
181 | + | a | |
182 | + | case _ => | |
183 | + | throw("Auction State was not found") | |
184 | + | } | |
185 | + | } | |
186 | + | let auctionInfo = { | |
187 | + | let valueAuctionInfo = getString(this, (auctionId + "_Info")) | |
188 | + | match valueAuctionInfo { | |
189 | + | case a: String => | |
190 | + | a | |
191 | + | case _ => | |
192 | + | throw("Auction info was not found") | |
193 | + | } | |
194 | + | } | |
195 | + | let auctionClient = { | |
196 | + | let valueClient = getString(this, (auctionId + "_Client")) | |
197 | + | let a = match valueClient { | |
198 | + | case a: String => | |
199 | + | a | |
200 | + | case _ => | |
201 | + | throw("Auction Client was not found") | |
202 | + | } | |
203 | + | fromBase58String(a) | |
204 | + | } | |
205 | + | let auctionStart = { | |
206 | + | let valueAuctionStart = getInteger(this, (auctionId + "_AuctionStart")) | |
207 | + | match valueAuctionStart { | |
208 | + | case a: Int => | |
209 | + | a | |
210 | + | case _ => | |
211 | + | throw("Auction Start time was not found") | |
212 | + | } | |
213 | + | } | |
214 | + | let auctionDuration = { | |
215 | + | let valueauctionDuration = getInteger(this, (auctionId + "_AuctionDuration")) | |
216 | + | match valueauctionDuration { | |
217 | + | case a: Int => | |
218 | + | a | |
219 | + | case _ => | |
220 | + | throw("Auction duration time was not found") | |
221 | + | } | |
222 | + | } | |
223 | + | let auctionBlocksForExecution = { | |
224 | + | let valueBlocksForExecution = getInteger(this, (auctionId + "JobPerformance")) | |
225 | + | match valueBlocksForExecution { | |
226 | + | case a: Int => | |
227 | + | a | |
228 | + | case _ => | |
229 | + | throw("Auction job performance time was not found") | |
230 | + | } | |
231 | + | } | |
232 | + | let auctionAssetName = { | |
233 | + | let valueAssetName = getString(this, (auctionId + "_AssetName")) | |
234 | + | match valueAssetName { | |
235 | + | case a: String => | |
236 | + | a | |
237 | + | case _ => | |
238 | + | throw("Auction asset name was not found") | |
239 | + | } | |
240 | + | } | |
241 | + | let auctionPrice = { | |
242 | + | let valuePrice = getInteger(this, (auctionId + "_Price")) | |
243 | + | match valuePrice { | |
244 | + | case a: Int => | |
245 | + | a | |
246 | + | case _ => | |
247 | + | throw("Auction price was not found") | |
248 | + | } | |
249 | + | } | |
192 | 250 | let auctionAssetId58 = AssetNameToBase58(auctionAssetName) | |
193 | - | let newBid = betPriceCheck(betPrice, auctionPrice) | |
194 | 251 | let newFreelancer = freelancerIsRegistered(callerPub) | |
195 | 252 | let dAppCommission = ((auctionPrice * 3) / 100) | |
196 | 253 | let newFreezedBalance = decreaseFreezedBalance(auctionAssetName, auctionPrice) | |
197 | 254 | let auctionTimeisOver = timeCheck(betTime, auctionStart, auctionDuration) | |
198 | 255 | if (auctionTimeisOver) | |
199 | 256 | then if ((auctionState == stateOpen)) | |
200 | - | then ScriptResult(WriteSet([DataEntry( | |
257 | + | then ScriptResult(WriteSet([DataEntry((auctionId + "_State"), stateCancel), DataEntry((auctionAssetName + "_Freezed"), newFreezedBalance)]), TransferSet([ScriptTransfer(addressFromPublicKey(auctionClient), (auctionPrice - dAppCommission), auctionAssetId58)])) | |
201 | 258 | else if ((auctionState == stateSuggested)) | |
202 | 259 | then { | |
203 | - | let auctionFreelancer = auctionDataList[8] | |
204 | - | WriteSet([DataEntry(AuctionIdKey, ((((((((((((((((stateInProgress + "_") + auctionInfo) + "_") + toBase58String(auctionCustomer)) + "_") + toString(auctionStart)) + "_") + toString(auctionDuration)) + "_") + toString(auctionBlocksForExecution)) + "_") + auctionAssetName) + "_") + toString(auctionPrice)) + "_") + auctionFreelancer))]) | |
260 | + | let auctionLowestBidder = { | |
261 | + | let valueLowestBidder = getString(this, (auctionId + "_LowestBidderPub")) | |
262 | + | match valueLowestBidder { | |
263 | + | case a: String => | |
264 | + | a | |
265 | + | case _ => | |
266 | + | throw("Auction lowest bidder was not found") | |
267 | + | } | |
268 | + | } | |
269 | + | let newAuctionPrice = { | |
270 | + | let valueNewAuctionPrice = getInteger(this, ((auctionId + "_Bid_") + auctionLowestBidder)) | |
271 | + | match valueNewAuctionPrice { | |
272 | + | case a: Int => | |
273 | + | a | |
274 | + | case _ => | |
275 | + | throw("Auction lowest bid was not found") | |
276 | + | } | |
277 | + | } | |
278 | + | let amountDifference = ((auctionPrice - newAuctionPrice) - dAppCommission) | |
279 | + | ScriptResult(WriteSet([DataEntry((auctionId + "_State"), stateInProgress), DataEntry((auctionId + "_Freelancer"), auctionLowestBidder), DataEntry((auctionId + "_Price"), newAuctionPrice)]), TransferSet([ScriptTransfer(addressFromPublicKey(auctionClient), amountDifference, auctionAssetId58)])) | |
205 | 280 | } | |
206 | 281 | else throw("Incorrect auction state") | |
207 | 282 | else if ((auctionState == stateOpen)) | |
208 | - | then WriteSet([DataEntry(((auctionId + "_") + newFreelancer), betPrice), DataEntry( | |
283 | + | then WriteSet([DataEntry(((auctionId + "_Bid_") + newFreelancer), betPrice), DataEntry((auctionId + "_State"), stateSuggested), DataEntry((auctionId + "_LowestBidderPub"), callerPub), DataEntry((auctionId + callerPub), betPrice)]) | |
209 | 284 | else if ((auctionState == stateSuggested)) | |
210 | 285 | then { | |
211 | - | let auctionLowestBidder = auctionDataList[8] | |
212 | - | let newAuctionLowestBidder = { | |
213 | - | let keyCurrentLowestBid = ((auctionId + "_") + auctionLowestBidder) | |
214 | - | let valueCurrentLowestBid = getInteger(this, keyCurrentLowestBid) | |
286 | + | let currentLowestBidderPub = { | |
287 | + | let lowestBidder = getString(this, (auctionId + "_LowestBidderPub")) | |
288 | + | match lowestBidder { | |
289 | + | case a: String => | |
290 | + | a | |
291 | + | case _ => | |
292 | + | throw("Auction lowest bidder was not found") | |
293 | + | } | |
294 | + | } | |
295 | + | let newLowestBidderPub = { | |
296 | + | let valueCurrentLowestBid = getInteger(this, ((auctionId + "_Bid_") + currentLowestBidderPub)) | |
215 | 297 | let currentLowestBid = match valueCurrentLowestBid { | |
216 | 298 | case a: Int => | |
217 | 299 | a | |
218 | 300 | case _ => | |
219 | - | throw(" | |
301 | + | throw("Auction lowest bid was not found") | |
220 | 302 | } | |
221 | - | if ((currentLowestBid > | |
303 | + | if ((currentLowestBid > betPrice)) | |
222 | 304 | then newFreelancer | |
223 | - | else | |
305 | + | else currentLowestBidderPub | |
224 | 306 | } | |
225 | - | WriteSet([DataEntry(((auctionId + "_Bid_") + | |
307 | + | WriteSet([DataEntry((auctionId + "_LowestBidderPub"), newLowestBidderPub), DataEntry(((auctionId + "_Bid_") + newFreelancer), betPrice)]) | |
226 | 308 | } | |
227 | 309 | else throw(((((("Incorrect jobId state. Now: " + auctionState) + ", must be: ") + stateOpen) + " or ") + stateSuggested)) | |
228 | 310 | } | |
233 | 315 | func chooseFreelancer (auctionId,freelancerPub) = { | |
234 | 316 | let callerPub = extract(i.callerPublicKey) | |
235 | 317 | let betTime = height | |
236 | - | let AuctionIdKey = AuctionIdDataKey(auctionId) | |
237 | - | let auctionDataList = getDataList(AuctionIdKey) | |
238 | - | let auctionState = auctionDataList[0] | |
239 | - | let auctionInfo = auctionDataList[1] | |
240 | - | let auctionCustomer = fromBase58String(auctionDataList[2]) | |
241 | - | let auctionStart = parseIntValue(auctionDataList[3]) | |
242 | - | let auctionDuration = parseIntValue(auctionDataList[4]) | |
243 | - | let auctionBlocksForExecution = parseIntValue(auctionDataList[5]) | |
244 | - | let auctionAssetName = auctionDataList[6] | |
245 | - | let auctionPrice = parseIntValue(auctionDataList[7]) | |
318 | + | let auctionState = { | |
319 | + | let valueState = getString(this, (auctionId + "_State")) | |
320 | + | match valueState { | |
321 | + | case a: String => | |
322 | + | a | |
323 | + | case _ => | |
324 | + | throw("Auction State was not found") | |
325 | + | } | |
326 | + | } | |
327 | + | let auctionClient = { | |
328 | + | let valueClient = getString(this, (auctionId + "_Client")) | |
329 | + | let a = match valueClient { | |
330 | + | case a: String => | |
331 | + | a | |
332 | + | case _ => | |
333 | + | throw("Auction Client was not found") | |
334 | + | } | |
335 | + | fromBase58String(a) | |
336 | + | } | |
337 | + | let auctionStart = { | |
338 | + | let valueAuctionStart = getInteger(this, (auctionId + "_AuctionStart")) | |
339 | + | match valueAuctionStart { | |
340 | + | case a: Int => | |
341 | + | a | |
342 | + | case _ => | |
343 | + | throw("Auction Start time was not found") | |
344 | + | } | |
345 | + | } | |
346 | + | let auctionDuration = { | |
347 | + | let valueauctionDuration = getInteger(this, (auctionId + "_AuctionDuration")) | |
348 | + | match valueauctionDuration { | |
349 | + | case a: Int => | |
350 | + | a | |
351 | + | case _ => | |
352 | + | throw("Auction duration time was not found") | |
353 | + | } | |
354 | + | } | |
355 | + | let auctionAssetName = { | |
356 | + | let valueAssetName = getString(this, (auctionId + "_AssetName")) | |
357 | + | match valueAssetName { | |
358 | + | case a: String => | |
359 | + | a | |
360 | + | case _ => | |
361 | + | throw("Auction asset name was not found") | |
362 | + | } | |
363 | + | } | |
364 | + | let auctionPrice = { | |
365 | + | let valuePrice = getInteger(this, (auctionId + "_Price")) | |
366 | + | match valuePrice { | |
367 | + | case a: Int => | |
368 | + | a | |
369 | + | case _ => | |
370 | + | throw("Auction price was not found") | |
371 | + | } | |
372 | + | } | |
246 | 373 | let auctionAssetId58 = AssetNameToBase58(auctionAssetName) | |
247 | - | let | |
374 | + | let freelancerBidAmount = { | |
248 | 375 | let keyFreelancerBid = ((auctionId + "_") + freelancerPub) | |
249 | 376 | let valueFreelacerBid = getInteger(this, keyFreelancerBid) | |
250 | 377 | match valueFreelacerBid { | |
254 | 381 | throw("Freelancer's bet was not found") | |
255 | 382 | } | |
256 | 383 | } | |
384 | + | let newFreezedBalance = decreaseFreezedBalance(auctionAssetName, auctionPrice) | |
257 | 385 | let dAppCommission = ((auctionPrice * 3) / 100) | |
258 | - | let amountDifference = ((auctionPrice - | |
386 | + | let amountDifference = ((auctionPrice - freelancerBidAmount) - dAppCommission) | |
259 | 387 | let auctionTimeisOver = timeCheck(betTime, auctionStart, auctionDuration) | |
260 | - | if ((callerPub == | |
388 | + | if ((callerPub == auctionClient)) | |
261 | 389 | then if (auctionTimeisOver) | |
262 | 390 | then if ((auctionState == stateOpen)) | |
263 | - | then ScriptResult(WriteSet([DataEntry( | |
391 | + | then ScriptResult(WriteSet([DataEntry((auctionId + "_State"), stateCancel), DataEntry((auctionAssetName + "_Freezed"), newFreezedBalance)]), TransferSet([ScriptTransfer(addressFromPublicKey(auctionClient), (auctionPrice - dAppCommission), auctionAssetId58)])) | |
264 | 392 | else if ((auctionState == stateSuggested)) | |
265 | - | then WriteSet([DataEntry(AuctionIdKey, ((((((((((((((stateInProgress + "_") + auctionInfo) + "_") + toBase58String(auctionCustomer)) + "_") + toString(auctionStart)) + "_") + toString(auctionDuration)) + "_") + toString(auctionBlocksForExecution)) + "_") + auctionAssetName) + "_") + toString(auctionPrice)))]) | |
393 | + | then { | |
394 | + | let auctionLowestBidder = { | |
395 | + | let valueLowestBidder = getString(this, (auctionId + "_LowestBidderPub")) | |
396 | + | match valueLowestBidder { | |
397 | + | case a: String => | |
398 | + | a | |
399 | + | case _ => | |
400 | + | throw("Auction lowest bidder was not found") | |
401 | + | } | |
402 | + | } | |
403 | + | let newAuctionPrice = { | |
404 | + | let valueNewAuctionPrice = getInteger(this, ((auctionId + "_Bid_") + auctionLowestBidder)) | |
405 | + | match valueNewAuctionPrice { | |
406 | + | case a: Int => | |
407 | + | a | |
408 | + | case _ => | |
409 | + | throw("Auction lowest bid was not found") | |
410 | + | } | |
411 | + | } | |
412 | + | WriteSet([DataEntry((auctionId + "_State"), stateInProgress), DataEntry((auctionId + "_Freelancer"), auctionLowestBidder), DataEntry((auctionId + "_Price"), newAuctionPrice)]) | |
413 | + | } | |
266 | 414 | else throw("Incorrect auction state") | |
267 | - | else ScriptResult(WriteSet([DataEntry(AuctionIdKey, ((((((((((((((((stateInProgress + "_") + auctionInfo) + "_") + toBase58String(auctionCustomer)) + "_") + toString(auctionStart)) + "_") + toString(auctionDuration)) + "_") + toString(auctionBlocksForExecution)) + "_") + auctionAssetName) + "_") + toString(FreelancerBidAmount)) + "_") + freelancerPub))]), TransferSet([ScriptTransfer(addressFromPublicKey(auctionCustomer), amountDifference, auctionAssetId58)])) | |
415 | + | else { | |
416 | + | let setNewFreelancer = { | |
417 | + | let newFreelancer = getInteger(this, ((auctionId + "_Bid_") + freelancerPub)) | |
418 | + | match newFreelancer { | |
419 | + | case a: Int => | |
420 | + | freelancerPub | |
421 | + | case _ => | |
422 | + | throw("Error: Incorrect freelancerPub") | |
423 | + | } | |
424 | + | } | |
425 | + | let setNewPrice = { | |
426 | + | let lowestBidder = getInteger(this, ((auctionId + "_Bid_") + freelancerPub)) | |
427 | + | match lowestBidder { | |
428 | + | case a: Int => | |
429 | + | a | |
430 | + | case _ => | |
431 | + | throw("Auction lowest bidder was not found") | |
432 | + | } | |
433 | + | } | |
434 | + | ScriptResult(WriteSet([DataEntry((auctionId + "_State"), stateInProgress), DataEntry((auctionId + "_Freelancer"), setNewFreelancer), DataEntry((auctionId + "_Price"), setNewPrice)]), TransferSet([ScriptTransfer(addressFromPublicKey(auctionClient), amountDifference, auctionAssetId58)])) | |
435 | + | } | |
268 | 436 | else throw("Only auction customer can choose a freelancer") | |
269 | 437 | } | |
270 | 438 | ||
276 | 444 | let AuctionIdKey = AuctionIdDataKey(auctionId) | |
277 | 445 | let auctionDataList = getDataList(AuctionIdKey) | |
278 | 446 | let auctionState = auctionDataList[0] | |
279 | - | let auctionInfo = auctionDataList[1] | |
280 | - | let auctionCustomer = fromBase58String(auctionDataList[2]) | |
447 | + | let auctionClient = { | |
448 | + | let valueClient = getString(this, (auctionId + "_Client")) | |
449 | + | let a = match valueClient { | |
450 | + | case a: String => | |
451 | + | a | |
452 | + | case _ => | |
453 | + | throw("Auction Client was not found") | |
454 | + | } | |
455 | + | fromBase58String(a) | |
456 | + | } | |
281 | 457 | let auctionStart = parseIntValue(auctionDataList[3]) | |
282 | 458 | let auctionDuration = parseIntValue(auctionDataList[4]) | |
283 | 459 | let auctionBlocksForExecution = parseIntValue(auctionDataList[5]) | |
289 | 465 | then newAuctionBlocksForExecution | |
290 | 466 | else throw("New execution time must more than current execution time") | |
291 | 467 | } | |
292 | - | if ((caller == | |
468 | + | if ((caller == auctionClient)) | |
293 | 469 | then if ((auctionState == stateOpen)) | |
294 | - | then WriteSet([DataEntry(AuctionIdKey, (((((((((((( | |
470 | + | then WriteSet([DataEntry(AuctionIdKey, ((((((((((((auctionState + "_") + toBase58String(auctionClient)) + "_") + toString(auctionStart)) + "_") + toString(auctionDuration)) + "_") + toString(auctionBlocksForExecution)) + "_") + auctionAssetName) + "_") + toString(auctionPrice)))]) | |
295 | 471 | else if (if ((auctionState == stateSuggested)) | |
296 | 472 | then true | |
297 | 473 | else (auctionState == stateInProgress)) | |
298 | 474 | then { | |
299 | 475 | let freelancerPub = auctionDataList[7] | |
300 | - | WriteSet([DataEntry(AuctionIdKey, (((((((((((((( | |
476 | + | WriteSet([DataEntry(AuctionIdKey, ((((((((((((((auctionState + "_") + toBase58String(auctionClient)) + "_") + toString(auctionStart)) + "_") + toString(auctionDuration)) + "_") + toString(auctionBlocksForExecution)) + "_") + auctionAssetName) + "_") + toString(auctionPrice)) + "_") + freelancerPub))]) | |
301 | 477 | } | |
302 | 478 | else throw("Incorrect state") | |
303 | 479 | else throw("Only customer can increase execution time") |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 3 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let day = 1440 | |
5 | 5 | ||
6 | 6 | let WAVES = unit | |
7 | 7 | ||
8 | 8 | let wBTC = base58'8LQW8f7P5d5PZM7GtZEBgaqRPGSzS3DfPuiXrURJ4AJS' | |
9 | 9 | ||
10 | 10 | let wEUR = base58'Gtb1WRznfchDnTh37ezoDTJ4wcoKaRsKqKjJjy7nm2zU' | |
11 | 11 | ||
12 | 12 | let wUSD = base58'Ft8X1v1LTa1ABafufpaCWyVj8KkaxUWE6xBhW6sNFJck' | |
13 | 13 | ||
14 | 14 | let stateOpen = "Opened" | |
15 | 15 | ||
16 | 16 | let stateSuggested = "Suggested" | |
17 | 17 | ||
18 | 18 | let stateCancel = "Canceled" | |
19 | 19 | ||
20 | 20 | let stateInProgress = "InProgress" | |
21 | 21 | ||
22 | 22 | let stateWait4Confirm = "WaitForConfirmation" | |
23 | 23 | ||
24 | 24 | let stateComplete = "Completed" | |
25 | 25 | ||
26 | 26 | let stateDispute = "Dispute" | |
27 | 27 | ||
28 | 28 | let stateDisputeResolved = "DisputeResolved" | |
29 | 29 | ||
30 | 30 | let customer = "CMR" | |
31 | 31 | ||
32 | 32 | let freelancer = "FL" | |
33 | 33 | ||
34 | 34 | let ambassador1 = base58'1' | |
35 | 35 | ||
36 | 36 | let ambassador2 = base58'1' | |
37 | 37 | ||
38 | 38 | let ambassador3 = base58'1' | |
39 | 39 | ||
40 | 40 | let ambassador4 = base58'1' | |
41 | 41 | ||
42 | 42 | let ambassador5 = base58'1' | |
43 | 43 | ||
44 | 44 | func AuctionIdDataKey (auctionId) = (auctionId + "_AuctionData") | |
45 | 45 | ||
46 | 46 | ||
47 | 47 | func getDataList (auctionId) = { | |
48 | 48 | let getDataString = getString(this, auctionId) | |
49 | 49 | let a = match getDataString { | |
50 | 50 | case a: String => | |
51 | 51 | a | |
52 | 52 | case _ => | |
53 | 53 | throw("AuctionId was not found") | |
54 | 54 | } | |
55 | 55 | split(a, "_") | |
56 | 56 | } | |
57 | 57 | ||
58 | 58 | ||
59 | 59 | func getDisputeDataList (auctionId) = { | |
60 | 60 | let keyDisputeData = ((auctionId + "_") + stateDispute) | |
61 | 61 | let getDisputeDataString = getString(this, keyDisputeData) | |
62 | 62 | let a = match getDisputeDataString { | |
63 | 63 | case a: String => | |
64 | 64 | a | |
65 | 65 | case _ => | |
66 | 66 | throw("Dispute data was not found") | |
67 | 67 | } | |
68 | 68 | split(a, "/") | |
69 | 69 | } | |
70 | 70 | ||
71 | 71 | ||
72 | 72 | func AssetNameToBase58 (auctionAssetName) = if ((auctionAssetName == "WAVES")) | |
73 | 73 | then WAVES | |
74 | 74 | else if ((auctionAssetName == "BTC")) | |
75 | 75 | then wBTC | |
76 | 76 | else if ((auctionAssetName == "EUR")) | |
77 | 77 | then wEUR | |
78 | 78 | else if ((auctionAssetName == "USD")) | |
79 | 79 | then wUSD | |
80 | 80 | else throw("Incorrect Asset Id") | |
81 | 81 | ||
82 | 82 | ||
83 | - | func betPriceCheck (betPrice,auctionPrice) = if ((auctionPrice > betPrice)) | |
84 | - | then betPrice | |
85 | - | else throw(("Bet price must be lower than actual price. Actual price: " + toString(auctionPrice))) | |
86 | - | ||
87 | - | ||
88 | 83 | func timeCheck (currentTime,startTime,expirationTime) = ((currentTime - startTime) > expirationTime) | |
89 | 84 | ||
90 | 85 | ||
91 | 86 | func increaseFreezedBalance (pmtAssetName,auctionPrice) = { | |
92 | 87 | let keyFreezedFunds = getInteger(this, (pmtAssetName + "_Freezed")) | |
93 | 88 | let currentFreezedBalance = match keyFreezedFunds { | |
94 | 89 | case a: Int => | |
95 | 90 | a | |
96 | 91 | case _ => | |
97 | 92 | 0 | |
98 | 93 | } | |
99 | 94 | (currentFreezedBalance + auctionPrice) | |
100 | 95 | } | |
101 | 96 | ||
102 | 97 | ||
103 | 98 | func decreaseFreezedBalance (pmtAssetName,auctionPrice) = { | |
104 | 99 | let keyFreezedFunds = getInteger(this, (pmtAssetName + "_Freezed")) | |
105 | 100 | let currentFreezedBalance = match keyFreezedFunds { | |
106 | 101 | case a: Int => | |
107 | 102 | a | |
108 | 103 | case _ => | |
109 | 104 | 0 | |
110 | 105 | } | |
111 | 106 | let a = (currentFreezedBalance - auctionPrice) | |
112 | 107 | if ((a > 0)) | |
113 | 108 | then a | |
114 | 109 | else throw("Freezed amount couldn't be less than 0") | |
115 | 110 | } | |
116 | 111 | ||
117 | 112 | ||
118 | 113 | func freelancerIsRegistered (callerPub) = { | |
119 | 114 | let freelancerIsRegistered = getString(this, (callerPub + "_Freelancer")) | |
120 | 115 | match freelancerIsRegistered { | |
121 | 116 | case a: String => | |
122 | 117 | callerPub | |
123 | 118 | case _ => | |
124 | 119 | throw("Only registered users can make bets") | |
125 | 120 | } | |
126 | 121 | } | |
127 | 122 | ||
128 | 123 | ||
129 | 124 | @Callable(i) | |
130 | 125 | func freelancerSignUp (info) = { | |
131 | 126 | let userPublicKey = toBase58String(i.callerPublicKey) | |
132 | 127 | let alreadyRegistered = getString(this, (userPublicKey + "_Freelancer")) | |
133 | 128 | if (isDefined(alreadyRegistered)) | |
134 | 129 | then throw("User already registered") | |
135 | 130 | else WriteSet([DataEntry((userPublicKey + "_Freelancer"), info)]) | |
136 | 131 | } | |
137 | 132 | ||
138 | 133 | ||
139 | 134 | ||
140 | 135 | @Callable(i) | |
141 | 136 | func clientSignUp (info) = { | |
142 | 137 | let userPublicKey = toBase58String(i.callerPublicKey) | |
143 | 138 | let alreadyRegistered = getString(this, (userPublicKey + "_Client")) | |
144 | 139 | if (isDefined(alreadyRegistered)) | |
145 | 140 | then throw("User already registered") | |
146 | 141 | else WriteSet([DataEntry((userPublicKey + "_Client"), info)]) | |
147 | 142 | } | |
148 | 143 | ||
149 | 144 | ||
150 | 145 | ||
151 | 146 | @Callable(i) | |
152 | 147 | func createAuction (jobExecutionDays,auctionDurationDays,auctionInfo) = { | |
153 | 148 | let auctionId = toBase58String(i.transactionId) | |
154 | - | let | |
149 | + | let auctionClient = toBase58String(i.callerPublicKey) | |
155 | 150 | let pmt = extract(i.payment) | |
156 | 151 | let pmtAmount = pmt.amount | |
157 | 152 | let auctionPrice = if ((pmtAmount > 0)) | |
158 | 153 | then pmtAmount | |
159 | 154 | else throw("Amount must be higher then 0") | |
160 | 155 | let auctionStart = height | |
161 | 156 | let auctionDurationBlocks = (auctionDurationDays * day) | |
162 | 157 | let blocksForExecution = (jobExecutionDays * day) | |
163 | 158 | let pmtAssetName = if (!(isDefined(pmt.assetId))) | |
164 | 159 | then "WAVES" | |
165 | 160 | else if ((pmt.assetId == wBTC)) | |
166 | 161 | then "BTC" | |
167 | 162 | else if ((pmt.assetId == wEUR)) | |
168 | 163 | then "EUR" | |
169 | 164 | else if ((pmt.assetId == wUSD)) | |
170 | 165 | then "USD" | |
171 | 166 | else throw("AssetId is incorrect") | |
172 | 167 | let newFreezedBalance = increaseFreezedBalance(pmtAssetName, auctionPrice) | |
173 | - | WriteSet([DataEntry( | |
168 | + | WriteSet([DataEntry((auctionId + "_State"), auctionId), DataEntry((auctionId + "_Info"), auctionInfo), DataEntry((auctionId + "_Client"), auctionClient), DataEntry((auctionId + "_AuctionStart"), auctionStart), DataEntry((auctionId + "_AuctionDuration"), auctionDurationBlocks), DataEntry((auctionId + "JobPerformance"), blocksForExecution), DataEntry((auctionId + "_AssetName"), pmtAssetName), DataEntry((auctionId + "_Price"), auctionPrice), DataEntry((pmtAssetName + "_Freezed"), newFreezedBalance)]) | |
174 | 169 | } | |
175 | 170 | ||
176 | 171 | ||
177 | 172 | ||
178 | 173 | @Callable(i) | |
179 | 174 | func makeBid (auctionId,betPrice) = { | |
180 | 175 | let callerPub = toBase58String(i.callerPublicKey) | |
181 | 176 | let betTime = height | |
182 | - | let AuctionIdKey = AuctionIdDataKey(auctionId) | |
183 | - | let auctionDataList = getDataList(AuctionIdKey) | |
184 | - | let auctionState = auctionDataList[0] | |
185 | - | let auctionInfo = auctionDataList[1] | |
186 | - | let auctionCustomer = fromBase58String(auctionDataList[2]) | |
187 | - | let auctionStart = parseIntValue(auctionDataList[3]) | |
188 | - | let auctionDuration = parseIntValue(auctionDataList[4]) | |
189 | - | let auctionBlocksForExecution = parseIntValue(auctionDataList[5]) | |
190 | - | let auctionAssetName = auctionDataList[6] | |
191 | - | let auctionPrice = parseIntValue(auctionDataList[7]) | |
177 | + | let auctionState = { | |
178 | + | let valueState = getString(this, (auctionId + "_State")) | |
179 | + | match valueState { | |
180 | + | case a: String => | |
181 | + | a | |
182 | + | case _ => | |
183 | + | throw("Auction State was not found") | |
184 | + | } | |
185 | + | } | |
186 | + | let auctionInfo = { | |
187 | + | let valueAuctionInfo = getString(this, (auctionId + "_Info")) | |
188 | + | match valueAuctionInfo { | |
189 | + | case a: String => | |
190 | + | a | |
191 | + | case _ => | |
192 | + | throw("Auction info was not found") | |
193 | + | } | |
194 | + | } | |
195 | + | let auctionClient = { | |
196 | + | let valueClient = getString(this, (auctionId + "_Client")) | |
197 | + | let a = match valueClient { | |
198 | + | case a: String => | |
199 | + | a | |
200 | + | case _ => | |
201 | + | throw("Auction Client was not found") | |
202 | + | } | |
203 | + | fromBase58String(a) | |
204 | + | } | |
205 | + | let auctionStart = { | |
206 | + | let valueAuctionStart = getInteger(this, (auctionId + "_AuctionStart")) | |
207 | + | match valueAuctionStart { | |
208 | + | case a: Int => | |
209 | + | a | |
210 | + | case _ => | |
211 | + | throw("Auction Start time was not found") | |
212 | + | } | |
213 | + | } | |
214 | + | let auctionDuration = { | |
215 | + | let valueauctionDuration = getInteger(this, (auctionId + "_AuctionDuration")) | |
216 | + | match valueauctionDuration { | |
217 | + | case a: Int => | |
218 | + | a | |
219 | + | case _ => | |
220 | + | throw("Auction duration time was not found") | |
221 | + | } | |
222 | + | } | |
223 | + | let auctionBlocksForExecution = { | |
224 | + | let valueBlocksForExecution = getInteger(this, (auctionId + "JobPerformance")) | |
225 | + | match valueBlocksForExecution { | |
226 | + | case a: Int => | |
227 | + | a | |
228 | + | case _ => | |
229 | + | throw("Auction job performance time was not found") | |
230 | + | } | |
231 | + | } | |
232 | + | let auctionAssetName = { | |
233 | + | let valueAssetName = getString(this, (auctionId + "_AssetName")) | |
234 | + | match valueAssetName { | |
235 | + | case a: String => | |
236 | + | a | |
237 | + | case _ => | |
238 | + | throw("Auction asset name was not found") | |
239 | + | } | |
240 | + | } | |
241 | + | let auctionPrice = { | |
242 | + | let valuePrice = getInteger(this, (auctionId + "_Price")) | |
243 | + | match valuePrice { | |
244 | + | case a: Int => | |
245 | + | a | |
246 | + | case _ => | |
247 | + | throw("Auction price was not found") | |
248 | + | } | |
249 | + | } | |
192 | 250 | let auctionAssetId58 = AssetNameToBase58(auctionAssetName) | |
193 | - | let newBid = betPriceCheck(betPrice, auctionPrice) | |
194 | 251 | let newFreelancer = freelancerIsRegistered(callerPub) | |
195 | 252 | let dAppCommission = ((auctionPrice * 3) / 100) | |
196 | 253 | let newFreezedBalance = decreaseFreezedBalance(auctionAssetName, auctionPrice) | |
197 | 254 | let auctionTimeisOver = timeCheck(betTime, auctionStart, auctionDuration) | |
198 | 255 | if (auctionTimeisOver) | |
199 | 256 | then if ((auctionState == stateOpen)) | |
200 | - | then ScriptResult(WriteSet([DataEntry( | |
257 | + | then ScriptResult(WriteSet([DataEntry((auctionId + "_State"), stateCancel), DataEntry((auctionAssetName + "_Freezed"), newFreezedBalance)]), TransferSet([ScriptTransfer(addressFromPublicKey(auctionClient), (auctionPrice - dAppCommission), auctionAssetId58)])) | |
201 | 258 | else if ((auctionState == stateSuggested)) | |
202 | 259 | then { | |
203 | - | let auctionFreelancer = auctionDataList[8] | |
204 | - | WriteSet([DataEntry(AuctionIdKey, ((((((((((((((((stateInProgress + "_") + auctionInfo) + "_") + toBase58String(auctionCustomer)) + "_") + toString(auctionStart)) + "_") + toString(auctionDuration)) + "_") + toString(auctionBlocksForExecution)) + "_") + auctionAssetName) + "_") + toString(auctionPrice)) + "_") + auctionFreelancer))]) | |
260 | + | let auctionLowestBidder = { | |
261 | + | let valueLowestBidder = getString(this, (auctionId + "_LowestBidderPub")) | |
262 | + | match valueLowestBidder { | |
263 | + | case a: String => | |
264 | + | a | |
265 | + | case _ => | |
266 | + | throw("Auction lowest bidder was not found") | |
267 | + | } | |
268 | + | } | |
269 | + | let newAuctionPrice = { | |
270 | + | let valueNewAuctionPrice = getInteger(this, ((auctionId + "_Bid_") + auctionLowestBidder)) | |
271 | + | match valueNewAuctionPrice { | |
272 | + | case a: Int => | |
273 | + | a | |
274 | + | case _ => | |
275 | + | throw("Auction lowest bid was not found") | |
276 | + | } | |
277 | + | } | |
278 | + | let amountDifference = ((auctionPrice - newAuctionPrice) - dAppCommission) | |
279 | + | ScriptResult(WriteSet([DataEntry((auctionId + "_State"), stateInProgress), DataEntry((auctionId + "_Freelancer"), auctionLowestBidder), DataEntry((auctionId + "_Price"), newAuctionPrice)]), TransferSet([ScriptTransfer(addressFromPublicKey(auctionClient), amountDifference, auctionAssetId58)])) | |
205 | 280 | } | |
206 | 281 | else throw("Incorrect auction state") | |
207 | 282 | else if ((auctionState == stateOpen)) | |
208 | - | then WriteSet([DataEntry(((auctionId + "_") + newFreelancer), betPrice), DataEntry( | |
283 | + | then WriteSet([DataEntry(((auctionId + "_Bid_") + newFreelancer), betPrice), DataEntry((auctionId + "_State"), stateSuggested), DataEntry((auctionId + "_LowestBidderPub"), callerPub), DataEntry((auctionId + callerPub), betPrice)]) | |
209 | 284 | else if ((auctionState == stateSuggested)) | |
210 | 285 | then { | |
211 | - | let auctionLowestBidder = auctionDataList[8] | |
212 | - | let newAuctionLowestBidder = { | |
213 | - | let keyCurrentLowestBid = ((auctionId + "_") + auctionLowestBidder) | |
214 | - | let valueCurrentLowestBid = getInteger(this, keyCurrentLowestBid) | |
286 | + | let currentLowestBidderPub = { | |
287 | + | let lowestBidder = getString(this, (auctionId + "_LowestBidderPub")) | |
288 | + | match lowestBidder { | |
289 | + | case a: String => | |
290 | + | a | |
291 | + | case _ => | |
292 | + | throw("Auction lowest bidder was not found") | |
293 | + | } | |
294 | + | } | |
295 | + | let newLowestBidderPub = { | |
296 | + | let valueCurrentLowestBid = getInteger(this, ((auctionId + "_Bid_") + currentLowestBidderPub)) | |
215 | 297 | let currentLowestBid = match valueCurrentLowestBid { | |
216 | 298 | case a: Int => | |
217 | 299 | a | |
218 | 300 | case _ => | |
219 | - | throw(" | |
301 | + | throw("Auction lowest bid was not found") | |
220 | 302 | } | |
221 | - | if ((currentLowestBid > | |
303 | + | if ((currentLowestBid > betPrice)) | |
222 | 304 | then newFreelancer | |
223 | - | else | |
305 | + | else currentLowestBidderPub | |
224 | 306 | } | |
225 | - | WriteSet([DataEntry(((auctionId + "_Bid_") + | |
307 | + | WriteSet([DataEntry((auctionId + "_LowestBidderPub"), newLowestBidderPub), DataEntry(((auctionId + "_Bid_") + newFreelancer), betPrice)]) | |
226 | 308 | } | |
227 | 309 | else throw(((((("Incorrect jobId state. Now: " + auctionState) + ", must be: ") + stateOpen) + " or ") + stateSuggested)) | |
228 | 310 | } | |
229 | 311 | ||
230 | 312 | ||
231 | 313 | ||
232 | 314 | @Callable(i) | |
233 | 315 | func chooseFreelancer (auctionId,freelancerPub) = { | |
234 | 316 | let callerPub = extract(i.callerPublicKey) | |
235 | 317 | let betTime = height | |
236 | - | let AuctionIdKey = AuctionIdDataKey(auctionId) | |
237 | - | let auctionDataList = getDataList(AuctionIdKey) | |
238 | - | let auctionState = auctionDataList[0] | |
239 | - | let auctionInfo = auctionDataList[1] | |
240 | - | let auctionCustomer = fromBase58String(auctionDataList[2]) | |
241 | - | let auctionStart = parseIntValue(auctionDataList[3]) | |
242 | - | let auctionDuration = parseIntValue(auctionDataList[4]) | |
243 | - | let auctionBlocksForExecution = parseIntValue(auctionDataList[5]) | |
244 | - | let auctionAssetName = auctionDataList[6] | |
245 | - | let auctionPrice = parseIntValue(auctionDataList[7]) | |
318 | + | let auctionState = { | |
319 | + | let valueState = getString(this, (auctionId + "_State")) | |
320 | + | match valueState { | |
321 | + | case a: String => | |
322 | + | a | |
323 | + | case _ => | |
324 | + | throw("Auction State was not found") | |
325 | + | } | |
326 | + | } | |
327 | + | let auctionClient = { | |
328 | + | let valueClient = getString(this, (auctionId + "_Client")) | |
329 | + | let a = match valueClient { | |
330 | + | case a: String => | |
331 | + | a | |
332 | + | case _ => | |
333 | + | throw("Auction Client was not found") | |
334 | + | } | |
335 | + | fromBase58String(a) | |
336 | + | } | |
337 | + | let auctionStart = { | |
338 | + | let valueAuctionStart = getInteger(this, (auctionId + "_AuctionStart")) | |
339 | + | match valueAuctionStart { | |
340 | + | case a: Int => | |
341 | + | a | |
342 | + | case _ => | |
343 | + | throw("Auction Start time was not found") | |
344 | + | } | |
345 | + | } | |
346 | + | let auctionDuration = { | |
347 | + | let valueauctionDuration = getInteger(this, (auctionId + "_AuctionDuration")) | |
348 | + | match valueauctionDuration { | |
349 | + | case a: Int => | |
350 | + | a | |
351 | + | case _ => | |
352 | + | throw("Auction duration time was not found") | |
353 | + | } | |
354 | + | } | |
355 | + | let auctionAssetName = { | |
356 | + | let valueAssetName = getString(this, (auctionId + "_AssetName")) | |
357 | + | match valueAssetName { | |
358 | + | case a: String => | |
359 | + | a | |
360 | + | case _ => | |
361 | + | throw("Auction asset name was not found") | |
362 | + | } | |
363 | + | } | |
364 | + | let auctionPrice = { | |
365 | + | let valuePrice = getInteger(this, (auctionId + "_Price")) | |
366 | + | match valuePrice { | |
367 | + | case a: Int => | |
368 | + | a | |
369 | + | case _ => | |
370 | + | throw("Auction price was not found") | |
371 | + | } | |
372 | + | } | |
246 | 373 | let auctionAssetId58 = AssetNameToBase58(auctionAssetName) | |
247 | - | let | |
374 | + | let freelancerBidAmount = { | |
248 | 375 | let keyFreelancerBid = ((auctionId + "_") + freelancerPub) | |
249 | 376 | let valueFreelacerBid = getInteger(this, keyFreelancerBid) | |
250 | 377 | match valueFreelacerBid { | |
251 | 378 | case a: Int => | |
252 | 379 | a | |
253 | 380 | case _ => | |
254 | 381 | throw("Freelancer's bet was not found") | |
255 | 382 | } | |
256 | 383 | } | |
384 | + | let newFreezedBalance = decreaseFreezedBalance(auctionAssetName, auctionPrice) | |
257 | 385 | let dAppCommission = ((auctionPrice * 3) / 100) | |
258 | - | let amountDifference = ((auctionPrice - | |
386 | + | let amountDifference = ((auctionPrice - freelancerBidAmount) - dAppCommission) | |
259 | 387 | let auctionTimeisOver = timeCheck(betTime, auctionStart, auctionDuration) | |
260 | - | if ((callerPub == | |
388 | + | if ((callerPub == auctionClient)) | |
261 | 389 | then if (auctionTimeisOver) | |
262 | 390 | then if ((auctionState == stateOpen)) | |
263 | - | then ScriptResult(WriteSet([DataEntry( | |
391 | + | then ScriptResult(WriteSet([DataEntry((auctionId + "_State"), stateCancel), DataEntry((auctionAssetName + "_Freezed"), newFreezedBalance)]), TransferSet([ScriptTransfer(addressFromPublicKey(auctionClient), (auctionPrice - dAppCommission), auctionAssetId58)])) | |
264 | 392 | else if ((auctionState == stateSuggested)) | |
265 | - | then WriteSet([DataEntry(AuctionIdKey, ((((((((((((((stateInProgress + "_") + auctionInfo) + "_") + toBase58String(auctionCustomer)) + "_") + toString(auctionStart)) + "_") + toString(auctionDuration)) + "_") + toString(auctionBlocksForExecution)) + "_") + auctionAssetName) + "_") + toString(auctionPrice)))]) | |
393 | + | then { | |
394 | + | let auctionLowestBidder = { | |
395 | + | let valueLowestBidder = getString(this, (auctionId + "_LowestBidderPub")) | |
396 | + | match valueLowestBidder { | |
397 | + | case a: String => | |
398 | + | a | |
399 | + | case _ => | |
400 | + | throw("Auction lowest bidder was not found") | |
401 | + | } | |
402 | + | } | |
403 | + | let newAuctionPrice = { | |
404 | + | let valueNewAuctionPrice = getInteger(this, ((auctionId + "_Bid_") + auctionLowestBidder)) | |
405 | + | match valueNewAuctionPrice { | |
406 | + | case a: Int => | |
407 | + | a | |
408 | + | case _ => | |
409 | + | throw("Auction lowest bid was not found") | |
410 | + | } | |
411 | + | } | |
412 | + | WriteSet([DataEntry((auctionId + "_State"), stateInProgress), DataEntry((auctionId + "_Freelancer"), auctionLowestBidder), DataEntry((auctionId + "_Price"), newAuctionPrice)]) | |
413 | + | } | |
266 | 414 | else throw("Incorrect auction state") | |
267 | - | else ScriptResult(WriteSet([DataEntry(AuctionIdKey, ((((((((((((((((stateInProgress + "_") + auctionInfo) + "_") + toBase58String(auctionCustomer)) + "_") + toString(auctionStart)) + "_") + toString(auctionDuration)) + "_") + toString(auctionBlocksForExecution)) + "_") + auctionAssetName) + "_") + toString(FreelancerBidAmount)) + "_") + freelancerPub))]), TransferSet([ScriptTransfer(addressFromPublicKey(auctionCustomer), amountDifference, auctionAssetId58)])) | |
415 | + | else { | |
416 | + | let setNewFreelancer = { | |
417 | + | let newFreelancer = getInteger(this, ((auctionId + "_Bid_") + freelancerPub)) | |
418 | + | match newFreelancer { | |
419 | + | case a: Int => | |
420 | + | freelancerPub | |
421 | + | case _ => | |
422 | + | throw("Error: Incorrect freelancerPub") | |
423 | + | } | |
424 | + | } | |
425 | + | let setNewPrice = { | |
426 | + | let lowestBidder = getInteger(this, ((auctionId + "_Bid_") + freelancerPub)) | |
427 | + | match lowestBidder { | |
428 | + | case a: Int => | |
429 | + | a | |
430 | + | case _ => | |
431 | + | throw("Auction lowest bidder was not found") | |
432 | + | } | |
433 | + | } | |
434 | + | ScriptResult(WriteSet([DataEntry((auctionId + "_State"), stateInProgress), DataEntry((auctionId + "_Freelancer"), setNewFreelancer), DataEntry((auctionId + "_Price"), setNewPrice)]), TransferSet([ScriptTransfer(addressFromPublicKey(auctionClient), amountDifference, auctionAssetId58)])) | |
435 | + | } | |
268 | 436 | else throw("Only auction customer can choose a freelancer") | |
269 | 437 | } | |
270 | 438 | ||
271 | 439 | ||
272 | 440 | ||
273 | 441 | @Callable(i) | |
274 | 442 | func increaseExecutionTime (auctionId,executionDays) = { | |
275 | 443 | let caller = extract(i.callerPublicKey) | |
276 | 444 | let AuctionIdKey = AuctionIdDataKey(auctionId) | |
277 | 445 | let auctionDataList = getDataList(AuctionIdKey) | |
278 | 446 | let auctionState = auctionDataList[0] | |
279 | - | let auctionInfo = auctionDataList[1] | |
280 | - | let auctionCustomer = fromBase58String(auctionDataList[2]) | |
447 | + | let auctionClient = { | |
448 | + | let valueClient = getString(this, (auctionId + "_Client")) | |
449 | + | let a = match valueClient { | |
450 | + | case a: String => | |
451 | + | a | |
452 | + | case _ => | |
453 | + | throw("Auction Client was not found") | |
454 | + | } | |
455 | + | fromBase58String(a) | |
456 | + | } | |
281 | 457 | let auctionStart = parseIntValue(auctionDataList[3]) | |
282 | 458 | let auctionDuration = parseIntValue(auctionDataList[4]) | |
283 | 459 | let auctionBlocksForExecution = parseIntValue(auctionDataList[5]) | |
284 | 460 | let auctionAssetName = auctionDataList[6] | |
285 | 461 | let auctionPrice = parseIntValue(auctionDataList[7]) | |
286 | 462 | let newAuctionExecutionTime = { | |
287 | 463 | let newAuctionBlocksForExecution = (executionDays * day) | |
288 | 464 | if ((newAuctionBlocksForExecution > auctionBlocksForExecution)) | |
289 | 465 | then newAuctionBlocksForExecution | |
290 | 466 | else throw("New execution time must more than current execution time") | |
291 | 467 | } | |
292 | - | if ((caller == | |
468 | + | if ((caller == auctionClient)) | |
293 | 469 | then if ((auctionState == stateOpen)) | |
294 | - | then WriteSet([DataEntry(AuctionIdKey, (((((((((((( | |
470 | + | then WriteSet([DataEntry(AuctionIdKey, ((((((((((((auctionState + "_") + toBase58String(auctionClient)) + "_") + toString(auctionStart)) + "_") + toString(auctionDuration)) + "_") + toString(auctionBlocksForExecution)) + "_") + auctionAssetName) + "_") + toString(auctionPrice)))]) | |
295 | 471 | else if (if ((auctionState == stateSuggested)) | |
296 | 472 | then true | |
297 | 473 | else (auctionState == stateInProgress)) | |
298 | 474 | then { | |
299 | 475 | let freelancerPub = auctionDataList[7] | |
300 | - | WriteSet([DataEntry(AuctionIdKey, (((((((((((((( | |
476 | + | WriteSet([DataEntry(AuctionIdKey, ((((((((((((((auctionState + "_") + toBase58String(auctionClient)) + "_") + toString(auctionStart)) + "_") + toString(auctionDuration)) + "_") + toString(auctionBlocksForExecution)) + "_") + auctionAssetName) + "_") + toString(auctionPrice)) + "_") + freelancerPub))]) | |
301 | 477 | } | |
302 | 478 | else throw("Incorrect state") | |
303 | 479 | else throw("Only customer can increase execution time") | |
304 | 480 | } | |
305 | 481 | ||
306 | 482 | ||
307 | 483 | ||
308 | 484 | @Callable(i) | |
309 | 485 | func cancelAuction (auctionId) = { | |
310 | 486 | let AuctionIdKey = AuctionIdDataKey(auctionId) | |
311 | 487 | let auctionDataList = getDataList(AuctionIdKey) | |
312 | 488 | let auctionState = auctionDataList[0] | |
313 | 489 | let auctionInfo = auctionDataList[1] | |
314 | 490 | let auctionCustomer = fromBase58String(auctionDataList[2]) | |
315 | 491 | let auctionStart = parseIntValue(auctionDataList[3]) | |
316 | 492 | let auctionDuration = parseIntValue(auctionDataList[4]) | |
317 | 493 | let auctionBlocksForExecution = parseIntValue(auctionDataList[5]) | |
318 | 494 | let auctionAssetName = auctionDataList[6] | |
319 | 495 | let auctionPrice = parseIntValue(auctionDataList[7]) | |
320 | 496 | let auctionIdOwnerCheck = if ((i.callerPublicKey == auctionCustomer)) | |
321 | 497 | then true | |
322 | 498 | else throw("Auction can be canceled only by owner.") | |
323 | 499 | if ((auctionState == stateOpen)) | |
324 | 500 | then WriteSet([DataEntry(AuctionIdKey, ((((((((((((((stateCancel + "_") + auctionInfo) + "_") + toBase58String(auctionCustomer)) + "_") + toString(auctionStart)) + "_") + toString(auctionDuration)) + "_") + toString(auctionBlocksForExecution)) + "_") + auctionAssetName) + "_") + toString(auctionPrice)))]) | |
325 | 501 | else throw("Incorrect auction state.") | |
326 | 502 | } | |
327 | 503 | ||
328 | 504 | ||
329 | 505 | ||
330 | 506 | @Callable(i) | |
331 | 507 | func openDispute (auctionId) = { | |
332 | 508 | let caller = extract(i.callerPublicKey) | |
333 | 509 | let AuctionIdKey = AuctionIdDataKey(auctionId) | |
334 | 510 | let auctionDataList = getDataList(AuctionIdKey) | |
335 | 511 | let auctionState = auctionDataList[0] | |
336 | 512 | let auctionInfo = auctionDataList[1] | |
337 | 513 | let auctionCustomer = fromBase58String(auctionDataList[2]) | |
338 | 514 | let auctionStart = parseIntValue(auctionDataList[3]) | |
339 | 515 | let auctionDuration = parseIntValue(auctionDataList[4]) | |
340 | 516 | let auctionBlocksForExecution = parseIntValue(auctionDataList[5]) | |
341 | 517 | let auctionAssetName = auctionDataList[6] | |
342 | 518 | let auctionPrice = parseIntValue(auctionDataList[7]) | |
343 | 519 | let auctionFreelancer = fromBase58String(auctionDataList[8]) | |
344 | 520 | if (if ((caller == auctionCustomer)) | |
345 | 521 | then true | |
346 | 522 | else (caller == auctionFreelancer)) | |
347 | 523 | then { | |
348 | 524 | let dataString = "1" | |
349 | 525 | WriteSet([DataEntry(AuctionIdKey, ((((stateDispute + "_") + auctionInfo) + "_") + dataString)), DataEntry((auctionId + "_Dispute"), "0")]) | |
350 | 526 | } | |
351 | 527 | else throw("Only customer and freelancer can open dispute") | |
352 | 528 | } | |
353 | 529 | ||
354 | 530 | ||
355 | 531 | ||
356 | 532 | @Callable(i) | |
357 | 533 | func voteDispute (auctionId,vote) = { | |
358 | 534 | let AuctionIdKey = AuctionIdDataKey(auctionId) | |
359 | 535 | let auctionDataList = getDataList(AuctionIdKey) | |
360 | 536 | let auctionState = auctionDataList[0] | |
361 | 537 | let auctionInfo = auctionDataList[1] | |
362 | 538 | let auctionCustomer = fromBase58String(auctionDataList[2]) | |
363 | 539 | let auctionStart = parseIntValue(auctionDataList[3]) | |
364 | 540 | let auctionDuration = parseIntValue(auctionDataList[4]) | |
365 | 541 | let auctionBlocksForExecution = parseIntValue(auctionDataList[5]) | |
366 | 542 | let auctionAssetName = auctionDataList[6] | |
367 | 543 | let auctionPrice = parseIntValue(auctionDataList[7]) | |
368 | 544 | let auctionFreelancer = fromBase58String(auctionDataList[8]) | |
369 | 545 | let comission = ((auctionPrice * 3) / 100) | |
370 | 546 | let auctionStateCheck = if ((auctionState == stateDispute)) | |
371 | 547 | then true | |
372 | 548 | else throw(("Incorrect state. Must be: " + stateDispute)) | |
373 | 549 | let newVote = if (if ((vote == customer)) | |
374 | 550 | then true | |
375 | 551 | else (vote == freelancer)) | |
376 | 552 | then vote | |
377 | 553 | else throw(((("Vote is incorrect. Must be: " + customer) + " or ") + freelancer)) | |
378 | 554 | let newVoter = if (if (if (if (if ((i.callerPublicKey == ambassador1)) | |
379 | 555 | then true | |
380 | 556 | else (i.callerPublicKey == ambassador2)) | |
381 | 557 | then true | |
382 | 558 | else (i.callerPublicKey == ambassador3)) | |
383 | 559 | then true | |
384 | 560 | else (i.callerPublicKey == ambassador4)) | |
385 | 561 | then true | |
386 | 562 | else (i.callerPublicKey == ambassador5)) | |
387 | 563 | then toBase58String(i.callerPublicKey) | |
388 | 564 | else throw("You have no rights for disputes resolving") | |
389 | 565 | let disputeData = { | |
390 | 566 | let keyDispute = ((auctionId + "_") + stateDispute) | |
391 | 567 | let valueDispute = getString(this, keyDispute) | |
392 | 568 | match valueDispute { | |
393 | 569 | case a: String => | |
394 | 570 | a | |
395 | 571 | case _ => | |
396 | 572 | throw("Cannot find data of dispute in storage") | |
397 | 573 | } | |
398 | 574 | } | |
399 | 575 | let disputeDataList = split(disputeData, "/") | |
400 | 576 | let votesCounter = disputeDataList[0] | |
401 | 577 | if ((votesCounter == "4")) | |
402 | 578 | then { | |
403 | 579 | let votersList = split(disputeDataList[1], "_") | |
404 | 580 | let votesList = split(disputeDataList[2], "_") | |
405 | 581 | let alreadyVoted = if ((newVoter == votersList[0])) | |
406 | 582 | then true | |
407 | 583 | else (newVoter == votersList[1]) | |
408 | 584 | if (alreadyVoted) | |
409 | 585 | then throw("You already voted") | |
410 | 586 | else { | |
411 | 587 | let newVotesCounter = "5" | |
412 | 588 | let newVoters = ((disputeDataList[1] + "_") + newVoter) | |
413 | 589 | let newVotes = ((disputeDataList[2] + "_") + newVote) | |
414 | 590 | let newDisputeDataString = ((((newVotesCounter + "/") + newVoters) + "/") + newVotes) | |
415 | 591 | let disputeWinner = { | |
416 | 592 | let vote1 = if ((votesList[0] == customer)) | |
417 | 593 | then 1 | |
418 | 594 | else 0 | |
419 | 595 | let vote2 = if ((votesList[1] == customer)) | |
420 | 596 | then 1 | |
421 | 597 | else 0 | |
422 | 598 | let vote3 = if ((votesList[2] == customer)) | |
423 | 599 | then 1 | |
424 | 600 | else 0 | |
425 | 601 | let vote4 = if ((votesList[3] == customer)) | |
426 | 602 | then 1 | |
427 | 603 | else 0 | |
428 | 604 | let vote5 = if ((newVote == customer)) | |
429 | 605 | then 1 | |
430 | 606 | else 0 | |
431 | 607 | let customerVotes = ((((vote1 + vote2) + vote3) + vote4) + vote5) | |
432 | 608 | if ((customerVotes > 2)) | |
433 | 609 | then customer | |
434 | 610 | else freelancer | |
435 | 611 | } | |
436 | 612 | let newDataString = ((((((((((((((auctionInfo + "_") + toBase58String(auctionCustomer)) + "_") + toString(auctionStart)) + "_") + toString(auctionDuration)) + "_") + toString(auctionBlocksForExecution)) + "_") + auctionAssetName) + "_") + toString(auctionPrice)) + "_") + toBase58String(auctionFreelancer)) | |
437 | 613 | let disputeWinnerPublic = if ((disputeWinner == customer)) | |
438 | 614 | then auctionCustomer | |
439 | 615 | else auctionFreelancer | |
440 | 616 | let amountWithoutComm = if ((disputeWinnerPublic == auctionCustomer)) | |
441 | 617 | then (auctionPrice - comission) | |
442 | 618 | else ((auctionPrice - comission) - comission) | |
443 | 619 | ScriptResult(WriteSet([DataEntry(AuctionIdDataKey(auctionId), ((stateDisputeResolved + "_") + newDataString)), DataEntry(((auctionId + "_") + stateDispute), newDisputeDataString)]), TransferSet([ScriptTransfer(addressFromPublicKey(disputeWinnerPublic), amountWithoutComm, AssetNameToBase58(auctionAssetName))])) | |
444 | 620 | } | |
445 | 621 | } | |
446 | 622 | else { | |
447 | 623 | let newDisputeDataString = if ((votesCounter == "0")) | |
448 | 624 | then { | |
449 | 625 | let newVotesCounter = "1" | |
450 | 626 | let newVoters = newVoter | |
451 | 627 | let newVotes = newVote | |
452 | 628 | let newDataString = ((((newVotesCounter + "/") + newVoters) + "/") + newVotes) | |
453 | 629 | newDataString | |
454 | 630 | } | |
455 | 631 | else if ((votesCounter == "1")) | |
456 | 632 | then { | |
457 | 633 | let voter1 = disputeDataList[1] | |
458 | 634 | let vote1 = disputeDataList[2] | |
459 | 635 | let alreadyVoted = (newVoter == voter1) | |
460 | 636 | if (alreadyVoted) | |
461 | 637 | then throw("You already voted") | |
462 | 638 | else { | |
463 | 639 | let newVotesCounter = "1" | |
464 | 640 | let newVoters = (voter1 + newVoter) | |
465 | 641 | let newVotes = (vote1 + newVote) | |
466 | 642 | let newDataString = ((((newVotesCounter + "/") + newVoters) + "/") + newVotes) | |
467 | 643 | newDataString | |
468 | 644 | } | |
469 | 645 | } | |
470 | 646 | else if ((votesCounter == "2")) | |
471 | 647 | then { | |
472 | 648 | let votersList = split(disputeDataList[1], "_") | |
473 | 649 | let votesList = split(disputeDataList[2], "_") | |
474 | 650 | let alreadyVoted = if ((newVoter == votersList[0])) | |
475 | 651 | then true | |
476 | 652 | else (newVoter == votersList[1]) | |
477 | 653 | if (alreadyVoted) | |
478 | 654 | then throw("You already voted") | |
479 | 655 | else { | |
480 | 656 | let newVotesCounter = "3" | |
481 | 657 | let newVoters = ((disputeDataList[1] + "_") + newVoter) | |
482 | 658 | let newVotes = ((disputeDataList[2] + "_") + newVote) | |
483 | 659 | let newDataString = ((((newVotesCounter + "/") + newVoters) + "/") + newVotes) | |
484 | 660 | newDataString | |
485 | 661 | } | |
486 | 662 | } | |
487 | 663 | else if ((votesCounter == "3")) | |
488 | 664 | then { | |
489 | 665 | let votersList = split(disputeDataList[1], "_") | |
490 | 666 | let votesList = split(disputeDataList[2], "_") | |
491 | 667 | let alreadyVoted = if (if ((newVoter == votersList[0])) | |
492 | 668 | then true | |
493 | 669 | else (newVoter == votersList[1])) | |
494 | 670 | then true | |
495 | 671 | else (newVoter == votersList[2]) | |
496 | 672 | if (alreadyVoted) | |
497 | 673 | then throw("You already voted") | |
498 | 674 | else { | |
499 | 675 | let newVotesCounter = "4" | |
500 | 676 | let newVoters = ((disputeDataList[1] + "_") + newVoter) | |
501 | 677 | let newVotes = ((disputeDataList[2] + "_") + newVote) | |
502 | 678 | let newDataString = ((((newVotesCounter + "/") + newVoters) + "/") + newVotes) | |
503 | 679 | newDataString | |
504 | 680 | } | |
505 | 681 | } | |
506 | 682 | else throw("Dispute has been already resolved") | |
507 | 683 | WriteSet([DataEntry(((auctionId + "_") + stateDispute), newDisputeDataString)]) | |
508 | 684 | } | |
509 | 685 | } | |
510 | 686 | ||
511 | 687 | ||
512 | 688 | ||
513 | 689 | @Callable(i) | |
514 | 690 | func workHandOver (auctionId) = { | |
515 | 691 | let callerPub = extract(i.callerPublicKey) | |
516 | 692 | let AuctionIdKey = AuctionIdDataKey(auctionId) | |
517 | 693 | let auctionDataList = getDataList(AuctionIdKey) | |
518 | 694 | let auctionState = auctionDataList[0] | |
519 | 695 | let auctionInfo = auctionDataList[1] | |
520 | 696 | let auctionCustomer = fromBase58String(auctionDataList[2]) | |
521 | 697 | let auctionStart = parseIntValue(auctionDataList[3]) | |
522 | 698 | let auctionDuration = parseIntValue(auctionDataList[4]) | |
523 | 699 | let auctionBlocksForExecution = parseIntValue(auctionDataList[5]) | |
524 | 700 | let auctionAssetName = auctionDataList[6] | |
525 | 701 | let auctionPrice = parseIntValue(auctionDataList[7]) | |
526 | 702 | let auctionFreelancer = fromBase58String(auctionDataList[8]) | |
527 | 703 | let currentTime = height | |
528 | 704 | let freelancerPubCheck = if ((callerPub == auctionFreelancer)) | |
529 | 705 | then callerPub | |
530 | 706 | else throw("Only a freelancer can indicate that the work is done") | |
531 | 707 | let timeIsOver = ((currentTime - auctionStart) > auctionBlocksForExecution) | |
532 | 708 | if ((auctionState == stateInProgress)) | |
533 | 709 | then if (timeIsOver) | |
534 | 710 | then { | |
535 | 711 | let newDataString = ((((((((((auctionDataList[1] + "_") + auctionDataList[2]) + "_") + auctionDataList[3]) + "_") + auctionDataList[4]) + "_") + auctionDataList[5]) + "_") + auctionDataList[6]) | |
536 | 712 | WriteSet([DataEntry(AuctionIdKey, ((((stateDispute + "_") + auctionInfo) + "_") + newDataString))]) | |
537 | 713 | } | |
538 | 714 | else { | |
539 | 715 | let newDataString = ((((((((((auctionDataList[1] + "_") + auctionDataList[2]) + "_") + auctionDataList[3]) + "_") + auctionDataList[4]) + "_") + auctionDataList[5]) + "_") + auctionDataList[6]) | |
540 | 716 | WriteSet([DataEntry(AuctionIdKey, ((((stateWait4Confirm + "_") + auctionInfo) + "_") + newDataString))]) | |
541 | 717 | } | |
542 | 718 | else throw("Auction state is incorrect") | |
543 | 719 | } | |
544 | 720 | ||
545 | 721 | ||
546 | 722 | ||
547 | 723 | @Callable(i) | |
548 | 724 | func acceptWork (auctionId) = { | |
549 | 725 | let AuctionIdKey = AuctionIdDataKey(auctionId) | |
550 | 726 | let auctionDataList = getDataList(AuctionIdKey) | |
551 | 727 | let auctionState = auctionDataList[0] | |
552 | 728 | let auctionInfo = auctionDataList[1] | |
553 | 729 | let auctionCustomer = fromBase58String(auctionDataList[2]) | |
554 | 730 | let auctionStart = parseIntValue(auctionDataList[3]) | |
555 | 731 | let auctionDuration = parseIntValue(auctionDataList[4]) | |
556 | 732 | let auctionBlocksForExecution = parseIntValue(auctionDataList[5]) | |
557 | 733 | let auctionAssetName = auctionDataList[6] | |
558 | 734 | let auctionPrice = parseIntValue(auctionDataList[7]) | |
559 | 735 | let auctionFreelancer = auctionDataList[2] | |
560 | 736 | let caller = extract(i.callerPublicKey) | |
561 | 737 | let dAppCommission = ((auctionPrice * 3) / 100) | |
562 | 738 | let amountWithoutComm = (auctionPrice - dAppCommission) | |
563 | 739 | let newRating = { | |
564 | 740 | let valueRating = getInteger(this, (auctionFreelancer + "_Rating")) | |
565 | 741 | let currentRating = match valueRating { | |
566 | 742 | case a: Int => | |
567 | 743 | a | |
568 | 744 | case _ => | |
569 | 745 | 0 | |
570 | 746 | } | |
571 | 747 | (currentRating + 1) | |
572 | 748 | } | |
573 | 749 | if ((caller == auctionCustomer)) | |
574 | 750 | then if ((auctionState == stateWait4Confirm)) | |
575 | 751 | then { | |
576 | 752 | let newDataString = ((((((((((auctionDataList[1] + "_") + auctionDataList[2]) + "_") + auctionDataList[3]) + "_") + auctionDataList[4]) + "_") + auctionDataList[5]) + "_") + auctionDataList[6]) | |
577 | 753 | ScriptResult(WriteSet([DataEntry(AuctionIdKey, ((((stateComplete + "_") + auctionInfo) + "_") + newDataString)), DataEntry((auctionFreelancer + "_Rating"), newRating)]), TransferSet([ScriptTransfer(addressFromPublicKey(fromBase58String(auctionFreelancer)), amountWithoutComm, AssetNameToBase58(auctionAssetName))])) | |
578 | 754 | } | |
579 | 755 | else throw(("Incorrect state. Must be: " + stateWait4Confirm)) | |
580 | 756 | else throw("Only auction customer can use this function") | |
581 | 757 | } | |
582 | 758 | ||
583 | 759 | ||
584 | 760 | @Verifier(tx) | |
585 | 761 | func verify () = if (sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)) | |
586 | 762 | then match tx { | |
587 | 763 | case ttx: TransferTransaction => | |
588 | 764 | true | |
589 | 765 | case stx: SetScriptTransaction => | |
590 | 766 | true | |
591 | 767 | case _ => | |
592 | 768 | false | |
593 | 769 | } | |
594 | 770 | else false | |
595 | 771 |
github/deemru/w8io/026f985 157.63 ms ◑