tx · BsxkbY6dmLCx3JF1tJDmoqGrv2gDB8BgKpwaVgToBXHw

3NB6ViLiZv3r5EdQ2Q8GA8GKpuwmG3zevAt:  -0.05000000 Waves

2019.08.17 12:00 [634889] smart account 3NB6ViLiZv3r5EdQ2Q8GA8GKpuwmG3zevAt > SELF 0.00000000 Waves

{ "type": 13, "id": "BsxkbY6dmLCx3JF1tJDmoqGrv2gDB8BgKpwaVgToBXHw", "fee": 5000000, "feeAssetId": null, "timestamp": 1566032486326, "version": 1, "sender": "3NB6ViLiZv3r5EdQ2Q8GA8GKpuwmG3zevAt", "senderPublicKey": "3ghbp6Z5eXoKniLSE8XPjn5od7gT1K7qhk6zANBhv9C3", "proofs": [ "5QoMPuLj6rvAtxBKpDo6WhJYpBFWAXzArkY8wSymshvhdaGpX5oMceXScsnnaemUUvAo8JSL5ozd4eQ1hqnpHtKy" ], "script": "base64:AAIDAAAAAAAAAAAAAAAlAAAAAA5vd25lclB1YmxpY2tleQEAAAAgJ+LupRtywYm1DtC2wa7+mcHTm1BkasCvRteam1vswWgAAAAADGFsbGljZVB1YmtleQEAAAAgdahQG7OF8VCvnmrXif7UUhoQjaCrm/2hFDfEk/59nDEAAAAACWJvYlB1YmtleQEAAAAgoHwmi+qXZSlN20yTARZQ9O8s6pUs/3qey7EnxhpjMk8AAAAADGNvb3BlclB1YmtleQEAAAAgU/w5K0kRwpKzXSOUcyJ72drbib04bPq1q9XqkXENjioAAAAABE5PTkUCAAAABG5vbmUAAAAABlZPVEVSUwAAAAAAAAAAAwAAAAAGUVVPUlVNAAAAAAAAAAACAAAAAAZWT1RJTkcCAAAABnZvdGluZwAAAAAGUkVWRUFMAgAAAAZyZXZlYWwAAAAACEZFQVRVUkVEAgAAAAhmZWF0dXJlZAAAAAAIREVMSVNURUQCAAAACGRlbGlzdGVkAAAAAAh2ZXJpZmllcgIAAAAjM01zOXNVYjdXM0w1NUxMR3hlSFdpcWdUZmRIOXluMm1heWIAAAAACFZFUklGSUVEAgAAAAh2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B2NvcHBlcjMFAAAABGJvYjIHBAAAAAckbWF0Y2gwBQAAAAJ0eAMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAUU2V0U2NyaXB0VHJhbnNhY3Rpb24EAAAAAWQFAAAAByRtYXRjaDAJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAABQAAAA5vd25lclB1YmxpY2tleQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAPRGF0YVRyYW5zYWN0aW9uBAAAAAFkBQAAAAckbWF0Y2gwBgMDBQAAAAxhbGxpY2VBbmRCb2IGBQAAAA9hbGxpY2VBbmRDb29wZXIGBQAAAA1ib2JlQW5kQ29vcGVygVhm7Q==", "chainId": 84, "height": 634889, "spentComplexity": 0 } View: original | compacted Prev: E9mRHv82fimc1iEFHocqtEv4TAUfM4TPFTV9v65zWmvZ Next: B7gBHvQVXRJMAUkNK1M6RfUaSmAhyuExbYPsfY3EKMMg Diff:
OldNewDifferences
114114
115115
116116 @Callable(i)
117-func startAuction (duration,startPrice,priceAssetId) = {
118- let auctionId = toBase58String(i.transactionId)
117+func startAuction (duration,startPrice,auctionId,priceAssetId) = {
119118 let endHeight = (lastBlock.height + duration)
120119 let pmt = extract(i.payment)
121120 WriteSet([DataEntry(auctionId, endHeight), DataEntry((auctionId + "_organizer"), toBase58String(i.caller.bytes)), DataEntry((auctionId + "_lot_assetId"), if (isDefined(pmt.assetId))
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let ownerPublickey = base58'3ghbp6Z5eXoKniLSE8XPjn5od7gT1K7qhk6zANBhv9C3'
55
66 let allicePubkey = base58'8vHZLEG3BmzYYVjQyNi1m11kh6FeSoVAKKwtsYXC3bqA'
77
88 let bobPubkey = base58'BoU2oQn7y52MZgT1Q7vJCJwUxov9tXb2zpC5gmWQbutJ'
99
1010 let cooperPubkey = base58'6equaSt4fnw6gEoLGiL3dTDDGxDc4PY5NyV3gVkEEr1F'
1111
1212 let NONE = "none"
1313
1414 let VOTERS = 3
1515
1616 let QUORUM = 2
1717
1818 let VOTING = "voting"
1919
2020 let REVEAL = "reveal"
2121
2222 let FEATURED = "featured"
2323
2424 let DELISTED = "delisted"
2525
2626 let verifier = "3Ms9sUb7W3L55LLGxeHWiqgTfdH9yn2mayb"
2727
2828 let VERIFIED = "verified"
2929
3030 let BLACKLISTED = "blacklist"
3131
3232 let maxAuctionDuration = (1440 * 30)
3333
3434 func getNumberByKey (key) = {
3535 let num = match getInteger(this, key) {
3636 case a: Int =>
3737 a
3838 case _ =>
3939 0
4040 }
4141 num
4242 }
4343
4444
4545 func getStrByKey (key) = {
4646 let str = match getString(this, key) {
4747 case a: String =>
4848 a
4949 case _ =>
5050 NONE
5151 }
5252 str
5353 }
5454
5555
5656 func getKeyItemPrice (item) = (item + "_price")
5757
5858
5959 func getValueItemPrice (item) = getNumberByKey(getKeyItemPrice(item))
6060
6161
6262 func getKeyUserItemCounter (user,item) = (((item + "_") + user) + "_cnt")
6363
6464
6565 func getValueUserItemCounter (user,item) = getNumberByKey(getKeyUserItemCounter(user, item))
6666
6767
6868 func getKeyItem (supplier,title) = ("item_" + toBase58String(sha256(toBytes((supplier + title)))))
6969
7070
7171 func getKeyItemData (item) = (item + "_data")
7272
7373
7474 func getKeyItemSupplier (item) = (item + "_owner")
7575
7676
7777 func getValueItemSupplier (item) = getStrByKey(getKeyItemSupplier(item))
7878
7979
8080 func getKeyBalanceSupplier (account) = (account + "_balance")
8181
8282
8383 func getValueBalanceSupplier (account) = getNumberByKey(getKeyBalanceSupplier(account))
8484
8585
8686 func getKeyCommit (item,user) = (((item + "_") + user) + "_commit")
8787
8888
8989 func getValueCommit (item,user) = getStrByKey(getKeyCommit(item, user))
9090
9191
9292 func getKeyCommitsCount (item) = (item + "_comcnt")
9393
9494
9595 func getValueCommitsCount (item) = getNumberByKey(getKeyCommitsCount(item))
9696
9797
9898 func getKeyReveal (item,user) = (((item + "_") + user) + "_reveal")
9999
100100
101101 func getValueReveal (item,user) = getStrByKey(getKeyReveal(item, user))
102102
103103
104104 func getKeyItemStatus (item) = (item + "_status")
105105
106106
107107 func getValueItemStatus (item) = getStrByKey(getKeyItemStatus(item))
108108
109109
110110 func getKeyVoteCount (item,voute) = ((item + "_res:") + voute)
111111
112112
113113 func getValueVouteCount (item,voute) = getNumberByKey(getKeyVoteCount(item, voute))
114114
115115
116116 @Callable(i)
117-func startAuction (duration,startPrice,priceAssetId) = {
118- let auctionId = toBase58String(i.transactionId)
117+func startAuction (duration,startPrice,auctionId,priceAssetId) = {
119118 let endHeight = (lastBlock.height + duration)
120119 let pmt = extract(i.payment)
121120 WriteSet([DataEntry(auctionId, endHeight), DataEntry((auctionId + "_organizer"), toBase58String(i.caller.bytes)), DataEntry((auctionId + "_lot_assetId"), if (isDefined(pmt.assetId))
122121 then toBase58String(value(pmt.assetId))
123122 else "WAVES"), DataEntry((auctionId + "_lot_amount"), pmt.amount), DataEntry((auctionId + "_startPrice"), startPrice), DataEntry((auctionId + "_priceAssetId"), priceAssetId)])
124123 }
125124
126125
127126
128127 @Callable(i)
129128 func bid (auctionId) = {
130129 let pmt = extract(i.payment)
131130 let pmtAssetIdStr = if (isDefined(pmt.assetId))
132131 then toBase58String(value(pmt.assetId))
133132 else "WAVES"
134133 let callerAddressStr = toBase58String(i.caller.bytes)
135134 let endHeight = getIntegerValue(this, auctionId)
136135 let startPrice = getIntegerValue(this, (auctionId + "_startPrice"))
137136 let priceAssetId = getStringValue(this, (auctionId + "_priceAssetId"))
138137 let winAmount = getInteger(this, (auctionId + "_winAmount"))
139138 let winner = getString(this, (auctionId + "_winner"))
140139 let bidFromTheSameUser = if (isDefined(winner))
141140 then (value(winner) == callerAddressStr)
142141 else false
143142 let totalBidAmount = (pmt.amount + (if (bidFromTheSameUser)
144143 then value(winAmount)
145144 else 0))
146145 if ((lastBlock.height >= endHeight))
147146 then throw("Auction already finished")
148147 else if ((priceAssetId != pmtAssetIdStr))
149148 then throw((("Bid must be in asset '" + priceAssetId) + "'"))
150149 else if (if (if (isDefined(winAmount))
151150 then (value(winAmount) >= totalBidAmount)
152151 else false)
153152 then true
154153 else if (!(isDefined(winAmount)))
155154 then (startPrice >= totalBidAmount)
156155 else false)
157156 then throw(("Bid must be more then " + toString(if (isDefined(winAmount))
158157 then value(winAmount)
159158 else startPrice)))
160159 else if (if (bidFromTheSameUser)
161160 then true
162161 else !(isDefined(winner)))
163162 then WriteSet([DataEntry((auctionId + "_winner"), callerAddressStr), DataEntry((auctionId + "_winAmount"), totalBidAmount)])
164163 else {
165164 let previousBidderAddr = addressFromStringValue(value(winner))
166165 let priceAsset = if (if ((priceAssetId == "WAVES"))
167166 then true
168167 else (priceAssetId == ""))
169168 then unit
170169 else fromBase58String(priceAssetId)
171170 ScriptResult(WriteSet([DataEntry((auctionId + "_winner"), callerAddressStr), DataEntry((auctionId + "_winAmount"), totalBidAmount)]), TransferSet([ScriptTransfer(previousBidderAddr, value(winAmount), priceAsset)]))
172171 }
173172 }
174173
175174
176175
177176 @Callable(i)
178177 func purchase (item) = {
179178 let pmt = extract(i.payment)
180179 if (isDefined(pmt.assetId))
181180 then throw("can use Waves only at the moment")
182181 else {
183182 let userAddress = toBase58String(i.caller.bytes)
184183 let price = getValueItemPrice(item)
185184 let supplierAddress = getValueItemSupplier(item)
186185 if ((price > pmt.amount))
187186 then throw("purchase amount cannot be less than item price")
188187 else if ((pmt.amount > price))
189188 then throw("purchase amount cannot be higher than item price")
190189 else if ((supplierAddress == NONE))
191190 then throw("supplier is not exist")
192191 else WriteSet([DataEntry(getKeyUserItemCounter(userAddress, item), (getValueUserItemCounter(userAddress, item) + 1)), DataEntry(getKeyBalanceSupplier(supplierAddress), (getValueBalanceSupplier(supplierAddress) + pmt.amount))])
193192 }
194193 }
195194
196195
197196
198197 @Callable(i)
199198 func addItem (title,price,data) = {
200199 let supplierAddress = toBase58String(i.caller.bytes)
201200 let item = getKeyItem(supplierAddress, title)
202201 if ((0 >= price))
203202 then throw("purchase amount cannot be less than item price")
204203 else if ((getValueItemSupplier(item) != NONE))
205204 then throw("An item is allready exist")
206205 else if ((supplierAddress == BLACKLISTED))
207206 then throw("supplier's account has been blacklist")
208207 else WriteSet([DataEntry(getKeyItemSupplier(item), supplierAddress), DataEntry(getKeyItemPrice(item), price), DataEntry(getKeyItemData(item), data)])
209208 }
210209
211210
212211
213212 @Callable(i)
214213 func deposit () = {
215214 let pmt = extract(i.payment)
216215 let supplierAddress = toBase58String(i.caller.bytes)
217216 let balance = getValueBalanceSupplier(supplierAddress)
218217 let newBalance = (balance + pmt.amount)
219218 if (isDefined(pmt.assetId))
220219 then throw("can hodl waves only at the moment")
221220 else if ((0 > pmt.amount))
222221 then throw("Can not deposit negative amount")
223222 else WriteSet([DataEntry(getKeyBalanceSupplier(supplierAddress), newBalance)])
224223 }
225224
226225
227226
228227 @Callable(i)
229228 func withdraw (amount) = {
230229 let supplierAddress = toBase58String(i.caller.bytes)
231230 let balance = getValueBalanceSupplier(supplierAddress)
232231 let newBalance = (balance - amount)
233232 if ((0 > amount))
234233 then throw("Can not withdraw negative amount")
235234 else if ((0 > newBalance))
236235 then throw("not enough balance")
237236 else if ((0 >= balance))
238237 then throw("insufficient balance")
239238 else ScriptResult(WriteSet([DataEntry(getKeyBalanceSupplier(supplierAddress), newBalance)]), TransferSet([ScriptTransfer(addressFromStringValue(supplierAddress), amount, unit)]))
240239 }
241240
242241
243242
244243 @Callable(i)
245244 func voteCommit (item,hash) = {
246245 let user = toBase58String(i.caller.bytes)
247246 let commits = getValueCommitsCount(item)
248247 let status = getValueItemStatus(item)
249248 if ((commits >= VOTERS))
250249 then throw("reached max num of vouters")
251250 else if ((getValueCommit(item, user) != NONE))
252251 then throw("user has allready participated")
253252 else if ((getKeyItemSupplier(item) == NONE))
254253 then throw("item dose not exist")
255254 else if (if ((status != NONE))
256255 then (status != VOTING)
257256 else false)
258257 then throw("vouting is not posible")
259258 else WriteSet([DataEntry(getKeyCommit(item, user), hash), DataEntry(getKeyCommitsCount(item), (commits + 1)), DataEntry(getKeyItemStatus(item), if ((commits == VOTERS))
260259 then REVEAL
261260 else VOTING)])
262261 }
263262
264263
265264
266265 @Callable(i)
267266 func voteReveal (item,vote,salt) = {
268267 let user = toBase58String(i.caller.bytes)
269268 let status = getValueItemStatus(item)
270269 let newVoteCount = getValueVouteCount(item, vote)
271270 if ((toBase58String(sha256(toBytes((vote + salt)))) != getValueCommit(item, user)))
272271 then throw("reveal data is not valid")
273272 else if ((VOTERS > getValueCommitsCount(item)))
274273 then throw("max num of hasn't reached yet")
275274 else if ((getValueReveal(item, user) != NONE))
276275 then throw("user has already participated")
277276 else if (if ((status != VOTING))
278277 then (status != REVEAL)
279278 else false)
280279 then throw("wrong status")
281280 else if (if ((vote != FEATURED))
282281 then (vote != DELISTED)
283282 else false)
284283 then throw("wrong vote")
285284 else if (if ((status == FEATURED))
286285 then true
287286 else (status == DELISTED))
288287 then throw("vote has finished")
289288 else WriteSet([DataEntry(getKeyReveal(item, user), vote), DataEntry(getKeyVoteCount(item, vote), newVoteCount), DataEntry(getKeyItemStatus(item), if ((newVoteCount >= QUORUM))
290289 then vote
291290 else REVEAL)])
292291 }
293292
294293
295294 @Verifier(tx)
296295 func verify () = {
297296 let alice1 = sigVerify(tx.bodyBytes, tx.proofs[0], allicePubkey)
298297 let alice2 = sigVerify(tx.bodyBytes, tx.proofs[1], allicePubkey)
299298 let alice3 = sigVerify(tx.bodyBytes, tx.proofs[2], allicePubkey)
300299 let bob1 = sigVerify(tx.bodyBytes, tx.proofs[0], bobPubkey)
301300 let bob2 = sigVerify(tx.bodyBytes, tx.proofs[1], bobPubkey)
302301 let bob3 = sigVerify(tx.bodyBytes, tx.proofs[2], bobPubkey)
303302 let cooper1 = sigVerify(tx.bodyBytes, tx.proofs[0], cooperPubkey)
304303 let copper2 = sigVerify(tx.bodyBytes, tx.proofs[1], cooperPubkey)
305304 let copper3 = sigVerify(tx.bodyBytes, tx.proofs[2], cooperPubkey)
306305 let alliceAndBob = if (if (if (if (if (if (alice1)
307306 then bob2
308307 else false)
309308 then true
310309 else if (alice1)
311310 then bob3
312311 else false)
313312 then true
314313 else if (alice2)
315314 then bob1
316315 else false)
317316 then true
318317 else if (alice2)
319318 then bob3
320319 else false)
321320 then true
322321 else if (alice3)
323322 then bob1
324323 else false)
325324 then true
326325 else if (alice3)
327326 then bob2
328327 else false
329328 let alliceAndCooper = if (if (if (if (if (if (alice1)
330329 then copper2
331330 else false)
332331 then true
333332 else if (alice1)
334333 then copper3
335334 else false)
336335 then true
337336 else if (alice2)
338337 then cooper1
339338 else false)
340339 then true
341340 else if (alice2)
342341 then copper3
343342 else false)
344343 then true
345344 else if (alice3)
346345 then cooper1
347346 else false)
348347 then true
349348 else if (alice3)
350349 then copper2
351350 else false
352351 let bobeAndCooper = if (if (if (if (if (if (cooper1)
353352 then bob2
354353 else false)
355354 then true
356355 else if (cooper1)
357356 then bob3
358357 else false)
359358 then true
360359 else if (copper2)
361360 then bob1
362361 else false)
363362 then true
364363 else if (copper2)
365364 then bob3
366365 else false)
367366 then true
368367 else if (copper3)
369368 then bob1
370369 else false)
371370 then true
372371 else if (copper3)
373372 then bob2
374373 else false
375374 match tx {
376375 case d: SetScriptTransaction =>
377376 sigVerify(tx.bodyBytes, tx.proofs[0], ownerPublickey)
378377 case d: DataTransaction =>
379378 true
380379 case _ =>
381380 if (if (alliceAndBob)
382381 then true
383382 else alliceAndCooper)
384383 then true
385384 else bobeAndCooper
386385 }
387386 }
388387

github/deemru/w8io/169f3d6 
58.89 ms