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