tx · 7UWvPtLyC73zZ2DpyxieQWeFzvhTDuMxsjjeNJZypZgj 3N2icgpJnXhcYab7KQrwqWsV4LwSF25C1Ep: -0.01400000 Waves 2019.07.12 13:25 [582382] smart account 3N2icgpJnXhcYab7KQrwqWsV4LwSF25C1Ep > SELF 0.00000000 Waves
{ "type": 13, "id": "7UWvPtLyC73zZ2DpyxieQWeFzvhTDuMxsjjeNJZypZgj", "fee": 1400000, "feeAssetId": null, "timestamp": 1562927123508, "version": 1, "sender": "3N2icgpJnXhcYab7KQrwqWsV4LwSF25C1Ep", "senderPublicKey": "BJAeTqNbDSA5FiYihZZaSWvD6XL5XjpqVXbTGerBJjRK", "proofs": [ "5Vf2CXpGqiWubBFBCr4nGYDtvE1RWpx2x3gPmjYyCj1C3N7HurqQ4UkR9nx24u5NPsyppv2TgDRajmtfX4WmxW1w" ], "script": "base64:AAIDAAAAAAAAAAAAAAADAAAAAAd0b2tlbklkAQAAACCU1B7l35UfeySUCJ5Oe8nTMKHr4huFqp+vPk8CQCqTZQEAAAASdXNlckhhc0FkbWluQWNjZXNzAAAAAQAAAAdhZGRyZXNzCQAAAAAAAAIFAAAAB2FkZHJlc3MFAAAABHRoaXMBAAAABGFkZHIAAAACAAAAB3Rva2VuSWQAAAADcGFyCQABLAAAAAIJAAEsAAAAAgkAAlgAAAABBQAAAAd0b2tlbklkAgAAAAFfBQAAAANwYXIAAAADAAAAAWkBAAAAA2JldAAAAAEAAAAHdG9rZW5JZAQAAAAWc3RhcnRUcmFuc2FjdGlvbkhlaWdodAkBAAAAEUBleHRyTmF0aXZlKDEwNTApAAAAAgUAAAAEdGhpcwkBAAAABGFkZHIAAAACBQAAAAd0b2tlbklkAgAAAAVzdGFydAQAAAAJdGltZURlbHRhCQAAZQAAAAIFAAAABmhlaWdodAUAAAAWc3RhcnRUcmFuc2FjdGlvbkhlaWdodAQAAAAGbWF4QmV0CQEAAAAHZXh0cmFjdAAAAAEJAAQaAAAAAgUAAAAEdGhpcwkBAAAABGF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 0 } View: original | compacted Prev: JDLxpHPF35u5qfB7UtNbg8eg6j8gJEHfDGcLQtDJTvEE Next: 9VikNaS8B2N1Zsp3iAegegqps4c1mSrBQYW8kCzhLUn5 Diff:
Old | New | Differences | |
---|---|---|---|
16 | 16 | let i = extract(getInteger(this, d(a, "maxBet"))) | |
17 | 17 | let j = addressFromPublicKey(toBytes(getStringValue(this, d(a, "maxBetOwner")))) | |
18 | 18 | let k = extract(f.payment) | |
19 | - | if (( | |
19 | + | if ((3000 > 2000)) | |
20 | 20 | then throw("The betting was closed") | |
21 | 21 | else throw("ok5") | |
22 | 22 | } |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 3 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = base58'B1xwWnBLB7z79VPr4sq1jBb5GDqs8TeT5jHojTdiwxfE' | |
5 | 5 | ||
6 | 6 | func b (c) = (c == this) | |
7 | 7 | ||
8 | 8 | ||
9 | 9 | func d (a,e) = ((toBase58String(a) + "_") + e) | |
10 | 10 | ||
11 | 11 | ||
12 | 12 | @Callable(f) | |
13 | 13 | func bet (a) = { | |
14 | 14 | let g = getIntegerValue(this, d(a, "start")) | |
15 | 15 | let h = (height - g) | |
16 | 16 | let i = extract(getInteger(this, d(a, "maxBet"))) | |
17 | 17 | let j = addressFromPublicKey(toBytes(getStringValue(this, d(a, "maxBetOwner")))) | |
18 | 18 | let k = extract(f.payment) | |
19 | - | if (( | |
19 | + | if ((3000 > 2000)) | |
20 | 20 | then throw("The betting was closed") | |
21 | 21 | else throw("ok5") | |
22 | 22 | } | |
23 | 23 | ||
24 | 24 | ||
25 | 25 | ||
26 | 26 | @Callable(f) | |
27 | 27 | func start (l,m) = { | |
28 | 28 | let k = extract(f.payment) | |
29 | 29 | let n = k.assetId | |
30 | 30 | if (isDefined(a)) | |
31 | 31 | then WriteSet([DataEntry(d(a, "start"), height), DataEntry(d(a, "startPrice"), l), DataEntry(d(a, "duration"), m), DataEntry(d(a, "maxBetOwner"), toBase58String(f.callerPublicKey))]) | |
32 | 32 | else throw("You can't sell waves using the auction") | |
33 | 33 | } | |
34 | 34 | ||
35 | 35 | ||
36 | 36 | ||
37 | 37 | @Callable(f) | |
38 | 38 | func finish (a) = { | |
39 | 39 | let o = (getIntegerValue(this, d(a, "start")) - height) | |
40 | 40 | let p = (getIntegerValue(this, d(a, "duration")) - o) | |
41 | 41 | if ((p > 0)) | |
42 | 42 | then throw((("The auction cannot be finished yet! " + toString(p)) + " minutes remaining")) | |
43 | 43 | else { | |
44 | 44 | let j = addressFromPublicKey(toBytes(getStringValue(this, d(a, "maxBetOwner")))) | |
45 | 45 | ScriptResult(WriteSet([DataEntry(d(a, "start"), 0)]), TransferSet([ScriptTransfer(j, 1, a)])) | |
46 | 46 | } | |
47 | 47 | } | |
48 | 48 | ||
49 | 49 |
github/deemru/w8io/169f3d6 30.39 ms ◑