tx · 7mpDrwKB3wmVwuLkLU9urMfyKEDkSuBQovCWpCtGffvc 3N1xkaQQ1yMkyL78yJ2e41DoLz3WzuU56gb: -0.05000000 Waves 2020.08.19 14:10 [1139700] smart account 3N1xkaQQ1yMkyL78yJ2e41DoLz3WzuU56gb > SELF 0.00000000 Waves
{ "type": 13, "id": "7mpDrwKB3wmVwuLkLU9urMfyKEDkSuBQovCWpCtGffvc", "fee": 5000000, "feeAssetId": null, "timestamp": 1597835484892, "version": 1, "sender": "3N1xkaQQ1yMkyL78yJ2e41DoLz3WzuU56gb", "senderPublicKey": "9xfw9zVWmncBh1JvRgpabJWLy7rYt8VSo7rFSDvGz5Lc", "proofs": [ "4XL5EUPxvdcQNTL93R5A9PGGznDPK8qPfZ1UAe5mCWMi3Hi24iZ1TA9A1Xmyunm1XYH9xFuRW7SZ5xVW9cS2sdPz" ], "script": "base64:AAIDAAAAAAAAAAYIARIAEgAAAAAEAAAAAAVscEtleQIAAAALbGFzdFBheW1lbnQAAAAABWxpS2V5AgAAAApiZXN0Rm9tb2VyAAAAAAVsaEtleQIAAAAGaGVpZ2h0AAAAAANkYXkAAAAAAAAAAAIAAAACAAAAAWkBAAAAC2ZlYXJtaXNzaW5nAAAAAAQAAAAHcGF5bWVudAQAAAAHJG1hdGNoMAgFAAAAAWkAAAAHcGF5bWVudAMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAPQXR0YWNoZWRQYXltZW50BAAAAAFwBQAAAAckbWF0Y2gwBAAAAAckbWF0Y2gxCAUAAAABcAAAAAdhc3NldElkAwkAAAEAAAACBQAAAAckbWF0Y2gxAgAAAApCeXRlVmVjdG9yBAAAAAdhc3NldElkBQAAAAckbWF0Y2gxCQAAAgAAAAECAAAAD2ZvbW8gd2F2ZXMgb25seQgFAAAAAXAAAAAGYW1vdW50CQAAAgAAAAECAAAAGHBheW1lbnQgbXVzdCBiZSBhdHRhY2hlZAQAAAALbGFzdFBheW1lbnQEAAAAByRtYXRjaDAJAAQaAAAA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"height": 1139700, "spentComplexity": 0 } View: original | compacted Prev: BDnwasaEHXRW4LwFrEmsSef1Z8VpwZzASDZkAyTAgNLN Next: 72X1hwWArs8pDhmdPoSYBnS48KqVTBbYamxTHMVpNfzN Diff:
Old | New | Differences | |
---|---|---|---|
7 | 7 | ||
8 | 8 | let lhKey = "height" | |
9 | 9 | ||
10 | - | let day = | |
10 | + | let day = 2 | |
11 | 11 | ||
12 | 12 | @Callable(i) | |
13 | 13 | func fearmissing () = { |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 3 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let lpKey = "lastPayment" | |
5 | 5 | ||
6 | 6 | let liKey = "bestFomoer" | |
7 | 7 | ||
8 | 8 | let lhKey = "height" | |
9 | 9 | ||
10 | - | let day = | |
10 | + | let day = 2 | |
11 | 11 | ||
12 | 12 | @Callable(i) | |
13 | 13 | func fearmissing () = { | |
14 | 14 | let payment = match i.payment { | |
15 | 15 | case p: AttachedPayment => | |
16 | 16 | match p.assetId { | |
17 | 17 | case assetId: ByteVector => | |
18 | 18 | throw("fomo waves only") | |
19 | 19 | case _ => | |
20 | 20 | p.amount | |
21 | 21 | } | |
22 | 22 | case _ => | |
23 | 23 | throw("payment must be attached") | |
24 | 24 | } | |
25 | 25 | let lastPayment = match getInteger(this, "lastPayment") { | |
26 | 26 | case p: Int => | |
27 | 27 | p | |
28 | 28 | case _ => | |
29 | 29 | 0 | |
30 | 30 | } | |
31 | 31 | if ((lastPayment >= payment)) | |
32 | 32 | then throw(("min payment is " + toString(payment))) | |
33 | 33 | else WriteSet([DataEntry(lpKey, payment), DataEntry(liKey, i.caller.bytes), DataEntry(lhKey, height)]) | |
34 | 34 | } | |
35 | 35 | ||
36 | 36 | ||
37 | 37 | ||
38 | 38 | @Callable(i) | |
39 | 39 | func withdraw () = { | |
40 | 40 | let callerCorrect = (i.caller.bytes == extract(getBinary(this, liKey))) | |
41 | 41 | let heightCorrect = ((extract(getInteger(this, lhKey)) - height) >= day) | |
42 | 42 | let canWithdraw = if (heightCorrect) | |
43 | 43 | then callerCorrect | |
44 | 44 | else false | |
45 | 45 | if (canWithdraw) | |
46 | 46 | then TransferSet([ScriptTransfer(i.caller, wavesBalance(this), unit)]) | |
47 | 47 | else throw("behold") | |
48 | 48 | } | |
49 | 49 | ||
50 | 50 |
github/deemru/w8io/026f985 49.25 ms ◑