tx · 9SUTMYdaXvtZ4ZcFd3D5BoNgPVWC341zaDtAUaKDDVGF

3N5fiWxd1Tj36FwnY3WhSwaGuZqaZBXGg4y:  -0.01400000 Waves

2019.08.10 18:11 [625086] smart account 3N5fiWxd1Tj36FwnY3WhSwaGuZqaZBXGg4y > SELF 0.00000000 Waves

{ "type": 13, "id": "9SUTMYdaXvtZ4ZcFd3D5BoNgPVWC341zaDtAUaKDDVGF", "fee": 1400000, "feeAssetId": null, "timestamp": 1565449824796, "version": 1, "sender": "3N5fiWxd1Tj36FwnY3WhSwaGuZqaZBXGg4y", "senderPublicKey": "CTtCHPVJUyydMg5UVRJqwu91B2zdiFfC2wXev1WGofcU", "proofs": [ "3Dj5u2CuZr9nEhhZQpvS83yMwHa8hRX671pwbaykvz2P7JQhYEpmfzHkYWQ6xXw699gUb7bX8oKdxxCZHBNf2wB7" ], "script": "base64:AAIDAAAAAAAAAAAAAAABAAAAABJtYXhBdWN0aW9uRHVyYXRpb24JAABoAAAAAgAAAAAAAAAFoAAAAAAAAAAAHgAAAAMAAAABaQEAAAAMc3RhcnRBdWN0aW9uAAAAAwAAAAhkdXJhdGlvbgAAAApzdGFydFByaWNlAAAADHByaWNlQXNzZXRJZAQAAAAJYXVjdGlvbklkCQACWAAAAAEIBQAAAAFpAAAADXRyYW5zYWN0aW9uSWQEAAAACWVuZEhlaWdodAkAAGQAAAACCAUAAAAJbGFzdEJsb2NrAAAABmhlaWdodAUAAAAIZHVyYXRpb24EAAAAA3BtdAkBAAAAB2V4dHJhY3QAAAABCAUAAAABaQAAAAdwYXltZW50AwkAAGYAAAACBQAAAAhkdXJhdGlvbgUAAAASbWF4QXVjdGlvbkR1cmF0aW9uCQAAAgAAAAEJAAEsAAAAAgIAAAAoRHVyYXRpb24gaXMgdG9vIGxvbmcuIE11c3QgYmUgbGVzcyB0aGFuIAkAAaQAAAABBQAAABJtYXhBdWN0aW9uRHVyYXRpb24JAQAAAAhXcml0ZVNldAAAAAEJAARMAAAAAgkBA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XNzZXQJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwUAAAANb3JnYW5pemVyQWRkcgUAAAAJd2luQW1vdW50BQAAAApwcmljZUFzc2V0BQAAAANuaWwAAAAAXiC0PQ==", "chainId": 84, "height": 625086, "spentComplexity": 0 } View: original | compacted Prev: 5ZyueLf3zRHsYjWjzGGEESP7zSHpwHTLHb8tJGrnHRSz Next: none 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 
30.65 ms