tx · 3E4Yuv1Y2Xm52ZKy8G1GJA7c2gjwoStDJWdsDvtTj5M5 3Mr47Kpwz3hxvXt417SP42WaoT5iGsSEr5h: -0.04000000 Waves 2019.11.14 16:20 [764792] smart account 3Mr47Kpwz3hxvXt417SP42WaoT5iGsSEr5h > SELF 0.00000000 Waves
{ "type": 13, "id": "3E4Yuv1Y2Xm52ZKy8G1GJA7c2gjwoStDJWdsDvtTj5M5", "fee": 4000000, "feeAssetId": null, "timestamp": 1573737609060, "version": 1, "sender": "3Mr47Kpwz3hxvXt417SP42WaoT5iGsSEr5h", "senderPublicKey": "8JFVEhPAiLA1CbnTkMF6GdCqYJoNYUYUX6bmt8wk7VNc", "proofs": [ "oWzkcpMZgS9UmKqeTxv893jM5eq6CdPvjvqMbmmANFyNi9W4y9Red515RAh5HS9ut6g9eMHNitmJkfrmdWv1F3o" ], "script": "base64:AAIDAAAAAAAAAAgIARIECgIIAQAAAAAAAAABAAAAAWkBAAAACWJ1eVRpY2tldAAAAAIAAAAIdGlja2V0SWQAAAAGYW1vdW50BAAAAAdwYXltZW50CQEAAAAFdmFsdWUAAAABCAUAAAABaQAAAAdwYXltZW50BAAAAAp0aWNrZXRJbmZvCQEAAAAFdmFsdWUAAAABCQAD7AAAAAEJAAJZAAAAAQUAAAAIdGlja2V0SWQEAAAAC3N0YXJ0SGVpZ2h0BAAAAAckbWF0Y2gwCQAEGgAAAAIIBQAAAAp0aWNrZXRJbmZvAAAABmlzc3VlcgIAAAAFc3RhcnQDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAABFVuaXQEAAAAAXgFAAAAByRtYXRjaDAAAAAAAAAAAAADCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAA0ludAQAAAABeAUAAAAHJG1hdGNoMAUAAAABeAkBAAAABXRocm93AAAAAAQAAAAKc3RvcEhlaWdodAQAAAAHJG1hdGNoMAkABBoAAAACCAUAAAAKdGlja2V0SW5mbwAAAAZpc3N1ZXICAAAAA2VuZAMJAAABAAAAAgU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ALVHJhbnNmZXJTZXQAAAABCQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMIBQAAAAFpAAAABmNhbGxlcgUAAAAGYW1vdW50CQACWQAAAAEFAAAACHRpY2tldElkBQAAAANuaWwAAAAA8WI4Jg==", "chainId": 84, "height": 764792, "spentComplexity": 0 } View: original | compacted Prev: CsePCZpMtuL4Sp2CezH1qUuvnLThUeEfWrGhDr1HmiEn Next: none Full:
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 3 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | ||
5 | 5 | ||
6 | 6 | @Callable(a) | |
7 | 7 | func buyTicket (b,c) = { | |
8 | 8 | let d = value(a.payment) | |
9 | 9 | let e = value(assetInfo(fromBase58String(b))) | |
10 | 10 | let f = { | |
11 | 11 | let g = getInteger(e.issuer, "start") | |
12 | 12 | if ($isInstanceOf(g, "Unit")) | |
13 | 13 | then { | |
14 | 14 | let h = g | |
15 | 15 | 0 | |
16 | 16 | } | |
17 | 17 | else if ($isInstanceOf(g, "Int")) | |
18 | 18 | then { | |
19 | 19 | let h = g | |
20 | 20 | h | |
21 | 21 | } | |
22 | 22 | else throw() | |
23 | 23 | } | |
24 | 24 | let i = { | |
25 | 25 | let g = getInteger(e.issuer, "end") | |
26 | 26 | if ($isInstanceOf(g, "Unit")) | |
27 | 27 | then { | |
28 | 28 | let h = g | |
29 | 29 | 0 | |
30 | 30 | } | |
31 | 31 | else if ($isInstanceOf(g, "Int")) | |
32 | 32 | then { | |
33 | 33 | let h = g | |
34 | 34 | h | |
35 | 35 | } | |
36 | 36 | else throw() | |
37 | 37 | } | |
38 | 38 | if (isDefined(d.assetId)) | |
39 | 39 | then throw("only waves for now") | |
40 | 40 | else if (if (((f + i) > 0)) | |
41 | 41 | then if ((f > height)) | |
42 | 42 | then true | |
43 | 43 | else (height > i) | |
44 | 44 | else false) | |
45 | 45 | then throw(((("you can only by a ticket between block: " + toString(f)) + " and ") + toString(i))) | |
46 | 46 | else { | |
47 | 47 | let j = getIntegerValue(e.issuer, "price") | |
48 | 48 | if (((j * c) != d.amount)) | |
49 | 49 | then throw(((((("Not the correct price. The price for " + toString(c)) + " tickets = ") + toString((j * c))) + ". You are paying: ") + toString(d.amount))) | |
50 | 50 | else TransferSet([ScriptTransfer(a.caller, c, fromBase58String(b))]) | |
51 | 51 | } | |
52 | 52 | } | |
53 | 53 | ||
54 | 54 |
github/deemru/w8io/169f3d6 45.10 ms ◑