tx · BUGgRT9xfAthJ1syRHWy9tRPS3BVykAJjH7AZFGy2TgE
3MovmZoJtqutkf49oGXHzABSMUQ7HU5Dcg7: -0.01400000 Waves
2021.07.31 19:56 [1638077] smart account 3MovmZoJtqutkf49oGXHzABSMUQ7HU5Dcg7 > SELF 0.00000000 Waves
{
"type": 13,
"id": "BUGgRT9xfAthJ1syRHWy9tRPS3BVykAJjH7AZFGy2TgE",
"fee": 1400000,
"feeAssetId": null,
"timestamp": 1627750585039,
"version": 2,
"chainId": 84,
"sender": "3MovmZoJtqutkf49oGXHzABSMUQ7HU5Dcg7",
"senderPublicKey": "3tp5fNYyPi4jMnkf6s1k4kBqvJ7nm57SxzvLyi8RkxT2",
"proofs": [
"2LZGaaHg9p7KpmM8TU8QtqHFaaseEhviQ2AwW7nZLdU6cAe9Pgy8zJzJ43yP2S4xcU1VpPuyXuZUqWTyiRGvmkGD"
],
"script": "base64:AAIEAAAAAAAAAC8IAhIDCgEIEgYKBAgBCAESBwoFCAgBCAESAwoBCBIDCgEIEgQKAggIEgUKAwgICAAAACIAAAAABE5PTkUCAAAABE5PTkUAAAAABlZPVEVSUwAAAAAAAAAAAwAAAAAGUVVPUlVNAAAAAAAAAAACAAAAAAhGRUFUVVJFRAIAAAAIZmVhdHVyZWQAAAAACERFTElTVEVEAgAAAAhkZWxpc3RlZAAAAAAGVk9USU5HAgAAAAZ2b3RpbmcAAAAABlJFVkVBTAIAAAAGcmV2ZWFsAQAAAA5nZXRTdHJpbmdCeUtleQAAAAEAAAADa2V5BAAAAAckbWF0Y2gwCQAEHQAAAAIFAAAABHRoaXMFAAAAA2tleQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAGU3RyaW5nBAAAAAFhBQAAAAckbWF0Y2gwBQAAAAFhBQAAAAROT05FAQAAAA9nZXRJbnRlZ2VyQnlLZXkAAAABAAAAA2tleQQAAAAHJG1hdGNoMAkABBoAAAACBQAAAAR0aGlzBQAAAANrZXkDCQAAAQAAAAIFAAAAByRtY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gaW5jb3JyZWN0BAAAAAluZXdTdGF0dXMDCQAAZwAAAAIFAAAADW5ld1ZvdGVzQ291bnQFAAAABlFVT1JVTQUAAAAEdm90ZQUAAAAGUkVWRUFMCQAETAAAAAIJAQAAAAtTdHJpbmdFbnRyeQAAAAIJAQAAAAxnZXRLZXlSZXZlYWwAAAACBQAAAARpdGVtBQAAAAR1c2VyBQAAAAR2b3RlCQAETAAAAAIJAQAAAAxJbnRlZ2VyRW50cnkAAAACCQEAAAAQZ2V0S2V5Vm90ZXNDb3VudAAAAAIFAAAABGl0ZW0FAAAABHVzZXIFAAAADW5ld1ZvdGVzQ291bnQJAARMAAAAAgkBAAAAC1N0cmluZ0VudHJ5AAAAAgkBAAAAEGdldEtleUl0ZW1TdGF0dXMAAAABBQAAAARpdGVtBQAAAAluZXdTdGF0dXMFAAAAA25pbAAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAAEAAAAByRtYXRjaDAFAAAAAnR4AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAABRTZXRTY3JpcHRUcmFuc2FjdGlvbgQAAAABdAUAAAAHJG1hdGNoMAkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAIBQAAAAJ0eAAAAA9zZW5kZXJQdWJsaWNLZXkHmH3dlA==",
"height": 1638077,
"applicationStatus": "succeeded",
"spentComplexity": 0
}
View: original | compacted
Prev: 9y6jWuaC3kozzLLk4BsqxqwDJ2kU1bZdC5nrQGP51Hcq
Next: 6fVaqvvStosUw9oDXN6ACyBGwjNRBhQN4bhuqCDRX36m
Diff:
Old | New | | Differences |
---|
61 | 61 | | func x (u) = (u + "_data") |
---|
62 | 62 | | |
---|
63 | 63 | | |
---|
64 | | - | func y (u,z) = (((u + "_") + z) + "_commit") |
---|
| 64 | + | func y (u) = (u + "_expiredate") |
---|
65 | 65 | | |
---|
66 | 66 | | |
---|
67 | | - | func A (u) = (u + "_cmtcnt") |
---|
| 67 | + | func z (u,A) = (((u + "_") + A) + "_commit") |
---|
68 | 68 | | |
---|
69 | 69 | | |
---|
70 | | - | func B (u,z) = (((u + "_") + z) + "_reveal") |
---|
| 70 | + | func B (u) = (u + "_cmtcnt") |
---|
71 | 71 | | |
---|
72 | 72 | | |
---|
73 | | - | func C (u) = (u + "_status") |
---|
| 73 | + | func C (u,A) = (((u + "_") + A) + "_reveal") |
---|
74 | 74 | | |
---|
75 | 75 | | |
---|
76 | | - | func D (u,E) = ((u + "_res:") + E) |
---|
| 76 | + | func D (u) = (u + "_status") |
---|
77 | 77 | | |
---|
78 | 78 | | |
---|
79 | | - | func F (z,u) = (((u + "_") + z) + "_cnt") |
---|
| 79 | + | func E (u,F) = ((u + "_res:") + F) |
---|
80 | 80 | | |
---|
81 | 81 | | |
---|
82 | | - | func G (n) = (n + "_balance") |
---|
| 82 | + | func G (A,u) = (((u + "_") + A) + "_cnt") |
---|
83 | 83 | | |
---|
84 | 84 | | |
---|
85 | | - | func H (n) = { |
---|
86 | | - | let I = G(n) |
---|
87 | | - | let j = getInteger(this, I) |
---|
| 85 | + | func H (n) = (n + "_balance") |
---|
| 86 | + | |
---|
| 87 | + | |
---|
| 88 | + | func I (n) = { |
---|
| 89 | + | let J = H(n) |
---|
| 90 | + | let j = getInteger(this, J) |
---|
88 | 91 | | if ($isInstanceOf(j, "Int")) |
---|
89 | 92 | | then { |
---|
90 | 93 | | let k = j |
---|
|
94 | 97 | | } |
---|
95 | 98 | | |
---|
96 | 99 | | |
---|
97 | | - | func J (z,u) = { |
---|
98 | | - | let K = F(z, u) |
---|
99 | | - | let j = getInteger(this, K) |
---|
| 100 | + | func K (A,u) = { |
---|
| 101 | + | let L = G(A, u) |
---|
| 102 | + | let j = getInteger(this, L) |
---|
100 | 103 | | if ($isInstanceOf(j, "Int")) |
---|
101 | 104 | | then { |
---|
102 | 105 | | let k = j |
---|
|
106 | 109 | | } |
---|
107 | 110 | | |
---|
108 | 111 | | |
---|
109 | | - | func L (u) = { |
---|
110 | | - | let M = w(u) |
---|
111 | | - | getIntegerValue(this, M) |
---|
| 112 | + | func M (u) = { |
---|
| 113 | + | let N = w(u) |
---|
| 114 | + | getIntegerValue(this, N) |
---|
112 | 115 | | } |
---|
113 | 116 | | |
---|
114 | 117 | | |
---|
115 | | - | func N (n) = h(t(n)) |
---|
| 118 | + | func O (u) = h(t(u)) |
---|
116 | 119 | | |
---|
117 | 120 | | |
---|
118 | | - | func O (u,z) = h(y(u, z)) |
---|
| 121 | + | func P (u) = l(y(u)) |
---|
119 | 122 | | |
---|
120 | 123 | | |
---|
121 | | - | func P (u) = l(A(u)) |
---|
| 124 | + | func Q (u,A) = h(z(u, A)) |
---|
122 | 125 | | |
---|
123 | 126 | | |
---|
124 | | - | func Q (u,z) = h(B(u, z)) |
---|
| 127 | + | func R (u) = l(B(u)) |
---|
125 | 128 | | |
---|
126 | 129 | | |
---|
127 | | - | func R (u) = h(C(u)) |
---|
| 130 | + | func S (u,A) = h(C(u, A)) |
---|
128 | 131 | | |
---|
129 | 132 | | |
---|
130 | | - | func S (u,E) = l(D(u, E)) |
---|
| 133 | + | func T (u) = h(D(u)) |
---|
131 | 134 | | |
---|
132 | 135 | | |
---|
133 | | - | @Callable(T) |
---|
134 | | - | func registerSupplier (U) = { |
---|
135 | | - | let q = toBase58String(T.caller.bytes) |
---|
| 136 | + | func U (u,F) = l(E(u, F)) |
---|
| 137 | + | |
---|
| 138 | + | |
---|
| 139 | + | @Callable(V) |
---|
| 140 | + | func registerSupplier (W) = { |
---|
| 141 | + | let q = toBase58String(V.caller.bytes) |
---|
136 | 142 | | let n = o(q) |
---|
137 | 143 | | if ((n != a)) |
---|
138 | 144 | | then throw("This address has already registred as supplier") |
---|
139 | | - | else [StringEntry(m(q), U)] |
---|
| 145 | + | else [StringEntry(m(q), W)] |
---|
140 | 146 | | } |
---|
141 | 147 | | |
---|
142 | 148 | | |
---|
143 | 149 | | |
---|
144 | | - | @Callable(T) |
---|
145 | | - | func addItem (r,V,U) = { |
---|
146 | | - | let q = toBase58String(T.caller.bytes) |
---|
| 150 | + | @Callable(V) |
---|
| 151 | + | func addItem (r,X,W,Y) = { |
---|
| 152 | + | let q = toBase58String(V.caller.bytes) |
---|
147 | 153 | | let n = o(q) |
---|
148 | 154 | | let u = p(q, r) |
---|
149 | 155 | | if ((n == a)) |
---|
150 | 156 | | then throw("You should register as supplier to add an item") |
---|
151 | | - | else if ((0 >= V)) |
---|
| 157 | + | else if ((0 >= X)) |
---|
152 | 158 | | then throw("Purchase amount cannot be less than item price") |
---|
153 | | - | else if ((N(u) != a)) |
---|
| 159 | + | else if ((O(u) != a)) |
---|
154 | 160 | | then throw("An item already exists") |
---|
155 | | - | else [StringEntry(t(u), q), StringEntry(v(u), r), IntegerEntry(w(u), V), StringEntry(x(u), U)] |
---|
| 161 | + | else [StringEntry(t(u), q), StringEntry(v(u), r), IntegerEntry(w(u), X), StringEntry(x(u), W), IntegerEntry(y(u), Y)] |
---|
156 | 162 | | } |
---|
157 | 163 | | |
---|
158 | 164 | | |
---|
159 | 165 | | |
---|
160 | | - | @Callable(T) |
---|
161 | | - | func updateItem (u,r,V,U) = { |
---|
162 | | - | let q = toBase58String(T.caller.bytes) |
---|
| 166 | + | @Callable(V) |
---|
| 167 | + | func updateItem (u,r,X,W,Y) = { |
---|
| 168 | + | let q = toBase58String(V.caller.bytes) |
---|
163 | 169 | | let n = o(q) |
---|
164 | | - | let W = N(u) |
---|
| 170 | + | let Z = O(u) |
---|
165 | 171 | | if ((n == a)) |
---|
166 | 172 | | then throw("You should register as supplier to remove an item") |
---|
167 | 173 | | else if (if ((u == a)) |
---|
168 | 174 | | then true |
---|
169 | | - | else (q != W)) |
---|
| 175 | + | else (q != Z)) |
---|
170 | 176 | | then throw(("You don't owned item " + u)) |
---|
171 | | - | else [StringEntry(v(u), r), IntegerEntry(w(u), V), StringEntry(x(u), U)] |
---|
| 177 | + | else [StringEntry(v(u), r), IntegerEntry(w(u), X), StringEntry(x(u), W), IntegerEntry(y(u), Y)] |
---|
172 | 178 | | } |
---|
173 | 179 | | |
---|
174 | 180 | | |
---|
175 | 181 | | |
---|
176 | | - | @Callable(T) |
---|
| 182 | + | @Callable(V) |
---|
177 | 183 | | func removeItem (u) = { |
---|
178 | | - | let q = toBase58String(T.caller.bytes) |
---|
| 184 | + | let q = toBase58String(V.caller.bytes) |
---|
179 | 185 | | let n = o(q) |
---|
180 | | - | let W = N(u) |
---|
| 186 | + | let Z = O(u) |
---|
181 | 187 | | if ((n == a)) |
---|
182 | 188 | | then throw("You should register as supplier to remove an item") |
---|
183 | 189 | | else if (if ((u == a)) |
---|
184 | 190 | | then true |
---|
185 | | - | else (q != W)) |
---|
| 191 | + | else (q != Z)) |
---|
186 | 192 | | then throw(("You don't owned item " + u)) |
---|
187 | | - | else [DeleteEntry(t(u)), DeleteEntry(v(u)), DeleteEntry(w(u)), DeleteEntry(x(u))] |
---|
| 193 | + | else [DeleteEntry(t(u)), DeleteEntry(v(u)), DeleteEntry(w(u)), DeleteEntry(x(u)), DeleteEntry(y(u))] |
---|
188 | 194 | | } |
---|
189 | 195 | | |
---|
190 | 196 | | |
---|
191 | 197 | | |
---|
192 | | - | @Callable(T) |
---|
| 198 | + | @Callable(V) |
---|
193 | 199 | | func purchase (u) = { |
---|
194 | | - | let X = T.payments[0] |
---|
195 | | - | if (isDefined(X.assetId)) |
---|
| 200 | + | let aa = V.payments[0] |
---|
| 201 | + | if (isDefined(aa.assetId)) |
---|
196 | 202 | | then throw("You can buy tokens only with Waves tokens") |
---|
197 | 203 | | else { |
---|
198 | | - | let Y = toBase58String(T.caller.bytes) |
---|
199 | | - | let V = L(u) |
---|
200 | | - | let q = N(u) |
---|
201 | | - | if ((V > X.amount)) |
---|
| 204 | + | let ab = toBase58String(V.caller.bytes) |
---|
| 205 | + | let X = M(u) |
---|
| 206 | + | let q = O(u) |
---|
| 207 | + | if ((X > aa.amount)) |
---|
202 | 208 | | then throw("Purchase amount cannot be less than item price") |
---|
203 | | - | else if ((X.amount > V)) |
---|
| 209 | + | else if ((aa.amount > X)) |
---|
204 | 210 | | then throw("Purchase amount cannot be higher than item price") |
---|
205 | 211 | | else if ((q == a)) |
---|
206 | 212 | | then throw("Supplier does not exists") |
---|
207 | 213 | | else { |
---|
208 | | - | let Z = F(Y, u) |
---|
209 | | - | let aa = (J(Y, u) + 1) |
---|
210 | | - | let I = G(q) |
---|
211 | | - | let ab = (H(q) + X.amount) |
---|
212 | | - | [IntegerEntry(Z, aa), IntegerEntry(I, ab)] |
---|
| 214 | + | let ac = G(ab, u) |
---|
| 215 | + | let ad = (K(ab, u) + 1) |
---|
| 216 | + | let J = H(q) |
---|
| 217 | + | let ae = (I(q) + aa.amount) |
---|
| 218 | + | [IntegerEntry(ac, ad), IntegerEntry(J, ae)] |
---|
213 | 219 | | } |
---|
214 | 220 | | } |
---|
215 | 221 | | } |
---|
216 | 222 | | |
---|
217 | 223 | | |
---|
218 | 224 | | |
---|
219 | | - | @Callable(T) |
---|
220 | | - | func voteCommit (u,ac) = { |
---|
221 | | - | let z = toBase58String(T.caller.bytes) |
---|
222 | | - | let ad = P(u) |
---|
223 | | - | let ae = R(u) |
---|
224 | | - | if ((ad >= b)) |
---|
| 225 | + | @Callable(V) |
---|
| 226 | + | func voteCommit (u,af) = { |
---|
| 227 | + | let A = toBase58String(V.caller.bytes) |
---|
| 228 | + | let ag = R(u) |
---|
| 229 | + | let ah = T(u) |
---|
| 230 | + | if ((ag >= b)) |
---|
225 | 231 | | then throw("Reached max number of voters") |
---|
226 | | - | else if ((O(u, z) != a)) |
---|
| 232 | + | else if ((Q(u, A) != a)) |
---|
227 | 233 | | then throw("You voted already") |
---|
228 | 234 | | else if ((t(u) == a)) |
---|
229 | 235 | | then throw("Item does not exists") |
---|
230 | | - | else if (if ((ae != a)) |
---|
231 | | - | then (ae != f) |
---|
| 236 | + | else if (if ((ah != a)) |
---|
| 237 | + | then (ah != f) |
---|
232 | 238 | | else false) |
---|
233 | 239 | | then throw("Voting is not active for this item now") |
---|
234 | 240 | | else { |
---|
235 | | - | let af = if ((ad == b)) |
---|
| 241 | + | let ai = if ((ag == b)) |
---|
236 | 242 | | then g |
---|
237 | 243 | | else f |
---|
238 | | - | [StringEntry(y(u, z), ac), IntegerEntry(A(u), (ad + 1)), StringEntry(C(u), af)] |
---|
| 244 | + | [StringEntry(z(u, A), af), IntegerEntry(B(u), (ag + 1)), StringEntry(D(u), ai)] |
---|
239 | 245 | | } |
---|
240 | 246 | | } |
---|
241 | 247 | | |
---|
242 | 248 | | |
---|
243 | 249 | | |
---|
244 | | - | @Callable(T) |
---|
245 | | - | func voteReveal (u,E,ag) = { |
---|
246 | | - | let z = toBase58String(T.caller.bytes) |
---|
247 | | - | let ae = R(u) |
---|
248 | | - | let ah = (S(u, E) + 1) |
---|
249 | | - | let ai = toBase58String(sha256(toBytes(((u + E) + ag)))) |
---|
250 | | - | if ((ai != O(u, z))) |
---|
| 250 | + | @Callable(V) |
---|
| 251 | + | func voteReveal (u,F,aj) = { |
---|
| 252 | + | let A = toBase58String(V.caller.bytes) |
---|
| 253 | + | let ah = T(u) |
---|
| 254 | + | let ak = (U(u, F) + 1) |
---|
| 255 | + | let al = toBase58String(sha256(toBytes(((u + F) + aj)))) |
---|
| 256 | + | if ((al != Q(u, A))) |
---|
251 | 257 | | then throw("Reveal data is not valid") |
---|
252 | | - | else if ((b > P(u))) |
---|
| 258 | + | else if ((b > R(u))) |
---|
253 | 259 | | then throw("Max number of voters not reached") |
---|
254 | | - | else if ((Q(u, z) != a)) |
---|
| 260 | + | else if ((S(u, A) != a)) |
---|
255 | 261 | | then throw("You voted already") |
---|
256 | | - | else if (if ((ae != f)) |
---|
257 | | - | then (ae != g) |
---|
| 262 | + | else if (if ((ah != f)) |
---|
| 263 | + | then (ah != g) |
---|
258 | 264 | | else false) |
---|
259 | 265 | | then throw("Voting is not active for this item now") |
---|
260 | | - | else if (if ((E != d)) |
---|
261 | | - | then (E != e) |
---|
| 266 | + | else if (if ((F != d)) |
---|
| 267 | + | then (F != e) |
---|
262 | 268 | | else false) |
---|
263 | 269 | | then throw("Provided voting option is incorrect") |
---|
264 | 270 | | else { |
---|
265 | | - | let af = if ((ah >= c)) |
---|
266 | | - | then E |
---|
| 271 | + | let ai = if ((ak >= c)) |
---|
| 272 | + | then F |
---|
267 | 273 | | else g |
---|
268 | | - | [StringEntry(B(u, z), E), IntegerEntry(D(u, z), ah), StringEntry(C(u), af)] |
---|
| 274 | + | [StringEntry(C(u, A), F), IntegerEntry(E(u, A), ak), StringEntry(D(u), ai)] |
---|
269 | 275 | | } |
---|
270 | 276 | | } |
---|
271 | 277 | | |
---|
272 | 278 | | |
---|
273 | | - | @Verifier(aj) |
---|
274 | | - | func ak () = { |
---|
275 | | - | let j = aj |
---|
| 279 | + | @Verifier(am) |
---|
| 280 | + | func an () = { |
---|
| 281 | + | let j = am |
---|
276 | 282 | | if ($isInstanceOf(j, "SetScriptTransaction")) |
---|
277 | 283 | | then { |
---|
278 | | - | let al = j |
---|
279 | | - | sigVerify(aj.bodyBytes, aj.proofs[0], aj.senderPublicKey) |
---|
| 284 | + | let ao = j |
---|
| 285 | + | sigVerify(am.bodyBytes, am.proofs[0], am.senderPublicKey) |
---|
280 | 286 | | } |
---|
281 | 287 | | else false |
---|
282 | 288 | | } |
---|
Full:
Old | New | | Differences |
---|
1 | 1 | | {-# STDLIB_VERSION 4 #-} |
---|
2 | 2 | | {-# SCRIPT_TYPE ACCOUNT #-} |
---|
3 | 3 | | {-# CONTENT_TYPE DAPP #-} |
---|
4 | 4 | | let a = "NONE" |
---|
5 | 5 | | |
---|
6 | 6 | | let b = 3 |
---|
7 | 7 | | |
---|
8 | 8 | | let c = 2 |
---|
9 | 9 | | |
---|
10 | 10 | | let d = "featured" |
---|
11 | 11 | | |
---|
12 | 12 | | let e = "delisted" |
---|
13 | 13 | | |
---|
14 | 14 | | let f = "voting" |
---|
15 | 15 | | |
---|
16 | 16 | | let g = "reveal" |
---|
17 | 17 | | |
---|
18 | 18 | | func h (i) = { |
---|
19 | 19 | | let j = getString(this, i) |
---|
20 | 20 | | if ($isInstanceOf(j, "String")) |
---|
21 | 21 | | then { |
---|
22 | 22 | | let k = j |
---|
23 | 23 | | k |
---|
24 | 24 | | } |
---|
25 | 25 | | else a |
---|
26 | 26 | | } |
---|
27 | 27 | | |
---|
28 | 28 | | |
---|
29 | 29 | | func l (i) = { |
---|
30 | 30 | | let j = getInteger(this, i) |
---|
31 | 31 | | if ($isInstanceOf(j, "Int")) |
---|
32 | 32 | | then { |
---|
33 | 33 | | let k = j |
---|
34 | 34 | | k |
---|
35 | 35 | | } |
---|
36 | 36 | | else 0 |
---|
37 | 37 | | } |
---|
38 | 38 | | |
---|
39 | 39 | | |
---|
40 | 40 | | func m (n) = (n + "_account") |
---|
41 | 41 | | |
---|
42 | 42 | | |
---|
43 | 43 | | func o (n) = h(m(n)) |
---|
44 | 44 | | |
---|
45 | 45 | | |
---|
46 | 46 | | func p (q,r) = { |
---|
47 | 47 | | let s = (q + r) |
---|
48 | 48 | | ("item_" + toBase58String(sha256(toBytes(s)))) |
---|
49 | 49 | | } |
---|
50 | 50 | | |
---|
51 | 51 | | |
---|
52 | 52 | | func t (u) = (u + "_owner") |
---|
53 | 53 | | |
---|
54 | 54 | | |
---|
55 | 55 | | func v (u) = (u + "_title") |
---|
56 | 56 | | |
---|
57 | 57 | | |
---|
58 | 58 | | func w (u) = (u + "_price") |
---|
59 | 59 | | |
---|
60 | 60 | | |
---|
61 | 61 | | func x (u) = (u + "_data") |
---|
62 | 62 | | |
---|
63 | 63 | | |
---|
64 | | - | func y (u,z) = (((u + "_") + z) + "_commit") |
---|
| 64 | + | func y (u) = (u + "_expiredate") |
---|
65 | 65 | | |
---|
66 | 66 | | |
---|
67 | | - | func A (u) = (u + "_cmtcnt") |
---|
| 67 | + | func z (u,A) = (((u + "_") + A) + "_commit") |
---|
68 | 68 | | |
---|
69 | 69 | | |
---|
70 | | - | func B (u,z) = (((u + "_") + z) + "_reveal") |
---|
| 70 | + | func B (u) = (u + "_cmtcnt") |
---|
71 | 71 | | |
---|
72 | 72 | | |
---|
73 | | - | func C (u) = (u + "_status") |
---|
| 73 | + | func C (u,A) = (((u + "_") + A) + "_reveal") |
---|
74 | 74 | | |
---|
75 | 75 | | |
---|
76 | | - | func D (u,E) = ((u + "_res:") + E) |
---|
| 76 | + | func D (u) = (u + "_status") |
---|
77 | 77 | | |
---|
78 | 78 | | |
---|
79 | | - | func F (z,u) = (((u + "_") + z) + "_cnt") |
---|
| 79 | + | func E (u,F) = ((u + "_res:") + F) |
---|
80 | 80 | | |
---|
81 | 81 | | |
---|
82 | | - | func G (n) = (n + "_balance") |
---|
| 82 | + | func G (A,u) = (((u + "_") + A) + "_cnt") |
---|
83 | 83 | | |
---|
84 | 84 | | |
---|
85 | | - | func H (n) = { |
---|
86 | | - | let I = G(n) |
---|
87 | | - | let j = getInteger(this, I) |
---|
| 85 | + | func H (n) = (n + "_balance") |
---|
| 86 | + | |
---|
| 87 | + | |
---|
| 88 | + | func I (n) = { |
---|
| 89 | + | let J = H(n) |
---|
| 90 | + | let j = getInteger(this, J) |
---|
88 | 91 | | if ($isInstanceOf(j, "Int")) |
---|
89 | 92 | | then { |
---|
90 | 93 | | let k = j |
---|
91 | 94 | | k |
---|
92 | 95 | | } |
---|
93 | 96 | | else 0 |
---|
94 | 97 | | } |
---|
95 | 98 | | |
---|
96 | 99 | | |
---|
97 | | - | func J (z,u) = { |
---|
98 | | - | let K = F(z, u) |
---|
99 | | - | let j = getInteger(this, K) |
---|
| 100 | + | func K (A,u) = { |
---|
| 101 | + | let L = G(A, u) |
---|
| 102 | + | let j = getInteger(this, L) |
---|
100 | 103 | | if ($isInstanceOf(j, "Int")) |
---|
101 | 104 | | then { |
---|
102 | 105 | | let k = j |
---|
103 | 106 | | k |
---|
104 | 107 | | } |
---|
105 | 108 | | else 0 |
---|
106 | 109 | | } |
---|
107 | 110 | | |
---|
108 | 111 | | |
---|
109 | | - | func L (u) = { |
---|
110 | | - | let M = w(u) |
---|
111 | | - | getIntegerValue(this, M) |
---|
| 112 | + | func M (u) = { |
---|
| 113 | + | let N = w(u) |
---|
| 114 | + | getIntegerValue(this, N) |
---|
112 | 115 | | } |
---|
113 | 116 | | |
---|
114 | 117 | | |
---|
115 | | - | func N (n) = h(t(n)) |
---|
| 118 | + | func O (u) = h(t(u)) |
---|
116 | 119 | | |
---|
117 | 120 | | |
---|
118 | | - | func O (u,z) = h(y(u, z)) |
---|
| 121 | + | func P (u) = l(y(u)) |
---|
119 | 122 | | |
---|
120 | 123 | | |
---|
121 | | - | func P (u) = l(A(u)) |
---|
| 124 | + | func Q (u,A) = h(z(u, A)) |
---|
122 | 125 | | |
---|
123 | 126 | | |
---|
124 | | - | func Q (u,z) = h(B(u, z)) |
---|
| 127 | + | func R (u) = l(B(u)) |
---|
125 | 128 | | |
---|
126 | 129 | | |
---|
127 | | - | func R (u) = h(C(u)) |
---|
| 130 | + | func S (u,A) = h(C(u, A)) |
---|
128 | 131 | | |
---|
129 | 132 | | |
---|
130 | | - | func S (u,E) = l(D(u, E)) |
---|
| 133 | + | func T (u) = h(D(u)) |
---|
131 | 134 | | |
---|
132 | 135 | | |
---|
133 | | - | @Callable(T) |
---|
134 | | - | func registerSupplier (U) = { |
---|
135 | | - | let q = toBase58String(T.caller.bytes) |
---|
| 136 | + | func U (u,F) = l(E(u, F)) |
---|
| 137 | + | |
---|
| 138 | + | |
---|
| 139 | + | @Callable(V) |
---|
| 140 | + | func registerSupplier (W) = { |
---|
| 141 | + | let q = toBase58String(V.caller.bytes) |
---|
136 | 142 | | let n = o(q) |
---|
137 | 143 | | if ((n != a)) |
---|
138 | 144 | | then throw("This address has already registred as supplier") |
---|
139 | | - | else [StringEntry(m(q), U)] |
---|
| 145 | + | else [StringEntry(m(q), W)] |
---|
140 | 146 | | } |
---|
141 | 147 | | |
---|
142 | 148 | | |
---|
143 | 149 | | |
---|
144 | | - | @Callable(T) |
---|
145 | | - | func addItem (r,V,U) = { |
---|
146 | | - | let q = toBase58String(T.caller.bytes) |
---|
| 150 | + | @Callable(V) |
---|
| 151 | + | func addItem (r,X,W,Y) = { |
---|
| 152 | + | let q = toBase58String(V.caller.bytes) |
---|
147 | 153 | | let n = o(q) |
---|
148 | 154 | | let u = p(q, r) |
---|
149 | 155 | | if ((n == a)) |
---|
150 | 156 | | then throw("You should register as supplier to add an item") |
---|
151 | | - | else if ((0 >= V)) |
---|
| 157 | + | else if ((0 >= X)) |
---|
152 | 158 | | then throw("Purchase amount cannot be less than item price") |
---|
153 | | - | else if ((N(u) != a)) |
---|
| 159 | + | else if ((O(u) != a)) |
---|
154 | 160 | | then throw("An item already exists") |
---|
155 | | - | else [StringEntry(t(u), q), StringEntry(v(u), r), IntegerEntry(w(u), V), StringEntry(x(u), U)] |
---|
| 161 | + | else [StringEntry(t(u), q), StringEntry(v(u), r), IntegerEntry(w(u), X), StringEntry(x(u), W), IntegerEntry(y(u), Y)] |
---|
156 | 162 | | } |
---|
157 | 163 | | |
---|
158 | 164 | | |
---|
159 | 165 | | |
---|
160 | | - | @Callable(T) |
---|
161 | | - | func updateItem (u,r,V,U) = { |
---|
162 | | - | let q = toBase58String(T.caller.bytes) |
---|
| 166 | + | @Callable(V) |
---|
| 167 | + | func updateItem (u,r,X,W,Y) = { |
---|
| 168 | + | let q = toBase58String(V.caller.bytes) |
---|
163 | 169 | | let n = o(q) |
---|
164 | | - | let W = N(u) |
---|
| 170 | + | let Z = O(u) |
---|
165 | 171 | | if ((n == a)) |
---|
166 | 172 | | then throw("You should register as supplier to remove an item") |
---|
167 | 173 | | else if (if ((u == a)) |
---|
168 | 174 | | then true |
---|
169 | | - | else (q != W)) |
---|
| 175 | + | else (q != Z)) |
---|
170 | 176 | | then throw(("You don't owned item " + u)) |
---|
171 | | - | else [StringEntry(v(u), r), IntegerEntry(w(u), V), StringEntry(x(u), U)] |
---|
| 177 | + | else [StringEntry(v(u), r), IntegerEntry(w(u), X), StringEntry(x(u), W), IntegerEntry(y(u), Y)] |
---|
172 | 178 | | } |
---|
173 | 179 | | |
---|
174 | 180 | | |
---|
175 | 181 | | |
---|
176 | | - | @Callable(T) |
---|
| 182 | + | @Callable(V) |
---|
177 | 183 | | func removeItem (u) = { |
---|
178 | | - | let q = toBase58String(T.caller.bytes) |
---|
| 184 | + | let q = toBase58String(V.caller.bytes) |
---|
179 | 185 | | let n = o(q) |
---|
180 | | - | let W = N(u) |
---|
| 186 | + | let Z = O(u) |
---|
181 | 187 | | if ((n == a)) |
---|
182 | 188 | | then throw("You should register as supplier to remove an item") |
---|
183 | 189 | | else if (if ((u == a)) |
---|
184 | 190 | | then true |
---|
185 | | - | else (q != W)) |
---|
| 191 | + | else (q != Z)) |
---|
186 | 192 | | then throw(("You don't owned item " + u)) |
---|
187 | | - | else [DeleteEntry(t(u)), DeleteEntry(v(u)), DeleteEntry(w(u)), DeleteEntry(x(u))] |
---|
| 193 | + | else [DeleteEntry(t(u)), DeleteEntry(v(u)), DeleteEntry(w(u)), DeleteEntry(x(u)), DeleteEntry(y(u))] |
---|
188 | 194 | | } |
---|
189 | 195 | | |
---|
190 | 196 | | |
---|
191 | 197 | | |
---|
192 | | - | @Callable(T) |
---|
| 198 | + | @Callable(V) |
---|
193 | 199 | | func purchase (u) = { |
---|
194 | | - | let X = T.payments[0] |
---|
195 | | - | if (isDefined(X.assetId)) |
---|
| 200 | + | let aa = V.payments[0] |
---|
| 201 | + | if (isDefined(aa.assetId)) |
---|
196 | 202 | | then throw("You can buy tokens only with Waves tokens") |
---|
197 | 203 | | else { |
---|
198 | | - | let Y = toBase58String(T.caller.bytes) |
---|
199 | | - | let V = L(u) |
---|
200 | | - | let q = N(u) |
---|
201 | | - | if ((V > X.amount)) |
---|
| 204 | + | let ab = toBase58String(V.caller.bytes) |
---|
| 205 | + | let X = M(u) |
---|
| 206 | + | let q = O(u) |
---|
| 207 | + | if ((X > aa.amount)) |
---|
202 | 208 | | then throw("Purchase amount cannot be less than item price") |
---|
203 | | - | else if ((X.amount > V)) |
---|
| 209 | + | else if ((aa.amount > X)) |
---|
204 | 210 | | then throw("Purchase amount cannot be higher than item price") |
---|
205 | 211 | | else if ((q == a)) |
---|
206 | 212 | | then throw("Supplier does not exists") |
---|
207 | 213 | | else { |
---|
208 | | - | let Z = F(Y, u) |
---|
209 | | - | let aa = (J(Y, u) + 1) |
---|
210 | | - | let I = G(q) |
---|
211 | | - | let ab = (H(q) + X.amount) |
---|
212 | | - | [IntegerEntry(Z, aa), IntegerEntry(I, ab)] |
---|
| 214 | + | let ac = G(ab, u) |
---|
| 215 | + | let ad = (K(ab, u) + 1) |
---|
| 216 | + | let J = H(q) |
---|
| 217 | + | let ae = (I(q) + aa.amount) |
---|
| 218 | + | [IntegerEntry(ac, ad), IntegerEntry(J, ae)] |
---|
213 | 219 | | } |
---|
214 | 220 | | } |
---|
215 | 221 | | } |
---|
216 | 222 | | |
---|
217 | 223 | | |
---|
218 | 224 | | |
---|
219 | | - | @Callable(T) |
---|
220 | | - | func voteCommit (u,ac) = { |
---|
221 | | - | let z = toBase58String(T.caller.bytes) |
---|
222 | | - | let ad = P(u) |
---|
223 | | - | let ae = R(u) |
---|
224 | | - | if ((ad >= b)) |
---|
| 225 | + | @Callable(V) |
---|
| 226 | + | func voteCommit (u,af) = { |
---|
| 227 | + | let A = toBase58String(V.caller.bytes) |
---|
| 228 | + | let ag = R(u) |
---|
| 229 | + | let ah = T(u) |
---|
| 230 | + | if ((ag >= b)) |
---|
225 | 231 | | then throw("Reached max number of voters") |
---|
226 | | - | else if ((O(u, z) != a)) |
---|
| 232 | + | else if ((Q(u, A) != a)) |
---|
227 | 233 | | then throw("You voted already") |
---|
228 | 234 | | else if ((t(u) == a)) |
---|
229 | 235 | | then throw("Item does not exists") |
---|
230 | | - | else if (if ((ae != a)) |
---|
231 | | - | then (ae != f) |
---|
| 236 | + | else if (if ((ah != a)) |
---|
| 237 | + | then (ah != f) |
---|
232 | 238 | | else false) |
---|
233 | 239 | | then throw("Voting is not active for this item now") |
---|
234 | 240 | | else { |
---|
235 | | - | let af = if ((ad == b)) |
---|
| 241 | + | let ai = if ((ag == b)) |
---|
236 | 242 | | then g |
---|
237 | 243 | | else f |
---|
238 | | - | [StringEntry(y(u, z), ac), IntegerEntry(A(u), (ad + 1)), StringEntry(C(u), af)] |
---|
| 244 | + | [StringEntry(z(u, A), af), IntegerEntry(B(u), (ag + 1)), StringEntry(D(u), ai)] |
---|
239 | 245 | | } |
---|
240 | 246 | | } |
---|
241 | 247 | | |
---|
242 | 248 | | |
---|
243 | 249 | | |
---|
244 | | - | @Callable(T) |
---|
245 | | - | func voteReveal (u,E,ag) = { |
---|
246 | | - | let z = toBase58String(T.caller.bytes) |
---|
247 | | - | let ae = R(u) |
---|
248 | | - | let ah = (S(u, E) + 1) |
---|
249 | | - | let ai = toBase58String(sha256(toBytes(((u + E) + ag)))) |
---|
250 | | - | if ((ai != O(u, z))) |
---|
| 250 | + | @Callable(V) |
---|
| 251 | + | func voteReveal (u,F,aj) = { |
---|
| 252 | + | let A = toBase58String(V.caller.bytes) |
---|
| 253 | + | let ah = T(u) |
---|
| 254 | + | let ak = (U(u, F) + 1) |
---|
| 255 | + | let al = toBase58String(sha256(toBytes(((u + F) + aj)))) |
---|
| 256 | + | if ((al != Q(u, A))) |
---|
251 | 257 | | then throw("Reveal data is not valid") |
---|
252 | | - | else if ((b > P(u))) |
---|
| 258 | + | else if ((b > R(u))) |
---|
253 | 259 | | then throw("Max number of voters not reached") |
---|
254 | | - | else if ((Q(u, z) != a)) |
---|
| 260 | + | else if ((S(u, A) != a)) |
---|
255 | 261 | | then throw("You voted already") |
---|
256 | | - | else if (if ((ae != f)) |
---|
257 | | - | then (ae != g) |
---|
| 262 | + | else if (if ((ah != f)) |
---|
| 263 | + | then (ah != g) |
---|
258 | 264 | | else false) |
---|
259 | 265 | | then throw("Voting is not active for this item now") |
---|
260 | | - | else if (if ((E != d)) |
---|
261 | | - | then (E != e) |
---|
| 266 | + | else if (if ((F != d)) |
---|
| 267 | + | then (F != e) |
---|
262 | 268 | | else false) |
---|
263 | 269 | | then throw("Provided voting option is incorrect") |
---|
264 | 270 | | else { |
---|
265 | | - | let af = if ((ah >= c)) |
---|
266 | | - | then E |
---|
| 271 | + | let ai = if ((ak >= c)) |
---|
| 272 | + | then F |
---|
267 | 273 | | else g |
---|
268 | | - | [StringEntry(B(u, z), E), IntegerEntry(D(u, z), ah), StringEntry(C(u), af)] |
---|
| 274 | + | [StringEntry(C(u, A), F), IntegerEntry(E(u, A), ak), StringEntry(D(u), ai)] |
---|
269 | 275 | | } |
---|
270 | 276 | | } |
---|
271 | 277 | | |
---|
272 | 278 | | |
---|
273 | | - | @Verifier(aj) |
---|
274 | | - | func ak () = { |
---|
275 | | - | let j = aj |
---|
| 279 | + | @Verifier(am) |
---|
| 280 | + | func an () = { |
---|
| 281 | + | let j = am |
---|
276 | 282 | | if ($isInstanceOf(j, "SetScriptTransaction")) |
---|
277 | 283 | | then { |
---|
278 | | - | let al = j |
---|
279 | | - | sigVerify(aj.bodyBytes, aj.proofs[0], aj.senderPublicKey) |
---|
| 284 | + | let ao = j |
---|
| 285 | + | sigVerify(am.bodyBytes, am.proofs[0], am.senderPublicKey) |
---|
280 | 286 | | } |
---|
281 | 287 | | else false |
---|
282 | 288 | | } |
---|
283 | 289 | | |
---|