tx · XJKBJEN7mYa7WGJdKWiHEyn5ZLSrspHmaUDL4goW6au 3N2EM5HFgf6UMBnvcJX3Cegmozwdv1iDeq2: -0.01500000 Waves 2019.09.27 18:34 [695009] smart account 3N2EM5HFgf6UMBnvcJX3Cegmozwdv1iDeq2 > SELF 0.00000000 Waves
{ "type": 13, "id": "XJKBJEN7mYa7WGJdKWiHEyn5ZLSrspHmaUDL4goW6au", "fee": 1500000, "feeAssetId": null, "timestamp": 1569598451035, "version": 1, "sender": "3N2EM5HFgf6UMBnvcJX3Cegmozwdv1iDeq2", "senderPublicKey": "8y2Uc9uYf5gRD6Dzm1aC73zYe3LZvtVDUVAnAhNdN2mg", "proofs": [ "2f9EwXLK4CrHW2SEYKHCryKhMxQ1Zq6koP26Ru4TzyGdUyggR5N3enSrUjhMxbdznSnjPeAUYd3gnX6aFPp1wwRt" ], "script": "base64:AAIDAAAAAAAAAD8IARIDCgEIEgMKAQgSBQoDAQEIEgQKAggBEgQKAggIEgQKAggBEgMKAQgSAwoBCBIECgIICBIDCgEIEgMKAQgAAAAcAAAAAANkYXkAAAAAAAAABaAAAAAABVdBVkVTBQAAAAR1bml0AAAAAAR3QlRDAQAAACBs+mr/xe2qjAt/tSqT0qIML4KC23R6BIxT+/0TH3Og/wAAAAAEd0VVUgEAAAAg7BZhBF97kSFBBjs38+fX1Pjz08YOqoCX85C/0PoVupkAAAAABHdVU0QBAAAAIN0cvQHwz3UFMHgHsqi2OJjRRd1cH7ozWuNAb/pmWXD9AAAAAAlzdGF0ZU9wZW4CAAAABk9wZW5lZAAAAAAOc3RhdGVTdWdnZXN0ZWQCAAAACVN1Z2dlc3RlZAAAAAALc3RhdGVDYW5jZWwCAAAACENhbmNlbGVkAAAAAA9zdGF0ZUluUHJvZ3Jlc3MCAAAACkluUHJvZ3Jlc3MAAAAAEXN0YXRlV2FpdDRDb25maXJtAgAAABNXYWl0Rm9yQ29uZmlybWF0aW9uAAAAAA1zdGF0ZUNvbXBsZXRlAgAAAAlDb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G1hdGNoMAIAAAAUU2V0U2NyaXB0VHJhbnNhY3Rpb24EAAAAA3N0eAUAAAAHJG1hdGNoMAYHB8n6vx4=", "chainId": 84, "height": 695009, "spentComplexity": 0 } View: original | compacted Prev: 3qMjexYts2QBnGdDhs9mdLQV28o8Vvfwj3FD45NJEnMd Next: CvwrnBQyiABCgLwSjiYZVqzJyRy4wxXsaFABh8Xj8ox4 Diff:
Old | New | Differences | |
---|---|---|---|
372 | 372 | } | |
373 | 373 | let auctionAssetId58 = AssetNameToBase58(auctionAssetName) | |
374 | 374 | let freelancerBidAmount = { | |
375 | - | let keyFreelancerBid = ((auctionId + "_") + freelancerPub) | |
375 | + | let keyFreelancerBid = ((auctionId + "_Bid_") + freelancerPub) | |
376 | 376 | let valueFreelacerBid = getInteger(this, keyFreelancerBid) | |
377 | 377 | match valueFreelacerBid { | |
378 | 378 | case a: Int => | |
381 | 381 | throw("Freelancer's bet was not found") | |
382 | 382 | } | |
383 | 383 | } | |
384 | - | let newFreezedBalance = decreaseFreezedBalance(auctionAssetName, auctionPrice) | |
385 | 384 | let dAppCommission = ((auctionPrice * 3) / 100) | |
386 | 385 | let amountDifference = ((auctionPrice - freelancerBidAmount) - dAppCommission) | |
387 | 386 | let auctionTimeisOver = timeCheck(betTime, auctionStart, auctionDuration) | |
388 | 387 | if ((callerPub == auctionClient)) | |
389 | 388 | then if (auctionTimeisOver) | |
390 | 389 | then if ((auctionState == stateOpen)) | |
391 | - | then ScriptResult(WriteSet([DataEntry((auctionId + "_State"), stateCancel), DataEntry((auctionAssetName + "_Freezed"), newFreezedBalance)]), TransferSet([ScriptTransfer(addressFromPublicKey(auctionClient), (auctionPrice - dAppCommission), auctionAssetId58)])) | |
390 | + | then { | |
391 | + | let newPrice = (auctionPrice - dAppCommission) | |
392 | + | let newFreezedBalance = decreaseFreezedBalance(auctionAssetName, newPrice) | |
393 | + | ScriptResult(WriteSet([DataEntry((auctionId + "_State"), stateCancel), DataEntry((auctionAssetName + "_Freezed"), newFreezedBalance)]), TransferSet([ScriptTransfer(addressFromPublicKey(auctionClient), newPrice, auctionAssetId58)])) | |
394 | + | } | |
392 | 395 | else if ((auctionState == stateSuggested)) | |
393 | 396 | then { | |
394 | 397 | let auctionLowestBidder = { | |
423 | 426 | } | |
424 | 427 | } | |
425 | 428 | let setNewPrice = { | |
426 | - | let | |
427 | - | match | |
429 | + | let freelancerBid = getInteger(this, ((auctionId + "_Bid_") + freelancerPub)) | |
430 | + | match freelancerBid { | |
428 | 431 | case a: Int => | |
429 | 432 | a | |
430 | 433 | case _ => | |
431 | 434 | throw("Auction lowest bidder was not found") | |
432 | 435 | } | |
433 | 436 | } | |
434 | - | ScriptResult(WriteSet([DataEntry((auctionId + "_State"), stateInProgress), DataEntry((auctionId + "_Freelancer"), setNewFreelancer), DataEntry((auctionId + "_Price"), setNewPrice)]), TransferSet([ScriptTransfer(addressFromPublicKey(auctionClient), amountDifference, auctionAssetId58)])) | |
437 | + | let newFreezedBalance = decreaseFreezedBalance(auctionAssetName, setNewPrice) | |
438 | + | ScriptResult(WriteSet([DataEntry((auctionId + "_State"), stateInProgress), DataEntry((auctionId + "_Freelancer"), setNewFreelancer), DataEntry((auctionId + "_Price"), setNewPrice), DataEntry((auctionAssetName + "_Freezed"), newFreezedBalance)]), TransferSet([ScriptTransfer(addressFromPublicKey(auctionClient), amountDifference, auctionAssetId58)])) | |
435 | 439 | } | |
436 | 440 | else throw("Only auction customer can choose a freelancer") | |
437 | 441 | } | |
689 | 693 | let paymentWithoutComm = if ((disputeWinner == auctionClient)) | |
690 | 694 | then auctionPrice | |
691 | 695 | else (auctionPrice - comission) | |
692 | - | ScriptResult(WriteSet([DataEntry((auctionId + "_DisputeVotes"), (votesNumber + 1)), DataEntry((auctionId + "_State"), stateDisputeResolved), DataEntry(((auctionId + "_DiputeVote_") + callerIsAmbassador), newVote)]), TransferSet([ScriptTransfer(addressFromPublicKey(disputeWinner), paymentWithoutComm, auctionAssetId58)])) | |
696 | + | let newFreezedBalance = decreaseFreezedBalance(auctionAssetName, paymentWithoutComm) | |
697 | + | 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)])) | |
693 | 698 | } | |
694 | 699 | else WriteSet([DataEntry((auctionId + "_DisputeVotes"), (votesNumber + 1)), DataEntry(((auctionId + "_DiputeVote_") + callerIsAmbassador), newVote)]) | |
695 | 700 | else throw(("Incorrect state. Must be: " + stateDispute)) |
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 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 | 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 | 83 | func timeCheck (currentTime,startTime,expirationTime) = ((currentTime - startTime) > expirationTime) | |
84 | 84 | ||
85 | 85 | ||
86 | 86 | func increaseFreezedBalance (pmtAssetName,auctionPrice) = { | |
87 | 87 | let keyFreezedFunds = getInteger(this, (pmtAssetName + "_Freezed")) | |
88 | 88 | let currentFreezedBalance = match keyFreezedFunds { | |
89 | 89 | case a: Int => | |
90 | 90 | a | |
91 | 91 | case _ => | |
92 | 92 | 0 | |
93 | 93 | } | |
94 | 94 | (currentFreezedBalance + auctionPrice) | |
95 | 95 | } | |
96 | 96 | ||
97 | 97 | ||
98 | 98 | func decreaseFreezedBalance (pmtAssetName,auctionPrice) = { | |
99 | 99 | let keyFreezedFunds = getInteger(this, (pmtAssetName + "_Freezed")) | |
100 | 100 | let currentFreezedBalance = match keyFreezedFunds { | |
101 | 101 | case a: Int => | |
102 | 102 | a | |
103 | 103 | case _ => | |
104 | 104 | 0 | |
105 | 105 | } | |
106 | 106 | let a = (currentFreezedBalance - auctionPrice) | |
107 | 107 | if ((a > 0)) | |
108 | 108 | then a | |
109 | 109 | else throw("Freezed amount couldn't be less than 0") | |
110 | 110 | } | |
111 | 111 | ||
112 | 112 | ||
113 | 113 | func freelancerIsRegistered (callerPub) = { | |
114 | 114 | let freelancerIsRegistered = getString(this, (callerPub + "_Freelancer")) | |
115 | 115 | match freelancerIsRegistered { | |
116 | 116 | case a: String => | |
117 | 117 | callerPub | |
118 | 118 | case _ => | |
119 | 119 | throw("Only registered users can make bets") | |
120 | 120 | } | |
121 | 121 | } | |
122 | 122 | ||
123 | 123 | ||
124 | 124 | @Callable(i) | |
125 | 125 | func freelancerSignUp (info) = { | |
126 | 126 | let userPublicKey = toBase58String(i.callerPublicKey) | |
127 | 127 | let alreadyRegistered = getString(this, (userPublicKey + "_Freelancer")) | |
128 | 128 | if (isDefined(alreadyRegistered)) | |
129 | 129 | then throw("User already registered") | |
130 | 130 | else WriteSet([DataEntry((userPublicKey + "_Freelancer"), info)]) | |
131 | 131 | } | |
132 | 132 | ||
133 | 133 | ||
134 | 134 | ||
135 | 135 | @Callable(i) | |
136 | 136 | func clientSignUp (info) = { | |
137 | 137 | let userPublicKey = toBase58String(i.callerPublicKey) | |
138 | 138 | let alreadyRegistered = getString(this, (userPublicKey + "_Client")) | |
139 | 139 | if (isDefined(alreadyRegistered)) | |
140 | 140 | then throw("User already registered") | |
141 | 141 | else WriteSet([DataEntry((userPublicKey + "_Client"), info)]) | |
142 | 142 | } | |
143 | 143 | ||
144 | 144 | ||
145 | 145 | ||
146 | 146 | @Callable(i) | |
147 | 147 | func createAuction (jobExecutionDays,auctionDurationDays,auctionInfo) = { | |
148 | 148 | let auctionId = toBase58String(i.transactionId) | |
149 | 149 | let auctionClient = toBase58String(i.callerPublicKey) | |
150 | 150 | let pmt = extract(i.payment) | |
151 | 151 | let pmtAmount = pmt.amount | |
152 | 152 | let auctionPrice = if ((pmtAmount > 0)) | |
153 | 153 | then pmtAmount | |
154 | 154 | else throw("Amount must be higher then 0") | |
155 | 155 | let auctionStart = height | |
156 | 156 | let auctionDurationBlocks = (auctionDurationDays * day) | |
157 | 157 | let blocksForExecution = (jobExecutionDays * day) | |
158 | 158 | let pmtAssetName = if (!(isDefined(pmt.assetId))) | |
159 | 159 | then "WAVES" | |
160 | 160 | else if ((pmt.assetId == wBTC)) | |
161 | 161 | then "BTC" | |
162 | 162 | else if ((pmt.assetId == wEUR)) | |
163 | 163 | then "EUR" | |
164 | 164 | else if ((pmt.assetId == wUSD)) | |
165 | 165 | then "USD" | |
166 | 166 | else throw("AssetId is incorrect") | |
167 | 167 | let newFreezedBalance = increaseFreezedBalance(pmtAssetName, auctionPrice) | |
168 | 168 | WriteSet([DataEntry((auctionId + "_State"), stateOpen), 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)]) | |
169 | 169 | } | |
170 | 170 | ||
171 | 171 | ||
172 | 172 | ||
173 | 173 | @Callable(i) | |
174 | 174 | func makeBid (auctionId,betPrice) = { | |
175 | 175 | let callerPub = toBase58String(i.callerPublicKey) | |
176 | 176 | let betTime = height | |
177 | 177 | let auctionState = { | |
178 | 178 | let valueState = getString(this, (auctionId + "_State")) | |
179 | 179 | match valueState { | |
180 | 180 | case a: String => | |
181 | 181 | a | |
182 | 182 | case _ => | |
183 | 183 | throw("Auction State was not found") | |
184 | 184 | } | |
185 | 185 | } | |
186 | 186 | let auctionInfo = { | |
187 | 187 | let valueAuctionInfo = getString(this, (auctionId + "_Info")) | |
188 | 188 | match valueAuctionInfo { | |
189 | 189 | case a: String => | |
190 | 190 | a | |
191 | 191 | case _ => | |
192 | 192 | throw("Auction info was not found") | |
193 | 193 | } | |
194 | 194 | } | |
195 | 195 | let auctionClient = { | |
196 | 196 | let valueClient = getString(this, (auctionId + "_Client")) | |
197 | 197 | let a = match valueClient { | |
198 | 198 | case a: String => | |
199 | 199 | a | |
200 | 200 | case _ => | |
201 | 201 | throw("Auction Client was not found") | |
202 | 202 | } | |
203 | 203 | fromBase58String(a) | |
204 | 204 | } | |
205 | 205 | let auctionStart = { | |
206 | 206 | let valueAuctionStart = getInteger(this, (auctionId + "_AuctionStart")) | |
207 | 207 | match valueAuctionStart { | |
208 | 208 | case a: Int => | |
209 | 209 | a | |
210 | 210 | case _ => | |
211 | 211 | throw("Auction Start time was not found") | |
212 | 212 | } | |
213 | 213 | } | |
214 | 214 | let auctionDuration = { | |
215 | 215 | let valueauctionDuration = getInteger(this, (auctionId + "_AuctionDuration")) | |
216 | 216 | match valueauctionDuration { | |
217 | 217 | case a: Int => | |
218 | 218 | a | |
219 | 219 | case _ => | |
220 | 220 | throw("Auction duration time was not found") | |
221 | 221 | } | |
222 | 222 | } | |
223 | 223 | let auctionBlocksForExecution = { | |
224 | 224 | let valueBlocksForExecution = getInteger(this, (auctionId + "JobPerformance")) | |
225 | 225 | match valueBlocksForExecution { | |
226 | 226 | case a: Int => | |
227 | 227 | a | |
228 | 228 | case _ => | |
229 | 229 | throw("Auction job performance time was not found") | |
230 | 230 | } | |
231 | 231 | } | |
232 | 232 | let auctionAssetName = { | |
233 | 233 | let valueAssetName = getString(this, (auctionId + "_AssetName")) | |
234 | 234 | match valueAssetName { | |
235 | 235 | case a: String => | |
236 | 236 | a | |
237 | 237 | case _ => | |
238 | 238 | throw("Auction asset name was not found") | |
239 | 239 | } | |
240 | 240 | } | |
241 | 241 | let auctionPrice = { | |
242 | 242 | let valuePrice = getInteger(this, (auctionId + "_Price")) | |
243 | 243 | match valuePrice { | |
244 | 244 | case a: Int => | |
245 | 245 | a | |
246 | 246 | case _ => | |
247 | 247 | throw("Auction price was not found") | |
248 | 248 | } | |
249 | 249 | } | |
250 | 250 | let auctionAssetId58 = AssetNameToBase58(auctionAssetName) | |
251 | 251 | let newFreelancer = freelancerIsRegistered(callerPub) | |
252 | 252 | let dAppCommission = ((auctionPrice * 3) / 100) | |
253 | 253 | let newFreezedBalance = decreaseFreezedBalance(auctionAssetName, auctionPrice) | |
254 | 254 | let auctionTimeisOver = timeCheck(betTime, auctionStart, auctionDuration) | |
255 | 255 | if (auctionTimeisOver) | |
256 | 256 | then if ((auctionState == stateOpen)) | |
257 | 257 | then ScriptResult(WriteSet([DataEntry((auctionId + "_State"), stateCancel), DataEntry((auctionAssetName + "_Freezed"), newFreezedBalance)]), TransferSet([ScriptTransfer(addressFromPublicKey(auctionClient), (auctionPrice - dAppCommission), auctionAssetId58)])) | |
258 | 258 | else if ((auctionState == stateSuggested)) | |
259 | 259 | then { | |
260 | 260 | let auctionLowestBidder = { | |
261 | 261 | let valueLowestBidder = getString(this, (auctionId + "_LowestBidderPub")) | |
262 | 262 | match valueLowestBidder { | |
263 | 263 | case a: String => | |
264 | 264 | a | |
265 | 265 | case _ => | |
266 | 266 | throw("Auction lowest bidder was not found") | |
267 | 267 | } | |
268 | 268 | } | |
269 | 269 | let newAuctionPrice = { | |
270 | 270 | let valueNewAuctionPrice = getInteger(this, ((auctionId + "_Bid_") + auctionLowestBidder)) | |
271 | 271 | match valueNewAuctionPrice { | |
272 | 272 | case a: Int => | |
273 | 273 | a | |
274 | 274 | case _ => | |
275 | 275 | throw("Auction lowest bid was not found") | |
276 | 276 | } | |
277 | 277 | } | |
278 | 278 | let amountDifference = ((auctionPrice - newAuctionPrice) - dAppCommission) | |
279 | 279 | ScriptResult(WriteSet([DataEntry((auctionId + "_State"), stateInProgress), DataEntry((auctionId + "_Freelancer"), auctionLowestBidder), DataEntry((auctionId + "_Price"), newAuctionPrice)]), TransferSet([ScriptTransfer(addressFromPublicKey(auctionClient), amountDifference, auctionAssetId58)])) | |
280 | 280 | } | |
281 | 281 | else throw("Incorrect auction state") | |
282 | 282 | else if ((auctionState == stateOpen)) | |
283 | 283 | then WriteSet([DataEntry(((auctionId + "_Bid_") + newFreelancer), betPrice), DataEntry((auctionId + "_State"), stateSuggested), DataEntry((auctionId + "_LowestBidderPub"), callerPub), DataEntry((auctionId + callerPub), betPrice)]) | |
284 | 284 | else if ((auctionState == stateSuggested)) | |
285 | 285 | then { | |
286 | 286 | let currentLowestBidderPub = { | |
287 | 287 | let lowestBidder = getString(this, (auctionId + "_LowestBidderPub")) | |
288 | 288 | match lowestBidder { | |
289 | 289 | case a: String => | |
290 | 290 | a | |
291 | 291 | case _ => | |
292 | 292 | throw("Auction lowest bidder was not found") | |
293 | 293 | } | |
294 | 294 | } | |
295 | 295 | let newLowestBidderPub = { | |
296 | 296 | let valueCurrentLowestBid = getInteger(this, ((auctionId + "_Bid_") + currentLowestBidderPub)) | |
297 | 297 | let currentLowestBid = match valueCurrentLowestBid { | |
298 | 298 | case a: Int => | |
299 | 299 | a | |
300 | 300 | case _ => | |
301 | 301 | throw("Auction lowest bid was not found") | |
302 | 302 | } | |
303 | 303 | if ((currentLowestBid > betPrice)) | |
304 | 304 | then newFreelancer | |
305 | 305 | else currentLowestBidderPub | |
306 | 306 | } | |
307 | 307 | WriteSet([DataEntry((auctionId + "_LowestBidderPub"), newLowestBidderPub), DataEntry(((auctionId + "_Bid_") + newFreelancer), betPrice)]) | |
308 | 308 | } | |
309 | 309 | else throw(((((("Incorrect jobId state. Now: " + auctionState) + ", must be: ") + stateOpen) + " or ") + stateSuggested)) | |
310 | 310 | } | |
311 | 311 | ||
312 | 312 | ||
313 | 313 | ||
314 | 314 | @Callable(i) | |
315 | 315 | func chooseFreelancer (auctionId,freelancerPub) = { | |
316 | 316 | let callerPub = extract(i.callerPublicKey) | |
317 | 317 | let betTime = height | |
318 | 318 | let auctionState = { | |
319 | 319 | let valueState = getString(this, (auctionId + "_State")) | |
320 | 320 | match valueState { | |
321 | 321 | case a: String => | |
322 | 322 | a | |
323 | 323 | case _ => | |
324 | 324 | throw("Auction State was not found") | |
325 | 325 | } | |
326 | 326 | } | |
327 | 327 | let auctionClient = { | |
328 | 328 | let valueClient = getString(this, (auctionId + "_Client")) | |
329 | 329 | let a = match valueClient { | |
330 | 330 | case a: String => | |
331 | 331 | a | |
332 | 332 | case _ => | |
333 | 333 | throw("Auction Client was not found") | |
334 | 334 | } | |
335 | 335 | fromBase58String(a) | |
336 | 336 | } | |
337 | 337 | let auctionStart = { | |
338 | 338 | let valueAuctionStart = getInteger(this, (auctionId + "_AuctionStart")) | |
339 | 339 | match valueAuctionStart { | |
340 | 340 | case a: Int => | |
341 | 341 | a | |
342 | 342 | case _ => | |
343 | 343 | throw("Auction Start time was not found") | |
344 | 344 | } | |
345 | 345 | } | |
346 | 346 | let auctionDuration = { | |
347 | 347 | let valueauctionDuration = getInteger(this, (auctionId + "_AuctionDuration")) | |
348 | 348 | match valueauctionDuration { | |
349 | 349 | case a: Int => | |
350 | 350 | a | |
351 | 351 | case _ => | |
352 | 352 | throw("Auction duration time was not found") | |
353 | 353 | } | |
354 | 354 | } | |
355 | 355 | let auctionAssetName = { | |
356 | 356 | let valueAssetName = getString(this, (auctionId + "_AssetName")) | |
357 | 357 | match valueAssetName { | |
358 | 358 | case a: String => | |
359 | 359 | a | |
360 | 360 | case _ => | |
361 | 361 | throw("Auction asset name was not found") | |
362 | 362 | } | |
363 | 363 | } | |
364 | 364 | let auctionPrice = { | |
365 | 365 | let valuePrice = getInteger(this, (auctionId + "_Price")) | |
366 | 366 | match valuePrice { | |
367 | 367 | case a: Int => | |
368 | 368 | a | |
369 | 369 | case _ => | |
370 | 370 | throw("Auction price was not found") | |
371 | 371 | } | |
372 | 372 | } | |
373 | 373 | let auctionAssetId58 = AssetNameToBase58(auctionAssetName) | |
374 | 374 | let freelancerBidAmount = { | |
375 | - | let keyFreelancerBid = ((auctionId + "_") + freelancerPub) | |
375 | + | let keyFreelancerBid = ((auctionId + "_Bid_") + freelancerPub) | |
376 | 376 | let valueFreelacerBid = getInteger(this, keyFreelancerBid) | |
377 | 377 | match valueFreelacerBid { | |
378 | 378 | case a: Int => | |
379 | 379 | a | |
380 | 380 | case _ => | |
381 | 381 | throw("Freelancer's bet was not found") | |
382 | 382 | } | |
383 | 383 | } | |
384 | - | let newFreezedBalance = decreaseFreezedBalance(auctionAssetName, auctionPrice) | |
385 | 384 | let dAppCommission = ((auctionPrice * 3) / 100) | |
386 | 385 | let amountDifference = ((auctionPrice - freelancerBidAmount) - dAppCommission) | |
387 | 386 | let auctionTimeisOver = timeCheck(betTime, auctionStart, auctionDuration) | |
388 | 387 | if ((callerPub == auctionClient)) | |
389 | 388 | then if (auctionTimeisOver) | |
390 | 389 | then if ((auctionState == stateOpen)) | |
391 | - | then ScriptResult(WriteSet([DataEntry((auctionId + "_State"), stateCancel), DataEntry((auctionAssetName + "_Freezed"), newFreezedBalance)]), TransferSet([ScriptTransfer(addressFromPublicKey(auctionClient), (auctionPrice - dAppCommission), auctionAssetId58)])) | |
390 | + | then { | |
391 | + | let newPrice = (auctionPrice - dAppCommission) | |
392 | + | let newFreezedBalance = decreaseFreezedBalance(auctionAssetName, newPrice) | |
393 | + | ScriptResult(WriteSet([DataEntry((auctionId + "_State"), stateCancel), DataEntry((auctionAssetName + "_Freezed"), newFreezedBalance)]), TransferSet([ScriptTransfer(addressFromPublicKey(auctionClient), newPrice, auctionAssetId58)])) | |
394 | + | } | |
392 | 395 | else if ((auctionState == stateSuggested)) | |
393 | 396 | then { | |
394 | 397 | let auctionLowestBidder = { | |
395 | 398 | let valueLowestBidder = getString(this, (auctionId + "_LowestBidderPub")) | |
396 | 399 | match valueLowestBidder { | |
397 | 400 | case a: String => | |
398 | 401 | a | |
399 | 402 | case _ => | |
400 | 403 | throw("Auction lowest bidder was not found") | |
401 | 404 | } | |
402 | 405 | } | |
403 | 406 | let newAuctionPrice = { | |
404 | 407 | let valueNewAuctionPrice = getInteger(this, ((auctionId + "_Bid_") + auctionLowestBidder)) | |
405 | 408 | match valueNewAuctionPrice { | |
406 | 409 | case a: Int => | |
407 | 410 | a | |
408 | 411 | case _ => | |
409 | 412 | throw("Auction lowest bid was not found") | |
410 | 413 | } | |
411 | 414 | } | |
412 | 415 | WriteSet([DataEntry((auctionId + "_State"), stateInProgress), DataEntry((auctionId + "_Freelancer"), auctionLowestBidder), DataEntry((auctionId + "_Price"), newAuctionPrice)]) | |
413 | 416 | } | |
414 | 417 | else throw("Incorrect auction state") | |
415 | 418 | else { | |
416 | 419 | let setNewFreelancer = { | |
417 | 420 | let newFreelancer = getInteger(this, ((auctionId + "_Bid_") + freelancerPub)) | |
418 | 421 | match newFreelancer { | |
419 | 422 | case a: Int => | |
420 | 423 | freelancerPub | |
421 | 424 | case _ => | |
422 | 425 | throw("Error: Incorrect freelancerPub") | |
423 | 426 | } | |
424 | 427 | } | |
425 | 428 | let setNewPrice = { | |
426 | - | let | |
427 | - | match | |
429 | + | let freelancerBid = getInteger(this, ((auctionId + "_Bid_") + freelancerPub)) | |
430 | + | match freelancerBid { | |
428 | 431 | case a: Int => | |
429 | 432 | a | |
430 | 433 | case _ => | |
431 | 434 | throw("Auction lowest bidder was not found") | |
432 | 435 | } | |
433 | 436 | } | |
434 | - | ScriptResult(WriteSet([DataEntry((auctionId + "_State"), stateInProgress), DataEntry((auctionId + "_Freelancer"), setNewFreelancer), DataEntry((auctionId + "_Price"), setNewPrice)]), TransferSet([ScriptTransfer(addressFromPublicKey(auctionClient), amountDifference, auctionAssetId58)])) | |
437 | + | let newFreezedBalance = decreaseFreezedBalance(auctionAssetName, setNewPrice) | |
438 | + | ScriptResult(WriteSet([DataEntry((auctionId + "_State"), stateInProgress), DataEntry((auctionId + "_Freelancer"), setNewFreelancer), DataEntry((auctionId + "_Price"), setNewPrice), DataEntry((auctionAssetName + "_Freezed"), newFreezedBalance)]), TransferSet([ScriptTransfer(addressFromPublicKey(auctionClient), amountDifference, auctionAssetId58)])) | |
435 | 439 | } | |
436 | 440 | else throw("Only auction customer can choose a freelancer") | |
437 | 441 | } | |
438 | 442 | ||
439 | 443 | ||
440 | 444 | ||
441 | 445 | @Callable(i) | |
442 | 446 | func increaseExecutionTime (auctionId,executionDays) = { | |
443 | 447 | let caller = extract(i.callerPublicKey) | |
444 | 448 | let auctionState = { | |
445 | 449 | let valueState = getString(this, (auctionId + "_State")) | |
446 | 450 | match valueState { | |
447 | 451 | case a: String => | |
448 | 452 | a | |
449 | 453 | case _ => | |
450 | 454 | throw("Auction State was not found") | |
451 | 455 | } | |
452 | 456 | } | |
453 | 457 | let auctionClient = { | |
454 | 458 | let valueClient = getString(this, (auctionId + "_Client")) | |
455 | 459 | let a = match valueClient { | |
456 | 460 | case a: String => | |
457 | 461 | a | |
458 | 462 | case _ => | |
459 | 463 | throw("Auction Client was not found") | |
460 | 464 | } | |
461 | 465 | fromBase58String(a) | |
462 | 466 | } | |
463 | 467 | let auctionExecutionTime = { | |
464 | 468 | let valueBlocksForExecution = getInteger(this, (auctionId + "JobPerformance")) | |
465 | 469 | match valueBlocksForExecution { | |
466 | 470 | case a: Int => | |
467 | 471 | a | |
468 | 472 | case _ => | |
469 | 473 | throw("Auction job performance time was not found") | |
470 | 474 | } | |
471 | 475 | } | |
472 | 476 | let newAuctionExecutionTime = { | |
473 | 477 | let newAuctionBlocksForExecution = (executionDays * day) | |
474 | 478 | if ((newAuctionBlocksForExecution > auctionExecutionTime)) | |
475 | 479 | then newAuctionBlocksForExecution | |
476 | 480 | else throw("New execution time must more than current execution time") | |
477 | 481 | } | |
478 | 482 | if ((caller == auctionClient)) | |
479 | 483 | then if (if (if ((auctionState == stateOpen)) | |
480 | 484 | then true | |
481 | 485 | else (auctionState == stateSuggested)) | |
482 | 486 | then true | |
483 | 487 | else (auctionState == stateInProgress)) | |
484 | 488 | then WriteSet([DataEntry((auctionId + "JobPerformance"), newAuctionExecutionTime)]) | |
485 | 489 | else throw("Incorrect state") | |
486 | 490 | else throw("Only Client can increase execution time") | |
487 | 491 | } | |
488 | 492 | ||
489 | 493 | ||
490 | 494 | ||
491 | 495 | @Callable(i) | |
492 | 496 | func cancelAuction (auctionId) = { | |
493 | 497 | let callerPub = extract(i.callerPublicKey) | |
494 | 498 | let auctionState = { | |
495 | 499 | let valueState = getString(this, (auctionId + "_State")) | |
496 | 500 | match valueState { | |
497 | 501 | case a: String => | |
498 | 502 | a | |
499 | 503 | case _ => | |
500 | 504 | throw("Auction State was not found") | |
501 | 505 | } | |
502 | 506 | } | |
503 | 507 | let auctionClient = { | |
504 | 508 | let valueClient = getString(this, (auctionId + "_Client")) | |
505 | 509 | let a = match valueClient { | |
506 | 510 | case a: String => | |
507 | 511 | a | |
508 | 512 | case _ => | |
509 | 513 | throw("Auction Client was not found") | |
510 | 514 | } | |
511 | 515 | fromBase58String(a) | |
512 | 516 | } | |
513 | 517 | let callerIsClient = if ((callerPub == auctionClient)) | |
514 | 518 | then true | |
515 | 519 | else throw("Auction can be canceled only by owner.") | |
516 | 520 | if (callerIsClient) | |
517 | 521 | then if ((auctionState == stateOpen)) | |
518 | 522 | then WriteSet([DataEntry((auctionId + "_State"), stateCancel)]) | |
519 | 523 | else throw("Incorrect auction state.") | |
520 | 524 | else throw("Only Client can cancel auction") | |
521 | 525 | } | |
522 | 526 | ||
523 | 527 | ||
524 | 528 | ||
525 | 529 | @Callable(i) | |
526 | 530 | func openDispute (auctionId) = { | |
527 | 531 | let caller = extract(i.callerPublicKey) | |
528 | 532 | let auctionState = { | |
529 | 533 | let valueState = getString(this, (auctionId + "_State")) | |
530 | 534 | match valueState { | |
531 | 535 | case a: String => | |
532 | 536 | a | |
533 | 537 | case _ => | |
534 | 538 | throw("Auction State was not found") | |
535 | 539 | } | |
536 | 540 | } | |
537 | 541 | let auctionClient = { | |
538 | 542 | let valueClient = getString(this, (auctionId + "_Client")) | |
539 | 543 | let a = match valueClient { | |
540 | 544 | case a: String => | |
541 | 545 | a | |
542 | 546 | case _ => | |
543 | 547 | throw("Auction Client was not found") | |
544 | 548 | } | |
545 | 549 | fromBase58String(a) | |
546 | 550 | } | |
547 | 551 | let auctionFreelancer = { | |
548 | 552 | let valueClient = getString(this, (auctionId + "_Freelancer")) | |
549 | 553 | let a = match valueClient { | |
550 | 554 | case a: String => | |
551 | 555 | a | |
552 | 556 | case _ => | |
553 | 557 | throw("Auction Client was not found") | |
554 | 558 | } | |
555 | 559 | fromBase58String(a) | |
556 | 560 | } | |
557 | 561 | if (if ((auctionState == stateOpen)) | |
558 | 562 | then true | |
559 | 563 | else (auctionState == stateSuggested)) | |
560 | 564 | then throw("Incorrect auction state for dispute opening") | |
561 | 565 | else if (if ((caller == auctionClient)) | |
562 | 566 | then true | |
563 | 567 | else (caller == auctionFreelancer)) | |
564 | 568 | then WriteSet([DataEntry((auctionId + "_State"), stateDispute), DataEntry((auctionId + "_DisputeVotes"), 0)]) | |
565 | 569 | else throw("Only customer and freelancer can open dispute") | |
566 | 570 | } | |
567 | 571 | ||
568 | 572 | ||
569 | 573 | ||
570 | 574 | @Callable(i) | |
571 | 575 | func voteDispute (auctionId,vote) = { | |
572 | 576 | let callerPub = extract(i.callerPublicKey) | |
573 | 577 | let auctionState = { | |
574 | 578 | let valueState = getString(this, (auctionId + "_State")) | |
575 | 579 | match valueState { | |
576 | 580 | case a: String => | |
577 | 581 | a | |
578 | 582 | case _ => | |
579 | 583 | throw("Auction State was not found") | |
580 | 584 | } | |
581 | 585 | } | |
582 | 586 | let auctionClient = { | |
583 | 587 | let valueClient = getString(this, (auctionId + "_Client")) | |
584 | 588 | let a = match valueClient { | |
585 | 589 | case a: String => | |
586 | 590 | a | |
587 | 591 | case _ => | |
588 | 592 | throw("Auction Client was not found") | |
589 | 593 | } | |
590 | 594 | fromBase58String(a) | |
591 | 595 | } | |
592 | 596 | let auctionAssetName = { | |
593 | 597 | let valueAssetName = getString(this, (auctionId + "_AssetName")) | |
594 | 598 | match valueAssetName { | |
595 | 599 | case a: String => | |
596 | 600 | a | |
597 | 601 | case _ => | |
598 | 602 | throw("Auction asset name was not found") | |
599 | 603 | } | |
600 | 604 | } | |
601 | 605 | let auctionPrice = { | |
602 | 606 | let valuePrice = getInteger(this, (auctionId + "_Price")) | |
603 | 607 | match valuePrice { | |
604 | 608 | case a: Int => | |
605 | 609 | a | |
606 | 610 | case _ => | |
607 | 611 | throw("Auction price was not found") | |
608 | 612 | } | |
609 | 613 | } | |
610 | 614 | let auctionFreelancer = { | |
611 | 615 | let valueClient = getString(this, (auctionId + "_Freelancer")) | |
612 | 616 | let a = match valueClient { | |
613 | 617 | case a: String => | |
614 | 618 | a | |
615 | 619 | case _ => | |
616 | 620 | throw("Auction Client was not found") | |
617 | 621 | } | |
618 | 622 | fromBase58String(a) | |
619 | 623 | } | |
620 | 624 | let comission = ((auctionPrice * 3) / 100) | |
621 | 625 | let auctionAssetId58 = AssetNameToBase58(auctionAssetName) | |
622 | 626 | let callerIsAmbassador = if (if (if (if (if ((callerPub == ambassador1)) | |
623 | 627 | then true | |
624 | 628 | else (callerPub == ambassador2)) | |
625 | 629 | then true | |
626 | 630 | else (callerPub == ambassador3)) | |
627 | 631 | then true | |
628 | 632 | else (callerPub == ambassador4)) | |
629 | 633 | then true | |
630 | 634 | else (callerPub == ambassador5)) | |
631 | 635 | then toBase58String(callerPub) | |
632 | 636 | else throw("Only defined ambassadors can vote in disputes") | |
633 | 637 | let newVote = if (if ((vote == client)) | |
634 | 638 | then true | |
635 | 639 | else (vote == freelancer)) | |
636 | 640 | then vote | |
637 | 641 | else throw(((("Vote is incorrect. Must be: " + client) + " or ") + freelancer)) | |
638 | 642 | let newVoter = { | |
639 | 643 | let keyVoter = ((auctionId + "_DiputeVote_") + callerIsAmbassador) | |
640 | 644 | let valueVoter = getString(this, keyVoter) | |
641 | 645 | match valueVoter { | |
642 | 646 | case a: String => | |
643 | 647 | throw("User already voted") | |
644 | 648 | case _ => | |
645 | 649 | callerIsAmbassador | |
646 | 650 | } | |
647 | 651 | } | |
648 | 652 | let votesNumber = { | |
649 | 653 | let valueVotesNumber = getInteger(this, (auctionId + "_DisputeVotes")) | |
650 | 654 | match valueVotesNumber { | |
651 | 655 | case a: Int => | |
652 | 656 | a | |
653 | 657 | case _ => | |
654 | 658 | throw("VotesNumber was not found") | |
655 | 659 | } | |
656 | 660 | } | |
657 | 661 | if ((auctionState == stateDispute)) | |
658 | 662 | then if ((votesNumber == 4)) | |
659 | 663 | then { | |
660 | 664 | let disputeWinner = { | |
661 | 665 | let ambassador1Vote = getString(this, ((auctionId + "_DiputeVote_") + toBase58String(ambassador1))) | |
662 | 666 | let ambassador2Vote = getString(this, ((auctionId + "_DiputeVote_") + toBase58String(ambassador2))) | |
663 | 667 | let ambassador3Vote = getString(this, ((auctionId + "_DiputeVote_") + toBase58String(ambassador3))) | |
664 | 668 | let ambassador4Vote = getString(this, ((auctionId + "_DiputeVote_") + toBase58String(ambassador4))) | |
665 | 669 | let ambassador5Vote = getString(this, ((auctionId + "_DiputeVote_") + toBase58String(ambassador5))) | |
666 | 670 | let v1 = if ((ambassador1Vote == client)) | |
667 | 671 | then 1 | |
668 | 672 | else 0 | |
669 | 673 | let v2 = if ((ambassador2Vote == client)) | |
670 | 674 | then 1 | |
671 | 675 | else 0 | |
672 | 676 | let v3 = if ((ambassador3Vote == client)) | |
673 | 677 | then 1 | |
674 | 678 | else 0 | |
675 | 679 | let v4 = if ((ambassador4Vote == client)) | |
676 | 680 | then 1 | |
677 | 681 | else 0 | |
678 | 682 | let v5 = if ((ambassador5Vote == client)) | |
679 | 683 | then 1 | |
680 | 684 | else 0 | |
681 | 685 | let currentVote = if ((newVote == client)) | |
682 | 686 | then 1 | |
683 | 687 | else 0 | |
684 | 688 | let votesForClient = (((((v1 + v2) + v3) + v4) + v5) + currentVote) | |
685 | 689 | if ((votesForClient > 2)) | |
686 | 690 | then auctionClient | |
687 | 691 | else auctionFreelancer | |
688 | 692 | } | |
689 | 693 | let paymentWithoutComm = if ((disputeWinner == auctionClient)) | |
690 | 694 | then auctionPrice | |
691 | 695 | else (auctionPrice - comission) | |
692 | - | ScriptResult(WriteSet([DataEntry((auctionId + "_DisputeVotes"), (votesNumber + 1)), DataEntry((auctionId + "_State"), stateDisputeResolved), DataEntry(((auctionId + "_DiputeVote_") + callerIsAmbassador), newVote)]), TransferSet([ScriptTransfer(addressFromPublicKey(disputeWinner), paymentWithoutComm, auctionAssetId58)])) | |
696 | + | let newFreezedBalance = decreaseFreezedBalance(auctionAssetName, paymentWithoutComm) | |
697 | + | 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)])) | |
693 | 698 | } | |
694 | 699 | else WriteSet([DataEntry((auctionId + "_DisputeVotes"), (votesNumber + 1)), DataEntry(((auctionId + "_DiputeVote_") + callerIsAmbassador), newVote)]) | |
695 | 700 | else throw(("Incorrect state. Must be: " + stateDispute)) | |
696 | 701 | } | |
697 | 702 | ||
698 | 703 | ||
699 | 704 | ||
700 | 705 | @Callable(i) | |
701 | 706 | func workHandOver (auctionId) = { | |
702 | 707 | let callerPub = extract(i.callerPublicKey) | |
703 | 708 | let auctionState = { | |
704 | 709 | let valueState = getString(this, (auctionId + "_State")) | |
705 | 710 | match valueState { | |
706 | 711 | case a: String => | |
707 | 712 | a | |
708 | 713 | case _ => | |
709 | 714 | throw("Auction State was not found") | |
710 | 715 | } | |
711 | 716 | } | |
712 | 717 | let auctionStart = { | |
713 | 718 | let valueAuctionStart = getInteger(this, (auctionId + "_AuctionStart")) | |
714 | 719 | match valueAuctionStart { | |
715 | 720 | case a: Int => | |
716 | 721 | a | |
717 | 722 | case _ => | |
718 | 723 | throw("Auction Start time was not found") | |
719 | 724 | } | |
720 | 725 | } | |
721 | 726 | let auctionDuration = { | |
722 | 727 | let valueauctionDuration = getInteger(this, (auctionId + "_AuctionDuration")) | |
723 | 728 | match valueauctionDuration { | |
724 | 729 | case a: Int => | |
725 | 730 | a | |
726 | 731 | case _ => | |
727 | 732 | throw("Auction duration time was not found") | |
728 | 733 | } | |
729 | 734 | } | |
730 | 735 | let auctionExecutionTime = { | |
731 | 736 | let valueBlocksForExecution = getInteger(this, (auctionId + "JobPerformance")) | |
732 | 737 | match valueBlocksForExecution { | |
733 | 738 | case a: Int => | |
734 | 739 | a | |
735 | 740 | case _ => | |
736 | 741 | throw("Auction job performance time was not found") | |
737 | 742 | } | |
738 | 743 | } | |
739 | 744 | let auctionFreelancer = { | |
740 | 745 | let valueClient = getString(this, (auctionId + "_Freelancer")) | |
741 | 746 | let a = match valueClient { | |
742 | 747 | case a: String => | |
743 | 748 | a | |
744 | 749 | case _ => | |
745 | 750 | throw("Auction Client was not found") | |
746 | 751 | } | |
747 | 752 | fromBase58String(a) | |
748 | 753 | } | |
749 | 754 | let currentTime = height | |
750 | 755 | let freelancerPubCheck = if ((callerPub == auctionFreelancer)) | |
751 | 756 | then callerPub | |
752 | 757 | else throw("Only a freelancer can indicate that the work is done") | |
753 | 758 | let timeIsOver = ((currentTime - auctionStart) > auctionExecutionTime) | |
754 | 759 | if ((auctionState == stateInProgress)) | |
755 | 760 | then if (timeIsOver) | |
756 | 761 | then WriteSet([DataEntry((auctionId + "_State"), stateDispute), DataEntry((auctionId + "_DisputeVotes"), "0")]) | |
757 | 762 | else WriteSet([DataEntry((auctionId + "_State"), stateWait4Confirm)]) | |
758 | 763 | else throw("Auction state is incorrect") | |
759 | 764 | } | |
760 | 765 | ||
761 | 766 | ||
762 | 767 | ||
763 | 768 | @Callable(i) | |
764 | 769 | func acceptWork (auctionId) = { | |
765 | 770 | let callerPub = extract(i.callerPublicKey) | |
766 | 771 | let auctionState = { | |
767 | 772 | let valueState = getString(this, (auctionId + "_State")) | |
768 | 773 | match valueState { | |
769 | 774 | case a: String => | |
770 | 775 | a | |
771 | 776 | case _ => | |
772 | 777 | throw("Auction State was not found") | |
773 | 778 | } | |
774 | 779 | } | |
775 | 780 | let auctionClient = { | |
776 | 781 | let valueClient = getString(this, (auctionId + "_Client")) | |
777 | 782 | let a = match valueClient { | |
778 | 783 | case a: String => | |
779 | 784 | a | |
780 | 785 | case _ => | |
781 | 786 | throw("Auction Client was not found") | |
782 | 787 | } | |
783 | 788 | fromBase58String(a) | |
784 | 789 | } | |
785 | 790 | let auctionStart = { | |
786 | 791 | let valueAuctionStart = getInteger(this, (auctionId + "_AuctionStart")) | |
787 | 792 | match valueAuctionStart { | |
788 | 793 | case a: Int => | |
789 | 794 | a | |
790 | 795 | case _ => | |
791 | 796 | throw("Auction Start time was not found") | |
792 | 797 | } | |
793 | 798 | } | |
794 | 799 | let auctionDuration = { | |
795 | 800 | let valueauctionDuration = getInteger(this, (auctionId + "_AuctionDuration")) | |
796 | 801 | match valueauctionDuration { | |
797 | 802 | case a: Int => | |
798 | 803 | a | |
799 | 804 | case _ => | |
800 | 805 | throw("Auction duration time was not found") | |
801 | 806 | } | |
802 | 807 | } | |
803 | 808 | let auctionExecutionTime = { | |
804 | 809 | let valueBlocksForExecution = getInteger(this, (auctionId + "JobPerformance")) | |
805 | 810 | match valueBlocksForExecution { | |
806 | 811 | case a: Int => | |
807 | 812 | a | |
808 | 813 | case _ => | |
809 | 814 | throw("Auction job performance time was not found") | |
810 | 815 | } | |
811 | 816 | } | |
812 | 817 | let auctionAssetName = { | |
813 | 818 | let valueAssetName = getString(this, (auctionId + "_AssetName")) | |
814 | 819 | match valueAssetName { | |
815 | 820 | case a: String => | |
816 | 821 | a | |
817 | 822 | case _ => | |
818 | 823 | throw("Auction asset name was not found") | |
819 | 824 | } | |
820 | 825 | } | |
821 | 826 | let auctionPrice = { | |
822 | 827 | let valuePrice = getInteger(this, (auctionId + "_Price")) | |
823 | 828 | match valuePrice { | |
824 | 829 | case a: Int => | |
825 | 830 | a | |
826 | 831 | case _ => | |
827 | 832 | throw("Auction price was not found") | |
828 | 833 | } | |
829 | 834 | } | |
830 | 835 | let auctionFreelancer = { | |
831 | 836 | let valueClient = getString(this, (auctionId + "_Freelancer")) | |
832 | 837 | let a = match valueClient { | |
833 | 838 | case a: String => | |
834 | 839 | a | |
835 | 840 | case _ => | |
836 | 841 | throw("Auction Client was not found") | |
837 | 842 | } | |
838 | 843 | fromBase58String(a) | |
839 | 844 | } | |
840 | 845 | let dAppCommission = ((auctionPrice * 3) / 100) | |
841 | 846 | let amountWithoutComm = (auctionPrice - dAppCommission) | |
842 | 847 | let auctionAssetId58 = AssetNameToBase58(auctionAssetName) | |
843 | 848 | let newRating = { | |
844 | 849 | let valueRating = getInteger(this, (toBase58String(auctionFreelancer) + "_Rating")) | |
845 | 850 | let currentRating = match valueRating { | |
846 | 851 | case a: Int => | |
847 | 852 | a | |
848 | 853 | case _ => | |
849 | 854 | 0 | |
850 | 855 | } | |
851 | 856 | (currentRating + 1) | |
852 | 857 | } | |
853 | 858 | if ((callerPub == auctionClient)) | |
854 | 859 | then if ((auctionState == stateWait4Confirm)) | |
855 | 860 | then ScriptResult(WriteSet([DataEntry((auctionId + "_State"), stateComplete), DataEntry((toBase58String(auctionFreelancer) + "_Rating"), newRating)]), TransferSet([ScriptTransfer(addressFromPublicKey(auctionFreelancer), amountWithoutComm, auctionAssetId58)])) | |
856 | 861 | else throw(("Incorrect state. Must be: " + stateWait4Confirm)) | |
857 | 862 | else throw("Only auction customer can use this function") | |
858 | 863 | } | |
859 | 864 | ||
860 | 865 | ||
861 | 866 | @Verifier(tx) | |
862 | 867 | func verify () = if (sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)) | |
863 | 868 | then match tx { | |
864 | 869 | case ttx: TransferTransaction => | |
865 | 870 | true | |
866 | 871 | case stx: SetScriptTransaction => | |
867 | 872 | true | |
868 | 873 | case _ => | |
869 | 874 | false | |
870 | 875 | } | |
871 | 876 | else false | |
872 | 877 |
github/deemru/w8io/169f3d6 83.56 ms ◑