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