tx · HR6G9oMDfJtMSmWCghPZBR54E2DkwneAFyuLD4W3aSvU

3N5yhZaotBLUGJ1EeegT2KC3iTdhAamcHJ9:  -0.01400000 Waves

2019.07.04 00:38 [569790] smart account 3N5yhZaotBLUGJ1EeegT2KC3iTdhAamcHJ9 > SELF 0.00000000 Waves

{ "type": 13, "id": "HR6G9oMDfJtMSmWCghPZBR54E2DkwneAFyuLD4W3aSvU", "fee": 1400000, "feeAssetId": null, "timestamp": 1562189933073, "version": 1, "sender": "3N5yhZaotBLUGJ1EeegT2KC3iTdhAamcHJ9", "senderPublicKey": "2kKaoCcJJ7XyWXm1bKS64QdpwGQpmaEcrToYuPd1k2nB", "proofs": [ "3Qdu1SLhJBWjd1abwKiCx6uoPXnZhw57WvxBv3Re2zuSHG8whcHyU5g2qQC7xkmpg6v6g5BNCVspJXnQgM9GDD9" ], "script": "base64:AAIDAAAAAAAAAAAAAAAOAAAAAAtCTEFDS0xJU1RFRAIAAAAJYmxhY2tsaXN0AAAAAAROT05FAgAAAARub25lAAAAAAh2ZXJpZmllcgIAAAAjM041eWhaYW90QkxVR0oxRWVlZ1QyS0MzaVRkaEFhbWNISjkAAAAACFZFUklGSUVEAgAAAAh2ZXJpZmllZAEAAAAPZ2V0S2V5SXRlbVByaWNlAAAAAQAAAARpdGVtCQABLAAAAAIFAAAABGl0ZW0CAAAABl9wcmljZQEAAAAOZ2V0S2V5SXRlbURhdGEAAAABAAAABGl0ZW0JAAEsAAAAAgUAAAAEaXRlbQIAAAAFX2RhdGEBAAAAEmdldEtleUl0ZW1TdXBwbGllcgAAAAEAAAAEaXRlbQkAASwAAAACBQAAAARpdGVtAgAAAAZfb3duZXIBAAAAC2dldFN0ckJ5S2V5AAAAAQAAAANrZXkEAAAAA3N0cgQAAAAHJG1hdGNoMAkABB0AAAACBQAAAAR0aGlzBQAAAANrZXkDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAABlN0cmluZwQAAAABYQUAAAAHJG1hdGNoMAUAAAABYQUAAA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AAAAACBQAAABFzdXBwbGllcldoaXRlTGlzdAUAAAALQkxBQ0tMSVNURUQJAAACAAAAAQIAAAAnc3VwcGxpZXIncyBhY2NvdW50IGhhcyBiZWVuIGJsYWNrbGlzdGVkCQEAAAAIV3JpdGVTZXQAAAABCQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACCQEAAAASZ2V0S2V5SXRlbVN1cHBsaWVyAAAAAQUAAAAEaXRlbQUAAAAPc3VwcGxpZXJBZGRyZXNzCQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACCQEAAAAPZ2V0S2V5SXRlbVByaWNlAAAAAQUAAAAEaXRlbQUAAAAFcHJpY2UJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIJAQAAAA5nZXRLZXlJdGVtRGF0YQAAAAEFAAAABGl0ZW0FAAAABGRhdGEJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIJAQAAABxnZXRFeHRLZXlJdGVtV2hpdGVMaXN0U3RhdHVzAAAAAQUAAAAPc3VwcGxpZXJBZGRyZXNzBQAAABFzdXBwbGllcldoaXRlTGlzdAUAAAADbmlsAAAAABsgoNc=", "chainId": 84, "height": 569790, "spentComplexity": 0 } View: original | compacted Prev: BC8QvNBEjfnmSJZxmbbb8qpBYCwY19GEnTgaoUCxKv9m Next: none Diff:
OldNewDifferences
55
66 let b = "none"
77
8-func c (d) = (d + "_price")
8+let c = "3N5yhZaotBLUGJ1EeegT2KC3iTdhAamcHJ9"
9+
10+let d = "verified"
11+
12+func e (f) = (f + "_price")
913
1014
11-func e (d) = (d + "_data")
15+func g (f) = (f + "_data")
1216
1317
14-func f (d) = (d + "_owner")
18+func h (f) = (f + "_owner")
1519
1620
17-func g (h) = {
18- let i = {
19- let j = getString(this, h)
20- if ($isInstanceOf(j, "String"))
21+func i (j) = {
22+ let k = {
23+ let l = getString(this, j)
24+ if ($isInstanceOf(l, "String"))
2125 then {
22- let k = j
23- k
26+ let m = l
27+ m
2428 }
2529 else b
2630 }
27- i
31+ k
2832 }
2933
3034
31-func l (d) = g(f(d))
35+func n (f) = i(h(f))
3236
3337
34-func m (n,o) = ("item_" + toBase58String(sha256(toBytes((n + o)))))
38+func o (p,q) = ("item_" + toBase58String(sha256(toBytes((p + q)))))
3539
3640
37-func p () = extract(addressFromString("3N5yhZaotBLUGJ1EeegT2KC3iTdhAamcHJ9"))
41+func r () = extract(addressFromString("3N5yhZaotBLUGJ1EeegT2KC3iTdhAamcHJ9"))
3842
3943
40-func q (r) = (r + "_verifier_status")
44+func s (t) = (t + "_verifier_status")
4145
4246
43-func s (t,r) = {
44- let i = {
45- let j = getString(t, q(r))
46- if ($isInstanceOf(j, "String"))
47+func u (v,t) = {
48+ let k = {
49+ let l = getString(v, s(t))
50+ if ($isInstanceOf(l, "String"))
4751 then {
48- let k = j
49- k
52+ let m = l
53+ m
5054 }
5155 else b
5256 }
53- i
57+ k
5458 }
5559
5660
57-@Callable(u)
58-func addItem (o,v,w) = {
59- let x = toBase58String(u.caller.bytes)
60- let d = m(x, o)
61- let y = s(p(), x)
62- if ((0 >= v))
61+func w (f) = (f + "_verifier_status")
62+
63+
64+@Callable(x)
65+func setstatus (p,y) = {
66+ let t = toBase58String(x.caller.bytes)
67+ if ((t != c))
68+ then throw("only oracle verifier are able to manage whitelist")
69+ else if (if ((y != d))
70+ then (y != a)
71+ else false)
72+ then throw("wrong status")
73+ else WriteSet([DataEntry(w(p), y)])
74+ }
75+
76+
77+
78+@Callable(x)
79+func addItem (q,z,A) = {
80+ let B = toBase58String(x.caller.bytes)
81+ let f = o(B, q)
82+ let C = u(r(), B)
83+ if ((0 >= z))
6384 then throw("purchase amount cannot be less than item price")
64- else if ((l(d) != b))
85+ else if ((n(f) != b))
6586 then throw("an item already exists")
66- else if ((y == a))
87+ else if ((C == a))
6788 then throw("supplier's account has been blacklisted")
68- else WriteSet([DataEntry(f(d), x), DataEntry(c(d), v), DataEntry(e(d), w), DataEntry(q(x), y)])
89+ else WriteSet([DataEntry(h(f), B), DataEntry(e(f), z), DataEntry(g(f), A), DataEntry(s(B), C)])
6990 }
7091
7192
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let a = "blacklist"
55
66 let b = "none"
77
8-func c (d) = (d + "_price")
8+let c = "3N5yhZaotBLUGJ1EeegT2KC3iTdhAamcHJ9"
9+
10+let d = "verified"
11+
12+func e (f) = (f + "_price")
913
1014
11-func e (d) = (d + "_data")
15+func g (f) = (f + "_data")
1216
1317
14-func f (d) = (d + "_owner")
18+func h (f) = (f + "_owner")
1519
1620
17-func g (h) = {
18- let i = {
19- let j = getString(this, h)
20- if ($isInstanceOf(j, "String"))
21+func i (j) = {
22+ let k = {
23+ let l = getString(this, j)
24+ if ($isInstanceOf(l, "String"))
2125 then {
22- let k = j
23- k
26+ let m = l
27+ m
2428 }
2529 else b
2630 }
27- i
31+ k
2832 }
2933
3034
31-func l (d) = g(f(d))
35+func n (f) = i(h(f))
3236
3337
34-func m (n,o) = ("item_" + toBase58String(sha256(toBytes((n + o)))))
38+func o (p,q) = ("item_" + toBase58String(sha256(toBytes((p + q)))))
3539
3640
37-func p () = extract(addressFromString("3N5yhZaotBLUGJ1EeegT2KC3iTdhAamcHJ9"))
41+func r () = extract(addressFromString("3N5yhZaotBLUGJ1EeegT2KC3iTdhAamcHJ9"))
3842
3943
40-func q (r) = (r + "_verifier_status")
44+func s (t) = (t + "_verifier_status")
4145
4246
43-func s (t,r) = {
44- let i = {
45- let j = getString(t, q(r))
46- if ($isInstanceOf(j, "String"))
47+func u (v,t) = {
48+ let k = {
49+ let l = getString(v, s(t))
50+ if ($isInstanceOf(l, "String"))
4751 then {
48- let k = j
49- k
52+ let m = l
53+ m
5054 }
5155 else b
5256 }
53- i
57+ k
5458 }
5559
5660
57-@Callable(u)
58-func addItem (o,v,w) = {
59- let x = toBase58String(u.caller.bytes)
60- let d = m(x, o)
61- let y = s(p(), x)
62- if ((0 >= v))
61+func w (f) = (f + "_verifier_status")
62+
63+
64+@Callable(x)
65+func setstatus (p,y) = {
66+ let t = toBase58String(x.caller.bytes)
67+ if ((t != c))
68+ then throw("only oracle verifier are able to manage whitelist")
69+ else if (if ((y != d))
70+ then (y != a)
71+ else false)
72+ then throw("wrong status")
73+ else WriteSet([DataEntry(w(p), y)])
74+ }
75+
76+
77+
78+@Callable(x)
79+func addItem (q,z,A) = {
80+ let B = toBase58String(x.caller.bytes)
81+ let f = o(B, q)
82+ let C = u(r(), B)
83+ if ((0 >= z))
6384 then throw("purchase amount cannot be less than item price")
64- else if ((l(d) != b))
85+ else if ((n(f) != b))
6586 then throw("an item already exists")
66- else if ((y == a))
87+ else if ((C == a))
6788 then throw("supplier's account has been blacklisted")
68- else WriteSet([DataEntry(f(d), x), DataEntry(c(d), v), DataEntry(e(d), w), DataEntry(q(x), y)])
89+ else WriteSet([DataEntry(h(f), B), DataEntry(e(f), z), DataEntry(g(f), A), DataEntry(s(B), C)])
6990 }
7091
7192

github/deemru/w8io/169f3d6 
42.82 ms