tx · DQF1ckC5oYxqfejNucHLwk5vZAuAbVyYaf6zeFwWZo8o 3N2EM5HFgf6UMBnvcJX3Cegmozwdv1iDeq2: -0.01500000 Waves 2019.10.11 19:46 [715473] smart account 3N2EM5HFgf6UMBnvcJX3Cegmozwdv1iDeq2 > SELF 0.00000000 Waves
{ "type": 13, "id": "DQF1ckC5oYxqfejNucHLwk5vZAuAbVyYaf6zeFwWZo8o", "fee": 1500000, "feeAssetId": null, "timestamp": 1570812346159, "version": 1, "sender": "3N2EM5HFgf6UMBnvcJX3Cegmozwdv1iDeq2", "senderPublicKey": "8y2Uc9uYf5gRD6Dzm1aC73zYe3LZvtVDUVAnAhNdN2mg", "proofs": [ "4i4ZuXT7xQLE6yynMmCTf5mgBFDkKPUiJyTqFf7seT47miCo6dq99dgrSH82eV3rSj9H7AheCcNRBA4PUXojjWRR" ], "script": "base64:AAIDAAAAAAAAAD8IARIDCgEIEgMKAQgSBQoDAQEIEgQKAggBEgQKAggIEgQKAggBEgMKAQgSAwoBCBIECgIICBIDCgEIEgMKAQgAAAAlAAAAAANkYXkAAAAAAAAABaAAAAAABVdBVkVTBQAAAAR1bml0AAAAAAR3QlRDAQAAACBs+mr/xe2qjAt/tSqT0qIML4KC23R6BIxT+/0TH3Og/wAAAAAEd0VVUgEAAAAg7BZhBF97kSFBBjs38+fX1Pjz08YOqoCX85C/0PoVupkAAAAABHdVU0QBAAAAIN0cvQHwz3UFMHgHsqi2OJjRRd1cH7ozWuNAb/pmWXD9AAAAAAlzdGF0ZU9wZW4CAAAABk9wZW5lZAAAAAAOc3RhdGVTdWdnZXN0ZWQCAAAACVN1Z2dlc3RlZAAAAAALc3RhdGVDYW5jZWwCAAAACENhbmNlbGVkAAAAAA9zdGF0ZUluUHJvZ3Jlc3MCAAAACkluUHJvZ3Jlc3MAAAAAEXN0YXRlV2FpdDRDb25maXJtAgAAABNXYWl0Rm9yQ29uZmlybWF0aW9uAAAAAA1zdGF0ZUNvbXBsZXRlAgAAAAlDb21w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ZXICAAAADV9QYWlkRWFybmluZ3MJAABkAAAAAgUAAAAWZnJlZWxhbmNlclBhaWRFYXJuaW5ncwUAAAAMYXVjdGlvblByaWNlBQAAAANuaWwJAQAAAAtUcmFuc2ZlclNldAAAAAEJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwkBAAAAFGFkZHJlc3NGcm9tUHVibGljS2V5AAAAAQUAAAARYXVjdGlvbkZyZWVsYW5jZXIFAAAAEWFtb3VudFdpdGhvdXRDb21tBQAAABBhdWN0aW9uQXNzZXRJZDU4BQAAAANuaWwJAAACAAAAAQkAASwAAAACAgAAABpJbmNvcnJlY3Qgc3RhdGUuIE11c3QgYmU6IAUAAAARc3RhdGVXYWl0NENvbmZpcm0JAAACAAAAAQIAAAArT25seSBhdWN0aW9uIGN1c3RvbWVyIGNhbiB1c2UgdGhpcyBmdW5jdGlvbgAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAADCQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAgFAAAAAnR4AAAAD3NlbmRlclB1YmxpY0tleQQAAAAHJG1hdGNoMAUAAAACdHgDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAE1RyYW5zZmVyVHJhbnNhY3Rpb24EAAAAA3R0eAUAAAAHJG1hdGNoMAYDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAFFNldFNjcmlwdFRyYW5zYWN0aW9uBAAAAANzdHgFAAAAByRtYXRjaDAGBwc2d5uX", "chainId": 84, "height": 715473, "spentComplexity": 0 } View: original | compacted Prev: FDcMfpAQ1jF39uAp6MM51KpjUaxrdWKAcp37KEz2XRqg Next: 6sDjuS2KxGc5vN1a1cLRP33wMk7stgq3sAvBtgTT2kef Diff:
Old | New | Differences | |
---|---|---|---|
27 | 27 | ||
28 | 28 | let stateDisputeResolved = "DisputeResolved" | |
29 | 29 | ||
30 | - | let client = " | |
30 | + | let client = "CMR" | |
31 | 31 | ||
32 | 32 | let freelancer = "FL" | |
33 | 33 | ||
42 | 42 | let ambassador5 = base58'1' | |
43 | 43 | ||
44 | 44 | func AuctionIdDataKey (auctionId) = (auctionId + "_AuctionData") | |
45 | + | ||
46 | + | ||
47 | + | func getInt (key) = { | |
48 | + | let valueJobsOnGoing = getInteger(this, key) | |
49 | + | match valueJobsOnGoing { | |
50 | + | case a: Int => | |
51 | + | a | |
52 | + | case _ => | |
53 | + | 0 | |
54 | + | } | |
55 | + | } | |
45 | 56 | ||
46 | 57 | ||
47 | 58 | func AssetNameToBase58 (auctionAssetName) = if ((auctionAssetName == "WAVES")) | |
119 | 130 | ||
120 | 131 | func getAuctionClientPub (auctionId) = { | |
121 | 132 | let valueClient = getString(this, (auctionId + "_AuctionClient")) | |
122 | - | let | |
133 | + | let clientPub = match valueClient { | |
123 | 134 | case a: String => | |
124 | 135 | a | |
125 | 136 | case _ => | |
126 | 137 | throw("Auction Client was not found") | |
127 | 138 | } | |
128 | - | fromBase58String( | |
139 | + | fromBase58String(clientPub) | |
129 | 140 | } | |
130 | 141 | ||
131 | 142 | ||
202 | 213 | let alreadyRegistered = getString(this, (userPublicKey + "_Freelancer")) | |
203 | 214 | if (isDefined(alreadyRegistered)) | |
204 | 215 | then throw("User already registered") | |
205 | - | else WriteSet([DataEntry((userPublicKey + "_Freelancer"), info)]) | |
216 | + | else WriteSet([DataEntry((userPublicKey + "_Freelancer"), info), DataEntry((userPublicKey + "_PendingEarnings"), 0), DataEntry((userPublicKey + "_PaidEarnings"), 0), DataEntry((userPublicKey + "_TotalEarnings"), 0), DataEntry((userPublicKey + "_JobsPending"), 0), DataEntry((userPublicKey + "_JobsCompleted"), 0), DataEntry((userPublicKey + "_JobsTotal"), 0)]) | |
206 | 217 | } | |
207 | 218 | ||
208 | 219 | ||
213 | 224 | let alreadyRegistered = getString(this, (userPublicKey + "_Client")) | |
214 | 225 | if (isDefined(alreadyRegistered)) | |
215 | 226 | then throw("User already registered") | |
216 | - | else WriteSet([DataEntry((userPublicKey + "_Client"), info)]) | |
227 | + | else WriteSet([DataEntry((userPublicKey + "_Client"), info), DataEntry((userPublicKey + "_JobsCreated"), 0), DataEntry((userPublicKey + "_JobsOnGoing"), 0), DataEntry((userPublicKey + "_JobInDispute"), 0)]) | |
217 | 228 | } | |
218 | 229 | ||
219 | 230 | ||
237 | 248 | else if ((pmt.assetId == wUSD)) | |
238 | 249 | then "USD" | |
239 | 250 | else throw("AssetId is incorrect") | |
251 | + | let jobsCreated = getInt((auctionClient + "_JobsCreated")) | |
240 | 252 | let newFreezedBalance = increaseFreezedBalance(pmtAssetName, auctionPrice) | |
241 | - | WriteSet([DataEntry((auctionId + "_State"), stateOpen), DataEntry((auctionId + "_Info"), auctionInfo), DataEntry((auctionId + "_AuctionClient"), 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)]) | |
253 | + | WriteSet([DataEntry((auctionId + "_State"), stateOpen), DataEntry((auctionId + "_Info"), auctionInfo), DataEntry((auctionId + "_AuctionClient"), 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), DataEntry((auctionClient + "_JobsCreated"), (jobsCreated + 1))]) | |
242 | 254 | } | |
243 | 255 | ||
244 | 256 | ||
330 | 342 | let auctionAssetName = getAuctionAssetName(auctionId) | |
331 | 343 | let auctionPrice = getAuctionPrice(auctionId) | |
332 | 344 | let auctionAssetId58 = AssetNameToBase58(auctionAssetName) | |
345 | + | let jobsOnGoing = getInt((toBase58String(auctionClient) + "_JobsOnGoing")) | |
346 | + | let freelancerPendingEarnings = getInt((freelancerPub + "_PendingEarnings")) | |
347 | + | let freelancerTotalEarnings = getInt((freelancerPub + "_TotalEarnings")) | |
333 | 348 | let freelancerBidAmount = { | |
334 | 349 | let keyFreelancerBid = ((auctionId + "_Bid_") + freelancerPub) | |
335 | 350 | let valueFreelacerBid = getInteger(this, keyFreelancerBid) | |
371 | 386 | } | |
372 | 387 | let amountDifference = (auctionPrice - newAuctionPrice) | |
373 | 388 | let newFreezedBalance = decreaseFreezedBalance(auctionAssetName, amountDifference) | |
374 | - | ScriptResult(WriteSet([DataEntry((auctionId + "_State"), stateInProgress), DataEntry((auctionId + "_HiredFreelancer"), auctionLowestBidder), DataEntry((auctionId + "_Price"), newAuctionPrice), DataEntry((auctionAssetName + "_Freezed"), newFreezedBalance)]), TransferSet([ScriptTransfer(addressFromPublicKey(auctionClient), amountDifference, auctionAssetId58)])) | |
389 | + | ScriptResult(WriteSet([DataEntry((auctionId + "_State"), stateInProgress), DataEntry((auctionId + "_HiredFreelancer"), auctionLowestBidder), DataEntry((auctionId + "_Price"), newAuctionPrice), DataEntry((auctionAssetName + "_Freezed"), newFreezedBalance), DataEntry((toBase58String(auctionClient) + "_JobsOnGoing"), (jobsOnGoing + 1)), DataEntry((freelancerPub + "_PendingEarnings"), (freelancerPendingEarnings + newAuctionPrice)), DataEntry((freelancerPub + "_TotalEarnings"), (freelancerTotalEarnings + newAuctionPrice))]), TransferSet([ScriptTransfer(addressFromPublicKey(auctionClient), amountDifference, auctionAssetId58)])) | |
375 | 390 | } | |
376 | 391 | else throw("Incorrect auction state") | |
377 | 392 | else { | |
395 | 410 | } | |
396 | 411 | let amountDifference = (auctionPrice - freelancerBidAmount) | |
397 | 412 | let newFreezedBalance = decreaseFreezedBalance(auctionAssetName, amountDifference) | |
398 | - | ScriptResult(WriteSet([DataEntry((auctionId + "_State"), stateInProgress), DataEntry((auctionId + "_HiredFreelancer"), setNewFreelancer), DataEntry((auctionId + "_Price"), newAuctionPrice), DataEntry((auctionAssetName + "_Freezed"), newFreezedBalance)]), TransferSet([ScriptTransfer(addressFromPublicKey(auctionClient), (amountDifference + 1), auctionAssetId58)])) | |
413 | + | ScriptResult(WriteSet([DataEntry((auctionId + "_State"), stateInProgress), DataEntry((auctionId + "_HiredFreelancer"), setNewFreelancer), DataEntry((auctionId + "_Price"), newAuctionPrice), DataEntry((auctionAssetName + "_Freezed"), newFreezedBalance), DataEntry((toBase58String(auctionClient) + "_JobsOnGoing"), (jobsOnGoing + 1)), DataEntry((freelancerPub + "_PendingEarnings"), (freelancerPendingEarnings + newAuctionPrice)), DataEntry((freelancerPub + "_TotalEarnings"), (freelancerTotalEarnings + newAuctionPrice))]), TransferSet([ScriptTransfer(addressFromPublicKey(auctionClient), (amountDifference + 1), auctionAssetId58)])) | |
399 | 414 | } | |
400 | 415 | else throw("Only auction customer can choose a freelancer") | |
401 | 416 | } | |
438 | 453 | let dAppCommission = ((auctionPrice * 3) / 100) | |
439 | 454 | let amountWithoutComm = (auctionPrice - dAppCommission) | |
440 | 455 | let newFreezedBalance = decreaseFreezedBalance(auctionAssetName, auctionPrice) | |
441 | - | let callerIsClient = if ((callerPub == auctionClient)) | |
442 | - | then true | |
443 | - | else throw("Auction can be canceled only by auction owner.") | |
444 | - | if (callerIsClient) | |
456 | + | if ((callerPub == auctionClient)) | |
445 | 457 | then if ((auctionState == stateOpen)) | |
446 | 458 | then ScriptResult(WriteSet([DataEntry((auctionId + "_State"), stateCancel), DataEntry((auctionAssetName + "_Freezed"), newFreezedBalance)]), TransferSet([ScriptTransfer(addressFromPublicKey(auctionClient), amountWithoutComm, auctionAssetId58)])) | |
447 | - | else throw(" | |
459 | + | else throw("Auction can be canceled only by auction owner.") | |
448 | 460 | else throw("Only Client can cancel auction") | |
449 | 461 | } | |
450 | 462 | ||
456 | 468 | let auctionState = getAuctionState(auctionId) | |
457 | 469 | let auctionClient = getAuctionClientPub(auctionId) | |
458 | 470 | let auctionFreelancer = getAuctionFreelancerPub(auctionId) | |
471 | + | let clientJobsInDispute = getInt((toBase58String(auctionClient) + "_JobsInDispute")) | |
459 | 472 | if (if ((auctionState == stateOpen)) | |
460 | 473 | then true | |
461 | 474 | else (auctionState == stateSuggested)) | |
463 | 476 | else if (if ((caller == auctionClient)) | |
464 | 477 | then true | |
465 | 478 | else (caller == auctionFreelancer)) | |
466 | - | then WriteSet([DataEntry((auctionId + "_State"), stateDispute), DataEntry((auctionId + "_DisputeVotes"), 0)]) | |
467 | - | else throw("Only | |
479 | + | then WriteSet([DataEntry((auctionId + "_State"), stateDispute), DataEntry((auctionId + "_DisputeVotes"), 0), DataEntry((toBase58String(auctionClient) + "_JobInDispute"), (clientJobsInDispute + 1))]) | |
480 | + | else throw("Only Client and Freelancer can open dispute") | |
468 | 481 | } | |
469 | 482 | ||
470 | 483 | ||
479 | 492 | let auctionFreelancer = getAuctionFreelancerPub(auctionId) | |
480 | 493 | let commission = ((auctionPrice * 3) / 100) | |
481 | 494 | let auctionAssetId58 = AssetNameToBase58(auctionAssetName) | |
495 | + | let clientJobsInDispute = getInt((toBase58String(auctionClient) + "_JobsInDispute")) | |
482 | 496 | let callerIsAmbassador = if (if (if (if (if ((callerPub == ambassador1)) | |
483 | 497 | then true | |
484 | 498 | else (callerPub == ambassador2)) | |
550 | 564 | then (auctionPrice - commission) | |
551 | 565 | else (auctionPrice - (commission * 2)) | |
552 | 566 | let newFreezedBalance = decreaseFreezedBalance(auctionAssetName, auctionPrice) | |
553 | - | ScriptResult(WriteSet([DataEntry((auctionId + "_DisputeVotes"), (votesNumber + 1)), DataEntry((auctionId + "_State"), stateDisputeResolved), DataEntry(((auctionId + "_DiputeVote_") + callerIsAmbassador), newVote), DataEntry((auctionAssetName + "_Freezed"), newFreezedBalance)]), TransferSet([ScriptTransfer(addressFromPublicKey(disputeWinner), paymentWithoutComm, auctionAssetId58)])) | |
567 | + | ScriptResult(WriteSet([DataEntry((auctionId + "_DisputeVotes"), (votesNumber + 1)), DataEntry((auctionId + "_State"), stateDisputeResolved), DataEntry(((auctionId + "_DiputeVote_") + callerIsAmbassador), newVote), DataEntry((auctionAssetName + "_Freezed"), newFreezedBalance), DataEntry((toBase58String(auctionClient) + "_JobInDispute"), (clientJobsInDispute - 1))]), TransferSet([ScriptTransfer(addressFromPublicKey(disputeWinner), paymentWithoutComm, auctionAssetId58)])) | |
554 | 568 | } | |
555 | 569 | else WriteSet([DataEntry((auctionId + "_DisputeVotes"), (votesNumber + 1)), DataEntry(((auctionId + "_DiputeVote_") + callerIsAmbassador), newVote)]) | |
556 | 570 | else throw(("Incorrect state. Must be: " + stateDispute)) | |
562 | 576 | func workHandOver (auctionId) = { | |
563 | 577 | let callerPub = extract(i.callerPublicKey) | |
564 | 578 | let auctionState = getAuctionState(auctionId) | |
579 | + | let auctionClient = getAuctionClientPub(auctionId) | |
565 | 580 | let auctionStart = getAuctionStartTime(auctionId) | |
566 | 581 | let auctionDuration = getAuctionDurationTime(auctionId) | |
567 | 582 | let auctionBlocksForExecution = getAuctionJobPerformanceTime(auctionId) | |
568 | 583 | let auctionFreelancer = getAuctionFreelancerPub(auctionId) | |
584 | + | let clientJobsInDispute = getInt((toBase58String(auctionClient) + "_JobsInDispute")) | |
569 | 585 | let currentTime = height | |
570 | 586 | let freelancerPubCheck = if ((callerPub == auctionFreelancer)) | |
571 | 587 | then callerPub | |
573 | 589 | let timeIsOver = ((currentTime - auctionStart) > auctionBlocksForExecution) | |
574 | 590 | if ((auctionState == stateInProgress)) | |
575 | 591 | then if (timeIsOver) | |
576 | - | then WriteSet([DataEntry((auctionId + "_State"), stateDispute), DataEntry((auctionId + "_DisputeVotes"), "0")]) | |
592 | + | then WriteSet([DataEntry((auctionId + "_State"), stateDispute), DataEntry((auctionId + "_DisputeVotes"), "0"), DataEntry((toBase58String(auctionClient) + "_JobInDispute"), (clientJobsInDispute + 1))]) | |
577 | 593 | else WriteSet([DataEntry((auctionId + "_State"), stateWait4Confirm)]) | |
578 | 594 | else throw("Auction state is incorrect") | |
579 | 595 | } | |
590 | 606 | let auctionAssetName = getAuctionAssetName(auctionId) | |
591 | 607 | let auctionPrice = getAuctionPrice(auctionId) | |
592 | 608 | let auctionFreelancer = getAuctionFreelancerPub(auctionId) | |
609 | + | let jobsOnGoing = getInt((toBase58String(auctionClient) + "_JobsOnGoing")) | |
610 | + | let freelancerPendingEarnings = getInt((toBase58String(auctionFreelancer) + "_PendingEarnings")) | |
611 | + | let freelancerPaidEarnings = getInt((toBase58String(auctionFreelancer) + "_PaidEarnings")) | |
593 | 612 | let dAppCommission = ((auctionPrice * 3) / 100) | |
594 | 613 | let amountWithoutComm = (auctionPrice - dAppCommission) | |
595 | 614 | let auctionAssetId58 = AssetNameToBase58(auctionAssetName) | |
606 | 625 | } | |
607 | 626 | if ((callerPub == auctionClient)) | |
608 | 627 | then if ((auctionState == stateWait4Confirm)) | |
609 | - | then ScriptResult(WriteSet([DataEntry((auctionId + "_State"), stateComplete), DataEntry((toBase58String(auctionFreelancer) + "_Rating"), newRating), DataEntry((auctionAssetName + "_Freezed"), newFreezedBalance)]), TransferSet([ScriptTransfer(addressFromPublicKey(auctionFreelancer), amountWithoutComm, auctionAssetId58)])) | |
628 | + | then ScriptResult(WriteSet([DataEntry((auctionId + "_State"), stateComplete), DataEntry((toBase58String(auctionFreelancer) + "_Rating"), newRating), DataEntry((auctionAssetName + "_Freezed"), newFreezedBalance), DataEntry((toBase58String(auctionClient) + "_JobsOnGoing"), (jobsOnGoing - 1)), DataEntry((toBase58String(auctionFreelancer) + "_PendingEarnings"), (freelancerPendingEarnings - auctionPrice)), DataEntry((toBase58String(auctionFreelancer) + "_PaidEarnings"), (freelancerPaidEarnings + auctionPrice))]), TransferSet([ScriptTransfer(addressFromPublicKey(auctionFreelancer), amountWithoutComm, auctionAssetId58)])) | |
610 | 629 | else throw(("Incorrect state. Must be: " + stateWait4Confirm)) | |
611 | 630 | else throw("Only auction customer can use this function") | |
612 | 631 | } |
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 | - | let client = " | |
30 | + | let client = "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 | + | ||
46 | + | ||
47 | + | func getInt (key) = { | |
48 | + | let valueJobsOnGoing = getInteger(this, key) | |
49 | + | match valueJobsOnGoing { | |
50 | + | case a: Int => | |
51 | + | a | |
52 | + | case _ => | |
53 | + | 0 | |
54 | + | } | |
55 | + | } | |
45 | 56 | ||
46 | 57 | ||
47 | 58 | func AssetNameToBase58 (auctionAssetName) = if ((auctionAssetName == "WAVES")) | |
48 | 59 | then WAVES | |
49 | 60 | else if ((auctionAssetName == "BTC")) | |
50 | 61 | then wBTC | |
51 | 62 | else if ((auctionAssetName == "EUR")) | |
52 | 63 | then wEUR | |
53 | 64 | else if ((auctionAssetName == "USD")) | |
54 | 65 | then wUSD | |
55 | 66 | else throw("Incorrect Asset Id") | |
56 | 67 | ||
57 | 68 | ||
58 | 69 | func timeCheck (currentTime,startTime,expirationTime) = ((currentTime - startTime) > expirationTime) | |
59 | 70 | ||
60 | 71 | ||
61 | 72 | func bidAmountCheck (amount,auctionPrice) = if ((amount > auctionPrice)) | |
62 | 73 | then throw("Bid amount must be lower or equal than auctionPrice") | |
63 | 74 | else amount | |
64 | 75 | ||
65 | 76 | ||
66 | 77 | func increaseFreezedBalance (pmtAssetName,auctionPrice) = { | |
67 | 78 | let keyFreezedFunds = getInteger(this, (pmtAssetName + "_Freezed")) | |
68 | 79 | let currentFreezedBalance = match keyFreezedFunds { | |
69 | 80 | case a: Int => | |
70 | 81 | a | |
71 | 82 | case _ => | |
72 | 83 | 0 | |
73 | 84 | } | |
74 | 85 | (currentFreezedBalance + auctionPrice) | |
75 | 86 | } | |
76 | 87 | ||
77 | 88 | ||
78 | 89 | func decreaseFreezedBalance (pmtAssetName,auctionPrice) = { | |
79 | 90 | let keyFreezedFunds = getInteger(this, (pmtAssetName + "_Freezed")) | |
80 | 91 | let currentFreezedBalance = match keyFreezedFunds { | |
81 | 92 | case a: Int => | |
82 | 93 | a | |
83 | 94 | case _ => | |
84 | 95 | 0 | |
85 | 96 | } | |
86 | 97 | let a = (currentFreezedBalance - auctionPrice) | |
87 | 98 | if ((a >= 0)) | |
88 | 99 | then a | |
89 | 100 | else throw("Freezed amount couldn't be less than 0") | |
90 | 101 | } | |
91 | 102 | ||
92 | 103 | ||
93 | 104 | func freelancerIsRegistered (callerPub) = { | |
94 | 105 | let freelancerIsRegistered = getString(this, (callerPub + "_Freelancer")) | |
95 | 106 | match freelancerIsRegistered { | |
96 | 107 | case a: String => | |
97 | 108 | callerPub | |
98 | 109 | case _ => | |
99 | 110 | throw("Only registered users can make bets") | |
100 | 111 | } | |
101 | 112 | } | |
102 | 113 | ||
103 | 114 | ||
104 | 115 | func createAuctionPriceCheck (pmtAmount) = if ((pmtAmount > 0)) | |
105 | 116 | then pmtAmount | |
106 | 117 | else throw("Amount must be higher then 0") | |
107 | 118 | ||
108 | 119 | ||
109 | 120 | func getAuctionState (auctionId) = { | |
110 | 121 | let valueState = getString(this, (auctionId + "_State")) | |
111 | 122 | match valueState { | |
112 | 123 | case a: String => | |
113 | 124 | a | |
114 | 125 | case _ => | |
115 | 126 | throw("Auction State was not found") | |
116 | 127 | } | |
117 | 128 | } | |
118 | 129 | ||
119 | 130 | ||
120 | 131 | func getAuctionClientPub (auctionId) = { | |
121 | 132 | let valueClient = getString(this, (auctionId + "_AuctionClient")) | |
122 | - | let | |
133 | + | let clientPub = match valueClient { | |
123 | 134 | case a: String => | |
124 | 135 | a | |
125 | 136 | case _ => | |
126 | 137 | throw("Auction Client was not found") | |
127 | 138 | } | |
128 | - | fromBase58String( | |
139 | + | fromBase58String(clientPub) | |
129 | 140 | } | |
130 | 141 | ||
131 | 142 | ||
132 | 143 | func getAuctionStartTime (auctionId) = { | |
133 | 144 | let valueAuctionStart = getInteger(this, (auctionId + "_AuctionStart")) | |
134 | 145 | match valueAuctionStart { | |
135 | 146 | case a: Int => | |
136 | 147 | a | |
137 | 148 | case _ => | |
138 | 149 | throw("Auction Start time was not found") | |
139 | 150 | } | |
140 | 151 | } | |
141 | 152 | ||
142 | 153 | ||
143 | 154 | func getAuctionDurationTime (auctionId) = { | |
144 | 155 | let valueauctionDuration = getInteger(this, (auctionId + "_AuctionDuration")) | |
145 | 156 | match valueauctionDuration { | |
146 | 157 | case a: Int => | |
147 | 158 | a | |
148 | 159 | case _ => | |
149 | 160 | throw("Auction duration time was not found") | |
150 | 161 | } | |
151 | 162 | } | |
152 | 163 | ||
153 | 164 | ||
154 | 165 | func getAuctionJobPerformanceTime (auctionId) = { | |
155 | 166 | let valueBlocksForExecution = getInteger(this, (auctionId + "_JobPerformance")) | |
156 | 167 | match valueBlocksForExecution { | |
157 | 168 | case a: Int => | |
158 | 169 | a | |
159 | 170 | case _ => | |
160 | 171 | throw("Auction job performance time was not found") | |
161 | 172 | } | |
162 | 173 | } | |
163 | 174 | ||
164 | 175 | ||
165 | 176 | func getAuctionAssetName (auctionId) = { | |
166 | 177 | let valueAssetName = getString(this, (auctionId + "_AssetName")) | |
167 | 178 | match valueAssetName { | |
168 | 179 | case a: String => | |
169 | 180 | a | |
170 | 181 | case _ => | |
171 | 182 | throw("Auction asset name was not found") | |
172 | 183 | } | |
173 | 184 | } | |
174 | 185 | ||
175 | 186 | ||
176 | 187 | func getAuctionPrice (auctionId) = { | |
177 | 188 | let valuePrice = getInteger(this, (auctionId + "_Price")) | |
178 | 189 | match valuePrice { | |
179 | 190 | case a: Int => | |
180 | 191 | a | |
181 | 192 | case _ => | |
182 | 193 | throw("Auction price was not found") | |
183 | 194 | } | |
184 | 195 | } | |
185 | 196 | ||
186 | 197 | ||
187 | 198 | func getAuctionFreelancerPub (auctionId) = { | |
188 | 199 | let valueClient = getString(this, (auctionId + "_HiredFreelancer")) | |
189 | 200 | let a = match valueClient { | |
190 | 201 | case a: String => | |
191 | 202 | a | |
192 | 203 | case _ => | |
193 | 204 | throw("Auction Client was not found") | |
194 | 205 | } | |
195 | 206 | fromBase58String(a) | |
196 | 207 | } | |
197 | 208 | ||
198 | 209 | ||
199 | 210 | @Callable(i) | |
200 | 211 | func freelancerSignUp (info) = { | |
201 | 212 | let userPublicKey = toBase58String(i.callerPublicKey) | |
202 | 213 | let alreadyRegistered = getString(this, (userPublicKey + "_Freelancer")) | |
203 | 214 | if (isDefined(alreadyRegistered)) | |
204 | 215 | then throw("User already registered") | |
205 | - | else WriteSet([DataEntry((userPublicKey + "_Freelancer"), info)]) | |
216 | + | else WriteSet([DataEntry((userPublicKey + "_Freelancer"), info), DataEntry((userPublicKey + "_PendingEarnings"), 0), DataEntry((userPublicKey + "_PaidEarnings"), 0), DataEntry((userPublicKey + "_TotalEarnings"), 0), DataEntry((userPublicKey + "_JobsPending"), 0), DataEntry((userPublicKey + "_JobsCompleted"), 0), DataEntry((userPublicKey + "_JobsTotal"), 0)]) | |
206 | 217 | } | |
207 | 218 | ||
208 | 219 | ||
209 | 220 | ||
210 | 221 | @Callable(i) | |
211 | 222 | func clientSignUp (info) = { | |
212 | 223 | let userPublicKey = toBase58String(i.callerPublicKey) | |
213 | 224 | let alreadyRegistered = getString(this, (userPublicKey + "_Client")) | |
214 | 225 | if (isDefined(alreadyRegistered)) | |
215 | 226 | then throw("User already registered") | |
216 | - | else WriteSet([DataEntry((userPublicKey + "_Client"), info)]) | |
227 | + | else WriteSet([DataEntry((userPublicKey + "_Client"), info), DataEntry((userPublicKey + "_JobsCreated"), 0), DataEntry((userPublicKey + "_JobsOnGoing"), 0), DataEntry((userPublicKey + "_JobInDispute"), 0)]) | |
217 | 228 | } | |
218 | 229 | ||
219 | 230 | ||
220 | 231 | ||
221 | 232 | @Callable(i) | |
222 | 233 | func createAuction (jobExecutionDays,auctionDurationDays,auctionInfo) = { | |
223 | 234 | let auctionId = toBase58String(i.transactionId) | |
224 | 235 | let auctionClient = toBase58String(i.callerPublicKey) | |
225 | 236 | let pmt = extract(i.payment) | |
226 | 237 | let pmtAmount = pmt.amount | |
227 | 238 | let auctionPrice = createAuctionPriceCheck(pmtAmount) | |
228 | 239 | let auctionStart = height | |
229 | 240 | let auctionDurationBlocks = (auctionDurationDays * day) | |
230 | 241 | let blocksForExecution = (jobExecutionDays * day) | |
231 | 242 | let pmtAssetName = if (!(isDefined(pmt.assetId))) | |
232 | 243 | then "WAVES" | |
233 | 244 | else if ((pmt.assetId == wBTC)) | |
234 | 245 | then "BTC" | |
235 | 246 | else if ((pmt.assetId == wEUR)) | |
236 | 247 | then "EUR" | |
237 | 248 | else if ((pmt.assetId == wUSD)) | |
238 | 249 | then "USD" | |
239 | 250 | else throw("AssetId is incorrect") | |
251 | + | let jobsCreated = getInt((auctionClient + "_JobsCreated")) | |
240 | 252 | let newFreezedBalance = increaseFreezedBalance(pmtAssetName, auctionPrice) | |
241 | - | WriteSet([DataEntry((auctionId + "_State"), stateOpen), DataEntry((auctionId + "_Info"), auctionInfo), DataEntry((auctionId + "_AuctionClient"), 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)]) | |
253 | + | WriteSet([DataEntry((auctionId + "_State"), stateOpen), DataEntry((auctionId + "_Info"), auctionInfo), DataEntry((auctionId + "_AuctionClient"), 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), DataEntry((auctionClient + "_JobsCreated"), (jobsCreated + 1))]) | |
242 | 254 | } | |
243 | 255 | ||
244 | 256 | ||
245 | 257 | ||
246 | 258 | @Callable(i) | |
247 | 259 | func makeBid (auctionId,amount) = { | |
248 | 260 | let callerPub = toBase58String(i.callerPublicKey) | |
249 | 261 | let betTime = height | |
250 | 262 | let auctionState = getAuctionState(auctionId) | |
251 | 263 | let auctionClient = getAuctionClientPub(auctionId) | |
252 | 264 | let auctionStart = getAuctionStartTime(auctionId) | |
253 | 265 | let auctionDuration = getAuctionDurationTime(auctionId) | |
254 | 266 | let auctionBlocksForExecution = getAuctionJobPerformanceTime(auctionId) | |
255 | 267 | let auctionAssetName = getAuctionAssetName(auctionId) | |
256 | 268 | let auctionPrice = getAuctionPrice(auctionId) | |
257 | 269 | let auctionAssetId58 = AssetNameToBase58(auctionAssetName) | |
258 | 270 | let newFreelancer = freelancerIsRegistered(callerPub) | |
259 | 271 | let dAppCommission = ((auctionPrice * 3) / 100) | |
260 | 272 | let newFreezedBalance = decreaseFreezedBalance(auctionAssetName, auctionPrice) | |
261 | 273 | let bidAmount = bidAmountCheck(amount, auctionPrice) | |
262 | 274 | let auctionTimeisOver = timeCheck(betTime, auctionStart, auctionDuration) | |
263 | 275 | if (auctionTimeisOver) | |
264 | 276 | then if ((auctionState == stateOpen)) | |
265 | 277 | then ScriptResult(WriteSet([DataEntry((auctionId + "_State"), stateCancel), DataEntry((auctionAssetName + "_Freezed"), newFreezedBalance)]), TransferSet([ScriptTransfer(addressFromPublicKey(auctionClient), (auctionPrice - dAppCommission), auctionAssetId58)])) | |
266 | 278 | else if ((auctionState == stateSuggested)) | |
267 | 279 | then { | |
268 | 280 | let auctionLowestBidder = { | |
269 | 281 | let valueLowestBidder = getString(this, (auctionId + "_LowestBidderPub")) | |
270 | 282 | match valueLowestBidder { | |
271 | 283 | case a: String => | |
272 | 284 | a | |
273 | 285 | case _ => | |
274 | 286 | throw("Auction lowest bidder was not found") | |
275 | 287 | } | |
276 | 288 | } | |
277 | 289 | let newAuctionPrice = { | |
278 | 290 | let valueNewAuctionPrice = getInteger(this, ((auctionId + "_Bid_") + auctionLowestBidder)) | |
279 | 291 | match valueNewAuctionPrice { | |
280 | 292 | case a: Int => | |
281 | 293 | a | |
282 | 294 | case _ => | |
283 | 295 | throw("Auction lowest bid was not found") | |
284 | 296 | } | |
285 | 297 | } | |
286 | 298 | let amountDifference = ((auctionPrice - newAuctionPrice) - dAppCommission) | |
287 | 299 | ScriptResult(WriteSet([DataEntry((auctionId + "_State"), stateInProgress), DataEntry((auctionId + "_HiredFreelancer"), auctionLowestBidder), DataEntry((auctionId + "_Price"), newAuctionPrice)]), TransferSet([ScriptTransfer(addressFromPublicKey(auctionClient), amountDifference, auctionAssetId58)])) | |
288 | 300 | } | |
289 | 301 | else throw("Incorrect auction state") | |
290 | 302 | else if ((auctionState == stateOpen)) | |
291 | 303 | then WriteSet([DataEntry(((auctionId + "_Bid_") + newFreelancer), bidAmount), DataEntry((auctionId + "_State"), stateSuggested), DataEntry((auctionId + "_LowestBidderPub"), callerPub)]) | |
292 | 304 | else if ((auctionState == stateSuggested)) | |
293 | 305 | then { | |
294 | 306 | let currentLowestBidderPub = { | |
295 | 307 | let lowestBidder = getString(this, (auctionId + "_LowestBidderPub")) | |
296 | 308 | match lowestBidder { | |
297 | 309 | case a: String => | |
298 | 310 | a | |
299 | 311 | case _ => | |
300 | 312 | throw("Auction lowest bidder was not found") | |
301 | 313 | } | |
302 | 314 | } | |
303 | 315 | let newLowestBidderPub = { | |
304 | 316 | let valueCurrentLowestBid = getInteger(this, ((auctionId + "_Bid_") + currentLowestBidderPub)) | |
305 | 317 | let currentLowestBid = match valueCurrentLowestBid { | |
306 | 318 | case a: Int => | |
307 | 319 | a | |
308 | 320 | case _ => | |
309 | 321 | throw("Auction lowest bid was not found") | |
310 | 322 | } | |
311 | 323 | if ((currentLowestBid > bidAmount)) | |
312 | 324 | then newFreelancer | |
313 | 325 | else currentLowestBidderPub | |
314 | 326 | } | |
315 | 327 | WriteSet([DataEntry((auctionId + "_LowestBidderPub"), newLowestBidderPub), DataEntry(((auctionId + "_Bid_") + newFreelancer), bidAmount)]) | |
316 | 328 | } | |
317 | 329 | else throw(((((("Incorrect jobId state. Now: " + auctionState) + ", must be: ") + stateOpen) + " or ") + stateSuggested)) | |
318 | 330 | } | |
319 | 331 | ||
320 | 332 | ||
321 | 333 | ||
322 | 334 | @Callable(i) | |
323 | 335 | func chooseFreelancer (auctionId,freelancerPub) = { | |
324 | 336 | let callerPub = extract(i.callerPublicKey) | |
325 | 337 | let betTime = height | |
326 | 338 | let auctionState = getAuctionState(auctionId) | |
327 | 339 | let auctionClient = getAuctionClientPub(auctionId) | |
328 | 340 | let auctionStart = getAuctionStartTime(auctionId) | |
329 | 341 | let auctionDuration = getAuctionDurationTime(auctionId) | |
330 | 342 | let auctionAssetName = getAuctionAssetName(auctionId) | |
331 | 343 | let auctionPrice = getAuctionPrice(auctionId) | |
332 | 344 | let auctionAssetId58 = AssetNameToBase58(auctionAssetName) | |
345 | + | let jobsOnGoing = getInt((toBase58String(auctionClient) + "_JobsOnGoing")) | |
346 | + | let freelancerPendingEarnings = getInt((freelancerPub + "_PendingEarnings")) | |
347 | + | let freelancerTotalEarnings = getInt((freelancerPub + "_TotalEarnings")) | |
333 | 348 | let freelancerBidAmount = { | |
334 | 349 | let keyFreelancerBid = ((auctionId + "_Bid_") + freelancerPub) | |
335 | 350 | let valueFreelacerBid = getInteger(this, keyFreelancerBid) | |
336 | 351 | match valueFreelacerBid { | |
337 | 352 | case a: Int => | |
338 | 353 | a | |
339 | 354 | case _ => | |
340 | 355 | throw("Freelancer's bet was not found") | |
341 | 356 | } | |
342 | 357 | } | |
343 | 358 | let auctionTimeisOver = timeCheck(betTime, auctionStart, auctionDuration) | |
344 | 359 | if ((callerPub == auctionClient)) | |
345 | 360 | then if (auctionTimeisOver) | |
346 | 361 | then if ((auctionState == stateOpen)) | |
347 | 362 | then { | |
348 | 363 | let newFreezedBalance = decreaseFreezedBalance(auctionAssetName, auctionPrice) | |
349 | 364 | let dAppCommission = ((auctionPrice * 3) / 100) | |
350 | 365 | ScriptResult(WriteSet([DataEntry((auctionId + "_State"), stateCancel), DataEntry((auctionAssetName + "_Freezed"), newFreezedBalance)]), TransferSet([ScriptTransfer(addressFromPublicKey(auctionClient), (auctionPrice - dAppCommission), auctionAssetId58)])) | |
351 | 366 | } | |
352 | 367 | else if ((auctionState == stateSuggested)) | |
353 | 368 | then { | |
354 | 369 | let auctionLowestBidder = { | |
355 | 370 | let valueLowestBidder = getString(this, (auctionId + "_LowestBidderPub")) | |
356 | 371 | match valueLowestBidder { | |
357 | 372 | case a: String => | |
358 | 373 | a | |
359 | 374 | case _ => | |
360 | 375 | throw("Auction lowest bidder was not found") | |
361 | 376 | } | |
362 | 377 | } | |
363 | 378 | let newAuctionPrice = { | |
364 | 379 | let valueNewAuctionPrice = getInteger(this, ((auctionId + "_Bid_") + auctionLowestBidder)) | |
365 | 380 | match valueNewAuctionPrice { | |
366 | 381 | case a: Int => | |
367 | 382 | a | |
368 | 383 | case _ => | |
369 | 384 | throw("Auction lowest bid was not found") | |
370 | 385 | } | |
371 | 386 | } | |
372 | 387 | let amountDifference = (auctionPrice - newAuctionPrice) | |
373 | 388 | let newFreezedBalance = decreaseFreezedBalance(auctionAssetName, amountDifference) | |
374 | - | ScriptResult(WriteSet([DataEntry((auctionId + "_State"), stateInProgress), DataEntry((auctionId + "_HiredFreelancer"), auctionLowestBidder), DataEntry((auctionId + "_Price"), newAuctionPrice), DataEntry((auctionAssetName + "_Freezed"), newFreezedBalance)]), TransferSet([ScriptTransfer(addressFromPublicKey(auctionClient), amountDifference, auctionAssetId58)])) | |
389 | + | ScriptResult(WriteSet([DataEntry((auctionId + "_State"), stateInProgress), DataEntry((auctionId + "_HiredFreelancer"), auctionLowestBidder), DataEntry((auctionId + "_Price"), newAuctionPrice), DataEntry((auctionAssetName + "_Freezed"), newFreezedBalance), DataEntry((toBase58String(auctionClient) + "_JobsOnGoing"), (jobsOnGoing + 1)), DataEntry((freelancerPub + "_PendingEarnings"), (freelancerPendingEarnings + newAuctionPrice)), DataEntry((freelancerPub + "_TotalEarnings"), (freelancerTotalEarnings + newAuctionPrice))]), TransferSet([ScriptTransfer(addressFromPublicKey(auctionClient), amountDifference, auctionAssetId58)])) | |
375 | 390 | } | |
376 | 391 | else throw("Incorrect auction state") | |
377 | 392 | else { | |
378 | 393 | let setNewFreelancer = { | |
379 | 394 | let newFreelancer = getInteger(this, ((auctionId + "_Bid_") + freelancerPub)) | |
380 | 395 | match newFreelancer { | |
381 | 396 | case a: Int => | |
382 | 397 | freelancerPub | |
383 | 398 | case _ => | |
384 | 399 | throw("Error: Incorrect freelancerPub") | |
385 | 400 | } | |
386 | 401 | } | |
387 | 402 | let newAuctionPrice = { | |
388 | 403 | let freelancerBid = getInteger(this, ((auctionId + "_Bid_") + freelancerPub)) | |
389 | 404 | match freelancerBid { | |
390 | 405 | case a: Int => | |
391 | 406 | a | |
392 | 407 | case _ => | |
393 | 408 | throw("Auction lowest bidder was not found") | |
394 | 409 | } | |
395 | 410 | } | |
396 | 411 | let amountDifference = (auctionPrice - freelancerBidAmount) | |
397 | 412 | let newFreezedBalance = decreaseFreezedBalance(auctionAssetName, amountDifference) | |
398 | - | ScriptResult(WriteSet([DataEntry((auctionId + "_State"), stateInProgress), DataEntry((auctionId + "_HiredFreelancer"), setNewFreelancer), DataEntry((auctionId + "_Price"), newAuctionPrice), DataEntry((auctionAssetName + "_Freezed"), newFreezedBalance)]), TransferSet([ScriptTransfer(addressFromPublicKey(auctionClient), (amountDifference + 1), auctionAssetId58)])) | |
413 | + | ScriptResult(WriteSet([DataEntry((auctionId + "_State"), stateInProgress), DataEntry((auctionId + "_HiredFreelancer"), setNewFreelancer), DataEntry((auctionId + "_Price"), newAuctionPrice), DataEntry((auctionAssetName + "_Freezed"), newFreezedBalance), DataEntry((toBase58String(auctionClient) + "_JobsOnGoing"), (jobsOnGoing + 1)), DataEntry((freelancerPub + "_PendingEarnings"), (freelancerPendingEarnings + newAuctionPrice)), DataEntry((freelancerPub + "_TotalEarnings"), (freelancerTotalEarnings + newAuctionPrice))]), TransferSet([ScriptTransfer(addressFromPublicKey(auctionClient), (amountDifference + 1), auctionAssetId58)])) | |
399 | 414 | } | |
400 | 415 | else throw("Only auction customer can choose a freelancer") | |
401 | 416 | } | |
402 | 417 | ||
403 | 418 | ||
404 | 419 | ||
405 | 420 | @Callable(i) | |
406 | 421 | func increaseExecutionTime (auctionId,executionDays) = { | |
407 | 422 | let caller = extract(i.callerPublicKey) | |
408 | 423 | let auctionState = getAuctionState(auctionId) | |
409 | 424 | let auctionClient = getAuctionClientPub(auctionId) | |
410 | 425 | let auctionBlocksForExecution = getAuctionJobPerformanceTime(auctionId) | |
411 | 426 | let newAuctionExecutionTime = { | |
412 | 427 | let newAuctionBlocksForExecution = (executionDays * day) | |
413 | 428 | if ((newAuctionBlocksForExecution > auctionBlocksForExecution)) | |
414 | 429 | then newAuctionBlocksForExecution | |
415 | 430 | else throw("New execution time must more than current execution time") | |
416 | 431 | } | |
417 | 432 | if ((caller == auctionClient)) | |
418 | 433 | then if (if (if ((auctionState == stateOpen)) | |
419 | 434 | then true | |
420 | 435 | else (auctionState == stateSuggested)) | |
421 | 436 | then true | |
422 | 437 | else (auctionState == stateInProgress)) | |
423 | 438 | then WriteSet([DataEntry((auctionId + "_JobPerformance"), newAuctionExecutionTime)]) | |
424 | 439 | else throw("Incorrect state") | |
425 | 440 | else throw("Only Client can increase execution time") | |
426 | 441 | } | |
427 | 442 | ||
428 | 443 | ||
429 | 444 | ||
430 | 445 | @Callable(i) | |
431 | 446 | func cancelAuction (auctionId) = { | |
432 | 447 | let callerPub = extract(i.callerPublicKey) | |
433 | 448 | let auctionState = getAuctionState(auctionId) | |
434 | 449 | let auctionClient = getAuctionClientPub(auctionId) | |
435 | 450 | let auctionAssetName = getAuctionAssetName(auctionId) | |
436 | 451 | let auctionPrice = getAuctionPrice(auctionId) | |
437 | 452 | let auctionAssetId58 = AssetNameToBase58(auctionAssetName) | |
438 | 453 | let dAppCommission = ((auctionPrice * 3) / 100) | |
439 | 454 | let amountWithoutComm = (auctionPrice - dAppCommission) | |
440 | 455 | let newFreezedBalance = decreaseFreezedBalance(auctionAssetName, auctionPrice) | |
441 | - | let callerIsClient = if ((callerPub == auctionClient)) | |
442 | - | then true | |
443 | - | else throw("Auction can be canceled only by auction owner.") | |
444 | - | if (callerIsClient) | |
456 | + | if ((callerPub == auctionClient)) | |
445 | 457 | then if ((auctionState == stateOpen)) | |
446 | 458 | then ScriptResult(WriteSet([DataEntry((auctionId + "_State"), stateCancel), DataEntry((auctionAssetName + "_Freezed"), newFreezedBalance)]), TransferSet([ScriptTransfer(addressFromPublicKey(auctionClient), amountWithoutComm, auctionAssetId58)])) | |
447 | - | else throw(" | |
459 | + | else throw("Auction can be canceled only by auction owner.") | |
448 | 460 | else throw("Only Client can cancel auction") | |
449 | 461 | } | |
450 | 462 | ||
451 | 463 | ||
452 | 464 | ||
453 | 465 | @Callable(i) | |
454 | 466 | func openDispute (auctionId) = { | |
455 | 467 | let caller = extract(i.callerPublicKey) | |
456 | 468 | let auctionState = getAuctionState(auctionId) | |
457 | 469 | let auctionClient = getAuctionClientPub(auctionId) | |
458 | 470 | let auctionFreelancer = getAuctionFreelancerPub(auctionId) | |
471 | + | let clientJobsInDispute = getInt((toBase58String(auctionClient) + "_JobsInDispute")) | |
459 | 472 | if (if ((auctionState == stateOpen)) | |
460 | 473 | then true | |
461 | 474 | else (auctionState == stateSuggested)) | |
462 | 475 | then throw("Incorrect auction state for dispute opening") | |
463 | 476 | else if (if ((caller == auctionClient)) | |
464 | 477 | then true | |
465 | 478 | else (caller == auctionFreelancer)) | |
466 | - | then WriteSet([DataEntry((auctionId + "_State"), stateDispute), DataEntry((auctionId + "_DisputeVotes"), 0)]) | |
467 | - | else throw("Only | |
479 | + | then WriteSet([DataEntry((auctionId + "_State"), stateDispute), DataEntry((auctionId + "_DisputeVotes"), 0), DataEntry((toBase58String(auctionClient) + "_JobInDispute"), (clientJobsInDispute + 1))]) | |
480 | + | else throw("Only Client and Freelancer can open dispute") | |
468 | 481 | } | |
469 | 482 | ||
470 | 483 | ||
471 | 484 | ||
472 | 485 | @Callable(i) | |
473 | 486 | func voteDispute (auctionId,vote) = { | |
474 | 487 | let callerPub = extract(i.callerPublicKey) | |
475 | 488 | let auctionState = getAuctionState(auctionId) | |
476 | 489 | let auctionClient = getAuctionClientPub(auctionId) | |
477 | 490 | let auctionAssetName = getAuctionAssetName(auctionId) | |
478 | 491 | let auctionPrice = getAuctionPrice(auctionId) | |
479 | 492 | let auctionFreelancer = getAuctionFreelancerPub(auctionId) | |
480 | 493 | let commission = ((auctionPrice * 3) / 100) | |
481 | 494 | let auctionAssetId58 = AssetNameToBase58(auctionAssetName) | |
495 | + | let clientJobsInDispute = getInt((toBase58String(auctionClient) + "_JobsInDispute")) | |
482 | 496 | let callerIsAmbassador = if (if (if (if (if ((callerPub == ambassador1)) | |
483 | 497 | then true | |
484 | 498 | else (callerPub == ambassador2)) | |
485 | 499 | then true | |
486 | 500 | else (callerPub == ambassador3)) | |
487 | 501 | then true | |
488 | 502 | else (callerPub == ambassador4)) | |
489 | 503 | then true | |
490 | 504 | else (callerPub == ambassador5)) | |
491 | 505 | then toBase58String(callerPub) | |
492 | 506 | else throw("Only defined ambassadors can vote in disputes") | |
493 | 507 | let newVote = if (if ((vote == client)) | |
494 | 508 | then true | |
495 | 509 | else (vote == freelancer)) | |
496 | 510 | then vote | |
497 | 511 | else throw(((("Vote is incorrect. Must be: " + client) + " or ") + freelancer)) | |
498 | 512 | let newVoter = { | |
499 | 513 | let keyVoter = ((auctionId + "_DiputeVote_") + callerIsAmbassador) | |
500 | 514 | let valueVoter = getString(this, keyVoter) | |
501 | 515 | match valueVoter { | |
502 | 516 | case a: String => | |
503 | 517 | throw("User already voted") | |
504 | 518 | case _ => | |
505 | 519 | callerIsAmbassador | |
506 | 520 | } | |
507 | 521 | } | |
508 | 522 | let votesNumber = { | |
509 | 523 | let valueVotesNumber = getInteger(this, (auctionId + "_DisputeVotes")) | |
510 | 524 | match valueVotesNumber { | |
511 | 525 | case a: Int => | |
512 | 526 | a | |
513 | 527 | case _ => | |
514 | 528 | throw("VotesNumber was not found") | |
515 | 529 | } | |
516 | 530 | } | |
517 | 531 | if ((auctionState == stateDispute)) | |
518 | 532 | then if ((votesNumber == 4)) | |
519 | 533 | then { | |
520 | 534 | let disputeWinner = { | |
521 | 535 | let ambassador1Vote = getString(this, ((auctionId + "_DiputeVote_") + toBase58String(ambassador1))) | |
522 | 536 | let ambassador2Vote = getString(this, ((auctionId + "_DiputeVote_") + toBase58String(ambassador2))) | |
523 | 537 | let ambassador3Vote = getString(this, ((auctionId + "_DiputeVote_") + toBase58String(ambassador3))) | |
524 | 538 | let ambassador4Vote = getString(this, ((auctionId + "_DiputeVote_") + toBase58String(ambassador4))) | |
525 | 539 | let ambassador5Vote = getString(this, ((auctionId + "_DiputeVote_") + toBase58String(ambassador5))) | |
526 | 540 | let v1 = if ((ambassador1Vote == client)) | |
527 | 541 | then 1 | |
528 | 542 | else 0 | |
529 | 543 | let v2 = if ((ambassador2Vote == client)) | |
530 | 544 | then 1 | |
531 | 545 | else 0 | |
532 | 546 | let v3 = if ((ambassador3Vote == client)) | |
533 | 547 | then 1 | |
534 | 548 | else 0 | |
535 | 549 | let v4 = if ((ambassador4Vote == client)) | |
536 | 550 | then 1 | |
537 | 551 | else 0 | |
538 | 552 | let v5 = if ((ambassador5Vote == client)) | |
539 | 553 | then 1 | |
540 | 554 | else 0 | |
541 | 555 | let currentVote = if ((newVote == client)) | |
542 | 556 | then 1 | |
543 | 557 | else 0 | |
544 | 558 | let votesForClient = (((((v1 + v2) + v3) + v4) + v5) + currentVote) | |
545 | 559 | if ((votesForClient > 2)) | |
546 | 560 | then auctionClient | |
547 | 561 | else auctionFreelancer | |
548 | 562 | } | |
549 | 563 | let paymentWithoutComm = if ((disputeWinner == auctionClient)) | |
550 | 564 | then (auctionPrice - commission) | |
551 | 565 | else (auctionPrice - (commission * 2)) | |
552 | 566 | let newFreezedBalance = decreaseFreezedBalance(auctionAssetName, auctionPrice) | |
553 | - | ScriptResult(WriteSet([DataEntry((auctionId + "_DisputeVotes"), (votesNumber + 1)), DataEntry((auctionId + "_State"), stateDisputeResolved), DataEntry(((auctionId + "_DiputeVote_") + callerIsAmbassador), newVote), DataEntry((auctionAssetName + "_Freezed"), newFreezedBalance)]), TransferSet([ScriptTransfer(addressFromPublicKey(disputeWinner), paymentWithoutComm, auctionAssetId58)])) | |
567 | + | ScriptResult(WriteSet([DataEntry((auctionId + "_DisputeVotes"), (votesNumber + 1)), DataEntry((auctionId + "_State"), stateDisputeResolved), DataEntry(((auctionId + "_DiputeVote_") + callerIsAmbassador), newVote), DataEntry((auctionAssetName + "_Freezed"), newFreezedBalance), DataEntry((toBase58String(auctionClient) + "_JobInDispute"), (clientJobsInDispute - 1))]), TransferSet([ScriptTransfer(addressFromPublicKey(disputeWinner), paymentWithoutComm, auctionAssetId58)])) | |
554 | 568 | } | |
555 | 569 | else WriteSet([DataEntry((auctionId + "_DisputeVotes"), (votesNumber + 1)), DataEntry(((auctionId + "_DiputeVote_") + callerIsAmbassador), newVote)]) | |
556 | 570 | else throw(("Incorrect state. Must be: " + stateDispute)) | |
557 | 571 | } | |
558 | 572 | ||
559 | 573 | ||
560 | 574 | ||
561 | 575 | @Callable(i) | |
562 | 576 | func workHandOver (auctionId) = { | |
563 | 577 | let callerPub = extract(i.callerPublicKey) | |
564 | 578 | let auctionState = getAuctionState(auctionId) | |
579 | + | let auctionClient = getAuctionClientPub(auctionId) | |
565 | 580 | let auctionStart = getAuctionStartTime(auctionId) | |
566 | 581 | let auctionDuration = getAuctionDurationTime(auctionId) | |
567 | 582 | let auctionBlocksForExecution = getAuctionJobPerformanceTime(auctionId) | |
568 | 583 | let auctionFreelancer = getAuctionFreelancerPub(auctionId) | |
584 | + | let clientJobsInDispute = getInt((toBase58String(auctionClient) + "_JobsInDispute")) | |
569 | 585 | let currentTime = height | |
570 | 586 | let freelancerPubCheck = if ((callerPub == auctionFreelancer)) | |
571 | 587 | then callerPub | |
572 | 588 | else throw("Only a freelancer can indicate that the work is done") | |
573 | 589 | let timeIsOver = ((currentTime - auctionStart) > auctionBlocksForExecution) | |
574 | 590 | if ((auctionState == stateInProgress)) | |
575 | 591 | then if (timeIsOver) | |
576 | - | then WriteSet([DataEntry((auctionId + "_State"), stateDispute), DataEntry((auctionId + "_DisputeVotes"), "0")]) | |
592 | + | then WriteSet([DataEntry((auctionId + "_State"), stateDispute), DataEntry((auctionId + "_DisputeVotes"), "0"), DataEntry((toBase58String(auctionClient) + "_JobInDispute"), (clientJobsInDispute + 1))]) | |
577 | 593 | else WriteSet([DataEntry((auctionId + "_State"), stateWait4Confirm)]) | |
578 | 594 | else throw("Auction state is incorrect") | |
579 | 595 | } | |
580 | 596 | ||
581 | 597 | ||
582 | 598 | ||
583 | 599 | @Callable(i) | |
584 | 600 | func acceptWork (auctionId) = { | |
585 | 601 | let callerPub = extract(i.callerPublicKey) | |
586 | 602 | let auctionState = getAuctionState(auctionId) | |
587 | 603 | let auctionClient = getAuctionClientPub(auctionId) | |
588 | 604 | let auctionStart = getAuctionStartTime(auctionId) | |
589 | 605 | let auctionDuration = getAuctionDurationTime(auctionId) | |
590 | 606 | let auctionAssetName = getAuctionAssetName(auctionId) | |
591 | 607 | let auctionPrice = getAuctionPrice(auctionId) | |
592 | 608 | let auctionFreelancer = getAuctionFreelancerPub(auctionId) | |
609 | + | let jobsOnGoing = getInt((toBase58String(auctionClient) + "_JobsOnGoing")) | |
610 | + | let freelancerPendingEarnings = getInt((toBase58String(auctionFreelancer) + "_PendingEarnings")) | |
611 | + | let freelancerPaidEarnings = getInt((toBase58String(auctionFreelancer) + "_PaidEarnings")) | |
593 | 612 | let dAppCommission = ((auctionPrice * 3) / 100) | |
594 | 613 | let amountWithoutComm = (auctionPrice - dAppCommission) | |
595 | 614 | let auctionAssetId58 = AssetNameToBase58(auctionAssetName) | |
596 | 615 | let newFreezedBalance = decreaseFreezedBalance(auctionAssetName, auctionPrice) | |
597 | 616 | let newRating = { | |
598 | 617 | let valueRating = getInteger(this, (toBase58String(auctionFreelancer) + "_Rating")) | |
599 | 618 | let currentRating = match valueRating { | |
600 | 619 | case a: Int => | |
601 | 620 | a | |
602 | 621 | case _ => | |
603 | 622 | 0 | |
604 | 623 | } | |
605 | 624 | (currentRating + 1) | |
606 | 625 | } | |
607 | 626 | if ((callerPub == auctionClient)) | |
608 | 627 | then if ((auctionState == stateWait4Confirm)) | |
609 | - | then ScriptResult(WriteSet([DataEntry((auctionId + "_State"), stateComplete), DataEntry((toBase58String(auctionFreelancer) + "_Rating"), newRating), DataEntry((auctionAssetName + "_Freezed"), newFreezedBalance)]), TransferSet([ScriptTransfer(addressFromPublicKey(auctionFreelancer), amountWithoutComm, auctionAssetId58)])) | |
628 | + | then ScriptResult(WriteSet([DataEntry((auctionId + "_State"), stateComplete), DataEntry((toBase58String(auctionFreelancer) + "_Rating"), newRating), DataEntry((auctionAssetName + "_Freezed"), newFreezedBalance), DataEntry((toBase58String(auctionClient) + "_JobsOnGoing"), (jobsOnGoing - 1)), DataEntry((toBase58String(auctionFreelancer) + "_PendingEarnings"), (freelancerPendingEarnings - auctionPrice)), DataEntry((toBase58String(auctionFreelancer) + "_PaidEarnings"), (freelancerPaidEarnings + auctionPrice))]), TransferSet([ScriptTransfer(addressFromPublicKey(auctionFreelancer), amountWithoutComm, auctionAssetId58)])) | |
610 | 629 | else throw(("Incorrect state. Must be: " + stateWait4Confirm)) | |
611 | 630 | else throw("Only auction customer can use this function") | |
612 | 631 | } | |
613 | 632 | ||
614 | 633 | ||
615 | 634 | @Verifier(tx) | |
616 | 635 | func verify () = if (sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)) | |
617 | 636 | then match tx { | |
618 | 637 | case ttx: TransferTransaction => | |
619 | 638 | true | |
620 | 639 | case stx: SetScriptTransaction => | |
621 | 640 | true | |
622 | 641 | case _ => | |
623 | 642 | false | |
624 | 643 | } | |
625 | 644 | else false | |
626 | 645 |
github/deemru/w8io/026f985 92.76 ms ◑