tx · 5qqdtqrjLea7TyQMdcRq9nLE7bfwN3JFxjcTpk9et5Ry 3N2EM5HFgf6UMBnvcJX3Cegmozwdv1iDeq2: -0.02000000 Waves 2019.09.21 16:57 [686169] smart account 3N2EM5HFgf6UMBnvcJX3Cegmozwdv1iDeq2 > SELF 0.00000000 Waves
{ "type": 13, "id": "5qqdtqrjLea7TyQMdcRq9nLE7bfwN3JFxjcTpk9et5Ry", "fee": 2000000, "feeAssetId": null, "timestamp": 1569074079424, "version": 1, "sender": "3N2EM5HFgf6UMBnvcJX3Cegmozwdv1iDeq2", "senderPublicKey": "8y2Uc9uYf5gRD6Dzm1aC73zYe3LZvtVDUVAnAhNdN2mg", "proofs": [ "4AkTNvdwjVagVMeuvD1p78t9p63qi1U6b8SSQTtyyGpeq7kY7LD3MmWjZweAUk1iCScH7TiSKHB53iw9HuqcyCmK" ], "script": "base64:AAIDAAAAAAAAAD8IARIDCgEIEgMKAQgSBQoDAQEIEgQKAggBEgQKAggIEgQKAggBEgMKAQgSAwoBCBIECgIICBIDCgEIEgMKAQgAAAAdAAAAAANkYXkAAAAAAAAABaAAAAAABVdBVkVTBQAAAAR1bml0AAAAAAR3QlRDAQAAACBs+mr/xe2qjAt/tSqT0qIML4KC23R6BIxT+/0TH3Og/wAAAAAEd0VVUgEAAAAg7BZhBF97kSFBBjs38+fX1Pjz08YOqoCX85C/0PoVupkAAAAABHdVU0QBAAAAIN0cvQHwz3UFMHgHsqi2OJjRRd1cH7ozWuNAb/pmWXD9AAAAAAlzdGF0ZU9wZW4CAAAABk9wZW5lZAAAAAAOc3RhdGVTdWdnZXN0ZWQCAAAACVN1Z2dlc3RlZAAAAAALc3RhdGVDYW5jZWwCAAAACENhbmNlbGVkAAAAAA9zdGF0ZUluUHJvZ3Jlc3MCAAAACkluUHJvZ3Jlc3MAAAAAEXN0YXRlV2FpdDRDb25maXJtAgAAABNXYWl0Rm9yQ29uZmlybWF0aW9uAAAAAA1zdGF0ZUNvbXBsZXRlAgAAAAl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UAAAARc3RhdGVXYWl0NENvbmZpcm0JAAACAAAAAQIAAAArT25seSBhdWN0aW9uIGN1c3RvbWVyIGNhbiB1c2UgdGhpcyBmdW5jdGlvbgAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAADCQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAgFAAAAAnR4AAAAD3NlbmRlclB1YmxpY0tleQQAAAAHJG1hdGNoMAUAAAACdHgDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAE1RyYW5zZmVyVHJhbnNhY3Rpb24EAAAAA3R0eAUAAAAHJG1hdGNoMAYDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAFFNldFNjcmlwdFRyYW5zYWN0aW9uBAAAAANzdHgFAAAAByRtYXRjaDAGBwfd3ElL", "chainId": 84, "height": 686169, "spentComplexity": 0 } View: original | compacted Prev: EntXs9xrRnEXHcdroPfb913ypGj4173xsXC5oHw6VoRc Next: uHMRMMVqgLft9Gz3TPboWSv1VMCnscBqvkYah7j6Ywk Diff:
Old | New | Differences | |
---|---|---|---|
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let day = 1440 | |
5 | - | ||
6 | - | let comission = 3 | |
7 | 5 | ||
8 | 6 | let WAVES = unit | |
9 | 7 | ||
43 | 41 | ||
44 | 42 | let ambassador5 = base58'1' | |
45 | 43 | ||
46 | - | func | |
44 | + | func AuctionIdDataKey (auctionId) = (auctionId + "_AuctionData") | |
47 | 45 | ||
48 | 46 | ||
49 | 47 | func getDataList (auctionId) = { | |
151 | 149 | ||
152 | 150 | ||
153 | 151 | @Callable(i) | |
154 | - | func createAuction (jobExecutionDays,auctionDurationDays) = { | |
152 | + | func createAuction (jobExecutionDays,auctionDurationDays,auctionInfo) = { | |
155 | 153 | let auctionId = toBase58String(i.transactionId) | |
156 | 154 | let auctionCustomer = toBase58String(i.callerPublicKey) | |
157 | 155 | let pmt = extract(i.payment) | |
172 | 170 | then "USD" | |
173 | 171 | else throw("AssetId is incorrect") | |
174 | 172 | let newFreezedBalance = increaseFreezedBalance(pmtAssetName, auctionPrice) | |
175 | - | WriteSet([DataEntry( | |
173 | + | WriteSet([DataEntry(AuctionIdDataKey(auctionId), ((((((((((((((stateOpen + "_") + auctionInfo) + "_") + auctionCustomer) + "_") + toString(auctionStart)) + "_") + toString(auctionDurationBlocks)) + "_") + toString(blocksForExecution)) + "_") + pmtAssetName) + "_") + toString(auctionPrice))), DataEntry((auctionId + "_AuctionInfo"), auctionInfo), DataEntry((pmtAssetName + "_Freezed"), newFreezedBalance)]) | |
176 | 174 | } | |
177 | 175 | ||
178 | 176 | ||
181 | 179 | func makeBid (auctionId,betPrice) = { | |
182 | 180 | let callerPub = toBase58String(i.callerPublicKey) | |
183 | 181 | let betTime = height | |
184 | - | let | |
185 | - | let auctionDataList = getDataList( | |
182 | + | let AuctionIdKey = AuctionIdDataKey(auctionId) | |
183 | + | let auctionDataList = getDataList(AuctionIdKey) | |
186 | 184 | let auctionState = auctionDataList[0] | |
187 | - | let auctionCustomer = fromBase58String(auctionDataList[1]) | |
188 | - | let auctionStart = parseIntValue(auctionDataList[2]) | |
189 | - | let auctionDuration = parseIntValue(auctionDataList[3]) | |
190 | - | let auctionBlocksForExecution = parseIntValue(auctionDataList[4]) | |
191 | - | let auctionAssetName = auctionDataList[5] | |
192 | - | let auctionPrice = parseIntValue(auctionDataList[6]) | |
185 | + | let auctionInfo = auctionDataList[1] | |
186 | + | let auctionCustomer = fromBase58String(auctionDataList[2]) | |
187 | + | let auctionStart = parseIntValue(auctionDataList[3]) | |
188 | + | let auctionDuration = parseIntValue(auctionDataList[4]) | |
189 | + | let auctionBlocksForExecution = parseIntValue(auctionDataList[5]) | |
190 | + | let auctionAssetName = auctionDataList[6] | |
191 | + | let auctionPrice = parseIntValue(auctionDataList[7]) | |
193 | 192 | let auctionAssetId58 = AssetNameToBase58(auctionAssetName) | |
194 | 193 | let newBid = betPriceCheck(betPrice, auctionPrice) | |
195 | 194 | let newFreelancer = freelancerIsRegistered(callerPub) | |
198 | 197 | let auctionTimeisOver = timeCheck(betTime, auctionStart, auctionDuration) | |
199 | 198 | if (auctionTimeisOver) | |
200 | 199 | then if ((auctionState == stateOpen)) | |
201 | - | then ScriptResult(WriteSet([DataEntry( | |
200 | + | then ScriptResult(WriteSet([DataEntry(AuctionIdKey, ((((((((((((((((((stateCancel + "_") + auctionInfo) + "_") + toBase58String(auctionCustomer)) + "_") + toString(auctionStart)) + "_") + toString(auctionDuration)) + "_") + toString(auctionBlocksForExecution)) + "_") + auctionAssetName) + "_") + toString(auctionPrice)) + "_") + "NoFreelancer") + "_") + "NoBid")), DataEntry((auctionAssetName + "_Freezed"), newFreezedBalance)]), TransferSet([ScriptTransfer(addressFromPublicKey(auctionCustomer), (auctionPrice - dAppCommission), auctionAssetId58)])) | |
202 | 201 | else if ((auctionState == stateSuggested)) | |
203 | 202 | then { | |
204 | 203 | let auctionFreelancer = auctionDataList[7] | |
205 | 204 | let auctionJobCost = auctionDataList[8] | |
206 | - | WriteSet([DataEntry( | |
205 | + | WriteSet([DataEntry(AuctionIdKey, ((((((((((((((((((stateInProgress + "_") + auctionInfo) + "_") + toBase58String(auctionCustomer)) + "_") + toString(auctionStart)) + "_") + toString(auctionDuration)) + "_") + toString(auctionBlocksForExecution)) + "_") + auctionAssetName) + "_") + toString(auctionPrice)) + "_") + auctionFreelancer) + "_") + auctionJobCost))]) | |
207 | 206 | } | |
208 | 207 | else throw("Incorrect auction state") | |
209 | 208 | else if ((auctionState == stateOpen)) | |
210 | - | then WriteSet([DataEntry(((auctionId + "_") + newFreelancer), betPrice), DataEntry( | |
209 | + | then WriteSet([DataEntry(((auctionId + "_") + newFreelancer), betPrice), DataEntry(AuctionIdKey, ((((((((((((((((stateSuggested + "_") + auctionInfo) + "_") + toBase58String(auctionCustomer)) + "_") + toString(auctionStart)) + "_") + toString(auctionDuration)) + "_") + toString(auctionBlocksForExecution)) + "_") + auctionAssetName) + "_") + toString(auctionPrice)) + "_") + newFreelancer))]) | |
211 | 210 | else if ((auctionState == stateSuggested)) | |
212 | 211 | then { | |
213 | 212 | let auctionLowestBidder = auctionDataList[7] | |
224 | 223 | then newFreelancer | |
225 | 224 | else auctionLowestBidder | |
226 | 225 | } | |
227 | - | WriteSet([DataEntry(((auctionId + "_") + callerPub), betPrice), DataEntry( | |
226 | + | WriteSet([DataEntry(((auctionId + "_") + callerPub), betPrice), DataEntry(AuctionIdKey, ((((((((((((((((stateSuggested + "_") + auctionInfo) + "_") + toBase58String(auctionCustomer)) + "_") + toString(auctionStart)) + "_") + toString(auctionDuration)) + "_") + toString(auctionBlocksForExecution)) + "_") + auctionAssetName) + "_") + toString(auctionPrice)) + "_") + newAuctionLowestBidder))]) | |
228 | 227 | } | |
229 | 228 | else throw(((((("Incorrect jobId state. Now: " + auctionState) + ", must be: ") + stateOpen) + " or ") + stateSuggested)) | |
230 | 229 | } | |
233 | 232 | ||
234 | 233 | @Callable(i) | |
235 | 234 | func chooseFreelancer (auctionId,freelancerPub) = { | |
236 | - | let callerPub = | |
235 | + | let callerPub = extract(i.callerPublicKey) | |
237 | 236 | let betTime = height | |
238 | - | let | |
239 | - | let auctionDataList = getDataList( | |
237 | + | let AuctionIdKey = AuctionIdDataKey(auctionId) | |
238 | + | let auctionDataList = getDataList(AuctionIdKey) | |
240 | 239 | let auctionState = auctionDataList[0] | |
241 | - | let auctionCustomer = auctionDataList[1] | |
242 | - | let auctionStart = parseIntValue(auctionDataList[2]) | |
243 | - | let auctionDuration = parseIntValue(auctionDataList[3]) | |
244 | - | let auctionBlocksForExecution = parseIntValue(auctionDataList[4]) | |
245 | - | let auctionAssetName = auctionDataList[5] | |
246 | - | let auctionPrice = parseIntValue(auctionDataList[6]) | |
240 | + | let auctionInfo = auctionDataList[1] | |
241 | + | let auctionCustomer = fromBase58String(auctionDataList[2]) | |
242 | + | let auctionStart = parseIntValue(auctionDataList[3]) | |
243 | + | let auctionDuration = parseIntValue(auctionDataList[4]) | |
244 | + | let auctionBlocksForExecution = parseIntValue(auctionDataList[5]) | |
245 | + | let auctionAssetName = auctionDataList[6] | |
246 | + | let auctionPrice = parseIntValue(auctionDataList[7]) | |
247 | 247 | let auctionAssetId58 = AssetNameToBase58(auctionAssetName) | |
248 | 248 | let FreelancerBidAmount = { | |
249 | 249 | let keyFreelancerBid = ((auctionId + "_") + freelancerPub) | |
261 | 261 | if ((callerPub == auctionCustomer)) | |
262 | 262 | then if (auctionTimeisOver) | |
263 | 263 | then if ((auctionState == stateOpen)) | |
264 | - | then ScriptResult(WriteSet([DataEntry( | |
264 | + | then ScriptResult(WriteSet([DataEntry(AuctionIdKey, ((((((((((((((((((stateCancel + "_") + auctionInfo) + "_") + toBase58String(auctionCustomer)) + "_") + toString(auctionStart)) + "_") + toString(auctionDuration)) + "_") + toString(auctionBlocksForExecution)) + "_") + auctionAssetName) + "_") + toString(auctionPrice)) + "_") + "NoFreelancer") + "_") + "NoBid"))]), TransferSet([ScriptTransfer(addressFromPublicKey(auctionCustomer), (auctionPrice - dAppCommission), auctionAssetId58)])) | |
265 | 265 | else if ((auctionState == stateSuggested)) | |
266 | - | then WriteSet([DataEntry( | |
266 | + | then WriteSet([DataEntry(AuctionIdKey, ((((((((((((((stateInProgress + "_") + auctionInfo) + "_") + toBase58String(auctionCustomer)) + "_") + toString(auctionStart)) + "_") + toString(auctionDuration)) + "_") + toString(auctionBlocksForExecution)) + "_") + auctionAssetName) + "_") + toString(auctionPrice)))]) | |
267 | 267 | else throw("Incorrect auction state") | |
268 | - | else ScriptResult(WriteSet([DataEntry( | |
268 | + | else ScriptResult(WriteSet([DataEntry(AuctionIdKey, ((((((((((((((((stateInProgress + "_") + auctionInfo) + "_") + toBase58String(auctionCustomer)) + "_") + toString(auctionStart)) + "_") + toString(auctionDuration)) + "_") + toString(auctionBlocksForExecution)) + "_") + auctionAssetName) + "_") + toString(FreelancerBidAmount)) + "_") + freelancerPub))]), TransferSet([ScriptTransfer(addressFromPublicKey(auctionCustomer), amountDifference, auctionAssetId58)])) | |
269 | 269 | else throw("Only auction customer can choose a freelancer") | |
270 | 270 | } | |
271 | 271 | ||
273 | 273 | ||
274 | 274 | @Callable(i) | |
275 | 275 | func increaseExecutionTime (auctionId,executionDays) = { | |
276 | - | let caller = | |
277 | - | let | |
278 | - | let auctionDataList = getDataList( | |
276 | + | let caller = extract(i.callerPublicKey) | |
277 | + | let AuctionIdKey = AuctionIdDataKey(auctionId) | |
278 | + | let auctionDataList = getDataList(AuctionIdKey) | |
279 | 279 | let auctionState = auctionDataList[0] | |
280 | - | let auctionCustomer = auctionDataList[1] | |
281 | - | let auctionExecutionTime = parseIntValue(auctionDataList[3]) | |
280 | + | let auctionInfo = auctionDataList[1] | |
281 | + | let auctionCustomer = fromBase58String(auctionDataList[2]) | |
282 | + | let auctionStart = parseIntValue(auctionDataList[3]) | |
283 | + | let auctionDuration = parseIntValue(auctionDataList[4]) | |
284 | + | let auctionBlocksForExecution = parseIntValue(auctionDataList[5]) | |
285 | + | let auctionAssetName = auctionDataList[6] | |
286 | + | let auctionPrice = parseIntValue(auctionDataList[7]) | |
282 | 287 | let newAuctionExecutionTime = { | |
283 | - | let | |
284 | - | if (( | |
285 | - | then | |
288 | + | let newAuctionBlocksForExecution = (executionDays * day) | |
289 | + | if ((newAuctionBlocksForExecution > auctionBlocksForExecution)) | |
290 | + | then newAuctionBlocksForExecution | |
286 | 291 | else throw("New execution time must more than current execution time") | |
287 | 292 | } | |
288 | 293 | if ((caller == auctionCustomer)) | |
289 | - | then if ( | |
290 | - | then | |
291 | - | else (auctionState == stateSuggested)) | |
292 | - | then true | |
293 | - | else (auctionState == stateInProgress)) | |
294 | - | then { | |
295 | - | let | |
296 | - | WriteSet([DataEntry( | |
297 | - | } | |
298 | - | else throw("Incorrect state") | |
294 | + | then if ((auctionState == stateOpen)) | |
295 | + | then WriteSet([DataEntry(AuctionIdKey, ((((((((((((((auctionState + "_") + auctionInfo) + "_") + toBase58String(auctionCustomer)) + "_") + toString(auctionStart)) + "_") + toString(auctionDuration)) + "_") + toString(auctionBlocksForExecution)) + "_") + auctionAssetName) + "_") + toString(auctionPrice)))]) | |
296 | + | else if (if ((auctionState == stateSuggested)) | |
297 | + | then true | |
298 | + | else (auctionState == stateInProgress)) | |
299 | + | then { | |
300 | + | let freelancerPub = auctionDataList[7] | |
301 | + | WriteSet([DataEntry(AuctionIdKey, ((((((((((((((((auctionState + "_") + auctionInfo) + "_") + toBase58String(auctionCustomer)) + "_") + toString(auctionStart)) + "_") + toString(auctionDuration)) + "_") + toString(auctionBlocksForExecution)) + "_") + auctionAssetName) + "_") + toString(auctionPrice)) + "_") + freelancerPub))]) | |
302 | + | } | |
303 | + | else throw("Incorrect state") | |
299 | 304 | else throw("Only customer can increase execution time") | |
300 | 305 | } | |
301 | 306 | ||
303 | 308 | ||
304 | 309 | @Callable(i) | |
305 | 310 | func cancelAuction (auctionId) = { | |
306 | - | let | |
307 | - | let auctionDataList = getDataList( | |
311 | + | let AuctionIdKey = AuctionIdDataKey(auctionId) | |
312 | + | let auctionDataList = getDataList(AuctionIdKey) | |
308 | 313 | let auctionState = auctionDataList[0] | |
309 | - | let auctionCustomer = fromBase58String(auctionDataList[1]) | |
314 | + | let auctionInfo = auctionDataList[1] | |
315 | + | let auctionCustomer = fromBase58String(auctionDataList[2]) | |
316 | + | let auctionStart = parseIntValue(auctionDataList[3]) | |
317 | + | let auctionDuration = parseIntValue(auctionDataList[4]) | |
318 | + | let auctionBlocksForExecution = parseIntValue(auctionDataList[5]) | |
319 | + | let auctionAssetName = auctionDataList[6] | |
320 | + | let auctionPrice = parseIntValue(auctionDataList[7]) | |
310 | 321 | let auctionIdOwnerCheck = if ((i.callerPublicKey == auctionCustomer)) | |
311 | 322 | then true | |
312 | 323 | else throw("Auction can be canceled only by owner.") | |
313 | 324 | if ((auctionState == stateOpen)) | |
314 | - | then { | |
315 | - | let dataString = ((((((((auctionDataList[1] + "_") + auctionDataList[2]) + "_") + auctionDataList[3]) + "_") + auctionDataList[4]) + "_") + auctionDataList[5]) | |
316 | - | WriteSet([DataEntry(auctionIdKey, ((stateCancel + "_") + dataString))]) | |
317 | - | } | |
325 | + | then WriteSet([DataEntry(AuctionIdKey, ((((((((((((((stateCancel + "_") + auctionInfo) + "_") + toBase58String(auctionCustomer)) + "_") + toString(auctionStart)) + "_") + toString(auctionDuration)) + "_") + toString(auctionBlocksForExecution)) + "_") + auctionAssetName) + "_") + toString(auctionPrice)))]) | |
318 | 326 | else throw("Incorrect auction state.") | |
319 | 327 | } | |
320 | 328 | ||
322 | 330 | ||
323 | 331 | @Callable(i) | |
324 | 332 | func openDispute (auctionId) = { | |
325 | - | let caller = | |
326 | - | let | |
327 | - | let auctionDataList = getDataList( | |
333 | + | let caller = extract(i.callerPublicKey) | |
334 | + | let AuctionIdKey = AuctionIdDataKey(auctionId) | |
335 | + | let auctionDataList = getDataList(AuctionIdKey) | |
328 | 336 | let auctionState = auctionDataList[0] | |
329 | - | let auctionCustomer = auctionDataList[1] | |
330 | - | let auctionFreelancer = auctionDataList[6] | |
337 | + | let auctionInfo = auctionDataList[1] | |
338 | + | let auctionCustomer = fromBase58String(auctionDataList[2]) | |
339 | + | let auctionStart = parseIntValue(auctionDataList[3]) | |
340 | + | let auctionDuration = parseIntValue(auctionDataList[4]) | |
341 | + | let auctionBlocksForExecution = parseIntValue(auctionDataList[5]) | |
342 | + | let auctionAssetName = auctionDataList[6] | |
343 | + | let auctionPrice = parseIntValue(auctionDataList[7]) | |
344 | + | let auctionFreelancer = fromBase58String(auctionDataList[8]) | |
331 | 345 | if (if ((caller == auctionCustomer)) | |
332 | 346 | then true | |
333 | 347 | else (caller == auctionFreelancer)) | |
334 | 348 | then { | |
335 | 349 | let dataString = "1" | |
336 | - | WriteSet([DataEntry( | |
350 | + | WriteSet([DataEntry(AuctionIdKey, ((((stateDispute + "_") + auctionInfo) + "_") + dataString)), DataEntry((auctionId + "_Dispute"), "0")]) | |
337 | 351 | } | |
338 | 352 | else throw("Only customer and freelancer can open dispute") | |
339 | 353 | } | |
342 | 356 | ||
343 | 357 | @Callable(i) | |
344 | 358 | func voteDispute (auctionId,vote) = { | |
345 | - | let auctionIdKey = AuctionIdKey(auctionId) | |
346 | - | let auctionDataList = getDataList(auctionIdKey) | |
359 | + | let AuctionIdKey = AuctionIdDataKey(auctionId) | |
360 | + | let auctionDataList = getDataList(AuctionIdKey) | |
361 | + | let auctionInfo = auctionDataList[1] | |
347 | 362 | let auctionStateCheck = { | |
348 | 363 | let auctionState = auctionDataList[0] | |
349 | 364 | if ((auctionState == stateDispute)) | |
420 | 435 | then auctionDataList[1] | |
421 | 436 | else auctionDataList[6] | |
422 | 437 | let amountWithoutComm = (auctionPrice - ((auctionPrice * 3) / 100)) | |
423 | - | ScriptResult(WriteSet([DataEntry( | |
438 | + | ScriptResult(WriteSet([DataEntry(AuctionIdDataKey(auctionId), ((((stateDisputeResolved + "_") + auctionInfo) + "_") + newDataString)), DataEntry(((auctionId + "_") + stateDispute), newDisputeDataString)]), TransferSet([ScriptTransfer(addressFromPublicKey(fromBase58String(DisputeWinnerAddress)), amountWithoutComm, fromBase58String(auctionAssetId))])) | |
424 | 439 | } | |
425 | 440 | } | |
426 | 441 | else { | |
491 | 506 | ||
492 | 507 | ||
493 | 508 | @Callable(i) | |
494 | - | func | |
495 | - | let | |
496 | - | let auctionDataList = getDataList( | |
509 | + | func workHandOver (auctionId) = { | |
510 | + | let AuctionIdKey = AuctionIdDataKey(auctionId) | |
511 | + | let auctionDataList = getDataList(AuctionIdKey) | |
497 | 512 | let auctionState = auctionDataList[0] | |
498 | - | let auctionStart = parseIntValue(auctionDataList[2]) | |
499 | - | let auctionExecutionTime = parseIntValue(auctionDataList[3]) | |
513 | + | let auctionInfo = auctionDataList[1] | |
514 | + | let auctionCustomer = fromBase58String(auctionDataList[2]) | |
515 | + | let auctionStart = parseIntValue(auctionDataList[3]) | |
516 | + | let auctionDuration = parseIntValue(auctionDataList[4]) | |
517 | + | let auctionBlocksForExecution = parseIntValue(auctionDataList[5]) | |
518 | + | let auctionAssetName = auctionDataList[6] | |
519 | + | let auctionPrice = parseIntValue(auctionDataList[7]) | |
500 | 520 | let currentTime = height | |
501 | 521 | let freelancerPubCheck = { | |
502 | 522 | let caller = toBase58String(i.callerPublicKey) | |
505 | 525 | then caller | |
506 | 526 | else throw("Only a freelancer can indicate that the work is done") | |
507 | 527 | } | |
508 | - | let timeIsOver = ((currentTime - auctionStart) > | |
528 | + | let timeIsOver = ((currentTime - auctionStart) > auctionBlocksForExecution) | |
509 | 529 | if ((auctionState == stateInProgress)) | |
510 | 530 | then if (timeIsOver) | |
511 | 531 | then { | |
512 | 532 | let newDataString = ((((((((((auctionDataList[1] + "_") + auctionDataList[2]) + "_") + auctionDataList[3]) + "_") + auctionDataList[4]) + "_") + auctionDataList[5]) + "_") + auctionDataList[6]) | |
513 | - | WriteSet([DataEntry( | |
533 | + | WriteSet([DataEntry(AuctionIdKey, ((((stateDispute + "_") + auctionInfo) + "_") + newDataString))]) | |
514 | 534 | } | |
515 | 535 | else { | |
516 | 536 | let newDataString = ((((((((((auctionDataList[1] + "_") + auctionDataList[2]) + "_") + auctionDataList[3]) + "_") + auctionDataList[4]) + "_") + auctionDataList[5]) + "_") + auctionDataList[6]) | |
517 | - | WriteSet([DataEntry( | |
537 | + | WriteSet([DataEntry(AuctionIdKey, ((((stateWait4Confirm + "_") + auctionInfo) + "_") + newDataString))]) | |
518 | 538 | } | |
519 | 539 | else throw("Auction state is incorrect") | |
520 | 540 | } | |
522 | 542 | ||
523 | 543 | ||
524 | 544 | @Callable(i) | |
525 | - | func | |
526 | - | let | |
527 | - | let auctionDataList = getDataList( | |
545 | + | func acceptWork (auctionId) = { | |
546 | + | let AuctionIdKey = AuctionIdDataKey(auctionId) | |
547 | + | let auctionDataList = getDataList(AuctionIdKey) | |
528 | 548 | let auctionState = auctionDataList[0] | |
529 | - | let auctionCustomer = auctionDataList[1] | |
530 | - | let auctionAssetName = auctionDataList[4] | |
531 | - | let auctionPrice = parseIntValue(auctionDataList[5]) | |
532 | - | let auctionFreelancer = auctionDataList[6] | |
533 | - | let caller = toBase58String(i.callerPublicKey) | |
549 | + | let auctionInfo = auctionDataList[1] | |
550 | + | let auctionCustomer = fromBase58String(auctionDataList[2]) | |
551 | + | let auctionStart = parseIntValue(auctionDataList[3]) | |
552 | + | let auctionDuration = parseIntValue(auctionDataList[4]) | |
553 | + | let auctionBlocksForExecution = parseIntValue(auctionDataList[5]) | |
554 | + | let auctionAssetName = auctionDataList[6] | |
555 | + | let auctionPrice = parseIntValue(auctionDataList[7]) | |
556 | + | let auctionFreelancer = auctionDataList[2] | |
557 | + | let caller = extract(i.callerPublicKey) | |
534 | 558 | let dAppCommission = ((auctionPrice * 3) / 100) | |
535 | 559 | let amountWithoutComm = (auctionPrice - dAppCommission) | |
536 | 560 | let auctionAssetId58 = AssetNameToBase58(auctionAssetName) | |
548 | 572 | then if ((auctionState == stateWait4Confirm)) | |
549 | 573 | then { | |
550 | 574 | let newDataString = ((((((((((auctionDataList[1] + "_") + auctionDataList[2]) + "_") + auctionDataList[3]) + "_") + auctionDataList[4]) + "_") + auctionDataList[5]) + "_") + auctionDataList[6]) | |
551 | - | ScriptResult(WriteSet([DataEntry( | |
575 | + | ScriptResult(WriteSet([DataEntry(AuctionIdKey, ((((stateComplete + "_") + auctionInfo) + "_") + newDataString)), DataEntry((auctionFreelancer + "_Rating"), newRating)]), TransferSet([ScriptTransfer(addressFromPublicKey(fromBase58String(auctionFreelancer)), amountWithoutComm, auctionAssetId58)])) | |
552 | 576 | } | |
553 | 577 | else throw(("Incorrect state. Must be: " + stateWait4Confirm)) | |
554 | 578 | else throw("Only auction customer can use this function") |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 3 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let day = 1440 | |
5 | - | ||
6 | - | let comission = 3 | |
7 | 5 | ||
8 | 6 | let WAVES = unit | |
9 | 7 | ||
10 | 8 | let wBTC = base58'8LQW8f7P5d5PZM7GtZEBgaqRPGSzS3DfPuiXrURJ4AJS' | |
11 | 9 | ||
12 | 10 | let wEUR = base58'Gtb1WRznfchDnTh37ezoDTJ4wcoKaRsKqKjJjy7nm2zU' | |
13 | 11 | ||
14 | 12 | let wUSD = base58'Ft8X1v1LTa1ABafufpaCWyVj8KkaxUWE6xBhW6sNFJck' | |
15 | 13 | ||
16 | 14 | let stateOpen = "Opened" | |
17 | 15 | ||
18 | 16 | let stateSuggested = "Suggested" | |
19 | 17 | ||
20 | 18 | let stateCancel = "Canceled" | |
21 | 19 | ||
22 | 20 | let stateInProgress = "InProgress" | |
23 | 21 | ||
24 | 22 | let stateWait4Confirm = "WaitForConfirmation" | |
25 | 23 | ||
26 | 24 | let stateComplete = "Completed" | |
27 | 25 | ||
28 | 26 | let stateDispute = "Dispute" | |
29 | 27 | ||
30 | 28 | let stateDisputeResolved = "DisputeResolved" | |
31 | 29 | ||
32 | 30 | let customer = "CMR" | |
33 | 31 | ||
34 | 32 | let freelancer = "FL" | |
35 | 33 | ||
36 | 34 | let ambassador1 = base58'1' | |
37 | 35 | ||
38 | 36 | let ambassador2 = base58'1' | |
39 | 37 | ||
40 | 38 | let ambassador3 = base58'1' | |
41 | 39 | ||
42 | 40 | let ambassador4 = base58'1' | |
43 | 41 | ||
44 | 42 | let ambassador5 = base58'1' | |
45 | 43 | ||
46 | - | func | |
44 | + | func AuctionIdDataKey (auctionId) = (auctionId + "_AuctionData") | |
47 | 45 | ||
48 | 46 | ||
49 | 47 | func getDataList (auctionId) = { | |
50 | 48 | let getDataString = getString(this, auctionId) | |
51 | 49 | let a = match getDataString { | |
52 | 50 | case a: String => | |
53 | 51 | a | |
54 | 52 | case _ => | |
55 | 53 | throw("AuctionId was not found") | |
56 | 54 | } | |
57 | 55 | split(a, "_") | |
58 | 56 | } | |
59 | 57 | ||
60 | 58 | ||
61 | 59 | func getDisputeDataList (auctionId) = { | |
62 | 60 | let keyDisputeData = ((auctionId + "_") + stateDispute) | |
63 | 61 | let getDisputeDataString = getString(this, keyDisputeData) | |
64 | 62 | let a = match getDisputeDataString { | |
65 | 63 | case a: String => | |
66 | 64 | a | |
67 | 65 | case _ => | |
68 | 66 | throw("Dispute data was not found") | |
69 | 67 | } | |
70 | 68 | split(a, "/") | |
71 | 69 | } | |
72 | 70 | ||
73 | 71 | ||
74 | 72 | func AssetNameToBase58 (auctionAssetName) = if ((auctionAssetName == "WAVES")) | |
75 | 73 | then WAVES | |
76 | 74 | else if ((auctionAssetName == "BTC")) | |
77 | 75 | then wBTC | |
78 | 76 | else if ((auctionAssetName == "EUR")) | |
79 | 77 | then wEUR | |
80 | 78 | else if ((auctionAssetName == "USD")) | |
81 | 79 | then wUSD | |
82 | 80 | else throw("Incorrect Asset Id") | |
83 | 81 | ||
84 | 82 | ||
85 | 83 | func betPriceCheck (betPrice,auctionPrice) = if ((auctionPrice > betPrice)) | |
86 | 84 | then betPrice | |
87 | 85 | else throw(("Bet price must be lower than actual price. Actual price: " + toString(auctionPrice))) | |
88 | 86 | ||
89 | 87 | ||
90 | 88 | func timeCheck (currentTime,startTime,expirationTime) = ((currentTime - startTime) > expirationTime) | |
91 | 89 | ||
92 | 90 | ||
93 | 91 | func increaseFreezedBalance (pmtAssetName,auctionPrice) = { | |
94 | 92 | let keyFreezedFunds = getInteger(this, (pmtAssetName + "_Freezed")) | |
95 | 93 | let currentFreezedBalance = match keyFreezedFunds { | |
96 | 94 | case a: Int => | |
97 | 95 | a | |
98 | 96 | case _ => | |
99 | 97 | 0 | |
100 | 98 | } | |
101 | 99 | (currentFreezedBalance + auctionPrice) | |
102 | 100 | } | |
103 | 101 | ||
104 | 102 | ||
105 | 103 | func decreaseFreezedBalance (pmtAssetName,auctionPrice) = { | |
106 | 104 | let keyFreezedFunds = getInteger(this, (pmtAssetName + "_Freezed")) | |
107 | 105 | let currentFreezedBalance = match keyFreezedFunds { | |
108 | 106 | case a: Int => | |
109 | 107 | a | |
110 | 108 | case _ => | |
111 | 109 | 0 | |
112 | 110 | } | |
113 | 111 | let a = (currentFreezedBalance - auctionPrice) | |
114 | 112 | if ((a > 0)) | |
115 | 113 | then a | |
116 | 114 | else throw("Freezed amount couldn't be less than 0") | |
117 | 115 | } | |
118 | 116 | ||
119 | 117 | ||
120 | 118 | func freelancerIsRegistered (caller) = { | |
121 | 119 | let freelancerIsRegistered = getString(this, (caller + "_Status")) | |
122 | 120 | match freelancerIsRegistered { | |
123 | 121 | case a: String => | |
124 | 122 | a | |
125 | 123 | case _ => | |
126 | 124 | throw("Only registered users can make bets") | |
127 | 125 | } | |
128 | 126 | } | |
129 | 127 | ||
130 | 128 | ||
131 | 129 | @Callable(i) | |
132 | 130 | func freelancerSignUp (info) = { | |
133 | 131 | let userPublicKey = toBase58String(i.callerPublicKey) | |
134 | 132 | let alreadyRegistered = getString(this, (userPublicKey + "_Freelancer")) | |
135 | 133 | if (isDefined(alreadyRegistered)) | |
136 | 134 | then throw("User already registered") | |
137 | 135 | else WriteSet([DataEntry((userPublicKey + "_Registered"), info)]) | |
138 | 136 | } | |
139 | 137 | ||
140 | 138 | ||
141 | 139 | ||
142 | 140 | @Callable(i) | |
143 | 141 | func clientSignUp (info) = { | |
144 | 142 | let userPublicKey = toBase58String(i.callerPublicKey) | |
145 | 143 | let alreadyRegistered = getString(this, (userPublicKey + "_Client")) | |
146 | 144 | if (isDefined(alreadyRegistered)) | |
147 | 145 | then throw("User already registered") | |
148 | 146 | else WriteSet([DataEntry((userPublicKey + "_Client"), info)]) | |
149 | 147 | } | |
150 | 148 | ||
151 | 149 | ||
152 | 150 | ||
153 | 151 | @Callable(i) | |
154 | - | func createAuction (jobExecutionDays,auctionDurationDays) = { | |
152 | + | func createAuction (jobExecutionDays,auctionDurationDays,auctionInfo) = { | |
155 | 153 | let auctionId = toBase58String(i.transactionId) | |
156 | 154 | let auctionCustomer = toBase58String(i.callerPublicKey) | |
157 | 155 | let pmt = extract(i.payment) | |
158 | 156 | let pmtAmount = pmt.amount | |
159 | 157 | let auctionPrice = if ((pmtAmount > 0)) | |
160 | 158 | then pmtAmount | |
161 | 159 | else throw("Amount must be higher then 0") | |
162 | 160 | let auctionStart = height | |
163 | 161 | let auctionDurationBlocks = (auctionDurationDays * day) | |
164 | 162 | let blocksForExecution = (jobExecutionDays * day) | |
165 | 163 | let pmtAssetName = if (!(isDefined(pmt.assetId))) | |
166 | 164 | then "WAVES" | |
167 | 165 | else if ((pmt.assetId == wBTC)) | |
168 | 166 | then "BTC" | |
169 | 167 | else if ((pmt.assetId == wEUR)) | |
170 | 168 | then "EUR" | |
171 | 169 | else if ((pmt.assetId == wUSD)) | |
172 | 170 | then "USD" | |
173 | 171 | else throw("AssetId is incorrect") | |
174 | 172 | let newFreezedBalance = increaseFreezedBalance(pmtAssetName, auctionPrice) | |
175 | - | WriteSet([DataEntry( | |
173 | + | WriteSet([DataEntry(AuctionIdDataKey(auctionId), ((((((((((((((stateOpen + "_") + auctionInfo) + "_") + auctionCustomer) + "_") + toString(auctionStart)) + "_") + toString(auctionDurationBlocks)) + "_") + toString(blocksForExecution)) + "_") + pmtAssetName) + "_") + toString(auctionPrice))), DataEntry((auctionId + "_AuctionInfo"), auctionInfo), DataEntry((pmtAssetName + "_Freezed"), newFreezedBalance)]) | |
176 | 174 | } | |
177 | 175 | ||
178 | 176 | ||
179 | 177 | ||
180 | 178 | @Callable(i) | |
181 | 179 | func makeBid (auctionId,betPrice) = { | |
182 | 180 | let callerPub = toBase58String(i.callerPublicKey) | |
183 | 181 | let betTime = height | |
184 | - | let | |
185 | - | let auctionDataList = getDataList( | |
182 | + | let AuctionIdKey = AuctionIdDataKey(auctionId) | |
183 | + | let auctionDataList = getDataList(AuctionIdKey) | |
186 | 184 | let auctionState = auctionDataList[0] | |
187 | - | let auctionCustomer = fromBase58String(auctionDataList[1]) | |
188 | - | let auctionStart = parseIntValue(auctionDataList[2]) | |
189 | - | let auctionDuration = parseIntValue(auctionDataList[3]) | |
190 | - | let auctionBlocksForExecution = parseIntValue(auctionDataList[4]) | |
191 | - | let auctionAssetName = auctionDataList[5] | |
192 | - | let auctionPrice = parseIntValue(auctionDataList[6]) | |
185 | + | let auctionInfo = auctionDataList[1] | |
186 | + | let auctionCustomer = fromBase58String(auctionDataList[2]) | |
187 | + | let auctionStart = parseIntValue(auctionDataList[3]) | |
188 | + | let auctionDuration = parseIntValue(auctionDataList[4]) | |
189 | + | let auctionBlocksForExecution = parseIntValue(auctionDataList[5]) | |
190 | + | let auctionAssetName = auctionDataList[6] | |
191 | + | let auctionPrice = parseIntValue(auctionDataList[7]) | |
193 | 192 | let auctionAssetId58 = AssetNameToBase58(auctionAssetName) | |
194 | 193 | let newBid = betPriceCheck(betPrice, auctionPrice) | |
195 | 194 | let newFreelancer = freelancerIsRegistered(callerPub) | |
196 | 195 | let dAppCommission = ((auctionPrice * 3) / 100) | |
197 | 196 | let newFreezedBalance = decreaseFreezedBalance(auctionAssetName, auctionPrice) | |
198 | 197 | let auctionTimeisOver = timeCheck(betTime, auctionStart, auctionDuration) | |
199 | 198 | if (auctionTimeisOver) | |
200 | 199 | then if ((auctionState == stateOpen)) | |
201 | - | then ScriptResult(WriteSet([DataEntry( | |
200 | + | then ScriptResult(WriteSet([DataEntry(AuctionIdKey, ((((((((((((((((((stateCancel + "_") + auctionInfo) + "_") + toBase58String(auctionCustomer)) + "_") + toString(auctionStart)) + "_") + toString(auctionDuration)) + "_") + toString(auctionBlocksForExecution)) + "_") + auctionAssetName) + "_") + toString(auctionPrice)) + "_") + "NoFreelancer") + "_") + "NoBid")), DataEntry((auctionAssetName + "_Freezed"), newFreezedBalance)]), TransferSet([ScriptTransfer(addressFromPublicKey(auctionCustomer), (auctionPrice - dAppCommission), auctionAssetId58)])) | |
202 | 201 | else if ((auctionState == stateSuggested)) | |
203 | 202 | then { | |
204 | 203 | let auctionFreelancer = auctionDataList[7] | |
205 | 204 | let auctionJobCost = auctionDataList[8] | |
206 | - | WriteSet([DataEntry( | |
205 | + | WriteSet([DataEntry(AuctionIdKey, ((((((((((((((((((stateInProgress + "_") + auctionInfo) + "_") + toBase58String(auctionCustomer)) + "_") + toString(auctionStart)) + "_") + toString(auctionDuration)) + "_") + toString(auctionBlocksForExecution)) + "_") + auctionAssetName) + "_") + toString(auctionPrice)) + "_") + auctionFreelancer) + "_") + auctionJobCost))]) | |
207 | 206 | } | |
208 | 207 | else throw("Incorrect auction state") | |
209 | 208 | else if ((auctionState == stateOpen)) | |
210 | - | then WriteSet([DataEntry(((auctionId + "_") + newFreelancer), betPrice), DataEntry( | |
209 | + | then WriteSet([DataEntry(((auctionId + "_") + newFreelancer), betPrice), DataEntry(AuctionIdKey, ((((((((((((((((stateSuggested + "_") + auctionInfo) + "_") + toBase58String(auctionCustomer)) + "_") + toString(auctionStart)) + "_") + toString(auctionDuration)) + "_") + toString(auctionBlocksForExecution)) + "_") + auctionAssetName) + "_") + toString(auctionPrice)) + "_") + newFreelancer))]) | |
211 | 210 | else if ((auctionState == stateSuggested)) | |
212 | 211 | then { | |
213 | 212 | let auctionLowestBidder = auctionDataList[7] | |
214 | 213 | let newAuctionLowestBidder = { | |
215 | 214 | let keyCurrentLowestBid = ((auctionId + "_") + auctionLowestBidder) | |
216 | 215 | let valueCurrentLowestBid = getInteger(this, keyCurrentLowestBid) | |
217 | 216 | let currentLowestBid = match valueCurrentLowestBid { | |
218 | 217 | case a: Int => | |
219 | 218 | a | |
220 | 219 | case _ => | |
221 | 220 | throw("Can't find lowest bid by public key") | |
222 | 221 | } | |
223 | 222 | if ((currentLowestBid > newBid)) | |
224 | 223 | then newFreelancer | |
225 | 224 | else auctionLowestBidder | |
226 | 225 | } | |
227 | - | WriteSet([DataEntry(((auctionId + "_") + callerPub), betPrice), DataEntry( | |
226 | + | WriteSet([DataEntry(((auctionId + "_") + callerPub), betPrice), DataEntry(AuctionIdKey, ((((((((((((((((stateSuggested + "_") + auctionInfo) + "_") + toBase58String(auctionCustomer)) + "_") + toString(auctionStart)) + "_") + toString(auctionDuration)) + "_") + toString(auctionBlocksForExecution)) + "_") + auctionAssetName) + "_") + toString(auctionPrice)) + "_") + newAuctionLowestBidder))]) | |
228 | 227 | } | |
229 | 228 | else throw(((((("Incorrect jobId state. Now: " + auctionState) + ", must be: ") + stateOpen) + " or ") + stateSuggested)) | |
230 | 229 | } | |
231 | 230 | ||
232 | 231 | ||
233 | 232 | ||
234 | 233 | @Callable(i) | |
235 | 234 | func chooseFreelancer (auctionId,freelancerPub) = { | |
236 | - | let callerPub = | |
235 | + | let callerPub = extract(i.callerPublicKey) | |
237 | 236 | let betTime = height | |
238 | - | let | |
239 | - | let auctionDataList = getDataList( | |
237 | + | let AuctionIdKey = AuctionIdDataKey(auctionId) | |
238 | + | let auctionDataList = getDataList(AuctionIdKey) | |
240 | 239 | let auctionState = auctionDataList[0] | |
241 | - | let auctionCustomer = auctionDataList[1] | |
242 | - | let auctionStart = parseIntValue(auctionDataList[2]) | |
243 | - | let auctionDuration = parseIntValue(auctionDataList[3]) | |
244 | - | let auctionBlocksForExecution = parseIntValue(auctionDataList[4]) | |
245 | - | let auctionAssetName = auctionDataList[5] | |
246 | - | let auctionPrice = parseIntValue(auctionDataList[6]) | |
240 | + | let auctionInfo = auctionDataList[1] | |
241 | + | let auctionCustomer = fromBase58String(auctionDataList[2]) | |
242 | + | let auctionStart = parseIntValue(auctionDataList[3]) | |
243 | + | let auctionDuration = parseIntValue(auctionDataList[4]) | |
244 | + | let auctionBlocksForExecution = parseIntValue(auctionDataList[5]) | |
245 | + | let auctionAssetName = auctionDataList[6] | |
246 | + | let auctionPrice = parseIntValue(auctionDataList[7]) | |
247 | 247 | let auctionAssetId58 = AssetNameToBase58(auctionAssetName) | |
248 | 248 | let FreelancerBidAmount = { | |
249 | 249 | let keyFreelancerBid = ((auctionId + "_") + freelancerPub) | |
250 | 250 | let valueFreelacerBid = getInteger(this, keyFreelancerBid) | |
251 | 251 | match valueFreelacerBid { | |
252 | 252 | case a: Int => | |
253 | 253 | a | |
254 | 254 | case _ => | |
255 | 255 | throw("Freelancer's bet was not found") | |
256 | 256 | } | |
257 | 257 | } | |
258 | 258 | let dAppCommission = ((auctionPrice * 3) / 100) | |
259 | 259 | let amountDifference = ((auctionPrice - FreelancerBidAmount) - dAppCommission) | |
260 | 260 | let auctionTimeisOver = timeCheck(betTime, auctionStart, auctionDuration) | |
261 | 261 | if ((callerPub == auctionCustomer)) | |
262 | 262 | then if (auctionTimeisOver) | |
263 | 263 | then if ((auctionState == stateOpen)) | |
264 | - | then ScriptResult(WriteSet([DataEntry( | |
264 | + | then ScriptResult(WriteSet([DataEntry(AuctionIdKey, ((((((((((((((((((stateCancel + "_") + auctionInfo) + "_") + toBase58String(auctionCustomer)) + "_") + toString(auctionStart)) + "_") + toString(auctionDuration)) + "_") + toString(auctionBlocksForExecution)) + "_") + auctionAssetName) + "_") + toString(auctionPrice)) + "_") + "NoFreelancer") + "_") + "NoBid"))]), TransferSet([ScriptTransfer(addressFromPublicKey(auctionCustomer), (auctionPrice - dAppCommission), auctionAssetId58)])) | |
265 | 265 | else if ((auctionState == stateSuggested)) | |
266 | - | then WriteSet([DataEntry( | |
266 | + | then WriteSet([DataEntry(AuctionIdKey, ((((((((((((((stateInProgress + "_") + auctionInfo) + "_") + toBase58String(auctionCustomer)) + "_") + toString(auctionStart)) + "_") + toString(auctionDuration)) + "_") + toString(auctionBlocksForExecution)) + "_") + auctionAssetName) + "_") + toString(auctionPrice)))]) | |
267 | 267 | else throw("Incorrect auction state") | |
268 | - | else ScriptResult(WriteSet([DataEntry( | |
268 | + | else ScriptResult(WriteSet([DataEntry(AuctionIdKey, ((((((((((((((((stateInProgress + "_") + auctionInfo) + "_") + toBase58String(auctionCustomer)) + "_") + toString(auctionStart)) + "_") + toString(auctionDuration)) + "_") + toString(auctionBlocksForExecution)) + "_") + auctionAssetName) + "_") + toString(FreelancerBidAmount)) + "_") + freelancerPub))]), TransferSet([ScriptTransfer(addressFromPublicKey(auctionCustomer), amountDifference, auctionAssetId58)])) | |
269 | 269 | else throw("Only auction customer can choose a freelancer") | |
270 | 270 | } | |
271 | 271 | ||
272 | 272 | ||
273 | 273 | ||
274 | 274 | @Callable(i) | |
275 | 275 | func increaseExecutionTime (auctionId,executionDays) = { | |
276 | - | let caller = | |
277 | - | let | |
278 | - | let auctionDataList = getDataList( | |
276 | + | let caller = extract(i.callerPublicKey) | |
277 | + | let AuctionIdKey = AuctionIdDataKey(auctionId) | |
278 | + | let auctionDataList = getDataList(AuctionIdKey) | |
279 | 279 | let auctionState = auctionDataList[0] | |
280 | - | let auctionCustomer = auctionDataList[1] | |
281 | - | let auctionExecutionTime = parseIntValue(auctionDataList[3]) | |
280 | + | let auctionInfo = auctionDataList[1] | |
281 | + | let auctionCustomer = fromBase58String(auctionDataList[2]) | |
282 | + | let auctionStart = parseIntValue(auctionDataList[3]) | |
283 | + | let auctionDuration = parseIntValue(auctionDataList[4]) | |
284 | + | let auctionBlocksForExecution = parseIntValue(auctionDataList[5]) | |
285 | + | let auctionAssetName = auctionDataList[6] | |
286 | + | let auctionPrice = parseIntValue(auctionDataList[7]) | |
282 | 287 | let newAuctionExecutionTime = { | |
283 | - | let | |
284 | - | if (( | |
285 | - | then | |
288 | + | let newAuctionBlocksForExecution = (executionDays * day) | |
289 | + | if ((newAuctionBlocksForExecution > auctionBlocksForExecution)) | |
290 | + | then newAuctionBlocksForExecution | |
286 | 291 | else throw("New execution time must more than current execution time") | |
287 | 292 | } | |
288 | 293 | if ((caller == auctionCustomer)) | |
289 | - | then if ( | |
290 | - | then | |
291 | - | else (auctionState == stateSuggested)) | |
292 | - | then true | |
293 | - | else (auctionState == stateInProgress)) | |
294 | - | then { | |
295 | - | let | |
296 | - | WriteSet([DataEntry( | |
297 | - | } | |
298 | - | else throw("Incorrect state") | |
294 | + | then if ((auctionState == stateOpen)) | |
295 | + | then WriteSet([DataEntry(AuctionIdKey, ((((((((((((((auctionState + "_") + auctionInfo) + "_") + toBase58String(auctionCustomer)) + "_") + toString(auctionStart)) + "_") + toString(auctionDuration)) + "_") + toString(auctionBlocksForExecution)) + "_") + auctionAssetName) + "_") + toString(auctionPrice)))]) | |
296 | + | else if (if ((auctionState == stateSuggested)) | |
297 | + | then true | |
298 | + | else (auctionState == stateInProgress)) | |
299 | + | then { | |
300 | + | let freelancerPub = auctionDataList[7] | |
301 | + | WriteSet([DataEntry(AuctionIdKey, ((((((((((((((((auctionState + "_") + auctionInfo) + "_") + toBase58String(auctionCustomer)) + "_") + toString(auctionStart)) + "_") + toString(auctionDuration)) + "_") + toString(auctionBlocksForExecution)) + "_") + auctionAssetName) + "_") + toString(auctionPrice)) + "_") + freelancerPub))]) | |
302 | + | } | |
303 | + | else throw("Incorrect state") | |
299 | 304 | else throw("Only customer can increase execution time") | |
300 | 305 | } | |
301 | 306 | ||
302 | 307 | ||
303 | 308 | ||
304 | 309 | @Callable(i) | |
305 | 310 | func cancelAuction (auctionId) = { | |
306 | - | let | |
307 | - | let auctionDataList = getDataList( | |
311 | + | let AuctionIdKey = AuctionIdDataKey(auctionId) | |
312 | + | let auctionDataList = getDataList(AuctionIdKey) | |
308 | 313 | let auctionState = auctionDataList[0] | |
309 | - | let auctionCustomer = fromBase58String(auctionDataList[1]) | |
314 | + | let auctionInfo = auctionDataList[1] | |
315 | + | let auctionCustomer = fromBase58String(auctionDataList[2]) | |
316 | + | let auctionStart = parseIntValue(auctionDataList[3]) | |
317 | + | let auctionDuration = parseIntValue(auctionDataList[4]) | |
318 | + | let auctionBlocksForExecution = parseIntValue(auctionDataList[5]) | |
319 | + | let auctionAssetName = auctionDataList[6] | |
320 | + | let auctionPrice = parseIntValue(auctionDataList[7]) | |
310 | 321 | let auctionIdOwnerCheck = if ((i.callerPublicKey == auctionCustomer)) | |
311 | 322 | then true | |
312 | 323 | else throw("Auction can be canceled only by owner.") | |
313 | 324 | if ((auctionState == stateOpen)) | |
314 | - | then { | |
315 | - | let dataString = ((((((((auctionDataList[1] + "_") + auctionDataList[2]) + "_") + auctionDataList[3]) + "_") + auctionDataList[4]) + "_") + auctionDataList[5]) | |
316 | - | WriteSet([DataEntry(auctionIdKey, ((stateCancel + "_") + dataString))]) | |
317 | - | } | |
325 | + | then WriteSet([DataEntry(AuctionIdKey, ((((((((((((((stateCancel + "_") + auctionInfo) + "_") + toBase58String(auctionCustomer)) + "_") + toString(auctionStart)) + "_") + toString(auctionDuration)) + "_") + toString(auctionBlocksForExecution)) + "_") + auctionAssetName) + "_") + toString(auctionPrice)))]) | |
318 | 326 | else throw("Incorrect auction state.") | |
319 | 327 | } | |
320 | 328 | ||
321 | 329 | ||
322 | 330 | ||
323 | 331 | @Callable(i) | |
324 | 332 | func openDispute (auctionId) = { | |
325 | - | let caller = | |
326 | - | let | |
327 | - | let auctionDataList = getDataList( | |
333 | + | let caller = extract(i.callerPublicKey) | |
334 | + | let AuctionIdKey = AuctionIdDataKey(auctionId) | |
335 | + | let auctionDataList = getDataList(AuctionIdKey) | |
328 | 336 | let auctionState = auctionDataList[0] | |
329 | - | let auctionCustomer = auctionDataList[1] | |
330 | - | let auctionFreelancer = auctionDataList[6] | |
337 | + | let auctionInfo = auctionDataList[1] | |
338 | + | let auctionCustomer = fromBase58String(auctionDataList[2]) | |
339 | + | let auctionStart = parseIntValue(auctionDataList[3]) | |
340 | + | let auctionDuration = parseIntValue(auctionDataList[4]) | |
341 | + | let auctionBlocksForExecution = parseIntValue(auctionDataList[5]) | |
342 | + | let auctionAssetName = auctionDataList[6] | |
343 | + | let auctionPrice = parseIntValue(auctionDataList[7]) | |
344 | + | let auctionFreelancer = fromBase58String(auctionDataList[8]) | |
331 | 345 | if (if ((caller == auctionCustomer)) | |
332 | 346 | then true | |
333 | 347 | else (caller == auctionFreelancer)) | |
334 | 348 | then { | |
335 | 349 | let dataString = "1" | |
336 | - | WriteSet([DataEntry( | |
350 | + | WriteSet([DataEntry(AuctionIdKey, ((((stateDispute + "_") + auctionInfo) + "_") + dataString)), DataEntry((auctionId + "_Dispute"), "0")]) | |
337 | 351 | } | |
338 | 352 | else throw("Only customer and freelancer can open dispute") | |
339 | 353 | } | |
340 | 354 | ||
341 | 355 | ||
342 | 356 | ||
343 | 357 | @Callable(i) | |
344 | 358 | func voteDispute (auctionId,vote) = { | |
345 | - | let auctionIdKey = AuctionIdKey(auctionId) | |
346 | - | let auctionDataList = getDataList(auctionIdKey) | |
359 | + | let AuctionIdKey = AuctionIdDataKey(auctionId) | |
360 | + | let auctionDataList = getDataList(AuctionIdKey) | |
361 | + | let auctionInfo = auctionDataList[1] | |
347 | 362 | let auctionStateCheck = { | |
348 | 363 | let auctionState = auctionDataList[0] | |
349 | 364 | if ((auctionState == stateDispute)) | |
350 | 365 | then true | |
351 | 366 | else throw(("Incorrect state. Must be: " + stateDispute)) | |
352 | 367 | } | |
353 | 368 | let auctionAssetId = auctionDataList[4] | |
354 | 369 | let auctionPrice = parseIntValue(auctionDataList[5]) | |
355 | 370 | let newVote = if (if ((vote == customer)) | |
356 | 371 | then true | |
357 | 372 | else (vote == freelancer)) | |
358 | 373 | then vote | |
359 | 374 | else throw(((("Vote is incorrect. Must be: " + customer) + " or ") + freelancer)) | |
360 | 375 | let newVoter = if (if (if (if (if ((i.callerPublicKey == ambassador1)) | |
361 | 376 | then true | |
362 | 377 | else (i.callerPublicKey == ambassador2)) | |
363 | 378 | then true | |
364 | 379 | else (i.callerPublicKey == ambassador3)) | |
365 | 380 | then true | |
366 | 381 | else (i.callerPublicKey == ambassador4)) | |
367 | 382 | then true | |
368 | 383 | else (i.callerPublicKey == ambassador5)) | |
369 | 384 | then toBase58String(i.callerPublicKey) | |
370 | 385 | else throw("You have no rights for disputes resolving") | |
371 | 386 | let disputeData = { | |
372 | 387 | let keyDispute = ((auctionId + "_") + stateDispute) | |
373 | 388 | let valueDispute = getString(this, keyDispute) | |
374 | 389 | match valueDispute { | |
375 | 390 | case a: String => | |
376 | 391 | a | |
377 | 392 | case _ => | |
378 | 393 | throw("Cannot find data of dispute in storage") | |
379 | 394 | } | |
380 | 395 | } | |
381 | 396 | let disputeDataList = split(disputeData, "/") | |
382 | 397 | let votesCounter = disputeDataList[0] | |
383 | 398 | if ((votesCounter == "4")) | |
384 | 399 | then { | |
385 | 400 | let votersList = split(disputeDataList[1], "_") | |
386 | 401 | let votesList = split(disputeDataList[2], "_") | |
387 | 402 | let alreadyVoted = if ((newVoter == votersList[0])) | |
388 | 403 | then true | |
389 | 404 | else (newVoter == votersList[1]) | |
390 | 405 | if (alreadyVoted) | |
391 | 406 | then throw("You already voted") | |
392 | 407 | else { | |
393 | 408 | let newVotesCounter = "5" | |
394 | 409 | let newVoters = ((disputeDataList[1] + "_") + newVoter) | |
395 | 410 | let newVotes = ((disputeDataList[2] + "_") + newVote) | |
396 | 411 | let newDisputeDataString = ((((newVotesCounter + "/") + newVoters) + "/") + newVotes) | |
397 | 412 | let disputeWinner = { | |
398 | 413 | let vote1 = if ((votesList[0] == customer)) | |
399 | 414 | then 1 | |
400 | 415 | else 0 | |
401 | 416 | let vote2 = if ((votesList[1] == customer)) | |
402 | 417 | then 1 | |
403 | 418 | else 0 | |
404 | 419 | let vote3 = if ((votesList[2] == customer)) | |
405 | 420 | then 1 | |
406 | 421 | else 0 | |
407 | 422 | let vote4 = if ((votesList[3] == customer)) | |
408 | 423 | then 1 | |
409 | 424 | else 0 | |
410 | 425 | let vote5 = if ((newVote == customer)) | |
411 | 426 | then 1 | |
412 | 427 | else 0 | |
413 | 428 | let customerVotes = ((((vote1 + vote2) + vote3) + vote4) + vote5) | |
414 | 429 | if ((customerVotes > 2)) | |
415 | 430 | then customer | |
416 | 431 | else freelancer | |
417 | 432 | } | |
418 | 433 | let newDataString = ((((((((((auctionDataList[1] + "_") + auctionDataList[2]) + "_") + auctionDataList[3]) + "_") + auctionDataList[4]) + "_") + auctionDataList[5]) + "_") + auctionDataList[6]) | |
419 | 434 | let DisputeWinnerAddress = if ((disputeWinner == customer)) | |
420 | 435 | then auctionDataList[1] | |
421 | 436 | else auctionDataList[6] | |
422 | 437 | let amountWithoutComm = (auctionPrice - ((auctionPrice * 3) / 100)) | |
423 | - | ScriptResult(WriteSet([DataEntry( | |
438 | + | ScriptResult(WriteSet([DataEntry(AuctionIdDataKey(auctionId), ((((stateDisputeResolved + "_") + auctionInfo) + "_") + newDataString)), DataEntry(((auctionId + "_") + stateDispute), newDisputeDataString)]), TransferSet([ScriptTransfer(addressFromPublicKey(fromBase58String(DisputeWinnerAddress)), amountWithoutComm, fromBase58String(auctionAssetId))])) | |
424 | 439 | } | |
425 | 440 | } | |
426 | 441 | else { | |
427 | 442 | let newDisputeDataString = if ((votesCounter == "0")) | |
428 | 443 | then { | |
429 | 444 | let newVotesCounter = "1" | |
430 | 445 | let newVoters = newVoter | |
431 | 446 | let newVotes = newVote | |
432 | 447 | let newDataString = ((((newVotesCounter + "/") + newVoters) + "/") + newVotes) | |
433 | 448 | newDataString | |
434 | 449 | } | |
435 | 450 | else if ((votesCounter == "1")) | |
436 | 451 | then { | |
437 | 452 | let voter1 = disputeDataList[1] | |
438 | 453 | let vote1 = disputeDataList[2] | |
439 | 454 | let alreadyVoted = (newVoter == voter1) | |
440 | 455 | if (alreadyVoted) | |
441 | 456 | then throw("You already voted") | |
442 | 457 | else { | |
443 | 458 | let newVotesCounter = "1" | |
444 | 459 | let newVoters = (voter1 + newVoter) | |
445 | 460 | let newVotes = (vote1 + newVote) | |
446 | 461 | let newDataString = ((((newVotesCounter + "/") + newVoters) + "/") + newVotes) | |
447 | 462 | newDataString | |
448 | 463 | } | |
449 | 464 | } | |
450 | 465 | else if ((votesCounter == "2")) | |
451 | 466 | then { | |
452 | 467 | let votersList = split(disputeDataList[1], "_") | |
453 | 468 | let votesList = split(disputeDataList[2], "_") | |
454 | 469 | let alreadyVoted = if ((newVoter == votersList[0])) | |
455 | 470 | then true | |
456 | 471 | else (newVoter == votersList[1]) | |
457 | 472 | if (alreadyVoted) | |
458 | 473 | then throw("You already voted") | |
459 | 474 | else { | |
460 | 475 | let newVotesCounter = "3" | |
461 | 476 | let newVoters = ((disputeDataList[1] + "_") + newVoter) | |
462 | 477 | let newVotes = ((disputeDataList[2] + "_") + newVote) | |
463 | 478 | let newDataString = ((((newVotesCounter + "/") + newVoters) + "/") + newVotes) | |
464 | 479 | newDataString | |
465 | 480 | } | |
466 | 481 | } | |
467 | 482 | else if ((votesCounter == "3")) | |
468 | 483 | then { | |
469 | 484 | let votersList = split(disputeDataList[1], "_") | |
470 | 485 | let votesList = split(disputeDataList[2], "_") | |
471 | 486 | let alreadyVoted = if (if ((newVoter == votersList[0])) | |
472 | 487 | then true | |
473 | 488 | else (newVoter == votersList[1])) | |
474 | 489 | then true | |
475 | 490 | else (newVoter == votersList[2]) | |
476 | 491 | if (alreadyVoted) | |
477 | 492 | then throw("You already voted") | |
478 | 493 | else { | |
479 | 494 | let newVotesCounter = "4" | |
480 | 495 | let newVoters = ((disputeDataList[1] + "_") + newVoter) | |
481 | 496 | let newVotes = ((disputeDataList[2] + "_") + newVote) | |
482 | 497 | let newDataString = ((((newVotesCounter + "/") + newVoters) + "/") + newVotes) | |
483 | 498 | newDataString | |
484 | 499 | } | |
485 | 500 | } | |
486 | 501 | else throw("Dispute has been already resolved") | |
487 | 502 | WriteSet([DataEntry(((auctionId + "_") + stateDispute), newDisputeDataString)]) | |
488 | 503 | } | |
489 | 504 | } | |
490 | 505 | ||
491 | 506 | ||
492 | 507 | ||
493 | 508 | @Callable(i) | |
494 | - | func | |
495 | - | let | |
496 | - | let auctionDataList = getDataList( | |
509 | + | func workHandOver (auctionId) = { | |
510 | + | let AuctionIdKey = AuctionIdDataKey(auctionId) | |
511 | + | let auctionDataList = getDataList(AuctionIdKey) | |
497 | 512 | let auctionState = auctionDataList[0] | |
498 | - | let auctionStart = parseIntValue(auctionDataList[2]) | |
499 | - | let auctionExecutionTime = parseIntValue(auctionDataList[3]) | |
513 | + | let auctionInfo = auctionDataList[1] | |
514 | + | let auctionCustomer = fromBase58String(auctionDataList[2]) | |
515 | + | let auctionStart = parseIntValue(auctionDataList[3]) | |
516 | + | let auctionDuration = parseIntValue(auctionDataList[4]) | |
517 | + | let auctionBlocksForExecution = parseIntValue(auctionDataList[5]) | |
518 | + | let auctionAssetName = auctionDataList[6] | |
519 | + | let auctionPrice = parseIntValue(auctionDataList[7]) | |
500 | 520 | let currentTime = height | |
501 | 521 | let freelancerPubCheck = { | |
502 | 522 | let caller = toBase58String(i.callerPublicKey) | |
503 | 523 | let auctionFreelancer = auctionDataList[6] | |
504 | 524 | if ((caller == auctionFreelancer)) | |
505 | 525 | then caller | |
506 | 526 | else throw("Only a freelancer can indicate that the work is done") | |
507 | 527 | } | |
508 | - | let timeIsOver = ((currentTime - auctionStart) > | |
528 | + | let timeIsOver = ((currentTime - auctionStart) > auctionBlocksForExecution) | |
509 | 529 | if ((auctionState == stateInProgress)) | |
510 | 530 | then if (timeIsOver) | |
511 | 531 | then { | |
512 | 532 | let newDataString = ((((((((((auctionDataList[1] + "_") + auctionDataList[2]) + "_") + auctionDataList[3]) + "_") + auctionDataList[4]) + "_") + auctionDataList[5]) + "_") + auctionDataList[6]) | |
513 | - | WriteSet([DataEntry( | |
533 | + | WriteSet([DataEntry(AuctionIdKey, ((((stateDispute + "_") + auctionInfo) + "_") + newDataString))]) | |
514 | 534 | } | |
515 | 535 | else { | |
516 | 536 | let newDataString = ((((((((((auctionDataList[1] + "_") + auctionDataList[2]) + "_") + auctionDataList[3]) + "_") + auctionDataList[4]) + "_") + auctionDataList[5]) + "_") + auctionDataList[6]) | |
517 | - | WriteSet([DataEntry( | |
537 | + | WriteSet([DataEntry(AuctionIdKey, ((((stateWait4Confirm + "_") + auctionInfo) + "_") + newDataString))]) | |
518 | 538 | } | |
519 | 539 | else throw("Auction state is incorrect") | |
520 | 540 | } | |
521 | 541 | ||
522 | 542 | ||
523 | 543 | ||
524 | 544 | @Callable(i) | |
525 | - | func | |
526 | - | let | |
527 | - | let auctionDataList = getDataList( | |
545 | + | func acceptWork (auctionId) = { | |
546 | + | let AuctionIdKey = AuctionIdDataKey(auctionId) | |
547 | + | let auctionDataList = getDataList(AuctionIdKey) | |
528 | 548 | let auctionState = auctionDataList[0] | |
529 | - | let auctionCustomer = auctionDataList[1] | |
530 | - | let auctionAssetName = auctionDataList[4] | |
531 | - | let auctionPrice = parseIntValue(auctionDataList[5]) | |
532 | - | let auctionFreelancer = auctionDataList[6] | |
533 | - | let caller = toBase58String(i.callerPublicKey) | |
549 | + | let auctionInfo = auctionDataList[1] | |
550 | + | let auctionCustomer = fromBase58String(auctionDataList[2]) | |
551 | + | let auctionStart = parseIntValue(auctionDataList[3]) | |
552 | + | let auctionDuration = parseIntValue(auctionDataList[4]) | |
553 | + | let auctionBlocksForExecution = parseIntValue(auctionDataList[5]) | |
554 | + | let auctionAssetName = auctionDataList[6] | |
555 | + | let auctionPrice = parseIntValue(auctionDataList[7]) | |
556 | + | let auctionFreelancer = auctionDataList[2] | |
557 | + | let caller = extract(i.callerPublicKey) | |
534 | 558 | let dAppCommission = ((auctionPrice * 3) / 100) | |
535 | 559 | let amountWithoutComm = (auctionPrice - dAppCommission) | |
536 | 560 | let auctionAssetId58 = AssetNameToBase58(auctionAssetName) | |
537 | 561 | let newRating = { | |
538 | 562 | let valueRating = getInteger(this, (auctionFreelancer + "_Rating")) | |
539 | 563 | let currentRating = match valueRating { | |
540 | 564 | case a: Int => | |
541 | 565 | a | |
542 | 566 | case _ => | |
543 | 567 | 0 | |
544 | 568 | } | |
545 | 569 | (currentRating + 1) | |
546 | 570 | } | |
547 | 571 | if ((caller == auctionCustomer)) | |
548 | 572 | then if ((auctionState == stateWait4Confirm)) | |
549 | 573 | then { | |
550 | 574 | let newDataString = ((((((((((auctionDataList[1] + "_") + auctionDataList[2]) + "_") + auctionDataList[3]) + "_") + auctionDataList[4]) + "_") + auctionDataList[5]) + "_") + auctionDataList[6]) | |
551 | - | ScriptResult(WriteSet([DataEntry( | |
575 | + | ScriptResult(WriteSet([DataEntry(AuctionIdKey, ((((stateComplete + "_") + auctionInfo) + "_") + newDataString)), DataEntry((auctionFreelancer + "_Rating"), newRating)]), TransferSet([ScriptTransfer(addressFromPublicKey(fromBase58String(auctionFreelancer)), amountWithoutComm, auctionAssetId58)])) | |
552 | 576 | } | |
553 | 577 | else throw(("Incorrect state. Must be: " + stateWait4Confirm)) | |
554 | 578 | else throw("Only auction customer can use this function") | |
555 | 579 | } | |
556 | 580 | ||
557 | 581 | ||
558 | 582 | @Verifier(tx) | |
559 | 583 | func verify () = if (sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)) | |
560 | 584 | then match tx { | |
561 | 585 | case ttx: TransferTransaction => | |
562 | 586 | true | |
563 | 587 | case stx: SetScriptTransaction => | |
564 | 588 | true | |
565 | 589 | case _ => | |
566 | 590 | false | |
567 | 591 | } | |
568 | 592 | else false | |
569 | 593 |
github/deemru/w8io/026f985 97.83 ms ◑