tx · HTfawEvDjXoyAAMqobWkMwKdrf1whxkMw35grEAo9vjY 3N3kKNoJohjVQYNLTrYTGTesr3nq3PZNh37: -0.02700000 Waves 2024.07.09 09:27 [3186108] smart account 3N3kKNoJohjVQYNLTrYTGTesr3nq3PZNh37 > SELF 0.00000000 Waves
{ "type": 13, "id": "HTfawEvDjXoyAAMqobWkMwKdrf1whxkMw35grEAo9vjY", "fee": 2700000, "feeAssetId": null, "timestamp": 1720506438362, "version": 1, "sender": "3N3kKNoJohjVQYNLTrYTGTesr3nq3PZNh37", "senderPublicKey": "vmMXxwQAMUAoisvL193ptPiTtaWQqL5YNu2zs1ouTbY", "proofs": [ "4AzSYD5sJMVLFmjYtuGdAXaWPBBN6PSQb54d1pbDPouineyBa7LsGL4ZhBE6xwjsQkUaXqMkZ9jEzFVk1ow1pFeQ" ], "script": "base64:BwJJCAISAwoBCBIECgICGBIECgICGBIECgICGBIECgICGBIECgICGBIECgICGBIECgICGBIECgICGBIECgICGBIECgICGBIECgICGFoACXNlcGFyYXRvcgICX18AB2NoYWluSWQJAMkBAgkAygECCAUEdGhpcwVieXRlcwABAAEACGNoYWluSWRXAQFXABBjb250cmFjdEZpbGVuYW1lAhdmdXR1cmVzX2NhbGN1bGF0b3IucmlkZQAFbXVsdDgAgMLXLwAMbXVsdDE4QmlnSW50CQC2AgEAgICQu7rWrfANAA13YXZlc0RlY2ltYWxzAAgADHVzZHREZWNpbWFscwAGAAt3YXZlc1N0cmluZwIFV0FWRVMADXF1ZXVlSXRlbVNpemUAIAAEYmlnMAkAtgIBAAAACWtNdWx0aXNpZwIMJXNfX211bHRpc2lnAQdrU3RhdHVzAgRkYXBwBHR4SWQJALkJAgkAzAgCAgolc19fc3RhdHVzCQDMCAIFBGRhcHAJAMwIAgUEdHhJZAUDbmlsBQlzZXBhcmF0b3IACWtTaHV0ZG93bgIMJXNfX3NodXRkb3duAAtrUHVibGljS2V5cwIOJXNfX3B1YmxpY0tleXMAEWtNYXRjaGVyUHVibGljS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sBQthY2NEYXRhTGlzdAkAAgECJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgECdHgBBnZlcmlmeQADAwkBCWlzRGVmaW5lZAEFFGZhY3RvcnlBZGRyZXNzT3B0aW9uCQEJaXNEZWZpbmVkAQkAnQgCBQ5mYWN0b3J5QWRkcmVzcwUJa011bHRpc2lnBwQHJG1hdGNoMAkAnQgCBQ5mYWN0b3J5QWRkcmVzcwUJa011bHRpc2lnAwkAAQIFByRtYXRjaDACBlN0cmluZwQIbXVsdGlzaWcFByRtYXRjaDAECXN0YXR1c0tleQkBB2tTdGF0dXMCCQClCAEFBHRoaXMJANgEAQgFAnR4AmlkBAZzdGF0dXMJAQt2YWx1ZU9yRWxzZQIJAJsIAgkBEUBleHRyTmF0aXZlKDEwNjIpAQUIbXVsdGlzaWcFCXN0YXR1c0tleQcFBnN0YXR1cwcJAPQDAwgFAnR4CWJvZHlCeXRlcwkAkQMCCAUCdHgGcHJvb2ZzAAAIBQJ0eA9zZW5kZXJQdWJsaWNLZXndR8TT", "chainId": 84, "height": 3186108, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 9hGMB5qPwWrXz1ZQSnRXpA3W8UZ6LRCeEdiqRwEHuEtd Next: 4nXj1QNCDqkbazwVwiK3g7BYJAx814Jmx574L4dBXxa9 Diff:
Old | New | Differences | |
---|---|---|---|
80 | 80 | } | |
81 | 81 | ||
82 | 82 | ||
83 | - | func M (N) = pow(10, 0, N, 0, 0, DOWN) | |
83 | + | func M (J,z) = { | |
84 | + | let L = J | |
85 | + | if ($isInstanceOf(L, "Unit")) | |
86 | + | then wavesBalance(z).available | |
87 | + | else if ($isInstanceOf(L, "ByteVector")) | |
88 | + | then { | |
89 | + | let J = L | |
90 | + | assetBalance(z, J) | |
91 | + | } | |
92 | + | else throw("Match error") | |
93 | + | } | |
84 | 94 | ||
85 | 95 | ||
86 | - | func | |
96 | + | func N (O) = pow(10, 0, O, 0, 0, DOWN) | |
87 | 97 | ||
88 | 98 | ||
89 | - | ||
99 | + | func P (J) = N(K(J)) | |
90 | 100 | ||
91 | - | let Q = { | |
92 | - | let L = getString(this, P) | |
101 | + | ||
102 | + | let Q = "%s__factoryAddress" | |
103 | + | ||
104 | + | let R = { | |
105 | + | let L = getString(this, Q) | |
93 | 106 | if ($isInstanceOf(L, "String")) | |
94 | 107 | then { | |
95 | 108 | let B = L | |
100 | 113 | else throw("Match error") | |
101 | 114 | } | |
102 | 115 | ||
103 | - | let | |
116 | + | let S = valueOrErrorMessage(R, A("invalid factory address")) | |
104 | 117 | ||
105 | - | let | |
118 | + | let T = "%s__usdtAssetId" | |
106 | 119 | ||
107 | - | let | |
108 | - | let L = getString( | |
120 | + | let U = { | |
121 | + | let L = getString(S, T) | |
109 | 122 | if ($isInstanceOf(L, "String")) | |
110 | 123 | then { | |
111 | 124 | let B = L | |
116 | 129 | else throw("Match error") | |
117 | 130 | } | |
118 | 131 | ||
119 | - | let | |
132 | + | let V = valueOrErrorMessage(U, A("invalid usdt asset id")) | |
120 | 133 | ||
121 | - | let | |
134 | + | let W = "%s__calculatorAddress" | |
122 | 135 | ||
123 | - | let | |
136 | + | let X = valueOrElse(getBoolean(S, p), false) | |
124 | 137 | ||
125 | - | func | |
138 | + | func Y (Z,z) = if ((Z == z)) | |
126 | 139 | then true | |
127 | 140 | else C("permission denied") | |
128 | 141 | ||
129 | 142 | ||
130 | - | func | |
143 | + | func aa (Z) = Y(Z, this) | |
131 | 144 | ||
132 | 145 | ||
133 | - | func | |
146 | + | func ab (Z) = Y(Z, S) | |
134 | 147 | ||
135 | 148 | ||
136 | - | func | |
137 | - | let | |
138 | - | let | |
139 | - | if (containsElement( | |
149 | + | func ac (ad) = { | |
150 | + | let ae = addressFromStringValue(getStringValue(S, l)) | |
151 | + | let af = split(getStringValue(ae, q), a) | |
152 | + | if (containsElement(af, toBase58String(ad))) | |
140 | 153 | then true | |
141 | 154 | else C("not allowed") | |
142 | 155 | } | |
143 | 156 | ||
144 | 157 | ||
145 | - | let | |
158 | + | let ag = "%s__accountScript" | |
146 | 159 | ||
147 | - | func | |
160 | + | func ah () = valueOrErrorMessage(getBinary(S, ag), A("account script is not set")) | |
148 | 161 | ||
149 | 162 | ||
150 | - | let | |
163 | + | let ai = "%s__rewardAmount" | |
151 | 164 | ||
152 | - | func | |
165 | + | func aj () = valueOrErrorMessage(getInteger(S, ai), A("reward amount is not set")) | |
153 | 166 | ||
154 | 167 | ||
155 | - | let | |
168 | + | let ak = "%s__accountsLimit" | |
156 | 169 | ||
157 | - | let | |
170 | + | let al = 20 | |
158 | 171 | ||
159 | - | func | |
172 | + | func am () = valueOrElse(getInteger(S, ak), al) | |
160 | 173 | ||
161 | 174 | ||
162 | - | func | |
175 | + | func an (ao) = makeString(["%s%s", "deposited", toString(ao)], a) | |
163 | 176 | ||
164 | 177 | ||
165 | - | func | |
178 | + | func ap (ao) = getInteger(S, an(ao)) | |
166 | 179 | ||
167 | 180 | ||
168 | - | func | |
181 | + | func aq (ao,J) = makeString(["%s%s%s", "credit", toString(ao), H(J)], a) | |
169 | 182 | ||
170 | 183 | ||
171 | - | func | |
184 | + | func ar (ao,J) = getInteger(S, aq(ao, J)) | |
172 | 185 | ||
173 | 186 | ||
174 | - | func | |
187 | + | func as (ao) = makeString(["%s%s", "leverage", toString(ao)], a) | |
175 | 188 | ||
176 | 189 | ||
177 | - | func | |
190 | + | func at (au) = makeString(["%s%s", "requestLeverage", toBase58String(au)], a) | |
178 | 191 | ||
179 | 192 | ||
180 | - | func | |
193 | + | func av (aw) = makeString(["%s%s", "syntheticAssetId", H(aw)], a) | |
181 | 194 | ||
182 | 195 | ||
183 | - | func | |
196 | + | func ax (ay) = makeString(["%s%s", "baseAssetId", H(ay)], a) | |
184 | 197 | ||
185 | 198 | ||
186 | - | let | |
199 | + | let az = 0 | |
187 | 200 | ||
188 | - | let | |
201 | + | let aA = 1 | |
189 | 202 | ||
190 | - | func | |
203 | + | func aB (au) = makeString(["%s%s", toBase58String(au), "status"], a) | |
191 | 204 | ||
192 | 205 | ||
193 | - | func | |
206 | + | func aC (ao) = makeString(["%s%s", toString(ao), "creatorPublicKey"], a) | |
194 | 207 | ||
195 | 208 | ||
196 | - | func | |
209 | + | func aD (au) = makeString(["%s%s", toBase58String(au), "ownerPublicKey"], a) | |
197 | 210 | ||
198 | 211 | ||
199 | - | func | |
212 | + | func aE (au) = makeString(["%s%s", toBase58String(au), "amountAssetId"], a) | |
200 | 213 | ||
201 | 214 | ||
202 | - | func | |
215 | + | func aF (au) = makeString(["%s%s", toBase58String(au), "priceAssetId"], a) | |
203 | 216 | ||
204 | 217 | ||
205 | - | func | |
218 | + | func aG (au) = makeString(["%s%s", toBase58String(au), "requestIdToAccountPublicKey"], a) | |
206 | 219 | ||
207 | 220 | ||
208 | - | func | |
221 | + | func aH (ao) = makeString(["%s%s", toString(ao), "accountAddressToRequestId"], a) | |
209 | 222 | ||
210 | 223 | ||
211 | - | func | |
224 | + | func aI () = makeString(["%s", "requestsQueue"], a) | |
212 | 225 | ||
213 | 226 | ||
214 | - | func | |
227 | + | func aJ () = valueOrElse(getBinary(S, aI()), base58'') | |
215 | 228 | ||
216 | 229 | ||
217 | - | func | |
230 | + | func aK () = makeString(["%s", "accountsQueue"], a) | |
218 | 231 | ||
219 | 232 | ||
220 | - | func | |
233 | + | func aL () = valueOrElse(getBinary(S, aK()), base58'') | |
221 | 234 | ||
222 | 235 | ||
223 | - | func | |
236 | + | func aM (aN) = makeString(["%s%s", "requests", toString(aN)], a) | |
224 | 237 | ||
225 | 238 | ||
226 | - | func | |
239 | + | func aO (aN) = valueOrElse(getBinary(S, aM(aN)), base58'') | |
227 | 240 | ||
228 | 241 | ||
229 | - | func | |
242 | + | func aP (aQ,aR) = makeString(["%s%s%s", H(aQ), H(aR), "pairAllowed"], a) | |
230 | 243 | ||
231 | 244 | ||
232 | - | func | |
245 | + | func aS (aQ,aR) = valueOrElse(getBoolean(S, aP(aQ, aR)), false) | |
233 | 246 | ||
234 | 247 | ||
235 | - | func | |
248 | + | func aT (J) = makeString(["%s", H(J)], a) | |
236 | 249 | ||
237 | 250 | ||
238 | - | func | |
239 | - | let | |
240 | - | let | |
241 | - | let | |
242 | - | | |
251 | + | func aU (J) = { | |
252 | + | let aV = fromBase58String(valueOrErrorMessage(getString(S, r), A("invalid matcher public key"))) | |
253 | + | let aW = addressFromPublicKey(aV) | |
254 | + | let aX = valueOrErrorMessage(getInteger(aW, aT(J)), A(("invalid price, assetId = " + H(J)))) | |
255 | + | aX | |
243 | 256 | } | |
244 | 257 | ||
245 | 258 | ||
246 | - | func | |
259 | + | func aY (aZ,ba,bb) = (fraction(aZ, bb, f) + ba) | |
247 | 260 | ||
248 | 261 | ||
249 | - | func | |
262 | + | func bc (bd,be,bb) = (fraction(bd, bb, f) + be) | |
250 | 263 | ||
251 | 264 | ||
252 | - | func | |
265 | + | func bf (bg,bh) = (bg - bh) | |
253 | 266 | ||
254 | 267 | ||
255 | - | func | |
268 | + | func bi (bj,bk,bh) = (fraction(bj, bk, f) - bh) | |
256 | 269 | ||
257 | 270 | ||
258 | - | func | |
259 | - | then ( | |
271 | + | func bl (bm,bn) = if ((bm > k)) | |
272 | + | then (bm - bn) | |
260 | 273 | else k | |
261 | 274 | ||
262 | 275 | ||
263 | - | func | |
264 | - | then ( | |
276 | + | func bo (bm,bn) = if ((bm > k)) | |
277 | + | then (bn - bm) | |
265 | 278 | else k | |
266 | 279 | ||
267 | 280 | ||
268 | - | func | |
269 | - | then max([k, fraction( | |
281 | + | func bp (bq,br) = if ((br > k)) | |
282 | + | then max([k, fraction(bq, f, br)]) | |
270 | 283 | else k | |
271 | 284 | ||
272 | 285 | ||
273 | - | func | |
274 | - | then max([k, fraction( | |
286 | + | func bs (bq,br) = if ((br > k)) | |
287 | + | then max([k, fraction(br, f, bq)]) | |
275 | 288 | else k | |
276 | 289 | ||
277 | 290 | ||
278 | - | func | |
291 | + | func bt (bu,bv,bb,bw) = fraction((fraction(bu, bb, f) + bv), bw, f) | |
279 | 292 | ||
280 | 293 | ||
281 | - | func | |
294 | + | func bx (by,bw,bz) = fraction(by, bz, bw) | |
282 | 295 | ||
283 | 296 | ||
284 | - | func | |
285 | - | let | |
286 | - | then ((( | |
297 | + | func bA (bj,bB,bu,bv,bC,bD) = { | |
298 | + | let bE = if ((bu > k)) | |
299 | + | then (((bj - bB) / bu) + bC) | |
287 | 300 | else k | |
288 | - | let | |
289 | - | then ( | |
301 | + | let bF = if ((bv > k)) | |
302 | + | then (bD - ((bj - bB) / (bu / bD))) | |
290 | 303 | else k | |
291 | - | ( | |
304 | + | (bE + bF) | |
292 | 305 | } | |
293 | 306 | ||
294 | 307 | ||
295 | - | func | |
296 | - | let | |
297 | - | | |
308 | + | func bG (ao) = { | |
309 | + | let au = fromBase58String(valueOrErrorMessage(getString(S, aH(ao)), A("invalid account address: request id is undefined"))) | |
310 | + | au | |
298 | 311 | } | |
299 | 312 | ||
300 | 313 | ||
301 | - | func | |
302 | - | let | |
303 | - | let | |
304 | - | let | |
305 | - | $Tuple2( | |
314 | + | func bH (ao) = { | |
315 | + | let au = bG(ao) | |
316 | + | let aQ = F(valueOrErrorMessage(getString(S, aE(au)), A("invalid amount asset id"))) | |
317 | + | let aR = F(valueOrErrorMessage(getString(S, aF(au)), A("invalid amount price id"))) | |
318 | + | $Tuple2(aQ, aR) | |
306 | 319 | } | |
307 | 320 | ||
308 | 321 | ||
309 | - | func | |
310 | - | let | |
311 | - | let | |
312 | - | | |
322 | + | func bI (ao) = { | |
323 | + | let au = bG(ao) | |
324 | + | let bJ = valueOrErrorMessage(getBinary(S, aD(au)), A("invalid amount asset id")) | |
325 | + | bJ | |
313 | 326 | } | |
314 | 327 | ||
315 | 328 | ||
316 | - | @Callable(bJ) | |
317 | - | func init (bK) = { | |
318 | - | let bL = Z(bJ.caller) | |
319 | - | if ((bL == bL)) | |
320 | - | then $Tuple2([StringEntry(P, bK)], unit) | |
329 | + | func bK (ao) = { | |
330 | + | let bL = bH(ao) | |
331 | + | let aQ = bL._1 | |
332 | + | let aR = bL._2 | |
333 | + | let bk = valueOrErrorMessage(getInteger(S, as(ao)), A("leverage should be defined")) | |
334 | + | let au = bG(ao) | |
335 | + | let bM = valueOrErrorMessage(getBinary(S, aG(au)), "kRequestIdToAccountPublicKey not found") | |
336 | + | let bN = s(valueOrElse(ap(ao), 0), P(aR)) | |
337 | + | let bb = s(aU(aQ), P(aR)) | |
338 | + | let aZ = s(valueOrElse(getInteger(S, aq(ao, aQ)), 0), P(aQ)) | |
339 | + | let ba = s(valueOrElse(getInteger(S, aq(ao, aR)), 0), P(aR)) | |
340 | + | let bO = valueOrErrorMessage(getInteger(S, aB(au)), ("status not found. RequestId = " + toBase58String(au))) | |
341 | + | $Tuple12(H(aQ), H(aR), toString(ao), toBase58String(bM), bk, toBase58String(au), bN, aZ, ba, M(aQ, ao), M(aR, ao), bO) | |
342 | + | } | |
343 | + | ||
344 | + | ||
345 | + | @Callable(bP) | |
346 | + | func init (bQ) = { | |
347 | + | let bR = aa(bP.caller) | |
348 | + | if ((bR == bR)) | |
349 | + | then $Tuple2([StringEntry(Q, bQ)], unit) | |
321 | 350 | else throw("Strict value is not equal to itself.") | |
322 | 351 | } | |
323 | 352 | ||
324 | 353 | ||
325 | 354 | ||
326 | - | @Callable( | |
327 | - | func requestAccount ( | |
328 | - | let | |
355 | + | @Callable(bP) | |
356 | + | func requestAccount (ad,bS) = { | |
357 | + | let bT = [if (!(X)) | |
329 | 358 | then true | |
330 | - | else C("not allowed"), | |
331 | - | if (( | |
359 | + | else C("not allowed"), ab(bP.caller)] | |
360 | + | if ((bT == bT)) | |
332 | 361 | then { | |
333 | - | let | |
334 | - | let | |
335 | - | let | |
336 | - | let | |
337 | - | let | |
338 | - | let | |
339 | - | let | |
340 | - | let | |
341 | - | let | |
362 | + | let bU = bS[0] | |
363 | + | let bV = bS[1] | |
364 | + | let bk = valueOrErrorMessage(parseInt(bS[2]), A("invalid leverage")) | |
365 | + | let bW = addressFromPublicKey(ad) | |
366 | + | let au = sha256(((bW.bytes + fromBase58String(bU)) + fromBase58String(bV))) | |
367 | + | let aQ = F(bU) | |
368 | + | let aR = F(bV) | |
369 | + | let bX = (size(aM(bW)) / j) | |
370 | + | let bY = [if ((size(bP.payments) == 1)) | |
342 | 371 | then true | |
343 | - | else C("1 payment is required"), if (( | |
372 | + | else C("1 payment is required"), if ((bP.payments[0].assetId == unit)) | |
344 | 373 | then true | |
345 | - | else C("invalid asset"), if (( | |
374 | + | else C("invalid asset"), if ((bP.payments[0].amount == aj())) | |
346 | 375 | then true | |
347 | - | else C("invalid amount"), if ( | |
376 | + | else C("invalid amount"), if (aS(aQ, aR)) | |
348 | 377 | then true | |
349 | - | else C("pair is not allowed"), if ((getInteger( | |
378 | + | else C("pair is not allowed"), if ((getInteger(S, aB(au)) == unit)) | |
350 | 379 | then true | |
351 | - | else C("account is already exists"), if (( | |
380 | + | else C("account is already exists"), if ((am() > bX)) | |
352 | 381 | then true | |
353 | - | else C(("accounts limit is " + toString( | |
354 | - | if (( | |
382 | + | else C(("accounts limit is " + toString(am())))] | |
383 | + | if ((bY == bY)) | |
355 | 384 | then { | |
356 | - | let | |
357 | - | then $Tuple2([ScriptTransfer( | |
385 | + | let bZ = if ((size(aL()) == 0)) | |
386 | + | then $Tuple2([ScriptTransfer(S, aj(), unit)], [invoke(S, "integerEntry", [aB(au), az], nil), invoke(S, "binaryEntry", [aI(), (aJ() + au)], nil), invoke(S, "integerEntry", [at(au), bk], nil)]) | |
358 | 387 | else { | |
359 | - | let | |
360 | - | let | |
361 | - | let | |
362 | - | $Tuple2([ScriptTransfer( | |
388 | + | let bM = take(aL(), j) | |
389 | + | let ao = addressFromPublicKey(bM) | |
390 | + | let ca = addressFromPublicKey(valueOrErrorMessage(getBinary(S, aC(ao)), A("invalid creator public key"))) | |
391 | + | $Tuple2([ScriptTransfer(ca, aj(), unit)], [invoke(S, "binaryEntry", [aK(), drop(aL(), j)], nil), invoke(S, "integerEntry", [aB(au), aA], nil), invoke(S, "binaryEntry", [aG(au), bM], nil), invoke(S, "stringEntry", [aH(ao), toBase58String(au)], nil), invoke(S, "integerEntry", [as(ao), bk], nil)]) | |
363 | 392 | } | |
364 | - | let | |
365 | - | let | |
366 | - | $Tuple2( | |
393 | + | let cb = bZ._1 | |
394 | + | let cc = bZ._2 | |
395 | + | $Tuple2(cb, (cc ++ [invoke(S, "binaryEntry", [aD(au), ad], nil), invoke(S, "binaryEntry", [aM(bW), (aO(bW) + au)], nil), invoke(S, "stringEntry", [aE(au), bU], nil), invoke(S, "stringEntry", [aF(au), bV], nil)])) | |
367 | 396 | } | |
368 | 397 | else throw("Strict value is not equal to itself.") | |
369 | 398 | } | |
372 | 401 | ||
373 | 402 | ||
374 | 403 | ||
375 | - | @Callable( | |
376 | - | func addAccount ( | |
377 | - | let | |
404 | + | @Callable(bP) | |
405 | + | func addAccount (ad,bS) = { | |
406 | + | let bT = [if (!(X)) | |
378 | 407 | then true | |
379 | - | else C("not allowed"), | |
380 | - | if (( | |
408 | + | else C("not allowed"), ab(bP.caller)] | |
409 | + | if ((bT == bT)) | |
381 | 410 | then { | |
382 | - | let | |
383 | - | let | |
384 | - | let | |
385 | - | let | |
386 | - | let | |
411 | + | let cd = fromBase58String(bS[0]) | |
412 | + | let bM = ad | |
413 | + | let ao = addressFromPublicKey(ad) | |
414 | + | let ca = addressFromPublicKey(cd) | |
415 | + | let bY = [if ((getBinary(S, aC(ao)) == unit)) | |
387 | 416 | then true | |
388 | 417 | else C("account is already exists"), if ({ | |
389 | - | let L = scriptHash( | |
418 | + | let L = scriptHash(ao) | |
390 | 419 | if ($isInstanceOf(L, "ByteVector")) | |
391 | 420 | then { | |
392 | - | let | |
393 | - | ( | |
421 | + | let ce = L | |
422 | + | (ce == blake2b256_32Kb(ah())) | |
394 | 423 | } | |
395 | 424 | else false | |
396 | 425 | }) | |
397 | 426 | then true | |
398 | 427 | else C("invalid script")] | |
399 | - | if (( | |
428 | + | if ((bY == bY)) | |
400 | 429 | then { | |
401 | - | let | |
402 | - | then $Tuple2(nil, [invoke( | |
430 | + | let cf = if ((size(aJ()) == 0)) | |
431 | + | then $Tuple2(nil, [invoke(S, "binaryEntry", [aK(), (aL() + bM)], nil)]) | |
403 | 432 | else { | |
404 | - | let | |
405 | - | let | |
406 | - | $Tuple2(nil, [invoke( | |
433 | + | let au = take(aJ(), j) | |
434 | + | let bk = valueOrErrorMessage(getInteger(S, at(au)), A("request's leverage is undefined")) | |
435 | + | $Tuple2(nil, [invoke(S, "integerEntry", [aB(au), aA], nil), invoke(S, "binaryEntry", [aG(au), bM], nil), invoke(S, "binaryEntry", [aI(), drop(aJ(), j)], nil), invoke(S, "stringEntry", [aH(ao), toBase58String(au)], nil), invoke(S, "transferWaves", [ca.bytes, aj()], nil), invoke(S, "integerEntry", [as(ao), bk], nil)]) | |
407 | 436 | } | |
408 | - | let | |
409 | - | let | |
410 | - | $Tuple2( | |
437 | + | let cb = cf._1 | |
438 | + | let cc = cf._2 | |
439 | + | $Tuple2(cb, (cc ++ [invoke(S, "binaryEntry", [aC(ao), cd], nil)])) | |
411 | 440 | } | |
412 | 441 | else throw("Strict value is not equal to itself.") | |
413 | 442 | } | |
416 | 445 | ||
417 | 446 | ||
418 | 447 | ||
419 | - | @Callable( | |
420 | - | func deposit ( | |
421 | - | let | |
422 | - | let | |
423 | - | let | |
448 | + | @Callable(bP) | |
449 | + | func deposit (ad,bS) = { | |
450 | + | let cg = bP.payments[0] | |
451 | + | let ao = valueOrErrorMessage(addressFromString(bS[0]), A("invalid account address")) | |
452 | + | let bT = [if (!(X)) | |
424 | 453 | then true | |
425 | - | else C("not allowed"), | |
454 | + | else C("not allowed"), ab(bP.caller), if ((size(bP.payments) == 1)) | |
426 | 455 | then true | |
427 | - | else C("1 payment is required"), if (( | |
456 | + | else C("1 payment is required"), if ((cg.assetId == V)) | |
428 | 457 | then true | |
429 | - | else C("invalid asset"), if ((getInteger( | |
458 | + | else C("invalid asset"), if ((getInteger(S, aB(bG(ao))) == aA)) | |
430 | 459 | then true | |
431 | 460 | else C("account is not ready")] | |
432 | - | if (( | |
461 | + | if ((bT == bT)) | |
433 | 462 | then { | |
434 | - | let | |
435 | - | let | |
436 | - | $Tuple2( | |
463 | + | let cb = [ScriptTransfer(ao, cg.amount, cg.assetId)] | |
464 | + | let cc = [invoke(S, "integerEntry", [an(ao), (valueOrElse(ap(ao), 0) + cg.amount)], nil)] | |
465 | + | $Tuple2(cb, cc) | |
437 | 466 | } | |
438 | 467 | else throw("Strict value is not equal to itself.") | |
439 | 468 | } | |
440 | 469 | ||
441 | 470 | ||
442 | 471 | ||
443 | - | @Callable( | |
444 | - | func withdraw ( | |
445 | - | let | |
472 | + | @Callable(bP) | |
473 | + | func withdraw (ad,bS) = { | |
474 | + | let bT = [if (!(X)) | |
446 | 475 | then true | |
447 | - | else C("not allowed"), | |
448 | - | if (( | |
476 | + | else C("not allowed"), ab(bP.caller)] | |
477 | + | if ((bT == bT)) | |
449 | 478 | then { | |
450 | - | let | |
451 | - | let | |
452 | - | let | |
453 | - | let J = F( | |
454 | - | let | |
455 | - | $Tuple2(nil, | |
479 | + | let bW = addressFromPublicKey(ad) | |
480 | + | let ao = valueOrErrorMessage(addressFromString(bS[0]), A("invalid account address")) | |
481 | + | let ch = valueOrErrorMessage(parseInt(bS[1]), A("invalid amount")) | |
482 | + | let J = F(bS[2]) | |
483 | + | let ci = [invoke(ao, "transferAsset", [bW.bytes, ch, J], nil)] | |
484 | + | $Tuple2(nil, ci) | |
456 | 485 | } | |
457 | 486 | else throw("Strict value is not equal to itself.") | |
458 | 487 | } | |
459 | 488 | ||
460 | 489 | ||
461 | 490 | ||
462 | - | @Callable( | |
463 | - | func borrow ( | |
464 | - | let | |
465 | - | let | |
466 | - | let | |
467 | - | let | |
468 | - | let | |
469 | - | let | |
491 | + | @Callable(bP) | |
492 | + | func borrow (ad,bS) = { | |
493 | + | let ao = valueOrErrorMessage(addressFromString(bS[0]), A("invalid account address")) | |
494 | + | let cj = F(bS[1]) | |
495 | + | let ck = D(valueOrErrorMessage(parseInt(bS[2]), A("invalid requested amount")), "requested amount") | |
496 | + | let cl = bI(ao) | |
497 | + | let bW = addressFromPublicKey(ad) | |
498 | + | let bT = [if (!(X)) | |
470 | 499 | then true | |
471 | - | else C("not allowed"), | |
500 | + | else C("not allowed"), ab(bP.caller), if ((ad == cl)) | |
472 | 501 | then true | |
473 | 502 | else C("can be called by account owner only")] | |
474 | - | if (( | |
503 | + | if ((bT == bT)) | |
475 | 504 | then { | |
476 | - | let | |
477 | - | let | |
478 | - | let | |
479 | - | let | |
480 | - | let | |
481 | - | let | |
482 | - | let | |
483 | - | let | |
484 | - | let | |
485 | - | then v(fraction( | |
486 | - | else if (( | |
487 | - | then v( | |
505 | + | let aQ = bH(ao)._1 | |
506 | + | let bN = s(valueOrElse(ap(ao), 0), P(V)) | |
507 | + | let bb = s(aU(aQ), P(V)) | |
508 | + | let aZ = s(valueOrElse(getInteger(S, aq(ao, aQ)), 0), P(aQ)) | |
509 | + | let ba = s(valueOrElse(getInteger(S, aq(ao, V)), 0), P(V)) | |
510 | + | let bh = aY(aZ, ba, bb) | |
511 | + | let bk = s(valueOrErrorMessage(getInteger(S, as(ao)), A("leverage should be defined")), 1) | |
512 | + | let cm = bi(bN, bk, bh) | |
513 | + | let cn = if ((cj == aQ)) | |
514 | + | then v(fraction(cm, f, bb), P(aQ)) | |
515 | + | else if ((cj == V)) | |
516 | + | then v(cm, P(V)) | |
488 | 517 | else C("invalid requested asset id") | |
489 | - | let | |
490 | - | let | |
491 | - | then | |
492 | - | else C(("credit available = " + toString( | |
493 | - | let | |
494 | - | $Tuple2(nil, [ | |
518 | + | let ay = F(valueOrErrorMessage(getString(S, av(cj)), A("synthetic asset for requested asset is undefined"))) | |
519 | + | let co = if ((cn >= ck)) | |
520 | + | then ck | |
521 | + | else C(("credit available = " + toString(cn))) | |
522 | + | let cc = [invoke(S, "integerEntry", [aq(ao, cj), (valueOrElse(ar(ao, cj), 0) + co)], nil), invoke(S, "transferAsset", [bW.bytes, co, ay], nil)] | |
523 | + | $Tuple2(nil, [cc, cn]) | |
495 | 524 | } | |
496 | 525 | else throw("Strict value is not equal to itself.") | |
497 | 526 | } | |
498 | 527 | ||
499 | 528 | ||
500 | 529 | ||
501 | - | @Callable( | |
502 | - | func repay ( | |
503 | - | let | |
530 | + | @Callable(bP) | |
531 | + | func repay (ad,bS) = { | |
532 | + | let bT = [if (!(X)) | |
504 | 533 | then true | |
505 | - | else C("not allowed"), | |
506 | - | if (( | |
534 | + | else C("not allowed"), ab(bP.caller)] | |
535 | + | if ((bT == bT)) | |
507 | 536 | then $Tuple2(nil, unit) | |
508 | 537 | else throw("Strict value is not equal to itself.") | |
509 | 538 | } | |
510 | 539 | ||
511 | 540 | ||
512 | 541 | ||
513 | - | @Callable( | |
514 | - | func setPairAllowance ( | |
515 | - | let | |
542 | + | @Callable(bP) | |
543 | + | func setPairAllowance (ad,bS) = { | |
544 | + | let bT = [if (!(X)) | |
516 | 545 | then true | |
517 | - | else C("not allowed"), | |
518 | - | if (( | |
546 | + | else C("not allowed"), ab(bP.caller), ac(ad)] | |
547 | + | if ((bT == bT)) | |
519 | 548 | then { | |
520 | - | let | |
521 | - | let | |
522 | - | let | |
523 | - | let | |
524 | - | let | |
525 | - | let | |
526 | - | let | |
527 | - | $Tuple2(nil, | |
549 | + | let bU = bS[0] | |
550 | + | let bV = bS[1] | |
551 | + | let cp = bS[2] | |
552 | + | let aQ = F(bU) | |
553 | + | let aR = F(bV) | |
554 | + | let cq = (cp == "true") | |
555 | + | let ci = [invoke(S, "booleanEntry", [aP(aQ, aR), cq], nil)] | |
556 | + | $Tuple2(nil, ci) | |
528 | 557 | } | |
529 | 558 | else throw("Strict value is not equal to itself.") | |
530 | 559 | } | |
531 | 560 | ||
532 | 561 | ||
533 | 562 | ||
534 | - | @Callable( | |
535 | - | func addSyntheticAsset ( | |
536 | - | let | |
537 | - | let | |
538 | - | let | |
563 | + | @Callable(bP) | |
564 | + | func addSyntheticAsset (ad,bS) = { | |
565 | + | let aw = F(bS[0]) | |
566 | + | let ay = F(bS[1]) | |
567 | + | let bT = [if (!(X)) | |
539 | 568 | then true | |
540 | - | else C("not allowed"), | |
569 | + | else C("not allowed"), ab(bP.caller), ac(ad), if ((getString(S, av(aw)) == unit)) | |
541 | 570 | then true | |
542 | - | else C("invalid base asset"), if ((getString( | |
571 | + | else C("invalid base asset"), if ((getString(S, ax(ay)) == unit)) | |
543 | 572 | then true | |
544 | 573 | else C("invalid synthetic asset")] | |
545 | - | if (( | |
574 | + | if ((bT == bT)) | |
546 | 575 | then { | |
547 | - | let | |
548 | - | $Tuple2(nil, | |
576 | + | let ci = [invoke(S, "stringEntry", [av(aw), H(ay)], nil), invoke(S, "stringEntry", [ax(ay), H(aw)], nil)] | |
577 | + | $Tuple2(nil, ci) | |
549 | 578 | } | |
550 | 579 | else throw("Strict value is not equal to itself.") | |
551 | 580 | } | |
552 | 581 | ||
553 | 582 | ||
554 | 583 | ||
555 | - | @Callable( | |
556 | - | func doShutdown ( | |
557 | - | let | |
558 | - | if (( | |
584 | + | @Callable(bP) | |
585 | + | func doShutdown (ad,bS) = { | |
586 | + | let bY = [ab(bP.caller), ac(ad)] | |
587 | + | if ((bY == bY)) | |
559 | 588 | then { | |
560 | - | let | |
561 | - | $Tuple2(nil, | |
589 | + | let ci = [invoke(S, "booleanEntry", [p, true], nil)] | |
590 | + | $Tuple2(nil, ci) | |
562 | 591 | } | |
563 | 592 | else throw("Strict value is not equal to itself.") | |
564 | 593 | } | |
565 | 594 | ||
566 | 595 | ||
567 | 596 | ||
568 | - | @Callable( | |
569 | - | func getAccountInfoREADONLY ( | |
570 | - | let | |
571 | - | if (( | |
597 | + | @Callable(bP) | |
598 | + | func getAccountInfoREADONLY (ad,bS) = { | |
599 | + | let bY = [ab(bP.caller)] | |
600 | + | if ((bY == bY)) | |
572 | 601 | then { | |
573 | - | let an = valueOrErrorMessage(addressFromString(bM[0]), A("invalid account address")) | |
574 | - | let cn = bG(an) | |
575 | - | let aP = cn._1 | |
576 | - | let aQ = cn._2 | |
577 | - | let bj = valueOrErrorMessage(getInteger(R, ar(an)), A("leverage should be defined")) | |
578 | - | let bQ = addressFromPublicKey(ac) | |
579 | - | let at = bF(an) | |
580 | - | let bU = valueOrErrorMessage(getBinary(R, aF(at)), "kRequestIdToAccountPublicKey not found") | |
581 | - | let ch = s(valueOrElse(ao(an), 0), O(U)) | |
582 | - | let ba = s(aT(aP), O(U)) | |
583 | - | let aY = s(valueOrElse(getInteger(R, ap(an, aP)), 0), O(aP)) | |
584 | - | let aZ = s(valueOrElse(getInteger(R, ap(an, U)), 0), O(U)) | |
585 | - | let co = $Tuple11(H(aP), H(aQ), toString(an), toBase58String(bU), bj, toBase58String(at), ch, aY, aZ, s(0, O(aP)), s(0, O(U))) | |
586 | - | $Tuple2(nil, co) | |
602 | + | let ao = valueOrErrorMessage(addressFromString(bS[0]), A("invalid account address")) | |
603 | + | let cr = bK(ao) | |
604 | + | $Tuple2(nil, cr) | |
587 | 605 | } | |
588 | 606 | else throw("Strict value is not equal to itself.") | |
589 | 607 | } | |
590 | 608 | ||
591 | 609 | ||
592 | - | @Verifier(cp) | |
593 | - | func cq () = if (if (isDefined(Q)) | |
594 | - | then isDefined(getString(R, l)) | |
610 | + | ||
611 | + | @Callable(bP) | |
612 | + | func getUserInfoREADONLY (ad,bS) = { | |
613 | + | let bY = [ab(bP.caller)] | |
614 | + | if ((bY == bY)) | |
615 | + | then { | |
616 | + | let bW = valueOrErrorMessage(addressFromString(bS[0]), A("invalid user address")) | |
617 | + | let cs = valueOrErrorMessage(getBinary(S, aM(bW)), "kRequestsByOwner not found") | |
618 | + | let bX = (size(cs) / j) | |
619 | + | let ct = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19] | |
620 | + | func cu (cv,cw) = { | |
621 | + | let cx = cv | |
622 | + | let cy = cx._1 | |
623 | + | let cz = cx._2 | |
624 | + | let cA = cx._3 | |
625 | + | if ((cA > cw)) | |
626 | + | then { | |
627 | + | let au = take(cz, j) | |
628 | + | let cB = drop(cz, j) | |
629 | + | let bM = valueOrErrorMessage(getBinary(S, aG(au)), "kRequestIdToAccountPublicKey not found") | |
630 | + | let ao = addressFromPublicKey(bM) | |
631 | + | let cr = bK(ao) | |
632 | + | $Tuple3((cy :+ cr), cB, cA) | |
633 | + | } | |
634 | + | else cv | |
635 | + | } | |
636 | + | ||
637 | + | let cC = { | |
638 | + | let cD = ct | |
639 | + | let cE = size(cD) | |
640 | + | let cF = $Tuple3(nil, cs, bX) | |
641 | + | func cG (cH,cI) = if ((cI >= cE)) | |
642 | + | then cH | |
643 | + | else cu(cH, cD[cI]) | |
644 | + | ||
645 | + | func cJ (cH,cI) = if ((cI >= cE)) | |
646 | + | then cH | |
647 | + | else throw("List size exceeds 20") | |
648 | + | ||
649 | + | cJ(cG(cG(cG(cG(cG(cG(cG(cG(cG(cG(cG(cG(cG(cG(cG(cG(cG(cG(cG(cG(cF, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20) | |
650 | + | } | |
651 | + | let cy = cC._1 | |
652 | + | let cK = cC._2 | |
653 | + | let cL = cC._3 | |
654 | + | $Tuple2(nil, cy) | |
655 | + | } | |
656 | + | else throw("Strict value is not equal to itself.") | |
657 | + | } | |
658 | + | ||
659 | + | ||
660 | + | @Verifier(cM) | |
661 | + | func cN () = if (if (isDefined(R)) | |
662 | + | then isDefined(getString(S, l)) | |
595 | 663 | else false) | |
596 | 664 | then { | |
597 | - | let L = getString( | |
665 | + | let L = getString(S, l) | |
598 | 666 | if ($isInstanceOf(L, "String")) | |
599 | 667 | then { | |
600 | - | let | |
601 | - | let | |
602 | - | let | |
603 | - | | |
668 | + | let ae = L | |
669 | + | let cO = m(toString(this), toBase58String(cM.id)) | |
670 | + | let bO = valueOrElse(getBoolean(addressFromStringValue(ae), cO), false) | |
671 | + | bO | |
604 | 672 | } | |
605 | 673 | else false | |
606 | 674 | } | |
607 | - | else sigVerify( | |
675 | + | else sigVerify(cM.bodyBytes, cM.proofs[0], cM.senderPublicKey) | |
608 | 676 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 7 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = "__" | |
5 | 5 | ||
6 | 6 | let b = take(drop(this.bytes, 1), 1) | |
7 | 7 | ||
8 | 8 | let c = base58'2W' | |
9 | 9 | ||
10 | 10 | let d = "futures_calculator.ride" | |
11 | 11 | ||
12 | 12 | let e = 100000000 | |
13 | 13 | ||
14 | 14 | let f = toBigInt(1000000000000000000) | |
15 | 15 | ||
16 | 16 | let g = 8 | |
17 | 17 | ||
18 | 18 | let h = 6 | |
19 | 19 | ||
20 | 20 | let i = "WAVES" | |
21 | 21 | ||
22 | 22 | let j = 32 | |
23 | 23 | ||
24 | 24 | let k = toBigInt(0) | |
25 | 25 | ||
26 | 26 | let l = "%s__multisig" | |
27 | 27 | ||
28 | 28 | func m (n,o) = makeString(["%s__status", n, o], a) | |
29 | 29 | ||
30 | 30 | ||
31 | 31 | let p = "%s__shutdown" | |
32 | 32 | ||
33 | 33 | let q = "%s__publicKeys" | |
34 | 34 | ||
35 | 35 | let r = "%s__matcherPublicKey" | |
36 | 36 | ||
37 | 37 | func s (t,u) = fraction(toBigInt(t), f, toBigInt(u)) | |
38 | 38 | ||
39 | 39 | ||
40 | 40 | func v (w,x) = toInt(fraction(w, toBigInt(x), f)) | |
41 | 41 | ||
42 | 42 | ||
43 | 43 | func y (z) = isDefined(addressFromString(z)) | |
44 | 44 | ||
45 | 45 | ||
46 | 46 | func A (B) = ((d + ": ") + B) | |
47 | 47 | ||
48 | 48 | ||
49 | 49 | func C (B) = throw(A(B)) | |
50 | 50 | ||
51 | 51 | ||
52 | 52 | func D (E,B) = if ((E >= 0)) | |
53 | 53 | then E | |
54 | 54 | else C((B + " value should be positive")) | |
55 | 55 | ||
56 | 56 | ||
57 | 57 | func F (G) = if ((G == i)) | |
58 | 58 | then unit | |
59 | 59 | else fromBase58String(G) | |
60 | 60 | ||
61 | 61 | ||
62 | 62 | func H (G) = if ((G == unit)) | |
63 | 63 | then i | |
64 | 64 | else toBase58String(value(G)) | |
65 | 65 | ||
66 | 66 | ||
67 | 67 | func I (J) = valueOrErrorMessage(assetInfo(J), A("invalid asset info")) | |
68 | 68 | ||
69 | 69 | ||
70 | 70 | func K (J) = { | |
71 | 71 | let L = J | |
72 | 72 | if ($isInstanceOf(L, "Unit")) | |
73 | 73 | then g | |
74 | 74 | else if ($isInstanceOf(L, "ByteVector")) | |
75 | 75 | then { | |
76 | 76 | let J = L | |
77 | 77 | I(J).decimals | |
78 | 78 | } | |
79 | 79 | else throw("Match error") | |
80 | 80 | } | |
81 | 81 | ||
82 | 82 | ||
83 | - | func M (N) = pow(10, 0, N, 0, 0, DOWN) | |
83 | + | func M (J,z) = { | |
84 | + | let L = J | |
85 | + | if ($isInstanceOf(L, "Unit")) | |
86 | + | then wavesBalance(z).available | |
87 | + | else if ($isInstanceOf(L, "ByteVector")) | |
88 | + | then { | |
89 | + | let J = L | |
90 | + | assetBalance(z, J) | |
91 | + | } | |
92 | + | else throw("Match error") | |
93 | + | } | |
84 | 94 | ||
85 | 95 | ||
86 | - | func | |
96 | + | func N (O) = pow(10, 0, O, 0, 0, DOWN) | |
87 | 97 | ||
88 | 98 | ||
89 | - | ||
99 | + | func P (J) = N(K(J)) | |
90 | 100 | ||
91 | - | let Q = { | |
92 | - | let L = getString(this, P) | |
101 | + | ||
102 | + | let Q = "%s__factoryAddress" | |
103 | + | ||
104 | + | let R = { | |
105 | + | let L = getString(this, Q) | |
93 | 106 | if ($isInstanceOf(L, "String")) | |
94 | 107 | then { | |
95 | 108 | let B = L | |
96 | 109 | addressFromString(B) | |
97 | 110 | } | |
98 | 111 | else if ($isInstanceOf(L, "Unit")) | |
99 | 112 | then unit | |
100 | 113 | else throw("Match error") | |
101 | 114 | } | |
102 | 115 | ||
103 | - | let | |
116 | + | let S = valueOrErrorMessage(R, A("invalid factory address")) | |
104 | 117 | ||
105 | - | let | |
118 | + | let T = "%s__usdtAssetId" | |
106 | 119 | ||
107 | - | let | |
108 | - | let L = getString( | |
120 | + | let U = { | |
121 | + | let L = getString(S, T) | |
109 | 122 | if ($isInstanceOf(L, "String")) | |
110 | 123 | then { | |
111 | 124 | let B = L | |
112 | 125 | F(B) | |
113 | 126 | } | |
114 | 127 | else if ($isInstanceOf(L, "Unit")) | |
115 | 128 | then unit | |
116 | 129 | else throw("Match error") | |
117 | 130 | } | |
118 | 131 | ||
119 | - | let | |
132 | + | let V = valueOrErrorMessage(U, A("invalid usdt asset id")) | |
120 | 133 | ||
121 | - | let | |
134 | + | let W = "%s__calculatorAddress" | |
122 | 135 | ||
123 | - | let | |
136 | + | let X = valueOrElse(getBoolean(S, p), false) | |
124 | 137 | ||
125 | - | func | |
138 | + | func Y (Z,z) = if ((Z == z)) | |
126 | 139 | then true | |
127 | 140 | else C("permission denied") | |
128 | 141 | ||
129 | 142 | ||
130 | - | func | |
143 | + | func aa (Z) = Y(Z, this) | |
131 | 144 | ||
132 | 145 | ||
133 | - | func | |
146 | + | func ab (Z) = Y(Z, S) | |
134 | 147 | ||
135 | 148 | ||
136 | - | func | |
137 | - | let | |
138 | - | let | |
139 | - | if (containsElement( | |
149 | + | func ac (ad) = { | |
150 | + | let ae = addressFromStringValue(getStringValue(S, l)) | |
151 | + | let af = split(getStringValue(ae, q), a) | |
152 | + | if (containsElement(af, toBase58String(ad))) | |
140 | 153 | then true | |
141 | 154 | else C("not allowed") | |
142 | 155 | } | |
143 | 156 | ||
144 | 157 | ||
145 | - | let | |
158 | + | let ag = "%s__accountScript" | |
146 | 159 | ||
147 | - | func | |
160 | + | func ah () = valueOrErrorMessage(getBinary(S, ag), A("account script is not set")) | |
148 | 161 | ||
149 | 162 | ||
150 | - | let | |
163 | + | let ai = "%s__rewardAmount" | |
151 | 164 | ||
152 | - | func | |
165 | + | func aj () = valueOrErrorMessage(getInteger(S, ai), A("reward amount is not set")) | |
153 | 166 | ||
154 | 167 | ||
155 | - | let | |
168 | + | let ak = "%s__accountsLimit" | |
156 | 169 | ||
157 | - | let | |
170 | + | let al = 20 | |
158 | 171 | ||
159 | - | func | |
172 | + | func am () = valueOrElse(getInteger(S, ak), al) | |
160 | 173 | ||
161 | 174 | ||
162 | - | func | |
175 | + | func an (ao) = makeString(["%s%s", "deposited", toString(ao)], a) | |
163 | 176 | ||
164 | 177 | ||
165 | - | func | |
178 | + | func ap (ao) = getInteger(S, an(ao)) | |
166 | 179 | ||
167 | 180 | ||
168 | - | func | |
181 | + | func aq (ao,J) = makeString(["%s%s%s", "credit", toString(ao), H(J)], a) | |
169 | 182 | ||
170 | 183 | ||
171 | - | func | |
184 | + | func ar (ao,J) = getInteger(S, aq(ao, J)) | |
172 | 185 | ||
173 | 186 | ||
174 | - | func | |
187 | + | func as (ao) = makeString(["%s%s", "leverage", toString(ao)], a) | |
175 | 188 | ||
176 | 189 | ||
177 | - | func | |
190 | + | func at (au) = makeString(["%s%s", "requestLeverage", toBase58String(au)], a) | |
178 | 191 | ||
179 | 192 | ||
180 | - | func | |
193 | + | func av (aw) = makeString(["%s%s", "syntheticAssetId", H(aw)], a) | |
181 | 194 | ||
182 | 195 | ||
183 | - | func | |
196 | + | func ax (ay) = makeString(["%s%s", "baseAssetId", H(ay)], a) | |
184 | 197 | ||
185 | 198 | ||
186 | - | let | |
199 | + | let az = 0 | |
187 | 200 | ||
188 | - | let | |
201 | + | let aA = 1 | |
189 | 202 | ||
190 | - | func | |
203 | + | func aB (au) = makeString(["%s%s", toBase58String(au), "status"], a) | |
191 | 204 | ||
192 | 205 | ||
193 | - | func | |
206 | + | func aC (ao) = makeString(["%s%s", toString(ao), "creatorPublicKey"], a) | |
194 | 207 | ||
195 | 208 | ||
196 | - | func | |
209 | + | func aD (au) = makeString(["%s%s", toBase58String(au), "ownerPublicKey"], a) | |
197 | 210 | ||
198 | 211 | ||
199 | - | func | |
212 | + | func aE (au) = makeString(["%s%s", toBase58String(au), "amountAssetId"], a) | |
200 | 213 | ||
201 | 214 | ||
202 | - | func | |
215 | + | func aF (au) = makeString(["%s%s", toBase58String(au), "priceAssetId"], a) | |
203 | 216 | ||
204 | 217 | ||
205 | - | func | |
218 | + | func aG (au) = makeString(["%s%s", toBase58String(au), "requestIdToAccountPublicKey"], a) | |
206 | 219 | ||
207 | 220 | ||
208 | - | func | |
221 | + | func aH (ao) = makeString(["%s%s", toString(ao), "accountAddressToRequestId"], a) | |
209 | 222 | ||
210 | 223 | ||
211 | - | func | |
224 | + | func aI () = makeString(["%s", "requestsQueue"], a) | |
212 | 225 | ||
213 | 226 | ||
214 | - | func | |
227 | + | func aJ () = valueOrElse(getBinary(S, aI()), base58'') | |
215 | 228 | ||
216 | 229 | ||
217 | - | func | |
230 | + | func aK () = makeString(["%s", "accountsQueue"], a) | |
218 | 231 | ||
219 | 232 | ||
220 | - | func | |
233 | + | func aL () = valueOrElse(getBinary(S, aK()), base58'') | |
221 | 234 | ||
222 | 235 | ||
223 | - | func | |
236 | + | func aM (aN) = makeString(["%s%s", "requests", toString(aN)], a) | |
224 | 237 | ||
225 | 238 | ||
226 | - | func | |
239 | + | func aO (aN) = valueOrElse(getBinary(S, aM(aN)), base58'') | |
227 | 240 | ||
228 | 241 | ||
229 | - | func | |
242 | + | func aP (aQ,aR) = makeString(["%s%s%s", H(aQ), H(aR), "pairAllowed"], a) | |
230 | 243 | ||
231 | 244 | ||
232 | - | func | |
245 | + | func aS (aQ,aR) = valueOrElse(getBoolean(S, aP(aQ, aR)), false) | |
233 | 246 | ||
234 | 247 | ||
235 | - | func | |
248 | + | func aT (J) = makeString(["%s", H(J)], a) | |
236 | 249 | ||
237 | 250 | ||
238 | - | func | |
239 | - | let | |
240 | - | let | |
241 | - | let | |
242 | - | | |
251 | + | func aU (J) = { | |
252 | + | let aV = fromBase58String(valueOrErrorMessage(getString(S, r), A("invalid matcher public key"))) | |
253 | + | let aW = addressFromPublicKey(aV) | |
254 | + | let aX = valueOrErrorMessage(getInteger(aW, aT(J)), A(("invalid price, assetId = " + H(J)))) | |
255 | + | aX | |
243 | 256 | } | |
244 | 257 | ||
245 | 258 | ||
246 | - | func | |
259 | + | func aY (aZ,ba,bb) = (fraction(aZ, bb, f) + ba) | |
247 | 260 | ||
248 | 261 | ||
249 | - | func | |
262 | + | func bc (bd,be,bb) = (fraction(bd, bb, f) + be) | |
250 | 263 | ||
251 | 264 | ||
252 | - | func | |
265 | + | func bf (bg,bh) = (bg - bh) | |
253 | 266 | ||
254 | 267 | ||
255 | - | func | |
268 | + | func bi (bj,bk,bh) = (fraction(bj, bk, f) - bh) | |
256 | 269 | ||
257 | 270 | ||
258 | - | func | |
259 | - | then ( | |
271 | + | func bl (bm,bn) = if ((bm > k)) | |
272 | + | then (bm - bn) | |
260 | 273 | else k | |
261 | 274 | ||
262 | 275 | ||
263 | - | func | |
264 | - | then ( | |
276 | + | func bo (bm,bn) = if ((bm > k)) | |
277 | + | then (bn - bm) | |
265 | 278 | else k | |
266 | 279 | ||
267 | 280 | ||
268 | - | func | |
269 | - | then max([k, fraction( | |
281 | + | func bp (bq,br) = if ((br > k)) | |
282 | + | then max([k, fraction(bq, f, br)]) | |
270 | 283 | else k | |
271 | 284 | ||
272 | 285 | ||
273 | - | func | |
274 | - | then max([k, fraction( | |
286 | + | func bs (bq,br) = if ((br > k)) | |
287 | + | then max([k, fraction(br, f, bq)]) | |
275 | 288 | else k | |
276 | 289 | ||
277 | 290 | ||
278 | - | func | |
291 | + | func bt (bu,bv,bb,bw) = fraction((fraction(bu, bb, f) + bv), bw, f) | |
279 | 292 | ||
280 | 293 | ||
281 | - | func | |
294 | + | func bx (by,bw,bz) = fraction(by, bz, bw) | |
282 | 295 | ||
283 | 296 | ||
284 | - | func | |
285 | - | let | |
286 | - | then ((( | |
297 | + | func bA (bj,bB,bu,bv,bC,bD) = { | |
298 | + | let bE = if ((bu > k)) | |
299 | + | then (((bj - bB) / bu) + bC) | |
287 | 300 | else k | |
288 | - | let | |
289 | - | then ( | |
301 | + | let bF = if ((bv > k)) | |
302 | + | then (bD - ((bj - bB) / (bu / bD))) | |
290 | 303 | else k | |
291 | - | ( | |
304 | + | (bE + bF) | |
292 | 305 | } | |
293 | 306 | ||
294 | 307 | ||
295 | - | func | |
296 | - | let | |
297 | - | | |
308 | + | func bG (ao) = { | |
309 | + | let au = fromBase58String(valueOrErrorMessage(getString(S, aH(ao)), A("invalid account address: request id is undefined"))) | |
310 | + | au | |
298 | 311 | } | |
299 | 312 | ||
300 | 313 | ||
301 | - | func | |
302 | - | let | |
303 | - | let | |
304 | - | let | |
305 | - | $Tuple2( | |
314 | + | func bH (ao) = { | |
315 | + | let au = bG(ao) | |
316 | + | let aQ = F(valueOrErrorMessage(getString(S, aE(au)), A("invalid amount asset id"))) | |
317 | + | let aR = F(valueOrErrorMessage(getString(S, aF(au)), A("invalid amount price id"))) | |
318 | + | $Tuple2(aQ, aR) | |
306 | 319 | } | |
307 | 320 | ||
308 | 321 | ||
309 | - | func | |
310 | - | let | |
311 | - | let | |
312 | - | | |
322 | + | func bI (ao) = { | |
323 | + | let au = bG(ao) | |
324 | + | let bJ = valueOrErrorMessage(getBinary(S, aD(au)), A("invalid amount asset id")) | |
325 | + | bJ | |
313 | 326 | } | |
314 | 327 | ||
315 | 328 | ||
316 | - | @Callable(bJ) | |
317 | - | func init (bK) = { | |
318 | - | let bL = Z(bJ.caller) | |
319 | - | if ((bL == bL)) | |
320 | - | then $Tuple2([StringEntry(P, bK)], unit) | |
329 | + | func bK (ao) = { | |
330 | + | let bL = bH(ao) | |
331 | + | let aQ = bL._1 | |
332 | + | let aR = bL._2 | |
333 | + | let bk = valueOrErrorMessage(getInteger(S, as(ao)), A("leverage should be defined")) | |
334 | + | let au = bG(ao) | |
335 | + | let bM = valueOrErrorMessage(getBinary(S, aG(au)), "kRequestIdToAccountPublicKey not found") | |
336 | + | let bN = s(valueOrElse(ap(ao), 0), P(aR)) | |
337 | + | let bb = s(aU(aQ), P(aR)) | |
338 | + | let aZ = s(valueOrElse(getInteger(S, aq(ao, aQ)), 0), P(aQ)) | |
339 | + | let ba = s(valueOrElse(getInteger(S, aq(ao, aR)), 0), P(aR)) | |
340 | + | let bO = valueOrErrorMessage(getInteger(S, aB(au)), ("status not found. RequestId = " + toBase58String(au))) | |
341 | + | $Tuple12(H(aQ), H(aR), toString(ao), toBase58String(bM), bk, toBase58String(au), bN, aZ, ba, M(aQ, ao), M(aR, ao), bO) | |
342 | + | } | |
343 | + | ||
344 | + | ||
345 | + | @Callable(bP) | |
346 | + | func init (bQ) = { | |
347 | + | let bR = aa(bP.caller) | |
348 | + | if ((bR == bR)) | |
349 | + | then $Tuple2([StringEntry(Q, bQ)], unit) | |
321 | 350 | else throw("Strict value is not equal to itself.") | |
322 | 351 | } | |
323 | 352 | ||
324 | 353 | ||
325 | 354 | ||
326 | - | @Callable( | |
327 | - | func requestAccount ( | |
328 | - | let | |
355 | + | @Callable(bP) | |
356 | + | func requestAccount (ad,bS) = { | |
357 | + | let bT = [if (!(X)) | |
329 | 358 | then true | |
330 | - | else C("not allowed"), | |
331 | - | if (( | |
359 | + | else C("not allowed"), ab(bP.caller)] | |
360 | + | if ((bT == bT)) | |
332 | 361 | then { | |
333 | - | let | |
334 | - | let | |
335 | - | let | |
336 | - | let | |
337 | - | let | |
338 | - | let | |
339 | - | let | |
340 | - | let | |
341 | - | let | |
362 | + | let bU = bS[0] | |
363 | + | let bV = bS[1] | |
364 | + | let bk = valueOrErrorMessage(parseInt(bS[2]), A("invalid leverage")) | |
365 | + | let bW = addressFromPublicKey(ad) | |
366 | + | let au = sha256(((bW.bytes + fromBase58String(bU)) + fromBase58String(bV))) | |
367 | + | let aQ = F(bU) | |
368 | + | let aR = F(bV) | |
369 | + | let bX = (size(aM(bW)) / j) | |
370 | + | let bY = [if ((size(bP.payments) == 1)) | |
342 | 371 | then true | |
343 | - | else C("1 payment is required"), if (( | |
372 | + | else C("1 payment is required"), if ((bP.payments[0].assetId == unit)) | |
344 | 373 | then true | |
345 | - | else C("invalid asset"), if (( | |
374 | + | else C("invalid asset"), if ((bP.payments[0].amount == aj())) | |
346 | 375 | then true | |
347 | - | else C("invalid amount"), if ( | |
376 | + | else C("invalid amount"), if (aS(aQ, aR)) | |
348 | 377 | then true | |
349 | - | else C("pair is not allowed"), if ((getInteger( | |
378 | + | else C("pair is not allowed"), if ((getInteger(S, aB(au)) == unit)) | |
350 | 379 | then true | |
351 | - | else C("account is already exists"), if (( | |
380 | + | else C("account is already exists"), if ((am() > bX)) | |
352 | 381 | then true | |
353 | - | else C(("accounts limit is " + toString( | |
354 | - | if (( | |
382 | + | else C(("accounts limit is " + toString(am())))] | |
383 | + | if ((bY == bY)) | |
355 | 384 | then { | |
356 | - | let | |
357 | - | then $Tuple2([ScriptTransfer( | |
385 | + | let bZ = if ((size(aL()) == 0)) | |
386 | + | then $Tuple2([ScriptTransfer(S, aj(), unit)], [invoke(S, "integerEntry", [aB(au), az], nil), invoke(S, "binaryEntry", [aI(), (aJ() + au)], nil), invoke(S, "integerEntry", [at(au), bk], nil)]) | |
358 | 387 | else { | |
359 | - | let | |
360 | - | let | |
361 | - | let | |
362 | - | $Tuple2([ScriptTransfer( | |
388 | + | let bM = take(aL(), j) | |
389 | + | let ao = addressFromPublicKey(bM) | |
390 | + | let ca = addressFromPublicKey(valueOrErrorMessage(getBinary(S, aC(ao)), A("invalid creator public key"))) | |
391 | + | $Tuple2([ScriptTransfer(ca, aj(), unit)], [invoke(S, "binaryEntry", [aK(), drop(aL(), j)], nil), invoke(S, "integerEntry", [aB(au), aA], nil), invoke(S, "binaryEntry", [aG(au), bM], nil), invoke(S, "stringEntry", [aH(ao), toBase58String(au)], nil), invoke(S, "integerEntry", [as(ao), bk], nil)]) | |
363 | 392 | } | |
364 | - | let | |
365 | - | let | |
366 | - | $Tuple2( | |
393 | + | let cb = bZ._1 | |
394 | + | let cc = bZ._2 | |
395 | + | $Tuple2(cb, (cc ++ [invoke(S, "binaryEntry", [aD(au), ad], nil), invoke(S, "binaryEntry", [aM(bW), (aO(bW) + au)], nil), invoke(S, "stringEntry", [aE(au), bU], nil), invoke(S, "stringEntry", [aF(au), bV], nil)])) | |
367 | 396 | } | |
368 | 397 | else throw("Strict value is not equal to itself.") | |
369 | 398 | } | |
370 | 399 | else throw("Strict value is not equal to itself.") | |
371 | 400 | } | |
372 | 401 | ||
373 | 402 | ||
374 | 403 | ||
375 | - | @Callable( | |
376 | - | func addAccount ( | |
377 | - | let | |
404 | + | @Callable(bP) | |
405 | + | func addAccount (ad,bS) = { | |
406 | + | let bT = [if (!(X)) | |
378 | 407 | then true | |
379 | - | else C("not allowed"), | |
380 | - | if (( | |
408 | + | else C("not allowed"), ab(bP.caller)] | |
409 | + | if ((bT == bT)) | |
381 | 410 | then { | |
382 | - | let | |
383 | - | let | |
384 | - | let | |
385 | - | let | |
386 | - | let | |
411 | + | let cd = fromBase58String(bS[0]) | |
412 | + | let bM = ad | |
413 | + | let ao = addressFromPublicKey(ad) | |
414 | + | let ca = addressFromPublicKey(cd) | |
415 | + | let bY = [if ((getBinary(S, aC(ao)) == unit)) | |
387 | 416 | then true | |
388 | 417 | else C("account is already exists"), if ({ | |
389 | - | let L = scriptHash( | |
418 | + | let L = scriptHash(ao) | |
390 | 419 | if ($isInstanceOf(L, "ByteVector")) | |
391 | 420 | then { | |
392 | - | let | |
393 | - | ( | |
421 | + | let ce = L | |
422 | + | (ce == blake2b256_32Kb(ah())) | |
394 | 423 | } | |
395 | 424 | else false | |
396 | 425 | }) | |
397 | 426 | then true | |
398 | 427 | else C("invalid script")] | |
399 | - | if (( | |
428 | + | if ((bY == bY)) | |
400 | 429 | then { | |
401 | - | let | |
402 | - | then $Tuple2(nil, [invoke( | |
430 | + | let cf = if ((size(aJ()) == 0)) | |
431 | + | then $Tuple2(nil, [invoke(S, "binaryEntry", [aK(), (aL() + bM)], nil)]) | |
403 | 432 | else { | |
404 | - | let | |
405 | - | let | |
406 | - | $Tuple2(nil, [invoke( | |
433 | + | let au = take(aJ(), j) | |
434 | + | let bk = valueOrErrorMessage(getInteger(S, at(au)), A("request's leverage is undefined")) | |
435 | + | $Tuple2(nil, [invoke(S, "integerEntry", [aB(au), aA], nil), invoke(S, "binaryEntry", [aG(au), bM], nil), invoke(S, "binaryEntry", [aI(), drop(aJ(), j)], nil), invoke(S, "stringEntry", [aH(ao), toBase58String(au)], nil), invoke(S, "transferWaves", [ca.bytes, aj()], nil), invoke(S, "integerEntry", [as(ao), bk], nil)]) | |
407 | 436 | } | |
408 | - | let | |
409 | - | let | |
410 | - | $Tuple2( | |
437 | + | let cb = cf._1 | |
438 | + | let cc = cf._2 | |
439 | + | $Tuple2(cb, (cc ++ [invoke(S, "binaryEntry", [aC(ao), cd], nil)])) | |
411 | 440 | } | |
412 | 441 | else throw("Strict value is not equal to itself.") | |
413 | 442 | } | |
414 | 443 | else throw("Strict value is not equal to itself.") | |
415 | 444 | } | |
416 | 445 | ||
417 | 446 | ||
418 | 447 | ||
419 | - | @Callable( | |
420 | - | func deposit ( | |
421 | - | let | |
422 | - | let | |
423 | - | let | |
448 | + | @Callable(bP) | |
449 | + | func deposit (ad,bS) = { | |
450 | + | let cg = bP.payments[0] | |
451 | + | let ao = valueOrErrorMessage(addressFromString(bS[0]), A("invalid account address")) | |
452 | + | let bT = [if (!(X)) | |
424 | 453 | then true | |
425 | - | else C("not allowed"), | |
454 | + | else C("not allowed"), ab(bP.caller), if ((size(bP.payments) == 1)) | |
426 | 455 | then true | |
427 | - | else C("1 payment is required"), if (( | |
456 | + | else C("1 payment is required"), if ((cg.assetId == V)) | |
428 | 457 | then true | |
429 | - | else C("invalid asset"), if ((getInteger( | |
458 | + | else C("invalid asset"), if ((getInteger(S, aB(bG(ao))) == aA)) | |
430 | 459 | then true | |
431 | 460 | else C("account is not ready")] | |
432 | - | if (( | |
461 | + | if ((bT == bT)) | |
433 | 462 | then { | |
434 | - | let | |
435 | - | let | |
436 | - | $Tuple2( | |
463 | + | let cb = [ScriptTransfer(ao, cg.amount, cg.assetId)] | |
464 | + | let cc = [invoke(S, "integerEntry", [an(ao), (valueOrElse(ap(ao), 0) + cg.amount)], nil)] | |
465 | + | $Tuple2(cb, cc) | |
437 | 466 | } | |
438 | 467 | else throw("Strict value is not equal to itself.") | |
439 | 468 | } | |
440 | 469 | ||
441 | 470 | ||
442 | 471 | ||
443 | - | @Callable( | |
444 | - | func withdraw ( | |
445 | - | let | |
472 | + | @Callable(bP) | |
473 | + | func withdraw (ad,bS) = { | |
474 | + | let bT = [if (!(X)) | |
446 | 475 | then true | |
447 | - | else C("not allowed"), | |
448 | - | if (( | |
476 | + | else C("not allowed"), ab(bP.caller)] | |
477 | + | if ((bT == bT)) | |
449 | 478 | then { | |
450 | - | let | |
451 | - | let | |
452 | - | let | |
453 | - | let J = F( | |
454 | - | let | |
455 | - | $Tuple2(nil, | |
479 | + | let bW = addressFromPublicKey(ad) | |
480 | + | let ao = valueOrErrorMessage(addressFromString(bS[0]), A("invalid account address")) | |
481 | + | let ch = valueOrErrorMessage(parseInt(bS[1]), A("invalid amount")) | |
482 | + | let J = F(bS[2]) | |
483 | + | let ci = [invoke(ao, "transferAsset", [bW.bytes, ch, J], nil)] | |
484 | + | $Tuple2(nil, ci) | |
456 | 485 | } | |
457 | 486 | else throw("Strict value is not equal to itself.") | |
458 | 487 | } | |
459 | 488 | ||
460 | 489 | ||
461 | 490 | ||
462 | - | @Callable( | |
463 | - | func borrow ( | |
464 | - | let | |
465 | - | let | |
466 | - | let | |
467 | - | let | |
468 | - | let | |
469 | - | let | |
491 | + | @Callable(bP) | |
492 | + | func borrow (ad,bS) = { | |
493 | + | let ao = valueOrErrorMessage(addressFromString(bS[0]), A("invalid account address")) | |
494 | + | let cj = F(bS[1]) | |
495 | + | let ck = D(valueOrErrorMessage(parseInt(bS[2]), A("invalid requested amount")), "requested amount") | |
496 | + | let cl = bI(ao) | |
497 | + | let bW = addressFromPublicKey(ad) | |
498 | + | let bT = [if (!(X)) | |
470 | 499 | then true | |
471 | - | else C("not allowed"), | |
500 | + | else C("not allowed"), ab(bP.caller), if ((ad == cl)) | |
472 | 501 | then true | |
473 | 502 | else C("can be called by account owner only")] | |
474 | - | if (( | |
503 | + | if ((bT == bT)) | |
475 | 504 | then { | |
476 | - | let | |
477 | - | let | |
478 | - | let | |
479 | - | let | |
480 | - | let | |
481 | - | let | |
482 | - | let | |
483 | - | let | |
484 | - | let | |
485 | - | then v(fraction( | |
486 | - | else if (( | |
487 | - | then v( | |
505 | + | let aQ = bH(ao)._1 | |
506 | + | let bN = s(valueOrElse(ap(ao), 0), P(V)) | |
507 | + | let bb = s(aU(aQ), P(V)) | |
508 | + | let aZ = s(valueOrElse(getInteger(S, aq(ao, aQ)), 0), P(aQ)) | |
509 | + | let ba = s(valueOrElse(getInteger(S, aq(ao, V)), 0), P(V)) | |
510 | + | let bh = aY(aZ, ba, bb) | |
511 | + | let bk = s(valueOrErrorMessage(getInteger(S, as(ao)), A("leverage should be defined")), 1) | |
512 | + | let cm = bi(bN, bk, bh) | |
513 | + | let cn = if ((cj == aQ)) | |
514 | + | then v(fraction(cm, f, bb), P(aQ)) | |
515 | + | else if ((cj == V)) | |
516 | + | then v(cm, P(V)) | |
488 | 517 | else C("invalid requested asset id") | |
489 | - | let | |
490 | - | let | |
491 | - | then | |
492 | - | else C(("credit available = " + toString( | |
493 | - | let | |
494 | - | $Tuple2(nil, [ | |
518 | + | let ay = F(valueOrErrorMessage(getString(S, av(cj)), A("synthetic asset for requested asset is undefined"))) | |
519 | + | let co = if ((cn >= ck)) | |
520 | + | then ck | |
521 | + | else C(("credit available = " + toString(cn))) | |
522 | + | let cc = [invoke(S, "integerEntry", [aq(ao, cj), (valueOrElse(ar(ao, cj), 0) + co)], nil), invoke(S, "transferAsset", [bW.bytes, co, ay], nil)] | |
523 | + | $Tuple2(nil, [cc, cn]) | |
495 | 524 | } | |
496 | 525 | else throw("Strict value is not equal to itself.") | |
497 | 526 | } | |
498 | 527 | ||
499 | 528 | ||
500 | 529 | ||
501 | - | @Callable( | |
502 | - | func repay ( | |
503 | - | let | |
530 | + | @Callable(bP) | |
531 | + | func repay (ad,bS) = { | |
532 | + | let bT = [if (!(X)) | |
504 | 533 | then true | |
505 | - | else C("not allowed"), | |
506 | - | if (( | |
534 | + | else C("not allowed"), ab(bP.caller)] | |
535 | + | if ((bT == bT)) | |
507 | 536 | then $Tuple2(nil, unit) | |
508 | 537 | else throw("Strict value is not equal to itself.") | |
509 | 538 | } | |
510 | 539 | ||
511 | 540 | ||
512 | 541 | ||
513 | - | @Callable( | |
514 | - | func setPairAllowance ( | |
515 | - | let | |
542 | + | @Callable(bP) | |
543 | + | func setPairAllowance (ad,bS) = { | |
544 | + | let bT = [if (!(X)) | |
516 | 545 | then true | |
517 | - | else C("not allowed"), | |
518 | - | if (( | |
546 | + | else C("not allowed"), ab(bP.caller), ac(ad)] | |
547 | + | if ((bT == bT)) | |
519 | 548 | then { | |
520 | - | let | |
521 | - | let | |
522 | - | let | |
523 | - | let | |
524 | - | let | |
525 | - | let | |
526 | - | let | |
527 | - | $Tuple2(nil, | |
549 | + | let bU = bS[0] | |
550 | + | let bV = bS[1] | |
551 | + | let cp = bS[2] | |
552 | + | let aQ = F(bU) | |
553 | + | let aR = F(bV) | |
554 | + | let cq = (cp == "true") | |
555 | + | let ci = [invoke(S, "booleanEntry", [aP(aQ, aR), cq], nil)] | |
556 | + | $Tuple2(nil, ci) | |
528 | 557 | } | |
529 | 558 | else throw("Strict value is not equal to itself.") | |
530 | 559 | } | |
531 | 560 | ||
532 | 561 | ||
533 | 562 | ||
534 | - | @Callable( | |
535 | - | func addSyntheticAsset ( | |
536 | - | let | |
537 | - | let | |
538 | - | let | |
563 | + | @Callable(bP) | |
564 | + | func addSyntheticAsset (ad,bS) = { | |
565 | + | let aw = F(bS[0]) | |
566 | + | let ay = F(bS[1]) | |
567 | + | let bT = [if (!(X)) | |
539 | 568 | then true | |
540 | - | else C("not allowed"), | |
569 | + | else C("not allowed"), ab(bP.caller), ac(ad), if ((getString(S, av(aw)) == unit)) | |
541 | 570 | then true | |
542 | - | else C("invalid base asset"), if ((getString( | |
571 | + | else C("invalid base asset"), if ((getString(S, ax(ay)) == unit)) | |
543 | 572 | then true | |
544 | 573 | else C("invalid synthetic asset")] | |
545 | - | if (( | |
574 | + | if ((bT == bT)) | |
546 | 575 | then { | |
547 | - | let | |
548 | - | $Tuple2(nil, | |
576 | + | let ci = [invoke(S, "stringEntry", [av(aw), H(ay)], nil), invoke(S, "stringEntry", [ax(ay), H(aw)], nil)] | |
577 | + | $Tuple2(nil, ci) | |
549 | 578 | } | |
550 | 579 | else throw("Strict value is not equal to itself.") | |
551 | 580 | } | |
552 | 581 | ||
553 | 582 | ||
554 | 583 | ||
555 | - | @Callable( | |
556 | - | func doShutdown ( | |
557 | - | let | |
558 | - | if (( | |
584 | + | @Callable(bP) | |
585 | + | func doShutdown (ad,bS) = { | |
586 | + | let bY = [ab(bP.caller), ac(ad)] | |
587 | + | if ((bY == bY)) | |
559 | 588 | then { | |
560 | - | let | |
561 | - | $Tuple2(nil, | |
589 | + | let ci = [invoke(S, "booleanEntry", [p, true], nil)] | |
590 | + | $Tuple2(nil, ci) | |
562 | 591 | } | |
563 | 592 | else throw("Strict value is not equal to itself.") | |
564 | 593 | } | |
565 | 594 | ||
566 | 595 | ||
567 | 596 | ||
568 | - | @Callable( | |
569 | - | func getAccountInfoREADONLY ( | |
570 | - | let | |
571 | - | if (( | |
597 | + | @Callable(bP) | |
598 | + | func getAccountInfoREADONLY (ad,bS) = { | |
599 | + | let bY = [ab(bP.caller)] | |
600 | + | if ((bY == bY)) | |
572 | 601 | then { | |
573 | - | let an = valueOrErrorMessage(addressFromString(bM[0]), A("invalid account address")) | |
574 | - | let cn = bG(an) | |
575 | - | let aP = cn._1 | |
576 | - | let aQ = cn._2 | |
577 | - | let bj = valueOrErrorMessage(getInteger(R, ar(an)), A("leverage should be defined")) | |
578 | - | let bQ = addressFromPublicKey(ac) | |
579 | - | let at = bF(an) | |
580 | - | let bU = valueOrErrorMessage(getBinary(R, aF(at)), "kRequestIdToAccountPublicKey not found") | |
581 | - | let ch = s(valueOrElse(ao(an), 0), O(U)) | |
582 | - | let ba = s(aT(aP), O(U)) | |
583 | - | let aY = s(valueOrElse(getInteger(R, ap(an, aP)), 0), O(aP)) | |
584 | - | let aZ = s(valueOrElse(getInteger(R, ap(an, U)), 0), O(U)) | |
585 | - | let co = $Tuple11(H(aP), H(aQ), toString(an), toBase58String(bU), bj, toBase58String(at), ch, aY, aZ, s(0, O(aP)), s(0, O(U))) | |
586 | - | $Tuple2(nil, co) | |
602 | + | let ao = valueOrErrorMessage(addressFromString(bS[0]), A("invalid account address")) | |
603 | + | let cr = bK(ao) | |
604 | + | $Tuple2(nil, cr) | |
587 | 605 | } | |
588 | 606 | else throw("Strict value is not equal to itself.") | |
589 | 607 | } | |
590 | 608 | ||
591 | 609 | ||
592 | - | @Verifier(cp) | |
593 | - | func cq () = if (if (isDefined(Q)) | |
594 | - | then isDefined(getString(R, l)) | |
610 | + | ||
611 | + | @Callable(bP) | |
612 | + | func getUserInfoREADONLY (ad,bS) = { | |
613 | + | let bY = [ab(bP.caller)] | |
614 | + | if ((bY == bY)) | |
615 | + | then { | |
616 | + | let bW = valueOrErrorMessage(addressFromString(bS[0]), A("invalid user address")) | |
617 | + | let cs = valueOrErrorMessage(getBinary(S, aM(bW)), "kRequestsByOwner not found") | |
618 | + | let bX = (size(cs) / j) | |
619 | + | let ct = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19] | |
620 | + | func cu (cv,cw) = { | |
621 | + | let cx = cv | |
622 | + | let cy = cx._1 | |
623 | + | let cz = cx._2 | |
624 | + | let cA = cx._3 | |
625 | + | if ((cA > cw)) | |
626 | + | then { | |
627 | + | let au = take(cz, j) | |
628 | + | let cB = drop(cz, j) | |
629 | + | let bM = valueOrErrorMessage(getBinary(S, aG(au)), "kRequestIdToAccountPublicKey not found") | |
630 | + | let ao = addressFromPublicKey(bM) | |
631 | + | let cr = bK(ao) | |
632 | + | $Tuple3((cy :+ cr), cB, cA) | |
633 | + | } | |
634 | + | else cv | |
635 | + | } | |
636 | + | ||
637 | + | let cC = { | |
638 | + | let cD = ct | |
639 | + | let cE = size(cD) | |
640 | + | let cF = $Tuple3(nil, cs, bX) | |
641 | + | func cG (cH,cI) = if ((cI >= cE)) | |
642 | + | then cH | |
643 | + | else cu(cH, cD[cI]) | |
644 | + | ||
645 | + | func cJ (cH,cI) = if ((cI >= cE)) | |
646 | + | then cH | |
647 | + | else throw("List size exceeds 20") | |
648 | + | ||
649 | + | cJ(cG(cG(cG(cG(cG(cG(cG(cG(cG(cG(cG(cG(cG(cG(cG(cG(cG(cG(cG(cG(cF, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20) | |
650 | + | } | |
651 | + | let cy = cC._1 | |
652 | + | let cK = cC._2 | |
653 | + | let cL = cC._3 | |
654 | + | $Tuple2(nil, cy) | |
655 | + | } | |
656 | + | else throw("Strict value is not equal to itself.") | |
657 | + | } | |
658 | + | ||
659 | + | ||
660 | + | @Verifier(cM) | |
661 | + | func cN () = if (if (isDefined(R)) | |
662 | + | then isDefined(getString(S, l)) | |
595 | 663 | else false) | |
596 | 664 | then { | |
597 | - | let L = getString( | |
665 | + | let L = getString(S, l) | |
598 | 666 | if ($isInstanceOf(L, "String")) | |
599 | 667 | then { | |
600 | - | let | |
601 | - | let | |
602 | - | let | |
603 | - | | |
668 | + | let ae = L | |
669 | + | let cO = m(toString(this), toBase58String(cM.id)) | |
670 | + | let bO = valueOrElse(getBoolean(addressFromStringValue(ae), cO), false) | |
671 | + | bO | |
604 | 672 | } | |
605 | 673 | else false | |
606 | 674 | } | |
607 | - | else sigVerify( | |
675 | + | else sigVerify(cM.bodyBytes, cM.proofs[0], cM.senderPublicKey) | |
608 | 676 |
github/deemru/w8io/026f985 241.41 ms ◑