tx · 8apNVhxNVGZK8GVK1Mzii6LLqEr1D2VbQADzrQmwMUxx 3Mx8C1hHL8huQR5kcxqAJuZfADWp1LWbb1A: -0.01000000 Waves 2019.10.22 17:11 [731364] smart account 3Mx8C1hHL8huQR5kcxqAJuZfADWp1LWbb1A > SELF 0.00000000 Waves
{ "type": 13, "id": "8apNVhxNVGZK8GVK1Mzii6LLqEr1D2VbQADzrQmwMUxx", "fee": 1000000, "feeAssetId": null, "timestamp": 1571753499112, "version": 1, "sender": "3Mx8C1hHL8huQR5kcxqAJuZfADWp1LWbb1A", "senderPublicKey": "B52auZB3wr8DgC6Bjyzk74WLTqGtYpqyvDEB8JkrLPk1", "proofs": [ "4B24ZEknJLW2YGBKHqG3375W981JT9jXJCWSNiXFhVEppBHAN78JGd54yLiquRgc5tFdzAdaGg4CEA55B1xQZKp5" ], "script": "base64:AAIDAAAAAAAAAAsIARIAEgUKAwgBCAAAABAAAAAAC2FsaWNlUHViS2V5AQAAACCVnPv0fjDK+UXWOHU89rnjMchGdtrRvp7SV3k8JqNFfgAAAAAJYm9iUHViS2V5AQAAACDsEpMXzzUbpi2Ff0Mjrb6D9V66oNMCyG1kL2a1kcQmVQAAAAAMY29vcGVyUHViS2V5AQAAACCASY5fiAuofxMqf5Ivw/e0xG6jnCiQ2b9d7EzQoCSpIgAAAAAETk9ORQIAAAAEbm9uZQEAAAAOZ2V0TnVtYmVyQnlLZXkAAAABAAAAA2tleQQAAAADbnVtBAAAAAckbWF0Y2gwCQAEGgAAAAIFAAAABHRoaXMFAAAAA2tleQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAADSW50BAAAAAFhBQAAAAckbWF0Y2gwBQAAAAFhAAAAAAAAAAAABQAAAANudW0BAAAAC2dldFN0ckJ5S2V5AAAAAQAAAANrZXkEAAAAA3N0cgQAAAAHJG1hdGNoMAkABB0AAAACBQAAAAR0aGlzBQAAAANrZXkDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAABlN0cmluZwQAAAABYQU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ABkFsaWNlMgUAAAAEQm9iMwcGAwUAAAAGQWxpY2UzBQAAAARCb2IxBwYDBQAAAAZBbGljZTMFAAAABEJvYjIHBAAAAA5BbGljZUFuZENvb3BlcgMDAwMDAwUAAAAHQ29vcGVyMQUAAAAGQWxpY2UyBwYDBQAAAAdDb29wZXIxBQAAAAZBbGljZTMHBgMFAAAAB0Nvb3BlcjIFAAAABkFsaWNlMQcGAwUAAAAHQ29vcGVyMgUAAAAGQWxpY2UzBwYDBQAAAAdDb29wZXIzBQAAAAZBbGljZTEHBgMFAAAAB0Nvb3BlcjMFAAAABkFsaWNlMgcEAAAADEJvYkFuZENvb3BlcgMDAwMDAwUAAAAEQm9iMQUAAAAHQ29vcGVyMgcGAwUAAAAEQm9iMQUAAAAHQ29vcGVyMwcGAwUAAAAEQm9iMgUAAAAHQ29vcGVyMQcGAwUAAAAEQm9iMgUAAAAHQ29vcGVyMwcGAwUAAAAEQm9iMwUAAAAHQ29vcGVyMQcGAwUAAAAEQm9iMwUAAAAHQ29vcGVyMgcEAAAAByRtYXRjaDAFAAAAAnR4AwMFAAAAC0FsaWNlQW5kQm9iBgUAAAAOQWxpY2VBbmRDb29wZXIGBQAAAAxCb2JBbmRDb29wZXL1zeo8", "chainId": 84, "height": 731364, "spentComplexity": 0 } View: original | compacted Prev: none Next: none Full:
Old | New | Differences | |
---|---|---|---|
1 | - | # no script | |
1 | + | {-# STDLIB_VERSION 3 #-} | |
2 | + | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | + | {-# CONTENT_TYPE DAPP #-} | |
4 | + | let a = base58'B52auZB3wr8DgC6Bjyzk74WLTqGtYpqyvDEB8JkrLPk1' | |
5 | + | ||
6 | + | let b = base58'GtXeMqkP3JUjRf7EDptgqdEu5wkrkG4d2sbfUi5hYQVi' | |
7 | + | ||
8 | + | let c = base58'9dnEr8G5eVHGJ5LkzueoK512pE3XBYBpe2ReLVcsrawT' | |
9 | + | ||
10 | + | let d = "none" | |
11 | + | ||
12 | + | func e (f) = { | |
13 | + | let g = { | |
14 | + | let h = getInteger(this, f) | |
15 | + | if ($isInstanceOf(h, "Int")) | |
16 | + | then { | |
17 | + | let i = h | |
18 | + | i | |
19 | + | } | |
20 | + | else 0 | |
21 | + | } | |
22 | + | g | |
23 | + | } | |
24 | + | ||
25 | + | ||
26 | + | func j (f) = { | |
27 | + | let k = { | |
28 | + | let h = getString(this, f) | |
29 | + | if ($isInstanceOf(h, "String")) | |
30 | + | then { | |
31 | + | let i = h | |
32 | + | i | |
33 | + | } | |
34 | + | else d | |
35 | + | } | |
36 | + | k | |
37 | + | } | |
38 | + | ||
39 | + | ||
40 | + | func l (m) = (m + "price_") | |
41 | + | ||
42 | + | ||
43 | + | func n (m) = e(l(m)) | |
44 | + | ||
45 | + | ||
46 | + | func o (p,m) = (((m + "user") + p) + "_cnt") | |
47 | + | ||
48 | + | ||
49 | + | func q (p,m) = e(o(p, m)) | |
50 | + | ||
51 | + | ||
52 | + | func r (s,t) = ("item_" + toBase58String(sha256(toBytes((s + t))))) | |
53 | + | ||
54 | + | ||
55 | + | func u (m) = (m + "_data") | |
56 | + | ||
57 | + | ||
58 | + | func v (m) = (m + "_owner") | |
59 | + | ||
60 | + | ||
61 | + | func w (m) = j(v(m)) | |
62 | + | ||
63 | + | ||
64 | + | func x (y) = (y + "_balance") | |
65 | + | ||
66 | + | ||
67 | + | func z (y) = e(x(y)) | |
68 | + | ||
69 | + | ||
70 | + | @Callable(A) | |
71 | + | func purchase () = { | |
72 | + | let B = extract(A.payment) | |
73 | + | if (isDefined(B.assetId)) | |
74 | + | then throw("Can use WAVES only at the moment") | |
75 | + | else { | |
76 | + | let C = toBase58String(A.caller.bytes) | |
77 | + | let D = { | |
78 | + | let h = getInteger(this, "item_A_coupon_price") | |
79 | + | if ($isInstanceOf(h, "Int")) | |
80 | + | then { | |
81 | + | let i = h | |
82 | + | i | |
83 | + | } | |
84 | + | else 0 | |
85 | + | } | |
86 | + | if ((D > B.amount)) | |
87 | + | then throw("Purchase amount can not be less than item price") | |
88 | + | else if ((B.amount > D)) | |
89 | + | then throw("Purchase amount can not be more than item price") | |
90 | + | else WriteSet([DataEntry(("status:purchase_item_A_customer" + C), "confirmed"), DataEntry(("price:purchase_item_A_customer" + C), D)]) | |
91 | + | } | |
92 | + | } | |
93 | + | ||
94 | + | ||
95 | + | ||
96 | + | @Callable(A) | |
97 | + | func addItem (t,D,E) = { | |
98 | + | let F = toBase58String(A.caller.bytes) | |
99 | + | let m = r(F, t) | |
100 | + | if ((0 >= D)) | |
101 | + | then throw("purchase amount can not be less than item price") | |
102 | + | else if ((w(m) != d)) | |
103 | + | then throw("An item is already") | |
104 | + | else WriteSet([DataEntry(v(m), F), DataEntry(l(m), D), DataEntry(u(m), E)]) | |
105 | + | } | |
106 | + | ||
107 | + | ||
108 | + | @Verifier(G) | |
109 | + | func H () = { | |
110 | + | let I = sigVerify(G.bodyBytes, G.proofs[0], a) | |
111 | + | let J = sigVerify(G.bodyBytes, G.proofs[1], a) | |
112 | + | let K = sigVerify(G.bodyBytes, G.proofs[2], a) | |
113 | + | let L = sigVerify(G.bodyBytes, G.proofs[0], b) | |
114 | + | let M = sigVerify(G.bodyBytes, G.proofs[1], b) | |
115 | + | let N = sigVerify(G.bodyBytes, G.proofs[2], b) | |
116 | + | let O = sigVerify(G.bodyBytes, G.proofs[0], c) | |
117 | + | let P = sigVerify(G.bodyBytes, G.proofs[1], c) | |
118 | + | let Q = sigVerify(G.bodyBytes, G.proofs[2], c) | |
119 | + | let R = if (if (if (if (if (if (I) | |
120 | + | then M | |
121 | + | else false) | |
122 | + | then true | |
123 | + | else if (I) | |
124 | + | then N | |
125 | + | else false) | |
126 | + | then true | |
127 | + | else if (J) | |
128 | + | then L | |
129 | + | else false) | |
130 | + | then true | |
131 | + | else if (J) | |
132 | + | then N | |
133 | + | else false) | |
134 | + | then true | |
135 | + | else if (K) | |
136 | + | then L | |
137 | + | else false) | |
138 | + | then true | |
139 | + | else if (K) | |
140 | + | then M | |
141 | + | else false | |
142 | + | let S = if (if (if (if (if (if (O) | |
143 | + | then J | |
144 | + | else false) | |
145 | + | then true | |
146 | + | else if (O) | |
147 | + | then K | |
148 | + | else false) | |
149 | + | then true | |
150 | + | else if (P) | |
151 | + | then I | |
152 | + | else false) | |
153 | + | then true | |
154 | + | else if (P) | |
155 | + | then K | |
156 | + | else false) | |
157 | + | then true | |
158 | + | else if (Q) | |
159 | + | then I | |
160 | + | else false) | |
161 | + | then true | |
162 | + | else if (Q) | |
163 | + | then J | |
164 | + | else false | |
165 | + | let T = if (if (if (if (if (if (L) | |
166 | + | then P | |
167 | + | else false) | |
168 | + | then true | |
169 | + | else if (L) | |
170 | + | then Q | |
171 | + | else false) | |
172 | + | then true | |
173 | + | else if (M) | |
174 | + | then O | |
175 | + | else false) | |
176 | + | then true | |
177 | + | else if (M) | |
178 | + | then Q | |
179 | + | else false) | |
180 | + | then true | |
181 | + | else if (N) | |
182 | + | then O | |
183 | + | else false) | |
184 | + | then true | |
185 | + | else if (N) | |
186 | + | then P | |
187 | + | else false | |
188 | + | let h = G | |
189 | + | if (if (R) | |
190 | + | then true | |
191 | + | else S) | |
192 | + | then true | |
193 | + | else T | |
194 | + | } | |
195 | + |
github/deemru/w8io/03bedc9 21.17 ms ◑![]()