tx · GraTu7FdZRcy6EvgsW8ASHTfE9ZMQHboJdvNucMwvEtf 3MsqcsQSU3FeyxcMjrRQHcM8pTGrHu8yyWX: -0.01400000 Waves 2019.09.08 11:33 [666863] smart account 3MsqcsQSU3FeyxcMjrRQHcM8pTGrHu8yyWX > SELF 0.00000000 Waves
{ "type": 13, "id": "GraTu7FdZRcy6EvgsW8ASHTfE9ZMQHboJdvNucMwvEtf", "fee": 1400000, "feeAssetId": null, "timestamp": 1567931583948, "version": 1, "sender": "3MsqcsQSU3FeyxcMjrRQHcM8pTGrHu8yyWX", "senderPublicKey": "D1oc84fv4treBFDLvPS9vQdrs7A9HwTHxaeK9C7nHRTH", "proofs": [ "31zWmCwGKJYM3WC8tE8Jfie1WB7K4tmJkqecMZhwbv4kCQf4m5HS8PMuqgta6EcrfVHpxx763SCdY4vZyRdPn5PQ" ], "script": "base64:AAIDAAAAAAAAAAAAAAAAAAAAAwAAAAFpAQAAAAtjcmVhdGVPcmRlcgAAAAEAAAAFcHJpY2UEAAAAA3BtdAkBAAAAB2V4dHJhY3QAAAABCAUAAAABaQAAAAdwYXltZW50AwkBAAAAASEAAAABCQEAAAAJaXNEZWZpbmVkAAAAAQgFAAAAA3BtdAAAAAdhc3NldElkCQAAAgAAAAECAAAAIllvdSBuZWVkIHRvIHVzZSB0b2tlbklkLCBub3Qgd2F2ZXMEAAAACmN1cnJlbnRLZXkJAAJYAAAAAQgIBQAAAAFpAAAABmNhbGxlcgAAAAVieXRlcwQAAAAHYXNzZXRJZAkAAlgAAAABCQEAAAAHZXh0cmFjdAAAAAEIBQAAAANwbXQAAAAHYXNzZXRJZAQAAAAHdW5pcUtleQkAASwAAAACCQABLAAAAAIJAAEsAAAAAgkAASwAAAACBQAAAApjdXJyZW50S2V5AgAAAAFfBQAAAAdhc3NldElkAgAAAAFfCQABpAAAAAEFAAAABmhlaWdodAkBAAAACFdyaXRlU2V0AAAAAQkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgkAASwAAA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ACCQABLAAAAAIFAAAACmN1cnJlbnRLZXkCAAAAAV8FAAAAB2Fzc2V0SWQCAAAAAV8JAAGkAAAAAQUAAAAGaGVpZ2h0CQEAAAAIV3JpdGVTZXQAAAABCQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACCQABLAAAAAICAAAACGNoZWNraW5fBQAAAAd1bmlxS2V5CAUAAAAJbGFzdEJsb2NrAAAACXRpbWVzdGFtcAUAAAADbmlsAAAAAKP+7RY=", "chainId": 84, "height": 666863, "spentComplexity": 0 } View: original | compacted Prev: CC6SjPAZg75MLopDhuPLdBDyAxAZmdQwHPnMNH3bqr4K Next: none Diff:
Old | New | Differences | |
---|---|---|---|
64 | 64 | let d = toBase58String(a.caller.bytes) | |
65 | 65 | let e = toBase58String(extract(c.assetId)) | |
66 | 66 | let f = ((((d + "_") + e) + "_") + toString(height)) | |
67 | - | WriteSet([DataEntry(("checkin_" + f), | |
67 | + | WriteSet([DataEntry(("checkin_" + f), lastBlock.timestamp)]) | |
68 | 68 | } | |
69 | 69 | } | |
70 | 70 |
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 createOrder (b) = { | |
8 | 8 | let c = extract(a.payment) | |
9 | 9 | if (!(isDefined(c.assetId))) | |
10 | 10 | then throw("You need to use tokenId, not waves") | |
11 | 11 | else { | |
12 | 12 | let d = toBase58String(a.caller.bytes) | |
13 | 13 | let e = toBase58String(extract(c.assetId)) | |
14 | 14 | let f = ((((d + "_") + e) + "_") + toString(height)) | |
15 | 15 | WriteSet([DataEntry(("assetAmount_" + f), c.amount), DataEntry(("assetPrice_" + f), b)]) | |
16 | 16 | } | |
17 | 17 | } | |
18 | 18 | ||
19 | 19 | ||
20 | 20 | ||
21 | 21 | @Callable(a) | |
22 | 22 | func buyTicket (f) = { | |
23 | 23 | let c = extract(a.payment) | |
24 | 24 | let e = extract(split(f, "_")[1]) | |
25 | 25 | let g = extract(addressFromString(split(f, "_")[0])) | |
26 | 26 | let b = { | |
27 | 27 | let h = getInteger(this, ("assetPrice_" + f)) | |
28 | 28 | if ($isInstanceOf(h, "Int")) | |
29 | 29 | then { | |
30 | 30 | let i = h | |
31 | 31 | i | |
32 | 32 | } | |
33 | 33 | else 0 | |
34 | 34 | } | |
35 | 35 | let j = { | |
36 | 36 | let h = getInteger(this, ("assetAmount_" + f)) | |
37 | 37 | if ($isInstanceOf(h, "Int")) | |
38 | 38 | then { | |
39 | 39 | let k = h | |
40 | 40 | k | |
41 | 41 | } | |
42 | 42 | else 0 | |
43 | 43 | } | |
44 | 44 | let l = (j - 1) | |
45 | 45 | if ((0 >= j)) | |
46 | 46 | then throw("Have not enough of tickets for this price") | |
47 | 47 | else if (isDefined(c.assetId)) | |
48 | 48 | then throw("You need to use waves") | |
49 | 49 | else if ((b > c.amount)) | |
50 | 50 | then throw("Count of waves is not match price") | |
51 | 51 | else ScriptResult(WriteSet([DataEntry(("assetAmount_" + f), l)]), TransferSet([ScriptTransfer(a.caller, 1, fromBase58String(e)), ScriptTransfer(g, b, unit)])) | |
52 | 52 | } | |
53 | 53 | ||
54 | 54 | ||
55 | 55 | ||
56 | 56 | @Callable(a) | |
57 | 57 | func checkIn () = { | |
58 | 58 | let c = extract(a.payment) | |
59 | 59 | if (!(isDefined(c.assetId))) | |
60 | 60 | then throw("You need to use tokenId, not waves") | |
61 | 61 | else if ((c.amount != 1)) | |
62 | 62 | then throw("Give only one ticket") | |
63 | 63 | else { | |
64 | 64 | let d = toBase58String(a.caller.bytes) | |
65 | 65 | let e = toBase58String(extract(c.assetId)) | |
66 | 66 | let f = ((((d + "_") + e) + "_") + toString(height)) | |
67 | - | WriteSet([DataEntry(("checkin_" + f), | |
67 | + | WriteSet([DataEntry(("checkin_" + f), lastBlock.timestamp)]) | |
68 | 68 | } | |
69 | 69 | } | |
70 | 70 | ||
71 | 71 |
github/deemru/w8io/169f3d6 33.80 ms ◑