tx · Dtze5EK8oKmskB84SZXVSmhmHiDa7LbiUezfeeKrWveL

3N2D6tJAXzcTDgUiTWmcdCHd6ctYwNENuBn:  -0.01000000 Waves

2022.11.02 13:40 [2299382] smart account 3N2D6tJAXzcTDgUiTWmcdCHd6ctYwNENuBn > SELF 0.00000000 Waves

{ "type": 13, "id": "Dtze5EK8oKmskB84SZXVSmhmHiDa7LbiUezfeeKrWveL", "fee": 1000000, "feeAssetId": null, "timestamp": 1667385604134, "version": 2, "chainId": 84, "sender": "3N2D6tJAXzcTDgUiTWmcdCHd6ctYwNENuBn", "senderPublicKey": "Cq4RbcVcQJpCWyHiACDqUf2PbU8PaX949Dun9wRSeDzE", "proofs": [ "4h9Wc6isxicN82kytmJUbgJPBb2gTahr2fTrGmCwnN7Eyh4a4ruPDsuWxbhjXEh98VWoQdQVcFCw18QZNQpbmQS8" ], "script": "base64:AAIDAAAAAAAAABMIARIFCgMBAQgSAwoBCBIDCgEIAAAAAQAAAAASbWF4QXVjdGlvbkR1cmF0aW9uCQAAaAAAAAIAAAAAAAAABaAAAAAAAAAAAB4AAAADAAAAAWkBAAAADHN0YXJ0QXVjdGlvbgAAAAMAAAAIZHVyYXRpb24AAAAKc3RhcnRQcmljZQAAAAxwcmljZUFzc2V0SWQEAAAACWF1Y3Rpb25JZAkAAlgAAAABCAUAAAABaQAAAA10cmFuc2FjdGlvbklkBAAAAAllbmRIZWlnaHQJAABkAAAAAggFAAAACWxhc3RCbG9jawAAAAZoZWlnaHQFAAAACGR1cmF0aW9uBAAAAANwbXQJAQAAAAdleHRyYWN0AAAAAQgFAAAAAWkAAAAHcGF5bWVudAMJAABmAAAAAgUAAAAIZHVyYXRpb24FAAAAEm1heEF1Y3Rpb25EdXJhdGlvbgkAAAIAAAABCQABLAAAAAICAAAAKER1cmF0aW9uIGlzIHRvbyBsb25nLiBNdXN0IGJlIGxlc3MgdGhhbiAJAAGkAAAAAQUAAAASbWF4QXVjdGlvbkR1cmF0aW9uCQEAAAAIV3Jp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ZGRyBQAAAAlsb3RBbW91bnQFAAAACGxvdEFzc2V0CQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMFAAAADW9yZ2FuaXplckFkZHIFAAAACXdpbkFtb3VudAUAAAAKcHJpY2VBc3NldAUAAAADbmlsAAAAAK2i3zY=", "height": 2299382, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: GTvAv7EDZPsUxMVYeYrCn6A6uW3iqD1VjnzwVchKPZg4 Next: Dc7hwifkqJQ2xBTXJjtst192sDTjz5RQ9kZJWQmHbp7p Full:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let a = (1440 * 30)
55
66 @Callable(b)
77 func startAuction (c,d,e) = {
88 let f = toBase58String(b.transactionId)
99 let g = (lastBlock.height + c)
1010 let h = extract(b.payment)
1111 if ((c > a))
1212 then throw(("Duration is too long. Must be less than " + toString(a)))
1313 else WriteSet([DataEntry(f, g), DataEntry((f + "_organizer"), toBase58String(b.caller.bytes)), DataEntry((f + "_lot_assetId"), if (isDefined(h.assetId))
1414 then toBase58String(value(h.assetId))
1515 else "WAVES"), DataEntry((f + "_lot_amount"), h.amount), DataEntry((f + "_startPrice"), d), DataEntry((f + "_priceAssetId"), e)])
1616 }
1717
1818
1919
2020 @Callable(b)
2121 func bid (f) = {
2222 let h = extract(b.payment)
2323 let i = if (isDefined(h.assetId))
2424 then toBase58String(value(h.assetId))
2525 else "WAVES"
2626 let j = toBase58String(b.caller.bytes)
2727 let g = getIntegerValue(this, f)
2828 let d = getIntegerValue(this, (f + "_startPrice"))
2929 let e = getStringValue(this, (f + "_priceAssetId"))
3030 let k = getInteger(this, (f + "_winAmount"))
3131 let l = getString(this, (f + "_winner"))
3232 let m = if (isDefined(l))
3333 then (value(l) == j)
3434 else false
3535 let n = (h.amount + (if (m)
3636 then value(k)
3737 else 0))
3838 if ((lastBlock.height >= g))
3939 then throw("Auction already finished")
4040 else if ((e != i))
4141 then throw((("Bid must be in asset '" + e) + "'"))
4242 else if (if (if (isDefined(k))
4343 then (value(k) >= n)
4444 else false)
4545 then true
4646 else if (!(isDefined(k)))
4747 then (d >= n)
4848 else false)
4949 then throw(("Bid must be more then " + toString(if (isDefined(k))
5050 then value(k)
5151 else d)))
5252 else if (if (m)
5353 then true
5454 else !(isDefined(l)))
5555 then WriteSet([DataEntry((f + "_winner"), j), DataEntry((f + "_winAmount"), n)])
5656 else {
5757 let o = addressFromStringValue(value(l))
5858 let p = if (if ((e == "WAVES"))
5959 then true
6060 else (e == ""))
6161 then unit
6262 else fromBase58String(e)
6363 ScriptResult(WriteSet([DataEntry((f + "_winner"), j), DataEntry((f + "_winAmount"), n)]), TransferSet([ScriptTransfer(o, value(k), p)]))
6464 }
6565 }
6666
6767
6868
6969 @Callable(b)
7070 func withdraw (f) = {
7171 let h = extract(b.payment)
7272 let i = if (isDefined(h.assetId))
7373 then toBase58String(value(h.assetId))
7474 else "WAVES"
7575 let j = toBase58String(b.caller.bytes)
7676 let g = getIntegerValue(this, f)
7777 let q = getStringValue(this, (f + "_organizer"))
7878 let l = getString(this, (f + "_winner"))
7979 let r = getStringValue(this, (f + "_lot_assetId"))
8080 let s = getIntegerValue(this, (f + "_lot_amount"))
8181 let e = getStringValue(this, (f + "_priceAssetId"))
8282 let k = getIntegerValue(this, (f + "_winAmount"))
8383 let t = if ((r == "WAVES"))
8484 then unit
8585 else fromBase58String(r)
8686 let p = if (if ((e == "WAVES"))
8787 then true
8888 else (e == ""))
8989 then unit
9090 else fromBase58String(e)
9191 let u = addressFromStringValue(value(l))
9292 let v = addressFromStringValue(value(q))
9393 let w = getInteger(this, ((f + "_bidder_") + j))
9494 if ((g > lastBlock.height))
9595 then throw("Auction is not finished yet")
9696 else if (!(isDefined(l)))
9797 then if (isDefined(getString(this, (f + "_lot_passed"))))
9898 then throw("Organizer has already got his lot back")
9999 else ScriptResult(WriteSet([DataEntry((f + "_lot_passed"), q)]), TransferSet([ScriptTransfer(v, s, t)]))
100100 else if (isDefined(getString(this, (f + "_lot_passed"))))
101101 then throw("Lot is already passed to the winner, and organizer got his reward")
102102 else ScriptResult(WriteSet([DataEntry((f + "_lot_passed"), toBase58String(u.bytes))]), TransferSet([ScriptTransfer(u, s, t), ScriptTransfer(v, k, p)]))
103103 }
104104
105105

github/deemru/w8io/026f985 
49.44 ms