tx · 8NCvqyjmtQstQ75WrkrNXTxFduHQxDRAYpJfvVeotNXD 3N9nVNxRXkYG1LxBamitnLpZzXcjGDZ2Q6z: -0.01400000 Waves 2019.10.17 01:12 [723138] smart account 3N9nVNxRXkYG1LxBamitnLpZzXcjGDZ2Q6z > SELF 0.00000000 Waves
{ "type": 13, "id": "8NCvqyjmtQstQ75WrkrNXTxFduHQxDRAYpJfvVeotNXD", "fee": 1400000, "feeAssetId": null, "timestamp": 1571263997917, "version": 1, "sender": "3N9nVNxRXkYG1LxBamitnLpZzXcjGDZ2Q6z", "senderPublicKey": "EEGsMXJbL3i6pER7gfBpcw87Km3h2gz6qiqhqPXbdob1", "proofs": [ "3KpUnAaR5YG5vvmN3oRodcPo9xhLhP2vxCzUYgUQSt4gZD3MXiKbPVHugWxynNVVZWcP62N6KCe6L5C2MKwXMAmK" ], "script": "base64:AAIDAAAAAAAAAAsIARIAEgASAwoBAQAAAAEAAAAABW93bmVyAQAAACDEjmw5zzkX3oDIwQ5BL5mutxduNY61q+A7lXL1UaMULAAAAAMAAAABaQEAAAAIcHVyY2hhcmUAAAAABAAAAANwbXQJAQAAAAdleHRyYWN0AAAAAQgFAAAAAWkAAAAHcGF5bWVudAMJAQAAAAlpc0RlZmluZWQAAAABCAUAAAADcG10AAAAB2Fzc2V0SWQJAAACAAAAAQIAAAAkeW91IGNhbiB1c2UgV0FWRVMgb25seSBhdCB0aGUgbW9tZW50BAAAAA5jdXN0b21lckFkZHJlcwkAAlgAAAABCAgFAAAAAWkAAAAGY2FsbGVyAAAABWJ5dGVzBAAAAAVwcmljZQQAAAAHJG1hdGNoMAkABBoAAAACBQAAAAR0aGlzAgAAABNpdGVtX0FfY291cG9uX3ByaWNlAwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAANJbnQEAAAAAWEFAAAAByRtYXRjaDAFAAAAAWEAAAAAAAAAAAADCQAAZgAAAAIFAAAABXByaWNlCAUAAAADcG10AAAABmFtb3VudAkAAAIAAAABAgAAAC5w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4AQAAAAZ2ZXJpZnkAAAAABAAAAAckbWF0Y2gwBQAAAAJ0eAMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAUU2V0U2NyaXB0VHJhbnNhY3Rpb24EAAAAAWEFAAAAByRtYXRjaDAJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAABQAAAAVvd25lcgMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAPRGF0YVRyYW5zYWN0aW9uBAAAAAFiBQAAAAckbWF0Y2gwBgeRWOaH", "chainId": 84, "height": 723138, "spentComplexity": 0 } View: original | compacted Prev: 2RZV2V7Zt7uuBL5AMmoqSNqfbhy8Bdqjc8EN2iRsRxfb Next: 5R3UgoPr5yrLBYn9tkS1vbxHtVXno8g8tkVtKs8Y4mKB Full:
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 3 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = base58'EEGsMXJbL3i6pER7gfBpcw87Km3h2gz6qiqhqPXbdob1' | |
5 | 5 | ||
6 | 6 | @Callable(b) | |
7 | 7 | func purchare () = { | |
8 | 8 | let c = extract(b.payment) | |
9 | 9 | if (isDefined(c.assetId)) | |
10 | 10 | then throw("you can use WAVES only at the moment") | |
11 | 11 | else { | |
12 | 12 | let d = toBase58String(b.caller.bytes) | |
13 | 13 | let e = { | |
14 | 14 | let f = getInteger(this, "item_A_coupon_price") | |
15 | 15 | if ($isInstanceOf(f, "Int")) | |
16 | 16 | then { | |
17 | 17 | let g = f | |
18 | 18 | g | |
19 | 19 | } | |
20 | 20 | else 0 | |
21 | 21 | } | |
22 | 22 | if ((e > c.amount)) | |
23 | 23 | then throw("purchare amount cannot be less that item price") | |
24 | 24 | else if ((c.amount > e)) | |
25 | 25 | then throw("purchare amount cannot be higher that item price") | |
26 | 26 | else WriteSet([DataEntry(("status:purchare_item_A_customer_" + d), "confirmed"), DataEntry(("price:purchare_item_A_customer" + d), e)]) | |
27 | 27 | } | |
28 | 28 | } | |
29 | 29 | ||
30 | 30 | ||
31 | 31 | ||
32 | 32 | @Callable(b) | |
33 | 33 | func deposit () = { | |
34 | 34 | let c = extract(b.payment) | |
35 | 35 | if (isDefined(c.assetId)) | |
36 | 36 | then throw("you can use WAVES only at the moment") | |
37 | 37 | else { | |
38 | 38 | let h = toBase58String(b.caller.bytes) | |
39 | 39 | let i = { | |
40 | 40 | let f = getInteger(this, ("wl_sts" + h)) | |
41 | 41 | if ($isInstanceOf(f, "Int")) | |
42 | 42 | then { | |
43 | 43 | let g = f | |
44 | 44 | g | |
45 | 45 | } | |
46 | 46 | else 0 | |
47 | 47 | } | |
48 | 48 | let j = { | |
49 | 49 | let f = getString(this, ("wls_sts" + h)) | |
50 | 50 | if ($isInstanceOf(f, "String")) | |
51 | 51 | then { | |
52 | 52 | let g = f | |
53 | 53 | g | |
54 | 54 | } | |
55 | 55 | else throw("user has not waitlisted") | |
56 | 56 | } | |
57 | 57 | let k = (i + c.amount) | |
58 | 58 | WriteSet([DataEntry(h, k)]) | |
59 | 59 | } | |
60 | 60 | } | |
61 | 61 | ||
62 | 62 | ||
63 | 63 | ||
64 | 64 | @Callable(b) | |
65 | 65 | func withdraw (l) = { | |
66 | 66 | let h = toBase58String(b.caller.bytes) | |
67 | 67 | let i = { | |
68 | 68 | let f = getInteger(this, h) | |
69 | 69 | if ($isInstanceOf(f, "Int")) | |
70 | 70 | then { | |
71 | 71 | let g = f | |
72 | 72 | g | |
73 | 73 | } | |
74 | 74 | else 0 | |
75 | 75 | } | |
76 | 76 | let k = (i - l) | |
77 | 77 | if ((0 > l)) | |
78 | 78 | then throw("can't withdraw negative amount") | |
79 | 79 | else if ((0 > k)) | |
80 | 80 | then throw("not enough balance") | |
81 | 81 | else ScriptResult(WriteSet([DataEntry(h, k)]), TransferSet([ScriptTransfer(b.caller, l, unit)])) | |
82 | 82 | } | |
83 | 83 | ||
84 | 84 | ||
85 | 85 | @Verifier(m) | |
86 | 86 | func n () = { | |
87 | 87 | let f = m | |
88 | 88 | if ($isInstanceOf(f, "SetScriptTransaction")) | |
89 | 89 | then { | |
90 | 90 | let g = f | |
91 | 91 | sigVerify(m.bodyBytes, m.proofs[0], a) | |
92 | 92 | } | |
93 | 93 | else if ($isInstanceOf(f, "DataTransaction")) | |
94 | 94 | then { | |
95 | 95 | let o = f | |
96 | 96 | true | |
97 | 97 | } | |
98 | 98 | else false | |
99 | 99 | } | |
100 | 100 |
github/deemru/w8io/169f3d6 32.59 ms ◑