tx · 5HSAynpX34bVAgatGQYo2xTC4BH9AoZaSSjRRj63ua1F 3N1QMARzVToYmhwJJ5fmCcKSgKCH6BDXTEJ: -0.01400000 Waves 2019.07.03 10:29 [568934] smart account 3N1QMARzVToYmhwJJ5fmCcKSgKCH6BDXTEJ > SELF 0.00000000 Waves
{ "type": 13, "id": "5HSAynpX34bVAgatGQYo2xTC4BH9AoZaSSjRRj63ua1F", "fee": 1400000, "feeAssetId": null, "timestamp": 1562138943379, "version": 1, "sender": "3N1QMARzVToYmhwJJ5fmCcKSgKCH6BDXTEJ", "senderPublicKey": "6dbd5gpHc5xPFGwGpp9oJVpjHboa9to1zKAC3zR89UH8", "proofs": [ "3FicSt3H7aUFj2s98VC4nQtNT1V34hvSGRyagHoNr9Tr4mrsNqg9Q4jdrHAvwrzgFRU84buXEY83emQNUrbpDaaZ" ], "script": "base64:AAIDAAAAAAAAAAAAAAAEAQAAAB5nZXRFeHRWYWx1ZUl0ZW1XaGl0ZUxpc3RTdGF0dXMAAAABAAAABGl0ZW0JAAEsAAAAAgUAAAAEaXRlbQIAAAAQX3ZlcmlzaWVyX3N0YXR1cwAAAAAIdmVyaWZpZXICAAAAIzNOMVFNQVJ6VlRvWW1od0pKNWZtQ2NLU2dLQ0g2QkRYVEVKAAAAAAhWRVJJRklFRAIAAAAIdmVyaWZpZWQAAAAAC0JMQUNLTElTVEVEAgAAAAlibGFja2xpc3QAAAABAAAAAWkBAAAACXNldHN0YXR1cwAAAAIAAAAIc3VwcGxpZXIAAAAGc3RhdHVzBAAAAAdhY2NvdW50CQACWAAAAAEICAUAAAABaQAAAAZjYWxsZXIAAAAFYnl0ZXMDCQEAAAACIT0AAAACBQAAAAdhY2NvdW50BQAAAAh2ZXJpZmllcgkAAAIAAAABAgAAADFvbmx5IG9yYWNsZSB2ZXJ5ZmllciBhcmUgYWJsZSB0byBtYW5hZ2Ugd2hpdGVsaXN0AwMJAQAAAAIhPQAAAAIFAAAABnN0YXR1cwUAAAAIVkVSSUZJRUQJAQAAAAIhPQAAAAIFAAAABnN0YXR1cwUAAAALQkxBQ0tMSVNURUQHCQAAAgAAAAECAAAADHdyb25nIHN0YXR1cwkBAAAACFdyaXRlU2V0AAAAAQkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgkBAAAAHmdldEV4dFZhbHVlSXRlbVdoaXRlTGlzdFN0YXR1cwAAAAEFAAAACHN1cHBsaWVyBQAAAAZzdGF0dXMFAAAAA25pbAAAAACr87ZU", "chainId": 84, "height": 568934, "spentComplexity": 0 } View: original | compacted Prev: 4aQHumv3Vs6d3H8ptvkS3KmnzfYmEEbpoJgm1a6Sg7Ft Next: 7Cyq59zUw5oCtpQd91oRqx1jyorEX1GyJGEfsLftpsFw 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 + "_verisier_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 = "3N1QMARzVToYmhwJJ5fmCcKSgKCH6BDXTEJ" | |
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(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 | - | @Callable(x) | |
65 | - | func addItem (q,y,z) = { | |
66 | - | let A = toBase58String(x.caller.bytes) | |
67 | - | let j = o(A, q) | |
68 | - | if ((0 >= y)) | |
69 | - | then throw("purchase amount cannot be less than item price") | |
70 | - | else if ((t(j) != a)) | |
71 | - | then throw("an item is already exist") | |
72 | - | else WriteSet([DataEntry(s(j), A), DataEntry(i(j), y), DataEntry(r(j), z)]) | |
13 | + | @Callable(f) | |
14 | + | func setstatus (g,h) = { | |
15 | + | let i = toBase58String(f.caller.bytes) | |
16 | + | if ((i != c)) | |
17 | + | then throw("only oracle veryfier 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)]) | |
73 | 23 | } | |
74 | 24 | ||
75 | 25 |
github/deemru/w8io/169f3d6 27.40 ms ◑