tx · CoNoGc5tYou5wyNidthq7xWBYWrexFK9j4ycoPCS6e7w 3Mr5sE9j8pwf1XwKEa5Dus9xJ3CvJLtwkh9: -0.01400000 Waves 2019.07.03 12:59 [569081] smart account 3Mr5sE9j8pwf1XwKEa5Dus9xJ3CvJLtwkh9 > SELF 0.00000000 Waves
{ "type": 13, "id": "CoNoGc5tYou5wyNidthq7xWBYWrexFK9j4ycoPCS6e7w", "fee": 1400000, "feeAssetId": null, "timestamp": 1562148002517, "version": 1, "sender": "3Mr5sE9j8pwf1XwKEa5Dus9xJ3CvJLtwkh9", "senderPublicKey": "Ewpv1KbhV86nMYKE13YqKqELTq7YedxV1tPEGeftmMYN", "proofs": [ "76SqpuR1ZhdidtLVJtRvhng72gT1dEmqqr7ByoL37usnb2Bv7uw5s9fckBVJpAwUX2mJSZuPbT8tJVhERF2nToS" ], "script": "base64:AAIDAAAAAAAAAAAAAAAEAQAAAB5nZXRFeHRWYWx1ZUl0ZW1XaGl0ZUxpc3RTdGF0dXMAAAABAAAABGl0ZW0JAAEsAAAAAgUAAAAEaXRlbQIAAAAQX3ZlcmlmaWVyX3N0YXR1cwAAAAAIdmVyaWZpZXICAAAAIzNNdDljNWs4N3g3UDNiTXdTZjVxU2tqZkZRUXBMM2hTa0FNAAAAAAhWRVJJRklFRAIAAAAIdmVyaWZpZWQAAAAAC0JMQUNLTElTVEVEAgAAAAlibGFja2xpc3QAAAABAAAAAWkBAAAACXNldFN0YXR1cwAAAAIAAAAIc3VwcGxpZXIAAAAGc3RhdHVzBAAAAAdhY2NvdW50CQACWAAAAAEICAUAAAABaQAAAAZjYWxsZXIAAAAFYnl0ZXMDCQEAAAACIT0AAAACBQAAAAdhY2NvdW50BQAAAAh2ZXJpZmllcgkAAAIAAAABAgAAADFvbmx5IG9yYWNsZSB2ZXJpZmllciBhcmUgYWJsZSB0byBtYW5hZ2Ugd2hpdGVsaXN0AwMJAQAAAAIhPQAAAAIFAAAABnN0YXR1cwUAAAAIVkVSSUZJRUQJAQAAAAIhPQAAAAIFAAAABnN0YXR1cwUAAAALQkxBQ0tMSVNURUQHCQAAAgAAAAECAAAADHdyb25nIHN0YXR1cwkBAAAACFdyaXRlU2V0AAAAAQkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgkBAAAAHmdldEV4dFZhbHVlSXRlbVdoaXRlTGlzdFN0YXR1cwAAAAEFAAAACHN1cHBsaWVyBQAAAAZzdGF0dXMFAAAAA25pbAAAAACtBXNz", "chainId": 84, "height": 569081, "spentComplexity": 0 } View: original | compacted Prev: C6wCXd7da5YEwT3be9XCnYgvQ72QEBPA46y8U2ZHuqte Next: none Full:
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 3 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 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 | - | } | |
4 | + | func a (b) = (b + "_verifier_status") | |
18 | 5 | ||
19 | 6 | ||
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 | - | } | |
7 | + | let c = "3Mt9c5k87x7P3bMwSf5qSkjfFQQpL3hSkAM" | |
32 | 8 | ||
9 | + | let d = "verified" | |
33 | 10 | ||
34 | - | ||
11 | + | let e = "blacklist" | |
35 | 12 | ||
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(j, 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 (j,m) = (((j + "_") + m) + "_commit") | |
65 | - | ||
66 | - | ||
67 | - | func y (j,m) = g(x(j, m)) | |
68 | - | ||
69 | - | ||
70 | - | func z (j) = (j + "_comcnt") | |
71 | - | ||
72 | - | ||
73 | - | func A (j) = b(z(j)) | |
74 | - | ||
75 | - | ||
76 | - | func B (j,m) = (((j + "_") + m) + "_reveal") | |
77 | - | ||
78 | - | ||
79 | - | func C (j,m) = g(B(j, m)) | |
80 | - | ||
81 | - | ||
82 | - | func D (j) = (j + "_status") | |
83 | - | ||
84 | - | ||
85 | - | func E (j) = g(D(j)) | |
86 | - | ||
87 | - | ||
88 | - | func F (j,G) = ((j + "_res:") + G) | |
89 | - | ||
90 | - | ||
91 | - | func H (j,G) = b(F(j, G)) | |
92 | - | ||
93 | - | ||
94 | - | func I () = extract(addressFromString("3Mt9c5k87x7P3bMwSf5qSkjfFQQpL3hSkAM")) | |
95 | - | ||
96 | - | ||
97 | - | func J (v) = (v + "_verifier_status") | |
98 | - | ||
99 | - | ||
100 | - | func K (L,v) = { | |
101 | - | let h = { | |
102 | - | let e = getString(L, J(v)) | |
103 | - | if ($isInstanceOf(e, "String")) | |
104 | - | then { | |
105 | - | let f = e | |
106 | - | f | |
107 | - | } | |
108 | - | else a | |
109 | - | } | |
110 | - | h | |
111 | - | } | |
112 | - | ||
113 | - | ||
114 | - | let M = "3Mt9c5k87x7P3bMwSf5qSkjfFQQpL3hSkAM" | |
115 | - | ||
116 | - | let N = "verified" | |
117 | - | ||
118 | - | let O = "blacklist" | |
119 | - | ||
120 | - | @Callable(P) | |
121 | - | func addItem (Q,R,S) = { | |
122 | - | let T = toBase58String(P.caller.bytes) | |
123 | - | let j = o(T, Q) | |
124 | - | let U = K(I(), T) | |
125 | - | if ((0 >= R)) | |
126 | - | then throw("purchase amount cannot be lett than item price") | |
127 | - | else if ((t(j) != a)) | |
128 | - | then throw("an item is already exist") | |
129 | - | else if ((U == O)) | |
130 | - | then throw("supplier's account has been blacklisted") | |
131 | - | else WriteSet([DataEntry(s(j), T), DataEntry(i(j), R), DataEntry(r(j), S), DataEntry(J(T), U)]) | |
13 | + | @Callable(f) | |
14 | + | func setStatus (g,h) = { | |
15 | + | let i = toBase58String(f.caller.bytes) | |
16 | + | if ((i != c)) | |
17 | + | then throw("only oracle verifier are able to manage whitelist") | |
18 | + | else if (if ((h != d)) | |
19 | + | then (h != e) | |
20 | + | else false) | |
21 | + | then throw("wrong status") | |
22 | + | else WriteSet([DataEntry(a(g), h)]) | |
132 | 23 | } | |
133 | 24 | ||
134 | 25 |
github/deemru/w8io/026f985 24.08 ms ◑