tx · 4MYmdoRMHdkB7ZJau3VAGknALGhg92kkrDtBskELEqF2 3MrxhgqwX2XDUTytfPdpqFwskTwvbPaEUXM: -0.01400000 Waves 2019.07.03 14:17 [569160] smart account 3MrxhgqwX2XDUTytfPdpqFwskTwvbPaEUXM > SELF 0.00000000 Waves
{ "type": 13, "id": "4MYmdoRMHdkB7ZJau3VAGknALGhg92kkrDtBskELEqF2", "fee": 1400000, "feeAssetId": null, "timestamp": 1562152708351, "version": 1, "sender": "3MrxhgqwX2XDUTytfPdpqFwskTwvbPaEUXM", "senderPublicKey": "DQksuCGotFqvjzf483WL561VxA1t5Uiz4NKRDe7BgaJA", "proofs": [ "5GY9fxbazrWXkrzPmkWjZZg5divX5YEeTp7WoSeY8ByveJvP52ohzVjgMwU2USjH4Ex7UNyD7yQkE9mKJF5TB4Dw" ], "script": "base64:AAIDAAAAAAAAAAAAAAARAAAAAAROT05FAgAAAARub25lAAAAAAtCTEFDS0xJU1RFRAIAAAAJYmxhY2tsaXN0AQAAAA5nZXROdW1iZXJCeUtleQAAAAEAAAADa2V5BAAAAANudW0EAAAAByRtYXRjaDAJAAQaAAAAAgUAAAAEdGhpcwUAAAADa2V5AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAANJbnQEAAAAAWEFAAAAByRtYXRjaDAFAAAAAWEAAAAAAAAAAAAFAAAAA251bQEAAAALZ2V0U3RyQnlLZXkAAAABAAAAA2tleQQAAAADc3RyBAAAAAckbWF0Y2gwCQAEHQAAAAIFAAAABHRoaXMFAAAAA2tleQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAGU3RyaW5nBAAAAAFhBQAAAAckbWF0Y2gwBQAAAAFhBQAAAAROT05FBQAAAANzdHIBAAAAD2dldEtleUl0ZW1QcmljZQAAAAEAAAAEaXRlbQkAASwAAAACBQAAAARpdGVtAgAAAAZfcHJpY2UBAAAAEWdldFZhbHVlSXRlbVByaWNlAAAAAQAAAARpdGVtCQEAAAAOZ2V0TnVtYmVyQnlLZ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yAAAAAQUAAAAEaXRlbQUAAAAETk9ORQkAAAIAAAABAgAAABhhbiBpdGVtIGlzIGFscmVhZHkgZXhpc3QDCQAAAAAAAAIFAAAAEXN1cHBsaWVyd2hpdGVsaXN0BQAAAAtCTEFDS0xJU1RFRAkAAAIAAAABAgAAACdzdXBwbGllcidzIGFjY291bnQgaGFzIGJlZW4gYmxhY2tsaXN0ZWQJAQAAAAhXcml0ZVNldAAAAAEJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIJAQAAABJnZXRLZXlJdGVtU3VwcGxpZXIAAAABBQAAAARpdGVtBQAAAA9zdXBwbGllckFkZHJlc3MJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIJAQAAAA9nZXRLZXlJdGVtUHJpY2UAAAABBQAAAARpdGVtBQAAAAVwcmljZQkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgkBAAAADmdldEtleUl0ZW1EYXRhAAAAAQUAAAAEaXRlbQUAAAAEZGF0YQkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgkBAAAAHGdldEV4dEtleUl0ZW1XaGl0ZUxpc3RTdGF0dXMAAAABBQAAAA9zdXBwbGllckFkZHJlc3MFAAAAEXN1cHBsaWVyd2hpdGVsaXN0BQAAAANuaWwAAAAAsMnQiQ==", "chainId": 84, "height": 569160, "spentComplexity": 0 } View: original | compacted Prev: DQJX64V29SxLC6KDsMZa2ddzVCQkjbhJ1EYiSWaM8fZZ Next: Gvb36DQiJgXRdsvDSMigYgf8WjzMhRgsejj2dFhP8bHS Diff:
Old | New | Differences | |
---|---|---|---|
94 | 94 | then throw("an item is already exist") | |
95 | 95 | else if ((G == b)) | |
96 | 96 | then throw("supplier's account has been blacklisted") | |
97 | - | else WriteSet([DataEntry(t(k), F), DataEntry(j(k), D), DataEntry(s(k), E), DataEntry(z(F), | |
97 | + | else WriteSet([DataEntry(t(k), F), DataEntry(j(k), D), DataEntry(s(k), E), DataEntry(z(F), G)]) | |
98 | 98 | } | |
99 | 99 | ||
100 | 100 |
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 | let b = "blacklist" | |
7 | 7 | ||
8 | 8 | func c (d) = { | |
9 | 9 | let e = { | |
10 | 10 | let f = getInteger(this, d) | |
11 | 11 | if ($isInstanceOf(f, "Int")) | |
12 | 12 | then { | |
13 | 13 | let g = f | |
14 | 14 | g | |
15 | 15 | } | |
16 | 16 | else 0 | |
17 | 17 | } | |
18 | 18 | e | |
19 | 19 | } | |
20 | 20 | ||
21 | 21 | ||
22 | 22 | func h (d) = { | |
23 | 23 | let i = { | |
24 | 24 | let f = getString(this, d) | |
25 | 25 | if ($isInstanceOf(f, "String")) | |
26 | 26 | then { | |
27 | 27 | let g = f | |
28 | 28 | g | |
29 | 29 | } | |
30 | 30 | else a | |
31 | 31 | } | |
32 | 32 | i | |
33 | 33 | } | |
34 | 34 | ||
35 | 35 | ||
36 | 36 | func j (k) = (k + "_price") | |
37 | 37 | ||
38 | 38 | ||
39 | 39 | func l (k) = c(j(k)) | |
40 | 40 | ||
41 | 41 | ||
42 | 42 | func m (n,k) = (((k + "_") + n) + "_cnt") | |
43 | 43 | ||
44 | 44 | ||
45 | 45 | func o (n,k) = c(m(n, k)) | |
46 | 46 | ||
47 | 47 | ||
48 | 48 | func p (q,r) = ("item_" + toBase58String(sha256(toBytes((q + r))))) | |
49 | 49 | ||
50 | 50 | ||
51 | 51 | func s (k) = (k + "_data") | |
52 | 52 | ||
53 | 53 | ||
54 | 54 | func t (k) = (k + "_owner") | |
55 | 55 | ||
56 | 56 | ||
57 | 57 | func u (k) = h(t(k)) | |
58 | 58 | ||
59 | 59 | ||
60 | 60 | func v (w) = (w + "_balance") | |
61 | 61 | ||
62 | 62 | ||
63 | 63 | func x (w) = c(v(w)) | |
64 | 64 | ||
65 | 65 | ||
66 | 66 | func y () = extract(addressFromString("3N4sHbDeS1vHdESb7XPSXJeiUHgNZwMXZYo")) | |
67 | 67 | ||
68 | 68 | ||
69 | 69 | func z (w) = (w + "_verifier_status") | |
70 | 70 | ||
71 | 71 | ||
72 | 72 | func A (B,w) = { | |
73 | 73 | let i = { | |
74 | 74 | let f = getString(B, z(w)) | |
75 | 75 | if ($isInstanceOf(f, "String")) | |
76 | 76 | then { | |
77 | 77 | let g = f | |
78 | 78 | w | |
79 | 79 | } | |
80 | 80 | else a | |
81 | 81 | } | |
82 | 82 | i | |
83 | 83 | } | |
84 | 84 | ||
85 | 85 | ||
86 | 86 | @Callable(C) | |
87 | 87 | func addItem (r,D,E) = { | |
88 | 88 | let F = toBase58String(C.caller.bytes) | |
89 | 89 | let k = p(F, r) | |
90 | 90 | let G = A(y(), F) | |
91 | 91 | if ((0 >= D)) | |
92 | 92 | then throw("purchase amount cannot be less than item price") | |
93 | 93 | else if ((u(k) != a)) | |
94 | 94 | then throw("an item is already exist") | |
95 | 95 | else if ((G == b)) | |
96 | 96 | then throw("supplier's account has been blacklisted") | |
97 | - | else WriteSet([DataEntry(t(k), F), DataEntry(j(k), D), DataEntry(s(k), E), DataEntry(z(F), | |
97 | + | else WriteSet([DataEntry(t(k), F), DataEntry(j(k), D), DataEntry(s(k), E), DataEntry(z(F), G)]) | |
98 | 98 | } | |
99 | 99 | ||
100 | 100 |
github/deemru/w8io/026f985 42.18 ms ◑