tx · CQfmQUMaVRoA9ce4mFyzTwctbKk1EYxSEvKw6oyEfV3M

3NBGebxfi8arSFesWFZmHiZbUTaL1LN3K2n:  -0.01400000 Waves

2019.07.03 06:36 [568699] smart account 3NBGebxfi8arSFesWFZmHiZbUTaL1LN3K2n > SELF 0.00000000 Waves

{ "type": 13, "id": "CQfmQUMaVRoA9ce4mFyzTwctbKk1EYxSEvKw6oyEfV3M", "fee": 1400000, "feeAssetId": null, "timestamp": 1562124996784, "version": 1, "sender": "3NBGebxfi8arSFesWFZmHiZbUTaL1LN3K2n", "senderPublicKey": "GQuxeXLbjWe44XSJX8GXHEfPmd7e97QeNz3uvV5CVddH", "proofs": [ "55xcuAiEYyu5u4mBV8RgLXvh4E2aQpFFaFhUFAuz4vzwyCwx67kvtp1iThRx9VahbvxFZcQX7V99En1LifiiHopw" ], "script": "base64:AAIDAAAAAAAAAAAAAAALAAAAAAROT05FAgAAAARub25lAQAAAAtnZXRTdHJCeUtleQAAAAEAAAADa2V5BAAAAANzdHIEAAAAByRtYXRjaDAJAAQdAAAAAgUAAAAEdGhpcwUAAAADa2V5AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAAZTdHJpbmcEAAAAAWEFAAAAByRtYXRjaDAFAAAAAWEFAAAABE5PTkUFAAAAA3N0cgEAAAAKZ2V0S2V5SXRlbQAAAAIAAAAIc3VwcGxpZXIAAAAFdGl0bGUJAAEsAAAAAgIAAAAFaXRlbV8JAAJYAAAAAQkAAfcAAAABCQABmwAAAAEJAAEsAAAAAgUAAAAIc3VwcGxpZXIFAAAABXRpdGxlAQAAABJnZXRLZXlJdGVtU3VwcGxpZXIAAAABAAAABGl0ZW0JAAEsAAAAAgUAAAAEaXRlbQIAAAAGX293bmVyAQAAABRnZXRWYWx1ZUl0ZW1TdXBwbGllcgAAAAEAAAAEaXRlbQkBAAAAC2dldFN0ckJ5S2V5AAAAAQkBAAAAEmdldEtleUl0ZW1TdXBwbGllcgAAAAEFAAAABGl0ZW0BAAAAD2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RBZGRyZXNzT3JhY2xlAAAAAAUAAAAPc3VwcGxpZXJBZGRyZXNzAwkAAGcAAAACAAAAAAAAAAAABQAAAAVwcmljZQkAAAIAAAABAgAAAC5wdXJjaGFzZSBhbW91bnQgY2Fubm90IGJlIGxlc3MgdGhhbiBpdGVtIHByaWNlAwkBAAAAAiE9AAAAAgkBAAAAFGdldFZhbHVlSXRlbVN1cHBsaWVyAAAAAQUAAAAEaXRlbQUAAAAETk9ORQkAAAIAAAABAgAAABhhbiBpdGVtIGlzIGFscmVhZHkgZXhpc3QDCQAAAAAAAAIFAAAAEXN1cHBsaWVyd2hpdGVsaXN0BQAAAAtCTEFDS0xJU1RFRAkAAAIAAAABAgAAACdzdXBwbGllcidzIGFjY291bnQgaGFzIGJlZW4gYmxhY2tsaXN0ZWQJAQAAAAhXcml0ZVNldAAAAAEJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIJAQAAABJnZXRLZXlJdGVtU3VwcGxpZXIAAAABBQAAAARpdGVtBQAAAA9zdXBwbGllckFkZHJlc3MJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIJAQAAAA9nZXRLZXlJdGVtUHJpY2UAAAABBQAAAARpdGVtBQAAAAVwcmljZQkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgkBAAAADmdldEtleUl0ZW1EYXRhAAAAAQUAAAAEaXRlbQUAAAAEZGF0YQkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgkBAAAAHGdldEV4dEtleUl0ZW1XaGl0ZUxpc3RTdGF0dXMAAAABBQAAAA9zdXBwbGllckFkZHJlc3MFAAAAEXN1cHBsaWVyd2hpdGVsaXN0BQAAAANuaWwAAAAAieVp1Q==", "chainId": 84, "height": 568699, "spentComplexity": 0 } View: original | compacted Prev: HTetfZZiA7vFeT91uCTDuxoUx13w4TWvkhDE1ZXZc9B1 Next: none Diff:
OldNewDifferences
3232 func n (k) = (k + "_data")
3333
3434
35-@Callable(o)
36-func addItem (i,p,q) = {
37- let r = toBase58String(o.caller.bytes)
38- let k = g(r, i)
39- if ((0 >= p))
35+func o () = extract(addressFromString("3NBGebxfi8arSFesWFZmHiZbUTaL1LN3K2n"))
36+
37+
38+let p = "blacklist"
39+
40+func q (r) = (r + "_verifier_status")
41+
42+
43+func s (t,r) = {
44+ let d = {
45+ let e = getString(t, q(r))
46+ if ($isInstanceOf(e, "String"))
47+ then {
48+ let f = e
49+ f
50+ }
51+ else a
52+ }
53+ d
54+ }
55+
56+
57+@Callable(u)
58+func addItem (i,v,w) = {
59+ let x = toBase58String(u.caller.bytes)
60+ let k = g(x, i)
61+ let y = s(o(), x)
62+ if ((0 >= v))
4063 then throw("purchase amount cannot be less than item price")
4164 else if ((l(k) != a))
4265 then throw("an item is already exist")
43- else WriteSet([DataEntry(j(k), r), DataEntry(m(k), p), DataEntry(n(k), q)])
66+ else if ((y == p))
67+ then throw("supplier's account has been blacklisted")
68+ else WriteSet([DataEntry(j(k), x), DataEntry(m(k), v), DataEntry(n(k), w), DataEntry(q(x), y)])
4469 }
4570
4671
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let a = "none"
55
66 func b (c) = {
77 let d = {
88 let e = getString(this, c)
99 if ($isInstanceOf(e, "String"))
1010 then {
1111 let f = e
1212 f
1313 }
1414 else a
1515 }
1616 d
1717 }
1818
1919
2020 func g (h,i) = ("item_" + toBase58String(sha256(toBytes((h + i)))))
2121
2222
2323 func j (k) = (k + "_owner")
2424
2525
2626 func l (k) = b(j(k))
2727
2828
2929 func m (k) = (k + "_price")
3030
3131
3232 func n (k) = (k + "_data")
3333
3434
35-@Callable(o)
36-func addItem (i,p,q) = {
37- let r = toBase58String(o.caller.bytes)
38- let k = g(r, i)
39- if ((0 >= p))
35+func o () = extract(addressFromString("3NBGebxfi8arSFesWFZmHiZbUTaL1LN3K2n"))
36+
37+
38+let p = "blacklist"
39+
40+func q (r) = (r + "_verifier_status")
41+
42+
43+func s (t,r) = {
44+ let d = {
45+ let e = getString(t, q(r))
46+ if ($isInstanceOf(e, "String"))
47+ then {
48+ let f = e
49+ f
50+ }
51+ else a
52+ }
53+ d
54+ }
55+
56+
57+@Callable(u)
58+func addItem (i,v,w) = {
59+ let x = toBase58String(u.caller.bytes)
60+ let k = g(x, i)
61+ let y = s(o(), x)
62+ if ((0 >= v))
4063 then throw("purchase amount cannot be less than item price")
4164 else if ((l(k) != a))
4265 then throw("an item is already exist")
43- else WriteSet([DataEntry(j(k), r), DataEntry(m(k), p), DataEntry(n(k), q)])
66+ else if ((y == p))
67+ then throw("supplier's account has been blacklisted")
68+ else WriteSet([DataEntry(j(k), x), DataEntry(m(k), v), DataEntry(n(k), w), DataEntry(q(x), y)])
4469 }
4570
4671

github/deemru/w8io/026f985 
32.52 ms