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:AAIDAAAAAAAAAAAAAAALAAAAAAROT05FAgAAAARub25lAQAAAAtnZXRTdHJCeUtleQAAAAEAAAADa2V5BAAAAANzdHIEAAAAByRtYXRjaDAJAAQdAAAAAgUAAAAEdGhpcwUAAAADa2V5AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAAZTdHJpbmcEAAAAAWEFAAAAByRtYXRjaDAFAAAAAWEFAAAABE5PTkUFAAAAA3N0cgEAAAAKZ2V0S2V5SXRlbQAAAAIAAAAIc3VwcGxpZXIAAAAFdGl0bGUJAAEsAAAAAgIAAAAFaXRlbV8JAAJYAAAAAQkAAfcAAAABCQABmwAAAAEJAAEsAAAAAgUAAAAIc3VwcGxpZXIFAAAABXRpdGxlAQAAABJnZXRLZXlJdGVtU3VwcGxpZXIAAAABAAAABGl0ZW0JAAEsAAAAAgUAAAAEaXRlbQIAAAAGX293bmVyAQAAABRnZXRWYWx1ZUl0ZW1TdXBwbGllcgAAAAEAAAAEaXRlbQkBAAAAC2dldFN0ckJ5S2V5AAAAAQkBAAAAEmdldEtleUl0ZW1TdXBwbGllcgAAAAEFAAAABGl0ZW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NnZXRFeHRBZGRyZXNzT3JhY2xlAAAAAAUAAAAPc3VwcGxpZXJBZGRyZXNzAwkAAGcAAAACAAAAAAAAAAAABQAAAAVwcmljZQkAAAIAAAABAgAAAC5wdXJjaGFzZSBhbW91bnQgY2Fubm90IGJlIGxlc3MgdGhhbiBpdGVtIHByaWNlAwkBAAAAAiE9AAAAAgkBAAAAFGdldFZhbHVlSXRlbVN1cHBsaWVyAAAAAQUAAAAEaXRlbQUAAAAETk9ORQkAAAIAAAABAgAAABhhbiBpdGVtIGlzIGFscmVhZHkgZXhpc3QDCQAAAAAAAAIFAAAAEXN1cHBsaWVyd2hpdGVsaXN0BQAAAAtCTEFDS0xJU1RFRAkAAAIAAAABAgAAACdzdXBwbGllcidzIGFjY291bnQgaGFzIGJlZW4gYmxhY2tsaXN0ZWQJAQAAAAhXcml0ZVNldAAAAAEJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIJAQAAABJnZXRLZXlJdGVtU3VwcGxpZXIAAAABBQAAAARpdGVtBQAAAA9zdXBwbGllckFkZHJlc3MJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIJAQAAAA9nZXRLZXlJdGVtUHJpY2UAAAABBQAAAARpdGVtBQAAAAVwcmljZQkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgkBAAAADmdldEtleUl0ZW1EYXRhAAAAAQUAAAAEaXRlbQUAAAAEZGF0YQkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgkBAAAAHGdldEV4dEtleUl0ZW1XaGl0ZUxpc3RTdGF0dXMAAAABBQAAAA9zdXBwbGllckFkZHJlc3MFAAAAEXN1cHBsaWVyd2hpdGVsaXN0BQAAAANuaWwAAAAAieVp1Q==",
"chainId": 84,
"height": 568699,
"spentComplexity": 0
}
View: original | compacted
Prev: HTetfZZiA7vFeT91uCTDuxoUx13w4TWvkhDE1ZXZc9B1
Next: none
Diff:
Old | New | | Differences |
---|
32 | 32 | | func n (k) = (k + "_data") |
---|
33 | 33 | | |
---|
34 | 34 | | |
---|
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)) |
---|
40 | 63 | | then throw("purchase amount cannot be less than item price") |
---|
41 | 64 | | else if ((l(k) != a)) |
---|
42 | 65 | | 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)]) |
---|
44 | 69 | | } |
---|
45 | 70 | | |
---|
46 | 71 | | |
---|
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 | 6 | | func b (c) = { |
---|
7 | 7 | | let d = { |
---|
8 | 8 | | let e = getString(this, c) |
---|
9 | 9 | | if ($isInstanceOf(e, "String")) |
---|
10 | 10 | | then { |
---|
11 | 11 | | let f = e |
---|
12 | 12 | | f |
---|
13 | 13 | | } |
---|
14 | 14 | | else a |
---|
15 | 15 | | } |
---|
16 | 16 | | d |
---|
17 | 17 | | } |
---|
18 | 18 | | |
---|
19 | 19 | | |
---|
20 | 20 | | func g (h,i) = ("item_" + toBase58String(sha256(toBytes((h + i))))) |
---|
21 | 21 | | |
---|
22 | 22 | | |
---|
23 | 23 | | func j (k) = (k + "_owner") |
---|
24 | 24 | | |
---|
25 | 25 | | |
---|
26 | 26 | | func l (k) = b(j(k)) |
---|
27 | 27 | | |
---|
28 | 28 | | |
---|
29 | 29 | | func m (k) = (k + "_price") |
---|
30 | 30 | | |
---|
31 | 31 | | |
---|
32 | 32 | | func n (k) = (k + "_data") |
---|
33 | 33 | | |
---|
34 | 34 | | |
---|
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)) |
---|
40 | 63 | | then throw("purchase amount cannot be less than item price") |
---|
41 | 64 | | else if ((l(k) != a)) |
---|
42 | 65 | | 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)]) |
---|
44 | 69 | | } |
---|
45 | 70 | | |
---|
46 | 71 | | |
---|