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/pmWXD9AAAAAAlzdGF0ZU9wZW4CAAAABk9wZW5lZAAAAAAOc3RhdGVTdWdnZXN0ZWQCAAAACVN1Z2dlc3RlZAAAAAALc3RhdGVDYW5jZWwCAAAACENhbmNlbGVkAAAAAA9zdGF0ZUluUHJvZ3Jlc3MCAAAACkluUHJvZ3Jlc3MAAAAAEXN0YXRlV2FpdDRDb25maXJtAgAAABNXYWl0Rm9yQ29uZmlybWF0aW9uAAAAAA1zdGF0ZUNvbXBsZXRlAgAAAA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AUAAAARc3RhdGVXYWl0NENvbmZpcm0JAAACAAAAAQIAAAArT25seSBhdWN0aW9uIGN1c3RvbWVyIGNhbiB1c2UgdGhpcyBmdW5jdGlvbgAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAADCQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAgFAAAAAnR4AAAAD3NlbmRlclB1YmxpY0tleQQAAAAHJG1hdGNoMAUAAAACdHgDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAE1RyYW5zZmVyVHJhbnNhY3Rpb24EAAAAA3R0eAUAAAAHJG1hdGNoMAYDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAFFNldFNjcmlwdFRyYW5zYWN0aW9uBAAAAANzdHgFAAAAByRtYXRjaDAGBwfd3ElL", "chainId": 84, "height": 686169, "spentComplexity": 0 } View: original | compacted Prev: EntXs9xrRnEXHcdroPfb913ypGj4173xsXC5oHw6VoRc Next: uHMRMMVqgLft9Gz3TPboWSv1VMCnscBqvkYah7j6Ywk Diff:
OldNewDifferences
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let day = 1440
5-
6-let comission = 3
75
86 let WAVES = unit
97
4341
4442 let ambassador5 = base58'1'
4543
46-func AuctionIdKey (auctionId) = (auctionId + "_Auction")
44+func AuctionIdDataKey (auctionId) = (auctionId + "_AuctionData")
4745
4846
4947 func getDataList (auctionId) = {
151149
152150
153151 @Callable(i)
154-func createAuction (jobExecutionDays,auctionDurationDays) = {
152+func createAuction (jobExecutionDays,auctionDurationDays,auctionInfo) = {
155153 let auctionId = toBase58String(i.transactionId)
156154 let auctionCustomer = toBase58String(i.callerPublicKey)
157155 let pmt = extract(i.payment)
172170 then "USD"
173171 else throw("AssetId is incorrect")
174172 let newFreezedBalance = increaseFreezedBalance(pmtAssetName, auctionPrice)
175- WriteSet([DataEntry(AuctionIdKey(auctionId), ((((((((((((stateOpen + "_") + auctionCustomer) + "_") + toString(auctionStart)) + "_") + toString(auctionDurationBlocks)) + "_") + toString(blocksForExecution)) + "_") + pmtAssetName) + "_") + toString(auctionPrice))), DataEntry((pmtAssetName + "_Freezed"), newFreezedBalance)])
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)])
176174 }
177175
178176
181179 func makeBid (auctionId,betPrice) = {
182180 let callerPub = toBase58String(i.callerPublicKey)
183181 let betTime = height
184- let auctionIdKey = AuctionIdKey(auctionId)
185- let auctionDataList = getDataList(auctionIdKey)
182+ let AuctionIdKey = AuctionIdDataKey(auctionId)
183+ let auctionDataList = getDataList(AuctionIdKey)
186184 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])
193192 let auctionAssetId58 = AssetNameToBase58(auctionAssetName)
194193 let newBid = betPriceCheck(betPrice, auctionPrice)
195194 let newFreelancer = freelancerIsRegistered(callerPub)
198197 let auctionTimeisOver = timeCheck(betTime, auctionStart, auctionDuration)
199198 if (auctionTimeisOver)
200199 then if ((auctionState == stateOpen))
201- then ScriptResult(WriteSet([DataEntry(auctionIdKey, ((((((((((((((((stateCancel + "_") + toBase58String(auctionCustomer)) + "_") + toString(auctionStart)) + "_") + toString(auctionDuration)) + "_") + toString(auctionBlocksForExecution)) + "_") + auctionAssetName) + "_") + toString(auctionPrice)) + "_") + "NoFreelancer") + "_") + "NoBid")), DataEntry((auctionAssetName + "_Freezed"), newFreezedBalance)]), TransferSet([ScriptTransfer(addressFromPublicKey(auctionCustomer), (auctionPrice - dAppCommission), auctionAssetId58)]))
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)]))
202201 else if ((auctionState == stateSuggested))
203202 then {
204203 let auctionFreelancer = auctionDataList[7]
205204 let auctionJobCost = auctionDataList[8]
206- WriteSet([DataEntry(auctionIdKey, ((((((((((((((((stateInProgress + "_") + toBase58String(auctionCustomer)) + "_") + toString(auctionStart)) + "_") + toString(auctionDuration)) + "_") + toString(auctionBlocksForExecution)) + "_") + auctionAssetName) + "_") + toString(auctionPrice)) + "_") + auctionFreelancer) + "_") + auctionJobCost))])
205+ WriteSet([DataEntry(AuctionIdKey, ((((((((((((((((((stateInProgress + "_") + auctionInfo) + "_") + toBase58String(auctionCustomer)) + "_") + toString(auctionStart)) + "_") + toString(auctionDuration)) + "_") + toString(auctionBlocksForExecution)) + "_") + auctionAssetName) + "_") + toString(auctionPrice)) + "_") + auctionFreelancer) + "_") + auctionJobCost))])
207206 }
208207 else throw("Incorrect auction state")
209208 else if ((auctionState == stateOpen))
210- then WriteSet([DataEntry(((auctionId + "_") + newFreelancer), betPrice), DataEntry(auctionIdKey, ((((((((((((((stateSuggested + "_") + toBase58String(auctionCustomer)) + "_") + toString(auctionStart)) + "_") + toString(auctionDuration)) + "_") + toString(auctionBlocksForExecution)) + "_") + auctionAssetName) + "_") + toString(auctionPrice)) + "_") + newFreelancer))])
209+ then WriteSet([DataEntry(((auctionId + "_") + newFreelancer), betPrice), DataEntry(AuctionIdKey, ((((((((((((((((stateSuggested + "_") + auctionInfo) + "_") + toBase58String(auctionCustomer)) + "_") + toString(auctionStart)) + "_") + toString(auctionDuration)) + "_") + toString(auctionBlocksForExecution)) + "_") + auctionAssetName) + "_") + toString(auctionPrice)) + "_") + newFreelancer))])
211210 else if ((auctionState == stateSuggested))
212211 then {
213212 let auctionLowestBidder = auctionDataList[7]
224223 then newFreelancer
225224 else auctionLowestBidder
226225 }
227- WriteSet([DataEntry(((auctionId + "_") + callerPub), betPrice), DataEntry(auctionIdKey, ((((((((((((((stateSuggested + "_") + toBase58String(auctionCustomer)) + "_") + toString(auctionStart)) + "_") + toString(auctionDuration)) + "_") + toString(auctionBlocksForExecution)) + "_") + auctionAssetName) + "_") + toString(auctionPrice)) + "_") + newAuctionLowestBidder))])
226+ WriteSet([DataEntry(((auctionId + "_") + callerPub), betPrice), DataEntry(AuctionIdKey, ((((((((((((((((stateSuggested + "_") + auctionInfo) + "_") + toBase58String(auctionCustomer)) + "_") + toString(auctionStart)) + "_") + toString(auctionDuration)) + "_") + toString(auctionBlocksForExecution)) + "_") + auctionAssetName) + "_") + toString(auctionPrice)) + "_") + newAuctionLowestBidder))])
228227 }
229228 else throw(((((("Incorrect jobId state. Now: " + auctionState) + ", must be: ") + stateOpen) + " or ") + stateSuggested))
230229 }
233232
234233 @Callable(i)
235234 func chooseFreelancer (auctionId,freelancerPub) = {
236- let callerPub = toBase58String(i.callerPublicKey)
235+ let callerPub = extract(i.callerPublicKey)
237236 let betTime = height
238- let auctionIdKey = AuctionIdKey(auctionId)
239- let auctionDataList = getDataList(auctionIdKey)
237+ let AuctionIdKey = AuctionIdDataKey(auctionId)
238+ let auctionDataList = getDataList(AuctionIdKey)
240239 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])
247247 let auctionAssetId58 = AssetNameToBase58(auctionAssetName)
248248 let FreelancerBidAmount = {
249249 let keyFreelancerBid = ((auctionId + "_") + freelancerPub)
261261 if ((callerPub == auctionCustomer))
262262 then if (auctionTimeisOver)
263263 then if ((auctionState == stateOpen))
264- then ScriptResult(WriteSet([DataEntry(auctionIdKey, ((((((((((((((((stateCancel + "_") + auctionCustomer) + "_") + toString(auctionStart)) + "_") + toString(auctionDuration)) + "_") + toString(auctionBlocksForExecution)) + "_") + auctionAssetName) + "_") + toString(auctionPrice)) + "_") + "NoFreelancer") + "_") + "NoBid"))]), TransferSet([ScriptTransfer(addressFromPublicKey(fromBase58String(auctionCustomer)), (auctionPrice - dAppCommission), auctionAssetId58)]))
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)]))
265265 else if ((auctionState == stateSuggested))
266- then WriteSet([DataEntry(auctionIdKey, ((((((((((((stateInProgress + "_") + auctionCustomer) + "_") + toString(auctionStart)) + "_") + toString(auctionDuration)) + "_") + toString(auctionBlocksForExecution)) + "_") + auctionAssetName) + "_") + toString(auctionPrice)))])
266+ then WriteSet([DataEntry(AuctionIdKey, ((((((((((((((stateInProgress + "_") + auctionInfo) + "_") + toBase58String(auctionCustomer)) + "_") + toString(auctionStart)) + "_") + toString(auctionDuration)) + "_") + toString(auctionBlocksForExecution)) + "_") + auctionAssetName) + "_") + toString(auctionPrice)))])
267267 else throw("Incorrect auction state")
268- else ScriptResult(WriteSet([DataEntry(auctionIdKey, ((((((((((((((stateInProgress + "_") + auctionCustomer) + "_") + toString(auctionStart)) + "_") + toString(auctionDuration)) + "_") + toString(auctionBlocksForExecution)) + "_") + auctionAssetName) + "_") + toString(FreelancerBidAmount)) + "_") + freelancerPub))]), TransferSet([ScriptTransfer(addressFromPublicKey(fromBase58String(auctionCustomer)), amountDifference, auctionAssetId58)]))
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)]))
269269 else throw("Only auction customer can choose a freelancer")
270270 }
271271
273273
274274 @Callable(i)
275275 func increaseExecutionTime (auctionId,executionDays) = {
276- let caller = toBase58String(i.callerPublicKey)
277- let auctionIdKey = AuctionIdKey(auctionId)
278- let auctionDataList = getDataList(auctionIdKey)
276+ let caller = extract(i.callerPublicKey)
277+ let AuctionIdKey = AuctionIdDataKey(auctionId)
278+ let auctionDataList = getDataList(AuctionIdKey)
279279 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])
282287 let newAuctionExecutionTime = {
283- let newExecutionTime = (executionDays * day)
284- if ((newExecutionTime > auctionExecutionTime))
285- then newExecutionTime
288+ let newAuctionBlocksForExecution = (executionDays * day)
289+ if ((newAuctionBlocksForExecution > auctionBlocksForExecution))
290+ then newAuctionBlocksForExecution
286291 else throw("New execution time must more than current execution time")
287292 }
288293 if ((caller == auctionCustomer))
289- then if (if (if ((auctionState == stateOpen))
290- then true
291- else (auctionState == stateSuggested))
292- then true
293- else (auctionState == stateInProgress))
294- then {
295- let newDataString = ((((((((((((auctionState + "_") + auctionCustomer) + "_") + auctionDataList[2]) + "_") + toString(newAuctionExecutionTime)) + "_") + auctionDataList[4]) + "_") + auctionDataList[5]) + "_") + auctionDataList[6])
296- WriteSet([DataEntry(auctionIdKey, newDataString)])
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")
299304 else throw("Only customer can increase execution time")
300305 }
301306
303308
304309 @Callable(i)
305310 func cancelAuction (auctionId) = {
306- let auctionIdKey = AuctionIdKey(auctionId)
307- let auctionDataList = getDataList(auctionIdKey)
311+ let AuctionIdKey = AuctionIdDataKey(auctionId)
312+ let auctionDataList = getDataList(AuctionIdKey)
308313 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])
310321 let auctionIdOwnerCheck = if ((i.callerPublicKey == auctionCustomer))
311322 then true
312323 else throw("Auction can be canceled only by owner.")
313324 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)))])
318326 else throw("Incorrect auction state.")
319327 }
320328
322330
323331 @Callable(i)
324332 func openDispute (auctionId) = {
325- let caller = toBase58String(i.callerPublicKey)
326- let auctionIdKey = AuctionIdKey(auctionId)
327- let auctionDataList = getDataList(auctionIdKey)
333+ let caller = extract(i.callerPublicKey)
334+ let AuctionIdKey = AuctionIdDataKey(auctionId)
335+ let auctionDataList = getDataList(AuctionIdKey)
328336 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])
331345 if (if ((caller == auctionCustomer))
332346 then true
333347 else (caller == auctionFreelancer))
334348 then {
335349 let dataString = "1"
336- WriteSet([DataEntry(auctionIdKey, (stateDispute + dataString)), DataEntry((auctionId + "_Dispute"), "0")])
350+ WriteSet([DataEntry(AuctionIdKey, ((((stateDispute + "_") + auctionInfo) + "_") + dataString)), DataEntry((auctionId + "_Dispute"), "0")])
337351 }
338352 else throw("Only customer and freelancer can open dispute")
339353 }
342356
343357 @Callable(i)
344358 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]
347362 let auctionStateCheck = {
348363 let auctionState = auctionDataList[0]
349364 if ((auctionState == stateDispute))
420435 then auctionDataList[1]
421436 else auctionDataList[6]
422437 let amountWithoutComm = (auctionPrice - ((auctionPrice * 3) / 100))
423- ScriptResult(WriteSet([DataEntry(AuctionIdKey(auctionId), (stateDisputeResolved + newDataString)), DataEntry(((auctionId + "_") + stateDispute), newDisputeDataString)]), TransferSet([ScriptTransfer(addressFromPublicKey(fromBase58String(DisputeWinnerAddress)), amountWithoutComm, fromBase58String(auctionAssetId))]))
438+ ScriptResult(WriteSet([DataEntry(AuctionIdDataKey(auctionId), ((((stateDisputeResolved + "_") + auctionInfo) + "_") + newDataString)), DataEntry(((auctionId + "_") + stateDispute), newDisputeDataString)]), TransferSet([ScriptTransfer(addressFromPublicKey(fromBase58String(DisputeWinnerAddress)), amountWithoutComm, fromBase58String(auctionAssetId))]))
424439 }
425440 }
426441 else {
491506
492507
493508 @Callable(i)
494-func workIsDone (auctionId) = {
495- let auctionIdKey = AuctionIdKey(auctionId)
496- let auctionDataList = getDataList(auctionIdKey)
509+func workHandOver (auctionId) = {
510+ let AuctionIdKey = AuctionIdDataKey(auctionId)
511+ let auctionDataList = getDataList(AuctionIdKey)
497512 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])
500520 let currentTime = height
501521 let freelancerPubCheck = {
502522 let caller = toBase58String(i.callerPublicKey)
505525 then caller
506526 else throw("Only a freelancer can indicate that the work is done")
507527 }
508- let timeIsOver = ((currentTime - auctionStart) > auctionExecutionTime)
528+ let timeIsOver = ((currentTime - auctionStart) > auctionBlocksForExecution)
509529 if ((auctionState == stateInProgress))
510530 then if (timeIsOver)
511531 then {
512532 let newDataString = ((((((((((auctionDataList[1] + "_") + auctionDataList[2]) + "_") + auctionDataList[3]) + "_") + auctionDataList[4]) + "_") + auctionDataList[5]) + "_") + auctionDataList[6])
513- WriteSet([DataEntry(auctionIdKey, (stateDispute + newDataString))])
533+ WriteSet([DataEntry(AuctionIdKey, ((((stateDispute + "_") + auctionInfo) + "_") + newDataString))])
514534 }
515535 else {
516536 let newDataString = ((((((((((auctionDataList[1] + "_") + auctionDataList[2]) + "_") + auctionDataList[3]) + "_") + auctionDataList[4]) + "_") + auctionDataList[5]) + "_") + auctionDataList[6])
517- WriteSet([DataEntry(auctionIdKey, (stateWait4Confirm + newDataString))])
537+ WriteSet([DataEntry(AuctionIdKey, ((((stateWait4Confirm + "_") + auctionInfo) + "_") + newDataString))])
518538 }
519539 else throw("Auction state is incorrect")
520540 }
522542
523543
524544 @Callable(i)
525-func acceptByCustomer (auctionId) = {
526- let auctionIdKey = AuctionIdKey(auctionId)
527- let auctionDataList = getDataList(auctionIdKey)
545+func acceptWork (auctionId) = {
546+ let AuctionIdKey = AuctionIdDataKey(auctionId)
547+ let auctionDataList = getDataList(AuctionIdKey)
528548 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)
534558 let dAppCommission = ((auctionPrice * 3) / 100)
535559 let amountWithoutComm = (auctionPrice - dAppCommission)
536560 let auctionAssetId58 = AssetNameToBase58(auctionAssetName)
548572 then if ((auctionState == stateWait4Confirm))
549573 then {
550574 let newDataString = ((((((((((auctionDataList[1] + "_") + auctionDataList[2]) + "_") + auctionDataList[3]) + "_") + auctionDataList[4]) + "_") + auctionDataList[5]) + "_") + auctionDataList[6])
551- ScriptResult(WriteSet([DataEntry(auctionIdKey, (stateComplete + newDataString)), DataEntry((auctionFreelancer + "_Rating"), newRating)]), TransferSet([ScriptTransfer(addressFromPublicKey(fromBase58String(auctionFreelancer)), amountWithoutComm, auctionAssetId58)]))
575+ ScriptResult(WriteSet([DataEntry(AuctionIdKey, ((((stateComplete + "_") + auctionInfo) + "_") + newDataString)), DataEntry((auctionFreelancer + "_Rating"), newRating)]), TransferSet([ScriptTransfer(addressFromPublicKey(fromBase58String(auctionFreelancer)), amountWithoutComm, auctionAssetId58)]))
552576 }
553577 else throw(("Incorrect state. Must be: " + stateWait4Confirm))
554578 else throw("Only auction customer can use this function")
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let day = 1440
5-
6-let comission = 3
75
86 let WAVES = unit
97
108 let wBTC = base58'8LQW8f7P5d5PZM7GtZEBgaqRPGSzS3DfPuiXrURJ4AJS'
119
1210 let wEUR = base58'Gtb1WRznfchDnTh37ezoDTJ4wcoKaRsKqKjJjy7nm2zU'
1311
1412 let wUSD = base58'Ft8X1v1LTa1ABafufpaCWyVj8KkaxUWE6xBhW6sNFJck'
1513
1614 let stateOpen = "Opened"
1715
1816 let stateSuggested = "Suggested"
1917
2018 let stateCancel = "Canceled"
2119
2220 let stateInProgress = "InProgress"
2321
2422 let stateWait4Confirm = "WaitForConfirmation"
2523
2624 let stateComplete = "Completed"
2725
2826 let stateDispute = "Dispute"
2927
3028 let stateDisputeResolved = "DisputeResolved"
3129
3230 let customer = "CMR"
3331
3432 let freelancer = "FL"
3533
3634 let ambassador1 = base58'1'
3735
3836 let ambassador2 = base58'1'
3937
4038 let ambassador3 = base58'1'
4139
4240 let ambassador4 = base58'1'
4341
4442 let ambassador5 = base58'1'
4543
46-func AuctionIdKey (auctionId) = (auctionId + "_Auction")
44+func AuctionIdDataKey (auctionId) = (auctionId + "_AuctionData")
4745
4846
4947 func getDataList (auctionId) = {
5048 let getDataString = getString(this, auctionId)
5149 let a = match getDataString {
5250 case a: String =>
5351 a
5452 case _ =>
5553 throw("AuctionId was not found")
5654 }
5755 split(a, "_")
5856 }
5957
6058
6159 func getDisputeDataList (auctionId) = {
6260 let keyDisputeData = ((auctionId + "_") + stateDispute)
6361 let getDisputeDataString = getString(this, keyDisputeData)
6462 let a = match getDisputeDataString {
6563 case a: String =>
6664 a
6765 case _ =>
6866 throw("Dispute data was not found")
6967 }
7068 split(a, "/")
7169 }
7270
7371
7472 func AssetNameToBase58 (auctionAssetName) = if ((auctionAssetName == "WAVES"))
7573 then WAVES
7674 else if ((auctionAssetName == "BTC"))
7775 then wBTC
7876 else if ((auctionAssetName == "EUR"))
7977 then wEUR
8078 else if ((auctionAssetName == "USD"))
8179 then wUSD
8280 else throw("Incorrect Asset Id")
8381
8482
8583 func betPriceCheck (betPrice,auctionPrice) = if ((auctionPrice > betPrice))
8684 then betPrice
8785 else throw(("Bet price must be lower than actual price. Actual price: " + toString(auctionPrice)))
8886
8987
9088 func timeCheck (currentTime,startTime,expirationTime) = ((currentTime - startTime) > expirationTime)
9189
9290
9391 func increaseFreezedBalance (pmtAssetName,auctionPrice) = {
9492 let keyFreezedFunds = getInteger(this, (pmtAssetName + "_Freezed"))
9593 let currentFreezedBalance = match keyFreezedFunds {
9694 case a: Int =>
9795 a
9896 case _ =>
9997 0
10098 }
10199 (currentFreezedBalance + auctionPrice)
102100 }
103101
104102
105103 func decreaseFreezedBalance (pmtAssetName,auctionPrice) = {
106104 let keyFreezedFunds = getInteger(this, (pmtAssetName + "_Freezed"))
107105 let currentFreezedBalance = match keyFreezedFunds {
108106 case a: Int =>
109107 a
110108 case _ =>
111109 0
112110 }
113111 let a = (currentFreezedBalance - auctionPrice)
114112 if ((a > 0))
115113 then a
116114 else throw("Freezed amount couldn't be less than 0")
117115 }
118116
119117
120118 func freelancerIsRegistered (caller) = {
121119 let freelancerIsRegistered = getString(this, (caller + "_Status"))
122120 match freelancerIsRegistered {
123121 case a: String =>
124122 a
125123 case _ =>
126124 throw("Only registered users can make bets")
127125 }
128126 }
129127
130128
131129 @Callable(i)
132130 func freelancerSignUp (info) = {
133131 let userPublicKey = toBase58String(i.callerPublicKey)
134132 let alreadyRegistered = getString(this, (userPublicKey + "_Freelancer"))
135133 if (isDefined(alreadyRegistered))
136134 then throw("User already registered")
137135 else WriteSet([DataEntry((userPublicKey + "_Registered"), info)])
138136 }
139137
140138
141139
142140 @Callable(i)
143141 func clientSignUp (info) = {
144142 let userPublicKey = toBase58String(i.callerPublicKey)
145143 let alreadyRegistered = getString(this, (userPublicKey + "_Client"))
146144 if (isDefined(alreadyRegistered))
147145 then throw("User already registered")
148146 else WriteSet([DataEntry((userPublicKey + "_Client"), info)])
149147 }
150148
151149
152150
153151 @Callable(i)
154-func createAuction (jobExecutionDays,auctionDurationDays) = {
152+func createAuction (jobExecutionDays,auctionDurationDays,auctionInfo) = {
155153 let auctionId = toBase58String(i.transactionId)
156154 let auctionCustomer = toBase58String(i.callerPublicKey)
157155 let pmt = extract(i.payment)
158156 let pmtAmount = pmt.amount
159157 let auctionPrice = if ((pmtAmount > 0))
160158 then pmtAmount
161159 else throw("Amount must be higher then 0")
162160 let auctionStart = height
163161 let auctionDurationBlocks = (auctionDurationDays * day)
164162 let blocksForExecution = (jobExecutionDays * day)
165163 let pmtAssetName = if (!(isDefined(pmt.assetId)))
166164 then "WAVES"
167165 else if ((pmt.assetId == wBTC))
168166 then "BTC"
169167 else if ((pmt.assetId == wEUR))
170168 then "EUR"
171169 else if ((pmt.assetId == wUSD))
172170 then "USD"
173171 else throw("AssetId is incorrect")
174172 let newFreezedBalance = increaseFreezedBalance(pmtAssetName, auctionPrice)
175- WriteSet([DataEntry(AuctionIdKey(auctionId), ((((((((((((stateOpen + "_") + auctionCustomer) + "_") + toString(auctionStart)) + "_") + toString(auctionDurationBlocks)) + "_") + toString(blocksForExecution)) + "_") + pmtAssetName) + "_") + toString(auctionPrice))), DataEntry((pmtAssetName + "_Freezed"), newFreezedBalance)])
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)])
176174 }
177175
178176
179177
180178 @Callable(i)
181179 func makeBid (auctionId,betPrice) = {
182180 let callerPub = toBase58String(i.callerPublicKey)
183181 let betTime = height
184- let auctionIdKey = AuctionIdKey(auctionId)
185- let auctionDataList = getDataList(auctionIdKey)
182+ let AuctionIdKey = AuctionIdDataKey(auctionId)
183+ let auctionDataList = getDataList(AuctionIdKey)
186184 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])
193192 let auctionAssetId58 = AssetNameToBase58(auctionAssetName)
194193 let newBid = betPriceCheck(betPrice, auctionPrice)
195194 let newFreelancer = freelancerIsRegistered(callerPub)
196195 let dAppCommission = ((auctionPrice * 3) / 100)
197196 let newFreezedBalance = decreaseFreezedBalance(auctionAssetName, auctionPrice)
198197 let auctionTimeisOver = timeCheck(betTime, auctionStart, auctionDuration)
199198 if (auctionTimeisOver)
200199 then if ((auctionState == stateOpen))
201- then ScriptResult(WriteSet([DataEntry(auctionIdKey, ((((((((((((((((stateCancel + "_") + toBase58String(auctionCustomer)) + "_") + toString(auctionStart)) + "_") + toString(auctionDuration)) + "_") + toString(auctionBlocksForExecution)) + "_") + auctionAssetName) + "_") + toString(auctionPrice)) + "_") + "NoFreelancer") + "_") + "NoBid")), DataEntry((auctionAssetName + "_Freezed"), newFreezedBalance)]), TransferSet([ScriptTransfer(addressFromPublicKey(auctionCustomer), (auctionPrice - dAppCommission), auctionAssetId58)]))
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)]))
202201 else if ((auctionState == stateSuggested))
203202 then {
204203 let auctionFreelancer = auctionDataList[7]
205204 let auctionJobCost = auctionDataList[8]
206- WriteSet([DataEntry(auctionIdKey, ((((((((((((((((stateInProgress + "_") + toBase58String(auctionCustomer)) + "_") + toString(auctionStart)) + "_") + toString(auctionDuration)) + "_") + toString(auctionBlocksForExecution)) + "_") + auctionAssetName) + "_") + toString(auctionPrice)) + "_") + auctionFreelancer) + "_") + auctionJobCost))])
205+ WriteSet([DataEntry(AuctionIdKey, ((((((((((((((((((stateInProgress + "_") + auctionInfo) + "_") + toBase58String(auctionCustomer)) + "_") + toString(auctionStart)) + "_") + toString(auctionDuration)) + "_") + toString(auctionBlocksForExecution)) + "_") + auctionAssetName) + "_") + toString(auctionPrice)) + "_") + auctionFreelancer) + "_") + auctionJobCost))])
207206 }
208207 else throw("Incorrect auction state")
209208 else if ((auctionState == stateOpen))
210- then WriteSet([DataEntry(((auctionId + "_") + newFreelancer), betPrice), DataEntry(auctionIdKey, ((((((((((((((stateSuggested + "_") + toBase58String(auctionCustomer)) + "_") + toString(auctionStart)) + "_") + toString(auctionDuration)) + "_") + toString(auctionBlocksForExecution)) + "_") + auctionAssetName) + "_") + toString(auctionPrice)) + "_") + newFreelancer))])
209+ then WriteSet([DataEntry(((auctionId + "_") + newFreelancer), betPrice), DataEntry(AuctionIdKey, ((((((((((((((((stateSuggested + "_") + auctionInfo) + "_") + toBase58String(auctionCustomer)) + "_") + toString(auctionStart)) + "_") + toString(auctionDuration)) + "_") + toString(auctionBlocksForExecution)) + "_") + auctionAssetName) + "_") + toString(auctionPrice)) + "_") + newFreelancer))])
211210 else if ((auctionState == stateSuggested))
212211 then {
213212 let auctionLowestBidder = auctionDataList[7]
214213 let newAuctionLowestBidder = {
215214 let keyCurrentLowestBid = ((auctionId + "_") + auctionLowestBidder)
216215 let valueCurrentLowestBid = getInteger(this, keyCurrentLowestBid)
217216 let currentLowestBid = match valueCurrentLowestBid {
218217 case a: Int =>
219218 a
220219 case _ =>
221220 throw("Can't find lowest bid by public key")
222221 }
223222 if ((currentLowestBid > newBid))
224223 then newFreelancer
225224 else auctionLowestBidder
226225 }
227- WriteSet([DataEntry(((auctionId + "_") + callerPub), betPrice), DataEntry(auctionIdKey, ((((((((((((((stateSuggested + "_") + toBase58String(auctionCustomer)) + "_") + toString(auctionStart)) + "_") + toString(auctionDuration)) + "_") + toString(auctionBlocksForExecution)) + "_") + auctionAssetName) + "_") + toString(auctionPrice)) + "_") + newAuctionLowestBidder))])
226+ WriteSet([DataEntry(((auctionId + "_") + callerPub), betPrice), DataEntry(AuctionIdKey, ((((((((((((((((stateSuggested + "_") + auctionInfo) + "_") + toBase58String(auctionCustomer)) + "_") + toString(auctionStart)) + "_") + toString(auctionDuration)) + "_") + toString(auctionBlocksForExecution)) + "_") + auctionAssetName) + "_") + toString(auctionPrice)) + "_") + newAuctionLowestBidder))])
228227 }
229228 else throw(((((("Incorrect jobId state. Now: " + auctionState) + ", must be: ") + stateOpen) + " or ") + stateSuggested))
230229 }
231230
232231
233232
234233 @Callable(i)
235234 func chooseFreelancer (auctionId,freelancerPub) = {
236- let callerPub = toBase58String(i.callerPublicKey)
235+ let callerPub = extract(i.callerPublicKey)
237236 let betTime = height
238- let auctionIdKey = AuctionIdKey(auctionId)
239- let auctionDataList = getDataList(auctionIdKey)
237+ let AuctionIdKey = AuctionIdDataKey(auctionId)
238+ let auctionDataList = getDataList(AuctionIdKey)
240239 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])
247247 let auctionAssetId58 = AssetNameToBase58(auctionAssetName)
248248 let FreelancerBidAmount = {
249249 let keyFreelancerBid = ((auctionId + "_") + freelancerPub)
250250 let valueFreelacerBid = getInteger(this, keyFreelancerBid)
251251 match valueFreelacerBid {
252252 case a: Int =>
253253 a
254254 case _ =>
255255 throw("Freelancer's bet was not found")
256256 }
257257 }
258258 let dAppCommission = ((auctionPrice * 3) / 100)
259259 let amountDifference = ((auctionPrice - FreelancerBidAmount) - dAppCommission)
260260 let auctionTimeisOver = timeCheck(betTime, auctionStart, auctionDuration)
261261 if ((callerPub == auctionCustomer))
262262 then if (auctionTimeisOver)
263263 then if ((auctionState == stateOpen))
264- then ScriptResult(WriteSet([DataEntry(auctionIdKey, ((((((((((((((((stateCancel + "_") + auctionCustomer) + "_") + toString(auctionStart)) + "_") + toString(auctionDuration)) + "_") + toString(auctionBlocksForExecution)) + "_") + auctionAssetName) + "_") + toString(auctionPrice)) + "_") + "NoFreelancer") + "_") + "NoBid"))]), TransferSet([ScriptTransfer(addressFromPublicKey(fromBase58String(auctionCustomer)), (auctionPrice - dAppCommission), auctionAssetId58)]))
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)]))
265265 else if ((auctionState == stateSuggested))
266- then WriteSet([DataEntry(auctionIdKey, ((((((((((((stateInProgress + "_") + auctionCustomer) + "_") + toString(auctionStart)) + "_") + toString(auctionDuration)) + "_") + toString(auctionBlocksForExecution)) + "_") + auctionAssetName) + "_") + toString(auctionPrice)))])
266+ then WriteSet([DataEntry(AuctionIdKey, ((((((((((((((stateInProgress + "_") + auctionInfo) + "_") + toBase58String(auctionCustomer)) + "_") + toString(auctionStart)) + "_") + toString(auctionDuration)) + "_") + toString(auctionBlocksForExecution)) + "_") + auctionAssetName) + "_") + toString(auctionPrice)))])
267267 else throw("Incorrect auction state")
268- else ScriptResult(WriteSet([DataEntry(auctionIdKey, ((((((((((((((stateInProgress + "_") + auctionCustomer) + "_") + toString(auctionStart)) + "_") + toString(auctionDuration)) + "_") + toString(auctionBlocksForExecution)) + "_") + auctionAssetName) + "_") + toString(FreelancerBidAmount)) + "_") + freelancerPub))]), TransferSet([ScriptTransfer(addressFromPublicKey(fromBase58String(auctionCustomer)), amountDifference, auctionAssetId58)]))
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)]))
269269 else throw("Only auction customer can choose a freelancer")
270270 }
271271
272272
273273
274274 @Callable(i)
275275 func increaseExecutionTime (auctionId,executionDays) = {
276- let caller = toBase58String(i.callerPublicKey)
277- let auctionIdKey = AuctionIdKey(auctionId)
278- let auctionDataList = getDataList(auctionIdKey)
276+ let caller = extract(i.callerPublicKey)
277+ let AuctionIdKey = AuctionIdDataKey(auctionId)
278+ let auctionDataList = getDataList(AuctionIdKey)
279279 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])
282287 let newAuctionExecutionTime = {
283- let newExecutionTime = (executionDays * day)
284- if ((newExecutionTime > auctionExecutionTime))
285- then newExecutionTime
288+ let newAuctionBlocksForExecution = (executionDays * day)
289+ if ((newAuctionBlocksForExecution > auctionBlocksForExecution))
290+ then newAuctionBlocksForExecution
286291 else throw("New execution time must more than current execution time")
287292 }
288293 if ((caller == auctionCustomer))
289- then if (if (if ((auctionState == stateOpen))
290- then true
291- else (auctionState == stateSuggested))
292- then true
293- else (auctionState == stateInProgress))
294- then {
295- let newDataString = ((((((((((((auctionState + "_") + auctionCustomer) + "_") + auctionDataList[2]) + "_") + toString(newAuctionExecutionTime)) + "_") + auctionDataList[4]) + "_") + auctionDataList[5]) + "_") + auctionDataList[6])
296- WriteSet([DataEntry(auctionIdKey, newDataString)])
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")
299304 else throw("Only customer can increase execution time")
300305 }
301306
302307
303308
304309 @Callable(i)
305310 func cancelAuction (auctionId) = {
306- let auctionIdKey = AuctionIdKey(auctionId)
307- let auctionDataList = getDataList(auctionIdKey)
311+ let AuctionIdKey = AuctionIdDataKey(auctionId)
312+ let auctionDataList = getDataList(AuctionIdKey)
308313 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])
310321 let auctionIdOwnerCheck = if ((i.callerPublicKey == auctionCustomer))
311322 then true
312323 else throw("Auction can be canceled only by owner.")
313324 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)))])
318326 else throw("Incorrect auction state.")
319327 }
320328
321329
322330
323331 @Callable(i)
324332 func openDispute (auctionId) = {
325- let caller = toBase58String(i.callerPublicKey)
326- let auctionIdKey = AuctionIdKey(auctionId)
327- let auctionDataList = getDataList(auctionIdKey)
333+ let caller = extract(i.callerPublicKey)
334+ let AuctionIdKey = AuctionIdDataKey(auctionId)
335+ let auctionDataList = getDataList(AuctionIdKey)
328336 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])
331345 if (if ((caller == auctionCustomer))
332346 then true
333347 else (caller == auctionFreelancer))
334348 then {
335349 let dataString = "1"
336- WriteSet([DataEntry(auctionIdKey, (stateDispute + dataString)), DataEntry((auctionId + "_Dispute"), "0")])
350+ WriteSet([DataEntry(AuctionIdKey, ((((stateDispute + "_") + auctionInfo) + "_") + dataString)), DataEntry((auctionId + "_Dispute"), "0")])
337351 }
338352 else throw("Only customer and freelancer can open dispute")
339353 }
340354
341355
342356
343357 @Callable(i)
344358 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]
347362 let auctionStateCheck = {
348363 let auctionState = auctionDataList[0]
349364 if ((auctionState == stateDispute))
350365 then true
351366 else throw(("Incorrect state. Must be: " + stateDispute))
352367 }
353368 let auctionAssetId = auctionDataList[4]
354369 let auctionPrice = parseIntValue(auctionDataList[5])
355370 let newVote = if (if ((vote == customer))
356371 then true
357372 else (vote == freelancer))
358373 then vote
359374 else throw(((("Vote is incorrect. Must be: " + customer) + " or ") + freelancer))
360375 let newVoter = if (if (if (if (if ((i.callerPublicKey == ambassador1))
361376 then true
362377 else (i.callerPublicKey == ambassador2))
363378 then true
364379 else (i.callerPublicKey == ambassador3))
365380 then true
366381 else (i.callerPublicKey == ambassador4))
367382 then true
368383 else (i.callerPublicKey == ambassador5))
369384 then toBase58String(i.callerPublicKey)
370385 else throw("You have no rights for disputes resolving")
371386 let disputeData = {
372387 let keyDispute = ((auctionId + "_") + stateDispute)
373388 let valueDispute = getString(this, keyDispute)
374389 match valueDispute {
375390 case a: String =>
376391 a
377392 case _ =>
378393 throw("Cannot find data of dispute in storage")
379394 }
380395 }
381396 let disputeDataList = split(disputeData, "/")
382397 let votesCounter = disputeDataList[0]
383398 if ((votesCounter == "4"))
384399 then {
385400 let votersList = split(disputeDataList[1], "_")
386401 let votesList = split(disputeDataList[2], "_")
387402 let alreadyVoted = if ((newVoter == votersList[0]))
388403 then true
389404 else (newVoter == votersList[1])
390405 if (alreadyVoted)
391406 then throw("You already voted")
392407 else {
393408 let newVotesCounter = "5"
394409 let newVoters = ((disputeDataList[1] + "_") + newVoter)
395410 let newVotes = ((disputeDataList[2] + "_") + newVote)
396411 let newDisputeDataString = ((((newVotesCounter + "/") + newVoters) + "/") + newVotes)
397412 let disputeWinner = {
398413 let vote1 = if ((votesList[0] == customer))
399414 then 1
400415 else 0
401416 let vote2 = if ((votesList[1] == customer))
402417 then 1
403418 else 0
404419 let vote3 = if ((votesList[2] == customer))
405420 then 1
406421 else 0
407422 let vote4 = if ((votesList[3] == customer))
408423 then 1
409424 else 0
410425 let vote5 = if ((newVote == customer))
411426 then 1
412427 else 0
413428 let customerVotes = ((((vote1 + vote2) + vote3) + vote4) + vote5)
414429 if ((customerVotes > 2))
415430 then customer
416431 else freelancer
417432 }
418433 let newDataString = ((((((((((auctionDataList[1] + "_") + auctionDataList[2]) + "_") + auctionDataList[3]) + "_") + auctionDataList[4]) + "_") + auctionDataList[5]) + "_") + auctionDataList[6])
419434 let DisputeWinnerAddress = if ((disputeWinner == customer))
420435 then auctionDataList[1]
421436 else auctionDataList[6]
422437 let amountWithoutComm = (auctionPrice - ((auctionPrice * 3) / 100))
423- ScriptResult(WriteSet([DataEntry(AuctionIdKey(auctionId), (stateDisputeResolved + newDataString)), DataEntry(((auctionId + "_") + stateDispute), newDisputeDataString)]), TransferSet([ScriptTransfer(addressFromPublicKey(fromBase58String(DisputeWinnerAddress)), amountWithoutComm, fromBase58String(auctionAssetId))]))
438+ ScriptResult(WriteSet([DataEntry(AuctionIdDataKey(auctionId), ((((stateDisputeResolved + "_") + auctionInfo) + "_") + newDataString)), DataEntry(((auctionId + "_") + stateDispute), newDisputeDataString)]), TransferSet([ScriptTransfer(addressFromPublicKey(fromBase58String(DisputeWinnerAddress)), amountWithoutComm, fromBase58String(auctionAssetId))]))
424439 }
425440 }
426441 else {
427442 let newDisputeDataString = if ((votesCounter == "0"))
428443 then {
429444 let newVotesCounter = "1"
430445 let newVoters = newVoter
431446 let newVotes = newVote
432447 let newDataString = ((((newVotesCounter + "/") + newVoters) + "/") + newVotes)
433448 newDataString
434449 }
435450 else if ((votesCounter == "1"))
436451 then {
437452 let voter1 = disputeDataList[1]
438453 let vote1 = disputeDataList[2]
439454 let alreadyVoted = (newVoter == voter1)
440455 if (alreadyVoted)
441456 then throw("You already voted")
442457 else {
443458 let newVotesCounter = "1"
444459 let newVoters = (voter1 + newVoter)
445460 let newVotes = (vote1 + newVote)
446461 let newDataString = ((((newVotesCounter + "/") + newVoters) + "/") + newVotes)
447462 newDataString
448463 }
449464 }
450465 else if ((votesCounter == "2"))
451466 then {
452467 let votersList = split(disputeDataList[1], "_")
453468 let votesList = split(disputeDataList[2], "_")
454469 let alreadyVoted = if ((newVoter == votersList[0]))
455470 then true
456471 else (newVoter == votersList[1])
457472 if (alreadyVoted)
458473 then throw("You already voted")
459474 else {
460475 let newVotesCounter = "3"
461476 let newVoters = ((disputeDataList[1] + "_") + newVoter)
462477 let newVotes = ((disputeDataList[2] + "_") + newVote)
463478 let newDataString = ((((newVotesCounter + "/") + newVoters) + "/") + newVotes)
464479 newDataString
465480 }
466481 }
467482 else if ((votesCounter == "3"))
468483 then {
469484 let votersList = split(disputeDataList[1], "_")
470485 let votesList = split(disputeDataList[2], "_")
471486 let alreadyVoted = if (if ((newVoter == votersList[0]))
472487 then true
473488 else (newVoter == votersList[1]))
474489 then true
475490 else (newVoter == votersList[2])
476491 if (alreadyVoted)
477492 then throw("You already voted")
478493 else {
479494 let newVotesCounter = "4"
480495 let newVoters = ((disputeDataList[1] + "_") + newVoter)
481496 let newVotes = ((disputeDataList[2] + "_") + newVote)
482497 let newDataString = ((((newVotesCounter + "/") + newVoters) + "/") + newVotes)
483498 newDataString
484499 }
485500 }
486501 else throw("Dispute has been already resolved")
487502 WriteSet([DataEntry(((auctionId + "_") + stateDispute), newDisputeDataString)])
488503 }
489504 }
490505
491506
492507
493508 @Callable(i)
494-func workIsDone (auctionId) = {
495- let auctionIdKey = AuctionIdKey(auctionId)
496- let auctionDataList = getDataList(auctionIdKey)
509+func workHandOver (auctionId) = {
510+ let AuctionIdKey = AuctionIdDataKey(auctionId)
511+ let auctionDataList = getDataList(AuctionIdKey)
497512 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])
500520 let currentTime = height
501521 let freelancerPubCheck = {
502522 let caller = toBase58String(i.callerPublicKey)
503523 let auctionFreelancer = auctionDataList[6]
504524 if ((caller == auctionFreelancer))
505525 then caller
506526 else throw("Only a freelancer can indicate that the work is done")
507527 }
508- let timeIsOver = ((currentTime - auctionStart) > auctionExecutionTime)
528+ let timeIsOver = ((currentTime - auctionStart) > auctionBlocksForExecution)
509529 if ((auctionState == stateInProgress))
510530 then if (timeIsOver)
511531 then {
512532 let newDataString = ((((((((((auctionDataList[1] + "_") + auctionDataList[2]) + "_") + auctionDataList[3]) + "_") + auctionDataList[4]) + "_") + auctionDataList[5]) + "_") + auctionDataList[6])
513- WriteSet([DataEntry(auctionIdKey, (stateDispute + newDataString))])
533+ WriteSet([DataEntry(AuctionIdKey, ((((stateDispute + "_") + auctionInfo) + "_") + newDataString))])
514534 }
515535 else {
516536 let newDataString = ((((((((((auctionDataList[1] + "_") + auctionDataList[2]) + "_") + auctionDataList[3]) + "_") + auctionDataList[4]) + "_") + auctionDataList[5]) + "_") + auctionDataList[6])
517- WriteSet([DataEntry(auctionIdKey, (stateWait4Confirm + newDataString))])
537+ WriteSet([DataEntry(AuctionIdKey, ((((stateWait4Confirm + "_") + auctionInfo) + "_") + newDataString))])
518538 }
519539 else throw("Auction state is incorrect")
520540 }
521541
522542
523543
524544 @Callable(i)
525-func acceptByCustomer (auctionId) = {
526- let auctionIdKey = AuctionIdKey(auctionId)
527- let auctionDataList = getDataList(auctionIdKey)
545+func acceptWork (auctionId) = {
546+ let AuctionIdKey = AuctionIdDataKey(auctionId)
547+ let auctionDataList = getDataList(AuctionIdKey)
528548 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)
534558 let dAppCommission = ((auctionPrice * 3) / 100)
535559 let amountWithoutComm = (auctionPrice - dAppCommission)
536560 let auctionAssetId58 = AssetNameToBase58(auctionAssetName)
537561 let newRating = {
538562 let valueRating = getInteger(this, (auctionFreelancer + "_Rating"))
539563 let currentRating = match valueRating {
540564 case a: Int =>
541565 a
542566 case _ =>
543567 0
544568 }
545569 (currentRating + 1)
546570 }
547571 if ((caller == auctionCustomer))
548572 then if ((auctionState == stateWait4Confirm))
549573 then {
550574 let newDataString = ((((((((((auctionDataList[1] + "_") + auctionDataList[2]) + "_") + auctionDataList[3]) + "_") + auctionDataList[4]) + "_") + auctionDataList[5]) + "_") + auctionDataList[6])
551- ScriptResult(WriteSet([DataEntry(auctionIdKey, (stateComplete + newDataString)), DataEntry((auctionFreelancer + "_Rating"), newRating)]), TransferSet([ScriptTransfer(addressFromPublicKey(fromBase58String(auctionFreelancer)), amountWithoutComm, auctionAssetId58)]))
575+ ScriptResult(WriteSet([DataEntry(AuctionIdKey, ((((stateComplete + "_") + auctionInfo) + "_") + newDataString)), DataEntry((auctionFreelancer + "_Rating"), newRating)]), TransferSet([ScriptTransfer(addressFromPublicKey(fromBase58String(auctionFreelancer)), amountWithoutComm, auctionAssetId58)]))
552576 }
553577 else throw(("Incorrect state. Must be: " + stateWait4Confirm))
554578 else throw("Only auction customer can use this function")
555579 }
556580
557581
558582 @Verifier(tx)
559583 func verify () = if (sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey))
560584 then match tx {
561585 case ttx: TransferTransaction =>
562586 true
563587 case stx: SetScriptTransaction =>
564588 true
565589 case _ =>
566590 false
567591 }
568592 else false
569593

github/deemru/w8io/026f985 
123.17 ms