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