tx · ALH1rRiBTs2x1V6qbZBLMuYiDFw1k2u3BbKU324QaB9M 3MsqcsQSU3FeyxcMjrRQHcM8pTGrHu8yyWX: -0.01400000 Waves 2019.09.07 23:52 [666176] smart account 3MsqcsQSU3FeyxcMjrRQHcM8pTGrHu8yyWX > SELF 0.00000000 Waves
{ "type": 13, "id": "ALH1rRiBTs2x1V6qbZBLMuYiDFw1k2u3BbKU324QaB9M", "fee": 1400000, "feeAssetId": null, "timestamp": 1567889512977, "version": 1, "sender": "3MsqcsQSU3FeyxcMjrRQHcM8pTGrHu8yyWX", "senderPublicKey": "D1oc84fv4treBFDLvPS9vQdrs7A9HwTHxaeK9C7nHRTH", "proofs": [ "2PYCoSZsYDjgzMezx4a5uPa5aaZUEKSMdxu2UXKjEGeN3N6Yftv3XmpUi4jddeW6nqzzv6eHdkpf937Zvoan3xcR" ], "script": "base64:AAIDAAAAAAAAAAAAAAAAAAAAAgAAAAFpAQAAAAtjcmVhdGVPcmRlcgAAAAEAAAAFcHJpY2UEAAAAA3BtdAkBAAAAB2V4dHJhY3QAAAABCAUAAAABaQAAAAdwYXltZW50AwkBAAAAASEAAAABCQEAAAAJaXNEZWZpbmVkAAAAAQgFAAAAA3BtdAAAAAdhc3NldElkCQAAAgAAAAECAAAAIllvdSBuZWVkIHRvIHVzZSB0b2tlbklkLCBub3Qgd2F2ZXMEAAAACmN1cnJlbnRLZXkJAAJYAAAAAQgIBQAAAAFpAAAABmNhbGxlcgAAAAVieXRlcwQAAAAHYXNzZXRJZAkAAlgAAAABCQEAAAAHZXh0cmFjdAAAAAEIBQAAAANwbXQAAAAHYXNzZXRJZAQAAAAHdW5pcUtleQkAASwAAAACCQABLAAAAAIJAAEsAAAAAgkAASwAAAACBQAAAApjdXJyZW50S2V5AgAAAAFfBQAAAAdhc3NldElkAgAAAAFfCQABpAAAAAEFAAAABmhlaWdodAkBAAAACFdyaXRlU2V0AAAAAQkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgkAASwAAA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JpY2UJAQAAAAtUcmFuc2ZlclNldAAAAAEJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwgFAAAAAWkAAAAGY2FsbGVyAAAAAAAAAAABCQACWQAAAAEFAAAAB2Fzc2V0SWQFAAAAA25pbAAAAADjt2W4", "chainId": 84, "height": 666176, "spentComplexity": 0 } View: original | compacted Prev: CYnLrhbai8gd4a3dA7gnj4gRa57rGVgvrbzGtPk21kms Next: 9cS2UvTz1RrZz8ZMsyvmziXDagu2kuTttadRKqf5RZyx Diff:
Old | New | Differences | |
---|---|---|---|
44 | 44 | then throw("Have not enough of tickets") | |
45 | 45 | else if (isDefined(c.assetId)) | |
46 | 46 | then throw("You need to use waves") | |
47 | - | else if ((c.amount != b)) | |
47 | + | else if (((c.amount / 10000000) != b)) | |
48 | 48 | then throw("Count of waves is not match price") | |
49 | 49 | else TransferSet([ScriptTransfer(a.caller, 1, fromBase58String(e))]) | |
50 | 50 | } |
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 b = { | |
26 | 26 | let g = getInteger(this, ("assetPrice_" + f)) | |
27 | 27 | if ($isInstanceOf(g, "Int")) | |
28 | 28 | then { | |
29 | 29 | let h = g | |
30 | 30 | h | |
31 | 31 | } | |
32 | 32 | else 0 | |
33 | 33 | } | |
34 | 34 | let i = { | |
35 | 35 | let g = getInteger(this, ("assetAmount_" + f)) | |
36 | 36 | if ($isInstanceOf(g, "Int")) | |
37 | 37 | then { | |
38 | 38 | let j = g | |
39 | 39 | j | |
40 | 40 | } | |
41 | 41 | else 0 | |
42 | 42 | } | |
43 | 43 | if ((0 >= i)) | |
44 | 44 | then throw("Have not enough of tickets") | |
45 | 45 | else if (isDefined(c.assetId)) | |
46 | 46 | then throw("You need to use waves") | |
47 | - | else if ((c.amount != b)) | |
47 | + | else if (((c.amount / 10000000) != b)) | |
48 | 48 | then throw("Count of waves is not match price") | |
49 | 49 | else TransferSet([ScriptTransfer(a.caller, 1, fromBase58String(e))]) | |
50 | 50 | } | |
51 | 51 | ||
52 | 52 |
github/deemru/w8io/169f3d6 28.40 ms ◑