tx · SeZGwD2wjApECZrb1mFbo2jaR4RGfbjxZ47CcTMHy2J 3NCUmMmkaFG7PwJfJuS2dpnVE8Uqh6aQHBv: -0.01400000 Waves 2019.07.03 10:48 [568954] smart account 3NCUmMmkaFG7PwJfJuS2dpnVE8Uqh6aQHBv > SELF 0.00000000 Waves
{ "type": 13, "id": "SeZGwD2wjApECZrb1mFbo2jaR4RGfbjxZ47CcTMHy2J", "fee": 1400000, "feeAssetId": null, "timestamp": 1562140113668, "version": 1, "sender": "3NCUmMmkaFG7PwJfJuS2dpnVE8Uqh6aQHBv", "senderPublicKey": "2UzFiBcF1Niw3M6eCKueKU6d1N4hVt7jy5Kq27LSrFJt", "proofs": [ "kpkDUNZdEAeG4ymsZipBX3FPRFbi2q3tsk8KKaVcgzU6wnVEisNxSfFrSofVpMPbEo3865Dz7PHk8sHMo5Qi821" ], "script": "base64:AAIDAAAAAAAAAAAAAAAQAAAAAAROT05FAgAAAARub25lAQAAAA5nZXROdW1iZXJCeUtleQAAAAEAAAADa2V5BAAAAANudW0EAAAAByRtYXRjaDAJAAQaAAAAAgUAAAAEdGhpcwUAAAADa2V5AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAANJbnQEAAAAAWEFAAAAByRtYXRjaDAFAAAAAWEAAAAAAAAAAAAFAAAAA251bQEAAAALZ2V0U3RyQnlLZXkAAAABAAAAA2tleQQAAAADc3RyBAAAAAckbWF0Y2gwCQAEHQAAAAIFAAAABHRoaXMFAAAAA2tleQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAGU3RyaW5nBAAAAAFhBQAAAAckbWF0Y2gwBQAAAAFhBQAAAAROT05FBQAAAANzdHIBAAAAD2dldEtleUl0ZW1QcmljZQAAAAEAAAAEaXRlbQkAASwAAAACBQAAAARpdGVtAgAAAAZfcHJpY2UBAAAAEWdldFZhbHVlSXRlbVByaWNlAAAAAQAAAARpdGVtCQEAAAAOZ2V0TnVtYmVyQnlLZXkAAAABCQEAAAAPZ2V0S2V5SX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9ORQkAAAIAAAABAgAAABhhbiBpdGVtIGlzIGFscmVhZHkgZXhpc3QJAQAAAAhXcml0ZVNldAAAAAEJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIJAQAAABJnZXRLZXlJdGVtU3VwcGxpZXIAAAABBQAAAARpdGVtBQAAAA9zdXBwbGllckFkZHJlc3MJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIJAQAAAA9nZXRLZXlJdGVtUHJpY2UAAAABBQAAAARpdGVtBQAAAAVwcmljZQkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgkBAAAADmdldEtleUl0ZW1EYXRhAAAAAQUAAAAEaXRlbQUAAAAEZGF0YQkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgkBAAAAHGdldEV4dEtleUl0ZW1XaGl0ZUxpc3RTdGF0dXMAAAABBQAAAA9zdXBwbGllckFkZHJlc3MFAAAAEXN1cHBsaWVyd2hpdGVsaXN0BQAAAANuaWwAAAAArPNikg==", "chainId": 84, "height": 568954, "spentComplexity": 0 } View: original | compacted Prev: none Next: 2oBWRqx32XqgwEeJoxGBnsMYBYB3eBki6BVcMJbz22t1 Full:
Old | New | Differences | |
---|---|---|---|
1 | - | # no script | |
1 | + | {-# STDLIB_VERSION 3 #-} | |
2 | + | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | + | {-# CONTENT_TYPE DAPP #-} | |
4 | + | let a = "none" | |
5 | + | ||
6 | + | func b (c) = { | |
7 | + | let d = { | |
8 | + | let e = getInteger(this, c) | |
9 | + | if ($isInstanceOf(e, "Int")) | |
10 | + | then { | |
11 | + | let f = e | |
12 | + | f | |
13 | + | } | |
14 | + | else 0 | |
15 | + | } | |
16 | + | d | |
17 | + | } | |
18 | + | ||
19 | + | ||
20 | + | func g (c) = { | |
21 | + | let h = { | |
22 | + | let e = getString(this, c) | |
23 | + | if ($isInstanceOf(e, "String")) | |
24 | + | then { | |
25 | + | let f = e | |
26 | + | f | |
27 | + | } | |
28 | + | else a | |
29 | + | } | |
30 | + | h | |
31 | + | } | |
32 | + | ||
33 | + | ||
34 | + | func i (j) = (j + "_price") | |
35 | + | ||
36 | + | ||
37 | + | func k (j) = b(i(j)) | |
38 | + | ||
39 | + | ||
40 | + | func l (m,j) = (((j + "_") + m) + "_cnt") | |
41 | + | ||
42 | + | ||
43 | + | func n (m,j) = b(l(m, j)) | |
44 | + | ||
45 | + | ||
46 | + | func o (p,q) = ("item_" + toBase58String(sha256(toBytes((p + q))))) | |
47 | + | ||
48 | + | ||
49 | + | func r (j) = (j + "_data") | |
50 | + | ||
51 | + | ||
52 | + | func s (j) = (j + "_owner") | |
53 | + | ||
54 | + | ||
55 | + | func t (j) = g(s(j)) | |
56 | + | ||
57 | + | ||
58 | + | func u (v) = (v + "_balance") | |
59 | + | ||
60 | + | ||
61 | + | func w (v) = b(u(v)) | |
62 | + | ||
63 | + | ||
64 | + | func x () = extract(addressFromString("3N1QMARzVToYmhwJJ5fmCcKSgKCH6BDXTEJ")) | |
65 | + | ||
66 | + | ||
67 | + | func y (v) = (v + "_verifier_status") | |
68 | + | ||
69 | + | ||
70 | + | func z (A,v) = { | |
71 | + | let h = { | |
72 | + | let e = getString(A, y(v)) | |
73 | + | if ($isInstanceOf(e, "String")) | |
74 | + | then { | |
75 | + | let f = e | |
76 | + | v | |
77 | + | } | |
78 | + | else a | |
79 | + | } | |
80 | + | h | |
81 | + | } | |
82 | + | ||
83 | + | ||
84 | + | @Callable(B) | |
85 | + | func addItem (q,C,D) = { | |
86 | + | let E = toBase58String(B.caller.bytes) | |
87 | + | let j = o(E, q) | |
88 | + | let F = z(x(), E) | |
89 | + | if ((0 >= C)) | |
90 | + | then throw("purchase amount cannot be less than item price") | |
91 | + | else if ((t(j) != a)) | |
92 | + | then throw("an item is already exist") | |
93 | + | else WriteSet([DataEntry(s(j), E), DataEntry(i(j), C), DataEntry(r(j), D), DataEntry(y(E), F)]) | |
94 | + | } | |
95 | + | ||
96 | + |
github/deemru/w8io/026f985 21.44 ms ◑